@juki-team/base-ui 1.4.135 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (749) hide show
  1. package/dist/esm/ArrowForwardIcon-B6qJaqxW.js +1 -0
  2. package/dist/esm/BarChart-D74BtmuY.js +1 -0
  3. package/dist/esm/CartesianChart-CW5O6vne.js +47 -0
  4. package/dist/esm/ChangePasswordModal-BjmZ4w-n.js +1 -0
  5. package/dist/esm/CodeEditor-DHSwOQl_.js +1 -0
  6. package/dist/esm/CodeViewer-BgcqqnsU.js +1 -0
  7. package/dist/esm/Collapse-CJGjLO29.js +1 -0
  8. package/dist/esm/DataGrid-B2ZsmTQN.js +272 -0
  9. package/dist/esm/DataViewer-C7cqe5jJ.js +1 -0
  10. package/dist/esm/DrawerView-CBLVa95i.js +1 -0
  11. package/dist/esm/ExcalidrawButton-Gtzt3GBc.js +1 -0
  12. package/dist/esm/GraphvizViewer-Dyqijdc9.js +1 -0
  13. package/dist/esm/ImageLoaderCropper-DhWDuHK1.js +1 -0
  14. package/dist/esm/InputCellPhoneNumber-BgKCDHLv.js +1 -0
  15. package/dist/esm/InputColor-DeeYpvdA.js +14 -0
  16. package/dist/esm/LineChart-D2VT5Aos.js +1 -0
  17. package/dist/esm/LoaderLayer-D9O7WqFD.js +1 -0
  18. package/dist/esm/MdMath-PFhigRVS.js +1 -0
  19. package/dist/esm/MdMathEditor-CNn23WdZ.js +28 -0
  20. package/dist/esm/{Popover-CIsKcwr_.js → Popover-kYKitQai.js} +2 -2
  21. package/dist/esm/ReplyIcon-CPGYEALJ.js +1 -0
  22. package/dist/esm/SettingsIcon-Dk27Vz1G.js +1 -0
  23. package/dist/esm/SlideDeck-DMd0LgxX.js +1 -0
  24. package/dist/esm/TableEyeIcon-D74isCSR.js +1 -0
  25. package/dist/esm/TableOfContents-zzI7FQbW.js +1 -0
  26. package/dist/esm/Tooltip-B8AobPsl.js +13 -0
  27. package/dist/esm/UserCodeEditor-CbgpE94F.js +28 -0
  28. package/dist/esm/VirtualizedRowsFixed-Cau69yw0.js +1 -0
  29. package/dist/esm/WorksheetAsSlides-cYn12ViE.js +1 -0
  30. package/dist/esm/WorksheetBodies-oAHNxEoL.js +1 -0
  31. package/dist/esm/WorksheetContents-m3z1cSCO.js +1 -0
  32. package/dist/esm/WorksheetEditor-DL9l5iCM.js +1 -0
  33. package/dist/esm/WorksheetNode-D6tMtEqC.js +1 -0
  34. package/dist/esm/WorksheetViewer-tctJbZIu.js +1 -0
  35. package/dist/esm/_baseIteratee-DJNkOVK7.js +1 -0
  36. package/dist/esm/_baseUniq-BJKKUJ6e.js +1 -0
  37. package/dist/esm/arc-BqJSq9Se.js +1 -0
  38. package/dist/esm/architecture-YZFGNWBL-rccIGhXm.js +1 -0
  39. package/dist/esm/architectureDiagram-Q4EWVU46-D4BxMEG7.js +1 -0
  40. package/dist/esm/{band-sgKLmfhd.js → band-D2afako6.js} +1 -1
  41. package/dist/esm/basic-setup-UGhpl5jF.js +1 -0
  42. package/dist/esm/blockDiagram-DXYQGD6D-z0-_xhoI.js +1 -0
  43. package/dist/esm/c4Diagram-AHTNJAMY-BoabvxgU.js +1 -0
  44. package/dist/esm/channel-B33C1-lx.js +1 -0
  45. package/dist/esm/{chunk-4BX2VUAB-DLCx-_ir.js → chunk-4BX2VUAB-BD59bCvh.js} +1 -1
  46. package/dist/esm/chunk-4TB4RGXK-bRIvkE2u.js +1 -0
  47. package/dist/esm/chunk-55IACEB6-B9SJqSMu.js +1 -0
  48. package/dist/esm/chunk-EDXVE4YY-DO0UVobI.js +1 -0
  49. package/dist/esm/{chunk-FMBD7UC4-BGLWSSaQ.js → chunk-FMBD7UC4-B0l_pK7G.js} +1 -1
  50. package/dist/esm/chunk-OYMX7WX6-ChpTvaWt.js +1 -0
  51. package/dist/esm/{chunk-QZHKN3VN-aadBLkdn.js → chunk-QZHKN3VN-9SrlxM-A.js} +1 -1
  52. package/dist/esm/chunk-YZCP3GAM-B9nB-mZv.js +1 -0
  53. package/dist/esm/classDiagram-6PBFFD2Q-BsMMZhRG.js +1 -0
  54. package/dist/esm/classDiagram-v2-HSJHXN6E-BsMMZhRG.js +1 -0
  55. package/dist/esm/clone-BDf6Yet-.js +1 -0
  56. package/dist/esm/commons-B_OozOv-.js +1 -0
  57. package/dist/esm/constants.js +1 -1
  58. package/dist/esm/cose-bilkent-S5V4N54A-DOOhcKZn.js +1 -0
  59. package/dist/esm/cytoscape.esm-D5qQrGhU.js +9 -0
  60. package/dist/esm/dagre-KV5264BT-DNQuzBru.js +1 -0
  61. package/dist/esm/{defaultLocale-BAKTrQtR.js → defaultLocale-HOdfsG1x.js} +1 -1
  62. package/dist/esm/diagram-5BDNPKRD-BuDsbwIH.js +1 -0
  63. package/dist/esm/diagram-G4DWMVQ6-Dqe6ehne.js +1 -0
  64. package/dist/esm/diagram-MMDJMWI5-DutUl44V.js +1 -0
  65. package/dist/esm/diagram-TYMM5635-Dg8R_BVT.js +1 -0
  66. package/dist/esm/erDiagram-SMLLAGMA-Z9rnwC7z.js +1 -0
  67. package/dist/esm/{floating-ui.dom-D1Wb0QDy.js → floating-ui.dom-BKnkJW47.js} +1 -1
  68. package/dist/esm/flowDiagram-DWJPFMVM-DlD4QYIw.js +1 -0
  69. package/dist/esm/ganttDiagram-T4ZO3ILL-DCyjcGXR.js +1 -0
  70. package/dist/esm/gitGraph-7Q5UKJZL-B-fw09HA.js +1 -0
  71. package/dist/esm/gitGraphDiagram-UUTBAWPF-CdYpB5kl.js +1 -0
  72. package/dist/esm/graph-BuAvWT_r.js +1 -0
  73. package/dist/esm/helpers.js +1 -1
  74. package/dist/esm/index--PWk-3Ol.js +1 -0
  75. package/dist/esm/index-A0sdG_JC.js +1 -0
  76. package/dist/esm/index-B3fb7Ita.js +1 -0
  77. package/dist/esm/index-BR16hIbn.js +1 -0
  78. package/dist/esm/index-BoA3EjMr.js +1 -0
  79. package/dist/esm/index-Bp7rYslS.js +1 -0
  80. package/dist/esm/index-Bw2EofiE.js +1 -0
  81. package/dist/esm/index-BzjjAmh3.js +1 -0
  82. package/dist/esm/{index-XKEYn2Wr.js → index-C9_5xd3V.js} +1 -1
  83. package/dist/esm/index-CB1_GL3t.js +1 -0
  84. package/dist/esm/index-CODLgwqm.js +1 -0
  85. package/dist/esm/index-CQbc3KUq.js +1 -0
  86. package/dist/esm/index-CRfRlH9U.js +1 -0
  87. package/dist/esm/index-Ccq-5wm6.js +1 -0
  88. package/dist/esm/index-Cj5SSv5l.js +1 -0
  89. package/dist/esm/index-Ck9BxS1f.js +1 -0
  90. package/dist/esm/index-CpRfyO85.js +1 -0
  91. package/dist/esm/index-CtTbnbzM.js +1 -0
  92. package/dist/esm/index-CtWPxOcn.js +1 -0
  93. package/dist/esm/index-D2mDsVm5.js +1 -0
  94. package/dist/esm/index-D5NvcxPc.js +1 -0
  95. package/dist/esm/index-D8zPYs0m.js +1 -0
  96. package/dist/esm/index-DAJdettS.js +1 -0
  97. package/dist/esm/index-DSGuayJy.js +1 -0
  98. package/dist/esm/index-DVFv6Eth.js +1 -0
  99. package/dist/esm/index-D_AOS7Yx.js +1 -0
  100. package/dist/esm/index-GoUUn3QE.js +1 -0
  101. package/dist/esm/index-QhLowdpF.js +1 -0
  102. package/dist/esm/index-Y09lLL_e.js +1 -0
  103. package/dist/esm/index-rYUgz1LC.js +1 -0
  104. package/dist/esm/index-xaEdDd13.js +1 -0
  105. package/dist/esm/info-OMHHGYJF-fbv9Xw4D.js +1 -0
  106. package/dist/esm/infoDiagram-42DDH7IO-Ce56qzjb.js +1 -0
  107. package/dist/esm/{init-DWDD0M30.js → init-DLRA0X12.js} +1 -1
  108. package/dist/esm/isSymbol-CATEdeai.js +1 -0
  109. package/dist/esm/isUndefined-DgmxjSXK.js +1 -0
  110. package/dist/esm/ishikawaDiagram-UXIWVN3A-Cc0AgO_R.js +1 -0
  111. package/dist/esm/journeyDiagram-VCZTEJTY-BQAuB_0y.js +1 -0
  112. package/dist/esm/kanban-definition-6JOO6SKY-CFfdKxrM.js +1 -0
  113. package/dist/esm/layout-C9Uq7X58.js +1 -0
  114. package/dist/esm/{lib-mG56Y3Rb.js → lib-DdKR2uQv.js} +1 -1
  115. package/dist/esm/{linear-L30X52KW.js → linear-BnXjbO66.js} +1 -1
  116. package/dist/esm/{lua-BvgfYBhq.js → lua-8DXOpKDz.js} +1 -1
  117. package/dist/esm/main.js +1 -1
  118. package/dist/esm/map-BvlAjF4J.js +1 -0
  119. package/dist/esm/memoize-CPUrcYQl.js +1 -0
  120. package/dist/esm/mermaid-parser.core-B9BVFPAN.js +1 -0
  121. package/dist/esm/mermaid.core-Ch6a1N6x.js +1 -0
  122. package/dist/esm/min-Dc9VrJ6M.js +1 -0
  123. package/dist/esm/mindmap-definition-QFDTVHPH-BwtZAHVe.js +1 -0
  124. package/dist/esm/{ordinal-UuA5o140.js → ordinal-zwWoQKz9.js} +1 -1
  125. package/dist/esm/packet-4T2RLAQJ-BGTrXSHu.js +1 -0
  126. package/dist/esm/pie-ZZUOXDRM-Dx3xGYkv.js +1 -0
  127. package/dist/esm/pieDiagram-DEJITSTG-ChBY2XYY.js +1 -0
  128. package/dist/esm/purify.es-DBOWJxv3.js +2 -0
  129. package/dist/esm/quadrantDiagram-34T5L4WZ-CRGLfMnt.js +1 -0
  130. package/dist/esm/radar-PYXPWWZC-BYId5clz.js +1 -0
  131. package/dist/esm/requirementDiagram-MS252O5E-qmbcV6Kf.js +1 -0
  132. package/dist/esm/sankeyDiagram-XADWPNL6-DaL42Ehn.js +1 -0
  133. package/dist/esm/sequenceDiagram-FGHM5R23-D28F9BbZ.js +1 -0
  134. package/dist/esm/server.js +1 -1
  135. package/dist/esm/settings-BIQ7IqJl.js +1 -0
  136. package/dist/esm/settings.js +1 -1
  137. package/dist/esm/stateDiagram-FHFEXIEX-RgoWlW1V.js +1 -0
  138. package/dist/esm/stateDiagram-v2-QKLJ7IA2-DuyT41He.js +1 -0
  139. package/dist/esm/{string-CQk_HvWX.js → string-LeDn2fkG.js} +1 -1
  140. package/dist/esm/throttle-BsCMUG1-.js +1 -0
  141. package/dist/esm/time-PiK_t_Re.js +1 -0
  142. package/dist/esm/timeline-definition-GMOUNBTQ-BcOvpU4t.js +1 -0
  143. package/dist/esm/toNumber-Bh_HTlSx.js +1 -0
  144. package/dist/esm/treeView-SZITEDCU-BjLEV1yZ.js +1 -0
  145. package/dist/esm/treemap-W4RFUUIX-Cuo2Y8dN.js +1 -0
  146. package/dist/esm/types-DI2OON_b.js +1 -0
  147. package/dist/esm/vennDiagram-DHZGUBPP-CZrtDTUB.js +1 -0
  148. package/dist/esm/viz-CFEjElvl.js +9 -0
  149. package/dist/esm/wardley-RL74JXVD-d0LkVT8_.js +1 -0
  150. package/dist/esm/wardleyDiagram-NUSXRM2D-vlFiIB8t.js +1 -0
  151. package/dist/esm/websocket-CxbYBjHT.js +1 -0
  152. package/dist/esm/worksheet-CQgex79V.js +1 -0
  153. package/dist/esm/xychartDiagram-5P7HB3ND-DsCQdXVH.js +1 -0
  154. package/dist/module-types/src/components/atoms/Button/Button.d.ts +3 -3
  155. package/dist/module-types/src/components/atoms/Client/types.d.ts +1 -1
  156. package/dist/module-types/src/components/atoms/CopyToClipboard/types.d.ts +2 -2
  157. package/dist/module-types/src/components/atoms/{server/DateLiteral → DateLiteral}/types.d.ts +2 -2
  158. package/dist/module-types/src/components/atoms/DetectRequestAnimationFrame/DetectRequestAnimationFrame.d.ts +1 -1
  159. package/dist/module-types/src/components/atoms/Div/Div.d.ts +1 -1
  160. package/dist/module-types/src/components/atoms/Div/types.d.ts +1 -1
  161. package/dist/module-types/src/components/atoms/Input/Input.d.ts +6 -8
  162. package/dist/module-types/src/components/atoms/Input/types.d.ts +4 -4
  163. package/dist/module-types/src/components/atoms/Modal/types.d.ts +3 -3
  164. package/dist/module-types/src/components/atoms/Portal/Portal.d.ts +1 -1
  165. package/dist/module-types/src/components/atoms/Portal/types.d.ts +1 -1
  166. package/dist/module-types/src/components/atoms/T/types.d.ts +1 -12
  167. package/dist/module-types/src/components/atoms/TextArea/TextArea.d.ts +4 -4
  168. package/dist/module-types/src/components/atoms/_lazy_/Collapse/types.d.ts +2 -2
  169. package/dist/module-types/src/components/atoms/_lazy_/InputCellPhoneNumber/types.d.ts +1 -1
  170. package/dist/module-types/src/components/atoms/_lazy_/Popover/types.d.ts +2 -2
  171. package/dist/module-types/src/components/atoms/_lazy_/VirtualizedRowsFixed/types.d.ts +1 -1
  172. package/dist/module-types/src/components/atoms/index.d.ts +6 -6
  173. package/dist/module-types/src/components/atoms/server/icons/SpinIcon/Spin.d.ts +1 -1
  174. package/dist/module-types/src/components/atoms/server/icons/SpinIcon/types.d.ts +2 -2
  175. package/dist/module-types/src/components/atoms/server/icons/google/_group.d.ts +1 -1
  176. package/dist/module-types/src/components/atoms/server/icons/google/index.d.ts +1 -1
  177. package/dist/module-types/src/components/atoms/server/icons/index.d.ts +1 -1
  178. package/dist/module-types/src/components/atoms/server/icons/specials/BalloonIcon/index.d.ts +1 -1
  179. package/dist/module-types/src/components/atoms/server/icons/specials/BalloonIcon/types.d.ts +2 -2
  180. package/dist/module-types/src/components/atoms/server/icons/specials/FacebookIcon/types.d.ts +2 -2
  181. package/dist/module-types/src/components/atoms/server/icons/specials/GmailIcon/types.d.ts +2 -2
  182. package/dist/module-types/src/components/atoms/server/icons/specials/SortIcon/types.d.ts +2 -2
  183. package/dist/module-types/src/components/atoms/server/icons/specials/TelegramIcon/types.d.ts +2 -2
  184. package/dist/module-types/src/components/atoms/server/icons/specials/types.d.ts +6 -5
  185. package/dist/module-types/src/components/atoms/server/icons/types.d.ts +16 -16
  186. package/dist/module-types/src/components/atoms/server/icons/utils/CircleFilledFrame.d.ts +1 -1
  187. package/dist/module-types/src/components/atoms/server/icons/utils/CirclePath.d.ts +1 -1
  188. package/dist/module-types/src/components/atoms/server/icons/utils/functions.d.ts +3 -3
  189. package/dist/module-types/src/components/atoms/server/icons/utils/index.d.ts +2 -2
  190. package/dist/module-types/src/components/atoms/server/icons/utils/renderBasicIcon.d.ts +1 -1
  191. package/dist/module-types/src/components/atoms/server/icons/utils/renderSignIcon.d.ts +2 -2
  192. package/dist/module-types/src/components/atoms/server/index.d.ts +0 -2
  193. package/dist/module-types/src/components/atoms/server/loaders/LoaderLayer.d.ts +2 -2
  194. package/dist/module-types/src/components/atoms/server/loaders/index.d.ts +1 -1
  195. package/dist/module-types/src/components/atoms/server/loaders/line-loader/LineLoader.d.ts +1 -1
  196. package/dist/module-types/src/components/atoms/types.d.ts +11 -10
  197. package/dist/module-types/src/components/helpers/commons.d.ts +4 -4
  198. package/dist/module-types/src/components/helpers/contest.d.ts +1 -1
  199. package/dist/module-types/src/components/helpers/date.d.ts +4 -3
  200. package/dist/module-types/src/components/helpers/fetch.d.ts +7 -7
  201. package/dist/module-types/src/components/helpers/layout.d.ts +2 -2
  202. package/dist/module-types/src/components/helpers/problem.d.ts +4 -15
  203. package/dist/module-types/src/components/helpers/render.d.ts +1 -1
  204. package/dist/module-types/src/components/helpers/router.d.ts +1 -1
  205. package/dist/module-types/src/components/helpers/submission.d.ts +2 -2
  206. package/dist/module-types/src/components/helpers/time.d.ts +1 -1
  207. package/dist/module-types/src/components/helpers/websocket.d.ts +40 -2
  208. package/dist/module-types/src/components/hooks/useClickOutside.d.ts +1 -1
  209. package/dist/module-types/src/components/hooks/useDataViewerRequester.d.ts +3 -3
  210. package/dist/module-types/src/components/hooks/useFetcher.d.ts +4 -4
  211. package/dist/module-types/src/components/hooks/useHandleState.d.ts +1 -1
  212. package/dist/module-types/src/components/hooks/useInjectTheme.d.ts +1 -1
  213. package/dist/module-types/src/components/hooks/useJudge.d.ts +3 -4
  214. package/dist/module-types/src/components/hooks/useJukiNotification.d.ts +1 -1
  215. package/dist/module-types/src/components/hooks/useJukiUser.d.ts +13 -12
  216. package/dist/module-types/src/components/hooks/useLoaderStatusSync.d.ts +1 -1
  217. package/dist/module-types/src/components/hooks/useOverflowDetector.d.ts +1 -1
  218. package/dist/module-types/src/components/hooks/useSubscribe.d.ts +2 -2
  219. package/dist/module-types/src/components/hooks/useSyncedState.d.ts +1 -1
  220. package/dist/module-types/src/components/hooks/useTrackCursor.d.ts +1 -1
  221. package/dist/module-types/src/components/index.d.ts +1 -1
  222. package/dist/module-types/src/components/mockup/MockupJukiProvider.d.ts +1 -1
  223. package/dist/module-types/src/components/mockup/index.d.ts +4 -0
  224. package/dist/module-types/src/components/molecules/Breadcrumbs/types.d.ts +1 -1
  225. package/dist/module-types/src/components/molecules/ButtonLoader/types.d.ts +1 -1
  226. package/dist/module-types/src/components/molecules/CheckboxList/types.d.ts +1 -1
  227. package/dist/module-types/src/components/molecules/{server/CircularProgress → CircularProgress}/CircularProgress.d.ts +1 -1
  228. package/dist/module-types/src/components/molecules/DatePicker/DatePicker.d.ts +1 -4
  229. package/dist/module-types/src/components/molecules/DatePicker/types.d.ts +17 -17
  230. package/dist/module-types/src/components/molecules/Drawer/types.d.ts +1 -1
  231. package/dist/module-types/src/components/molecules/FetcherLayer/FetcherLayer.d.ts +2 -2
  232. package/dist/module-types/src/components/molecules/FetcherLayer/types.d.ts +8 -8
  233. package/dist/module-types/src/components/molecules/FirstLoginWrapper/types.d.ts +1 -1
  234. package/dist/module-types/src/components/molecules/FloatToolbar/types.d.ts +2 -2
  235. package/dist/module-types/src/components/molecules/HomeLink/types.d.ts +2 -0
  236. package/dist/module-types/src/components/molecules/InformationPopover/FrozenInformation.d.ts +1 -1
  237. package/dist/module-types/src/components/molecules/InformationPopover/InformationPopover.d.ts +2 -2
  238. package/dist/module-types/src/components/molecules/InformationPopover/NewlineInfo.d.ts +3 -0
  239. package/dist/module-types/src/components/molecules/InformationPopover/QuietInformation.d.ts +1 -1
  240. package/dist/module-types/src/components/molecules/InformationPopover/UpsolvingInformation.d.ts +1 -1
  241. package/dist/module-types/src/components/molecules/InformationPopover/types.d.ts +1 -1
  242. package/dist/module-types/src/components/molecules/LinkLastPath/types.d.ts +2 -2
  243. package/dist/module-types/src/components/molecules/MultiSelectSearchable/types.d.ts +1 -1
  244. package/dist/module-types/src/components/molecules/Pagination/Pagination.d.ts +1 -1
  245. package/dist/module-types/src/components/molecules/ProgressMultiBar/types.d.ts +5 -1
  246. package/dist/module-types/src/components/molecules/ProgressSlide/ProgressSlide.d.ts +1 -1
  247. package/dist/module-types/src/components/molecules/SplitModal/types.d.ts +1 -1
  248. package/dist/module-types/src/components/molecules/SplitPane/types.d.ts +1 -1
  249. package/dist/module-types/src/components/molecules/Tabs/types.d.ts +1 -1
  250. package/dist/module-types/src/components/molecules/TabsInline/TabsInline.deprecated.d.ts +2 -0
  251. package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButton.d.ts +1 -1
  252. package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButtonLoader.d.ts +1 -1
  253. package/dist/module-types/src/components/molecules/TabsInlineBody/TabsInlineBody.deprecated.d.ts +2 -0
  254. package/dist/module-types/src/components/molecules/ThemeColorPalette/types.d.ts +2 -0
  255. package/dist/module-types/src/components/molecules/{server/TimerDisplay → Timer}/TimerDisplay.d.ts +1 -1
  256. package/dist/module-types/src/components/molecules/Timer/types.d.ts +13 -2
  257. package/dist/module-types/src/components/molecules/TimerLabeled/types.d.ts +2 -2
  258. package/dist/module-types/src/components/molecules/TwoActionModal/types.d.ts +1 -1
  259. package/dist/module-types/src/components/molecules/TwoContentSection/types.d.ts +1 -1
  260. package/dist/module-types/src/components/molecules/_lazy_/BarChart/types.d.ts +3 -3
  261. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/CodeEditor.d.ts +1 -1
  262. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/ReactCodeMirror.d.ts +2 -8
  263. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/extensions/basic-setup.d.ts +1 -1
  264. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/timeoutLatch.d.ts +1 -1
  265. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/types.d.ts +1 -1
  266. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/codemirror/useCodeMirror.d.ts +1 -1
  267. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/index.d.ts +1 -1
  268. package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/types.d.ts +1 -1
  269. package/dist/module-types/src/components/molecules/_lazy_/CodeViewer/types.d.ts +2 -2
  270. package/dist/module-types/src/components/molecules/_lazy_/DataGrid/DataGrid.d.ts +1 -1
  271. package/dist/module-types/src/components/molecules/_lazy_/DrawerView/DrawerView.d.ts +1 -1
  272. package/dist/module-types/src/components/molecules/_lazy_/DrawerView/types.d.ts +1 -1
  273. package/dist/module-types/src/components/molecules/_lazy_/ImageLoaderCropper/canvasPreview.d.ts +1 -1
  274. package/dist/module-types/src/components/molecules/_lazy_/InputColor/types.d.ts +1 -1
  275. package/dist/module-types/src/components/molecules/_lazy_/LineChart/types.d.ts +4 -4
  276. package/dist/module-types/src/components/molecules/_lazy_/SlideDeck/pdfexport.d.ts +1 -1
  277. package/dist/module-types/src/components/molecules/_lazy_/SlideDeck/types.d.ts +2 -2
  278. package/dist/module-types/src/components/molecules/_lazy_/SortableItems/SortableItems.d.ts +1 -1
  279. package/dist/module-types/src/components/molecules/_lazy_/SortableItems/types.d.ts +5 -5
  280. package/dist/module-types/src/components/molecules/index.d.ts +22 -17
  281. package/dist/module-types/src/components/molecules/layouts/types.d.ts +1 -1
  282. package/dist/module-types/src/components/molecules/types.d.ts +14 -12
  283. package/dist/module-types/src/components/organisms/AiChatPanel/types.d.ts +2 -2
  284. package/dist/module-types/src/components/organisms/CardNotification/types.d.ts +2 -2
  285. package/dist/module-types/src/components/organisms/CheckUnsavedChanges/types.d.ts +1 -1
  286. package/dist/module-types/src/components/organisms/HorizontalMenu/types.d.ts +1 -1
  287. package/dist/module-types/src/components/organisms/LoginUser/types.d.ts +1 -1
  288. package/dist/module-types/src/components/organisms/MdMathViewer/MemoMdMath.deprecated.d.ts +3 -0
  289. package/dist/module-types/src/components/organisms/MdMathViewer/MemoMdMathViewer.deprecated.d.ts +2 -0
  290. package/dist/module-types/src/components/organisms/MdMathViewer/types.d.ts +10 -2
  291. package/dist/module-types/src/components/organisms/PageNotFound/types.d.ts +1 -1
  292. package/dist/module-types/src/components/organisms/PresentationToolButtons/PresentationToolButtons.d.ts +1 -1
  293. package/dist/module-types/src/components/organisms/PresentationToolButtons/buttons/Pencil.deprecated.d.ts +0 -0
  294. package/dist/module-types/src/components/organisms/PresentationToolButtons/types.d.ts +2 -0
  295. package/dist/module-types/src/components/organisms/ProblemSelector/ProblemSelector.d.ts +1 -1
  296. package/dist/module-types/src/components/organisms/ProblemSelector/types.d.ts +2 -2
  297. package/dist/module-types/src/components/organisms/ProblemVerdictTag/types.d.ts +1 -1
  298. package/dist/module-types/src/components/organisms/SubmitView/SubmitView.d.ts +1 -1
  299. package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionGroupInfo.d.ts +1 -2
  300. package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionListenerVerdict.d.ts +1 -1
  301. package/dist/module-types/src/components/organisms/{server/SubmissionMemory → SubmitView/commons}/SubmissionMemory.d.ts +1 -1
  302. package/dist/module-types/src/components/organisms/{server/SubmissionTime → SubmitView/commons}/SubmissionTime.d.ts +1 -1
  303. package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionVerdict.d.ts +1 -2
  304. package/dist/module-types/src/components/organisms/SubmitView/commons/SubmitViewContent.d.ts +1 -1
  305. package/dist/module-types/src/components/organisms/SubmitView/types.d.ts +1 -1
  306. package/dist/module-types/src/components/organisms/{server/TextHeadCell → TextHeadCell}/TextHeadCell.d.ts +1 -1
  307. package/dist/module-types/src/components/organisms/UserChip/UserChip.d.ts +2 -5
  308. package/dist/module-types/src/components/organisms/UserChip/types.d.ts +3 -3
  309. package/dist/module-types/src/components/organisms/UserNicknameLink/UserNicknameLink.d.ts +1 -1
  310. package/dist/module-types/src/components/organisms/UsersSelector/types.d.ts +2 -2
  311. package/dist/module-types/src/components/organisms/VerticalMenu/types.d.ts +1 -1
  312. package/dist/module-types/src/components/organisms/_layz_/ChangePasswordModal/index.d.ts +1 -1
  313. package/dist/module-types/src/components/organisms/_layz_/ChangePasswordModal/types.d.ts +1 -1
  314. package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/types.d.ts +1 -1
  315. package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkContestTableTest/MockJkContestTable.d.ts +1 -1
  316. package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkProblemTableTest/MockJkProblemTable.d.ts +1 -1
  317. package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkSubmissionsTableTest/MockJkSubmissionTable.d.ts +1 -1
  318. package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkUserTableTest/MockJkUserTable.d.ts +1 -1
  319. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/Filter.d.ts +1 -1
  320. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterDate.d.ts +1 -1
  321. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterDateRange.d.ts +1 -1
  322. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterText.d.ts +1 -1
  323. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/index.d.ts +2 -2
  324. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/types.d.ts +2 -2
  325. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/ViewContainerRows.d.ts +1 -1
  326. package/dist/module-types/src/components/organisms/_layz_/DataViewer/commons/DisplayDataViewer.d.ts +1 -1
  327. package/dist/module-types/src/components/organisms/_layz_/DataViewer/commons/utils.d.ts +6 -5
  328. package/dist/module-types/src/components/organisms/_layz_/DataViewer/types.d.ts +11 -10
  329. package/dist/module-types/src/components/organisms/_layz_/GraphvizViewer/GraphvizViewer.d.ts +1 -1
  330. package/dist/module-types/src/components/organisms/_layz_/GraphvizViewer/index.d.ts +1 -1
  331. package/dist/module-types/src/components/organisms/_layz_/MdMath/MdMath.d.ts +1 -1
  332. package/dist/module-types/src/components/organisms/_layz_/MdMath/index.d.ts +1 -1
  333. package/dist/module-types/src/components/organisms/_layz_/MdMath/types.d.ts +1 -1
  334. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MdMathEditor.d.ts +1 -4
  335. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MdMathEditor.deprecated.d.ts +2 -0
  336. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MdMathEditor.tiptap.deprecated.d.ts +0 -0
  337. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MilkdownEditorContent/MilkdownEditorContent.d.ts +4 -5
  338. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/index.d.ts +2 -5
  339. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/TiptapEditorContent.d.ts +0 -0
  340. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/BlockImage.d.ts +0 -0
  341. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/ClearMarksOnEnter.d.ts +0 -0
  342. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CurrentNodeHighlighter.d.ts +0 -0
  343. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CustomCodeBlockLowlight.d.ts +0 -0
  344. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/CustomLink.d.ts +0 -0
  345. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/SmartHeadingBackspace.d.ts +0 -0
  346. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/SmartPasteMarkdown.d.ts +0 -0
  347. package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/tip-tap.deprecated/extensions/index.d.ts +0 -0
  348. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/CodeRunnerEditor.d.ts +1 -1
  349. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FileTreePanel/types.d.ts +2 -2
  350. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FirstPane.d.ts +3 -4
  351. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/Header/RunCodeButton.d.ts +3 -3
  352. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/MermaidViewer/MermaidViewer.d.ts +1 -1
  353. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/SettingsModal/index.d.ts +1 -1
  354. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/types.d.ts +8 -9
  355. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/UserCodeEditor.d.ts +4 -5
  356. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/code-editor-file.d.ts +7 -0
  357. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/index.d.ts +2 -4
  358. package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/types.d.ts +4 -4
  359. package/dist/module-types/src/components/organisms/_layz_/WorksheetAsSlides/index.d.ts +1 -1
  360. package/dist/module-types/src/components/organisms/_layz_/WorksheetAsSlides/types.d.ts +1 -1
  361. package/dist/module-types/src/components/organisms/_layz_/WorksheetContents/index.d.ts +1 -1
  362. package/dist/module-types/src/components/organisms/_layz_/WorksheetContents/types.d.ts +2 -2
  363. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/index.d.ts +1 -1
  364. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/AddNewChild.d.ts +3 -3
  365. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ChunkTitle.d.ts +1 -1
  366. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSection.d.ts +2 -2
  367. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionEditor.d.ts +2 -2
  368. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionEditorModal.d.ts +10 -0
  369. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionView.d.ts +2 -2
  370. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/EditSheetModal.d.ts +2 -2
  371. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSection.d.ts +2 -2
  372. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionEditor.d.ts +2 -2
  373. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionEditorModal.d.ts +10 -0
  374. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionView.d.ts +2 -2
  375. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSection.d.ts +2 -2
  376. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSection.old.d.ts +6 -0
  377. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSectionEditor.d.ts +2 -2
  378. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSectionEditorModal.d.ts +10 -0
  379. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetRecursiveSection.d.ts +9 -0
  380. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetSection.d.ts +7 -0
  381. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/index.d.ts +1 -0
  382. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSection.d.ts +2 -2
  383. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionEditor.d.ts +1 -1
  384. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionEditorModal.d.ts +10 -0
  385. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionView.d.ts +2 -2
  386. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSection.d.ts +2 -2
  387. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditor.d.ts +2 -2
  388. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditorModal.d.ts +10 -0
  389. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditorModal.old.d.ts +0 -0
  390. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionView.d.ts +1 -1
  391. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionView.old.d.ts +0 -0
  392. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ResultHeader.d.ts +2 -2
  393. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/TableOfContents.d.ts +2 -2
  394. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/TableOfContentsModal.d.ts +3 -3
  395. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/UpRemoveDownButtons.d.ts +7 -0
  396. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/WorksheetBody.d.ts +4 -5
  397. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/WorksheetNode.d.ts +1 -1
  398. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/getActionButtons.d.ts +5 -6
  399. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/logos.d.ts +4 -4
  400. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/types.d.ts +2 -2
  401. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/upRemoveDownActions.d.ts +2 -2
  402. package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/types.d.ts +3 -3
  403. package/dist/module-types/src/components/organisms/_layz_/WorksheetViewer/WorksheetViewer.d.ts +1 -1
  404. package/dist/module-types/src/components/organisms/_layz_/WorksheetViewer/types.d.ts +2 -2
  405. package/dist/module-types/src/components/organisms/index.d.ts +14 -13
  406. package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/PublicImagesTab/PublicImages.d.ts +3 -3
  407. package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/PublicImagesTab/index.d.ts +2 -2
  408. package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/UploadNewImageTab/index.d.ts +2 -2
  409. package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/types.d.ts +5 -5
  410. package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModal.d.ts +2 -2
  411. package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/ForgotPassword/types.d.ts +1 -1
  412. package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/index.d.ts +1 -1
  413. package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/types.d.ts +4 -4
  414. package/dist/module-types/src/components/organisms/modals/LoginModal/types.d.ts +2 -2
  415. package/dist/module-types/src/components/organisms/modals/SignUpModal/SignUpModalTemplate/types.d.ts +2 -2
  416. package/dist/module-types/src/components/organisms/modals/UserPreviewModal/UserPreviewContentModal.d.ts +4 -4
  417. package/dist/module-types/src/components/organisms/modals/UserPreviewModal/types.d.ts +2 -0
  418. package/dist/module-types/src/components/organisms/modals/WelcomeModal/types.d.ts +1 -1
  419. package/dist/module-types/src/components/organisms/modals/index.d.ts +1 -1
  420. package/dist/module-types/src/components/organisms/types.d.ts +10 -9
  421. package/dist/module-types/src/components/providers/JukiAblyInitializer/JukiAblyInitializer.d.ts +1 -1
  422. package/dist/module-types/src/components/providers/JukiI18nInitializer/JukiI18nInitializer.d.ts +1 -0
  423. package/dist/module-types/src/components/providers/JukiI18nInitializer/index.d.ts +1 -0
  424. package/dist/module-types/src/components/providers/JukiLastPathInitializer/types.d.ts +1 -1
  425. package/dist/module-types/src/components/providers/JukiPageInitializer/useMouseInsidePage.d.ts +1 -0
  426. package/dist/module-types/src/components/providers/JukiProviders.d.ts +2 -2
  427. package/dist/module-types/src/components/providers/JukiRouterInitializer/JukiRouterInitializer.d.ts +1 -1
  428. package/dist/module-types/src/components/providers/JukiRouterInitializer/types.d.ts +2 -2
  429. package/dist/module-types/src/components/providers/{server/Image → JukiUIProvider}/Image.d.ts +1 -1
  430. package/dist/module-types/src/components/providers/JukiUIProvider/JukiUIProvider.d.ts +1 -1
  431. package/dist/module-types/src/components/providers/JukiUIProvider/Link.d.ts +1 -1
  432. package/dist/module-types/src/components/providers/JukiUIProvider/types.d.ts +24 -6
  433. package/dist/module-types/src/components/providers/JukiUserProvider/types.d.ts +9 -8
  434. package/dist/module-types/src/components/providers/NotificationProvider/NotificationProvider.d.ts +1 -1
  435. package/dist/module-types/src/components/providers/index.d.ts +1 -1
  436. package/dist/module-types/src/components/providers/types.d.ts +3 -2
  437. package/dist/module-types/src/components/server/index.d.ts +0 -4
  438. package/dist/module-types/src/components/server/types.d.ts +0 -4
  439. package/dist/module-types/src/components/templates/ContestNameLinkField/types.d.ts +2 -2
  440. package/dist/module-types/src/components/templates/EditProfileModal/ImageProfileModal.d.ts +1 -1
  441. package/dist/module-types/src/components/templates/EditProfileModal/types.d.ts +4 -5
  442. package/dist/module-types/src/components/templates/EntityCreateLayout/types.d.ts +1 -1
  443. package/dist/module-types/src/components/templates/EntityUpdateLayout/types.d.ts +1 -1
  444. package/dist/module-types/src/components/templates/ErrorBoundary/types.d.ts +1 -1
  445. package/dist/module-types/src/components/templates/HelpSection/types.d.ts +2 -0
  446. package/dist/module-types/src/components/templates/MainMenu/DrawerViewMenuMobile/DrawerViewMenuMobile.d.ts +2 -2
  447. package/dist/module-types/src/components/templates/MainMenu/DrawerViewMenuMobile/index.d.ts +1 -0
  448. package/dist/module-types/src/components/templates/MainMenu/SettingsSection/index.d.ts +1 -1
  449. package/dist/module-types/src/components/templates/MainMenu/types.d.ts +5 -5
  450. package/dist/module-types/src/components/templates/ProblemView/ProblemInfo.d.ts +1 -1
  451. package/dist/module-types/src/components/templates/ProblemView/ProblemView.d.ts +1 -1
  452. package/dist/module-types/src/components/templates/ProblemView/commons/ProblemCodeEditor.d.ts +2 -2
  453. package/dist/module-types/src/components/templates/ProblemView/commons/SampleTest.d.ts +1 -1
  454. package/dist/module-types/src/components/templates/ProblemView/types.d.ts +4 -4
  455. package/dist/module-types/src/components/templates/ResetPasswordModal/ResetPasswordModal.d.ts +1 -1
  456. package/dist/module-types/src/components/templates/ResetPasswordModal/types.d.ts +2 -2
  457. package/dist/module-types/src/components/templates/UserActiveSessions/UserMyActiveSessions.d.ts +2 -1
  458. package/dist/module-types/src/components/templates/UserActiveSessions/types.d.ts +2 -0
  459. package/dist/module-types/src/components/templates/UserProfile/types.d.ts +1 -1
  460. package/dist/module-types/src/components/templates/UserProfileSettings/types.d.ts +1 -1
  461. package/dist/module-types/src/components/templates/UserViewLayout/ProfileSubmissions.d.ts +2 -1
  462. package/dist/module-types/src/components/templates/UserViewLayout/types.d.ts +5 -3
  463. package/dist/module-types/src/components/templates/columns/contest-columns/getContestContestantsHeader.d.ts +3 -0
  464. package/dist/module-types/src/components/templates/columns/contest-columns/getContestDateHeader.d.ts +3 -0
  465. package/dist/module-types/src/components/templates/columns/contest-columns/getContestNameHeader.d.ts +1 -1
  466. package/dist/module-types/src/components/templates/columns/contest-columns/getContestStatusHeader.d.ts +1 -1
  467. package/dist/module-types/src/components/templates/columns/contest-columns/getContestTagsHeader.d.ts +1 -1
  468. package/dist/module-types/src/components/templates/columns/contest-columns/index.d.ts +2 -2
  469. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemAdminActionsHeader.d.ts +1 -1
  470. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemKeyHeader.d.ts +1 -1
  471. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemModeHeader.d.ts +1 -1
  472. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemNameHeader.d.ts +1 -1
  473. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemOwnerHeader.d.ts +1 -1
  474. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemTagsHeader.d.ts +1 -1
  475. package/dist/module-types/src/components/templates/columns/problem-columns/getProblemTypeHeader.d.ts +1 -1
  476. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionContestHeader.d.ts +1 -1
  477. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionContestProblemHeader.d.ts +1 -1
  478. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionDateHeader.d.ts +1 -1
  479. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionLanguageHeader.d.ts +1 -2
  480. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionMemoryHeader.d.ts +1 -1
  481. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionNicknameHeader.d.ts +2 -2
  482. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionProblemHeader.d.ts +1 -1
  483. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionRejudgeHeader.d.ts +1 -1
  484. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionTimeHeader.d.ts +1 -1
  485. package/dist/module-types/src/components/templates/columns/submission-columns/getSubmissionVerdictHeader.d.ts +1 -1
  486. package/dist/module-types/src/components/templates/index.d.ts +17 -14
  487. package/dist/module-types/src/components/templates/members/DocumentMembersButton.d.ts +1 -1
  488. package/dist/module-types/src/components/templates/members/DocumentMembersModal/DocumentMembersModal.d.ts +1 -1
  489. package/dist/module-types/src/components/templates/members/types.d.ts +5 -6
  490. package/dist/module-types/src/components/templates/problem/ProblemCrawlerField.d.ts +1 -1
  491. package/dist/module-types/src/components/templates/problem/ProblemModeField.d.ts +1 -1
  492. package/dist/module-types/src/components/templates/problem/ProblemOwnerField.d.ts +1 -1
  493. package/dist/module-types/src/components/templates/problem/ProblemTypeField.d.ts +1 -1
  494. package/dist/module-types/src/components/templates/{server/problem → problem}/TagsField.d.ts +1 -1
  495. package/dist/module-types/src/components/templates/problem/types.d.ts +8 -2
  496. package/dist/module-types/src/components/templates/{server/submission → submission}/SubmissionDateField.d.ts +1 -1
  497. package/dist/module-types/src/components/templates/submission/SubmissionLanguageField.d.ts +1 -1
  498. package/dist/module-types/src/components/templates/submission/SubmissionNicknameField.d.ts +1 -1
  499. package/dist/module-types/src/components/templates/submission/types.d.ts +2 -2
  500. package/dist/module-types/src/components/templates/types.d.ts +15 -12
  501. package/dist/module-types/src/components/types/index.d.ts +10 -12
  502. package/dist/module-types/src/constants/index.d.ts +3 -3
  503. package/dist/module-types/src/constants/settings.d.ts +1 -1
  504. package/dist/module-types/src/constants/worksheet.d.ts +1 -1
  505. package/dist/module-types/src/helpers/index.d.ts +1 -1
  506. package/dist/module-types/src/hooks/index.d.ts +13 -12
  507. package/dist/module-types/src/settings/ApiManager.d.ts +249 -370
  508. package/dist/module-types/src/settings/AppRoutes.d.ts +4 -4
  509. package/dist/module-types/src/stores/ably/useAblyStore.d.ts +2 -2
  510. package/dist/module-types/src/stores/i18n/i18n.d.ts +2 -0
  511. package/dist/module-types/src/stores/i18n/i18nConfig.d.ts +7 -0
  512. package/dist/module-types/src/stores/i18n/useI18nStore.d.ts +8 -0
  513. package/dist/module-types/src/stores/lastPath/useLastPath.d.ts +1 -1
  514. package/dist/module-types/src/stores/router/useRouterStore.d.ts +2 -2
  515. package/dist/module-types/src/stores/sound/useSoundStore.d.ts +1 -1
  516. package/dist/module-types/src/stores/ui/useUIStore.d.ts +2 -2
  517. package/dist/module-types/src/stores/user/useUserStore.d.ts +2 -2
  518. package/dist/module-types/src/stores/websocket/types.d.ts +2 -2
  519. package/dist/module-types/src/stores/websocket/useWebsocketStore.d.ts +1 -1
  520. package/dist/module-types/src/types/index.d.ts +1 -1
  521. package/package.json +70 -76
  522. package/src/styles/components/atoms/_button.scss +7 -7
  523. package/src/styles/components/atoms/_data-viewer.scss +3 -3
  524. package/src/styles/components/atoms/_modal.scss +0 -9
  525. package/src/vendor/@milkdown/crepe/lib/theme/common/code-mirror.css +0 -14
  526. package/src/vendor/@milkdown/crepe/lib/theme/common/style.css +0 -2
  527. package/src/vendor/@milkdown/crepe/src/theme/common/code-mirror.css +0 -14
  528. package/src/vendor/@milkdown/crepe/src/theme/common/style.css +0 -2
  529. package/src/vendor/fumadocs-ui/css/generated/docs.css +281 -3
  530. package/src/vendor/fumadocs-ui/css/generated/flux.css +264 -2
  531. package/src/vendor/fumadocs-ui/css/generated/home.css +161 -1
  532. package/src/vendor/fumadocs-ui/css/generated/notebook.css +288 -6
  533. package/src/vendor/fumadocs-ui/css/generated/shared.css +103 -80
  534. package/src/vendor/fumadocs-ui/css/lib/base.css +1 -78
  535. package/src/vendor/fumadocs-ui/css/lib/shiki.css +2 -2
  536. package/src/vendor/fumadocs-ui/css/preset.css +80 -0
  537. package/src/vendor/fumadocs-ui/dist/style.css +47 -63
  538. package/src/vendor/handsontable/styles/handsontable.css +82 -335
  539. package/src/vendor/handsontable/styles/handsontable.min.css +3 -4
  540. package/src/vendor/handsontable/styles/ht-icons-horizon.css +3 -11
  541. package/src/vendor/handsontable/styles/ht-icons-horizon.min.css +3 -4
  542. package/src/vendor/handsontable/styles/ht-icons-main.css +3 -11
  543. package/src/vendor/handsontable/styles/ht-icons-main.min.css +3 -4
  544. package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.css +2 -21
  545. package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.min.css +3 -4
  546. package/src/vendor/handsontable/styles/ht-theme-classic.css +5 -32
  547. package/src/vendor/handsontable/styles/ht-theme-classic.min.css +3 -4
  548. package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.css +1 -20
  549. package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.min.css +3 -4
  550. package/src/vendor/handsontable/styles/ht-theme-horizon.css +4 -31
  551. package/src/vendor/handsontable/styles/ht-theme-horizon.min.css +3 -4
  552. package/src/vendor/handsontable/styles/ht-theme-main-no-icons.css +2 -21
  553. package/src/vendor/handsontable/styles/ht-theme-main-no-icons.min.css +3 -4
  554. package/src/vendor/handsontable/styles/ht-theme-main.css +5 -32
  555. package/src/vendor/handsontable/styles/ht-theme-main.min.css +3 -4
  556. package/src/vendor/katex/dist/katex-swap.css +2 -5
  557. package/src/vendor/katex/dist/katex-swap.min.css +1 -1
  558. package/src/vendor/katex/dist/katex.css +2 -5
  559. package/src/vendor/katex/dist/katex.min.css +1 -1
  560. package/src/vendor/katex/src/styles/katex.scss +1 -3
  561. package/dist/esm/ArrowForwardIcon-9VrCQrla.js +0 -1
  562. package/dist/esm/BarChart-BYCvk2RN.js +0 -1
  563. package/dist/esm/CartesianChart-D1L2w_VG.js +0 -47
  564. package/dist/esm/ChangePasswordModal-DOBon_ok.js +0 -1
  565. package/dist/esm/CodeEditor-B6YXqauq.js +0 -1
  566. package/dist/esm/DataGrid-Dy2MSOK0.js +0 -277
  567. package/dist/esm/DataViewer-DebzEZj0.js +0 -1
  568. package/dist/esm/DrawerView-C6KbvsgW.js +0 -1
  569. package/dist/esm/ExcalidrawButton-rCOaM390.js +0 -1
  570. package/dist/esm/GraphvizViewer-DQ_3zkqP.js +0 -1
  571. package/dist/esm/ImageLoaderCropper-DCPp73Ao.js +0 -1
  572. package/dist/esm/InputCellPhoneNumber-UNqdq7Va.js +0 -1
  573. package/dist/esm/InputColor-DLE6PJz7.js +0 -14
  574. package/dist/esm/LineChart-DxN-I5Kl.js +0 -1
  575. package/dist/esm/MdMath-BQs4hBpa.js +0 -1
  576. package/dist/esm/MdMathEditor-BHfoWvp_.js +0 -28
  577. package/dist/esm/ReplyIcon-rPXXCIKg.js +0 -1
  578. package/dist/esm/SettingsIcon-DnAtSsRm.js +0 -1
  579. package/dist/esm/SlideDeck-c69qGz1J.js +0 -1
  580. package/dist/esm/TableOfContents-CL2MOKlA.js +0 -1
  581. package/dist/esm/TextHeadCell-CExu2jw7.js +0 -1
  582. package/dist/esm/Tooltip-C-DKzZ8R.js +0 -7
  583. package/dist/esm/UserCodeEditor-CAg3dvAT.js +0 -30
  584. package/dist/esm/ViewModuleIcon-B7qvToID.js +0 -1
  585. package/dist/esm/VirtualizedRowsFixed-Bks5JFSx.js +0 -1
  586. package/dist/esm/WorksheetAsSlides-B1YaxqYO.js +0 -1
  587. package/dist/esm/WorksheetBodies-BnGXG6wi.js +0 -1
  588. package/dist/esm/WorksheetContents-CJbNoWXT.js +0 -1
  589. package/dist/esm/WorksheetEditor-B37fFHcY.js +0 -1
  590. package/dist/esm/WorksheetNode-DjqZZQRs.js +0 -1
  591. package/dist/esm/WorksheetViewer-DE_XAr2A.js +0 -1
  592. package/dist/esm/arc-BalHlvik.js +0 -1
  593. package/dist/esm/architectureDiagram-3BPJPVTR-DaZ9rWVO.js +0 -1
  594. package/dist/esm/blockDiagram-GPEHLZMM-CgMTM8qx.js +0 -1
  595. package/dist/esm/c4Diagram-AAUBKEIU-DF5dBD4X.js +0 -1
  596. package/dist/esm/channel-DtX7K8fH.js +0 -1
  597. package/dist/esm/chunk-2J33WTMH-BSF8-_lr.js +0 -1
  598. package/dist/esm/chunk-55IACEB6-Ce1Mc1lZ.js +0 -1
  599. package/dist/esm/chunk-727SXJPM-Cc0QJGYk.js +0 -1
  600. package/dist/esm/chunk-AQP2D5EJ-D7lU0Qk0.js +0 -1
  601. package/dist/esm/chunk-ND2GUHAM-BD5ZdCjv.js +0 -1
  602. package/dist/esm/classDiagram-4FO5ZUOK-B6nVlqWv.js +0 -1
  603. package/dist/esm/classDiagram-v2-Q7XG4LA2-B6nVlqWv.js +0 -1
  604. package/dist/esm/contest-hvD3tLnF.js +0 -1
  605. package/dist/esm/cose-bilkent-S5V4N54A-C1xAVZwJ.js +0 -1
  606. package/dist/esm/cytoscape.esm-ym4YJMee.js +0 -9
  607. package/dist/esm/dagre-BM42HDAG-BTH23OkS.js +0 -1
  608. package/dist/esm/date-D28INXpp.js +0 -1
  609. package/dist/esm/diagram-2AECGRRQ-s_eIY8Ju.js +0 -1
  610. package/dist/esm/diagram-5GNKFQAL-BQ7iPFrS.js +0 -1
  611. package/dist/esm/diagram-KO2AKTUF-BwauQwgA.js +0 -1
  612. package/dist/esm/diagram-LMA3HP47-VgneUbzF.js +0 -1
  613. package/dist/esm/diagram-OG6HWLK6-CQXmLp-X.js +0 -1
  614. package/dist/esm/erDiagram-TEJ5UH35-BrtUM8g8.js +0 -1
  615. package/dist/esm/flowDiagram-I6XJVG4X-BVuY5iRd.js +0 -1
  616. package/dist/esm/ganttDiagram-6RSMTGT7-Dp3J7m4L.js +0 -1
  617. package/dist/esm/gitGraphDiagram-PVQCEYII-DDvUv1py.js +0 -1
  618. package/dist/esm/graph-ByvXLzfz.js +0 -1
  619. package/dist/esm/index-3RT03X12.js +0 -1
  620. package/dist/esm/index-4xl-oI83.js +0 -1
  621. package/dist/esm/index-8NOL5jJy.js +0 -1
  622. package/dist/esm/index-B8r5j97Z.js +0 -1
  623. package/dist/esm/index-B8yg8iZ5.js +0 -1
  624. package/dist/esm/index-BozcvZKO.js +0 -1
  625. package/dist/esm/index-C7UTkWm2.js +0 -1
  626. package/dist/esm/index-CCoeYJCH.js +0 -1
  627. package/dist/esm/index-CHdwVvPu.js +0 -1
  628. package/dist/esm/index-CICkoZjG.js +0 -1
  629. package/dist/esm/index-CQTsT8Zj.js +0 -1
  630. package/dist/esm/index-CU5b90xS.js +0 -1
  631. package/dist/esm/index-CWWVtFL-.js +0 -1
  632. package/dist/esm/index-CYal7RVq.js +0 -1
  633. package/dist/esm/index-CZHb8PSE.js +0 -1
  634. package/dist/esm/index-C_iDYl6D.js +0 -1
  635. package/dist/esm/index-Ci0TIrsP.js +0 -1
  636. package/dist/esm/index-CncjGRa9.js +0 -1
  637. package/dist/esm/index-CoD0BG11.js +0 -1
  638. package/dist/esm/index-D2MvgUx2.js +0 -1
  639. package/dist/esm/index-DI4w9v5q.js +0 -1
  640. package/dist/esm/index-DO5jS6VE.js +0 -1
  641. package/dist/esm/index-DPqNWk5z.js +0 -1
  642. package/dist/esm/index-DQ_RDg2x.js +0 -1
  643. package/dist/esm/index-DUSXBI7E.js +0 -1
  644. package/dist/esm/index-DklIqAi8.js +0 -1
  645. package/dist/esm/index-DoTjNc47.js +0 -2
  646. package/dist/esm/index-Dwi3ag-n.js +0 -1
  647. package/dist/esm/index-mPuca8dy.js +0 -1
  648. package/dist/esm/index-uScqGt-h.js +0 -1
  649. package/dist/esm/index-wgkxcuUd.js +0 -1
  650. package/dist/esm/infoDiagram-5YYISTIA-D0QNaNgu.js +0 -1
  651. package/dist/esm/isSymbol-BuOnvf7n.js +0 -1
  652. package/dist/esm/isUndefined-DFy0_ZQT.js +0 -1
  653. package/dist/esm/ishikawaDiagram-YF4QCWOH-C5VX82DI.js +0 -1
  654. package/dist/esm/journeyDiagram-JHISSGLW-BVEghM8I.js +0 -1
  655. package/dist/esm/kanban-definition-UN3LZRKU-2IZxapBL.js +0 -1
  656. package/dist/esm/layout-C8ygm6VF.js +0 -1
  657. package/dist/esm/light-CK5396YO.js +0 -1
  658. package/dist/esm/map-CkaOHTqG.js +0 -1
  659. package/dist/esm/mermaid.core-DoQpgFF5.js +0 -1
  660. package/dist/esm/mindmap-definition-RKZ34NQL-D-7AMujv.js +0 -1
  661. package/dist/esm/pieDiagram-4H26LBE5-mrgU3sOl.js +0 -1
  662. package/dist/esm/purify.es-J-_UhghA.js +0 -2
  663. package/dist/esm/quadrantDiagram-W4KKPZXB-O8NSasGc.js +0 -1
  664. package/dist/esm/requirementDiagram-4Y6WPE33-CQHcM086.js +0 -1
  665. package/dist/esm/sankeyDiagram-5OEKKPKP-DFihOSab.js +0 -1
  666. package/dist/esm/sequenceDiagram-3UESZ5HK-CR8iCSRR.js +0 -1
  667. package/dist/esm/settings-DgLs6IK_.js +0 -1
  668. package/dist/esm/stateDiagram-AJRCARHV-CRmD_B8Z.js +0 -1
  669. package/dist/esm/stateDiagram-v2-BHNVJYJU-BQMQV-zB.js +0 -1
  670. package/dist/esm/throttle-_MCmQvyw.js +0 -1
  671. package/dist/esm/time-BHcZPeyw.js +0 -1
  672. package/dist/esm/time-BJsLnFy1.js +0 -1
  673. package/dist/esm/timeline-definition-PNZ67QCA-BSXJOTVE.js +0 -1
  674. package/dist/esm/toNumber-DP6YK8S3.js +0 -1
  675. package/dist/esm/types-DYOIqA8v.js +0 -1
  676. package/dist/esm/vennDiagram-CIIHVFJN-BGumey1i.js +0 -1
  677. package/dist/esm/viz-BjPw9uNj.js +0 -9
  678. package/dist/esm/wardley-L42UT6IY-Bn2xZ99U.js +0 -15
  679. package/dist/esm/wardleyDiagram-YWT4CUSO-CXmvZufs.js +0 -1
  680. package/dist/esm/worksheet-BBAH_yZC.js +0 -1
  681. package/dist/esm/worksheet-DTRmzBjG.js +0 -1
  682. package/dist/esm/worksheet-GN3yGKYw.js +0 -1
  683. package/dist/esm/xychartDiagram-2RQKCTM6-DZBDvK3P.js +0 -1
  684. package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3/node_modules/@milkdown/kit/lib/component/diff.d.ts +0 -1
  685. package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3/node_modules/@milkdown/kit/lib/exception.d.ts +0 -1
  686. package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3/node_modules/@milkdown/kit/lib/plugin/diff.d.ts +0 -1
  687. package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3/node_modules/@milkdown/kit/lib/plugin/streaming.d.ts +0 -1
  688. package/dist/module-types/src/components/atoms/T/T.server.d.ts +0 -2
  689. package/dist/module-types/src/components/atoms/T/cache.d.ts +0 -4
  690. package/dist/module-types/src/components/atoms/T/client.d.ts +0 -7
  691. package/dist/module-types/src/components/atoms/T/server.d.ts +0 -12
  692. package/dist/module-types/src/components/atoms/T/shared.d.ts +0 -2
  693. package/dist/module-types/src/components/atoms/server/T/index.d.ts +0 -3
  694. package/dist/module-types/src/components/molecules/server/CircularProgress/types.d.ts +0 -4
  695. package/dist/module-types/src/components/molecules/server/NewlineInfo/NewlineInfo.d.ts +0 -2
  696. package/dist/module-types/src/components/molecules/server/NewlineInfo/types.d.ts +0 -3
  697. package/dist/module-types/src/components/molecules/server/TimerDisplay/types.d.ts +0 -13
  698. package/dist/module-types/src/components/molecules/server/index.d.ts +0 -5
  699. package/dist/module-types/src/components/molecules/server/types.d.ts +0 -3
  700. package/dist/module-types/src/components/organisms/server/index.d.ts +0 -3
  701. package/dist/module-types/src/components/organisms/server/types.d.ts +0 -1
  702. package/dist/module-types/src/components/providers/JukiI18nBridge/JukiI18nBridge.d.ts +0 -23
  703. package/dist/module-types/src/components/providers/JukiI18nBridge/index.d.ts +0 -1
  704. package/dist/module-types/src/components/providers/server/Image/types.d.ts +0 -20
  705. package/dist/module-types/src/components/providers/server/index.d.ts +0 -1
  706. package/dist/module-types/src/components/providers/server/types.d.ts +0 -1
  707. package/dist/module-types/src/components/templates/server/ProblemStatus/types.d.ts +0 -6
  708. package/dist/module-types/src/components/templates/server/columns/contest-columns/getContestContestantsHeader.d.ts +0 -3
  709. package/dist/module-types/src/components/templates/server/columns/contest-columns/getContestDateHeader.d.ts +0 -3
  710. package/dist/module-types/src/components/templates/server/index.d.ts +0 -5
  711. package/dist/module-types/src/components/templates/server/types.d.ts +0 -1
  712. package/src/vendor/@milkdown/crepe/lib/theme/common/ai.css +0 -446
  713. package/src/vendor/@milkdown/crepe/lib/theme/common/diff.css +0 -177
  714. package/src/vendor/@milkdown/crepe/src/theme/common/ai.css +0 -430
  715. package/src/vendor/@milkdown/crepe/src/theme/common/diff.css +0 -196
  716. package/src/vendor/fumadocs-ui/css/preset-legacy.css +0 -38
  717. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/code-block.d.ts +0 -0
  718. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/image-block.d.ts +0 -0
  719. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/image-inline.d.ts +0 -0
  720. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/index.d.ts +0 -0
  721. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/link-tooltip.d.ts +0 -0
  722. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/list-item-block.d.ts +0 -0
  723. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/component/table-block.d.ts +0 -0
  724. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/core.d.ts +0 -0
  725. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/ctx.d.ts +0 -0
  726. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/block.d.ts +0 -0
  727. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/clipboard.d.ts +0 -0
  728. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/cursor.d.ts +0 -0
  729. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/history.d.ts +0 -0
  730. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/indent.d.ts +0 -0
  731. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/listener.d.ts +0 -0
  732. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/slash.d.ts +0 -0
  733. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/tooltip.d.ts +0 -0
  734. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/trailing.d.ts +0 -0
  735. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/plugin/upload.d.ts +0 -0
  736. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/preset/commonmark.d.ts +0 -0
  737. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/preset/gfm.d.ts +0 -0
  738. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/history.d.ts +0 -0
  739. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/index.d.ts +0 -0
  740. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/inputrules.d.ts +0 -0
  741. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/keymap.d.ts +0 -0
  742. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/model.d.ts +0 -0
  743. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/state.d.ts +0 -0
  744. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/prose/view.d.ts +0 -0
  745. /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.21.1_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.43.0_typescript@6.0.3 → @milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3}/node_modules/@milkdown/kit/lib/utils.d.ts +0 -0
  746. /package/dist/module-types/src/components/atoms/{server/DateLiteral → DateLiteral}/DateLiteral.d.ts +0 -0
  747. /package/dist/module-types/src/components/molecules/{server/ThemeColorPalette → ThemeColorPalette}/ThemeColorPalette.d.ts +0 -0
  748. /package/dist/module-types/src/components/molecules/{server/layouts → layouts}/ApplicationLoaderLayout.d.ts +0 -0
  749. /package/dist/module-types/src/components/templates/{server/ProblemStatus → problem}/ProblemStatus.d.ts +0 -0
@@ -0,0 +1,272 @@
1
+ import{jsx as t}from"react/jsx-runtime";import e,{forwardRef as n,useId as o,useRef as i,useCallback as r,useMemo as s,useEffect as a,useImperativeHandle as l,Children as h,Fragment as c,createContext as d,useContext as u,useState as g,memo as f}from"react";import p from"react-dom";import{p as m}from"./purify.es-DBOWJxv3.js";import{y as b}from"./index-rYUgz1LC.js";import{utils as w}from"./xlsx-XBWnafwQ.js";import{c as v}from"./commons-B_OozOv-.js";import"./settings-BIQ7IqJl.js";import"./enums.js";import"./constants.js";import"./LoaderLayer-D9O7WqFD.js";import"./websocket-CxbYBjHT.js";import"./index-CODLgwqm.js";import"motion/react";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";function y(t,e){const n=e.length;let o=0;for(;o<n;)t.push(e[o]),o+=1}function C(t){const e=[];if(!t||0===t.length||!t[0]||0===t[0].length)return e;const n=t.length,o=t[0].length;for(let i=0;i<n;i++)for(let n=0;n<o;n++)e[n]||(e[n]=[]),e[n][i]=t[i][n];return e}function S(t,e,n,o){let i=-1,r=t,s=n;Array.isArray(t)||(r=Array.from(t));const a=r.length;for(i+=1;i<a;)s=e(s,r[i],i,r),i+=1;return s}function R(t,e){let n=0,o=t;Array.isArray(t)||(o=Array.from(t));const i=o.length,r=[];let s=-1;for(;n<i;){const t=o[n];e(t,n,o)&&(s+=1,r[s]=t),n+=1}return r}function k(t,e){let n=0,o=t;Array.isArray(t)||(o=Array.from(t));const i=o.length,r=[];let s=-1;for(;n<i;){const t=o[n];s+=1,r[s]=e(t,n,o),n+=1}return r}function x(t,e){let n=0,o=t;Array.isArray(t)||(o=Array.from(t));const i=o.length;for(;n<i&&!1!==e(o[n],n,o);)n+=1;return t}function E(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const[o,...i]=[...e];let r=o;return x(i,t=>{r=r.filter(e=>!t.includes(e))}),r}function M(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t.split(e)}function T(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];const i=S(t,(t,e,o)=>t+e.replace(/\r?\n\s*/g,"")+(n[o]?n[o]:""),"");return i.trim()}function _(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];const i=document.createElement("template");i.innerHTML=t.reduce((t,e,o)=>{var i;return t+e+(null!==(i=n[o])&&void 0!==i?i:"")},"");const r=i.content.cloneNode(!0),s={};return r.querySelectorAll("[data-ref]").forEach(t=>{const e=t.getAttribute("data-ref");t.removeAttribute("data-ref"),s[e]=t}),{fragment:r,refs:s}}function H(t){let e;switch(typeof t){case"string":case"number":e=`${t}`;break;case"object":e=null===t?"":t.toString();break;case"undefined":e="";break;default:e=t.toString()}return e}function I(t){return void 0!==t}function A(t){return void 0===t}function P(t){return null===t||""===t||A(t)}const O="length",N=t=>parseInt(t,16),D=t=>parseInt(t,10),L=(t,e,n)=>t.substr(e,n),V=t=>t.codePointAt(0)-65,B=t=>`${t}`.replace(/\-/g,"");let F=!1;const W={invalid:()=>T`
2
+ The license key for Handsontable is invalid.\x20
3
+ If you need any help, contact us at support@handsontable.com.`,expired:t=>{let{keyValidityDate:e,hotVersion:n}=t;return T`
4
+ The license key for Handsontable expired on ${e}, and is not valid for the installed\x20
5
+ version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
6
+ to ${e}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>T`
7
+ The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
8
+ Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
9
+ passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
10
+ us at support@handsontable.com.`,non_commercial:()=>""},z={invalid:()=>T`
11
+ The license key for Handsontable is invalid.\x20
12
+ <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
13
+ install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:t=>{let{keyValidityDate:e,hotVersion:n}=t;return T`
14
+ The license key for Handsontable expired on ${e}, and is not valid for the installed\x20
15
+ version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
16
+ license key or downgrade to a version released prior to ${e}. If you need any\x20
17
+ help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>T`
18
+ The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
19
+ Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
20
+ passing the key: 'non-commercial-and-evaluation'.\x20
21
+ <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
22
+ the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function j(t,e,n){const o=!P(t),i="string"==typeof t&&("non-commercial-and-evaluation"===t.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===t.toLowerCase()),r="17.0.1";let s,a="invalid",l="invalid";const h=function(t){let e=[][O],n=e;if(t[O]!==V("Z"))return!1;for(let e="",o="B<H4P+".split(""),i=V(o.shift());i;i=V(o.shift()||"A"))--i<""[O]?n|=(D(`${D(N(e)+(N(L(t,Math.abs(i),2))+[]).padStart(2,"0"))}`)%97||2)>>1:e=L(t,i,i?1===o[O]?9:8:6);return n===e}(t=B(t||""));if(i)a="non_commercial",l="valid";else if(o||h)if(h){const[e,o,i]=n.split("/").map(Number),r=Math.floor(Date.UTC(i,o-1,e)/864e5),h=N(L(B(c=t),N("12"),V("F")))/(N(L(B(c),V("B"),~~![][O]))||9);s=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format(864e5*(h+1)),r>h?(a="expired",l="expired"):(a="valid",l="valid")}else a="invalid",l="invalid";else a="missing",l="missing";var c;if("undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host)&&(a="valid",l="valid"),!F&&"valid"!==a){W[a]({keyValidityDate:s,hotVersion:r})&&console["non_commercial"===a?"info":"warn"](W[a]({keyValidityDate:s,hotVersion:r})),F=!0}if("valid"!==l&&e){if(z[l]({keyValidityDate:s,hotVersion:r})){const t=document.createElement("div");t.className="handsontable hot-display-license-info",t.innerHTML=z[l]({keyValidityDate:s,hotVersion:r}),e.appendChild(t)}}}function $(t){return t[0].toUpperCase()+t.substr(1)}function U(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()}function Y(t){if("string"!=typeof t)return!1;try{const e=JSON.parse(t);return"object"==typeof e&&null!==e}catch{return!1}}function G(t){return/^([0-9][0-9]?%$)|(^100%$)/.test(t)}function K(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${t}`.replace(/(?:\\)?\[([^[\]]+)]/g,(t,n)=>"\\"===t.charAt(0)?t.substr(1,t.length-1):void 0===e[n]?"":e[n])}function q(t){return X(`${t}`,{ALLOWED_TAGS:[]})}function X(t,e){return m.sanitize(t,e)}function Z(t){return"string"!=typeof t?t:t.replace(/([A-Z])/g,"-$1").replace(/_/g,"-").toLowerCase()}const J=t=>["tabindex",t],Q=()=>["role","gridcell"],tt=()=>["role","gridcell button"],et=()=>["role","rowheader"],nt=()=>["role","columnheader"],ot=()=>["role","row"],it=()=>["scope","col"],rt=()=>["scope","row"],st=t=>["aria-label",t],at=t=>["aria-describedby",t],lt=function(){return["aria-disabled",!(arguments.length>0&&void 0!==arguments[0])||arguments[0]]},ht=t=>["aria-haspopup",t],ct=t=>["aria-rowcount",t],dt=t=>["aria-colcount",t],ut=t=>["aria-rowindex",t],gt=t=>["aria-colindex",t],ft=t=>["aria-expanded",t],pt=t=>["aria-checked",t],mt=t=>["aria-relevant",t],bt=t=>["aria-posinset",t];function wt(t){throw new Error(t,{cause:{handsontable:!0}})}function vt(t){let e;return Array.isArray(t)?e=t.length?new Array(t.length).fill(null):[]:(e={},Tt(t,(t,n)=>{"__children"!==n&&(t&&"object"==typeof t&&!Array.isArray(t)?e[n]=vt(t):Array.isArray(t)?t.length&&"object"==typeof t[0]&&!Array.isArray(t[0])?e[n]=[vt(t[0])]:e[n]=[]:e[n]=null)})),e}function yt(t,e,n){const o=Array.isArray(n);return Tt(e,(e,i)=>{(!1===o||n.includes(i))&&(t[i]=e)}),t}function Ct(t,e){Tt(e,(n,o)=>{e[o]&&"object"==typeof e[o]?(t[o]||(Array.isArray(e[o])?t[o]=[]:"[object Date]"===Object.prototype.toString.call(e[o])?t[o]=e[o]:t[o]={}),Ct(t[o],e[o])):t[o]=e[o]})}function St(t){return"object"==typeof t?JSON.parse(JSON.stringify(t)):t}function Rt(t){const e={};return Tt(t,(t,n)=>{e[n]=t}),e}function kt(t){t.MIXINS||(t.MIXINS=[]);for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return x(n,e=>{t.MIXINS.push(e.MIXIN_NAME),Tt(e,(e,n)=>{if(void 0!==t.prototype[n]&&wt(`Mixin conflict. Property '${n}' already exist and cannot be overwritten.`),"function"==typeof e)t.prototype[n]=e;else{const o=function(t,e){const n=`_${t}`;return function(){return void 0===this[n]&&(this[n]=(t=>{let e=t;return(Array.isArray(e)||Et(e))&&(e=St(e)),e})(e)),this[n]}},i=function(t){const e=`_${t}`;return function(t){this[e]=t}};Object.defineProperty(t.prototype,n,{get:o(n,e),set:i(n),configurable:!0})}})}),t}function xt(t,e){return JSON.stringify(t)===JSON.stringify(e)}function Et(t){return"[object Object]"===Object.prototype.toString.call(t)}function Mt(t,e,n,o){o.value=n,o.writable=!1!==o.writable,o.enumerable=!1!==o.enumerable,o.configurable=!1!==o.configurable,Object.defineProperty(t,e,o)}function Tt(t,e){for(const n in t)if((!t.hasOwnProperty||t.hasOwnProperty&&Object.prototype.hasOwnProperty.call(t,n))&&!1===e(t[n],n,t))break;return t}function _t(t,e){const n=e.split(".");let o=t;return Tt(n,t=>{if(o=o[t],void 0===o)return o=void 0,!1}),o}function Ht(t,e,n){if("string"!=typeof e)return;const o=e.split(".");let i=t;o.forEach((t,e)=>{"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e!==o.length-1?(Pt(i,t)||(i[t]={}),i=i[t]):i[t]=n)})}function It(t){if(!Et(t))return 0;const e=function(t){let n=0;return Et(t)?Tt(t,(t,o)=>{"__children"!==o&&(n+=e(t))}):n+=1,n};return e(t)}function At(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const n=`_${e}`,o={_touched:!1,[n]:t,isTouched(){return this._touched}};return Object.defineProperty(o,e,{get(){return this[n]},set(t){this._touched=!0,this[n]=t},enumerable:!0,configurable:!0}),o}function Pt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Ot(t,e){if("object"!=typeof t||null===t)return e;if("object"!=typeof e||null===e)return t;const n={};return Object.keys(e).forEach(o=>{"object"!=typeof e[o]||null===e[o]||Array.isArray(e[o])?n[o]=Pt(t,o)&&void 0!==t[o]?t[o]:e[o]:n[o]=Ot(t[o],e[o])}),Object.keys(t).forEach(e=>{Pt(n,e)||(n[e]=t[e])}),n}function Nt(){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const e={...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}};return Object.keys(t).forEach(n=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const o=t[n],i=e[n];Et(o)&&Et(i)?e[n]=Nt(i,o):e[n]=o}),e}function Dt(t){return Et(t)&&I(t.key)&&I(t.value)}function Lt(t){return window.requestAnimationFrame(t)}function Vt(t){window.cancelAnimationFrame(t)}function Bt(){return"ontouchstart"in window}let Ft;const Wt=t=>{const e={value:!1,test:(n,o)=>{e.value=t(n,o)}};return e},zt={chrome:Wt((t,e)=>/Chrome/.test(t)&&/Google/.test(e)),chromeWebKit:Wt(t=>/CriOS/.test(t)),edge:Wt(t=>/Edge/.test(t)),edgeWebKit:Wt(t=>/EdgiOS/.test(t)),firefox:Wt(t=>/Firefox/.test(t)),firefoxWebKit:Wt(t=>/FxiOS/.test(t)),mobile:Wt(t=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)),safari:Wt((t,e)=>/Safari/.test(t)&&/Apple Computer/.test(e)),safariBefore261:Wt((t,e)=>{if(!/Safari/.test(t)||!/Apple Computer/.test(e))return!1;const n=/Version\/(\d+(?:\.\d+)?)/i.exec(t);return(n?Number.parseFloat(n[1]):0)<26.1})},jt={mac:Wt(t=>/^Mac/.test(t)),win:Wt(t=>/^Win/.test(t)),linux:Wt(t=>/^Linux/.test(t)),ios:Wt(t=>/iPhone|iPad|iPod/i.test(t))};function $t(){return zt.chrome.value}function Ut(){return zt.firefox.value}function Yt(){return zt.safari.value}function Gt(){return zt.mobile.value}function Kt(){return jt.ios.value}function qt(){let{maxTouchPoints:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return t>2&&jt.mac.value}function Xt(){return jt.win.value}function Zt(){return jt.mac.value}function Jt(){I(console)&&console.log(...arguments)}function Qt(){I(console)&&console.warn(...arguments)}function te(t){I(console)&&console.warn(`Deprecated: ${t}`)}function ee(){I(console)&&console.error(...arguments)}function ne(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,o=null,i=t;for(;null!==i;){if(n===e){o=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(n+=1,i=i.parentNode)}return o}function oe(t,e){const n=t.closest(".handsontable");return!!n&&(n.parentNode===e||n===e)}function ie(t){return function(t){return Object.getPrototypeOf(t.parent)&&t.frameElement}(t)&&t.parent}function re(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:o,DOCUMENT_FRAGMENT_NODE:i}=Node;let r=t;for(;null!=r&&r!==n;){const{nodeType:t,nodeName:n}=r;if(t===o&&(e.includes(n)||e.includes(r)))return r;const{host:s}=r;r=s&&t===i?s:r.parentNode}return null}function se(t,e,n){const o=[];let i=t;for(;i&&(i=re(i,e,n),i&&(!n||n.contains(i)));)o.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode;const r=o.length;return r?o[r-1]:null}function ae(t,e){let n=t.parentNode,o=[];for("string"==typeof e?o=t.defaultView?Array.prototype.slice.call(t.querySelectorAll(e),0):Array.prototype.slice.call(t.ownerDocument.querySelectorAll(e),0):o.push(e);null!==n;){if(o.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function le(t,e,n){const o=n.parentElement.querySelector(`.ht_clone_${t}`);return o?o.contains(e):null}function he(t){return t&&t.length?t.filter(t=>!!t):[]}function ce(t,e){if(!t||!t.length)return{regexFree:[],regexes:[]};const n=[],o=[];return o.push(...t.filter(t=>{const o=t instanceof RegExp;return o&&e&&n.push(t),!o})),{regexFree:o,regexes:n}}function de(t,e){return void 0!==t.classList&&"string"==typeof e&&""!==e&&t.classList.contains(e)}function ue(t,e){"string"==typeof e&&(e=e.split(" ")),(e=he(e)).length>0&&t.classList.add(...e)}function ge(t,e){"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);let{regexFree:n,regexes:o}=ce(e,!0);n=he(n),n.length>0&&t.classList.remove(...n),o.forEach(e=>{t.classList.forEach(n=>{e.test(n)&&t.classList.remove(n)})})}function fe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;Array.isArray(e)||(e=[[e,n]]),e.forEach(e=>{Array.isArray(e)&&""!==e[0]&&t.setAttribute(...e)})}function pe(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);const{regexFree:n,regexes:o}=ce(e,!0);n.forEach(e=>{""!==e&&t.removeAttribute(e)}),o.forEach(e=>{t.getAttributeNames().forEach(n=>{e.test(n)&&t.removeAttribute(n)})})}function me(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const e=t.childNodes;for(let t=e.length-1;t>=0;t--)me(e[t])}}function be(t){let e;for(;e=t.lastChild;)t.removeChild(e)}"undefined"!=typeof window&&(function(){let{userAgent:t=navigator.userAgent,vendor:e=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Tt(zt,n=>{let{test:o}=n;o(t,e)})}(),function(){let{platform:t=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Tt(jt,e=>{let{test:n}=e;n(t)})}());const we=/(<(.*)>|&(.*);)/;let ve,ye=!1;function Ce(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:X;we.test(e)?(ye||n!==X||(ye=!0,te("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),t.innerHTML="function"==typeof n?n(e,"innerHTML"):e):Se(t,e)}function Se(t,e){const n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=e:(be(t),t.appendChild(t.ownerDocument.createTextNode(e)))}function Re(t){const e=t.ownerDocument.documentElement,n=t.ownerDocument.defaultView;let o=t;for(;o!==e;){if(null===o)return!1;if(o.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(!o.host)return!1;if(o.host.impl)return Re(o.host.impl);if(o.host)return Re(o.host);wt("Lost in Web Components world")}else if("none"===n.getComputedStyle(o).display)return!1;o=o.parentNode}return!0}function ke(t){const e=t.ownerDocument,n=e.defaultView,o=e.documentElement;let i,r,s,a=t;for(i=a.offsetLeft,r=a.offsetTop,s=a;(a=a.offsetParent)&&a!==e.body&&"offsetLeft"in a;)i+=a.offsetLeft,r+=a.offsetTop,s=a;return s&&"fixed"===s.style.position&&(i+=n.pageXOffset||o.scrollLeft,r+=n.pageYOffset||o.scrollTop),{left:i,top:r}}function xe(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function Ee(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function Me(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return t===e?xe(e):t.scrollTop}function Te(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return t===e?Ee(e):t.scrollLeft}function _e(t){let e=t.ownerDocument,n=e?e.defaultView:void 0;e||(e=t.document?t.document:t,n=e.defaultView);const o=["auto","scroll"];let i=t.parentNode;for(;i&&i.style&&e.body!==i;){let{overflow:t,overflowX:e,overflowY:r}=i.style;if([t,e,r].includes("scroll"))return i;if(({overflow:t,overflowX:e,overflowY:r}=n.getComputedStyle(i)),o.includes(t)||o.includes(e)||o.includes(r))return i;if(i.clientHeight<=i.scrollHeight+1&&(o.includes(r)||o.includes(t)))return i;if(i.clientWidth<=i.scrollWidth+1&&(o.includes(e)||o.includes(t)))return i;i=i.parentNode}return n}function He(t){const e=t.ownerDocument,n=e.defaultView;let o=t.parentNode;for(;o&&o.style&&e.body!==o;){if("visible"!==o.style.overflow&&""!==o.style.overflow)return o;const t=n.getComputedStyle(o),e=["scroll","hidden","auto","clip"],i=t.getPropertyValue("overflow"),r=t.getPropertyValue("overflow-y"),s=t.getPropertyValue("overflow-x");if(e.includes(i)||e.includes(r)||e.includes(s))return o;o=o.parentNode}return n}function Ie(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!t)return;if(t===n)return"width"===e?`${n.innerWidth}px`:"height"===e?`${n.innerHeight}px`:void 0;const o=t.style[e];if(""!==o&&void 0!==o)return o;const i=n.getComputedStyle(t);return""!==i[e]&&void 0!==i[e]?i[e]:void 0}function Ae(t){return t.offsetWidth}function Pe(t){return t.offsetHeight}function Oe(t){return t.clientHeight||t.innerHeight}function Ne(t){return t.clientWidth||t.innerWidth}function De(t){return t.selectionStart?t.selectionStart:0}function Le(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;t.getSelection&&(t.getSelection().empty?t.getSelection().empty():t.getSelection().removeAllRanges&&t.getSelection().removeAllRanges())}function Ve(t,e,n){if(void 0===n&&(n=e),t.setSelectionRange){t.focus();try{t.setSelectionRange(e,n)}catch(o){const i=t.parentNode,r=i.style.display;i.style.display="block",t.setSelectionRange(e,n),i.style.display=r}}}function Be(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const e=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=t.createElement("div");n.style.height="200px",n.style.width="100%";const o=t.createElement("div");o.classList.add("htScrollbarTest"),e&&o.classList.add("htScrollbarSafariTest"),o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(n),t.body.appendChild(o);const i=n.offsetWidth;o.style.overflow="scroll";let r=n.offsetWidth;return i===r&&(r=o.clientWidth),t.body.removeChild(o),i-r},n=e();return 0!==n||!zt.safariBefore261.value||Gt()||qt()?n:e(!0)}function Fe(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===ve&&(ve=Be(t)),ve}function We(t){return t instanceof Window?t.document.body.scrollHeight>t.innerHeight:t.offsetWidth!==t.clientWidth}function ze(t){return t instanceof Window?t.document.body.scrollWidth>t.innerWidth:t.offsetHeight!==t.clientHeight}function je(t,e,n){t.style.transform=`translate3d(${e},${n},0)`}function $e(t){t.style.transform&&""!==t.style.transform&&(t.style.transform="")}function Ue(t){return t&&(["INPUT","SELECT","TEXTAREA"].indexOf(t.nodeName)>-1||"true"===t.contentEditable)}function Ye(t){return Ue(t)&&!1===t.hasAttribute("data-hot-input")}function Ge(t){return!t.parentNode}function Ke(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=t.ownerDocument,i=o.createRange(),r=o.defaultView.getSelection();fe(t,"contenteditable",!0),n&&fe(t,"aria-hidden","true"),e&&ue(t,"invisibleSelection"),i.selectNodeContents(t),r.removeAllRanges(),r.addRange(i)}function qe(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=t.ownerDocument.defaultView.getSelection();t.hasAttribute("aria-hidden")&&t.removeAttribute("aria-hidden"),n.removeAllRanges(),e&&ge(t,"invisibleSelection"),t.removeAttribute("contenteditable")}function Xe(t){var e;const n=null==t||null===(e=t.ownerDocument)||void 0===e?void 0:e.defaultView.Element;return!!(n&&null!==n&&t instanceof n)}function Ze(t){return"function"==typeof t}function Je(t){let e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=null;return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return o&&clearTimeout(o),o=setTimeout(()=>{e=t.apply(this,r)},n),e}}function Qe(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];return function(){for(var e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return t.apply(this,n.concat(o))}}function tn(t,e,n,o,i,r,s,a){return I(a)?t.call(e,n,o,i,r,s,a):I(s)?t.call(e,n,o,i,r,s):I(r)?t.call(e,n,o,i,r):I(i)?t.call(e,n,o,i):I(o)?t.call(e,n,o):I(n)?t.call(e,n):t.call(e)}const en={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Ut()?182:174,AUDIO_MUTE:Ut()?181:173,AUDIO_UP:Ut()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},nn=[en.ALT,en.ARROW_DOWN,en.ARROW_LEFT,en.ARROW_RIGHT,en.ARROW_UP,en.AUDIO_DOWN,en.AUDIO_MUTE,en.AUDIO_UP,en.BACKSPACE,en.CAPS_LOCK,en.DELETE,en.END,en.ENTER,en.ESCAPE,en.F1,en.F2,en.F3,en.F4,en.F5,en.F6,en.F7,en.F8,en.F9,en.F10,en.F11,en.F12,en.F13,en.F14,en.F15,en.F16,en.F17,en.F18,en.F19,en.HOME,en.INSERT,en.MEDIA_NEXT,en.MEDIA_PLAY_PAUSE,en.MEDIA_PREV,en.MEDIA_STOP,en.NULL,en.NUM_LOCK,en.PAGE_DOWN,en.PAGE_UP,en.PAUSE,en.SCROLL_LOCK,en.SHIFT,en.TAB];function on(t){return 32===t||t>=48&&t<=57||t>=96&&t<=111||t>=186&&t<=192||t>=219&&t<=222||t>=226||t>=65&&t<=90}function rn(t){return nn.includes(t)}function sn(t,e){const n=e.split("|");let o=!1;return x(n,e=>{if(t===en[e])return o=!0,!1}),o}function an(t){t.isImmediatePropagationEnabled=!1,t.cancelBubble=!0}function ln(t){return!1===t.isImmediatePropagationEnabled}function hn(t){return 2===t.button}function cn(t){return 0===t.button}const dn=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceCacheUpdate","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceCacheUpdate","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","beforeSelectAll","afterSelectAll","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterSetTheme","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeHeightChange","beforeWidthChange","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyGetCoordsElement","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","afterPageSizeVisibilityChange","afterPageCounterVisibilityChange","afterPageNavigationVisibilityChange","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterDialogHide","afterDialogShow","beforeDialogHide","beforeDialogShow","dialogFocusPreviousElement","dialogFocusNextElement","afterDialogFocus","beforeLoadingShow","afterLoadingShow","beforeLoadingHide","afterLoadingHide","beforeEmptyDataStateShow","afterEmptyDataStateShow","beforeEmptyDataStateHide","afterEmptyDataStateHide","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],un=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),gn=new Map([[]]);function fn(t,e,n){pn(t,e),e.set(t,n)}function pn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mn(t,e,n){return t.set(wn(t,e),n),n}function bn(t,e){return t.get(wn(t,e))}function wn(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var vn=new WeakMap,yn=new WeakMap,Cn=new WeakMap,Sn=new WeakSet;class Rn{constructor(){var t,e;pn(t=this,e=Sn),e.add(t),fn(this,vn,new Map),fn(this,yn,new Map),fn(this,Cn,new Set),dn.forEach(t=>wn(Sn,this,kn).call(this,t))}getHooks(t){var e;return null!==(e=bn(vn,this).get(t))&&void 0!==e?e:[]}add(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};bn(vn,this).has(t)||(wn(Sn,this,kn).call(this,t),dn.push(t));const o=bn(vn,this).get(t),i=o.find(t=>t.callback===e);if(i)return void(!0===i.skip&&(i.skip=!1));const r=Number.isInteger(n.orderIndex)?n.orderIndex:0,s=!!n.runOnce,a=!!n.initialHook;let l=!1;if(a){const t=o.find(t=>t.initialHook);t&&(t.callback=e,l=!0)}if(!l){o.push({callback:e,orderIndex:r,runOnce:s,initialHook:a,skip:!1});let n=bn(Cn,this).has(t);n||0===r||(n=!0,bn(Cn,this).add(t)),n&&o.length>1&&bn(vn,this).set(t,o.toSorted((t,e)=>t.orderIndex-e.orderIndex))}}has(t){return bn(vn,this).has(t)&&bn(vn,this).get(t).length>0}remove(t,e){if(!bn(vn,this).has(t))return!1;const n=bn(vn,this).get(t),o=n.find(t=>t.callback===e);if(o){let e=bn(yn,this).get(t);return o.skip=!0,e+=1,e>100&&(bn(vn,this).set(t,n.filter(t=>!t.skip)),e=0),bn(yn,this).set(t,e),!0}return!1}destroy(){bn(vn,this).clear(),bn(yn,this).clear(),mn(vn,this,null),mn(yn,this,null)}}function kn(t){bn(vn,this).set(t,[]),bn(yn,this).set(t,0)}function xn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const En=T`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
23
+ Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
24
+ learn about the migration path.`;class Mn{constructor(){xn(this,"globalBucket",new Rn)}static getSingleton(){return Tn}getBucket(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t?(t.pluginHookBucket||(t.pluginHookBucket=new Rn),t.pluginHookBucket):this.globalBucket}add(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0;return Array.isArray(e)?x(e,e=>this.add(t,e,n)):(un.has(t)&&Qt(K(En,{hookName:t,removedInVersion:un.get(t)})),gn.has(t)&&Qt(gn.get(t)),this.getBucket(n).add(t,e,{orderIndex:o,runOnce:!1})),this}once(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0;return Array.isArray(e)?x(e,e=>this.once(t,e,n)):this.getBucket(n).add(t,e,{orderIndex:o,runOnce:!0}),this}addAsFixed(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(e)?x(e,e=>this.addAsFixed(t,e,n)):this.getBucket(n).add(t,e,{initialHook:!0}),this}remove(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(n).remove(t,e)}has(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(e).has(t)}run(t,e,n,o,i,r,s,a){{const l=this.getBucket().getHooks(e),h=l?l.length:0;let c=0;if(h)for(;c<h;){if(!l[c]||l[c].skip){c+=1;continue}const h=tn(l[c].callback,t,n,o,i,r,s,a);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(e,l[c].callback),c+=1}}{const l=this.getBucket(t).getHooks(e),h=l?l.length:0;let c=0;if(h)for(;c<h;){if(!l[c]||l[c].skip){c+=1;continue}const h=tn(l[c].callback,t,n,o,i,r,s,a);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(e,l[c].callback,t),c+=1}}return n}destroy(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(t).destroy()}register(t){this.isRegistered(t)||dn.push(t)}deregister(t){this.isRegistered(t)&&dn.splice(dn.indexOf(t),1)}isDeprecated(t){return gn.has(t)||un.has(t)}isRegistered(t){return dn.indexOf(t)>=0}getRegistered(){return dn}}const Tn=new Mn;const _n=new Map;function Hn(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";_n.has(t)||_n.set(t,new Map);const e=_n.get(t);return{register:function(t,n){e.set(t,n)},getItem:function(t){return e.get(t)},hasItem:function(t){return e.has(t)},getNames:function(){return[...e.keys()]},getValues:function(){return[...e.values()]},clear:function(){_n.delete(t),e.clear()}}}const In=new WeakMap,{register:An,getItem:Pn,hasItem:On,getNames:Nn,getValues:Dn}=Hn("editors");function Ln(t){const e={},n=t;this.getConstructor=function(){return t},this.getInstance=function(t){return t.guid in e||(e[t.guid]=new n(t)),e[t.guid]},Mn.getSingleton().add("afterDestroy",function(){e[this.guid]=null})}function Vn(t,e){let n;return"function"==typeof t?(In.get(t)||Fn(null,t),n=In.get(t)):"string"==typeof t?n=Pn(t):wt('Only strings and functions can be passed as "editor" parameter'),n||wt(`No editor registered under name "${t}"`),n.getInstance(e)}function Bn(t){return"function"==typeof t?t:(On(t)||wt(`No registered editor found under "${t}" name`),Pn(t).getConstructor())}function Fn(t,e){t&&"string"!=typeof t&&(t=(e=t).EDITOR_TYPE);const n=new Ln(e);"string"==typeof t&&An(t,n),In.set(e,n)}function Wn(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class zn{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Wn(this,"context",void 0),this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(t){n.call(this,function(t){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=function(){e.apply(this),an(this)},t}(t))}return this.context.eventListeners.push({element:t,event:e,callback:n,callbackProxy:i,options:o,eventManager:this}),t.addEventListener(e,i,o),()=>{this.removeEventListener(t,e,n)}}removeEventListener(t,e,n){let o,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=this.context.eventListeners.length;for(;r;)if(r-=1,o=this.context.eventListeners[r],o.event===e&&o.element===t){if(n&&n!==o.callback)continue;if(i&&o.eventManager!==this)continue;this.context.eventListeners.splice(r,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options)}}clearEvents(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let e=this.context.eventListeners.length;for(;e;){e-=1;const n=this.context.eventListeners[e];t&&n.eventManager!==this||(this.context.eventListeners.splice(e,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options))}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(t,e){let n=t.document,o=t;n||(n=t.ownerDocument?t.ownerDocument:t,o=n.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==e,view:o,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0};let r;n.createEvent?(r=n.createEvent("MouseEvents"),r.initMouseEvent(e,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,n.body.parentNode)):r=n.createEventObject(),t.dispatchEvent?t.dispatchEvent(r):t.fireEvent(`on${e}`,r)}}function jn(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function $n(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Un(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Yn=new WeakSet;class Gn{constructor(t,e,n){jn(this,Yn),$n(this,"hot",void 0),$n(this,"tableMeta",void 0),$n(this,"selection",void 0),$n(this,"eventManager",void 0),$n(this,"destroyed",!1),$n(this,"activeEditor",void 0),$n(this,"cellProperties",void 0),this.hot=t,this.tableMeta=e,this.selection=n,this.eventManager=new zn(t),this.hot.addHook("afterDocumentKeyDown",t=>Un(Yn,this,Kn).call(this,t)),this.hot.addHook("beforeCompositionStart",t=>Un(Yn,this,Kn).call(this,t)),this.hot.view._wt.update("onCellDblClick",(t,e,n)=>Un(Yn,this,qn).call(this,t,e,n))}getActiveEditor(){return this.activeEditor}prepareEditor(){var t;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,t=>{t&&this.prepareEditor()});const e=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;if(!e||e.isHeader())return;const{row:n,col:o}=e,i=this.hot.runHooks("modifyGetCellCoords",n,o,!1,"meta");let r=n,s=o;if(Array.isArray(i)&&([r,s]=i),this.cellProperties=this.hot.getCellMeta(r,s),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(n,o,!0);if(a){const t=this.hot.getCellEditor(this.cellProperties),e=this.hot.colToProp(s),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r),s);this.activeEditor=Vn(t,this.hot),this.activeEditor.prepare(n,o,e,a,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const o=this.hot.getSelectedRangeActive();let i=this.hot.runHooks("beforeBeginEditing",o.highlight.row,o.highlight.col,t,e,n);e instanceof MouseEvent&&"boolean"!=typeof i&&(i=0===this.hot.selection.getLayerLevel()&&o.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(n&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(t,e))):this.clearActiveEditor()}closeEditor(t,e,n){this.activeEditor?this.activeEditor.finishEditing(t,e,n):n&&n(!1)}closeEditorAndSaveChanges(t){this.closeEditor(!1,t)}closeEditorAndRestoreOriginalValue(t){this.closeEditor(!0,t)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const t=this.hot.getSelectedRangeActive();if(!t)return!1;const e=this.hot.getCellEditor(this.cellProperties),{row:n,col:o}=t.highlight,{rowIndexMapper:i,columnIndexMapper:r}=this.hot,s=i.isHidden(this.hot.toPhysicalRow(n))||r.isHidden(this.hot.toPhysicalColumn(o));return!(this.cellProperties.readOnly||!e||s)}moveSelectionAfterEnter(t){const e={..."function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(t):this.tableMeta.enterMoves};t.shiftKey&&(e.row=-e.row,e.col=-e.col),this.hot.selection.isMultiple()?this.selection.transformFocus(e.row,e.col):this.selection.transformStart(e.row,e.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function Kn(t){const e=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!e||e.highlight.isHeader()||ln(t))return;const{keyCode:n}=t,o=(t.ctrlKey||t.metaKey)&&!t.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&(rn(n)||function(t){return[en.CONTROL,en.COMMAND_LEFT,en.COMMAND_RIGHT,en.COMMAND_FIREFOX].includes(t)}(n)||o||this.isEditorOpened()||this.openEditor("",t))}function qn(t,e){e.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,t,!0))}const Xn=new WeakMap;Gn.getInstance=function(t,e,n){let o=Xn.get(t);return o||(o=new Gn(t,e,n),Xn.set(t,o)),o};const Zn={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},Jn=new RegExp(Object.keys(Zn).map(t=>`(${t})`).join("|"),"gi");function Qn(t){const e=t.hasColHeaders(),n=t.hasRowHeaders(),o=[e?-1:0,n?-1:0,t.countRows()-1,t.countCols()-1],i=t.getData(...o),r=i.length,s=r>0?i[0].length:0,a=["<table>","</table>"],l=e?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=n?1:0,d=e?1:0;for(let o=0;o<r;o+=1){const r=e&&0===o,a=[];for(let e=0;e<s;e+=1){const s=!r&&n&&0===e;let l="";if(r)l=`<th>${t.getColHeader(e-c)}</th>`;else if(s)l=`<th>${t.getRowHeader(o-d)}</th>`;else{const n=i[o][e],{hidden:r,rowspan:s,colspan:a}=t.getCellMeta(o-d,e-c);if(!r){const t=[];if(s&&t.push(`rowspan="${s}"`),a&&t.push(`colspan="${a}"`),P(n))l=`<td ${t.join(" ")}></td>`;else{const e=n.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");l=`<td ${t.join(" ")}>${e}</td>`}}}a.push(l)}const u=["<tr>",...a,"</tr>"].join("");r?l.splice(1,0,u):h.splice(-1,0,u)}return a.splice(1,0,l.join(""),h.join("")),a.join("")}function to(t){const e=t.length,n=["<table>"];for(let o=0;o<e;o+=1){const i=t[o],r=i.length,s=[];0===o&&n.push("<tbody>");for(let t=0;t<r;t+=1){const e=i[t],n=P(e)?"":e.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,t=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(t.length-1)} </span>`).replace(/\t/gi,"&#9;");s.push(`<td>${n}</td>`)}n.push("<tr>",...s,"</tr>"),o+1===e&&n.push("</tbody>")}return n.push("</table>"),n.join("")}const eo=/<td\b[^>]*>/i,no=/<\/\s*td\s*>/i,oo=/<p.*?>/g;function io(t,e){let n=1,o=e;for(;n>0;){const e=t.substring(o),i=e.match(eo),r=e.match(no);if(!r)return null;const s=o+r.index,a=r[0].length,l=i?o+i.index:t.length;if(l<s)n+=1,o=l+i[0].length;else{if(n-=1,0===n)return{start:s,length:a};o=s+a}}return null}function ro(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const n={},o=e.createDocumentFragment(),i=e.createElement("div");o.appendChild(i);let r=t;if("string"==typeof r){const t=function(t){const e=[];let n=0;for(;n<t.length;){const o=t.substring(n).match(eo);if(!o){e.push(t.substring(n));break}const i=n+o.index,r=o[0],s=i+r.length;e.push(t.substring(n,i));const a=io(t,s);if(!a){e.push(t.substring(i));break}const l=t.substring(i,a.start+a.length),h=a.start-i,c=l.substring(r.length,h).trim().replaceAll(/\n\s+/g," ").replaceAll(oo,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"");e.push(`${r}${c}</td>`),n=a.start+a.length}return e.join("")}(r);i.insertAdjacentHTML("afterbegin",`${t}`),r=i.querySelector("table")}if(!r||!function(t){return"TABLE"===(t&&t.nodeName||"")}(r))return;const s=i.querySelector('meta[name$="enerator"]'),a=null!==r.querySelector("tbody th"),l=r.querySelector("tr"),h=l?Array.from(l.cells).reduce((t,e)=>t+e.colSpan,0)-(a?1:0):0,c=r.tFoot&&Array.from(r.tFoot.rows)||[],d=[];let u=!1,g=0,f=0;if(r.tHead){const t=Array.from(r.tHead.rows).filter(t=>{const e=null!==t.querySelector("td");return e&&d.push(t),!e});g=t.length,u=g>0,g>1?n.nestedHeaders=Array.from(t).reduce((t,e)=>{const n=Array.from(e.cells).reduce((t,e,n)=>{if(a&&0===n)return t;const{colSpan:o,innerHTML:i}=e,r=o>1?{label:i,colspan:o}:i;return t.push(r),t},[]);return t.push(n),t},[]):u&&(n.colHeaders=Array.from(t[0].children).reduce((t,e,n)=>(a&&0===n||t.push(e.innerHTML),t),[]))}d.length&&(n.fixedRowsTop=d.length),c.length&&(n.fixedRowsBottom=c.length);const p=[...d,...Array.from(r.tBodies).reduce((t,e)=>(t.push(...Array.from(e.rows)),t),[]),...c];f=p.length;const m=new Array(f);for(let t=0;t<f;t++)m[t]=new Array(h);const b=[],w=[];for(let t=0;t<f;t++){const e=p[t],n=Array.from(e.cells),o=n.length;for(let e=0;e<o;e++){const o=n[e],{nodeName:i,innerHTML:r,rowSpan:a,colSpan:l}=o,h=m[t].findIndex(t=>void 0===t);if("TD"===i){if(a>1||l>1){for(let e=t;e<t+a;e++)if(e<f)for(let t=h;t<h+l;t++)m[e][t]=null;const e=o.getAttribute("style");e&&e.includes("mso-ignore:colspan")||b.push({col:h,row:t,rowspan:a,colspan:l})}let e="";e=s&&/excel/gi.test(s.content)?r.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):r.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),m[t][h]=e.replace(Jn,t=>Zn[t])}else w.push(r)}}return b.length&&(n.mergeCells=b),w.length&&(n.rowHeaders=w),m.length&&(n.data=m),n}function so(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=typeof t;if("number"===n)return!isNaN(t)&&isFinite(t);if("string"===n){if(0===t.length)return!1;if(1===t.length)return/\d/.test(t);const n=Array.from(new Set([".",...e])).map(t=>`\\${t}`).join("|");return new RegExp(`^[+-]?(((${n})?\\d+((${n})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(t.trim())}return"object"===n&&!(!t||"number"!=typeof t.valueOf()||t instanceof Date)}function ao(t,e,n){let o=-1;for("function"==typeof e?(n=e,e=t):o=t-1;++o<=e&&!1!==n(o););}function lo(t,e,n){let o=t+1;for("function"==typeof e&&(n=e,e=0);--o>=e&&!1!==n(o););}function ho(t,e){return e=parseInt(e.toString().replace("%",""),10),e=isNaN(e)?0:e,parseInt(t*e/100,10)}function co(t,e,n){return Math.min(t,e)===t?e:Math.max(t,n)===t?n:t}function uo(t){return Number.isInteger(t)&&t>=0}const go="asc",fo=new Map([[go,[-1,1]],["desc",[1,-1]]]),po=t=>`The priority '${t}' is already declared in a map.`,mo=t=>`The priority '${t}' is not a number.`;const bo=t=>`The id '${t}' is already declared in a map.`;function wo(){let{errorIdExists:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=new Map;function n(){return[...e]}function o(t){return e.has(t)}return t=Ze(t)?t:bo,{addItem:function(n,i){o(n)&&wt(t(n)),e.set(n,i)},clear:function(){e.clear()},getId:function(t){const[e]=n().find(e=>{let[n,o]=e;return t===o&&n})||[null];return e},getItem:function(t){return e.get(t)},getItems:n,getValues:function(){return[...e.values()]},hasItem:o,removeItem:function(t){return e.delete(t)}}}const vo=t=>`'${t}' value is already declared in a unique set.`;const yo=t=>`There is already registered "${t}" plugin.`,Co=function(){let{errorPriorityExists:t,errorPriorityNaN:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Map;return t=Ze(t)?t:po,e=Ze(e)?e:mo,{addItem:function(o,i){so(o)||wt(e(o)),n.has(o)&&wt(t(o)),n.set(o,i)},getItems:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:go;const[e,o]=fo.get(t)||fo.get(go);return[...n].sort((t,n)=>t[0]<n[0]?e:o).map(t=>t[1])}}}({errorPriorityExists:t=>`There is already registered plugin on priority "${t}".`,errorPriorityNaN:t=>`The priority "${t}" is not a number.`}),So=function(){let{errorItemExists:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e=new Set;return t=Ze(t)?t:vo,{addItem:function(n){e.has(n)&&wt(t(n)),e.add(n)},clear:function(){e.clear()},getItems:function(){return[...e]}}}({errorItemExists:yo}),Ro=wo({errorIdExists:yo});function ko(){return[...Co.getItems(),...So.getItems()]}function xo(t){const e=$(t);return Ro.getItem(e)}function Eo(t,e,n){[t,e,n]=function(t,e,n){"function"==typeof t&&(t=(e=t).PLUGIN_KEY,n=e.PLUGIN_PRIORITY);return[t,e,n]}(t,e,n),void 0===xo(t)&&function(t,e,n){const o=$(t);Ro.hasItem(o)&&wt(yo(o));void 0===n?So.addItem(o):Co.addItem(n,o);Ro.addItem(o,e)}(t,e,n)}const{register:Mo,getItem:To,hasItem:_o,getNames:Ho,getValues:Io}=Hn("renderers");function Ao(t){return"function"==typeof t?t:(_o(t)||wt(`No registered renderer found under "${t}" name`),To(t))}function Po(t,e){"string"!=typeof t&&(t=(e=t).RENDERER_TYPE),Mo(t,e)}const{register:Oo,getItem:No,hasItem:Do,getNames:Lo,getValues:Vo}=Hn("validators");function Bo(t,e){"string"!=typeof t&&(t=(e=t).VALIDATOR_TYPE),Oo(t,e)}function Fo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Wo{constructor(){Fo(this,"count",0),Fo(this,"startColumn",null),Fo(this,"endColumn",null),Fo(this,"startPosition",null),Fo(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedWidth:n,zeroBasedScrollOffset:o,viewportWidth:i,columnWidth:r}=e;n>=o&&n+r<=o+(o>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t),this.endColumn=t)}finalize(t){var e;const{scrollOffset:n,viewportWidth:o,inlineStartOffset:i,zeroBasedScrollOffset:r,totalColumns:s,needReverse:a,startPositions:l,columnWidth:h}=t;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=l[this.endColumn]+h-l[this.startColumn-1];if(t<=o&&(this.startColumn-=1),t>=o)break}this.startPosition=null!==(e=l[this.startColumn])&&void 0!==e?e:null;const c=n+o-(r>0?o+1:o),d=null===this.startColumn?0:t.getColumnWidth(this.startColumn);c<-1*i||n>l.at(-1)||-1*n-o>-1*d?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function zo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class jo{constructor(){zo(this,"count",0),zo(this,"startRow",null),zo(this,"endRow",null),zo(this,"startPosition",null),zo(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedHeight:n,zeroBasedScrollOffset:o,innerViewportHeight:i,rowHeight:r}=e;n>=o&&n+r<=i&&(null===this.startRow&&(this.startRow=t),this.endRow=t)}finalize(t){var e;const{scrollOffset:n,viewportHeight:o,horizontalScrollbarHeight:i,totalRows:r,needReverse:s,startPositions:a,rowHeight:l}=t;if(this.endRow===r-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=a[this.endRow]+l-a[this.startRow-1];if(t<=o-i&&(this.startRow-=1),t>=o-i)break}this.startPosition=null!==(e=a[this.startRow])&&void 0!==e?e:null;n+o-i<(null===this.startRow?0:t.getRowHeight(this.startRow))||n>a.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function $o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Uo{constructor(){$o(this,"count",0),$o(this,"startColumn",null),$o(this,"endColumn",null),$o(this,"startPosition",null),$o(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedWidth:n,zeroBasedScrollOffset:o,viewportWidth:i}=e;n<=o&&(this.startColumn=t);n>=o&&n<=o+(o>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t)),this.endColumn=t}finalize(t){var e;const{scrollOffset:n,viewportWidth:o,inlineStartOffset:i,zeroBasedScrollOffset:r,totalColumns:s,needReverse:a,startPositions:l,columnWidth:h}=t;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=l[this.endColumn]+h-l[this.startColumn-1];if(this.startColumn-=1,t>o)break}this.startPosition=null!==(e=l[this.startColumn])&&void 0!==e?e:null;n+o-(r>0?o+1:o)<-1*i||n>l.at(-1)+h||-1*n-o>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function Yo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Go{constructor(){Yo(this,"count",0),Yo(this,"startRow",null),Yo(this,"endRow",null),Yo(this,"startPosition",null),Yo(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(t,e){const{totalCalculatedHeight:n,zeroBasedScrollOffset:o,innerViewportHeight:i}=e;n<=o&&(this.startRow=t),n>=o&&n<=i&&null===this.startRow&&(this.startRow=t),this.endRow=t}finalize(t){var e;const{scrollOffset:n,viewportHeight:o,horizontalScrollbarHeight:i,totalRows:r,needReverse:s,startPositions:a,rowHeight:l}=t;if(this.endRow===r-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,t>=o-i)break}this.startPosition=null!==(e=a[this.startRow])&&void 0!==e?e:null;n+o-i<0||n>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Ko(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qo{constructor(){Ko(this,"count",0),Ko(this,"startColumn",0),Ko(this,"endColumn",0),Ko(this,"startPosition",0),Ko(this,"isVisibleInTrimmingContainer",!0)}initialize(t){let{totalColumns:e}=t;this.count=e,this.endColumn=this.count-1}process(){}finalize(){}}function Xo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Zo{constructor(){Xo(this,"count",0),Xo(this,"startRow",0),Xo(this,"endRow",0),Xo(this,"startPosition",0),Xo(this,"isVisibleInTrimmingContainer",!0)}initialize(t){let{totalRows:e}=t;this.count=e,this.endRow=this.count-1}process(){}finalize(){}}function Jo(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Qo extends Uo{constructor(){super(...arguments),Jo(this,"columnStartOffset",0),Jo(this,"columnEndOffset",0)}finalize(t){var e;super.finalize(t);const{overrideFn:n,totalColumns:o,startPositions:i}=t;if(null!==this.startColumn&&"function"==typeof n){const t=this.startColumn,e=this.endColumn;n(this),this.columnStartOffset=t-this.startColumn,this.columnEndOffset=this.endColumn-e}this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(e=i[this.startColumn])&&void 0!==e?e:null,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function ti(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ei extends Go{constructor(){super(...arguments),ti(this,"rowStartOffset",0),ti(this,"rowEndOffset",0)}finalize(t){var e;super.finalize(t);const{overrideFn:n,totalRows:o,startPositions:i}=t;if(null!==this.startRow&&"function"==typeof n){const t=this.startRow,e=this.endRow;n(this),this.rowStartOffset=t-this.startRow,this.rowEndOffset=this.endRow-e}this.startRow<0&&(this.startRow=0),this.startPosition=null!==(e=i[this.startRow])&&void 0!==e?e:null,o<this.endRow&&(this.endRow=o-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function ni(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class oi{constructor(t){ni(this,"calculationTypes",[]),ni(this,"calculationResults",new Map),this.calculationTypes=t}_initialize(t){this.calculationTypes.forEach(e=>{let[n,o]=e;this.calculationResults.set(n,o),o.initialize(t)})}_process(t,e){this.calculationTypes.forEach(n=>{let[,o]=n;return o.process(t,e)})}_finalize(t){this.calculationTypes.forEach(e=>{let[,n]=e;return n.finalize(t)})}getResultsFor(t){return this.calculationResults.get(t)}}function ii(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ri=50;class si extends oi{constructor(t){let{calculationTypes:e,viewportWidth:n,scrollOffset:o,totalColumns:i,columnWidthFn:r,overrideFn:s,inlineStartOffset:a}=t;super(e),ii(this,"viewportWidth",0),ii(this,"scrollOffset",0),ii(this,"zeroBasedScrollOffset",0),ii(this,"totalColumns",0),ii(this,"columnWidthFn",null),ii(this,"columnWidth",0),ii(this,"overrideFn",null),ii(this,"inlineStartOffset",0),ii(this,"totalCalculatedWidth",0),ii(this,"startPositions",[]),ii(this,"needReverse",!0),this.viewportWidth=n,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalColumns=i,this.columnWidthFn=r,this.overrideFn=s,this.inlineStartOffset=a,this.calculate()}calculate(){this._initialize(this);for(let t=0;t<this.totalColumns;t++)if(this.columnWidth=this.getColumnWidth(t),this._process(t,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(t){const e=this.columnWidthFn(t);return isNaN(e)?ri:e}}function ai(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class li extends oi{constructor(t){let{calculationTypes:e,viewportHeight:n,scrollOffset:o,totalRows:i,defaultRowHeight:r,rowHeightFn:s,overrideFn:a,horizontalScrollbarHeight:l}=t;super(e),ai(this,"viewportHeight",0),ai(this,"scrollOffset",0),ai(this,"zeroBasedScrollOffset",0),ai(this,"totalRows",0),ai(this,"rowHeightFn",null),ai(this,"rowHeight",0),ai(this,"overrideFn",null),ai(this,"horizontalScrollbarHeight",0),ai(this,"innerViewportHeight",0),ai(this,"totalCalculatedHeight",0),ai(this,"startPositions",[]),ai(this,"needReverse",!0),this.defaultHeight=r,this.viewportHeight=n,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalRows=i,this.rowHeightFn=s,this.overrideFn=a,this.horizontalScrollbarHeight=null!=l?l:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let t=0;t<this.totalRows;t++)if(this.rowHeight=this.getRowHeight(t),this._process(t,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(t){const e=this.rowHeightFn(t);return isNaN(e)?this.defaultHeight:e}}function hi(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function ci(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function di(t,e){return t.get(gi(t,e))}function ui(t,e,n){return t.set(gi(t,e),n),n}function gi(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var fi=new WeakMap;class pi{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];ci(this,"row",null),ci(this,"col",null),hi(this,fi,!1),ui(fi,this,n),void 0!==t&&void 0!==e&&(this.row=t,this.col=e)}isValid(t){const{countRows:e,countCols:n,countRowHeaders:o,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...t};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-o)&&!(this.row>=e||this.col>=n))}isEqual(t){return t===this||this.row===t.row&&this.col===t.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return di(fi,this)}isSouthEastOf(t){return this.row>=t.row&&(di(fi,this)?this.col<=t.col:this.col>=t.col)}isNorthWestOf(t){return this.row<=t.row&&(di(fi,this)?this.col>=t.col:this.col<=t.col)}isSouthWestOf(t){return this.row>=t.row&&(di(fi,this)?this.col>=t.col:this.col<=t.col)}isNorthEastOf(t){return this.row<=t.row&&(di(fi,this)?this.col<=t.col:this.col>=t.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(t){return Number.isInteger(null==t?void 0:t.row)&&(this.row=t.row),Number.isInteger(null==t?void 0:t.col)&&(this.col=t.col),t instanceof pi&&ui(fi,this,t.isRtl()),this}clone(){return new pi(this.row,this.col,di(fi,this))}toObject(){return{row:this.row,col:this.col}}}function mi(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function bi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wi(t,e){return t.get(vi(t,e))}function vi(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var yi=new WeakMap;class Ci{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];var i,r,s;bi(this,"highlight",null),bi(this,"from",null),bi(this,"to",null),mi(this,yi,!1),this.highlight=t.clone(),this.from=e.clone(),this.to=n.clone(),r=this,s=o,(i=yi).set(vi(i,r),s)}setHighlight(t){return this.highlight=t.clone(),this}setFrom(t){return this.from=t.clone(),this}setTo(t){return this.to=t.clone(),this}normalize(){return this.highlight.normalize(),this.from.normalize(),this.to.normalize(),this}isValid(t){return this.from.isValid(t)&&this.to.isValid(t)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const t=Math.max(this.from.row,0),e=Math.max(this.to.row,0);return Math.max(t,e)-Math.min(t,e)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const t=Math.max(this.from.col,0),e=Math.max(this.to.col,0);return Math.max(t,e)-Math.min(t,e)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(t){const{row:e,col:n}=t,o=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return o.row<=e&&i.row>=e&&o.col<=n&&i.col>=n}includesRange(t){return this.includes(t.getOuterTopStartCorner())&&this.includes(t.getOuterBottomEndCorner())}isEqual(t){return Math.min(this.from.row,this.to.row)===Math.min(t.from.row,t.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(t.from.row,t.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(t.from.col,t.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(t.from.col,t.to.col)}overlaps(t){return t.isSouthEastOf(this.getOuterTopLeftCorner())&&t.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(t){return this.getOuterTopLeftCorner().isSouthEastOf(t)||this.getOuterBottomRightCorner().isSouthEastOf(t)}isNorthWestOf(t){return this.getOuterTopLeftCorner().isNorthWestOf(t)||this.getOuterBottomRightCorner().isNorthWestOf(t)}isOverlappingHorizontally(t){return this.getOuterTopEndCorner().col>=t.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=t.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=t.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=t.getOuterTopStartCorner().col}isOverlappingVertically(t){return this.getOuterBottomStartCorner().row>=t.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=t.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=t.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=t.getOuterTopRightCorner().row}expand(t){const e=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return(t.row<e.row||t.col<e.col||t.row>n.row||t.col>n.col)&&(this.from=this._createCellCoords(Math.min(e.row,t.row),Math.min(e.col,t.col)),this.to=this._createCellCoords(Math.max(n.row,t.row),Math.max(n.col,t.col)),!0)}expandByRange(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(t)||!this.overlaps(t))return!1;const n=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),i=this.getDirection(),r=t.getOuterTopStartCorner(),s=t.getOuterBottomEndCorner(),a=Math.min(n.row,r.row),l=Math.min(n.col,r.col),h=Math.max(o.row,s.row),c=Math.max(o.col,s.col),d=this._createCellCoords(a,l),u=this._createCellCoords(h,c);return this.from=d,this.to=u,this.setDirection(i),e&&(this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally()),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(t){switch(t){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return wi(yi,this)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return wi(yi,this)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return wi(yi,this)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return wi(yi,this)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return wi(yi,this)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return wi(yi,this)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return wi(yi,this)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return wi(yi,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(t){return t.isEqual(this.getOuterTopLeftCorner())||t.isEqual(this.getOuterTopRightCorner())||t.isEqual(this.getOuterBottomLeftCorner())||t.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(t){return t instanceof pi&&(t.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():t.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():t.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():t.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(t){if(!this.includesRange(t))return[];const e=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),o=Math.min(this.from.col,this.to.col),i=Math.max(this.from.col,this.to.col),r=Math.min(t.from.row,t.to.row),s=Math.max(t.from.row,t.to.row),a=Math.min(t.from.col,t.to.col),l=Math.max(t.from.col,t.to.col),h=[];return e===r&&h.push("top"),i===l&&h.push(wi(yi,this)?"left":"right"),n===s&&h.push("bottom"),o===a&&h.push(wi(yi,this)?"right":"left"),h}getInner(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),n=[];for(let o=t.row;o<=e.row;o++)for(let i=t.col;i<=e.col;i++)this.from.row===o&&this.from.col===i||this.to.row===o&&this.to.col===i||n.push(this._createCellCoords(o,i));return n}getAll(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),n=[];for(let o=t.row;o<=e.row;o++)for(let i=t.col;i<=e.col;i++)t.row===o&&t.col===i?n.push(t):e.row===o&&e.col===i?n.push(e):n.push(this._createCellCoords(o,i));return n}forAll(t){const e=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();for(let o=e.row;o<=n.row;o++)for(let i=e.col;i<=n.col;i++){if(!1===t(o,i))return}}clone(){return new Ci(this.highlight,this.from,this.to,wi(yi,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(t,e){return new pi(t,e,wi(yi,this))}}function Si(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Ri(t,e){return t.get(xi(t,e))}function ki(t,e,n){return t.set(xi(t,e),n),n}function xi(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Ei=new WeakMap,Mi=new WeakMap,Ti=new WeakMap,_i=new WeakMap,Hi=new WeakMap,Ii=new WeakMap,Ai=new WeakMap,Pi=new WeakMap,Oi=new WeakMap,Ni=new WeakMap;let Di=class{constructor(t,e,n,o,i,r){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;Si(this,Ei,void 0),Si(this,Mi,void 0),Si(this,Ti,void 0),Si(this,_i,void 0),Si(this,Hi,void 0),Si(this,Ii,void 0),Si(this,Ai,void 0),Si(this,Pi,void 0),Si(this,Oi,[null,null]),Si(this,Ni,[null,null]),ki(Ei,this,n),ki(Mi,this,e),ki(Ti,this,i),ki(_i,this,r),ki(Hi,this,s),ki(Ii,this,o),ki(Ai,this,t),this.registerEvents()}registerEvents(){Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"contextmenu",t=>this.onContextMenu(t)),Ri(Ii,this).addEventListener(Ri(Ti,this).TABLE,"mouseover",t=>this.onMouseOver(t)),Ri(Ii,this).addEventListener(Ri(Ti,this).TABLE,"mouseout",t=>this.onMouseOut(t));const t=()=>{Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"touchstart",t=>this.onTouchStart(t)),Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"touchend",t=>this.onTouchEnd(t)),this.momentumScrolling||(this.momentumScrolling={}),Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||Ri(Ei,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,Ri(Ei,this).getSetting("onAfterMomentumScroll"))},200)})},e=()=>{Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"mouseup",t=>this.onMouseUp(t)),Ri(Ii,this).addEventListener(Ri(Ti,this).holder,"mousedown",t=>this.onMouseDown(t))};Gt()?t():(Bt()&&t(),e())}selectedCellWasTouched(t){const e=this.parentCell(t).coords;if(Ri(Pi,this)&&e){const[t,n]=[e.row,Ri(Pi,this).from.row],[o,i]=[e.col,Ri(Pi,this).from.col];return t===n&&o===i}return!1}parentCell(t){const e={},n=se(t,["TD","TH"],Ri(Ti,this).TABLE);return n?(e.coords=Ri(Ti,this).getCoords(n),e.TD=n):de(t,"wtBorder")&&de(t,"current")?(e.coords=Ri(_i,this).getFocusSelection().cellRange.highlight,e.TD=Ri(Ti,this).getCell(e.coords)):de(t,"wtBorder")&&de(t,"area")&&Ri(_i,this).getAreaSelection().cellRange&&(e.coords=Ri(_i,this).getAreaSelection().cellRange.to,e.TD=Ri(Ti,this).getCell(e.coords)),e}onMouseDown(t){const e=Ri(Mi,this).rootDocument.activeElement,n=Qe(ne,t.target),o=t.target;if(!["TD","TH"].includes(e.nodeName)&&(o===e||n(0)===e||n(1)===e))return;const i=this.parentCell(o);de(o,"corner")?Ri(Ei,this).getSetting("onCellCornerMouseDown",t,o):i.TD&&Ri(Ei,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",t,i.coords,i.TD),(0===t.button||this.touchApplied)&&i.TD&&(Ri(Ni,this)[0]=i.TD,clearTimeout(Ri(Oi,this)[0]),Ri(Oi,this)[0]=setTimeout(()=>{Ri(Ni,this)[0]=null},1e3))}onContextMenu(t){if(Ri(Ei,this).has("onCellContextMenu")){const e=this.parentCell(t.target);e.TD&&this.callListener("onCellContextMenu",t,e.coords,e.TD)}}onMouseOver(t){if(!Ri(Ei,this).has("onCellMouseOver"))return;const e=Ri(Ti,this).TABLE,n=se(t.target,["TD","TH"],e),o=Ri(Hi,this)||this;n&&n!==o.lastMouseOver&&ae(n,e)&&(o.lastMouseOver=n,this.callListener("onCellMouseOver",t,Ri(Ti,this).getCoords(n),n))}onMouseOut(t){if(!Ri(Ei,this).has("onCellMouseOut"))return;const e=Ri(Ti,this).TABLE,n=se(t.target,["TD","TH"],e),o=se(t.relatedTarget,["TD","TH"],e),i=Ri(Hi,this)||this;n&&n!==o&&ae(n,e)&&(this.callListener("onCellMouseOut",t,Ri(Ti,this).getCoords(n),n),null===o&&(i.lastMouseOver=null))}onMouseUp(t){const e=this.parentCell(t.target);e.TD&&Ri(Ei,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",t,e.coords,e.TD),(0===t.button||this.touchApplied)&&(e.TD===Ri(Ni,this)[0]&&e.TD===Ri(Ni,this)[1]?(de(t.target,"corner")?this.callListener("onCellCornerDblClick",t,e.coords,e.TD):this.callListener("onCellDblClick",t,e.coords,e.TD),Ri(Ni,this)[0]=null,Ri(Ni,this)[1]=null):e.TD===Ri(Ni,this)[0]&&(Ri(Ni,this)[1]=e.TD,clearTimeout(Ri(Oi,this)[1]),Ri(Oi,this)[1]=setTimeout(()=>{Ri(Ni,this)[1]=null},500)))}onTouchStart(t){ki(Pi,this,Ri(_i,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(t)}onTouchEnd(t){var e;const n=t.target,o=null===(e=this.parentCell(n))||void 0===e?void 0:e.coords,i=I(o)&&o.row>=0&&o.col>=0;if(t.cancelable&&i&&Ri(Ei,this).getSetting("isDataViewInstance")){const e=["A","BUTTON","INPUT"];Kt()&&(zt.chromeWebKit.value||zt.firefoxWebKit.value)&&this.selectedCellWasTouched(n)&&!e.includes(n.tagName)?t.preventDefault():this.selectedCellWasTouched(n)||t.preventDefault()}this.onMouseUp(t),this.touchApplied=!1}callListener(t,e,n,o){const i=Ri(Ei,this).getSettingPure(t);i&&i(e,n,o,Ri(Ai,this).call(this))}destroy(){clearTimeout(Ri(Oi,this)[0]),clearTimeout(Ri(Oi,this)[1]),Ri(Ii,this).destroy()}};function Li(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Vi{constructor(t,e,n){Li(this,"offset",void 0),Li(this,"total",void 0),Li(this,"countTH",void 0),this.offset=t,this.total=e,this.countTH=n}offsetted(t){return t+this.offset}unOffsetted(t){return t-this.offset}renderedToSource(t){return this.offsetted(t)}sourceToRendered(t){return this.unOffsetted(t)}offsettedTH(t){return t-this.countTH}unOffsettedTH(t){return t+this.countTH}visibleRowHeadedColumnToSourceColumn(t){return this.renderedToSource(this.offsettedTH(t))}sourceColumnToVisibleRowHeadedColumn(t){return this.unOffsettedTH(this.sourceToRendered(t))}}function Bi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Fi{constructor(t,e,n){Bi(this,"offset",void 0),Bi(this,"total",void 0),Bi(this,"countTH",void 0),this.offset=t,this.total=e,this.countTH=n}offsetted(t){return t+this.offset}unOffsetted(t){return t-this.offset}renderedToSource(t){return this.offsetted(t)}sourceToRendered(t){return this.unOffsetted(t)}offsettedTH(t){return t-this.countTH}unOffsettedTH(t){return t+this.countTH}visibleColHeadedRowToSourceRow(t){return this.renderedToSource(this.offsettedTH(t))}sourceRowToVisibleColHeadedRow(t){return this.unOffsettedTH(this.sourceToRendered(t))}}function Wi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class zi{constructor(){Wi(this,"currentSize",0),Wi(this,"nextSize",0),Wi(this,"currentOffset",0),Wi(this,"nextOffset",0)}setSize(t){this.currentSize=this.nextSize,this.nextSize=t}setOffset(t){this.currentOffset=this.nextOffset,this.nextOffset=t}}function ji(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class $i{constructor(){ji(this,"size",new zi),ji(this,"workingSpace",0),ji(this,"sharedSize",null)}setSize(t){this.size.setSize(t)}setOffset(t){this.size.setOffset(t)}getViewSize(){return this.size}isShared(){return null!==this.sharedSize}isPlaceOn(t){return this.workingSpace===t}append(t){this.workingSpace=1,t.workingSpace=2,this.sharedSize=t.getViewSize()}prepend(t){this.workingSpace=2,t.workingSpace=1,this.sharedSize=t.getViewSize()}}function Ui(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Yi{constructor(t,e){Ui(this,"order",[]),this.order=[...Array(e).keys()].map(e=>t+e)}get length(){return this.order.length}has(t){return this.order.indexOf(t)>-1}get(t){return t<this.order.length?this.order[t]:-1}remove(t){this.order.splice(this.order.indexOf(t),1)}prepend(t){return this.order.unshift(t),this.order.pop()}}function Gi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ki{constructor(t){Gi(this,"sizeSet",void 0),this.sizeSet=t}diff(){const{sizeSet:t}=this,{currentSize:e,nextSize:n}=t.getViewSize();let o=Math.max(n,e);if(0===o)return[];const{currentOffset:i,nextOffset:r}=t.getViewSize(),s=new Yi(i,e),a=new Yi(r,n),l=[];for(let e=0;e<o;e++){const i=s.get(e),r=a.get(e);if(-1===r)l.push(["remove",i]);else if(-1===i)!t.isShared()||t.isShared()&&t.isPlaceOn(2)?l.push(["append",r]):l.push(["prepend",r]);else if(r>i)s.has(r)&&(s.remove(r),n<=s.length&&(o-=1)),l.push(["replace",r,i]);else if(r<i){const t=s.prepend(r);l.push(["insert_before",r,i,t])}else l.push(["none",r])}return l}}function qi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Xi{constructor(t){qi(this,"leads",[]),this.orderView=t}applyCommand(t){const{rootNode:e}=this.orderView,[n,o,i,r]=t,s=this.orderView.nodesPool(o);switch(this.orderView.collectedNodes.push(s),n){case"prepend":e.insertBefore(s,e.firstChild);break;case"append":e.appendChild(s);break;case"insert_before":e.insertBefore(s,this.orderView.nodesPool(i)),e.removeChild(this.orderView.nodesPool(r));break;case"replace":e.replaceChild(s,this.orderView.nodesPool(i));break;case"remove":e.removeChild(s)}}start(){this.orderView.collectedNodes.length=0,this.leads=this.orderView.viewDiffer.diff()}render(){this.leads.length>0&&this.applyCommand(this.leads.shift())}end(){for(;this.leads.length>0;)this.applyCommand(this.leads.shift())}}function Zi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ji{constructor(t){Zi(this,"visualIndex",0),this.orderView=t}getRenderedChildCount(){const{rootNode:t,sizeSet:e}=this.orderView;let n=0;if(this.orderView.isSharedViewSet()){let o=t.firstElementChild;for(;o;){if(o.tagName===this.orderView.childNodeType)n+=1;else if(e.isPlaceOn(1))break;o=o.nextElementSibling}}else n=t.childElementCount;return n}start(){this.orderView.collectedNodes.length=0,this.visualIndex=0;const{rootNode:t,sizeSet:e}=this.orderView,n=this.orderView.isSharedViewSet(),{nextSize:o}=e.getViewSize();let i=this.getRenderedChildCount();for(;i<o;){const o=this.orderView.nodesPool();!n||n&&e.isPlaceOn(2)?t.appendChild(o):t.insertBefore(o,t.firstChild),i+=1}const r=n&&e.isPlaceOn(1);for(;i>o;)t.removeChild(r?t.firstChild:t.lastChild),i-=1}render(){const{rootNode:t,sizeSet:e}=this.orderView;let n=this.visualIndex;this.orderView.isSharedViewSet()&&e.isPlaceOn(2)&&(n+=e.sharedSize.nextSize);let o=t.childNodes[n];if(o.tagName!==this.orderView.childNodeType){const e=this.orderView.nodesPool();t.replaceChild(e,o),o=e}this.orderView.collectedNodes.push(o),this.visualIndex+=1}end(){}}function Qi(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class tr{constructor(t,e,n){var o;Qi(this,"rootNode",void 0),Qi(this,"nodesPool",void 0),Qi(this,"sizeSet",new $i),Qi(this,"collectedNodes",[]),Qi(this,"viewDiffer",new Ki(this.sizeSet)),Qi(this,"childNodeType",void 0),Qi(this,"rendererAdapter",void 0),this.rootNode=t,this.nodesPool=e,this.childNodeType=n,this.rendererAdapter=(o=this,Ut()?new Ji(o):new Xi(o))}setSize(t){return this.sizeSet.setSize(t),this}setOffset(t){return this.sizeSet.setOffset(t),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(t){return t<this.collectedNodes.length?this.collectedNodes[t]:null}getCurrentNode(){const t=this.collectedNodes.length;return t>0?this.collectedNodes[t-1]:null}start(){this.rendererAdapter.start()}render(){this.rendererAdapter.render()}end(){this.rendererAdapter.end()}}class er extends tr{prependView(t){return this.sizeSet.prepend(t.sizeSet),t.sizeSet.append(this.sizeSet),this}appendView(t){return this.sizeSet.append(t.sizeSet),t.sizeSet.prepend(this.sizeSet),this}}function nr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class or{constructor(t){nr(this,"nodeType",void 0),nr(this,"pool",new Map),this.nodeType=t.toUpperCase()}setRootDocument(t){this.rootDocument=t}obtain(t,e){if(Ut())return this.rootDocument.createElement(this.nodeType);const n="number"==typeof e?`${t}x${e}`:t.toString();if(this.pool.has(n))return this.pool.get(n);const o=this.rootDocument.createElement(this.nodeType);return this.pool.set(n,o),o}}function ir(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class rr{constructor(t,e){ir(this,"nodesPool",null),ir(this,"nodeType",void 0),ir(this,"rootNode",void 0),ir(this,"table",null),ir(this,"renderedNodes",0),this.nodesPool="string"==typeof t?new or(t):null,this.nodeType=t,this.rootNode=e}setTable(t){this.nodesPool&&this.nodesPool.setRootDocument(t.rootDocument),this.table=t}adjust(){}render(){}}function sr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ar extends rr{constructor(){super("TH"),sr(this,"orderViews",new WeakMap),sr(this,"sourceRowIndex",0)}obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new er(t,t=>this.nodesPool.obtain(this.sourceRowIndex,t),this.nodeType),this.orderViews.set(t,e)),e}render(){const{rowsToRender:t,rowHeaderFunctions:e,rowHeadersCount:n,rows:o,cells:i}=this.table;for(let r=0;r<t;r++){const t=this.table.renderedRowToSource(r),s=o.getRenderedNode(r);this.sourceRowIndex=t;const a=this.obtainOrderView(s),l=i.obtainOrderView(s);a.appendView(l).setSize(n).setOffset(0).start();for(let o=n-1;o>=0;o--){a.render();const n=a.getCurrentNode();n.className="",n.removeAttribute("style"),pe(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&fe(n,[et(),rt(),gt(o+1),J(-1)]),e[o](t,n,o)}a.end()}}}class lr extends rr{constructor(t){super(null,t)}adjust(){const{columnHeadersCount:t,rowHeadersCount:e}=this.table;let n=this.rootNode.firstChild;if(t){const{columnsToRender:o}=this.table,i=o+e;for(let e=0,o=t;e<o;e++){for(n=this.rootNode.childNodes[e],n||(n=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(n)),this.renderedNodes=n.childNodes.length;this.renderedNodes<i;)n.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>i;)n.removeChild(n.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>t)for(let e=t;e<r;e++)this.rootNode.removeChild(this.rootNode.lastChild)}else n&&be(n)}render(){const{columnHeadersCount:t}=this.table;this.table.isAriaEnabled()&&fe(this.rootNode,[["role","rowgroup"]]);for(let e=0;e<t;e+=1){const{columnHeaderFunctions:t,columnsToRender:n,rowHeadersCount:o}=this.table,i=this.rootNode.childNodes[e];this.table.isAriaEnabled()&&fe(i,[ot(),ut(e+1)]);for(let r=-1*o;r<n;r+=1){const n=this.table.renderedColumnToSource(r),s=i.childNodes[r+o];s.className="",s.removeAttribute("style"),pe(s,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&fe(s,[gt(r+1+this.table.rowHeadersCount),J(-1),nt(),...r>=0?[it()]:[tt(),st("Select whole grid")]]),t[e](n,s,e)}}}}let hr=!1;class cr extends rr{constructor(t){super(null,t)}adjust(){const{columnsToRender:t,rowHeadersCount:e}=this.table,n=t+e;for(;this.renderedNodes<n;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>n;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:t,rowHeadersCount:e}=this.table;!hr&&t>1e3&&(hr=!0,Qt(T`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
25
+ Consider limiting the number of rendered columns by specifying the table width and/or\x20
26
+ turning off the "renderAllColumns" option.`));for(let t=0;t<e;t++){const e=this.table.renderedColumnToSource(t),n=this.table.columnUtils.getHeaderWidth(e);this.rootNode.childNodes[t].style.width=`${n}px`}for(let n=0;n<t;n++){const t=this.table.renderedColumnToSource(n),o=this.table.columnUtils.getWidth(t);this.rootNode.childNodes[n+e].style.width=`${o}px`}const n=this.rootNode.firstChild;n&&ue(n,"rowHeader")}}function dr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ur="ht__row_even",gr="ht__row_odd";let fr=!1;class pr extends rr{constructor(t){super("TR",t),dr(this,"orderView",void 0),this.orderView=new tr(t,t=>this.nodesPool.obtain(t),this.nodeType)}getRenderedNode(t){return this.orderView.getNode(t)}render(){const{rowsToRender:t}=this.table;!fr&&t>1e3&&(fr=!0,Qt(T`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
27
+ Consider limiting the number of rendered rows by specifying the table height and/or\x20
28
+ turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&fe(this.rootNode,[["role","rowgroup"]]),this.orderView.setSize(t).setOffset(this.table.renderedRowToSource(0)).start();for(let o=0;o<t;o++){this.orderView.render();const t=this.orderView.getCurrentNode(),i=this.table.renderedRowToSource(o);var e,n;if(this.table.isAriaEnabled())fe(t,[ot(),ut(i+(null!==(e=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.columnHeaders.length)&&void 0!==e?e:0)+1)]);(i+1)%2==0?de(t,ur)||(ge(t,gr),ue(t,ur)):de(t,gr)||(ge(t,ur),ue(t,gr))}this.orderView.end()}}function mr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class br extends rr{constructor(){super("TD"),mr(this,"orderViews",new WeakMap),mr(this,"sourceRowIndex",0)}obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new er(t,t=>this.nodesPool.obtain(this.sourceRowIndex,t),this.nodeType),this.orderViews.set(t,e)),e}render(){const{rowsToRender:t,columnsToRender:e,rows:n,rowHeaders:o}=this.table;for(let s=0;s<t;s++){const t=this.table.renderedRowToSource(s),a=n.getRenderedNode(s);this.sourceRowIndex=t;const l=this.obtainOrderView(a),h=o.obtainOrderView(a);l.prependView(h).setSize(e).setOffset(0).start();for(let n=0;n<e;n++){l.render();const e=this.table.renderedColumnToSource(n),o=l.getCurrentNode();var i,r;if(de(o,"hide")||(o.className=""),o.removeAttribute("style"),o.removeAttribute("dir"),pe(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(t,e,o),this.table.isAriaEnabled())fe(o,[...o.hasAttribute("role")?[]:[Q()],J(-1),gt(e+(null!==(i=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.rowHeaders.length)&&void 0!==i?i:0)+1)])}l.end()}}}function wr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class vr{constructor(t){let{cellRenderer:e,stylesHandler:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};wr(this,"rootNode",void 0),wr(this,"rootDocument",void 0),wr(this,"rowHeaders",null),wr(this,"columnHeaders",null),wr(this,"colGroup",null),wr(this,"rows",null),wr(this,"cells",null),wr(this,"rowFilter",null),wr(this,"columnFilter",null),wr(this,"rowUtils",null),wr(this,"columnUtils",null),wr(this,"rowsToRender",0),wr(this,"columnsToRender",0),wr(this,"rowHeaderFunctions",[]),wr(this,"rowHeadersCount",0),wr(this,"columnHeaderFunctions",[]),wr(this,"columnHeadersCount",0),wr(this,"cellRenderer",void 0),wr(this,"activeOverlayName",void 0),wr(this,"stylesHandler",void 0),this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=e,this.stylesHandler=n}setActiveOverlayName(t){this.activeOverlayName=t}setAxisUtils(t,e){this.rowUtils=t,this.columnUtils=e}setViewportSize(t,e){this.rowsToRender=t,this.columnsToRender=e}setFilters(t,e){this.rowFilter=t,this.columnFilter=e}setHeaderContentRenderers(t,e){this.rowHeaderFunctions=t,this.rowHeadersCount=t.length,this.columnHeaderFunctions=e,this.columnHeadersCount=e.length}setRenderers(){let{rowHeaders:t,columnHeaders:e,colGroup:n,rows:o,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.setTable(this),e.setTable(this),n.setTable(this),o.setTable(this),i.setTable(this),this.rowHeaders=t,this.columnHeaders=e,this.colGroup=n,this.rows=o,this.cells=i}renderedRowToSource(t){return this.rowFilter.renderedToSource(t)}renderedColumnToSource(t){return this.columnFilter.renderedToSource(t)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:t,rows:e}=this;for(let n=0;n<t;n++){const t=e.getRenderedNode(n),o=this.rowUtils;if(t.firstChild){const e=this.renderedRowToSource(n),i=o.getHeightByOverlayName(e,this.activeOverlayName),r=this.stylesHandler.areCellsBorderBox()?0:1;t.firstChild.style.height=i?i-r+"px":""}}}}class yr{constructor(){let{TABLE:t,THEAD:e,COLGROUP:n,TBODY:o,rowUtils:i,columnUtils:r,cellRenderer:s,stylesHandler:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new vr(t,{cellRenderer:s,stylesHandler:a}),this.renderer.setRenderers({rowHeaders:new ar,columnHeaders:new lr(e),colGroup:new cr(n),rows:new pr(o),cells:new br}),this.renderer.setAxisUtils(i,r)}setActiveOverlayName(t){return this.renderer.setActiveOverlayName(t),this}setFilters(t,e){return this.renderer.setFilters(t,e),this}setViewportSize(t,e){return this.renderer.setViewportSize(t,e),this}setHeaderContentRenderers(t,e){return this.renderer.setHeaderContentRenderers(t,e),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}function Cr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Sr{constructor(t,e){Cr(this,"dataAccessObject",void 0),Cr(this,"wtSettings",void 0),Cr(this,"headerWidths",new Map),this.dataAccessObject=t,this.wtSettings=e}getWidth(t){return this.wtSettings.getSetting("columnWidth",t)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(t){let e=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();const n=this.dataAccessObject.wtViewport.oversizedColumnHeaders[t];return void 0!==n&&(e=e?Math.max(e,n):n),e}getHeaderWidth(t){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(t))}calculateWidths(){const{wtSettings:t}=this;let e=t.getSetting("rowHeaderWidth");if(e=t.getSetting("onModifyRowHeaderWidth",e),null!=e){const n=t.getSetting("rowHeaders").length,o=t.getSetting("defaultColumnWidth");for(let t=0;t<n;t++){let n=Array.isArray(e)?e[t]:e;n=null==n?o:n,this.headerWidths.set(t,n)}}}}function Rr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class kr{constructor(t,e){Rr(this,"dataAccessObject",void 0),Rr(this,"wtSettings",void 0),this.dataAccessObject=t,this.wtSettings=e}getHeight(t){let e=this.wtSettings.getSetting("rowHeight",t);const n=this.dataAccessObject.wtViewport.oversizedRows[t];return void 0!==n&&(e=void 0===e?n:Math.max(e,n)),e}getHeightByOverlayName(t,e){let n=this.wtSettings.getSetting("rowHeightByOverlayName",t,e);const o=this.dataAccessObject.wtViewport.oversizedRows[t];return void 0!==o&&(n=void 0===n?o:Math.max(n,o)),n}}function xr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Er{constructor(t,e,n,o,i){xr(this,"wtSettings",null),xr(this,"domBindings",void 0),xr(this,"TBODY",null),xr(this,"THEAD",null),xr(this,"COLGROUP",null),xr(this,"hasTableHeight",!0),xr(this,"hasTableWidth",!0),xr(this,"isTableVisible",!1),xr(this,"tableOffset",0),xr(this,"holderOffset",0),this.domBindings=n,this.isMaster="master"===i,this.name=i,this.dataAccessObject=t,this.facadeGetter=e,this.wtSettings=o,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,me(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const r=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(r)),this.rowUtils=new kr(this.dataAccessObject,this.wtSettings),this.columnUtils=new Sr(this.dataAccessObject,this.wtSettings),this.tableRenderer=new yr({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.wtSettings.getSetting("stylesHandler")})}is(t){return this.name===t}fixTableDomTree(){const t=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=t.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=t.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=t.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(t){const e=t.parentNode;let n;return e&&e.nodeType===Node.ELEMENT_NODE&&de(e,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtSpreader",e&&e.insertBefore(n,t),n.appendChild(t)),n.style.position="relative",this.wtSettings.getSetting("ariaTags")&&fe(n,[["role","presentation"]]),n}createHider(t){const e=t.parentNode;let n;return e&&e.nodeType===Node.ELEMENT_NODE&&de(e,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtHider",e&&e.insertBefore(n,t),n.appendChild(t)),this.wtSettings.getSetting("ariaTags")&&fe(n,[["role","presentation"]]),n}createHolder(t){const e=t.parentNode;let n;return e&&e.nodeType===Node.ELEMENT_NODE&&de(e,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.style.position="relative",n.className="wtHolder",this.isMaster&&fe(n,[J(-1)]),e&&e.insertBefore(n,t),this.isMaster&&(n.parentNode.className+="ht_master handsontable",n.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&fe(n.parentNode,[["role","presentation"]])),n.appendChild(t)),this.wtSettings.getSetting("ariaTags")&&fe(n,[["role","presentation"]]),n}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:e}=this,{wtOverlays:n,wtViewport:o}=this.dataAccessObject,i=e.getSetting("totalRows"),r=e.getSetting("totalColumns"),s=e.getSetting("rowHeaders"),a=s.length,l=e.getSetting("columnHeaders"),h=l.length;let c=t;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=ke(this.holder),c=o.createCalculators(c),a&&!e.getSetting("fixedColumnsStart"))){const t=n.inlineStartOverlay.getScrollPosition(),e=this.correctHeaderWidth;this.correctHeaderWidth=0!==t,e!==this.correctHeaderWidth&&(c=!1)}if(c)this.isMaster&&n.refresh(!0);else{this.isMaster?this.tableOffset=ke(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const t=Math.max(this.getFirstRenderedRow(),0),e=Math.max(this.getFirstRenderedColumn(),0);this.rowFilter=new Fi(t,i,h),this.columnFilter=new Vi(e,r,a);let c=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const t={};this.wtSettings.getSetting("beforeDraw",!0,t),c=!0!==t.skipRender}c&&(this.tableRenderer.setHeaderContentRenderers(s,l),(this.is(Ir)||this.is(Or))&&this.tableRenderer.setHeaderContentRenderers(s,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(Ir))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||o.createVisibleCalculators(),n.refresh(!1),n.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(Ir)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize())}let d=!1;return this.isMaster&&(d=n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&(d=n.bottomOverlay.resetFixedPosition()||d),d=n.inlineStartOverlay.resetFixedPosition()||d,n.topInlineStartCornerOverlay&&n.topInlineStartCornerOverlay.resetFixedPosition(),n.bottomInlineStartCornerOverlay&&n.bottomInlineStartCornerOverlay.clone&&n.bottomInlineStartCornerOverlay.resetFixedPosition()),d?(n.refreshAll(),n.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(c),this.isMaster&&n.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(t){const e=this.columnFilter.renderedToSource(t);let n=this.wtSettings.getSetting("columnHeaders").length;const o=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();let i,r,s;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;n;)n-=1,i=this.getColumnHeaderHeight(n),r=this.getColumnHeader(e,n),r&&(s=Oe(r),(!i&&o<s||i<s)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=s),Array.isArray(a)?null!==a[n]&&void 0!==a[n]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a[n]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]<(a[n]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a[n]||a))}adjustColumnHeaderHeights(){const{wtSettings:t}=this,e=this.THEAD.childNodes,n=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let o=0,i=t.getSetting("columnHeaders").length;o<i;o++)if(n[o]){if(!e[o]||0===e[o].childNodes.length)return;e[o].childNodes[0].style.height=`${n[o]}px`}}resetOversizedRows(){const{wtSettings:t}=this,{wtViewport:e}=this.dataAccessObject;if((this.isMaster||this.is(Ir))&&!t.getSetting("externalRowCalculator")){const t=this.getRenderedRowsCount();for(let n=0;n<t;n++){const t=this.rowFilter.renderedToSource(n);e.oversizedRows&&e.oversizedRows[t]&&(e.oversizedRows[t]=void 0)}}}getCell(t){let e=t.row,n=t.col;const o=this.wtSettings.getSetting("onModifyGetCellCoords",e,n,!this.isMaster,"render");if(o&&Array.isArray(o)&&([e,n]=o),this.isRowBeforeRenderedRows(e))return-1;if(this.isRowAfterRenderedRows(e))return-2;if(this.isColumnBeforeRenderedColumns(n))return-3;if(this.isColumnAfterRenderedColumns(n))return-4;const i=this.getRow(e);!i&&e>=0&&wt("TR was expected to be rendered but is not");const r=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];return!r&&n>=0&&wt("TD or TH was expected to be rendered but is not"),r}getRow(t){let e=null,n=null;var o,i;t<0?(e=null===(o=this.rowFilter)||void 0===o?void 0:o.sourceRowToVisibleColHeadedRow(t),n=this.THEAD):(e=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(t),n=this.TBODY);return void 0!==e&&void 0!==n&&(!(n.childNodes.length<e+1)&&n.childNodes[e])}getColumnHeader(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.THEAD.childNodes[e];return null==n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t)]}getColumnHeaders(t){const e=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t);return this.THEAD.childNodes.forEach(t=>{const o=t.childNodes[n];o&&e.push(o)}),e}getRowHeader(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(e>=this.wtSettings.getSetting("rowHeaders").length)return;const n=this.rowFilter.sourceToRendered(t),o=n<0?this.rowFilter.sourceRowToVisibleColHeadedRow(t):n,i=(n<0?this.THEAD:this.TBODY).childNodes[o];return null==i?void 0:i.childNodes[e]}getRowHeaders(t){const e=[],n=this.wtSettings.getSetting("rowHeaders").length;for(let o=0;o<n;o++){const n=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)],i=null==n?void 0:n.childNodes[o];i&&e.push(i)}return e}getCoords(t){let e=t;if("TD"!==e.nodeName&&"TH"!==e.nodeName&&(e=re(e,["TD","TH"])),null===e)return null;const n=e.parentNode;if(!n)return null;const o=n.parentNode;let i=function(t){let e=0,n=t;if(n.previousSibling)for(;n=n.previousSibling;)e+=1;return e}(n),r=e.cellIndex;if(le(Pr,e,this.wtRootElement)||le(Hr,e,this.wtRootElement))"THEAD"===o.nodeName&&(i-=o.childNodes.length);else if(le(Or,e,this.wtRootElement)||le(Ir,e,this.wtRootElement)){i=this.wtSettings.getSetting("totalRows")-o.childNodes.length+i}else o===this.THEAD?i=this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter&&(i=this.rowFilter.renderedToSource(i));le(Pr,e,this.wtRootElement)||le(Ar,e,this.wtRootElement)||le(Or,e,this.wtRootElement)?r=this.columnFilter.offsettedTH(r):this.columnFilter&&(r=this.columnFilter.visibleRowHeadedColumnToSourceColumn(r));const s=this.wtSettings.getSetting("onModifyGetCoordsElement",i,r);return s&&Array.isArray(s)&&([i,r]=s),this.wot.createCellCoords(i,r)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let t=this.TBODY.childNodes.length;const e=this.wtSettings.getSetting("stylesHandler"),n=t*e.getDefaultRowHeight(),o=Oe(this.TBODY)-1,i=e.areCellsBorderBox(),r=i?Pe:Oe,s=i?0:1,a=i?1:0;let l,h,c,d,u;if(n!==o||this.wtSettings.getSetting("fixedRowsBottom"))for(;t;){t-=1,c=this.rowFilter.renderedToSource(t),l=this.getRowHeight(c),d=this.getTrForRow(c),u=d.querySelector("th");const n=0===c?a:0;h=u?r(u):r(d)-s,(!l&&e.getDefaultRowHeight()<h-n||l<h)&&(i||(h+=1),this.dataAccessObject.wtViewport.oversizedRows[c]=h)}}getTrForRow(t){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)]}isColumnHeaderRendered(t){if(t>=0)return!1;const e=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(t)<=e}isRowHeaderRendered(t){if(t>=0)return!1;const e=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(t)<=e}isRowBeforeRenderedRows(t){const e=this.getFirstRenderedRow();return t<0&&e<=0?!this.isRowHeaderRendered(t):t<e}isRowAfterRenderedRows(t){return t>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(t){const e=this.getFirstRenderedColumn();return t<0&&e<=0?!this.isColumnHeaderRendered(t):t<e}isColumnAfterRenderedColumns(t){return this.columnFilter&&t>this.getLastRenderedColumn()}isColumnAfterViewport(t){return this.columnFilter&&t>this.getLastVisibleColumn()}isRowAfterViewport(t){return this.rowFilter&&t>this.getLastVisibleRow()}isColumnBeforeViewport(t){return this.columnFilter&&this.columnFilter.sourceToRendered(t)<0&&t>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(t){return this.rowUtils.getHeight(t)}getColumnHeaderHeight(t){return this.columnUtils.getHeaderHeight(t)}getColumnWidth(t){return this.columnUtils.getWidth(t)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return Ae(this.TABLE)}getHeight(){return Pe(this.TABLE)}getTotalWidth(){const t=Ae(this.hider);return 0!==t?t:this.getWidth()}getTotalHeight(){const t=Pe(this.hider);return 0!==t?t:this.getHeight()}isVisible(){return Re(this.TABLE)}_modifyRowHeaderWidth(t){let e=Ze(t)?t():null;return Array.isArray(e)?(e=[...e],e[e.length-1]=this._correctRowHeaderWidth(e[e.length-1])):e=this._correctRowHeaderWidth(e),e}_correctRowHeaderWidth(t){let e=t;return"number"!=typeof t&&(e=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(e+=1),e}}const Mr={getFirstRenderedRow(){const t=this.getRenderedRowsCount();return 0===t?-1:this.wtSettings.getSetting("totalRows")-t},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return 0===this.getRenderedRowsCount()?-1:this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsBottom"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};Mt(Mr,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const Tr={getFirstRenderedColumn(){return 0===this.getRenderedColumnsCount()?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){return Math.min(this.wtSettings.getSetting("totalColumns"),this.wtSettings.getSetting("fixedColumnsStart"))},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Mt(Tr,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});class _r extends Er{constructor(t,e,n,o){super(t,e,n,o,Or)}}kt(_r,Mr),kt(_r,Tr);const Hr="top",Ir="bottom",Ar="inline_start",Pr="top_inline_start_corner",Or="bottom_inline_start_corner",Nr=[Hr,Ir,Ar,Pr,Or],Dr=new Map([[Hr,`ht_clone_${Hr}`],[Ir,`ht_clone_${Ir}`],[Ar,`ht_clone_${Ar} ht_clone_left`],[Pr,`ht_clone_${Pr} ht_clone_top_left_corner`],[Or,`ht_clone_${Or} ht_clone_bottom_left_corner`]]);function Lr(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function Vr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Br(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Fr=new WeakSet;class Wr{constructor(t){Lr(this,Fr),Vr(this,"dataAccessObject",void 0),this.dataAccessObject=t}scrollViewport(t,e,n){if(t.col<0||t.row<0)return!1;const o=this.scrollViewportHorizontally(t.col,e),i=this.scrollViewportVertically(t.row,n);return o||i}scrollViewportHorizontally(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:n,totalColumns:o}=this.dataAccessObject;if(!n)return!1;const i=At(e);if(t=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",t,i),!Number.isInteger(t)||t<0||t>o)return!1;e=i.value;const{fixedColumnsStart:r,inlineStartOverlay:s}=this.dataAccessObject,a="auto"===e;if(a&&t<r)return!1;const l=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(a&&(t<l||t>h)||!a)&&(c=s.scrollTo(t,a?t>=this.getLastPartiallyVisibleColumn():"end"===e)),c}scrollViewportVertically(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:n,totalRows:o}=this.dataAccessObject;if(!n)return!1;const i=At(e);if(t=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",t,i),!Number.isInteger(t)||t<0||t>o)return!1;e=i.value;const{fixedRowsBottom:r,fixedRowsTop:s,topOverlay:a}=this.dataAccessObject,l="auto"===e;if(l&&(t<s||t>o-r-1))return!1;const h=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let d=!1;return(l&&(t<h||t>c)||!l)&&(d=a.scrollTo(t,l?t>=this.getLastPartiallyVisibleRow():"bottom"===e)),d}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return Br(Fr,this,jr).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return Br(Fr,this,jr).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return Br(Fr,this,zr).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return Br(Fr,this,zr).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}function zr(t){const{wtSettings:e,inlineStartOverlay:n,wtTable:o,wtViewport:i,totalColumns:r,rootWindow:s}=this.dataAccessObject;if(n.mainTableScrollableElement===s){let a=null;if(e.getSetting("rtlMode")){const t=o.TABLE.getBoundingClientRect(),e=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(t.right-e)}else{a=ke(o.wtRootElement).left}const l=Math.abs(Te(s,s));if(a>l){const e=Ne(s);let o=i.getRowHeaderWidth();for(let i=1;i<=r;i++)if(o+=n.sumCellSizes(i-1,i),a+o-l>=e){t=i-2;break}}}return t}function jr(t){const{topOverlay:e,wtTable:n,wtViewport:o,totalRows:i,rootWindow:r}=this.dataAccessObject;if(e.mainTableScrollableElement===r){const s=ke(n.wtRootElement),a=Me(r,r);if(s.top>a){const n=Oe(r);let l=o.getColumnHeaderHeight();for(let o=1;o<=i;o++)if(l+=e.sumCellSizes(o-1,o),s.top+l-a>=n){t=o-2;break}}}return t}function $r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ur{get eventManager(){return new zn(this)}constructor(t,e){$r(this,"wtTable",void 0),$r(this,"wtScroll",void 0),$r(this,"wtViewport",void 0),$r(this,"wtOverlays",void 0),$r(this,"selectionManager",void 0),$r(this,"wtEvent",void 0),$r(this,"guid",`wt_${U()}`),$r(this,"drawInterrupted",!1),$r(this,"drawn",!1),$r(this,"activeOverlayName","master"),$r(this,"domBindings",void 0),$r(this,"wtSettings",void 0),this.domBindings={rootTable:t,rootDocument:t.ownerDocument,rootWindow:t.ownerDocument.defaultView},this.wtSettings=e,this.wtScroll=new Wr(this.createScrollDao())}findOriginalHeaders(){const t=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let e=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;e<n;e++)t.push(this.wtTable.THEAD.childNodes[0].childNodes[e].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(e,n){Se(n,t[e])}])}}createCellCoords(t,e){return new pi(t,e,this.wtSettings.getSetting("rtlMode"))}createCellRange(t,e,n){return new Ci(t,e,n,this.wtSettings.getSetting("rtlMode"))}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,!this.wtTable.isVisible()||function(t){const e=t.ownerDocument.defaultView;let n=t;for(;n.parentNode;){if("0px"===n.style.height||"0"===n.style.height){const t=e.getComputedStyle(n).getPropertyValue("overflow");return"hidden"===t||"clip"===t}n=n.parentNode}return!1}(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(t),this}getCell(t){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(t);const e=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),o=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsStart");if(t.row<n&&t.col<i)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(t);if(t.row<n)return this.wtOverlays.topOverlay.clone.wtTable.getCell(t);if(t.col<i&&t.row>=e-o){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(t)}else{if(t.col<i)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(t);if(t.row<e&&t.row>=e-o&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(t)}return this.wtTable.getCell(t)}scrollViewport(t,e,n){return this.wtScroll.scrollViewport(t,e,n)}scrollViewportHorizontally(t,e){return this.wtScroll.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this.wtScroll.scrollViewportVertically(t,e)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const t=this;return{get drawn(){return t.drawn},get topOverlay(){return t.wtOverlays.topOverlay},get inlineStartOverlay(){return t.wtOverlays.inlineStartOverlay},get wtTable(){return t.wtTable},get wtViewport(){return t.wtViewport},get wtSettings(){return t.wtSettings},get rootWindow(){return t.domBindings.rootWindow},get totalRows(){return t.wtSettings.getSetting("totalRows")},get totalColumns(){return t.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return t.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return t.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return t.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const t=this;return{get wot(){return t},get parentTableOffset(){return t.cloneSource.wtTable.tableOffset},get cloneSource(){return t.cloneSource},get workspaceWidth(){return t.wtViewport.getWorkspaceWidth()},get wtViewport(){return t.wtViewport},get wtOverlays(){return t.wtOverlays},get selectionManager(){return t.selectionManager},get drawn(){return t.drawn},set drawn(e){t.drawn=e},get wtTable(){return t.wtTable},get startColumnRendered(){return t.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return t.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return t.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return t.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return t.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return t.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return t.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return t.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return t.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return t.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return t.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return t.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return t.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return t.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return t.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return t.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return t.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return t.wtSettings.getSetting("rowHeaders")}}}}function Yr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Gr extends Ur{constructor(t,e,n){super(t,e),Yr(this,"cloneSource",void 0),Yr(this,"cloneOverlay",void 0);const o=this.wtSettings.getSetting("facade",this);this.cloneSource=n.source,this.cloneOverlay=n.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=n.viewport,this.selectionManager=n.selectionManager,this.wtEvent=new Di(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}function Kr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qr{constructor(t,e,n,o,i){Kr(this,"wtSettings",null),Mt(this,"wot",t,{writable:!1}),this.domBindings=i,this.facadeGetter=e,this.wtSettings=o;const{TABLE:r,hider:s,spreader:a,holder:l,wtRootElement:h}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=r,this.hider=s,this.spreader=a,this.holder=l,this.wtRootElement=h,this.trimmingContainer=He(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(t){"before"===t&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==t||this.shouldBeRendered()||(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=He(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:t}=this.wot,{rootWindow:e}=this.domBindings,n=e.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow");this.mainTableScrollableElement="hidden"===n||"clip"===n?this.wot.wtTable.holder:_e(t.TABLE)}getRelativeCellPosition(t,e,n){if(!1===this.clone.wtTable.holder.contains(t))return void Qt(`The provided element is not a child of the ${this.type} overlay`);const o=this.mainTableScrollableElement===this.domBindings.rootWindow,i=n<this.wtSettings.getSetting("fixedColumnsStart"),r=e<this.wtSettings.getSetting("fixedRowsTop"),s=e>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,l={start:this.getRelativeStartPosition(a),top:a.offsetTop},h={start:this.getRelativeStartPosition(t),top:t.offsetTop};let c=null;return c=o?this.getRelativeCellPositionWithinWindow(r,i,h,l):this.getRelativeCellPositionWithinHolder(r,s,i,h,l),c}getRelativeStartPosition(t){return this.isRtl()?t.offsetParent.offsetWidth-t.offsetLeft-t.offsetWidth:t.offsetLeft}getRelativeCellPositionWithinWindow(t,e,n,o){const i=this.wot.wtTable.wtRootElement.getBoundingClientRect();let r=0,s=0;if(e){let t=i.left;this.isRtl()&&(t=this.domBindings.rootWindow.innerWidth-(i.left+i.width+Fe())),r=t<=0?-1*t:0}else r=o.start;if(t){s=this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top}else s=o.top;return{start:n.start+r,top:n.top+s}}getRelativeCellPositionWithinHolder(t,e,n,o,i){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),s=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(n||(a=r-i.start),e){const t=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+t.top}else t||(l=s-i.top);return{start:o.start-a,top:o.top-l}}makeClone(){-1===Nr.indexOf(this.type)&&wt(`Clone type "${this.type}" is not supported.`);const{wtTable:t,wtSettings:e}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=n.createElement("div"),r=n.createElement("table"),s=t.wtRootElement.parentNode;i.className=`${Dr.get(this.type)} handsontable`,i.setAttribute("dir",this.isRtl()?"rtl":"ltr"),i.style.position="absolute",i.style.top=0,i.style.overflow="visible",this.isRtl()?i.style.right=0:i.style.left=0,e.getSetting("ariaTags")&&fe(i,[["role","presentation"]]),r.className=t.TABLE.className;t.TABLE.getAttribute("role")&&r.setAttribute("role",t.TABLE.getAttribute("role")),i.appendChild(r),s.appendChild(i);const a=this.wtSettings.getSetting("preventOverflow"),l=o.getComputedStyle(s).getPropertyValue("overflow");return!0===a||"horizontal"===a&&this.type===Hr||"vertical"===a&&this.type===Ar?this.mainTableScrollableElement=o:this.mainTableScrollableElement="hidden"===l||"clip"===l?t.holder:_e(t.TABLE),new Gr(r,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.needFullRender){const e=this.clone.cloneSource;e.activeOverlayName=this.clone.wtTable.name,this.clone.draw(t),e.activeOverlayName="master"}}reset(){const t=this.clone.wtTable.holder,e=this.clone.wtTable.hider;[t.style,e.style,t.parentNode.style].forEach(t=>{t.width="",t.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}class Xr extends qr{constructor(t,e,n,o,i,r){super(t,e,Or,n,o),this.bottomOverlay=i,this.inlineStartOverlay=r}createTable(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new _r(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:t}=this;if(this.updateTrimmingContainer(),!t.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(e.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset(),n=this.bottomOverlay.getOverlayOffset();e.style[this.isRtl()?"right":"left"]=`${t}px`,e.style.bottom=`${n}px`}else $e(e),this.repositionOverlay();let n=Pe(this.clone.wtTable.TABLE);const o=Ae(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(n=0),e.style.height=`${n}px`,e.style.width=`${o}px`,!1}repositionOverlay(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:n}=this.domBindings,o=this.clone.wtTable.holder.parentNode;let i=0;e.hasVerticalScroll()||(i+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(i+=Fe(n)),o.style.bottom=`${i}px`}}const Zr={getFirstRenderedColumn(){const t=this.dataAccessObject.startColumnRendered;return null===t?-1:t},getFirstVisibleColumn(){const t=this.dataAccessObject.startColumnVisible;return null===t?-1:t},getFirstPartiallyVisibleColumn(){const t=this.dataAccessObject.startColumnPartiallyVisible;return null===t?-1:t},getLastRenderedColumn(){const t=this.dataAccessObject.endColumnRendered;return null===t?-1:t},getLastVisibleColumn(){const t=this.dataAccessObject.endColumnVisible;return null===t?-1:t},getLastPartiallyVisibleColumn(){const t=this.dataAccessObject.endColumnPartiallyVisible;return null===t?-1:t},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Mt(Zr,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});class Jr extends Er{constructor(t,e,n,o){super(t,e,n,o,Ir)}}function Qr(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(Jr,Mr),kt(Jr,Zr);class ts extends qr{constructor(t,e,n,o){super(t,e,Ir,n,o),Qr(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Jr(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,e=this.clone.wtTable.holder.parentNode;e.style.top="";let n=0;const o=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==t||o&&"vertical"===o?(n=this.getScrollPosition(),this.repositionOverlay()):(n=this.getOverlayOffset(),e.style.bottom=`${n}px`);const i=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:n}=this.domBindings,o=this.clone.wtTable.holder.parentNode;let i=0;e.hasVerticalScroll()||(i+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(i+=Fe(n)),o.style.bottom=`${i}px`}setScrollPosition(t){const{rootWindow:e}=this.domBindings,n=this.mainTableScrollableElement;let o=!1;if(n===e&&t!==e.scrollY){const t=e.scrollY;e.scrollTo(Ee(e),top),o=t!==e.scrollY}else if(t!==n.scrollTop){const e=n.scrollTop;n.scrollTop=t,o=e!==n.scrollTop}return o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){const{wtTable:n,wtSettings:o}=this.wot,i=o.getSetting("stylesHandler").getDefaultRowHeight();let r=t,s=0;for(;r<e;){const t=n.getRowHeight(r);s+=void 0===t?i:t,r+=1}return s}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,r=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===r){let o=e.getWorkspaceWidth();e.hasVerticalScroll()&&(o-=Fe(n)),o=Math.min(o,t.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let s=Pe(this.clone.wtTable.TABLE);t.hasDefinedSize()||(s=0),i.height=`${s}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,t.style.width=t.parentNode.style.width,t.style.height=t.parentNode.style.height}applyToDOM(){const t=this.wtSettings.getSetting("totalRows");"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:0===t?this.spreader.style.top="0":wt("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?e.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:e.style[t]=""}scrollTo(t,e){let n=this.getTableParentOffset();const o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let i=0;e&&o.offsetHeight!==o.clientHeight&&(i=Fe(this.domBindings.rootDocument)),e?(n+=this.sumCellSizes(0,t+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),t),n+=i,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Me(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)){const t=this.wot.wtTable.getTotalHeight(),e=t-this.clone.wtTable.getTotalHeight(),o=this.domBindings.rootDocument.documentElement.clientHeight;n=Math.max(this.getTableParentOffset()-this.getScrollPosition()-o+t,0),n>e&&(n=0)}return n}adjustHeaderBordersPosition(t){const e=this.wtSettings.getSetting("fixedRowsBottom"),n=this.cachedFixedRowsBottom!==e,o=this.wtSettings.getSetting("columnHeaders");let i=!1;if((n||0===e)&&o.length>0){const e=this.wot.wtTable.holder.parentNode,n=de(e,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),t||0===this.wtSettings.getSetting("totalRows")?(ue(e,"innerBorderBottom"),i=!n):(ge(e,"innerBorderBottom"),i=n)}return i}}const es={getFirstRenderedRow(){const t=this.dataAccessObject.startRowRendered;return null===t?-1:t},getFirstVisibleRow(){const t=this.dataAccessObject.startRowVisible;return null===t?-1:t},getFirstPartiallyVisibleRow(){const t=this.dataAccessObject.startRowPartiallyVisible;return null===t?-1:t},getLastRenderedRow(){const t=this.dataAccessObject.endRowRendered;return null===t?-1:t},getLastVisibleRow(){const t=this.dataAccessObject.endRowVisible;return null===t?-1:t},getLastPartiallyVisibleRow(){const t=this.dataAccessObject.endRowPartiallyVisible;return null===t?-1:t},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Mt(es,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});class ns extends Er{constructor(t,e,n,o){super(t,e,n,o,Ar)}}kt(ns,es),kt(ns,Tr);const os={_localHooks:Object.create(null),addLocalHook(t,e){return this._localHooks[t]||(this._localHooks[t]=[]),this._localHooks[t].push(e),this},removeLocalHook(t,e){if(this._localHooks[t]){const n=this._localHooks[t].indexOf(e);n>-1&&this._localHooks[t].splice(n,1)}return this},runLocalHooks(t,e,n,o,i,r,s){if(this._localHooks[t]){const a=this._localHooks[t].length;for(let l=0;l<a;l++)tn(this._localHooks[t][l],this,e,n,o,i,r,s)}},clearLocalHooks(){return this._localHooks={},this}};Mt(os,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});let is=class{constructor(t,e){this.settings=t,this.cellRange=e||null}isEmpty(){return null===this.cellRange}add(t){return this.isEmpty()?this.cellRange=this.settings.createCellRange(t):this.cellRange.expand(t),this}replace(t,e){if(!this.isEmpty()){if(this.cellRange.from.isEqual(t))return this.cellRange.from=e,!0;if(this.cellRange.to.isEqual(t))return this.cellRange.to=e,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const t=this.cellRange.getOuterTopStartCorner(),e=this.cellRange.getOuterBottomEndCorner();return[t.row,t.col,e.row,e.col]}destroy(){this.runLocalHooks("destroy")}};kt(is,os);const rs="active-header",ss="header",as="area",ls="focus",hs=t=>{const e=t.wtSettings.getSetting("stylesHandler"),n=e.getCSSVariableValue("cell-autofill-size"),o=e.getCSSVariableValue("cell-autofill-border-width"),i=e.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:n,height:n,borderWidth:o,borderStyle:"solid",borderColor:i})};function cs(t,e,n){ds(t,e),e.set(t,n)}function ds(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function us(t,e){return t.get(fs(t,e))}function gs(t,e,n){return t.set(fs(t,e),n),n}function fs(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var ps=new WeakMap,ms=new WeakMap,bs=new WeakSet;class ws{constructor(){var t,e;ds(t=this,e=bs),e.add(t),cs(this,ps,void 0),cs(this,ms,void 0)}setActiveOverlay(t){return gs(ms,this,t),this}setActiveSelection(t){return gs(ps,this,t),this}scan(){const t=us(ps,this).settings.selectionType,e=new Set;return"active-header"===t?(this.scanColumnsInHeadersRange(t=>e.add(t)),this.scanRowsInHeadersRange(t=>e.add(t))):"area"===t?this.scanCellsRange(t=>e.add(t)):"focus"===t?(this.scanColumnsInHeadersRange(t=>e.add(t)),this.scanRowsInHeadersRange(t=>e.add(t)),this.scanCellsRange(t=>e.add(t))):"fill"===t?this.scanCellsRange(t=>e.add(t)):"header"===t?(this.scanColumnsInHeadersRange(t=>e.add(t)),this.scanRowsInHeadersRange(t=>e.add(t))):"row"===t?(this.scanRowsInHeadersRange(t=>e.add(t)),this.scanRowsInCellsRange(t=>e.add(t))):"column"===t&&(this.scanColumnsInHeadersRange(t=>e.add(t)),this.scanColumnsInCellsRange(t=>e.add(t))),e}scanColumnsInHeadersRange(t){const[e,n,o,i]=us(ps,this).getCorners(),{wtTable:r}=us(ms,this),s=r.getRenderedColumnsCount(),a=r.getColumnHeadersCount();let l=0;for(let h=-r.getRowHeadersCount();h<s;h++){const s=r.columnFilter.renderedToSource(h);if(!(s<n||s>i)){for(let h=-a;h<0;h++){if(h<e||h>o)continue;const c=h+a;let d=r.getColumnHeader(s,c);const u=us(ms,this).getSetting("onBeforeHighlightingColumnHeader",s,c,{selectionType:us(ps,this).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==u&&(u!==s&&(d=r.getColumnHeader(u,c)),t(d))}l+=1}}}scanRowsInHeadersRange(t){const[e,n,o,i]=us(ps,this).getCorners(),{wtTable:r}=us(ms,this),s=r.getRenderedRowsCount(),a=r.getRowHeadersCount();let l=0;for(let h=-r.getColumnHeadersCount();h<s;h++){const s=r.rowFilter.renderedToSource(h);if(!(s<e||s>o)){for(let h=-a;h<0;h++){if(h<n||h>i)continue;const c=h+a;let d=r.getRowHeader(s,c);const u=us(ms,this).getSetting("onBeforeHighlightingRowHeader",s,c,{selectionType:us(ps,this).settings.selectionType,rowCursor:l,selectionHeight:o-e+1});null!==u&&(u!==s&&(d=r.getRowHeader(u,c)),t(d))}l+=1}}}scanCellsRange(t){const{wtTable:e}=us(ms,this);fs(bs,this,vs).call(this,(n,o)=>{const i=e.getCell(us(ms,this).createCellCoords(n,o)),r=us(ms,this).getSetting("onAfterDrawSelection",n,o,us(ps,this).settings.layerLevel);"string"==typeof r&&ue(i,r),t(i)})}scanRowsInCellsRange(t){const[e,,n]=us(ps,this).getCorners(),{wtTable:o}=us(ms,this);fs(bs,this,ys).call(this,(i,r)=>{if(i>=e&&i<=n){const e=o.getCell(us(ms,this).createCellCoords(i,r));t(e)}})}scanColumnsInCellsRange(t){const[,e,,n]=us(ps,this).getCorners(),{wtTable:o}=us(ms,this);fs(bs,this,ys).call(this,(i,r)=>{if(r>=e&&r<=n){const e=o.getCell(us(ms,this).createCellCoords(i,r));t(e)}})}}function vs(t){let[e,n,o,i]=us(ps,this).getCorners();if(e<0&&o<0||n<0&&i<0)return;const{wtTable:r}=us(ms,this),s=e!==o||n!==i;if(n=Math.max(n,0),i=Math.max(i,0),e=Math.max(e,0),o=Math.max(o,0),s){if(n=Math.max(n,r.getFirstRenderedColumn()),i=Math.min(i,r.getLastRenderedColumn()),e=Math.max(e,r.getFirstRenderedRow()),o=Math.min(o,r.getLastRenderedRow()),i<n||o<e)return}else{if(!Xe(r.getCell(us(ms,this).createCellCoords(e,n))))return}for(let r=e;r<=o;r+=1)for(let e=n;e<=i;e+=1)t(r,e)}function ys(t){const{wtTable:e}=us(ms,this),n=e.getRenderedRowsCount(),o=e.getRenderedColumnsCount();for(let i=0;i<n;i+=1){const n=e.rowFilter.renderedToSource(i);for(let i=0;i<o;i+=1)t(n,e.columnFilter.renderedToSource(i))}}const Cs="ht-border-style-";class Ss{constructor(t,e){e&&(this.eventManager=t.eventManager,this.instance=t,this.wot=t,this.settings=e,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=hs(this.instance),this.cornerCenterPointOffset=-Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(e),this.registerListeners())}registerListeners(){const t=this.wot.rootDocument.body;this.eventManager.addEventListener(t,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(t,"mouseup",()=>this.onMouseUp());for(let t=0,e=this.main.childNodes.length;t<e;t++){const e=this.main.childNodes[t];this.eventManager.addEventListener(e,"mouseenter",e=>this.onMouseEnter(e,this.main.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(t,e){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;t.preventDefault(),an(t);const n=this,o=this.wot.rootDocument.body,i=e.getBoundingClientRect();e.style.display="none",this.eventManager.addEventListener(o,"mousemove",function t(r){var s;((s=r).clientY<Math.floor(i.top)||s.clientY>Math.ceil(i.top+i.height)||s.clientX<Math.floor(i.left)||s.clientX>Math.ceil(i.left+i.width))&&(n.eventManager.removeEventListener(o,"mousemove",t),e.style.display="block")})}createBorders(t){const{rootDocument:e}=this.wot;this.main=e.createElement("div");const n=["top","start","bottom","end","corner"];let o=this.main.style;o.position="absolute",o.top=0,o.left=0;for(let i=0;i<5;i++){const r=n[i],s=e.createElement("div"),a=e=>this.settings[r]&&this.settings[r][e]?this.settings[r][e]:t.border[e];s.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(s.className+=" hidden"),o=s.style;const l=a("style");l?(["start","end"].includes(r)?s.className+=` ${Cs}${l}-vertical`:s.className+=` ${Cs}${l}-horizontal`,o.setProperty("--ht-custom-border-size",`${a("width")}px`),o.setProperty("--ht-custom-border-color",a("color"))):o.backgroundColor=a("color"),o.height=`${a("width")}px`,o.width=`${a("width")}px`,this.main.appendChild(s)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=`${this.cornerDefaultStyle.width}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Gt()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let r=i.bordersHolder;r||(r=e.createElement("div"),r.className="htBorders",i.bordersHolder=r,i.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:t}=this.wot;this.selectionHandles={top:t.createElement("DIV"),topHitArea:t.createElement("DIV"),bottom:t.createElement("DIV"),bottomHitArea:t.createElement("DIV")},this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};Tt({position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`},(t,e)=>{this.selectionHandles.styles.bottomHitArea[e]=t,this.selectionHandles.styles.topHitArea[e]=t}),this.updateMultipleSelectorHandlesStyles(),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}updateMultipleSelectorHandlesStyles(){if(!this.selectionHandles)return;const t=this.wot.wtSettings.getSetting("stylesHandler"),e=t.getCSSVariableValue("cell-mobile-handle-size");Tt({position:"absolute",height:`${e}px`,width:`${e}px`,"border-radius":`${t.getCSSVariableValue("cell-mobile-handle-border-radius")}px`,background:`color-mix(in srgb, ${t.getCSSVariableValue("cell-mobile-handle-background-color")} ${t.getCSSVariableValue("cell-mobile-handle-background-opacity")}%, transparent)`,border:`${t.getCSSVariableValue("cell-mobile-handle-border-width")}px solid ${t.getCSSVariableValue("cell-mobile-handle-border-color")}`},(t,e)=>{this.selectionHandles.styles.bottom[e]=t,this.selectionHandles.styles.top[e]=t})}isPartRange(t,e){const n=this.wot.selectionManager.getAreaSelection();return!(!n.cellRange||t===n.cellRange.to.row&&e===n.cellRange.to.col)}updateMultipleSelectionHandlesPosition(t,e,n,o,i,r){const s=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(a.borderWidth,10),u=parseInt(a.width,10),g=parseInt(l.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();a.top=`${parseInt(n-u-1,10)}px`,a[s]=`${parseInt(o-u-1,10)}px`,l.top=`${parseInt(n-g/4*3,10)}px`,l[s]=`${parseInt(o-g/4*3,10)}px`;const m=Math.min(parseInt(o+i,10),f-u-2*d),b=Math.min(parseInt(o+i-g/4,10),f-g-2*d);h[s]=`${m}px`,c[s]=`${b}px`;const w=Math.min(parseInt(n+r,10),p-u-2*d),v=Math.min(parseInt(n+r-g/4,10),p-g-2*d);h.top=`${w}px`,c.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(t,e)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(a.display="none",h.display="none",l.display="none",c.display="none"),t===this.wot.wtSettings.getSetting("fixedRowsTop")||e===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(t){if(this.disabled)return;let[e,n,o,i]=t;if(e<0&&o<0||n<0&&i<0)return void this.disappear();const{wtTable:r,rootDocument:s,rootWindow:a}=this.wot,l=e!==o||n!==i,h=r.getFirstRenderedRow(),c=r.getLastRenderedRow(),d=r.getFirstRenderedColumn(),u=r.getLastRenderedColumn();if(d<0&&u<0||h<0&&c<0)return void this.disappear();let g;if(l){if(n=Math.max(n,d),i=Math.min(i,u),e=Math.max(e,h),o=Math.min(o,c),i<n||o<e)return void this.disappear();g=r.getCell(this.wot.createCellCoords(e,n))}else if(g=r.getCell(this.wot.createCellCoords(e,n)),!Xe(g))return void this.disappear();const f=l?r.getCell(this.wot.createCellCoords(o,i)):g,p=ke(g),m=l?ke(f):p,b=ke(r.TABLE),w=p.top,v=p.left,y=this.wot.wtSettings.getSetting("rtlMode");let C=0,S=0;if(y){const t=Ae(r.TABLE),e=Ae(g),n=a.innerWidth-b.left-t;S=v+e-m.left,C=a.innerWidth-v-e-n-1}else S=m.left+Ae(f)-v,C=v-b.left-1;if(this.isEntireColumnSelected(e,o)){const t=e,o=this.getDimensionsFromHeader("columns",n,i,t,b);let r=null;o&&([r,C,S]=o),r&&(g=r)}let R=w-b.top-1,k=m.top+Pe(f)-w;if(this.isEntireRowSelected(n,i)){const t=n,i=this.getDimensionsFromHeader("rows",e,o,t,b);let r=null;i&&([r,R,k]=i),r&&(g=r)}const x=a.getComputedStyle(g);parseInt(x.borderTopWidth,10)>0&&(R+=1,k=k>0?k-1:0),parseInt(x[y?"borderRightWidth":"borderLeftWidth"],10)>0&&(C+=1,S=S>0?S-1:0);const E=y?"right":"left",M=Math.ceil(this.settings.border.width/2);this.topStyle.top=`${R}px`,this.topStyle[E]=`${C}px`,this.topStyle.width=`${S+M}px`,this.topStyle.display="block",this.startStyle.top=`${R}px`,this.startStyle[E]=`${C}px`,this.startStyle.height=`${k+M}px`,this.startStyle.display="block",this.bottomStyle.top=`${R+k-parseInt(this.bottomStyle.height,10)+M}px`,this.bottomStyle[E]=`${C}px`,this.bottomStyle.width=`${S+M}px`,this.bottomStyle.display="block",this.endStyle.top=`${R}px`,this.endStyle[E]=`${C+S-parseInt(this.endStyle.width,10)+M}px`,this.endStyle.height=`${k+M}px`,this.endStyle.display="block";let T=this.settings.border.cornerVisible;T="function"==typeof T?T(this.settings.layerLevel):T;const _=this.wot.getSetting("onModifyGetCellCoords",o,i,!1,"render");let[H,I]=[o,i];if(_&&Array.isArray(_)&&([,,H,I]=_),Gt()||!T||this.isPartRange(H,I))this.cornerStyle.display="none";else{this.cornerStyle.top=R+k+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[E]=C+S+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let t=He(r.TABLE);const e=t===a;e&&(t=s.documentElement);const n=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,l=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),h=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(i===this.wot.getSetting("totalColumns")-1){const o=e?f.getBoundingClientRect().left:f.offsetLeft;let i=!1,r=0;if(y?(r=o-parseInt(this.cornerDefaultStyle.width,10)/2,i=r<0):(r=o+Ae(f)+parseInt(this.cornerDefaultStyle.width,10)/2,i=r>=Ne(t)),i){const t=Math.floor(C+S+this.cornerCenterPointOffset-l-n);ue(this.corner,"wtCornerInlineEndEdge"),this.cornerStyle[E]=t-1+"px"}}else ge(this.corner,"wtCornerInlineEndEdge");if(o===this.wot.getSetting("totalRows")-1){if((e?f.getBoundingClientRect().top:f.offsetTop)+Pe(f)+parseInt(this.cornerDefaultStyle.height,10)/2>=Oe(t)){const t=Math.floor(R+k+this.cornerCenterPointOffset-h-n);ue(this.corner,"wtCornerBlockEndEdge"),this.cornerStyle.top=t-1+"px"}}else ge(this.corner,"wtCornerBlockEndEdge");this.cornerStyle.display="block"}Gt()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(o,i,R,C,S,k)}isEntireColumnSelected(t,e){return t===this.wot.wtTable.getFirstRenderedRow()&&e===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(t,e){return t===this.wot.wtTable.getFirstRenderedColumn()&&e===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(t,e,n,o,i){const{wtTable:r}=this.wot,s=r.wtRootElement.parentNode;let a=null,l=null,h=null,c=null,d=null,u=null,g=null,f=null;switch(t){case"rows":a=function(){return r.getRowHeader(...arguments)},l=function(){return Pe(...arguments)},h="ht__selection--rows",u="top";break;case"columns":a=function(){return r.getColumnHeader(...arguments)},l=function(){return Ae(...arguments)},h="ht__selection--columns",u="left"}if(s.classList.contains(h)){const t=this.wot.getSetting("columnHeaders").length;if(g=a(e,t-o),f=a(n,t-o),!g||!f)return!1;const r=ke(g),s=ke(f);return g&&f&&(c=r[u]-i[u]-1,d=s[u]+l(f)-r[u]),[g,c,d]}return!1}changeBorderStyle(t,e){const n=this[t].style,o=e[t];!o||o.hide?ue(this[t],"hidden"):(de(this[t],"hidden")&&ge(this[t],"hidden"),n.backgroundColor=o.color,"top"!==t&&"bottom"!==t||(n.height=`${o.width}px`),"start"!==t&&"end"!==t||(n.width=`${o.width}px`))}changeBorderToDefaultStyle(t){const e=1,n="#000",o=this[t].style;o.backgroundColor=n,o.width=`${e}px`,o.height=`${e}px`}toggleHiddenClass(t,e){this.changeBorderToDefaultStyle(t),e?ue(this[t],"hidden"):ge(this[t],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",Gt()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}function Rs(t,e,n){ks(t,e),e.set(t,n)}function ks(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xs(t,e){return t.get(Ms(t,e))}function Es(t,e,n){return t.set(Ms(t,e),n),n}function Ms(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Ts=new WeakMap,_s=new WeakMap,Hs=new WeakMap,Is=new WeakMap,As=new WeakMap,Ps=new WeakMap,Os=new WeakSet;class Ns{constructor(t){var e,n;ks(e=this,n=Os),n.add(e),Rs(this,Ts,void 0),Rs(this,_s,void 0),Rs(this,Hs,new ws),Rs(this,Is,new WeakMap),Rs(this,As,new WeakSet),Rs(this,Ps,new Map),Es(_s,this,t)}setActiveOverlay(t){return Es(Ts,this,t),xs(Hs,this).setActiveOverlay(xs(Ts,this)),xs(Is,this).has(xs(Ts,this))||xs(Is,this).set(xs(Ts,this),new Set),this}getFocusSelection(){return null!==xs(_s,this)?xs(_s,this).getFocus():null}getAreaSelection(){return null!==xs(_s,this)?xs(_s,this).createLayeredArea():null}getBorderInstance(t){if(!t.settings.border)return null;if(xs(Ps,this).has(t)){const e=xs(Ps,this).get(t);if(e.has(xs(Ts,this)))return e.get(xs(Ts,this));const n=new Ss(xs(Ts,this),t.settings);return e.set(xs(Ts,this),n),n}const e=new Ss(xs(Ts,this),t.settings);return xs(Ps,this).set(t,new Map([[xs(Ts,this),e]])),e}getBorderInstances(t){var e,n;return Array.from(null!==(e=null===(n=xs(Ps,this).get(t))||void 0===n?void 0:n.values())&&void 0!==e?e:[])}destroyBorders(t){xs(Ps,this).get(t).forEach(t=>t.destroy()),xs(Ps,this).delete(t)}refreshAllBorderHandleStyles(){xs(Ps,this).forEach(t=>{t.forEach(t=>{var e;null===(e=t.updateMultipleSelectorHandlesStyles)||void 0===e||e.call(t)})})}render(t){if(null===xs(_s,this))return;t&&Ms(Os,this,Ds).call(this);const e=Array.from(xs(_s,this)),n=new Map,o=new Map;for(let t=0;t<e.length;t++){const i=e[t],{className:r,headerAttributes:s,createLayers:a,selectionType:l}=i.settings;xs(As,this).has(i)||(xs(As,this).add(i),i.addLocalHook("destroy",()=>this.destroyBorders(i)));const h=this.getBorderInstance(i);if(i.isEmpty()){null==h||h.disappear();continue}if(r){xs(Hs,this).setActiveSelection(i).scan().forEach(t=>{if(n.has(t)){const e=n.get(t);e.has(r)&&!0===a?e.set(r,e.get(r)+1):e.set(r,1)}else n.set(t,new Map([[r,1]]));s&&(o.has(t)||o.set(t,[]),"TH"===t.nodeName&&o.get(t).push(...s))})}const c=i.getCorners();xs(Ts,this).getSetting("onBeforeDrawBorders",c,l),null==h||h.appear(c)}n.forEach((t,e)=>{var n;const o=Array.from(t).map(t=>{let[e,n]=t;return 1===n?e:[e,...Array.from({length:n-1},(t,n)=>`${e}-${n+1}`)]}).flat();o.forEach(t=>xs(Is,this).get(xs(Ts,this)).add(t)),ue(e,o),"TD"===e.nodeName&&Array.isArray(null===(n=xs(_s,this).options)||void 0===n?void 0:n.cellAttributes)&&fe(e,xs(_s,this).options.cellAttributes)}),Array.from(o.keys()).forEach(t=>{fe(t,[...o.get(t)])})}}function Ds(){const t=xs(Is,this).get(xs(Ts,this)),e=xs(Ts,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(e))for(let n=0;n<e.length;n++)t.add(e[n]);t.forEach(t=>{var e,n;const o=xs(Ts,this).wtTable.TABLE.querySelectorAll(`.${t}`);let i=[];Array.isArray(null===(e=xs(_s,this).options)||void 0===e?void 0:e.cellAttributes)&&(i=xs(_s,this).options.cellAttributes.map(t=>t[0])),Array.isArray(null===(n=xs(_s,this).options)||void 0===n?void 0:n.headerAttributes)&&(i=[...i,...xs(_s,this).options.headerAttributes.map(t=>t[0])]);for(let e=0,n=o.length;e<n;e++)ge(o[e],t),pe(o[e],i)}),t.clear()}class Ls extends qr{constructor(t,e,n,o){super(t,e,Ar,n,o)}createTable(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new ns(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:t}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!t.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,n=this.clone.wtTable.holder.parentNode,o=this.wtSettings.getSetting("preventOverflow");let i=0;this.trimmingContainer!==e||o&&"horizontal"===o?(i=this.getScrollPosition(),$e(n)):(i=this.getOverlayOffset()*(this.isRtl()?-1:1),je(n,`${i}px`,"0px"));const r=this.adjustHeaderBordersPosition(i);return this.adjustElementsSize(),r}setScrollPosition(t){const{rootWindow:e}=this.domBindings;let n=!1;this.isRtl()&&(t=-t);const o=this.mainTableScrollableElement;if(o===e&&t!==e.scrollX){const o=e.scrollX;e.scrollTo(t,xe(e)),n=o!==e.scrollX}else if(t!==o.scrollLeft){const e=o.scrollLeft;o.scrollLeft=t,n=e!==o.scrollLeft}return n}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(t,e){const n=this.wtSettings.getSetting("defaultColumnWidth");let o=t,i=0;for(;o<e;)i+=this.wot.wtTable.getColumnWidth(o)||n,o+=1;return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,r=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===r){let o=e.getWorkspaceHeight();e.hasHorizontalScroll()&&(o-=Fe(n)),o=Math.min(o,t.wtRootElement.scrollHeight),i.height=`${o}px`}else i.height="";this.clone.wtTable.holder.style.height=i.height;const s=Ae(this.clone.wtTable.TABLE);i.width=`${s}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=hs(this.wot),n=this.wot.selectionManager.getFocusSelection()?parseInt(e.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,t.style.height=t.parentNode.style.height,t.style.width=`${parseInt(t.parentNode.style.width,10)+n}px`}applyToDOM(){const t=this.wtSettings.getSetting("totalColumns"),e=this.isRtl()?"right":"left";"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?this.spreader.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:0===t?this.spreader.style[e]="0":wt("Incorrect value of the columnsRenderCalculator"),this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(t,e){const{wtSettings:n}=this,o=n.getSetting("rowHeaders"),i=n.getSetting("fixedColumnsStart"),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,s=0===i&&o.length>0&&!de(r.parentNode,"innerBorderInlineStart")?1:0;let a=this.getTableParentOffset(),l=0;if(e){this.wot.wtTable.getColumnWidth(t)>this.wot.wtViewport.getViewportWidth()&&(e=!1)}var h;return e&&r.offsetWidth!==r.clientWidth&&(l=Fe(this.domBindings.rootDocument)),e?(a+=this.sumCellSizes(0,t+1),a-=this.wot.wtViewport.getViewportWidth(),a+=s):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),t),a+=l,(h=this.mainTableScrollableElement).scrollWidth-h.clientWidth===a-s&&s>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(s),this.setScrollPosition(a)}getTableParentOffset(){let t=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs(Te(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===t&&(!e||"horizontal"!==e)){n=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);n>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(n=0)}return n}adjustHeaderBordersPosition(t){const{wtSettings:e}=this,n=this.wot.wtTable.holder.parentNode,o=e.getSetting("rowHeaders"),i=e.getSetting("fixedColumnsStart"),r=e.getSetting("totalRows"),s="vertical"===e.getSetting("preventOverflow");r?ge(n,"emptyRows"):ue(n,"emptyRows");let a=!1;if(!s)if(i&&!o.length)ue(n,"innerBorderLeft innerBorderInlineStart");else if(!i&&o.length){const e=de(n,"innerBorderInlineStart");t?(ue(n,"innerBorderLeft innerBorderInlineStart"),a=!e):(ge(n,"innerBorderLeft innerBorderInlineStart"),a=e)}return a}}const Vs={getFirstRenderedRow(){return 0===this.getRenderedRowsCount()?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsTop"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Mt(Vs,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});class Bs extends Er{constructor(t,e,n,o){super(t,e,n,o,Pr)}}function Fs(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(Bs,Vs),kt(Bs,Tr);class Ws extends qr{constructor(t,e,n,o,i,r){super(t,e,Pr,n,o),Fs(this,"topOverlay",void 0),Fs(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=r}createTable(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new Bs(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){je(t,`${this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1)}px`,`${this.topOverlay.getOverlayOffset()}px`)}else $e(t);let e=Pe(this.clone.wtTable.TABLE);const n=Ae(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(e=0),t.style.height=`${e}px`,t.style.width=`${n}px`,!1}}class zs extends Er{constructor(t,e,n,o){super(t,e,n,o,Hr)}}function js(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(zs,Vs),kt(zs,Zr);class $s extends qr{constructor(t,e,n,o){super(t,e,Hr,n,o),js(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return new zs(...e)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode,{rootWindow:e}=this.domBindings,n=this.wtSettings.getSetting("preventOverflow");let o=0,i=!1;if(this.trimmingContainer!==e||n&&"vertical"===n)o=this.getScrollPosition(),$e(t);else{const{wtTable:e}=this.wot,n=e.hider.getBoundingClientRect();i=Math.ceil(n.bottom)===t.offsetHeight,o=this.getOverlayOffset(),je(t,"0px",`${o}px`)}const r=this.adjustHeaderBordersPosition(o,i);return this.adjustElementsSize(),r}setScrollPosition(t){const{rootWindow:e}=this.domBindings,n=this.mainTableScrollableElement;let o=!1;if(n===e&&t!==e.scrollY){const n=e.scrollY;e.scrollTo(Ee(e),t),o=n!==e.scrollY}else if(t!==n.scrollTop){const e=n.scrollTop;n.scrollTop=t,o=e!==n.scrollTop}return o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){const n=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight();let o=t,i=0;for(;o<e;){const t=this.wot.wtTable.getRowHeight(o);i+=void 0===t?n:t,o+=1}return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:t,wtViewport:e}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,r=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===r){let o=e.getWorkspaceWidth();e.hasVerticalScroll()&&(o-=Fe(n)),o=Math.min(o,t.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let s=Pe(this.clone.wtTable.TABLE);t.hasDefinedSize()||(s=0),i.height=`${s}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=hs(this.wot),n=this.wot.selectionManager.getFocusSelection()?parseInt(e.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,t.style.width=t.parentNode.style.width,t.style.height=`${parseInt(t.parentNode.style.height,10)+n}px`}applyToDOM(){const t=this.wtSettings.getSetting("totalRows");"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:0===t?this.spreader.style.top="0":wt("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?e.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:e.style[t]=""}scrollTo(t,e){const{wot:n,wtSettings:o}=this,i=(n.cloneSource?n.cloneSource:n).wtTable.holder,r=o.getSetting("columnHeaders"),s=0===o.getSetting("fixedRowsTop")&&r.length>0&&!de(i.parentNode,"innerBorderTop")?1:0;let a=this.getTableParentOffset(),l=0;if(e){this.wot.wtTable.getRowHeight(t)>this.wot.wtViewport.getViewportHeight()&&(e=!1)}if(e&&i.offsetHeight!==i.clientHeight&&(l=Fe(this.domBindings.rootDocument)),e){const e=o.getSetting("fixedRowsBottom"),i=o.getSetting("totalRows");a+=this.sumCellSizes(0,t+1),a-=n.wtViewport.getViewportHeight()-this.sumCellSizes(i-e,i),a+=1,a+=s}else a+=this.sumCellSizes(o.getSetting("fixedRowsTop"),t);var h;return a+=l,(h=this.mainTableScrollableElement).scrollHeight-h.clientHeight===a-s&&s>0&&this.wot.wtOverlays.expandHiderVerticallyBy(s),this.setScrollPosition(a)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Me(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.domBindings,e=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)){const t=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();n=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),n>t&&(n=0)}return n}adjustHeaderBordersPosition(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:n}=this,o=this.wot.wtTable.holder.parentNode,i=n.getSetting("totalColumns"),r="horizontal"===n.getSetting("preventOverflow");i?ge(o,"emptyColumns"):ue(o,"emptyColumns");let s=!1;if(!e&&!r){const e=n.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==e,r=n.getSetting("columnHeaders");if((i||0===e)&&r.length>0){const e=de(o,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),t||0===n.getSetting("totalRows")?(ue(o,"innerBorderTop"),s=!e):(ge(o,"innerBorderTop"),s=e)}}return s}}function Us(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Ys(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gs(t,e,n){return t.set(qs(t,e),n),n}function Ks(t,e){return t.get(qs(t,e))}function qs(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Xs=new WeakMap,Zs=new WeakMap,Js=new WeakMap,Qs=new WeakMap;class ta{constructor(t,e,n,o,i,r){Ys(this,"wot",null),Us(this,Xs,[]),Ys(this,"topOverlay",null),Ys(this,"bottomOverlay",null),Ys(this,"inlineStartOverlay",null),Ys(this,"topInlineStartCornerOverlay",null),Ys(this,"bottomInlineStartCornerOverlay",null),Ys(this,"browserLineHeight",void 0),Ys(this,"wtSettings",null),Us(this,Zs,!1),Us(this,Js,0),Us(this,Qs,null),Ys(this,"resizeObserver",new ResizeObserver(t=>{Lt(()=>{Array.isArray(t)&&t.length&&(Gs(Js,this,Ks(Js,this)+1),300===Ks(Js,this)&&(Qt("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),null!==Ks(Qs,this)&&clearTimeout(Ks(Qs,this)),Gs(Qs,this,setTimeout(()=>{Gs(Js,this,0)},100)),this.wtSettings.getSetting("onContainerElementResize"))})})),this.wot=t,this.wtSettings=o,this.domBindings=n,this.facadeGetter=e,this.wtTable=r;const{rootDocument:s,rootWindow:a}=this.domBindings;this.instance=this.wot,this.eventManager=i,this.scrollbarSize=Fe(s);const l=a.getComputedStyle(r.wtRootElement.parentNode).getPropertyValue("overflow"),h="hidden"===l||"clip"===l;this.scrollableElement=h?r.holder:_e(r.TABLE),this.initOverlays(),this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=a.scrollX,this.lastScrollY=a.scrollY}getOverlays(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=[...Ks(Xs,this)];return t&&e.push(this.wtTable),e}initBrowserLineHeight(){const{rootWindow:t,rootDocument:e}=this.domBindings,n=t.getComputedStyle(e.body),o=parseInt(n.lineHeight,10),i=1.2*parseInt(n.fontSize,10);this.browserLineHeight=o||i}initOverlays(){const t=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new $s(...t),this.bottomOverlay=new ts(...t),this.inlineStartOverlay=new Ls(...t),this.topInlineStartCornerOverlay=new Ws(...t,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new Xr(...t,this.bottomOverlay,this.inlineStartOverlay),Gs(Xs,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){Gs(Zs,this,Ks(Xs,this).reduce((t,e)=>e.hasRenderingStateChanged()||t,!1)),Ks(Xs,this).forEach(t=>t.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),Ks(Xs,this).forEach(t=>{const e=t.hasRenderingStateChanged();t.updateStateOfRendering("after"),e&&!t.needFullRender&&t.reset()})}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:t,rootWindow:e}=this.domBindings,{mainTableScrollableElement:n}=this.topOverlay,{mainTableScrollableElement:o}=this.inlineStartOverlay;this.eventManager.addEventListener(t.documentElement,"keydown",t=>this.onKeyDown(t)),this.eventManager.addEventListener(t.documentElement,"keyup",()=>this.onKeyUp()),this.eventManager.addEventListener(t,"visibilitychange",()=>this.onKeyUp()),this.eventManager.addEventListener(n,"scroll",t=>this.onTableScroll(t),{passive:!0}),n!==o&&this.eventManager.addEventListener(o,"scroll",t=>this.onTableScroll(t),{passive:!0});const i=e.devicePixelRatio&&e.devicePixelRatio>1,r=this.scrollableElement===e,s=this.wtSettings.getSetting("preventWheel"),a={passive:r};(s||i||!$t())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",t=>this.onCloneWheel(t,s),a);let l;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach(t=>{this.eventManager.addEventListener(t.clone.wtTable.holder,"wheel",t=>this.onCloneWheel(t,s),a)}),this.eventManager.addEventListener(e,"resize",()=>{Lt(()=>{clearTimeout(l),this.wtSettings.getSetting("onWindowResize"),l=setTimeout(()=>{Gs(Js,this,0)},200)})}),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}onTableScroll(t){const e=this.domBindings.rootWindow,n=this.inlineStartOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,i=t.target;this.keyPressed&&(o!==e&&i!==e&&!t.target.contains(o)||n!==e&&i!==e&&!t.target.contains(n))||this.syncScrollPositions(t)}onCloneWheel(t,e){if(t.ctrlKey)return;const{rootWindow:n}=this.domBindings,o=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,r=t.target,s=i!==n&&r!==n&&!r.contains(i),a=o!==n&&r!==n&&!r.contains(o);if(this.keyPressed&&(s||a)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(t);(e||this.scrollableElement!==n&&l)&&t.preventDefault()}onKeyDown(t){this.keyPressed=sn(t.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(t){let e=isNaN(t.deltaY)?-1*t.wheelDeltaY:t.deltaY,n=isNaN(t.deltaX)?-1*t.wheelDeltaX:t.deltaX;1===t.deltaMode&&(n+=n*this.browserLineHeight,e+=e*this.browserLineHeight);const o=this.scrollVertically(e),i=this.scrollHorizontally(n);return o||i}scrollVertically(t){const e=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=t,e!==this.scrollableElement.scrollTop}scrollHorizontally(t){const e=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=t,e!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const t=this.topOverlay.clone.wtTable.holder,e=this.inlineStartOverlay.clone.wtTable.holder,n=this.wtSettings.getSetting("preventOverflow");let o=this.scrollableElement.scrollLeft,i=this.scrollableElement.scrollTop;if(this.wot.wtViewport.isHorizontallyScrollableByWindow()&&("boolean"==typeof n&&n||"horizontal"!==n)&&(o=this.scrollableElement.scrollX),this.wot.wtViewport.isVerticallyScrollableByWindow()&&("boolean"==typeof n&&n||"vertical"!==n)&&(i=this.scrollableElement.scrollY),this.horizontalScrolling=this.lastScrollX!==o,this.verticalScrolling=this.lastScrollY!==i,this.lastScrollX=o,this.lastScrollY=i,this.horizontalScrolling){t.scrollLeft=o;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=o)}this.verticalScrolling&&(e.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){if(!Ks(Zs,this))return;const t=this.topOverlay.mainTableScrollableElement,{scrollLeft:e,scrollTop:n}=t;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=e),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=e),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=n),Gs(Zs,this,!1)}updateMainScrollableElements(){this.eventManager.clearEvents(!0),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:t}=this,{rootWindow:e}=this.domBindings,n=e.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement="hidden"===n||"clip"===n?t.holder:_e(t.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(t),this.inlineStartOverlay.refresh(t),this.topOverlay.refresh(t),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(t),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(t)}updateLastSpreaderSize(){const t=this.wtTable.spreader,e=t.clientWidth,n=t.clientHeight,o=e!==this.spreaderLastSize.width||n!==this.spreaderLastSize.height;return o&&(this.spreaderLastSize.width=e,this.spreaderLastSize.height=n),o}adjustElementsSize(){const{wtViewport:t}=this.wot,{wtTable:e}=this,{rootWindow:n}=this.domBindings,o=this.scrollableElement===n,i=this.wtSettings.getSetting("totalColumns"),r=this.wtSettings.getSetting("totalRows"),s=t.getRowHeaderWidth(),a=t.getColumnHeaderHeight(),l=this.wtSettings.getSetting("externalRowCalculator")?0:1,h=a+this.topOverlay.sumCellSizes(0,r)+l,c=s+this.inlineStartOverlay.sumCellSizes(0,i),d=e.hider.style,u=(()=>!o&&this.scrollableElement.scrollTop>Math.max(0,h-e.holder.clientHeight))()?1:0,g=(()=>!o&&this.scrollableElement.scrollLeft>Math.max(0,c-e.holder.clientWidth))()?1:0;d.width=`${c+g}px`,d.height=`${h+u}px`,this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(t){const{wtTable:e}=this;e.hider.style.height=`${parseInt(e.hider.style.height,10)+t}px`}expandHiderHorizontallyBy(t){const{wtTable:e}=this;e.hider.style.width=`${parseInt(e.hider.style.width,10)+t}px`}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(t){if(!t)return null;const e=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let n=null;return x(e,e=>{e&&e.clone&&e.clone.wtTable.TABLE.contains(t)&&(n=e.clone)}),n}syncOverlayTableClassNames(){const t=this.wtTable.TABLE;x([this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay],e=>{e&&(e.clone.wtTable.TABLE.className=t.className)})}}function ea(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class na{constructor(t){ea(this,"settings",{}),ea(this,"defaults",Object.freeze(this.getDefaults())),Tt(this.defaults,(e,n)=>{void 0!==t[n]?this.settings[n]=t[n]:void 0===e?wt(`A required setting "${n}" was not provided`):this.settings[n]=e})}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(t,e,n)=>{const o=this.getSetting("data",t,e);Se(n,null==o?"":o)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:t=>t,onBeforeViewportScrollVertically:t=>t,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords:null,onBeforeHighlightingRowHeader:t=>t,onBeforeHighlightingColumnHeader:t=>t,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0,stylesHandler:null}}update(t,e){return void 0===e?Tt(t,(t,e)=>{this.settings[e]=t}):this.settings[t]=e,this}getSetting(t,e,n,o,i){return"function"==typeof this.settings[t]?this.settings[t](e,n,o,i):void 0!==e&&Array.isArray(this.settings[t])?this.settings[t][e]:this.settings[t]}getSettingPure(t){return this.settings[t]}has(t){return!!this.settings[t]}}class oa extends Er{constructor(t,e,n,o){super(t,e,n,o,"master")}alignOverlaysWithTrimmingContainer(){const t=He(this.wtRootElement),{rootWindow:e}=this.domBindings;if(t===e){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const n=t.parentElement,o=Ie(t,"height",e),i=Ie(t,"overflow",e),r=this.holder.style,{scrollWidth:s,scrollHeight:a}=t;let l=t.offsetWidth,h=t.offsetHeight;if(n&&["auto","hidden","scroll","clip"].includes(i)){const o=t.cloneNode(!1);o.style.overflow="auto",o.style.position="absolute",t.nextElementSibling?n.insertBefore(o,t.nextElementSibling):n.appendChild(o);const i=parseInt(e.getComputedStyle(o).height,10);n.removeChild(o),0===i&&(h=0)}h=Math.min(h,a),r.height="auto"===o?"auto":`${h}px`,l=Math.min(l,s),r.width=`${l}px`,r.overflow="",this.hasTableHeight="auto"===r.height||h>0,this.hasTableWidth=l>0}this.isTableVisible=Re(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:t}=this,{wtViewport:e}=this.dataAccessObject,n="master",o=t.getSetting("columnHeaders").length;if(o&&!e.hasOversizedColumnHeadersMarked[n]){const i=t.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let t=0;t<o;t++)for(let t=-1*i;t<r;t++)this.markIfOversizedColumnHeader(t);e.hasOversizedColumnHeadersMarked[n]=!0}}}kt(oa,es),kt(oa,Zr);class ia{constructor(t,e,n,o,i){this.dataAccessObject=t,this.wot=t.wot,this.instance=this.wot,this.domBindings=e,this.wtSettings=n,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new Zo:new ei],["fullyVisible",()=>new jo],["partiallyVisible",()=>new Go]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new qo:new Qo],["fullyVisible",()=>new Wo],["partiallyVisible",()=>new Uo]]),this.eventManager=o,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}getWorkspaceHeight(){const t=this.domBindings.rootDocument,e=this.dataAccessObject.topOverlayTrimmingContainer;let n=0;if(e===this.domBindings.rootWindow)n=t.documentElement.clientHeight;else{n=Pe(e)>0&&e.clientHeight>0?e.clientHeight:1/0}return n}getViewportHeight(){let t=this.getWorkspaceHeight();if(t===1/0)return t;const e=this.getColumnHeaderHeight();return e>0&&(t-=e),t}getWorkspaceWidth(){const{rootDocument:t,rootWindow:e}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let o;if(n===e){const e=this.wtSettings.getSetting("totalColumns");o=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,e)>o&&(o=t.documentElement.clientWidth)}else o=n.clientWidth;return o}getViewportWidth(){const t=this.getWorkspaceWidth();if(t===1/0)return t;const e=this.getRowHeaderWidth();return e>0?t-e:t}hasVerticalScroll(){if(this.isVerticallyScrollableByWindow()){const t=this.domBindings.rootDocument.documentElement;return t.scrollHeight>t.clientHeight}const{holder:t,hider:e}=this.wtTable,n=t.clientHeight,o=e.offsetHeight;return n<o||o>this.getWorkspaceHeight()}hasHorizontalScroll(){if(this.isVerticallyScrollableByWindow()){const t=this.domBindings.rootDocument.documentElement;return t.scrollWidth>t.clientWidth}const{hider:t}=this.wtTable,e=t.offsetWidth,n=this.hasVerticalScroll()?Fe():0;return e>this.getWorkspaceWidth()-n}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(t,e){let n=0,o=t;for(;o<e;)n+=this.wtTable.getColumnWidth(o),o+=1;return n}getWorkspaceOffset(){return ke(this.wtTable.holder)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Pe(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getRowHeaderWidth(){const t=this.wtSettings.getSetting("rowHeaderWidth"),e=this.wtSettings.getSetting("rowHeaders");if(t){this.rowHeaderWidth=0;for(let n=0,o=e.length;n<o;n++)this.rowHeaderWidth+=t[n]||t}if(isNaN(this.rowHeaderWidth))if(e.length){let t=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let n=0,o=e.length;n<o;n++)t?(this.rowHeaderWidth+=Ae(t),t=t.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}createRowsCalculator(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:e,wtTable:n}=this;let o,i,r=this.getViewportHeight();this.rowHeaderWidth=NaN;let s=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const a=e.getSetting("fixedRowsTop"),l=e.getSetting("fixedRowsBottom"),h=e.getSetting("totalRows");return a&&s>=0&&(i=this.dataAccessObject.topOverlay.sumCellSizes(0,a),s+=i,r-=i),l&&this.dataAccessObject.bottomOverlay.clone&&(i=this.dataAccessObject.bottomOverlay.sumCellSizes(h-l,h),r-=i),o=n.holder.clientHeight===n.holder.offsetHeight?0:Fe(this.domBindings.rootDocument),new li({calculationTypes:t.map(t=>[t,this.rowsCalculatorTypes.get(t)()]),viewportHeight:r,scrollOffset:s,totalRows:e.getSetting("totalRows"),defaultRowHeight:e.getSetting("stylesHandler").getDefaultRowHeight(),rowHeightFn:t=>n.getRowHeight(t),overrideFn:e.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:o})}createColumnsCalculator(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:e,wtTable:n}=this;let o=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const r=e.getSetting("fixedColumnsStart");if(r&&i>=0){const t=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,r);i+=t,o-=t}return n.holder.clientWidth!==n.holder.offsetWidth&&(o-=Fe(this.domBindings.rootDocument)),new si({calculationTypes:t.map(t=>[t,this.columnsCalculatorTypes.get(t)()]),viewportWidth:o,scrollOffset:i,totalColumns:e.getSetting("totalColumns"),columnWidthFn:t=>n.getColumnWidth(t),overrideFn:e.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:e}=this,n=this.createRowsCalculator(),o=this.createColumnsCalculator();if(t&&!e.getSetting("renderAllRows")){const e=n.getResultsFor("fullyVisible"),o=n.getResultsFor("partiallyVisible");t=this.areAllProposedVisibleRowsAlreadyRendered(e,o)}if(t&&!e.getSetting("renderAllColumns")){const e=o.getResultsFor("fullyVisible"),n=o.getResultsFor("partiallyVisible");t=this.areAllProposedVisibleColumnsAlreadyRendered(e,n)}return t||(this.rowsRenderCalculator=n.getResultsFor("rendered"),this.columnsRenderCalculator=o.getResultsFor("rendered")),this.rowsVisibleCalculator=n.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=o.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=o.getResultsFor("partiallyVisible"),t}createVisibleCalculators(){const t=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),e=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=t.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=e.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(t,e){if(!this.rowsVisibleCalculator)return!1;let{startRow:n,endRow:o}=t;const{startRow:i,endRow:r}=e;if(null===n&&null===o){if(!t.isVisibleInTrimmingContainer&&!this.wtTable.isRowBeforeRenderedRows(i)&&!this.wtTable.isRowAfterRenderedRows(r))return!0;n=i,o=r}const{startRow:s,endRow:a,rowStartOffset:l,rowEndOffset:h}=this.rowsRenderCalculator,c=this.wtSettings.getSetting("totalRows")-1,d=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(d)&&d>0?(n=Math.max(0,n-Math.min(l,d)),o=Math.min(c,o+Math.min(h,d))):"auto"===d&&(n=Math.max(0,n-Math.ceil(l/2)),o=Math.min(c,o+Math.ceil(h/2))),!(n<s||n===s&&n>0)&&!(o>a||o===a&&o<c)}areAllProposedVisibleColumnsAlreadyRendered(t,e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:n,endColumn:o}=t;const{startColumn:i,endColumn:r}=e;if(null===n&&null===o){if(!t.isVisibleInTrimmingContainer&&!this.wtTable.isColumnBeforeRenderedColumns(i)&&!this.wtTable.isColumnAfterRenderedColumns(r))return!0;n=i,o=r}const{startColumn:s,endColumn:a,columnStartOffset:l,columnEndOffset:h}=this.columnsRenderCalculator,c=this.wtSettings.getSetting("totalColumns")-1,d=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(d)&&d>0?(n=Math.max(0,n-Math.min(l,d)),o=Math.min(c,o+Math.min(h,d))):"auto"===d&&(n=Math.max(0,n-Math.ceil(l/2)),o=Math.min(c,o+Math.ceil(h/2))),!(n<s||n===s&&n>0)&&!(o>a||o===a&&o<c)}resetHasOversizedColumnHeadersMarked(){Tt(this.hasOversizedColumnHeadersMarked,(t,e,n)=>{n[e]=void 0})}}class ra extends Ur{constructor(t,e){super(t,new na(e));const n=this.wtSettings.getSetting("facade",this);this.wtTable=new oa(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new ia(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Ns(this.wtSettings.getSetting("selections")),this.wtEvent=new Di(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new ta(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const t=[],e=[];Tt({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},(n,o)=>{this.wtSettings.getSetting(o).length&&e.push(n),t.push(n)}),ge(this.wtTable.wtRootElement.parentNode,t),ue(this.wtTable.wtRootElement.parentNode,e)}getOverlayByName(t){var e;if(!Nr.includes(t))return null;const n=t.replace(/_([a-z])/g,t=>t[1].toUpperCase());return null!==(e=this.wtOverlays[`${n}Overlay`])&&void 0!==e?e:null}getViewportDao(){const t=this;return{get wot(){return t},get topOverlayTrimmingContainer(){return t.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return t.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return t.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return t.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return t.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return t.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return t.wtOverlays.topOverlay},get inlineStartOverlay(){return t.wtOverlays.inlineStartOverlay},get bottomOverlay(){return t.wtOverlays.bottomOverlay}}}}class sa{constructor(t){t instanceof Ur?this._wot=t:this._initFromSettings(t)}_initFromSettings(t){t.facade=t=>{const e=new sa(t);return()=>e},this._wot=new ra(t.table,t)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(t){this._wot.drawn=t}get activeOverlayName(){return this._wot.activeOverlayName}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(t){this._wot.drawInterrupted=t}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(t){this._wot.lastMouseOver=t}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(t){this._wot.momentumScrolling=t}get touchApplied(){return this._wot.touchApplied}set touchApplied(t){this._wot.touchApplied=t}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(t){this._wot.eventListeners=t}get eventManager(){return this._wot.eventManager}createCellCoords(t,e){return this._wot.createCellCoords(t,e)}createCellRange(t,e,n){return this._wot.createCellRange(t,e,n)}draw(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(t),this}getCell(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(t,e)}scrollViewport(t,e,n){return this._wot.scrollViewport(t,e,n)}scrollViewportHorizontally(t,e){return this._wot.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this._wot.scrollViewportVertically(t,e)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(t){return this._wot.getOverlayByName(t)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(t,e){return this._wot.wtSettings.update(t,e),this}getSetting(t,e,n,o,i){return this._wot.wtSettings.getSetting(t,e,n,o,i)}hasSetting(t){return this._wot.wtSettings.hasSetting(t)}destroy(){this._wot.destroy()}}function aa(t){let{isShiftKey:e,isLeftClick:n,isRightClick:o,coords:i,selection:r,controller:s,cellCoordsFactory:a}=t;const l=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),c=r.isSelectedByRowHeader();if(r.markSource("mouse"),e&&l)i.row>=0&&i.col>=0&&!s.cell?r.setRangeEnd(i):(h||c)&&i.row>=0&&i.col>=0&&!s.cell?r.setRangeEnd(a(i.row,i.col)):h&&i.row<0&&!s.column?r.setRangeEnd(a(l.to.row,i.col)):c&&i.col<0&&!s.row?r.setRangeEnd(a(i.row,l.to.col)):(!h&&!c&&i.col<0||h&&i.col<0)&&!s.row?r.selectRows(Math.max(l.from.row,0),i.row,i.col):(!h&&!c&&i.row<0||c&&i.row<0)&&!s.column&&r.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const t=!r.inInSelection(i),e=n||o&&t;i.row<0&&i.col>=0&&!s.column?e&&r.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!s.row?e&&r.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!s.cell?e&&r.setRangeStart(i):i.col<0&&i.row<0&&r.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}r.markEndSource()}function la(t){let{isLeftClick:e,selection:n,cellRangeMapper:o}=t;if(!e||"multiple"!==n.settings.selectionMode)return;const i=n.getSelectedRange(),r=i.clone().map(t=>o.toRenderable(t)),s=r.current();if(r.size()>1&&!s.isHeader()&&!n.isMultiple(s)){const t=r.findAll(s);t.length===r.size()?(i.pop(),n.refresh()):t.length>1&&(i.removeLayers(t.map(t=>{let{layer:e}=t;return e})),n.refresh())}}const ha=new Map([["touchstart",aa],["touchend",la],["mousedown",aa],["mouseover",function(t){let{isLeftClick:e,coords:n,selection:o,controller:i,cellCoordsFactory:r}=t;if(!e)return;const s=o.isSelectedByRowHeader(),a=o.isSelectedByColumnHeader(),l=o.tableProps.countCols(),h=o.tableProps.countRows();o.markSource("mouse"),a&&!i.column?o.setRangeEnd(r(h-1,n.col)):s&&!i.row?o.setRangeEnd(r(n.row,l-1)):i.cell||o.setRangeEnd(n),o.markEndSource()}],["mouseup",la]]);function ca(t,e){ha.get(t.type)({isShiftKey:t.shiftKey,isLeftClick:cn(t)||"touchstart"===t.type,isRightClick:hn(t),...e})}const da=new WeakMap,ua=Symbol("rootInstance");function ga(t){return t===ua}function fa(t){return da.has(t)}function pa(t,e,n){ma(t,e),e.set(t,n)}function ma(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ba(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wa(t,e){return t.get(ya(t,e))}function va(t,e,n){return t.set(ya(t,e),n),n}function ya(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Ca=new WeakMap,Sa=new WeakMap,Ra=new WeakMap,ka=new WeakMap,xa=new WeakMap,Ea=new WeakMap,Ma=new WeakMap,Ta=new WeakMap,_a=new WeakSet;class Ha{constructor(t){var e,n;ma(e=this,n=_a),n.add(e),ba(this,"hot",void 0),ba(this,"eventManager",void 0),ba(this,"settings",void 0),ba(this,"THEAD",void 0),ba(this,"TBODY",void 0),ba(this,"_wt",void 0),ba(this,"activeWt",void 0),pa(this,Ca,0),pa(this,Sa,0),ba(this,"postponedAdjustElementsSize",!1),pa(this,Ra,!1),pa(this,ka,void 0),pa(this,xa,void 0),pa(this,Ea,0),pa(this,Ma,0),pa(this,Ta,null),this.hot=t,this.eventManager=new zn(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){if(!this.hot.isRenderSuspended()){const t=this.hot.forceFullRender;this.hot.runHooks("beforeRender",t),this._wt.draw(!t),ya(_a,this,Pa).call(this),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this.hot.runHooks("afterRender",t),this.hot.forceFullRender=!1}}adjustElementsSize(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]?this._wt.wtOverlays.adjustElementsSize():this.postponedAdjustElementsSize=!0}getCellAtCoords(t,e){const n=this._wt.getCell(t,e);return n<0?null:n}scrollViewport(t,e,n){return this._wt.scrollViewport(t,e,n)}scrollViewportHorizontally(t,e){return this._wt.scrollViewportHorizontally(t,e)}scrollViewportVertically(t,e){return this._wt.scrollViewportVertically(t,e)}createElements(){const{rootElement:t,rootDocument:e}=this.hot,n=t.getAttribute("style");n&&t.setAttribute("data-originalstyle",n),ue(t,"handsontable"),va(xa,this,e.createElement("TABLE")),ue(wa(xa,this),"htCore"),this.hot.getSettings().tableClassName&&ue(wa(xa,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(fe(wa(xa,this),[["role","presentation"]]),fe(t,[["role","treegrid"],ct(-1),dt(this.hot.countCols()),["aria-multiselectable","true"]])),this.THEAD=e.createElement("THEAD"),wa(xa,this).appendChild(this.THEAD),this.TBODY=e.createElement("TBODY"),wa(xa,this).appendChild(this.TBODY),this.hot.table=wa(xa,this),this.hot.container.insertBefore(wa(xa,this),this.hot.container.firstChild)}registerEvents(){const{rootWrapperElement:t,rootElement:e,rootDocument:n,selection:o,rootWindow:i}=this.hot,r=n.documentElement;this.eventManager.addEventListener(e,"mousedown",t=>{va(Ra,this,!0),this.isTextSelectionAllowed(t.target)||(Le(i),t.preventDefault(),i.focus())}),this.eventManager.addEventListener(e,"mouseup",()=>{va(Ra,this,!1)}),this.eventManager.addEventListener(e,"mousemove",t=>{wa(Ra,this)&&!this.isTextSelectionAllowed(t.target)&&(this.settings.fragmentSelection&&Le(i),t.preventDefault())}),this.eventManager.addEventListener(r,"keyup",t=>{o.isInProgress()&&!t.shiftKey&&o.finish()}),this.eventManager.addEventListener(r,"mouseup",i=>{o.isInProgress()&&cn(i)&&o.finish(),va(ka,this,!1);const r=Ye(n.activeElement);Ue(n.activeElement)&&!r||!r&&(o.isSelected()||o.isSelectedByAnyHeader()||(null!=t?t:e).contains(i.target)||hn(i))||this.hot.unlisten()}),this.eventManager.addEventListener(r,"contextmenu",t=>{o.isInProgress()&&hn(t)&&(o.finish(),va(ka,this,!1))}),this.eventManager.addEventListener(r,"touchend",()=>{o.isInProgress()&&o.finish(),va(ka,this,!1)}),this.eventManager.addEventListener(r,"mousedown",t=>{const o=t.target,i=t.x||t.clientX,s=t.y||t.clientY;let a=t.target;if(wa(ka,this)||!e||!this.hot.view)return;const{holder:l}=this._wt.wtTable;if(a===l){const t=Fe(n);if(n.elementFromPoint(i+t,s)!==l||n.elementFromPoint(i,s+t)!==l)return}else for(;a!==r;){if(null===a){if(t.isTargetWebComponent)break;return}if(a===e)return;a=a.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(o):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let s=ie(i);for(;null!==s;)this.eventManager.addEventListener(s.document.documentElement,"click",()=>{this.hot.unlisten()}),s=ie(s);this.eventManager.addEventListener(wa(xa,this),"selectstart",t=>{this.settings.fragmentSelection||Ue(t.target)||t.preventDefault()})}translateFromRenderableToVisualCoords(t){let{row:e,col:n}=t;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(e,n))}translateFromRenderableToVisualIndex(t,e){let n=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t,o=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;return null===n&&(n=t),null===o&&(o=e),[n,o]}countRenderableIndexes(t,e){const n=Math.min(t.getNotTrimmedIndexesLength(),e),o=t.getNearestNotHiddenIndex(n-1,-1);return null===o?0:t.getRenderableFromVisualIndex(o)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(t,e){return this.countNotHiddenIndexes(t,e,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(t,e){return this.countNotHiddenIndexes(t,e,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(t,e,n,o){if(isNaN(t)||t<0)return 0;const i=n.getNearestNotHiddenIndex(t,e),r=n.getRenderableFromVisualIndex(i);if(!Number.isInteger(r))return 0;let s=0;return e<0?s=r+1:e>0&&(s=o-r),s}countNotHiddenFixedColumnsStart(){const t=this.hot.countCols(),e=Math.min(parseInt(this.settings.fixedColumnsStart,10),t)-1;return this.countNotHiddenColumnIndexes(e,-1)}countNotHiddenFixedRowsTop(){const t=this.hot.countRows(),e=Math.min(parseInt(this.settings.fixedRowsTop,10),t)-1;return this.countNotHiddenRowIndexes(e,-1)}countNotHiddenFixedRowsBottom(){const t=this.hot.countRows(),e=Math.max(t-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(e,1)}countRenderableColumnsInRange(t,e){let n=0;for(let o=t;o<=e;o++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(o)&&(n+=1);return n}countRenderableRowsInRange(t,e){let n=0;for(let o=t;o<=e;o++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(o)&&(n+=1);return n}addClassNameToLicenseElement(t){var e;const n=null===(e=this.hot.rootElement.parentNode)||void 0===e?void 0:e.querySelector(".hot-display-license-info");n&&ue(n,t)}removeClassNameFromLicenseElement(t){var e;const n=null===(e=this.hot.rootElement.parentNode)||void 0===e?void 0:e.querySelector(".hot-display-license-info");n&&ge(n,t)}isMainTableNotFullyCoveredByOverlays(){const t=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),e=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>t&&this.hot.countRenderedCols()>e}initializeWalkontable(){const t={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:wa(xa,this),isDataViewInstance:()=>fa(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,data:(t,e)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(t,e)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||t.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||t.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const t=[];return this.hot.hasRowHeaders()&&t.push((t,e)=>{const n=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t;this.appendRowHeader(n,e)}),this.hot.runHooks("afterGetRowHeaderRenderers",t),va(Sa,this,t.length),this.hot.getSettings().ariaTags&&ya(_a,this,Ia).call(this)===this.hot.countCols()&&ya(_a,this,Aa).call(this,wa(Sa,this)),t},columnHeaders:()=>{const t=[];return this.hot.hasColHeaders()&&t.push((t,e)=>{const n=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;this.appendColHeader(n,e)}),this.hot.runHooks("afterGetColumnHeaderRenderers",t),va(Ca,this,t.length),t},columnWidth:t=>{const e=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.getColWidth(null===e?t:e)},rowHeight:t=>{const e=this.hot.rowIndexMapper.getVisualFromRenderableIndex(t);return this.hot.getRowHeight(null===e?t:e)},rowHeightByOverlayName:(t,e)=>{const n=this.hot.rowIndexMapper.getVisualFromRenderableIndex(t),o=null===n?t:n;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(o),o,e)},cellRenderer:(t,e,n)=>{const[o,i]=this.translateFromRenderableToVisualIndex(t,e),r=this.hot.runHooks("modifyGetCellCoords",o,i,!1,"meta");let s=o,a=i;Array.isArray(r)&&([s,a]=r);const l=this.hot.getCellMeta(s,a),h=this.hot.colToProp(a);let c=this.hot.getDataAtRowProp(s,h);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,l));const d=this.hot.getCellRenderer(l);let u=c;"function"==typeof l.valueFormatter?u=l.valueFormatter(u,l):"function"==typeof d.valueFormatter&&(u=d.valueFormatter.call(l,u,l)),this.hot.runHooks("beforeRenderer",n,o,i,h,c,l);const g=[this.hot,n,o,i,h,u,l];d(...g),l._isBaseRendererCalled||this.hot.getCellRenderer({renderer:"base"})(...g),this.hot.runHooks("afterRenderer",n,o,i,h,c,l),l._isBaseRendererCalled=!1},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&Re(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e),r={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=o,va(ka,this,!0),va(Ta,this,{x:t.clientX,y:t.clientY}),this.hot.runHooks("beforeOnCellMouseDown",t,i,n,r),ln(t)||(ca(t,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseDown",t,i,n),this.activeWt=this._wt)},onCellContextMenu:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=o,va(ka,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",t,i,n),ln(t)||(this.hot.runHooks("afterOnCellContextMenu",t,i,n),this.activeWt=this._wt)},onCellMouseOut:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=o,this.hot.runHooks("beforeOnCellMouseOut",t,i,n),ln(t)||(this.hot.runHooks("afterOnCellMouseOut",t,i,n),this.activeWt=this._wt)},onCellMouseOver:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e),r={row:!1,column:!1,cell:!1};this.activeWt=o,this.hot.runHooks("beforeOnCellMouseOver",t,i,n,r),ln(t)||(!wa(ka,this)||wa(Ta,this)&&wa(Ta,this).x===t.clientX&&wa(Ta,this).y===t.clientY||ca(t,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseOver",t,i,n),this.activeWt=this._wt,va(Ta,this,null))},onCellMouseUp:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e);var r,s,a;(this.activeWt=o,this.hot.runHooks("beforeOnCellMouseUp",t,i,n),ln(t)||this.hot.isDestroyed)||(ca(t,{coords:i,selection:this.hot.selection,cellRangeMapper:(r=this.hot,s="cellRangeMapper",null==_n||null===(a=_n.get(r.guid))||void 0===a?void 0:a.get(s))}),this.hot.runHooks("afterOnCellMouseUp",t,i,n),this.activeWt=this._wt)},onCellCornerMouseDown:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",t)},beforeDraw:(t,e)=>this.beforeRender(t,e),onDraw:t=>this.afterRender(t),onBeforeViewportScrollVertically:(t,e)=>{const n=this.hot.rowIndexMapper,o=t<0;let i=t;return o||(i=n.getVisualFromRenderableIndex(t),null!==i)?(i=this.hot.runHooks("beforeViewportScrollVertically",i,e),this.hot.runHooks("beforeViewportScroll"),o?i:n.getRenderableFromVisualIndex(i)):t},onBeforeViewportScrollHorizontally:(t,e)=>{const n=this.hot.columnIndexMapper,o=t<0;let i=t;return o||(i=n.getVisualFromRenderableIndex(t),null!==i)?(i=this.hot.runHooks("beforeViewportScrollHorizontally",i,e),this.hot.runHooks("beforeViewportScroll"),o?i:n.getRenderableFromVisualIndex(i)):t},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(t,e,n)=>{const o=this.hot.rowIndexMapper,i=t<0;let r=t;i||(r=o.getVisualFromRenderableIndex(t));const s=this.hot.runHooks("beforeHighlightingRowHeader",r,e,n);return i?s:o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,1))},onBeforeHighlightingColumnHeader:(t,e,n)=>{const o=this.hot.columnIndexMapper,i=t<0;let r=t;i||(r=o.getVisualFromRenderableIndex(t));const s=this.hot.runHooks("beforeHighlightingColumnHeader",r,e,n);return i?s:o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,1))},onAfterDrawSelection:(t,e,n)=>{let o;const[i,r]=this.translateFromRenderableToVisualIndex(t,e),s=this.hot.selection.getSelectedRange();if(s.size()>0){const t=s.peekByIndex(null!=n?n:0);o=[t.from.row,t.from.col,t.to.row,t.to.col]}return this.hot.runHooks("afterDrawSelection",i,r,o,n)},onBeforeDrawBorders:(t,e)=>{const[n,o,i,r]=t,s=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)];return this.hot.runHooks("beforeDrawBorders",s,e)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:t=>this.hot.runHooks("modifyRowHeaderWidth",t),onModifyGetCellCoords:(t,e,n,o)=>{const i=this.hot.rowIndexMapper,r=this.hot.columnIndexMapper,s=e>=0?r.getVisualFromRenderableIndex(e):e,a=t>=0?i.getVisualFromRenderableIndex(t):t,l=this.hot.runHooks("modifyGetCellCoords",a,s,n,o);if(Array.isArray(l)){const[t,e,n,o]=l;return[t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,n>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(n,-1)):n,o>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,-1)):o]}},onModifyGetCoordsElement:(t,e)=>{const n=this.hot.rowIndexMapper,o=this.hot.columnIndexMapper,i=e>=0?o.getVisualFromRenderableIndex(e):e,r=t>=0?n.getVisualFromRenderableIndex(t):t,s=this.hot.runHooks("modifyGetCoordsElement",r,i);if(Array.isArray(s)){const[t,e]=s;return[t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t,e>=0?o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,1)):e]}},viewportRowCalculatorOverride:t=>{let e=this.settings.viewportRowRenderingOffset;if("auto"===e&&this.settings.fixedRowsTop&&(e=10),e>0||"auto"===e){const n=this.countRenderableRows(),o=t.startRow,i=t.endRow;if("number"==typeof e)t.startRow=Math.max(o-e,0),t.endRow=Math.min(i+e,n-1);else if("auto"===e){const e=Math.max(1,Math.ceil(i/n*12));t.startRow=Math.max(o-e,0),t.endRow=Math.min(i+e,n-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:t=>{let e=this.settings.viewportColumnRenderingOffset;if("auto"===e&&this.settings.fixedColumnsStart&&(e=10),e>0||"auto"===e){const n=this.countRenderableColumns(),o=t.startColumn,i=t.endColumn;if("number"==typeof e&&(t.startColumn=Math.max(o-e,0),t.endColumn=Math.min(i+e,n-1)),"auto"===e){const e=Math.max(1,Math.ceil(i/n*6));t.startColumn=Math.max(o-e,0),t.endColumn=Math.min(i+e,n-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const t=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||t},stylesHandler:()=>this.hot.stylesHandler};this.hot.runHooks("beforeInitWalkontable",t),this._wt=new sa(t),this.activeWt=this._wt;const e=this._wt.wtTable.spreader,{width:n,height:o}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(n,o),this.eventManager.addEventListener(e,"mousedown",t=>{t.target===e&&3===t.which&&t.stopPropagation()}),this.eventManager.addEventListener(e,"contextmenu",t=>{t.target===e&&3===t.which&&t.stopPropagation()}),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&this.hot.render()})}isTextSelectionAllowed(t){var e,n;if(Ue(t))return!0;const o=ae(t,this._wt.wtTable.spreader);if(!0===this.settings.fragmentSelection&&o)return!0;const i=null!==(e=null===(n=this.hot.getSelectedRangeActive())||void 0===n?void 0:n.isSingleCell())&&void 0!==e&&e;return!("cell"!==this.settings.fragmentSelection||!i||!o)||!(this.settings.fragmentSelection||!this.isCellEdited()||!i)}isMouseDown(){return wa(ka,this)}isCellEdited(){const t=this.hot.getActiveEditor();return t&&t.isOpened()}beforeRender(t,e){t&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,e)}afterRender(t){t&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(t,e){if(e.firstChild){const n=e.firstChild;if(!de(n,"relative"))return be(e),void this.appendRowHeader(t,e);this.updateCellHeader(n.querySelector(".rowHeader"),t,this.hot.getRowHeader)}else{const{rootDocument:n,getRowHeader:o}=this.hot,i=n.createElement("div"),r=n.createElement("span");i.className="relative",r.className="rowHeader",this.updateCellHeader(r,t,o),i.appendChild(r),e.appendChild(i)}this.hot.runHooks("afterGetRowHeader",t,e)}appendColHeader(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=()=>{const e=t>=0?this.hot.getColumnMeta(t).headerClassName:null;return e?e.split(" "):[]};if(e.firstChild){const r=e.firstChild;de(r,"relative")?(this.updateCellHeader(r.querySelector(".colHeader"),t,n,o),r.className="",ue(r,["relative",...i()])):(be(e),this.appendColHeader(t,e,n,o))}else{const{rootDocument:r}=this.hot,s=r.createElement("div"),a=r.createElement("span"),l=i();s.classList.add("relative",...l),a.className="colHeader",this.settings.ariaTags&&(fe(s,"role","presentation"),fe(a,"role","presentation")),this.updateCellHeader(a,t,n,o),s.appendChild(a),e.appendChild(s)}this.hot.runHooks("afterGetColHeader",t,e,o)}updateCellHeader(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=e;const r=this._wt.wtOverlays.getParentOverlay(t)||this._wt;t.parentNode&&(de(t,"colHeader")?i=r.wtTable.columnFilter.sourceToRendered(e):de(t,"rowHeader")&&(i=r.wtTable.rowFilter.sourceToRendered(e))),i>-1?Ce(t,n(e,o),this.hot.getSettings().sanitizer):(Se(t,String.fromCharCode(160)),ue(t,"cornerHeader"))}maximumVisibleElementWidth(t){const e=this._wt.wtViewport.getWorkspaceWidth()-t;return e>0?e:0}maximumVisibleElementHeight(t){const e=this._wt.wtViewport.getWorkspaceHeight()-t;return e>0?e:0}setLastSize(t,e){va(Ea,this,t),va(Ma,this,e)}getLastSize(){return{width:wa(Ea,this),height:wa(Ma,this)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const t=this.hot.rowIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return t.getNearestNotHiddenIndex(null!=e?e:0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const t=this.hot.rowIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return t.getNearestNotHiddenIndex(null!=e?e:this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const t=this.hot.columnIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return t.getNearestNotHiddenIndex(null!=e?e:0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const t=this.hot.columnIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return t.getNearestNotHiddenIndex(null!=e?e:this.hot.countCols()-1,-1)}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return wa(Ca,this)}getRowHeadersCount(){return wa(Sa,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(t){var e;return(null!==(e=this._wt.wtOverlays.getParentOverlay(t))&&void 0!==e?e:this._wt).wtTable.name}getOverlayByName(t){return this._wt.getOverlayByName(t)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getTotalTableWidth(){return this._wt.wtTable.getTotalWidth()}getTotalTableHeight(){return this._wt.wtTable.getTotalHeight()}getTableOffset(){return this._wt.wtViewport.getWorkspaceOffset()}getTableScrollPosition(){return{left:this._wt.wtTable.holder.scrollLeft,top:this._wt.wtTable.holder.scrollTop}}setTableScrollPosition(t){this._wt.wtTable.holder.scrollLeft=t.left,this._wt.wtTable.holder.scrollTop=t.top}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}function Ia(){return parseInt(this.hot.rootElement.getAttribute(dt()[0]),10)}function Aa(t){const e=ya(_a,this,Ia).call(this)+t;fe(this.hot.rootElement,...dt(e))}function Pa(){const t=this.hot.rootElement;this.hasVerticalScroll()?ue(t,"htHasScrollY"):ge(t,"htHasScrollY"),this.isVerticallyScrollableByWindow()?ue(t,"htVerticallyScrollableByWindow"):ge(t,"htVerticallyScrollableByWindow"),this.hasHorizontalScroll()?ue(t,"htHasScrollX"):ge(t,"htHasScrollX"),this.isHorizontallyScrollableByWindow()?ue(t,"htHorizontallyScrollableByWindow"):ge(t,"htHorizontallyScrollableByWindow"),0===Fe()?ue(t,"htScrollbarHidden"):ge(t,"htScrollbarHidden")}function Oa(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t;const o=[];return Array.isArray(t)&&Array.isArray(t[0])||(n=[t]),n.forEach((t,n)=>{Array.isArray(t)?t.forEach((t,i)=>{o.push([n+e,i,t])}):Object.keys(t).forEach(i=>{o.push([n+e,i,t[i]])})}),o}function Na(t){let e=0;return Array.isArray(t)&&(t[0]&&Array.isArray(t[0])?e=t[0].length:t[0]&&Et(t[0])&&(e=It(t[0]))),e}function Da(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class La{constructor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Da(this,"indexedValues",[]),Da(this,"initValueOrFn",void 0),this.initValueOrFn=t}getValues(){return this.indexedValues}getValueAtIndex(t){const e=this.indexedValues;if(t<e.length)return e[t]}setValues(t){this.indexedValues=t.slice(),this.runLocalHooks("change")}setValueAtIndex(t,e){return t<this.indexedValues.length&&(this.indexedValues[t]=e,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,Ze(this.initValueOrFn)?ao(t-1,t=>this.indexedValues.push(this.initValueOrFn(t))):ao(t-1,()=>this.indexedValues.push(this.initValueOrFn)),this.runLocalHooks("change")}init(t){return this.setDefaultValues(t),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}function Va(t,e,n,o){const i=n.length?n[0]:void 0;return[...t.slice(0,i),...n.map((t,e)=>Ze(o)?o(t,e):o),...void 0===i?[]:t.slice(i)]}function Ba(t,e){return R(t,(t,n)=>!1===e.includes(n))}kt(La,os);class Fa extends La{insert(t,e){this.indexedValues=Va(this.indexedValues,0,e,this.initValueOrFn),super.insert(t,e)}remove(t){this.indexedValues=Ba(this.indexedValues,t),super.remove(t)}}class Wa extends Fa{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return S(this.getValues(),(t,e,n)=>(e&&t.push(n),t),[])}}function za(t,e,n){return[...t.slice(0,e),...n,...t.slice(e)]}function ja(t,e){return R(t,t=>!1===e.includes(t))}function $a(t,e){return k(t,t=>t-e.filter(e=>e<t).length)}function Ua(t,e){const n=e[0],o=e.length;return k(t,t=>t>=n?t+o:t)}function Ya(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ga extends La{constructor(){super(...arguments),Ya(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map(t=>this.indexedValues[t])}setValues(t){this.orderOfIndexes=[...Array(t.length).keys()],super.setValues(t)}setValueAtIndex(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return t<this.indexedValues.length&&(this.indexedValues[t]=e,!1===this.orderOfIndexes.includes(t)&&this.orderOfIndexes.splice(n,0,t),this.runLocalHooks("change"),!0)}clearValue(t){this.orderOfIndexes=ja(this.orderOfIndexes,[t]),Ze(this.initValueOrFn)?super.setValueAtIndex(t,this.initValueOrFn(t)):super.setValueAtIndex(t,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(t)}insert(t,e){this.indexedValues=Va(this.indexedValues,0,e,this.initValueOrFn),this.orderOfIndexes=Ua(this.orderOfIndexes,e),super.insert(t,e)}remove(t){this.indexedValues=Ba(this.indexedValues,t),this.orderOfIndexes=ja(this.orderOfIndexes,t),this.orderOfIndexes=$a(this.orderOfIndexes,t),super.remove(t)}getEntries(){return this.orderOfIndexes.map(t=>[t,this.getValueAtIndex(t)])}}class Ka extends Fa{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return S(this.getValues(),(t,e,n)=>(e&&t.push(n),t),[])}}const qa=new Map([["indexesSequence",{getListWithInsertedItems:za,getListWithRemovedItems:ja}],["physicallyIndexed",{getListWithInsertedItems:Va,getListWithRemovedItems:Ba}]]),Xa=t=>(!1===qa.has(t)&&wt(`Alter strategy with ID '${t}' does not exist.`),qa.get(t));class Za extends La{constructor(){super(t=>t)}insert(t,e){const n=Ua(this.indexedValues,e);this.indexedValues=za(n,t,e),super.insert(t,e)}remove(t){const e=ja(this.indexedValues,t);this.indexedValues=$a(e,t),super.remove(t)}}const Ja=new Map([["hiding",Wa],["index",La],["linkedPhysicalIndexToValue",Ga],["physicalIndexToValue",Fa],["trimming",Ka]]);function Qa(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class tl{constructor(){Qa(this,"collection",new Map)}register(t,e){!1===this.collection.has(t)&&(this.collection.set(t,e),e.addLocalHook("change",()=>this.runLocalHooks("change",e)))}unregister(t){const e=this.collection.get(t);I(e)&&(e.destroy(),this.collection.delete(t),this.runLocalHooks("change",e))}unregisterAll(){this.collection.forEach((t,e)=>this.unregister(e)),this.collection.clear()}get(t){return A(t)?Array.from(this.collection.values()):this.collection.get(t)}getLength(){return this.collection.size}removeFromEvery(t){this.collection.forEach(e=>{e.remove(t)})}insertToEvery(t,e){this.collection.forEach(n=>{n.insert(t,e)})}initEvery(t){this.collection.forEach(e=>{e.init(t)})}}function el(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(tl,os);class nl extends tl{constructor(t,e){super(),el(this,"mergedValuesCache",[]),el(this,"aggregationFunction",void 0),el(this,"fallbackValue",void 0),this.aggregationFunction=t,this.fallbackValue=e}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const t=k(this.get(),t=>t.getValues()),e=[],n=I(t[0])&&t[0].length||0;for(let o=0;o<n;o+=1){const n=[];for(let e=0;e<this.getLength();e+=1)n.push(t[e][o]);e.push(n)}return k(e,this.aggregationFunction)}getMergedValueAtIndex(t,e){const n=this.getMergedValues(e)[t];return I(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}function ol(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function il(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var rl=new WeakMap;class sl{constructor(){ol(this,rl,[])}subscribe(t){var e,n;return this.addLocalHook("change",t),this._write((n=this,(e=rl).get(il(e,n)))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(t){return t.length>0&&this.runLocalHooks("change",t),this}_writeInitialChanges(t){var e,n,o;n=this,o=t,(e=rl).set(il(e,n),o)}}function al(t,e){const n=[];let o=0,i=0;for(;o<t.length&&i<e.length;o++,i++)t[o]!==e[i]&&n.push({op:"replace",index:i,oldValue:t[o],newValue:e[i]});for(;o<e.length;o++)n.push({op:"insert",index:o,oldValue:void 0,newValue:e[o]});for(;i<t.length;i++)n.push({op:"remove",index:i,oldValue:t[i],newValue:void 0});return n}function ll(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function hl(t,e){return t.get(dl(t,e))}function cl(t,e,n){return t.set(dl(t,e),n),n}function dl(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}kt(sl,os);var ul=new WeakMap,gl=new WeakMap,fl=new WeakMap,pl=new WeakMap,ml=new WeakMap;class bl{constructor(){let{initialIndexValue:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ll(this,ul,new Set),ll(this,gl,[]),ll(this,fl,[]),ll(this,pl,!1),ll(this,ml,!1),cl(ml,this,null!=t&&t)}createObserver(){const t=new sl;return hl(ul,this).add(t),t.addLocalHook("unsubscribe",()=>{hl(ul,this).delete(t)}),t._writeInitialChanges(al(hl(gl,this),hl(fl,this))),t}emit(t){let e=hl(fl,this);hl(pl,this)&&hl(gl,this).length===t.length||(0===t.length?t=new Array(e.length).fill(hl(ml,this)):cl(gl,this,new Array(t.length).fill(hl(ml,this))),hl(pl,this)||(cl(pl,this,!0),e=hl(gl,this)));const n=al(e,t);hl(ul,this).forEach(t=>t._write(n)),cl(fl,this,t)}}function wl(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class vl{constructor(){wl(this,"indexesSequence",new Za),wl(this,"trimmingMapsCollection",new nl(t=>t.some(t=>!0===t),!1)),wl(this,"hidingMapsCollection",new nl(t=>t.some(t=>!0===t),!1)),wl(this,"variousMapsCollection",new tl),wl(this,"hidingChangesObservable",new bl({initialIndexValue:!1})),wl(this,"notTrimmedIndexesCache",[]),wl(this,"notHiddenIndexesCache",[]),wl(this,"isBatched",!1),wl(this,"indexesSequenceChanged",!1),wl(this,"indexesChangeSource",void 0),wl(this,"trimmedIndexesChanged",!1),wl(this,"hiddenIndexesChanged",!1),wl(this,"renderablePhysicalIndexesCache",[]),wl(this,"fromPhysicalToVisualIndexesCache",new Map),wl(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",t=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",t,this.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",t=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",t,this.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",t=>{this.runLocalHooks("change",t,this.variousMapsCollection)})}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(t){return"hiding"!==t&&wt(`Unsupported index map type "${t}".`),this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(t,e,n){return this.registerMap(t,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return Ja.has(t)||wt(`The provided map type ("${t}") does not exist.`),new(Ja.get(t))(e)}(e,n))}registerMap(t,e){(this.trimmingMapsCollection.get(t)||this.hidingMapsCollection.get(t)||this.variousMapsCollection.get(t))&&wt(`Map with name "${t}" has been already registered.`),e instanceof Ka?this.trimmingMapsCollection.register(t,e):e instanceof Wa?this.hidingMapsCollection.register(t,e):this.variousMapsCollection.register(t,e);const n=this.getNumberOfIndexes();return n>0&&e.init(n),e}unregisterMap(t){this.trimmingMapsCollection.unregister(t),this.hidingMapsCollection.unregister(t),this.variousMapsCollection.unregister(t)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(t){const e=this.notTrimmedIndexesCache[t];return I(e)?e:null}getPhysicalFromRenderableIndex(t){const e=this.renderablePhysicalIndexesCache[t];return I(e)?e:null}getVisualFromPhysicalIndex(t){const e=this.fromPhysicalToVisualIndexesCache.get(t);return I(e)?e:null}getVisualFromRenderableIndex(t){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(t))}getRenderableFromVisualIndex(t){const e=this.fromVisualToRenderableIndexesCache.get(t);return I(e)?e:null}getNearestNotHiddenIndex(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(t))return null;if(this.fromVisualToRenderableIndexesCache.has(t))return t;const o=Array.from(this.fromVisualToRenderableIndexesCache.keys());let i=-1;return i=e>0?o.findIndex(e=>e>t):o.reverse().findIndex(e=>e<t),-1===i?n?this.getNearestNotHiddenIndex(t,-e,!1):null:o[i]}initToLength(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(t).keys()],this.notHiddenIndexesCache=[...new Array(t).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(t),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(t),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(t),this.variousMapsCollection.initEvery(t),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(t){const e=this.getNumberOfIndexes();if(t<e){const e=[...Array(this.getNumberOfIndexes()-t).keys()].map(e=>e+t);this.removeIndexes(e)}else this.insertIndexes(e,t-e)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(t){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(t),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter(t=>!1===this.isTrimmed(t))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter(t=>!1===this.isHidden(t))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter(t=>!1===this.isHidden(t))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(t,e){"number"==typeof t&&(t=[t]);const n=k(t,t=>this.getPhysicalFromVisualIndex(t)),o=this.getNotTrimmedIndexesLength(),i=t.length,r=ja(this.getIndexesSequence(),n),s=r.filter(t=>!1===this.isTrimmed(t));let a=r.indexOf(s[s.length-1])+1;if(e+i<o){const t=s[e];a=r.indexOf(t)}this.indexesChangeSource="move",this.setIndexesSequence(za(r,a,n)),this.indexesChangeSource=void 0}isTrimmed(t){return this.trimmingMapsCollection.getMergedValueAtIndex(t)}isHidden(t){return this.hidingMapsCollection.getMergedValueAtIndex(t)}insertIndexes(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"start";const o=this.getNotTrimmedIndexes()[t],i=I(o)?o:this.getNumberOfIndexes(),r=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),s=k(new Array(e).fill(i),(t,e)=>t+e);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(r,s),this.indexesChangeSource=void 0;const a="end"===n?s.map(t=>t+1):s;this.trimmingMapsCollection.insertToEvery(r,a),this.hidingMapsCollection.insertToEvery(r,a),this.variousMapsCollection.insertToEvery(r,a),this.resumeOperations()}removeIndexes(t){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(t),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(t),this.hidingMapsCollection.removeFromEvery(t),this.variousMapsCollection.removeFromEvery(t),this.resumeOperations()}updateCache(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===t||!1===this.isBatched&&!0===e)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const t=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let e=0;e<t;e+=1){const t=this.getPhysicalFromVisualIndex(e);this.fromPhysicalToVisualIndexesCache.set(t,e)}}cacheFromVisualToRenderableIndexes(){const t=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let e=0;e<t;e+=1){const t=this.getPhysicalFromRenderableIndex(e),n=this.getVisualFromPhysicalIndex(t);this.fromVisualToRenderableIndexesCache.set(n,e)}}}function yl(t){const e=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(t);return e?`${e[1].toLowerCase()}-${e[2].toUpperCase()}`:t}function Cl(t){I(t)&&ee(T`Language with code "${t}" was not found. You should register particular language\x20
29
+ before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}kt(vl,os);const{register:Sl,getValues:Rl}=Hn("phraseFormatters");function kl(t,e){Sl(t,e)}kl("pluralize",function(t,e){return Array.isArray(t)&&Number.isInteger(e)?t[e]:t}),kl("substitute",function t(e,n){return Array.isArray(e)?e.map(e=>t(e,n)):K(e,n)});const xl="Common:",El=`${xl}ok`,Ml=`${xl}cancel`,Tl="ContextMenu:items",_l=`${Tl}.noItems`,Hl=`${Tl}.insertRowAbove`,Il=`${Tl}.insertRowBelow`,Al=`${Tl}.insertColumnOnTheLeft`,Pl=`${Tl}.insertColumnOnTheRight`,Ol=`${Tl}.removeRow`,Nl=`${Tl}.removeColumn`,Dl=`${Tl}.undo`,Ll=`${Tl}.redo`,Vl=`${Tl}.readOnly`,Bl=`${Tl}.clearColumn`,Fl=`${Tl}.copy`,Wl=`${Tl}.copyWithHeaders`,zl=`${Tl}.copyWithGroupHeaders`,jl=`${Tl}.copyHeadersOnly`,$l=`${Tl}.cut`,Ul=`${Tl}.freezeColumn`,Yl=`${Tl}.unfreezeColumn`,Gl=`${Tl}.mergeCells`,Kl=`${Tl}.unmergeCells`,ql=`${Tl}.addComment`,Xl=`${Tl}.editComment`,Zl=`${Tl}.removeComment`,Jl=`${Tl}.readOnlyComment`,Ql=`${Tl}.align`,th=`${Tl}.align.left`,eh=`${Tl}.align.center`,nh=`${Tl}.align.right`,oh=`${Tl}.align.justify`,ih=`${Tl}.align.top`,rh=`${Tl}.align.middle`,sh=`${Tl}.align.bottom`,ah=`${Tl}.borders`,lh=`${Tl}.borders.top`,hh=`${Tl}.borders.right`,ch=`${Tl}.borders.bottom`,dh=`${Tl}.borders.left`,uh=`${Tl}.borders.remove`,gh=`${Tl}.nestedHeaders.insertChildRow`,fh=`${Tl}.nestedHeaders.detachFromParent`,ph=`${Tl}.hideColumn`,mh=`${Tl}.showColumn`,bh=`${Tl}.hideRow`,wh=`${Tl}.showRow`,vh="Filters:",yh=`${vh}conditions`,Ch=`${yh}.none`,Sh=`${yh}.isEmpty`,Rh=`${yh}.isNotEmpty`,kh=`${yh}.isEqualTo`,xh=`${yh}.isNotEqualTo`,Eh=`${yh}.beginsWith`,Mh=`${yh}.endsWith`,Th=`${yh}.contains`,_h=`${yh}.doesNotContain`,Hh=`${yh}.byValue`,Ih=`${yh}.greaterThan`,Ah=`${yh}.greaterThanOrEqualTo`,Ph=`${yh}.lessThan`,Oh=`${yh}.lessThanOrEqualTo`,Nh=`${yh}.isBetween`,Dh=`${yh}.isNotBetween`,Lh=`${yh}.after`,Vh=`${yh}.before`,Bh=`${yh}.today`,Fh=`${yh}.tomorrow`,Wh=`${yh}.yesterday`,zh=`${vh}labels.filterByCondition`,jh=`${vh}labels.filterByValue`,$h=`${vh}labels.conjunction`,Uh=`${vh}labels.disjunction`,Yh=`${vh}values.blankCells`,Gh=`${vh}buttons.selectAll`,Kh=`${vh}buttons.clear`,qh=`${vh}buttons.ok`,Xh=`${vh}buttons.cancel`,Zh=`${vh}buttons.placeholder.search`,Jh=`${vh}buttons.placeholder.value`,Qh=`${vh}buttons.placeholder.secondValue`,tc="Pagination:",ec=`${tc}section.pagination`,nc=`${tc}.pageSize.auto`,oc=`${tc}section.pageSize`,ic=`${tc}section.counter`,rc=`${tc}section.navigation`,sc=`${tc}firstPage`,ac=`${tc}prevPage`,lc=`${tc}nextPage`,hc=`${tc}lastPage`,cc="CheckboxRenderer:",dc=`${cc}checked`,uc=`${cc}unchecked`,gc="Loading:",fc=`${gc}title`,pc="EmptyDataState:",mc=`${pc}title`,bc=`${pc}description`,wc=`${pc}title.filters`,vc=`${pc}description.filters`,yc=`${pc}buttons.filters.reset`;var Cc=Object.freeze({__proto__:null,CANCEL:Ml,CHECKBOX_CHECKED:dc,CHECKBOX_RENDERER_NAMESPACE:cc,CHECKBOX_UNCHECKED:uc,COMMON_NAMESPACE:xl,CONTEXTMENU_ITEMS_ADD_COMMENT:ql,CONTEXTMENU_ITEMS_ALIGNMENT:Ql,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:sh,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:eh,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:oh,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:th,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:rh,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:nh,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:ih,CONTEXTMENU_ITEMS_BORDERS:ah,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:ch,CONTEXTMENU_ITEMS_BORDERS_LEFT:dh,CONTEXTMENU_ITEMS_BORDERS_RIGHT:hh,CONTEXTMENU_ITEMS_BORDERS_TOP:lh,CONTEXTMENU_ITEMS_CLEAR_COLUMN:Bl,CONTEXTMENU_ITEMS_COPY:Fl,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:jl,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:zl,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:Wl,CONTEXTMENU_ITEMS_CUT:$l,CONTEXTMENU_ITEMS_EDIT_COMMENT:Xl,CONTEXTMENU_ITEMS_FREEZE_COLUMN:Ul,CONTEXTMENU_ITEMS_HIDE_COLUMN:ph,CONTEXTMENU_ITEMS_HIDE_ROW:bh,CONTEXTMENU_ITEMS_INSERT_LEFT:Al,CONTEXTMENU_ITEMS_INSERT_RIGHT:Pl,CONTEXTMENU_ITEMS_MERGE_CELLS:Gl,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:fh,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:gh,CONTEXTMENU_ITEMS_NO_ITEMS:_l,CONTEXTMENU_ITEMS_READ_ONLY:Vl,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:Jl,CONTEXTMENU_ITEMS_REDO:Ll,CONTEXTMENU_ITEMS_REMOVE_BORDERS:uh,CONTEXTMENU_ITEMS_REMOVE_COLUMN:Nl,CONTEXTMENU_ITEMS_REMOVE_COMMENT:Zl,CONTEXTMENU_ITEMS_REMOVE_ROW:Ol,CONTEXTMENU_ITEMS_ROW_ABOVE:Hl,CONTEXTMENU_ITEMS_ROW_BELOW:Il,CONTEXTMENU_ITEMS_SHOW_COLUMN:mh,CONTEXTMENU_ITEMS_SHOW_ROW:wh,CONTEXTMENU_ITEMS_UNDO:Dl,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:Yl,CONTEXTMENU_ITEMS_UNMERGE_CELLS:Kl,CONTEXT_MENU_ITEMS_NAMESPACE:Tl,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:yc,EMPTY_DATA_STATE_DESCRIPTION:bc,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:vc,EMPTY_DATA_STATE_NAMESPACE:pc,EMPTY_DATA_STATE_TITLE:mc,EMPTY_DATA_STATE_TITLE_FILTERS:wc,FILTERS_BUTTONS_CANCEL:Xh,FILTERS_BUTTONS_CLEAR:Kh,FILTERS_BUTTONS_OK:qh,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:Zh,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:Qh,FILTERS_BUTTONS_PLACEHOLDER_VALUE:Jh,FILTERS_BUTTONS_SELECT_ALL:Gh,FILTERS_CONDITIONS_AFTER:Lh,FILTERS_CONDITIONS_BEFORE:Vh,FILTERS_CONDITIONS_BEGINS_WITH:Eh,FILTERS_CONDITIONS_BETWEEN:Nh,FILTERS_CONDITIONS_BY_VALUE:Hh,FILTERS_CONDITIONS_CONTAINS:Th,FILTERS_CONDITIONS_EMPTY:Sh,FILTERS_CONDITIONS_ENDS_WITH:Mh,FILTERS_CONDITIONS_EQUAL:kh,FILTERS_CONDITIONS_GREATER_THAN:Ih,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:Ah,FILTERS_CONDITIONS_LESS_THAN:Ph,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:Oh,FILTERS_CONDITIONS_NAMESPACE:yh,FILTERS_CONDITIONS_NONE:Ch,FILTERS_CONDITIONS_NOT_BETWEEN:Dh,FILTERS_CONDITIONS_NOT_CONTAIN:_h,FILTERS_CONDITIONS_NOT_EMPTY:Rh,FILTERS_CONDITIONS_NOT_EQUAL:xh,FILTERS_CONDITIONS_TODAY:Bh,FILTERS_CONDITIONS_TOMORROW:Fh,FILTERS_CONDITIONS_YESTERDAY:Wh,FILTERS_DIVS_FILTER_BY_CONDITION:zh,FILTERS_DIVS_FILTER_BY_VALUE:jh,FILTERS_LABELS_CONJUNCTION:$h,FILTERS_LABELS_DISJUNCTION:Uh,FILTERS_NAMESPACE:vh,FILTERS_VALUES_BLANK_CELLS:Yh,LOADING_NAMESPACE:gc,LOADING_TITLE:fc,OK:El,PAGINATION_COUNTER_SECTION:ic,PAGINATION_FIRST_PAGE:sc,PAGINATION_LAST_PAGE:hc,PAGINATION_NAMESPACE:tc,PAGINATION_NAV_SECTION:rc,PAGINATION_NEXT_PAGE:lc,PAGINATION_PAGE_SIZE_AUTO:nc,PAGINATION_PAGE_SIZE_SECTION:oc,PAGINATION_PREV_PAGE:ac,PAGINATION_SECTION:ec});
30
+ /**
31
+ * @preserve
32
+ * Authors: Handsoncode
33
+ * Last updated: Nov 15, 2017
34
+ *
35
+ * Description: Definition file for English - United States language-country.
36
+ */const Sc={languageCode:"en-US",[El]:"OK",[Ml]:"Cancel",[_l]:"No available options",[Hl]:"Insert row above",[Il]:"Insert row below",[Al]:"Insert column left",[Pl]:"Insert column right",[Ol]:["Remove row","Remove rows"],[Nl]:["Remove column","Remove columns"],[Dl]:"Undo",[Ll]:"Redo",[Vl]:"Read only",[Bl]:"Clear column",[Ql]:"Alignment",[th]:"Left",[eh]:"Center",[nh]:"Right",[oh]:"Justify",[ih]:"Top",[rh]:"Middle",[sh]:"Bottom",[Ul]:"Freeze column",[Yl]:"Unfreeze column",[ah]:"Borders",[lh]:"Top",[hh]:"Right",[ch]:"Bottom",[dh]:"Left",[uh]:"Remove border(s)",[ql]:"Add comment",[Xl]:"Edit comment",[Zl]:"Delete comment",[Jl]:"Read-only comment",[Gl]:"Merge cells",[Kl]:"Unmerge cells",[Fl]:"Copy",[Wl]:["Copy with header","Copy with headers"],[zl]:["Copy with group header","Copy with group headers"],[jl]:["Copy header only","Copy headers only"],[$l]:"Cut",[gh]:"Insert child row",[fh]:"Detach from parent",[ph]:["Hide column","Hide columns"],[mh]:["Show column","Show columns"],[bh]:["Hide row","Hide rows"],[wh]:["Show row","Show rows"],[Ch]:"None",[Sh]:"Is empty",[Rh]:"Is not empty",[kh]:"Is equal to",[xh]:"Is not equal to",[Eh]:"Begins with",[Mh]:"Ends with",[Th]:"Contains",[_h]:"Does not contain",[Ih]:"Greater than",[Ah]:"Greater than or equal to",[Ph]:"Less than",[Oh]:"Less than or equal to",[Nh]:"Is between",[Dh]:"Is not between",[Lh]:"After",[Vh]:"Before",[Bh]:"Today",[Fh]:"Tomorrow",[Wh]:"Yesterday",[Yh]:"Blank cells",[zh]:"Filter by condition",[jh]:"Filter by value",[$h]:"And",[Uh]:"Or",[Gh]:"Select all",[Kh]:"Clear",[qh]:"OK",[Xh]:"Cancel",[Zh]:"Search",[Jh]:"Value",[Qh]:"Second value",[ec]:"Pagination",[oc]:"Page size",[nc]:"Auto",[ic]:"[start] - [end] of [total]",[rc]:"Page [currentPage] of [totalPages]",[sc]:"Go to first page",[ac]:"Go to previous page",[lc]:"Go to next page",[hc]:"Go to last page",[dc]:"Checked",[uc]:"Unchecked",[fc]:"Loading...",[mc]:"No data available",[bc]:"There’s nothing to display yet.",[wc]:"No results found",[vc]:"It looks like your current filters are hiding all results.",[yc]:"Reset filters"},Rc=Cc,kc=Sc.languageCode,{register:xc,getItem:Ec,hasItem:Mc,getValues:Tc}=Hn("languagesDictionaries");function _c(t,e){let n=t,o=e;return Et(t)&&(o=t,n=o.languageCode),function(t,e){t!==kc&&(n=e,Tt(Ec(kc),(t,e)=>{A(n[e])&&(n[e]=t)}));var n}(n,o),xc(n,St(o)),St(o)}function Hc(t){return Ic(t)?St(Ec(t)):null}function Ic(t){return Mc(t)}function Ac(t,e,n){const o=Hc(t);if(null===o)return null;const i=o[e];if(A(i))return null;const r=function(t,e){return Rl().reduce((t,n)=>n(t,e),t)}(i,n);return Array.isArray(r)?r[0]:r}function Pc(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}_c(Sc);class Oc extends is{constructor(t,e){super(t,null),Pc(this,"visualCellRange",null),this.visualCellRange=e||null,this.commit()}add(t){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(t):this.visualCellRange.expand(t),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(t){let{from:e,to:n}=t,o=this.getNearestNotHiddenCoords(e,1),i=this.getNearestNotHiddenCoords(n,-1);return null===o||null===i?null:((o.row>i.row||o.col>i.col)&&(o=e,i=n),this.settings.createCellRange(o,o,i))}getNearestNotHiddenCoords(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const o=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,t.row,e);if(null===o)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,t.col,n);return null===i?null:this.settings.createCellCoords(o,i)}getNearestNotHiddenIndex(t,e,n){return e<0?e:t.getNearestNotHiddenIndex(e,n)}commit(){if(null===this.visualCellRange)return this;const t=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===t?null:this.createRenderableCellRange(t.from,t.to),this}syncWith(t){const e=t.from.clone().normalize(),n="N-S"===t.getVerticalDirection()?1:-1,o="W-E"===t.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==i&&null!==i.col&&null!==i.row||(r=this.getNearestNotHiddenCoords(e,n,o)),null!==r&&t.overlaps(r)){const e=t.highlight.clone();if(e.row>=0&&(e.row=r.row),e.col>=0&&(e.col=r.col),null===this.cellRange){const t=this.settings.visualToRenderableCoords(e);this.cellRange=this.settings.createCellRange(t)}t.setHighlight(e)}return"focus"===this.settings.selectionType&&null!==i&&null===r&&t.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:t,to:e}=this.cellRange;return[Math.min(t.row,e.row),Math.min(t.col,e.col),Math.max(t.row,e.row),Math.max(t.col,e.col)]}getVisualCorners(){const t=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),e=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[t.row,t.col,e.row,e.col]}createRenderableCellRange(t,e){const n=this.settings.visualToRenderableCoords(t),o=this.settings.visualToRenderableCoords(e);return null===n.row||null===n.col||null===o.row||null===o.col?null:this.settings.createCellRange(n,n,o)}}function Nc(t){let{activeHeaderClassName:e,...n}=t;return new Oc({className:e,...n,selectionType:rs})}function Dc(t){let{areaCornerVisible:e,...n}=t;return new Oc({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:e},...n,selectionType:as})}function Lc(t){let{...e}=t;return new Oc({className:"highlight",...e,selectionType:as})}function Vc(t){let{columnClassName:e,...n}=t;return new Oc({className:e,...n,selectionType:"column"})}function Bc(t){let{headerClassName:e,...n}=t;return new Oc({className:e,...n,selectionType:ss})}function Fc(t){let{rowClassName:e,...n}=t;return new Oc({className:e,...n,selectionType:"row"})}function Wc(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function zc(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function jc(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var $c=new WeakSet;class Uc{constructor(t){Wc(this,$c),zc(this,"options",void 0),zc(this,"layerLevel",0),zc(this,"focus",void 0),zc(this,"fill",void 0),zc(this,"layeredAreas",new Map),zc(this,"areas",new Map),zc(this,"rowHeaders",new Map),zc(this,"columnHeaders",new Map),zc(this,"activeRowHeaders",new Map),zc(this,"activeColumnHeaders",new Map),zc(this,"activeCornerHeaders",new Map),zc(this,"rowHighlights",new Map),zc(this,"columnHighlights",new Map),zc(this,"customSelections",[]),this.options=t,this.focus=function(t){let{cellCornerVisible:e,...n}=t;return new Oc({className:"current",headerAttributes:[["aria-selected","true"]],border:{width:2,color:"#4b89ff",cornerVisible:e},...n,selectionType:ls})}(t),this.fill=function(t){let{...e}=t;return new Oc({className:"fill",border:{width:1,color:"#ff0000"},...e,selectionType:"fill"})}(t)}isEnabledFor(t,e){let n=t;t===ls&&(n="current");let o=this.options.disabledCellSelection(e.row,e.col);return"string"==typeof o&&(o=[o]),!1===o||Array.isArray(o)&&!o.includes(n)}useLayerLevel(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=t,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return jc($c,this,Yc).call(this,this.layeredAreas,Dc)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return jc($c,this,Yc).call(this,this.areas,Lc)}getAreas(){return[...this.areas.values()]}createRowHeader(){return jc($c,this,Yc).call(this,this.rowHeaders,Bc)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return jc($c,this,Yc).call(this,this.columnHeaders,Bc)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return jc($c,this,Yc).call(this,this.activeRowHeaders,Nc)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return jc($c,this,Yc).call(this,this.activeColumnHeaders,Nc)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return jc($c,this,Yc).call(this,this.activeCornerHeaders,Nc)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return jc($c,this,Yc).call(this,this.rowHighlights,Fc)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return jc($c,this,Yc).call(this,this.columnHighlights,Vc)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(t){this.customSelections.push(function(t){let{border:e,visualCellRange:n,...o}=t;return new Oc({...e,...o,selectionType:"custom-selection"},n)}({...this.options,...t}))}clear(){this.focus.clear(),this.fill.clear(),x(this.areas.values(),t=>{t.clear()}),x(this.layeredAreas.values(),t=>{t.clear()}),x(this.rowHeaders.values(),t=>{t.clear()}),x(this.columnHeaders.values(),t=>{t.clear()}),x(this.activeRowHeaders.values(),t=>{t.clear()}),x(this.activeColumnHeaders.values(),t=>{t.clear()}),x(this.activeCornerHeaders.values(),t=>{t.clear()}),x(this.rowHighlights.values(),t=>{t.clear()}),x(this.columnHighlights.values(),t=>{t.clear()})}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}function Yc(t,e){const n=this.layerLevel;if(t.has(n))return t.get(n);const o=e({layerLevel:n,...this.options});return t.set(n,o),o}function Gc(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Kc{constructor(t){Gc(this,"ranges",[]),Gc(this,"createCellRange",void 0),this.createCellRange=t}isEmpty(){return 0===this.size()}set(t){return this.clear(),this.ranges.push(this.createCellRange(t)),this}add(t){return this.ranges.push(this.createCellRange(t)),this}push(t){return this.ranges.push(t),this}pop(){return this.ranges.pop()}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>!0;return this.ranges.some((n,o)=>n.includes(t)&&e(n,o))}findAll(t){const e=[];return this.ranges.forEach((n,o)=>{n.isEqual(t)&&e.push({range:n,layer:o})}),e}remove(t){return this.ranges=this.ranges.filter(e=>!t.some(t=>t.isEqual(e))),this}removeLayers(t){return this.ranges=this.ranges.filter((e,n)=>!t.includes(n)),this}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}clone(){const t=new Kc(this.createCellRange);return t.ranges=this.ranges.map(t=>t.clone()),t}map(t){return this.ranges=this.ranges.map((e,n)=>t(e,n)),this}peekByIndex(){let t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e>=0&&e<this.size()&&(t=this.ranges[e]),t}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}function qc(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xc(t,e,n){Zc(t,e),e.set(t,n)}function Zc(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jc(t,e){return t.get(td(t,e))}function Qc(t,e,n){return t.set(td(t,e),n),n}function td(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var ed=new WeakMap,nd=new WeakMap,od=new WeakMap,id=new WeakSet;class rd{constructor(t,e){var n,o;Zc(n=this,o=id),o.add(n),Xc(this,ed,void 0),Xc(this,nd,0),Xc(this,od,{x:0,y:0}),qc(this,"tableApi",void 0),Qc(ed,this,t),this.tableApi=e}setActiveLayerIndex(t){Qc(nd,this,t)}getCurrentSelection(){return Jc(ed,this).peekByIndex(Jc(nd,this))}transformStart(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];Qc(od,this,this.calculateOffset());const o=this.tableApi.createCellCoords(t,e);let i=this.getCurrentSelection().highlight;const r=this.tableApi.visualToRenderableCoords(i);let s=0,a=0;if(this.runLocalHooks("beforeTransformStart",o),null!==r.row&&null!==r.col){let{width:t,height:e}=td(id,this,hd).call(this);const{row:r,col:l}=td(id,this,gd).call(this,i),h=this.tableApi.fixedRowsBottom(),c=this.tableApi.minSpareRows(),d=this.tableApi.minSpareCols(),u=this.tableApi.autoWrapRow(),g=this.tableApi.autoWrapCol(),f=this.tableApi.createCellCoords(r+o.row,l+o.col);if(f.row>=e){const o=At(n&&c>0&&0===h),i=f.col+1,r=i>=t,s=this.tableApi.createCellCoords(f.row-e,r?i-t:i);if(this.runLocalHooks("beforeColumnWrap",o,td(id,this,fd).call(this,s),r),o.value)this.runLocalHooks("insertRowRequire",this.countRenderableRows());else if(g){if(this.shouldSwitchSelectionLayer()&&r&&Jc(ed,this).size()>1){td(id,this,sd).call(this);const t=td(id,this,cd).call(this,"forward");null!==t&&s.assign(t)}f.assign(s)}}else if(f.row<0){const n=At(g),o=f.col-1,i=o<0,r=this.tableApi.createCellCoords(e+f.row,i?t+o:o);if(this.runLocalHooks("beforeColumnWrap",n,td(id,this,fd).call(this,r),i),g){if(this.shouldSwitchSelectionLayer()&&i&&Jc(ed,this).size()>1){td(id,this,ad).call(this);const t=td(id,this,cd).call(this,"backward");null!==t&&r.assign(t)}f.assign(r)}}if(({width:t,height:e}=td(id,this,hd).call(this)),f.col>=t){const o=At(n&&d>0),i=f.row+1,r=i>=e,s=this.tableApi.createCellCoords(r?i-e:i,f.col-t);if(this.runLocalHooks("beforeRowWrap",o,td(id,this,fd).call(this,s),r),o.value)this.runLocalHooks("insertColRequire",this.countRenderableColumns());else if(u){if(this.shouldSwitchSelectionLayer()&&r&&Jc(ed,this).size()>1){td(id,this,sd).call(this);const t=td(id,this,cd).call(this,"forward");null!==t&&s.assign(t)}f.assign(s)}}else if(f.col<0){const n=At(u),o=f.row-1,i=o<0,r=this.tableApi.createCellCoords(i?e+o:o,t+f.col);if(this.runLocalHooks("beforeRowWrap",n,td(id,this,fd).call(this,r),i),u){if(this.shouldSwitchSelectionLayer()&&i&&Jc(ed,this).size()>1){td(id,this,ad).call(this);const t=td(id,this,cd).call(this,"backward");null!==t&&r.assign(t)}f.assign(r)}}const{rowDir:p,colDir:m}=td(id,this,ld).call(this,f);s=p,a=m,i=td(id,this,fd).call(this,f)}return this.runLocalHooks("afterTransformStart",i,s,a),{selectionLayer:Jc(nd,this),visualCoords:i}}transformEnd(t,e){Qc(od,this,this.calculateOffset());const n=this.tableApi.createCellCoords(t,e),o=this.getCurrentSelection(),i=this.tableApi.visualToRenderableCoords(o.highlight),r=td(id,this,dd).call(this,o.to.row,o.from.row),s=td(id,this,ud).call(this,o.to.col,o.from.col),a=o.to.clone();let l=0,h=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==i.row&&null!==i.col&&null!==r&&null!==s){const{row:t,col:e}=td(id,this,gd).call(this,o.highlight),i=this.tableApi.createCellCoords(r+n.row,s+n.col),c=o.getTopStartCorner(),d=o.getTopEndCorner(),u=o.getBottomEndCorner();if(n.col<0&&s>=e&&i.col<e){const t=i.col-e;i.col=td(id,this,ud).call(this,c.col,d.col)+t}else if(n.col>0&&s<=e&&i.col>e){const t=td(id,this,ud).call(this,d.col,c.col),e=Math.max(i.col-t,1);i.col=t+e}if(n.row<0&&r>=t&&i.row<t){const e=i.row-t;i.row=td(id,this,dd).call(this,c.row,u.row)+e}else if(n.row>0&&r<=t&&i.row>t){const t=td(id,this,dd).call(this,u.row,c.row),e=Math.max(i.row-t,1);i.row=t+e}const{rowDir:g,colDir:f}=td(id,this,ld).call(this,i);l=g,h=f;const p=td(id,this,fd).call(this,i);0===n.row&&0!==n.col?a.col=p.col:0!==n.row&&0===n.col?a.row=p.row:(a.row=p.row,a.col=p.col)}return this.runLocalHooks("afterTransformEnd",a,l,h),{selectionLayer:Jc(nd,this),visualCoords:a}}calculateOffset(){wt("`calculateOffset` is not implemented")}countRenderableRows(){wt("`countRenderableRows` is not implemented")}countRenderableColumns(){wt("`countRenderableColumns` is not implemented")}shouldSwitchSelectionLayer(){wt("`shouldSwitchSelectionLayer` is not implemented")}}function sd(){const t=Jc(nd,this)+1;this.setActiveLayerIndex(t>=Jc(ed,this).size()?0:t),Qc(od,this,this.calculateOffset())}function ad(){const t=Jc(nd,this)-1;this.setActiveLayerIndex(t<0?Jc(ed,this).size()-1:t),Qc(od,this,this.calculateOffset())}function ld(t){const{width:e,height:n}=td(id,this,hd).call(this);let o=0,i=0;return t.row<0?(o=-1,t.row=0):t.row>0&&t.row>=n&&(o=1,t.row=n-1),t.col<0?(i=-1,t.col=0):t.col>0&&t.col>=e&&(i=1,t.col=e-1),{rowDir:o,colDir:i}}function hd(){return{width:Jc(od,this).x+this.countRenderableColumns(),height:Jc(od,this).y+this.countRenderableRows()}}function cd(t){if(!["forward","backward"].includes(t))return null;const e=this.getCurrentSelection().getTopStartCorner(),n=this.getCurrentSelection().getBottomEndCorner(),[o,i,r,s]="forward"===t?[e.row,n.row,e.col,n.col]:[n.row,e.row,n.col,e.col],a=td(id,this,dd).call(this,o,i),l=td(id,this,ud).call(this,r,s);return null===a||null===l?null:this.tableApi.createCellCoords(a,l)}function dd(t,e){const n=this.tableApi.findFirstNonHiddenRenderableRow(t,e);return null===n?null:Jc(od,this).y+n}function ud(t,e){const n=this.tableApi.findFirstNonHiddenRenderableColumn(t,e);return null===n?null:Jc(od,this).x+n}function gd(t){const{row:e,col:n}=this.tableApi.visualToRenderableCoords(t);return null!==e&&null!==n||wt("Renderable coords are not visible."),this.tableApi.createCellCoords(Jc(od,this).y+e,Jc(od,this).x+n)}function fd(t){const e=t.clone();return e.col=t.col-Jc(od,this).x,e.row=t.row-Jc(od,this).y,this.tableApi.renderableToVisualCoords(e)}kt(rd,os);class pd extends rd{calculateOffset(){return{x:this.tableApi.navigableHeaders()?this.tableApi.countRowHeaders():0,y:this.tableApi.navigableHeaders()?this.tableApi.countColHeaders():0}}countRenderableRows(){return this.tableApi.countRenderableRows()}countRenderableColumns(){return this.tableApi.countRenderableColumns()}shouldSwitchSelectionLayer(){return!1}}class md extends rd{calculateOffset(){const t=this.getCurrentSelection(),{row:e,col:n}=t.getOuterTopStartCorner(),o=this.tableApi.countRenderableColumnsInRange(0,n-1),i=this.tableApi.countRenderableRowsInRange(0,e-1),r=t.highlight.isHeader(),s=r?Math.abs(n):0,a=r?Math.abs(e):0;return{x:n<0?s:-o,y:e<0?a:-i}}countRenderableRows(){const t=this.getCurrentSelection();return this.tableApi.countRenderableRowsInRange(0,t.getOuterBottomEndCorner().row)}countRenderableColumns(){const t=this.getCurrentSelection();return this.tableApi.countRenderableColumnsInRange(0,t.getOuterBottomEndCorner().col)}transformEnd(){wt("`transformEnd` is not valid for focus selection use `transformStart` instead")}shouldSwitchSelectionLayer(){return!0}}const bd=[3,2],wd=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],vd=Symbol("root"),yd=Symbol("child");function Cd(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:vd;e!==vd&&e!==yd&&wt("The second argument is used internally only and cannot be overwritten.");const n=Array.isArray(t),o=e===vd;let i=0;if(n){const e=t[0];if(0===t.length)i=1;else if(o&&e instanceof Ci)i=3;else if(o&&Array.isArray(e))i=Cd(e,yd);else if(t.length>=2&&t.length<=4){const e=!t.some((t,e)=>!wd[e].includes(typeof t));e&&(i=2)}}return i}function Sd(t){let{createCellCoords:e,createCellRange:n,keepDirection:o=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return bd.includes(t)||wt("Unsupported selection ranges schema type was provided."),function(r){const s=3===t;let a=s?r.from.row:r[0],l=s?r.from.col:r[1],h=s?r.to.row:r[2],c=s?r.to.col:r[3];if("function"==typeof i&&("string"==typeof l&&(l=i(l)),"string"==typeof c&&(c=i(c))),A(h)&&(h=a),A(c)&&(c=l),!o){const t=a,e=l,n=h,o=c;a=Math.min(t,n),l=Math.min(e,o),h=Math.max(t,n),c=Math.max(e,o)}const d=s?r.highlight.clone():e(a,l),u=e(a,l),g=e(h,c);return n(d,u,g)}}function Rd(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function kd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function xd(t,e){return t.get(Md(t,e))}function Ed(t,e,n){return t.set(Md(t,e),n),n}function Md(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Td=new WeakMap,_d=new WeakMap,Hd=new WeakMap,Id=new WeakMap,Ad=new WeakMap,Pd=new WeakMap,Od=new WeakMap;class Nd{constructor(t,e){var n=this;kd(this,"settings",void 0),kd(this,"tableProps",void 0),kd(this,"inProgress",!1),kd(this,"selectedRange",new Kc((t,e,n)=>this.tableProps.createCellRange(t,e,n))),kd(this,"highlight",void 0),Rd(this,Td,void 0),Rd(this,_d,void 0),kd(this,"selectedByRowHeader",new Set),kd(this,"selectedByColumnHeader",new Set),Rd(this,Hd,!1),Rd(this,Id,!1),Rd(this,Ad,"unknown"),Rd(this,Pd,-1),Rd(this,Od,0),this.settings=t,this.tableProps=e,this.highlight=new Uc({headerClassName:t.currentHeaderClassName,activeHeaderClassName:t.activeHeaderClassName,rowClassName:t.currentRowClassName,columnClassName:t.currentColClassName,cellAttributes:[["aria-selected","true"]],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(t,e)=>this.tableProps.isDisabledCellSelection(t,e),cellCornerVisible:function(){return n.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return n.isAreaCornerVisible(...arguments)},visualToRenderableCoords:t=>this.tableProps.visualToRenderableCoords(t),renderableToVisualCoords:t=>this.tableProps.renderableToVisualCoords(t),createCellCoords:(t,e)=>this.tableProps.createCellCoords(t,e),createCellRange:(t,e,n)=>this.tableProps.createCellRange(t,e,n)}),Ed(Td,this,new pd(this.selectedRange,{...this.tableProps,navigableHeaders:()=>t.navigableHeaders,fixedRowsBottom:()=>t.fixedRowsBottom,minSpareRows:()=>t.minSpareRows,minSpareCols:()=>t.minSpareCols,autoWrapRow:()=>t.autoWrapRow,autoWrapCol:()=>t.autoWrapCol})),Ed(_d,this,new md(this.selectedRange,{...this.tableProps,navigableHeaders:()=>t.navigableHeaders,fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),xd(Td,this).addLocalHook("beforeTransformStart",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("beforeModifyTransformStart",...e)}),xd(Td,this).addLocalHook("afterTransformStart",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("afterModifyTransformStart",...e)}),xd(Td,this).addLocalHook("beforeTransformEnd",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("beforeModifyTransformEnd",...e)}),xd(Td,this).addLocalHook("afterTransformEnd",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("afterModifyTransformEnd",...e)}),xd(Td,this).addLocalHook("insertRowRequire",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("insertRowRequire",...e)}),xd(Td,this).addLocalHook("insertColRequire",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("insertColRequire",...e)}),xd(Td,this).addLocalHook("beforeRowWrap",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("beforeRowWrap",...e)}),xd(Td,this).addLocalHook("beforeColumnWrap",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("beforeColumnWrap",...e)}),xd(_d,this).addLocalHook("beforeTransformStart",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("beforeModifyTransformFocus",...e)}),xd(_d,this).addLocalHook("afterTransformStart",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.runLocalHooks("afterModifyTransformFocus",...e)})}getSelectedRange(){return this.selectedRange}getActiveSelectedRange(){return this.selectedRange.peekByIndex(xd(Od,this))}getActiveSelectionLayerIndex(){return xd(Od,this)}setActiveSelectionLayerIndex(t){Ed(Od,this,t)}markSource(t){Ed(Ad,this,t)}markEndSource(){Ed(Ad,this,"unknown")}getSelectionSource(){return xd(Ad,this)}setExpectedLayers(t){Ed(Pd,this,t)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,Ed(Pd,this,-1)}isInProgress(){return this.inProgress}setRangeStart(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t;const i="multiple"===this.settings.selectionMode,r=A(e)?this.tableProps.getShortcutManager().isCtrlPressed():e,s=t.clone();Ed(Id,this,!1),Ed(Hd,this,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),s),(!i||i&&!r&&A(e))&&(this.selectedRange.clear(),x(this.highlight.getAreas(),t=>{t.clear()}),x(this.highlight.getLayeredAreas(),t=>{t.clear()}),x(this.highlight.getRowHeaders(),t=>{t.clear()}),x(this.highlight.getColumnHeaders(),t=>{t.clear()}),x(this.highlight.getActiveRowHeaders(),t=>{t.clear()}),x(this.highlight.getActiveColumnHeaders(),t=>{t.clear()}),x(this.highlight.getActiveCornerHeaders(),t=>{t.clear()}),x(this.highlight.getRowHighlights(),t=>{t.clear()}),x(this.highlight.getColumnHighlights(),t=>{t.clear()})),this.selectedRange.add(s).current().setHighlight(o.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),n||this.setRangeEnd(t)}setRangeStartOnly(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;this.setRangeStart(t,e,!0,n)}setRangeEnd(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e);const n=t.clone(),o=this.tableProps.countRows(),i=this.tableProps.countCols(),r=this.getActiveSelectedRange().clone().setTo(t).isSingleHeader();if((o>0||i>0)&&(0===o&&n.col<0&&!r||0===i&&n.row<0&&!r))return;this.runLocalHooks("beforeSetRangeEnd",n),this.begin();const s=this.getActiveSelectedRange();if(this.settings.navigableHeaders||s.highlight.normalize(),"single"===this.settings.selectionMode)s.setFrom(s.highlight),s.setTo(s.highlight);else{const t=s.getHorizontalDirection(),e=s.getVerticalDirection(),o=this.isMultiple();s.setTo(n),o&&(t!==s.getHorizontalDirection()||1===s.getWidth()&&!s.includes(s.highlight))&&s.from.assign({col:s.highlight.col}),o&&(e!==s.getVerticalDirection()||1===s.getHeight()&&!s.includes(s.highlight))&&s.from.assign({row:s.highlight.row})}o>0&&i>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!s.isSingleHeader())&&s.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.getActiveSelectedRange().highlight,e),this.applyAndCommit(this.getActiveSelectedRange(),e);const a=-1===xd(Pd,this)||this.selectedRange.size()===xd(Pd,this);this.runLocalHooks("afterSetRangeEnd",t,a)}applyAndCommit(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getActiveSelectedRange(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const n=this.tableProps.countRows(),o=this.tableProps.countCols();this.highlight.useLayerLevel(e);const i=this.highlight.createArea(),r=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),l=this.highlight.createActiveRowHeader(),h=this.highlight.createActiveColumnHeader(),c=this.highlight.createActiveCornerHeader(),d=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();if(i.clear(),r.clear(),s.clear(),a.clear(),l.clear(),h.clear(),c.clear(),d.clear(),u.clear(),this.highlight.isEnabledFor(as,t.highlight)&&(this.isMultiple()||e>=1)&&(i.add(t.from).add(t.to).commit(),r.add(t.from).add(t.to).commit(),1===e)){const t=this.selectedRange.peekByIndex(e-1);this.highlight.useLayerLevel(e-1),this.highlight.createArea().add(t.from).commit().syncWith(t),this.highlight.createLayeredArea().add(t.from).commit().syncWith(t),this.highlight.useLayerLevel(e)}if(this.highlight.isEnabledFor(ss,t.highlight)){if(!t.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(t.from.row,0),-1),n=this.tableProps.createCellCoords(t.to.row,-1),o=this.tableProps.createCellCoords(-1,Math.max(t.from.col,0)),i=this.tableProps.createCellCoords(-1,t.to.col);"single"===this.settings.selectionMode?(s.add(e).commit(),a.add(o).commit(),d.add(e).commit(),u.add(o).commit()):(s.add(e).add(n).commit(),a.add(o).add(i).commit(),d.add(e).add(n).commit(),u.add(o).add(i).commit())}const e=!xd(Id,this)&&this.isEntireRowSelected()&&(o>0&&o===t.getWidth()||0===o&&this.isSelectedByRowHeader()),i=!xd(Id,this)&&this.isEntireColumnSelected()&&(n>0&&n===t.getHeight()||0===n&&this.isSelectedByColumnHeader());e&&l.add(this.tableProps.createCellCoords(Math.max(t.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(t.to.row,0),-1)).commit(),i&&h.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(t.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(t.to.col,0))).commit(),e&&i&&c.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e),xd(Td,this).setActiveLayerIndex(e),xd(_d,this).setActiveLayerIndex(e);const n=this.getActiveSelectedRange();this.inProgress||this.runLocalHooks("beforeSetFocus",t);const o=this.highlight.getFocus();o.clear(),n.setHighlight(t),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(ls,n.highlight)&&o.add(n.highlight).commit().syncWith(n),this.inProgress||(Ed(Hd,this,!0),this.runLocalHooks("afterSetFocus",n.highlight))}transformStart(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const{visualCoords:o}=xd(Td,this).transformStart(t,e,n);this.setRangeStart(o)}transformEnd(t,e){const{visualCoords:n,selectionLayer:o}=xd(Td,this).transformEnd(t,e);this.setRangeEnd(n,o)}transformFocus(t,e){const{selectionLayer:n,visualCoords:o}=xd(_d,this).transformStart(t,e);this.setRangeFocus(o.normalize(),n)}shiftRows(t,e){if(!this.isSelected())return;const n=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||n.getOuterTopStartCorner().row>=t){const{from:o,to:i,highlight:r}=n,s=this.tableProps.countRows(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),h=l?-1:0,c=l?0:e;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords(co(o.row+c,h,s-1),o.col),u=this.tableProps.createCellCoords(co(i.row+e,h,s-1),i.col);this.markSource("shift"),r.row>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(co(r.row+e,0,s-1),r.col)):this.setRangeStartOnly(d,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.markEndSource()}}shiftColumns(t,e){if(!this.isSelected())return;const n=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||n.getOuterTopStartCorner().col>=t){const{from:o,to:i,highlight:r}=n,s=this.tableProps.countCols(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),h=a?-1:0,c=a?0:e;this.getSelectedRange().pop();const d=this.tableProps.createCellCoords(o.row,co(o.col+c,h,s-1)),u=this.tableProps.createCellCoords(i.row,co(i.col+e,h,s-1));this.markSource("shift"),r.col>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(r.row,co(r.col+e,0,s-1))):this.setRangeStartOnly(d,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getActiveSelectedRange();if(!this.isSelected())return!1;const e=At(!t.isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&xd(Hd,this)}isSelectedByRowHeader(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(t)&&(-1===t?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(t))}isEntireRowSelected(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const e=t=>{const{col:e}=t.getOuterTopStartCorner(),n=this.tableProps.countRowHeaders(),o=this.tableProps.countCols();return(n>0&&e<0||0===n)&&t.getWidth()===o};if(-1===t)return Array.from(this.selectedRange).some(t=>e(t));const n=this.selectedRange.peekByIndex(t);return!!n&&e(n)}isSelectedByColumnHeader(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===t?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(t))}isEntireColumnSelected(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const e=t=>{const{row:e}=t.getOuterTopStartCorner(),n=this.tableProps.countColHeaders(),o=this.tableProps.countRows();return(n>0&&e<0||0===n)&&t.getHeight()===o};if(-1===t)return Array.from(this.selectedRange).some(t=>e(t));const n=this.selectedRange.peekByIndex(t);return!!n&&e(n)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(t){return this.selectedRange.includes(t)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(t){const e=this.tableProps.visualToRenderableCoords(t);return null!==e.row&&null!==e.col}isAreaCornerVisible(t){return(!Number.isInteger(t)||t===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var t;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),r=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=n?-a:0,h=e?-s:0;if(0===l&&0===h&&(0===i||0===r))return;let c=null===(t=this.getActiveSelectedRange())||void 0===t?void 0:t.highlight;const{focusPosition:d,disableHeadersHighlight:u}=o;d&&Number.isInteger(null==d?void 0:d.row)&&Number.isInteger(null==d?void 0:d.col)&&(c=this.tableProps.createCellCoords(co(d.row,l,i-1),co(d.col,h,r-1)));const g=this.tableProps.createCellCoords(l,h),f=this.tableProps.createCellCoords(i-1,r-1);this.clear(),this.runLocalHooks("beforeSelectAll",g,f,c),this.setRangeStartOnly(g,void 0,c),Ed(Id,this,u),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.runLocalHooks("afterSelectAll",g,f,c),this.finish()}selectCells(t){var e=this;const n=Cd(t);if(1===n)return!1;0===n&&wt(T`Unsupported format of the selection ranges was passed. To select cells pass\x20
37
+ the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
38
+ columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=Sd(n,{createCellCoords:function(){return e.tableProps.createCellCoords(...arguments)},createCellRange:function(){return e.tableProps.createCellRange(...arguments)},propToCol:t=>this.tableProps.propToCol(t),keepDirection:!0}),i=this.settings.navigableHeaders,r={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},s=!t.some(t=>{const e=o(t),n=e.isValid(r);return!(n&&!e.containsHeaders()||n&&e.containsHeaders()&&e.isSingleHeader())});return s&&(this.clear(),this.setExpectedLayers(t.length),x(t,t=>{const{from:e,to:n}=o(t);this.setRangeStartOnly(e.clone(),!1),this.setRangeEnd(n.clone())}),this.finish()),s}selectColumns(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o="string"==typeof t?this.tableProps.propToCol(t):t,i="string"==typeof e?this.tableProps.propToCol(e):e,r=this.tableProps.countRows(),s=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,h=this.tableProps.createCellCoords(l,o),c=this.tableProps.createCellCoords(r-1,i),d=this.tableProps.createCellRange(h,h,c).isValid({countRows:r,countCols:s,countRowHeaders:0,countColHeaders:a});if(d){let t=0,e=0;Number.isInteger(null==n?void 0:n.row)&&Number.isInteger(null==n?void 0:n.col)?(t=co(n.row,l,r-1),e=co(n.col,Math.min(o,i),Math.max(o,i))):(t=co(n,l,r-1),e=o);const s=this.tableProps.createCellCoords(t,e),h=0===a?0:co(s.row,l,-1),c=r-1,d=this.tableProps.createCellCoords(h,o),u=this.tableProps.createCellCoords(c,i);this.runLocalHooks("beforeSelectColumns",d,u,s),this.setRangeStartOnly(d,void 0,s),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectColumns",d,u,s),this.finish()}return d}selectRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const o=this.tableProps.countRows(),i=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),s=0===r?0:-r,a=this.tableProps.createCellCoords(t,s),l=this.tableProps.createCellCoords(e,i-1),h=this.tableProps.createCellRange(a,a,l).isValid({countRows:o,countCols:i,countRowHeaders:r,countColHeaders:0});if(h){let o=0,a=0;Number.isInteger(null==n?void 0:n.row)&&Number.isInteger(null==n?void 0:n.col)?(o=co(n.row,Math.min(t,e),Math.max(t,e)),a=co(n.col,s,i-1)):(o=t,a=co(n,s,i-1));const l=this.tableProps.createCellCoords(o,a),h=0===r?0:co(l.col,s,-1),c=i-1,d=this.tableProps.createCellCoords(t,h),u=this.tableProps.createCellCoords(e,c);this.runLocalHooks("beforeSelectRows",d,u,l),this.setRangeStartOnly(d,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",d,u,l),this.finish()}return h}importSelection(t){let{ranges:e,activeRange:n,activeSelectionLayer:o,selectedByRowHeader:i,selectedByColumnHeader:r,disableHeadersHighlight:s}=t;0!==e.length&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,Ed(Id,this,s),this.selectedByRowHeader=new Set(i),this.selectedByColumnHeader=new Set(r),this.setActiveSelectionLayerIndex(0),e.forEach((t,e)=>{this.selectedRange.push(t),this.applyAndCommit(t,e)}),this.setRangeFocus(n.highlight,o),Ed(Id,this,!1),this.inProgress=!1)}exportSelection(){return{ranges:Array.from(this.selectedRange).map(t=>t.clone()),activeRange:this.getActiveSelectedRange(),activeSelectionLayer:this.getActiveSelectionLayerIndex(),selectedByRowHeader:Array.from(this.selectedByRowHeader),selectedByColumnHeader:Array.from(this.selectedByColumnHeader),disableHeadersHighlight:xd(Id,this)}}refresh(){if(!this.isSelected())return;const t=this.tableProps.countRows(),e=this.tableProps.countCols();if(0===t||0===e)return void this.deselect();const n=this.selectedRange.ranges.map(t=>t.clone());"unknown"===this.getSelectionSource()&&this.markSource("refresh");const o=new Set(this.selectedByRowHeader),i=new Set(this.selectedByColumnHeader);this.clear(),this.setExpectedLayers(n.length),n.forEach(n=>{const{from:o,to:i,highlight:r}=n,s=t-1,a=e-1;r.assign({row:co(r.row,this.settings.navigableHeaders?-1/0:0,s),col:co(r.col,this.settings.navigableHeaders?-1/0:0,a)}),o.assign({row:co(o.row,-1/0,s),col:co(o.col,-1/0,a)}),i.assign({row:co(i.row,-1/0,s),col:co(i.col,-1/0,a)}),this.setRangeStartOnly(o,!0,r),this.setRangeEnd(i)}),this.selectedByRowHeader=o,this.selectedByColumnHeader=i,this.finish(),this.markEndSource()}commit(){if(this.highlight.getCustomSelections().forEach(t=>{t.commit()}),!this.isSelected())return;const t=this.getLayerLevel(),e=this.getActiveSelectedRange();this.highlight.isEnabledFor(ls,e.highlight)&&this.highlight.getFocus().commit().syncWith(e);for(let t=0;t<this.selectedRange.size();t+=1){this.highlight.useLayerLevel(t);const e=this.highlight.createArea(),n=this.highlight.createLayeredArea(),o=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),r=this.highlight.createActiveRowHeader(),s=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();e.commit(),n.commit(),o.commit(),i.commit(),r.commit(),s.commit(),a.commit(),l.commit(),h.commit()}this.highlight.useLayerLevel(t)}}kt(Nd,os);const Dd=/^(\r\n|\n\r|\r|\n)/,Ld=/^[^\t\r\n]+/,Vd=/^\t/;function Bd(t){let e,n,o,i,r,s="";for(e=0,n=t.length;e<n;e+=1){for(i=t[e].length,o=0;o<i;o+=1)o>0&&(s+="\t"),r=t[e][o],"string"==typeof r?r.indexOf("\n")>-1?s+=`"${r.replace(/"/g,'""')}"`:s+=r:s+=null==r?"":r;e!==n-1&&(s+="\n")}return s}function Fd(t,e){const{instance:n,visualRow:o,visualCol:i,valueSetter:r}=e;return Ze(r)?r.call(n,t,o,i,e):t}function Wd(t,e){const{instance:n,visualRow:o,visualCol:i,valueGetter:r}=e;return Ze(r)?r.call(n,t,o,i,e):t}function zd(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class jd{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(t,e,n){zd(this,"hot",void 0),zd(this,"metaManager",void 0),zd(this,"tableMeta",void 0),zd(this,"dataSource",void 0),zd(this,"duckSchema",void 0),zd(this,"colToPropCache",void 0),zd(this,"propToColCache",void 0),this.hot=t,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=e,this.refreshDuckSchema(),this.createMap()}createMap(){const t=this.getSchema();void 0===t&&wt("trying to create `columns` definition but you didn't provide `schema` nor `data`");const e=this.tableMeta.columns;let n;if(this.colToPropCache=[],this.propToColCache=new Map,e){let o=0,i=0,r=!1;if("function"==typeof e){const e=It(t);o=e>0?e:this.countFirstRowKeys(),r=!0}else{const t=this.tableMeta.maxCols;o=Math.min(t,e.length)}for(n=0;n<o;n++){const t=r?e(n):e[n];if(Et(t)){if(void 0!==t.data){const e=r?i:n;this.colToPropCache[e]=t.data,this.propToColCache.set(t.data,e)}i+=1}}}else this.recursiveDuckColumns(t)}countFirstRowKeys(){return Na(this.dataSource)}recursiveDuckColumns(t,e,n){let o,i=e,r=n;return void 0===i&&(i=0,r=""),"object"!=typeof t||Array.isArray(t)||Tt(t,(t,e)=>{null===t?(o=r+e,this.colToPropCache.push(o),this.propToColCache.set(o,i),i+=1):i=this.recursiveDuckColumns(t,i,`${e}.`)}),i}colToProp(t){if(!1===Number.isInteger(t))return t;const e=this.hot.toPhysicalColumn(t);return null===e?t:this.colToPropCache&&I(this.colToPropCache[e])?this.colToPropCache[e]:e}propToCol(t){const e=this.propToColCache.get(t);if(I(e))return this.hot.toVisualColumn(e);const n=this.hot.toVisualColumn(t);return null===n?t:n}getSchema(){const t=this.tableMeta.dataSchema;return t?"function"==typeof t?t():t:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?vt(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:o="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let r=i,s=0,a=t;("number"!=typeof a||a>=i)&&(a=i),a<this.hot.countRows()&&(r=this.hot.toPhysicalRow(a));if(!1===this.hot.runHooks("beforeCreateRow",a,e,n)||null===r)return{delta:0};const l=this.tableMeta.maxRows,h=this.getSchema().length,c=[];for(;s<e&&i+s<l;){let t=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?t=St(this.getSchema()):(t=[],ao(h-1,()=>t.push(null))):"function"===this.hot.dataType?t=this.tableMeta.dataSchema(a+s):(t={},Ct(t,this.getSchema())),c.push(t),s+=1}this.hot.rowIndexMapper.insertIndexes(a,s),"below"===o&&(r=Math.min(r+1,i)),this.spliceData(r,0,c);const d=this.hot.toVisualRow(r);return this.hot.countSourceRows()===c.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),s>0&&(null==t?this.metaManager.createRow(null,s):"auto"!==n&&this.metaManager.createRow(r,e)),this.hot.runHooks("afterCreateRow",d,s,n),{delta:s,startPhysicalIndex:r}}createCol(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:o="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.hot.isColumnModificationAllowed()||wt("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const i=this.dataSource,r=this.tableMeta.maxCols,s=this.hot.countSourceCols(),a=this.hot.countCols(),l=this.hot.countSourceRows(),h="number"==typeof t&&t<=s?t:a;if(!1===this.hot.runHooks("beforeCreateCol",h,e,n))return{delta:0};const c=h<a?this.hot.toPhysicalColumn(h):s,d="end"===o?Math.min(c+1,s):c;let u=0;for(let t=d;u<e&&a+u<r;t++){if("number"!=typeof h||h>=a+u)if(l>0)for(let t=0;t<l;t+=1)void 0===i[t]&&(i[t]=[]),i[t].push(null);else i.push([null]);else for(let e=0;e<l;e++)i[e].splice(t,0,null);u+=1}return u>0&&(null==t?this.metaManager.createColumn(null,u):"auto"!==n&&this.metaManager.createColumn(d,e)),this.hot.columnIndexMapper.insertIndexes(h,u,o),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(d),u,n),this.refreshDuckSchema(),{delta:u,startPhysicalIndex:d}}removeRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,o=Number.isInteger(t)?t:-e;const i=this.visualRowsToPhysical(o,e),r=this.hot.countSourceRows();o=(r+o)%r;if(!1===this.hot.runHooks("beforeRemoveRow",o,i.length,i,n))return!1;const s=i.length;if(this.filterData(o,s,i),o<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const t=I(this.tableMeta.columns)||I(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||t||this.hot.columnIndexMapper.setIndexesSequence([])}return i.slice(0).sort((t,e)=>e-t).forEach(t=>{this.metaManager.removeRow(t,1)}),this.hot.runHooks("afterRemoveRow",o,s,i,n),!0}removeCol(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;("object"===this.hot.dataType||this.tableMeta.columns)&&wt("cannot remove column with object data source or columns option specified");let o="number"!=typeof t?-e:t;o=(this.hot.countCols()+o)%this.hot.countCols();const i=this.visualColumnsToPhysical(o,e),r=i.slice(0).sort((t,e)=>e-t);if(!1===this.hot.runHooks("beforeRemoveCol",o,e,i,n))return!1;let s=!0;const a=r.length,l=this.dataSource;for(let t=0;t<a;t++)s&&i[0]!==i[t]-t&&(s=!1);if(s)for(let t=0,n=this.hot.countSourceRows();t<n;t++)l[t].splice(i[0],e),0===t&&this.metaManager.removeColumn(i[0],e);else for(let t=0,e=this.hot.countSourceRows();t<e;t++)for(let e=0;e<a;e++)l[t].splice(r[e],1),0===t&&this.metaManager.removeColumn(r[e],1);return o<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",o,e,i,n),this.refreshDuckSchema(),!0}spliceCol(t,e,n){const o=this.hot.getDataAtCol(t),i=o.slice(e,e+n),r=o.slice(e+n);for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l<s;l++)a[l-3]=arguments[l];y(a,r);let h=0;for(;h<n;)a.push(null),h+=1;return function(t){const e=t.length;let n=0;for(;n<e;)t[n]=[t[n]],n+=1}(a),this.hot.populateFromArray(e,t,a,null,null,"spliceCol"),i}spliceRow(t,e,n){const o=this.hot.getSourceDataAtRow(t),i=o.slice(e,e+n),r=o.slice(e+n);for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l<s;l++)a[l-3]=arguments[l];y(a,r);let h=0;for(;h<n;)a.push(null),h+=1;return this.hot.populateFromArray(t,e,[a],null,null,"spliceRow"),i}spliceData(t,e,n){if(!1!==this.hot.runHooks("beforeDataSplice",t,e,n)){const e=[...this.dataSource.slice(0,t),...n,...this.dataSource.slice(t)];this.dataSource.length=0,e.forEach(t=>this.dataSource.push(t))}}filterData(t,e,n){let o=this.hot.runHooks("filterData",t,e,n);!1===Array.isArray(o)&&(o=this.dataSource.filter((t,e)=>-1===n.indexOf(e))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,o)}get(t,e){const n=this.hot.toPhysicalRow(t);let o=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);o=isNaN(i)?i:o;const{dataDotNotation:r}=this.hot.getSettings();let s=null;if(o&&o.hasOwnProperty&&Pt(o,e))s=o[e];else if(r&&"string"==typeof e&&e.indexOf(".")>-1){let t=o;if(!t)return null;const n=e.split(".");for(let e=0,o=n.length;e<o;e++)if(t=t[n[e]],void 0===t)return null;s=t}else"function"==typeof e&&(s=e(this.dataSource.slice(n,n+1)[0]));const a=this.propToCol(e),l=this.hot.toPhysicalColumn(a);if(uo(n)&&uo(l)&&(s=Wd(s,this.metaManager.getCellMeta(n,l,{visualRow:t,visualColumn:a,skipMetaExtension:!0}))),this.hot.hasHook("modifyData")){const e=At(s);this.hot.runHooks("modifyData",t,a,e,"get"),e.isTouched()&&(s=e.value)}return s}getCopyable(t,e){return this.hot.getCellMeta(t,this.propToCol(e)).copyable?this.get(t,e):""}set(t,e,n){const o=this.hot.toPhysicalRow(t);let i=n,r=this.dataSource[o];const s=this.hot.runHooks("modifyRowData",o);if(r=isNaN(s)?s:r,this.hot.hasHook("modifyData")){const n=At(i);this.hot.runHooks("modifyData",t,this.propToCol(e),n,"set"),n.isTouched()&&(i=n.value)}const{dataDotNotation:a}=this.hot.getSettings();if(r&&r.hasOwnProperty&&Pt(r,e))r[e]=i;else if(a&&"string"==typeof e&&e.indexOf(".")>-1){let t,n=r,o=0;const s=e.split(".");for(o=0,t=s.length-1;o<t;o++){if("__proto__"===s[o]||"constructor"===s[o]||"prototype"===s[o])return;void 0===n[s[o]]&&(n[s[o]]={}),n=n[s[o]]}n[s[o]]=i}else if("function"==typeof e)e(this.dataSource.slice(o,o+1)[0],i);else{if("__proto__"===e||"constructor"===e||"prototype"===e)return;r[e]=i}}visualRowsToPhysical(t,e){const n=this.hot.countSourceRows(),o=[];let i,r=(n+t)%n,s=e;for(;r<n&&s;)i=this.hot.toPhysicalRow(r),o.push(i),s-=1,r+=1;return o}visualColumnsToPhysical(t,e){const n=this.hot.countCols(),o=[];let i=(n+t)%n,r=e;for(;i<n&&r;){const t=this.hot.toPhysicalColumn(i);o.push(t),r-=1,i+=1}return o}clear(){for(let t=0;t<this.hot.countSourceRows();t++)for(let e=0;e<this.hot.countCols();e++)this.set(t,this.colToProp(e),"")}getLength(){const t=this.tableMeta.maxRows;let e;e=t<0||0===t?0:t||1/0;const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(n,e)}getAll(){const t={row:0,col:0},e={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return t.row-e.row!==0||this.hot.countSourceRows()?this.getRange(t,e,jd.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(t,e,n){const o=[];let i,r,s;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const h=n===jd.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(a-1,0),Math.max(t.row,e.row)),d=Math.min(Math.max(l-1,0),Math.max(t.col,e.col));for(i=Math.min(t.row,e.row);i<=c;i++){s=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(r=Math.min(t.col,e.col);r<=d&&null!==n;r++)s.push(h.call(this,i,this.colToProp(r)));null!==n&&o.push(s)}return o}getText(t,e){return Bd(this.getRange(t,e,jd.DESTINATION_RENDERER))}getCopyableText(t,e){return Bd(this.getRange(t,e,jd.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}function $d(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ud{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];$d(this,"hot",void 0),$d(this,"data",void 0),$d(this,"dataType","array"),$d(this,"colToProp",()=>{}),$d(this,"propToCol",()=>{}),this.hot=t,this.data=e}modifyRowData(t){let e;return this.hot.hasHook("modifyRowData")&&(e=this.hot.runHooks("modifyRowData",t)),void 0===e||Number.isInteger(e)?this.data[t]:e}getData(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,t):this.data}setData(t){this.data=t}getAtColumn(t){const e=[];return x(this.data,(n,o)=>{const i=this.getAtCell(o,t);e.push(i)}),e}getAtRow(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=void 0===e&&void 0===n,{dataDotNotation:r}=this.hot.getSettings();let s=null,a=null;if(s=this.modifyRowData(t),Array.isArray(s))a=[],i?s.forEach((e,n)=>{a[n]=this.getAtPhysicalCell(t,n,s)}):ao(e,n,n=>{a[n-e]=this.getAtPhysicalCell(t,n,s)});else if(Et(s)||Ze(s))if(a=o?[]:{},!i||o){const i=0,l=this.countFirstRowKeys()-1;ao(i,l,h=>{const c=this.colToProp(h);if(h>=(e||i)&&h<=(n||l)&&!Number.isInteger(c)){const e=this.getAtPhysicalCell(t,c,s);o?a.push(e):r?Ht(a,c,e):a[c]=e}})}else Tt(s,(e,n)=>{const o=this.getAtPhysicalCell(t,n,s);r?Ht(a,n,o):a[n]=o});return a}setAtCell(t,e,n){if(!(t>=this.countRows()||e>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const o=At(n);this.hot.runHooks("modifySourceData",t,e,o,"set"),o.isTouched()&&(n=o.value)}["__proto__","constructor","prototype"].includes(t)||(Number.isInteger(e)?this.data[t][e]=n:Ht(this.data[t],e,n))}}getAtPhysicalCell(t,e,n){let o=null;if(n)if("string"==typeof e){const{dataDotNotation:t}=this.hot.getSettings();o=t?_t(n,e):n[e]}else o="function"==typeof e?e(n):n[e];if(this.hot.hasHook("modifySourceData")){const n=At(o);this.hot.runHooks("modifySourceData",t,e,n,"get"),n.isTouched()&&(o=n.value)}return o}getAtCell(t,e){const n=this.modifyRowData(t);return this.getAtPhysicalCell(t,this.colToProp(e),n)}getByRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=!1,i=null,r=null,s=null,a=null;null===t||null===e?(o=!0,i=0,s=this.countRows()-1):(i=Math.min(t.row,e.row),r=Math.min(t.col,e.col),s=Math.max(t.row,e.row),a=Math.max(t.col,e.col));const l=[];return ao(i,s,t=>{l.push(o?this.getAtRow(t,void 0,void 0,n):this.getAtRow(t,r,a,n))}),l}getCopyable(t,e){const n=this.propToCol(e);return this.hot.getCellMeta(t,n).copyable?this.getAtCell(this.hot.toPhysicalRow(t),n):""}countRows(){if(this.hot.hasHook("modifySourceLength")){const t=this.hot.runHooks("modifySourceLength");if(Number.isInteger(t))return t}return this.data.length}countFirstRowKeys(){return Na(this.data)}destroy(){this.data=null,this.hot=null}}const{register:Yd,getItem:Gd,hasItem:Kd,getNames:qd,getValues:Xd}=Hn("cellTypes");function Zd(t,e){"string"!=typeof t&&(t=(e=t).CELL_TYPE);const{editor:n,renderer:o,validator:i}=e;n&&Fn(t,n),o&&Po(t,o),i&&Bo(t,i),Yd(t,e)}function Jd(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const o="string"==typeof e.type?(i=e.type,Kd(i)||wt(`You declared cell type "${i}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`),Gd(i)):e.type;var i;if(t._automaticallyAssignedMetaProps&&Tt(e,(e,n)=>{t._automaticallyAssignedMetaProps.delete(n)}),!Et(o))return;n!==t||t._automaticallyAssignedMetaProps||(t._automaticallyAssignedMetaProps=new Set);const r={};Tt(o,(e,o)=>{var i;(function(t,e){var n;return"CELL_TYPE"!==t&&((null===(n=e._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(t))||!Pt(e,t))})(o,n)&&(r[o]=e,null===(i=t._automaticallyAssignedMetaProps)||void 0===i||i.add(o))}),yt(t,r)}function Qd(t,e){t()||wt(`Assertion failed: ${e}`)}function tu(t){return null==t}var eu=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dialog:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,emptyDataState:!1,enterBeginsEditing:!0,enterCommits:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,filterSelectedItems:!0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(t){let e,n,o;for(e=0,n=this.countRows();e<n;e++)if(o=this.getDataAtCell(e,t),!1===P(o))return!1;return!0},isEmptyRow(t){let e,n,o,i;for(e=0,n=this.countCols();e<n;e++)if(o=this.getDataAtCell(t,e),!1===P(o))return"object"==typeof o&&(i=this.getCellMeta(t,e),xt(this.getSchema()[i.prop],o));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",loading:!1,manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,maxSelections:void 0,mergeCells:!1,minCols:0,minRowHeights:void 0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,pagination:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,valueFormatter:void 0,valueParser:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,searchInput:!0,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,sourceSortFunction:void 0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,textEllipsis:!1,themeName:void 0,theme:void 0,injectCoreCss:!0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:!0,validator:void 0,sourceDataValidator:void 0,sourceDataWarningMessage:void 0,valueGetter:void 0,valueSetter:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0,sanitizer:void 0,parsePastedValue:!1});function nu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ou{constructor(t){nu(this,"metaCtor",class{}),nu(this,"meta",void 0),this.meta=this.metaCtor.prototype,yt(this.meta,eu()),this.meta.instance=t}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(t){var e;yt(this.meta,t),Jd(this.meta,{...t,type:null!==(e=t.type)&&void 0!==e?e:this.meta.type},t)}}function iu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ru{constructor(t){iu(this,"meta",void 0);const e=t.getMetaConstructor();this.meta=new e}getMeta(){return this.meta}updateMeta(t){yt(this.meta,t),Jd(this.meta,t,t)}}function su(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class au{constructor(t){su(this,"valueFactory",void 0),su(this,"data",[]),su(this,"index",[]),su(this,"holes",new Set),this.valueFactory=t}obtain(t){Qd(()=>uo(t),"Expecting an unsigned number.");const e=this._getStorageIndexByKey(t);let n;if(e>=0)n=this.data[e],void 0===n&&(n=this.valueFactory(t),this.data[e]=n);else if(n=this.valueFactory(t),this.holes.size>0){const e=this.holes.values().next().value;this.holes.delete(e),this.data[e]=n,this.index[t]=e}else this.data.push(n),this.index[t]=this.data.length-1;return n}insert(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Qd(()=>uo(t)||tu(t),"Expecting an unsigned number or null/undefined argument.");const n=[],o=this.data.length;for(let t=0;t<e;t++)n.push(o+t),this.data.push(void 0);const i=tu(t)?this.index.length:t;this.index=[...this.index.slice(0,i),...n,...this.index.slice(i)]}remove(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Qd(()=>uo(t)||tu(t),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice(tu(t)?this.index.length-e:t,e);for(let t=0;t<n.length;t++){const e=n[t];"number"==typeof e&&this.holes.add(e)}}size(){return this.data.length-this.holes.size}values(){return this.data.filter((t,e)=>void 0!==t&&!this.holes.has(e))[Symbol.iterator]()}entries(){const t=[];for(let e=0;e<this.data.length;e++){const n=this._getKeyByStorageIndex(e);-1!==n&&void 0!==this.data[e]&&t.push([n,this.data[e]])}let e=0;return{next:()=>{if(e<t.length){const n=t[e];return e+=1,{value:n,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(t){return this.index.length>t?this.index[t]:-1}_getKeyByStorageIndex(t){return this.index.indexOf(t)}[Symbol.iterator](){return this.entries()}}function lu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const hu=["data","width"];class cu{constructor(t){lu(this,"globalMeta",void 0),lu(this,"metas",new au(()=>this._createMeta())),this.globalMeta=t,this.metas=new au(()=>this._createMeta())}updateMeta(t,e){const n=this.getMeta(t);yt(n,e),Jd(n,e)}createColumn(t,e){this.metas.insert(t,e)}removeColumn(t,e){this.metas.remove(t,e)}getMeta(t){return this.metas.obtain(t)}getMetaConstructor(t){return this.metas.obtain(t).constructor}clearCache(){this.metas.clear()}_createMeta(){return function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}var o,i;o=n,(i=t).prototype.constructor=i,o.prototype=new i,o.prototype.constructor=o;for(let t=0;t<e.length;t++)n.prototype[e[t]]=void 0;return n}(this.globalMeta.getMetaConstructor(),hu).prototype}}function du(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class uu{constructor(t){du(this,"columnMeta",void 0),du(this,"metas",new au(()=>this._createRow())),this.columnMeta=t}updateMeta(t,e,n){const o=this.getMeta(t,e);yt(o,n),Jd(o,n)}createRow(t,e){this.metas.insert(t,e)}createColumn(t,e){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).insert(t,e)}removeRow(t,e){this.metas.remove(t,e)}removeColumn(t,e){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).remove(t,e)}getMeta(t,e,n){const o=this.metas.obtain(t).obtain(e);return void 0===n?o:o[n]}setMeta(t,e,n,o){var i;const r=this.metas.obtain(t).obtain(e);null===(i=r._automaticallyAssignedMetaProps)||void 0===i||i.delete(n),r[n]=o}removeMeta(t,e,n){delete this.metas.obtain(t).obtain(e)[n]}getMetas(){const t=[],e=Array.from(this.metas.values());for(let n=0;n<e.length;n++)I(e[n])&&t.push(...e[n].values());return t}getMetasAtRow(t){Qd(()=>uo(t),"Expecting an unsigned number.");const e=new Map(this.metas);return e.has(t)?Array.from(e.get(t).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new au(t=>this._createMeta(t))}_createMeta(t){return new(this.columnMeta.getMetaConstructor(t))}}class gu{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=t,this.globalMeta=new ou(t),this.tableMeta=new ru(this.globalMeta),this.columnMeta=new cu(this.globalMeta),this.cellMeta=new uu(this.columnMeta),n.forEach(t=>new t(this)),this.globalMeta.updateMeta(e)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(t){this.globalMeta.updateMeta(t)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(t){this.tableMeta.updateMeta(t)}getColumnMeta(t){return this.columnMeta.getMeta(t)}updateColumnMeta(t,e){this.columnMeta.updateMeta(t,e)}getCellMeta(t,e,n){const o=this.cellMeta.getMeta(t,e);return o.visualRow=n.visualRow,o.visualCol=n.visualColumn,o.row=t,o.col=e,n.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",o),o}getCellMetaKeyValue(t,e,n){return"string"!=typeof n&&wt("The passed cell meta object key is not a string"),this.cellMeta.getMeta(t,e,n)}setCellMeta(t,e,n,o){this.cellMeta.setMeta(t,e,n,o)}updateCellMeta(t,e,n){this.cellMeta.updateMeta(t,e,n)}removeCellMeta(t,e,n){this.cellMeta.removeMeta(t,e,n)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(t){return this.cellMeta.getMetasAtRow(t)}createRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(t,e)}removeRow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(t,e)}createColumn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(t,e),this.columnMeta.createColumn(t,e)}removeColumn(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(t,e),this.columnMeta.removeColumn(t,e)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}function fu(t,e){const n=t.countSourceRows(),o=t.countSourceCols();if(0===n||0===o)return;const i=new Map;for(let s=0;s<n;s+=1)for(let n=0;n<o;n+=1){const o=t.toVisualRow(s),a=t.toVisualColumn(n);if(null===o||null===a)continue;const l=t.getCellMeta(o,a),{sourceDataWarningMessage:h,sourceDataValidator:c,allowInvalid:d}=l;if(!Ze(c))continue;const u=t._getDataSource(),g=u.getAtCell(s,n,null);if(!0!==c(g,l,e)&&(!1===d&&u.setAtCell(s,n,null),h)){var r;const t=h,e=null!==(r=i.get(t))&&void 0!==r?r:[];e.push({row:s,col:n,value:g,message:t}),i.set(t,e)}}i.forEach((t,e)=>{pu(e,t)})}function pu(t,e){!function(){let{logFunction:t=Jt,message:e,items:n,maxSample:o=5,itemFormatter:i=t=>`${t}`}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!Array.isArray(n)||0===n.length)return;const r=n.length,s=r>o?` - ...and ${r-o} more`:"";t(K(e,{itemsCount:`${r} cell${r>1?"s":""}`,affectedCells:["Affected cells:",...n.slice(0,o).map(t=>` - ${i(t)}`),...s?[s]:[]].join("\n")}))}({logFunction:Qt,message:t,items:e,itemFormatter:t=>{let{row:e,col:n,value:o}=t;const i=H(o);return`row ${e}, col ${n}, value: "${i.length>64?`${i.slice(0,64)}...`:i}"`}})}function mu(t,e,n,o){const{hotInstance:i,dataMap:r,dataSource:s,internalSource:a,source:l,metaManager:h,firstRun:c}=o,d=$(a),u=i.getSettings();Array.isArray(u.dataSchema)?i.dataType="array":Ze(u.dataSchema)?i.dataType="function":i.dataType="object",r&&r.destroy(),t=i.runHooks(`before${d}`,t,c,l);const g=new jd(i,t,h);if(e(g),"object"==typeof t&&null!==t)t.push&&t.splice||(t=[t]);else if(null===t){const e=g.getSchema();let n;t=[];let o=0,r=0;for(o=0,r=u.startRows;o<r;o++)if("object"!==i.dataType&&"function"!==i.dataType||!u.dataSchema)if("array"===i.dataType)n=St(e[0]),t.push(n);else{n=[];for(let t=0,e=u.startCols;t<e;t++)n.push(null);t.push(n)}else n=St(e),t.push(n)}else wt(`${a} only accepts array of objects or array of arrays (${typeof t} given)`);Array.isArray(t[0])&&(i.dataType="array"),u.data=t,g.dataSource=t,s.data=t,s.dataType=i.dataType,s.colToProp=g.colToProp.bind(g),s.propToCol=g.propToCol.bind(g),s.countCachedColumns=g.countCachedColumns.bind(g),n(g),c||fu(i,a),i.runHooks(`after${d}`,t,c,l),c||(i.runHooks("afterChange",null,a),i.view.adjustElementsSize(),i.render()),i.getSettings().ariaTags&&fe(i.rootElement,[ct(-1),dt(i.countCols()+(i.view?i.countRowHeaders():0))])}function bu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(gu,os);class wu{constructor(t){var e=this;bu(this,"metaManager",void 0),bu(this,"metaSyncMemo",new Map),this.metaManager=t,t.addLocalHook("afterGetCellMeta",function(){return e.extendCellMeta(...arguments)}),Mn.getSingleton().add("beforeRender",t=>{t&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(t){var e;const{row:n,col:o}=t;if(null!==(e=this.metaSyncMemo.get(n))&&void 0!==e&&e.has(o))return;const{visualRow:i,visualCol:r}=t,s=this.metaManager.hot,a=s.colToProp(r);t.prop=a,s.runHooks("beforeGetCellMeta",i,r,t);const l=Pt(t,"type")?t.type:null;let h=Ze(t.cells)?t.cells(n,o,a):null;var c;l&&(h?h.type=null!==(c=h.type)&&void 0!==c?c:l:h={type:l});h&&this.metaManager.updateCellMeta(n,o,h),s.runHooks("afterGetCellMeta",i,r,t),this.metaSyncMemo.has(n)||this.metaSyncMemo.set(n,new Set),this.metaSyncMemo.get(n).add(o)}}function vu(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function yu(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Cu(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}const Su=new WeakSet,Ru=new WeakSet;var ku=new WeakMap;class xu{constructor(t){yu(this,"metaManager",void 0),yu(this,"usageTracker",new Set),yu(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(t){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===t&&wt("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&wt("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["correctFormat",{onChange(){Su.has(this.metaManager.hot)||(Su.add(this.metaManager.hot),te("The `correctFormat` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["datePickerConfig",{onChange(){Ru.has(this.metaManager.hot)||(Ru.add(this.metaManager.hot),te("The `datePickerConfig` option is deprecated and will be removed in the next major release.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/"))}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),vu(this,ku,(t,e,n)=>{n||wt(`The \`${t}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=t,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach((t,e)=>{const{initOnly:n,target:o,onChange:i}=t,r="string"==typeof o,s=r?o:e,a=`_${s}`;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[s],i?(this.installPropWatcher(e,a,i),r&&this.installPropWatcher(o,a,i)):n&&(this.installPropWatcher(e,a,Cu(ku,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(e))})}installPropWatcher(t,e,n){const o=this;Object.defineProperty(this.metaManager.globalMeta.meta,t,{get(){return this[e]},set(i){const r=!o.usageTracker.has(t);o.usageTracker.add(t),n.call(o,t,i,r),this[e]=i},enumerable:!0,configurable:!0})}}function Eu(t,e,n){Mu(t,e),e.set(t,n)}function Mu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tu(t,e){return t.get(Hu(t,e))}function _u(t,e,n){return t.set(Hu(t,e),n),n}function Hu(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Iu=new WeakMap,Au=new WeakMap,Pu=new WeakSet;class Ou{constructor(t){let{rowIndexMapper:e,columnIndexMapper:n}=t;var o,i;Mu(o=this,i=Pu),i.add(o),Eu(this,Iu,void 0),Eu(this,Au,void 0),_u(Iu,this,e),_u(Au,this,n)}toRenderable(t){const e="N-S"===t.getVerticalDirection()?1:-1,n="W-E"===t.getHorizontalDirection()?1:-1,o=Hu(Pu,this,Nu).call(this,t.from,e,n);if(null===o)return null;const i=Hu(Pu,this,Nu).call(this,t.to,-e,-n);if(null===i)return null;const r=t.clone();return r.from=o,r.to=i,r.includes(t.highlight)||(r.highlight=o),r}}function Nu(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const o=Hu(Pu,this,Du).call(this,Tu(Iu,this),t.row,e);if(null===o)return null;const i=Hu(Pu,this,Du).call(this,Tu(Au,this),t.col,n);return null===i?null:t.clone().assign({row:o,col:i})}function Du(t,e,n){return e<0?e:t.getNearestNotHiddenIndex(e,n)}function Lu(t){Xe(t)&&t.scrollIntoView({block:"nearest",inline:"nearest"})}function Vu(t){const{selection:e,view:n}=t,o=t.getSelectedRangeActive(),i=e.getSelectionSource(),r=n.getFirstFullyVisibleColumn(),s=n.getLastFullyVisibleColumn(),a=o.getTopStartCorner().col,l=o.getBottomEndCorner().col,h=a<=r,c=l>=s,d=n.getFirstFullyVisibleRow(),u=n.getLastFullyVisibleRow(),g=o.getTopStartCorner().row,f=o.getBottomEndCorner().row,p=g<=d,m=f>=u;return{getComputedColumnTarget:t=>"mouse"===i||"keyboard"===i?t.col:h&&c?o.highlight.col:h?a:c?l:t.col,getComputedRowTarget:t=>"mouse"===i||"keyboard"===i?t.row:p&&m?o.highlight.row:p?g:m?f:t.row}}function Bu(t){const{selection:e}=t;let n=!1,o=!1;return{resume(){o=!1},suspend(){o=!0},skipNextScrollCycle(){n=!0},scrollTo(i){var r;if(n||o)return void(n=!1);let s;e.isFocusSelectionChanged()?s=function(t){return e=>{t.scrollViewportTo(e.toObject(),()=>{const e=t.getSelectedRangeActive();if(!e)return;const{row:n,col:o}=e.highlight;Lu(t.getCell(n,o,!0))})}}(t):e.isSelectedByCorner()?s=()=>{}:e.isSelectedByRowHeader()?s=function(t){return e=>{const n=Vu(t).getComputedRowTarget(e);t.scrollViewportTo({row:n},()=>{const e=!!t.getSettings().rowHeaders;Lu(t.getCell(n,e?-1:0,!0))})}}(t):e.isSelectedByColumnHeader()?s=function(t){return e=>{const n=Vu(t).getComputedColumnTarget(e);t.scrollViewportTo({col:n},()=>{const e=!!t.getSettings().colHeaders;Lu(t.getCell(e?-1:0,n,!0))})}}(t):1===e.getSelectedRange().size()&&e.isMultiple()?s=function(t){return e=>{const n=Vu(t),o={row:n.getComputedRowTarget(e),col:n.getComputedColumnTarget(e)};t.scrollViewportTo(o,()=>{const{row:e,col:n}=o;Lu(t.getCell(e,n,!0))})}}(t):1!==e.getSelectedRange().size()||e.isMultiple()?e.getSelectedRange().size()>1&&(s=function(t){return e=>{const n=Vu(t),o={row:n.getComputedRowTarget(e),col:n.getComputedColumnTarget(e)};t.scrollViewportTo(o,()=>{const{row:e,col:n}=o;Lu(t.getCell(e,n,!0))})}}(t)):s=function(t){return e=>{const n=t.selection.getSelectionSource(),{row:o,col:i}=e,r=()=>{Lu(t.getCell(o,i,!0))};if(o<0&&i>=0)t.scrollViewportTo({col:i},r);else if(i<0&&o>=0)t.scrollViewportTo({row:o},r);else{if("mouse"===n&&(i===t.view.getLastPartiallyVisibleColumn()||o===t.view.getLastPartiallyVisibleRow()))return;t.scrollViewportTo({row:o,col:i},r)}}}(t),null===(r=s)||void 0===r||r(i)}}}const Fu=Object.freeze({INLINE:"inline",MODAL:"modal"}),Wu=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function zu(t,e){const n=t.rootDocument.createElement("div");return n.style.display="none",n.classList.add("htFocusCatcher"),n.dataset.htFocusSource=e,n}function ju(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o={shortcutsContextName:"grid",type:Fu.INLINE,contains:t=>t===e||e.contains(t),runOnlyIf:()=>!0,...n},i=function(t,e){const n=zu(t,Wu.TAB_FROM_ABOVE),o=zu(t,Wu.TAB_FROM_BELOW);return e.prepend(n),e.append(o),{activate(){n.tabIndex=0,o.tabIndex=0},deactivate(){n.tabIndex=-1,o.tabIndex=-1},destroy(){n.remove(),o.remove()}}}(t,e);return{getType:()=>o.type,hasContainerDetached:()=>!t.rootWrapperElement.contains(e),getShortcutsContextName:()=>o.shortcutsContextName,runOnlyIf:()=>o.runOnlyIf(),contains:t=>o.contains(t),activate:function(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Wu.UNKNOWN;null===(t=o.onActivate)||void 0===t||t.call(o,e)},deactivate:()=>{var t;null===(t=o.onDeactivate)||void 0===t||t.call(o)},activateFocusCatchers:()=>{null==i||i.activate()},deactivateFocusCatchers:()=>{null==i||i.deactivate()},enable:()=>{e.removeAttribute("inert")},disable:()=>{e.setAttribute("inert","true")},destroy:()=>{null==i||i.destroy()}}}function $u(t){const e=wo({errorIdExists:t=>`The "${t}" focus scope is already registered.`}),n=t.getShortcutManager();let o=null;function i(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Wu.UNKNOWN;o!==t&&(null!==o&&r(o),o=t,o.activate(e),n.setActiveContextName(t.getShortcutsContextName()))}function r(t){s(),o===t&&(o=null,t.deactivate())}function s(){const n=e.getValues(),i=n.filter(t=>t.runOnlyIf()&&"modal"===t.getType());n.forEach(e=>{i.length>0&&i.includes(e)||0===i.length||e.hasContainerDetached()?e.enable():e.disable(),e===o?e.contains(t.rootDocument.activeElement)?e.deactivateFocusCatchers():e.activateFocusCatchers():e.runOnlyIf()?e.activateFocusCatchers():e.deactivateFocusCatchers()})}function a(n,s){if(!n.isConnected||!Re(n))return;const a=e.getValues().filter(t=>t.runOnlyIf());let l=!1;a.forEach(e=>{!l&&e.contains(n)&&(l=!0,s!==Wu.UNKNOWN&&t.listen(),i(e,s))}),!l&&o&&(r(o),t.unlisten())}const l=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=!1;function o(t){var o;n||null===(o=e.onFocus)||void 0===o||o.call(e,t)}function i(t){var n;null===(n=e.onClick)||void 0===n||n.call(e,t)}function r(t){var n;"Tab"===t.key&&(null===(n=e.onTabKeyDown)||void 0===n||n.call(e,t))}function s(){n=!0}function a(){n=!1}return{mount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document;t.addEventListener("focusin",o),t.addEventListener("click",i),t.addEventListener("keydown",r),t.addEventListener("mousedown",s),t.addEventListener("mouseup",a),e=ie(e)}},unmount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document;t.removeEventListener("focusin",o),t.removeEventListener("click",i),t.removeEventListener("keydown",r),t.removeEventListener("mousedown",s),t.removeEventListener("mouseup",a),e=ie(e)}}}}(t.rootWindow,{onFocus:t=>{var e;a(t.target,null!==(e=t.target.dataset.htFocusSource)&&void 0!==e?e:Wu.UNKNOWN)},onClick:t=>{a(t.target,Wu.CLICK)},onTabKeyDown:()=>{s()}});return l.mount(),{getActiveScopeId:function(){return o?e.getId(o):null},registerScope:function(o,i){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.hasItem(o)&&wt(`Scope with id "${o}" already registered`);const s=ju(t,i,r);e.addItem(o,s),n.getOrCreateContext(s.getShortcutsContextName())},unregisterScope:function(t){e.hasItem(t)||wt(`Scope with id "${t}" not found`),e.getItem(t).destroy(),e.removeItem(t)},activateScope:t=>function(t){e.hasItem(t)||wt(`Scope with id "${t}" not found`),i(e.getItem(t))}(t),deactivateScope:t=>function(t){e.hasItem(t)||wt(`Scope with id "${t}" not found`),r(e.getItem(t))}(t),destroy:()=>l.unmount()}}function Uu(t,e,n){Yu(t,e),e.set(t,n)}function Yu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gu(t,e){return t.get(qu(t,e))}function Ku(t,e,n){return t.set(qu(t,e),n),n}function qu(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const Xu=Object.freeze({CELL:"cell",MIXED:"mixed"});var Zu=new WeakMap,Ju=new WeakMap,Qu=new WeakMap,tg=new WeakMap,eg=new WeakMap,ng=new WeakMap,og=new WeakSet;class ig{constructor(t){var e,n;Yu(e=this,n=og),n.add(e),Uu(this,Zu,void 0),Uu(this,Ju,void 0),Uu(this,Qu,1),Uu(this,tg,null),Uu(this,eg,new Map),Uu(this,ng,!1),Ku(Zu,this,t)}init(){var t=this;const e=Gu(Zu,this).getSettings();Ku(Ju,this,e.imeFastEdit?Xu.MIXED:Xu.CELL),Gu(Zu,this).addHook("afterUpdateSettings",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qu(og,t,cg).call(t,...n)}),Gu(Zu,this).addHook("afterSelection",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qu(og,t,lg).call(t,...n)}),Gu(Zu,this).addHook("afterSelectionFocusSet",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qu(og,t,lg).call(t,...n)}),Gu(Zu,this).addHook("afterSelectionEnd",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qu(og,t,ag).call(t,...n)}),Gu(Zu,this).addHook("afterRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qu(og,t,hg).call(t,...n)})}getFocusMode(){return Gu(Ju,this)}setFocusMode(t){Object.values(Xu).includes(t)?Ku(Ju,this,t):Qt(`"${t}" is not a valid focus mode.`)}getRefocusDelay(){return Gu(Qu,this)}setRefocusDelay(t){Ku(Qu,this,t)}setRefocusElementGetter(t){Ku(tg,this,t)}getRefocusElement(){var t;return"function"==typeof Gu(tg,this)?Gu(tg,this).call(this):null===(t=Gu(Zu,this).getActiveEditor())||void 0===t?void 0:t.TEXTAREA}focusOnHighlightedCell(t){const e=t=>{var e,n;const o=null===(e=Gu(Zu,this).getSelectedRangeActive())||void 0===e?void 0:e.highlight;if(!o)return;let i=Gu(Zu,this).runHooks("modifyFocusedElement",o.row,o.col,t);Xe(i)||(i=t),!i||null!==(n=Gu(Zu,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};t?e(t):qu(og,this,rg).call(this,t=>e(t))}refocusToEditorTextarea(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Gu(Qu,this);var n,o;!Gu(Zu,this).getSettings().imeFastEdit||null!==(t=Gu(Zu,this).getActiveEditor())&&void 0!==t&&t.isOpened()||(null===(n=Gu(Zu,this).getActiveEditor())||void 0===n||null===(o=n.refreshValue)||void 0===o||o.call(n),Gu(eg,this).has(e)||Gu(eg,this).set(e,Je(()=>{var t;Gu(Zu,this).isDestroyed||(null===(t=this.getRefocusElement())||void 0===t||t.select())},e)),Gu(eg,this).get(e)())}}function rg(t){var e;const n=null===(e=Gu(Zu,this).getSelectedRangeActive())||void 0===e?void 0:e.highlight;if(!n||!Gu(Zu,this).selection.isCellVisible(n))return void t(null);const o=Gu(Zu,this).getCell(n.row,n.col,!0);null===o?Gu(Zu,this).addHookOnce("afterScroll",()=>{t(Gu(Zu,this).getCell(n.row,n.col,!0))}):t(o)}function sg(){qu(og,this,rg).call(this,t=>{const{activeElement:e}=Gu(Zu,this).rootDocument;e&&Ye(e)&&e.blur(),this.focusOnHighlightedCell(t)})}function ag(){qu(og,this,rg).call(this,t=>{this.getFocusMode()===Xu.MIXED&&"TD"===(null==t?void 0:t.nodeName)&&this.refocusToEditorTextarea()})}function lg(){Ku(ng,this,!0)}function hg(){Gu(ng,this)&&(Ku(ng,this,!1),qu(og,this,sg).call(this))}function cg(t){"boolean"==typeof t.imeFastEdit&&this.setFocusMode(t.imeFastEdit?Xu.MIXED:Xu.CELL)}function dg(t){const{rowIndexMapper:e,columnIndexMapper:n}=t,{navigableHeaders:o}=t.getSettings();let i=o&&t.countColHeaders()>0?-t.countColHeaders():0,r=o&&t.countRowHeaders()>0?-t.countRowHeaders():0;return 0===i&&(i=e.getVisualFromRenderableIndex(i)),0===r&&(r=n.getVisualFromRenderableIndex(r)),null===i||null===r?null:t._createCellCoords(i,r)}function ug(t){var e,n;const{rowIndexMapper:o,columnIndexMapper:i}=t,{navigableHeaders:r}=t.getSettings();let s=o.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(s<0){if(!r||0===t.countColHeaders())return null;s=-1}if(a<0){if(!r||0===t.countColHeaders())return null;a=-1}return t._createCellCoords(null!==(e=o.getVisualFromRenderableIndex(s))&&void 0!==e?e:s,null!==(n=i.getVisualFromRenderableIndex(a))&&void 0!==n?n:a)}const gg="gridDefault",fg="grid",pg="grid.tabNavigation",mg="editorManager.handlingEditor",bg={name:"editorCloseAndSave",callback(t){t._getEditorManager().closeEditorAndSaveChanges()}},wg={_hooksStorage:Object.create(null),addHook(t,e){return this._hooksStorage[t]||(this._hooksStorage[t]=[]),this.hot.addHook(t,e),this._hooksStorage[t].push(e),this},removeHooksByKey(t){x(this._hooksStorage[t]||[],e=>{this.hot.removeHook(t,e)})},clearHooks(){Tt(this._hooksStorage,(t,e)=>this.removeHooksByKey(e)),this._hooksStorage={}}};function vg(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Mt(wg,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const yg=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class Cg{static get EDITOR_TYPE(){return"base"}constructor(t){vg(this,"hot",void 0),vg(this,"state",yg.VIRGIN),vg(this,"_opened",!1),vg(this,"_fullEditMode",!1),vg(this,"_closeCallback",null),vg(this,"_closeAfterDataChange",!0),vg(this,"TD",null),vg(this,"row",null),vg(this,"col",null),vg(this,"prop",null),vg(this,"originalValue",null),vg(this,"cellProperties",null),this.hot=t,this.init()}_fireCallbacks(t){this._closeCallback&&(this._closeCallback(t),this._closeCallback=null)}init(){}getValue(){wt("Editor getValue() method unimplemented")}setValue(){wt("Editor setValue() method unimplemented")}open(){wt("Editor open() method unimplemented")}close(){wt("Editor close() method unimplemented")}prepare(t,e,n,o,i,r){this.TD=o,this.row=t,this.col=e,this.prop=n,this.originalValue=i,this.cellProperties=r,this.state=this.isOpened()?this.state:yg.VIRGIN}extend(){return class extends this.constructor{}}saveValue(t,e){let n,o,i,r;if(e){const t=this.hot.getSelectedRangeActive(),e=t.getTopStartCorner(),s=t.getBottomEndCorner();n=e.row,o=e.col,i=s.row,r=s.col}else[n,o,i,r]=[this.row,this.col,null,null];const s=this.hot.runHooks("modifyGetCellCoords",n,o,!1,"meta");Array.isArray(s)&&([n,o]=s),this.hot.populateFromArray(n,o,t,i,r,"edit")}beginEditing(t,e){if(this.state!==yg.VIRGIN)return;const n=this.hot,o=n.rowIndexMapper.getRenderableFromVisualIndex(this.row),i=n.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(n.view.scrollViewport(n._createCellCoords(o,i)),this.state=yg.EDITING,this.isInFullEditMode()){const e=Wd(this.originalValue,this.hot.getCellMeta(this.row,this.col)),n="string"==typeof t?t:H(e);this.setValue(n)}this.open(e),this._opened=!0,this.focus(),n.view.render(),n.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(t,e,n){if(n){const t=this._closeCallback;this._closeCallback=e=>{t&&t(e),n(e),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==yg.VIRGIN){if(this.state===yg.EDITING){if(t)return this.cancelChanges(),void this.hot.view.render();let n=this.getValue();this.cellProperties.trimWhitespace&&(n="string"==typeof n?String.prototype.trim.call(n||""):n),"function"==typeof this.cellProperties.valueParser&&(n=this.cellProperties.valueParser(n,this.cellProperties)),this.state=yg.WAITING,this.saveValue([[n]],e),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",t=>{this.state=yg.FINISHED,this.discardEditor(t)}):(this.state=yg.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=yg.FINISHED,this.discardEditor()}discardEditor(t){if(this.state===yg.FINISHED)if(!1===t&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=yg.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=yg.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===yg.WAITING}getEditedCellRect(){var t;const e=this.getEditedCell();if(!e)return;const{wtOverlays:n,wtViewport:o}=this.hot.view._wt,i=this.hot.rootWindow,r=ke(e),s=Ae(e),a=ke(this.hot.rootElement),l=Ae(this.hot.rootElement),h=n.topOverlay.holder,c=n.inlineStartOverlay.holder,d=h!==i?h.scrollTop:0,u=c!==i?c.scrollLeft:0,g=i.innerWidth-a.left-l,{wtTable:f}=null!==(t=n.getParentOverlay(e))&&void 0!==t?t:this.hot.view._wt,p=f.name,m=["master","inline_start"].includes(p)?d:0,b=["master","top","bottom"].includes(p)?u:0,w=r.top===a.top?0:1;let v=r.top-a.top-w-m,y=0;y=this.hot.isRtl()?i.innerWidth-r.left-s-g-1+b:r.left-a.left-1-b,["top","top_inline_start_corner"].includes(p)&&(v+=n.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(p)&&(y+=Math.abs(n.inlineStartOverlay.getOverlayOffset()));const C=this.hot.hasColHeaders(),S=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),R=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),k=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(C&&S<=0||S===k)&&(v+=1),R<=0&&(y+=1);const x=o.rowsRenderCalculator.startPosition,E=o.columnsRenderCalculator.startPosition,M=Math.abs(n.inlineStartOverlay.getScrollPosition()),T=n.topOverlay.getScrollPosition(),_=Fe(this.hot.rootDocument);let H=e.offsetTop;if(["inline_start","master"].includes(p)&&(H+=x-T),["bottom","bottom_inline_start_corner"].includes(p)){const{wtViewport:t,wtTable:e}=n.bottomOverlay.clone;H+=t.getWorkspaceHeight()-e.getHeight()-_}let I=e.offsetLeft;this.hot.isRtl()?(I=I>=0?f.getWidth()-e.offsetLeft:Math.abs(I),I+=E-M-s):["top","master","bottom"].includes(p)&&(I+=E-M);const A=i.getComputedStyle(this.TD),P=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",O=parseInt(A[P],10)>0?0:1,N=parseInt(A.borderTopWidth,10)>0?0:1,D=Ae(e)+O,L=Pe(e)+N,V=We(h)?_:0,B=ze(c)?_:0,F=this.hot.view.maximumVisibleElementWidth(I)-V+O;return{top:v,start:y,height:L,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(H)-B+N,this.hot.stylesHandler.getDefaultRowHeight()),width:D,maxWidth:F}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const t=this.hot.countRows();let e="";return this.row<this.hot.getSettings().fixedRowsTop?e=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=t-this.hot.getSettings().fixedRowsBottom?e=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(e="inline-start"),e}}kt(Cg,wg);const Sg=[bg,{name:"editorCloseAndSaveByArrowKeys",callback(t,e,n){const o=t._getEditorManager(),i=o.getActiveEditor();i.isInFullEditMode()&&i.state===yg.EDITING||(o.closeEditorAndSaveChanges(),t.getSelected()&&(n.includes("arrowdown")?t.selection.transformStart(1,0):n.includes("arrowup")?t.selection.transformStart(-1,0):n.includes("arrowleft")?t.selection.transformStart(0,-1*t.getDirectionFactor()):n.includes("arrowright")&&t.selection.transformStart(0,t.getDirectionFactor())),e.preventDefault())}},{name:"editorCloseAndSaveByEnter",callback(t,e){const n=t._getEditorManager();n.closeEditorAndSaveChanges(e.ctrlKey||e.metaKey),n.moveSelectionAfterEnter(e)}},{name:"editorCloseWithoutSaving",callback(t){const e=t._getEditorManager();e.closeEditorAndRestoreOriginalValue(t.getShortcutManager().isCtrlPressed()),e.activeEditor.focus()}},{name:"editorFastOpen",callback(t,e){const{highlight:n}=t.getSelectedRangeActive();n.isHeader()||t._getEditorManager().openEditor(null,e,!0)}},{name:"editorOpen",callback(t,e,n){const{selection:o}=t,i=t._getEditorManager(),r=t.getSelectedRange(),s=t.getSelectedRangeActive(),{highlight:a}=s;if((r.some(t=>o.isMultiple(t))||r.length>1)&&!s.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0){const i=t.getSettings(),r="function"==typeof i.enterMoves?i.enterMoves(e):i.enterMoves;return void(n.includes("shift")?o.transformFocus(-r.row,-r.col):o.transformFocus(r.row,r.col))}a.isHeader()||(t.getSettings().enterBeginsEditing?i.cellProperties.readOnly?i.moveSelectionAfterEnter(e):i.openEditor(null,e,!0):i.moveSelectionAfterEnter(e),an(e))}},{name:"extendCellsSelectionDown",callback(t){const{selection:e}=t,{highlight:n}=t.getSelectedRangeActive();e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(1,0),e.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(t){const{selection:e,rowIndexMapper:n}=t,{to:o}=t.getSelectedRangeActive(),i=Math.min(o.row+t.countVisibleRows(),t.countRows()-1),r=n.getNearestNotHiddenIndex(i,-1);if(null!==r){const n=t._createCellCoords(r,o.col),i=o.row-t.getFirstFullyVisibleRow(),s=Math.min(n.row-i,t.countRows()-1);e.markSource("keyboard"),e.setRangeEnd(n,t.getActiveSelectionLayerIndex()),e.markEndSource(),t.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(t){const{selection:e}=t,{highlight:n}=t.getSelectedRangeActive();e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,-1*t.getDirectionFactor()),e.markEndSource())}},{name:"extendCellsSelectionRight",callback(t){const{selection:e}=t,{highlight:n}=t.getSelectedRangeActive();e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,t.getDirectionFactor()),e.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(t){const{selection:e}=t,{highlight:n,from:o,to:i}=t.getSelectedRangeActive();e.markSource("keyboard"),e.isSelectedByRowHeader()?e.selectAll(!0,!0):t.selectColumns(o.col,i.col,n),e.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(t){const{selection:e,rowIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive(),s=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||s){const a=n.getNearestNotHiddenIndex(t.countRows()-1,-1),l=i.clone();l.row=o.row,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),s&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(a,r.col)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const s=n.getNearestNotHiddenIndex(t.countCols()-1,-1),a=i.clone();a.col=o.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,o.clone()),e.setRangeEnd(t._createCellCoords(r.row,s)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const s=parseInt(t.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(s,1),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),e.setRangeEnd(t._createCellCoords(r.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive(),s=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||s){const a=n.getNearestNotHiddenIndex(...t.isRtl()?[t.countCols()-1,-1]:[0,1]),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),s&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive(),s=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||s){const a=n.getNearestNotHiddenIndex(...t.isRtl()?[0,1]:[t.countCols()-1,-1]),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),s&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(t){const{selection:e,rowIndexMapper:n}=t,{highlight:o,from:i,to:r}=t.getSelectedRangeActive(),s=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||s){const a=n.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),s&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(a,r.col)),e.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(t){const{selection:e}=t,{highlight:n,from:o,to:i}=t.getSelectedRangeActive();e.markSource("keyboard"),e.isSelectedByColumnHeader()?e.selectAll(!0,!0):t.selectRows(o.row,i.row,n),e.markEndSource()}},{name:"extendCellsSelectionUp",callback(t){const{selection:e}=t,{highlight:n}=t.getSelectedRangeActive();e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(-1,0),e.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(t){const{selection:e,rowIndexMapper:n}=t,{to:o}=t.getSelectedRangeActive(),i=Math.max(o.row-t.countVisibleRows(),0),r=n.getNearestNotHiddenIndex(i,1);if(null!==r){const n=t._createCellCoords(r,o.col),i=o.row-t.getFirstFullyVisibleRow(),s=Math.max(n.row-i,0);e.markSource("keyboard"),e.setRangeEnd(n,t.getActiveSelectionLayerIndex()),e.markEndSource(),t.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.transformStart(1,0),e.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(t){const{selection:e}=t,{navigableHeaders:n}=t.getSettings(),o=n?t.countColHeaders():0,{row:i}=t.getSelectedRangeActive().highlight;let r=t.countVisibleRows()+o;r=0===r?1:r,i===t.countRows()-1?r=1:i+r>t.countRows()&&(r=t.countRows()-i-1),e.markSource("keyboard"),e.transformStart(r,0),e.markEndSource(),t.getSelectedRangeActive().highlight.row<0&&t.scrollViewportTo({row:0})}},{name:"moveCellSelectionInlineEnd",callback(t,e){const{selection:n}=t,o=t.getSettings(),i=t.getSelectedRange(),r=t.getSelectedRangeActive(),s="function"==typeof o.tabMoves?o.tabMoves(e):o.tabMoves;n.markSource("keyboard"),(i.some(t=>n.isMultiple(t))||i.length>1)&&!r.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?n.transformFocus(-s.row,-s.col):n.transformStart(-s.row,-s.col),n.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(t,e){const{selection:n}=t,o=t.getSettings(),i=t.getSelectedRange(),r=t.getSelectedRangeActive(),s="function"==typeof o.tabMoves?o.tabMoves(e):o.tabMoves;n.markSource("keyboard"),(i.some(t=>n.isMultiple(t))||i.length>1)&&!r.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?n.transformFocus(s.row,s.col):n.transformStart(s.row,s.col),n.markEndSource()}},{name:"moveCellSelectionLeft",callback(t){const{selection:e}=t;e.markSource("keyboard"),e.transformStart(0,-1*t.getDirectionFactor()),e.markEndSource()}},{name:"moveCellSelectionRight",callback(t){const{selection:e}=t;e.markSource("keyboard"),e.transformStart(0,t.getDirectionFactor()),e.markEndSource()}},{name:"moveCellSelectionToMostBottom",callback(t){const{selection:e}=t,{col:n}=t.getSelectedRangeActive().highlight;let o=t.rowIndexMapper.getNearestNotHiddenIndex(t.countRows()-1,-1);null===o&&(o=-1),e.setRangeStart(t._createCellCoords(o,n))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(t){const{selection:e,rowIndexMapper:n,columnIndexMapper:o}=t,i=parseInt(t.getSettings().fixedRowsBottom,10),r=n.getNearestNotHiddenIndex(t.countRows()-i-1,-1),s=o.getNearestNotHiddenIndex(t.countCols()-1,-1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(r,s)),e.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:n}=t;e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(t.getSelectedRangeActive().highlight.row,n.getNearestNotHiddenIndex(t.countCols()-1,-1))),e.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:n}=t,o=parseInt(t.getSettings().fixedColumnsStart,10),i=t.getSelectedRangeActive().highlight.row,r=n.getNearestNotHiddenIndex(o,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(i,r)),e.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:n}=t,o=t.getSelectedRangeActive().highlight.row;let i=n.getNearestNotHiddenIndex(...t.isRtl()?[t.countCols()-1,-1]:[0,1]);null===i&&(i=t.isRtl()?-1:-t.countRowHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(o,i)),e.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:n}=t,{row:o}=t.getSelectedRangeActive().highlight;let i=n.getNearestNotHiddenIndex(...t.isRtl()?[0,1]:[t.countCols()-1,-1]);null===i&&(i=t.isRtl()?-t.countRowHeaders():-1),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(o,i)),e.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(t){const{selection:e}=t,{col:n}=t.getSelectedRangeActive().highlight;let o=t.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===o&&(o=-t.countColHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(o,n)),e.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(t){const{selection:e,rowIndexMapper:n,columnIndexMapper:o}=t,i=parseInt(t.getSettings().fixedRowsTop,10),r=parseInt(t.getSettings().fixedColumnsStart,10),s=n.getNearestNotHiddenIndex(i,1),a=o.getNearestNotHiddenIndex(r,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(s,a)),e.markEndSource()}},{name:"moveCellSelectionUp",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.transformStart(-1,0),e.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(t){const{selection:e}=t,{navigableHeaders:n}=t.getSettings(),o=n?t.countColHeaders():0,{row:i}=t.getSelectedRangeActive().highlight;let r=t.countVisibleRows()+o;r=0===r?-1:-r,i===-o?r=-1:i+r<o&&(r=-(i+o)),e.markSource("keyboard"),e.transformStart(r,0),e.markEndSource(),t.getSelectedRangeActive().highlight.row<0&&t.scrollViewportTo({row:0})}},{name:"emptySelectedCells",callback(t){t.emptySelectedCells(),t._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(t){const{highlight:e}=t.getSelectedRangeActive(),n=t.getFirstFullyVisibleRow()-1,o=t.getFirstFullyVisibleColumn()-1,i=t.getLastFullyVisibleRow()+1,r=t.getLastFullyVisibleColumn()+1,s=t._createCellCoords(n,o),a=t._createCellCoords(i,r);if(!t._createCellRange(s,s,a).includes(e)&&(e.row>=0||e.col>=0)){const n={};if(e.col>=0){const o=Math.floor(t.countVisibleCols()/2);n.col=Math.max(e.col-o,0)}if(e.row>=0){const o=Math.floor(t.countVisibleRows()/2);n.row=Math.max(e.row-o,0)}t.scrollViewportTo({...n,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"selectAllCells",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!0}),e.markEndSource()}},{name:"selectAllCellsAndHeaders",callback(t){let{selection:e}=t;e.markSource("keyboard"),e.selectAll(!0,!0,{disableHeadersHighlight:!1}),e.markEndSource()}},{name:"populateSelectedCellsData",callback(t){const e=t.getSelectedRange(),{row:n,col:o}=e[e.length-1].highlight.normalize(),i=t.getDataAtCell(n,o),r=new Map;for(let s=0;s<e.length;s++)e[s].forAll((e,s)=>{if(e>=0&&s>=0&&(e!==n||s!==o)){const{readOnly:n}=t.getCellMeta(e,s);n||r.set(`${e}x${s}`,[e,s,i])}});t.setDataAtCell(Array.from(r.values()))}},{name:"tabNavigation",callback(t){const e={wrapped:!1,flipped:!1};let n=!1,o=!1;return t.addHook("afterSelection",(t,i,r,s,a)=>{n&&(e.wrapped&&e.flipped||o)&&(o=!1,a.value=!0)}),t.addHook("beforeRowWrap",(t,n,o)=>{e.wrapped=!0,e.flipped=o}),{before(){const{tabNavigation:e}=t.getSettings();n=!0,e||(o=!0)},after(o){const{tabNavigation:i,autoWrapRow:r}=t.getSettings();if(n=!1,!i||!t.selection.isSelected()||r&&e.wrapped&&e.flipped||!r&&e.wrapped)return e.wrapped=!1,e.flipped=!1,t.deselectCell(),!1;o.preventDefault()}}}}];function Rg(t){const e={};return Sg.forEach(n=>{let{name:o,callback:i}=n;e[o]=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return i(t,...n)}}),e}function kg(t){const e=t.getShortcutManager().addContext("editor"),n=Rg(t),o={group:mg};e.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>n.editorCloseAndSaveByEnter(t,e)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(t,e)=>n.editorCloseAndSaveByEnter(t,e)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:t.getShortcutManager().getContext(fg),callback:(t,e)=>n.editorCloseAndSave(t,e)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(t,e)=>n.editorCloseAndSaveByArrowKeys(t,e)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>n.editorCloseWithoutSaving()}],o)}function xg(t){const e=t.getShortcutManager().addContext(fg),n=Rg(t),o={runOnlyIf:()=>{const{navigableHeaders:e}=t.getSettings();return I(t.getSelected())&&(e||!e&&t.countRenderedRows()>0&&t.countRenderedCols()>0)},group:gg};e.addShortcuts([{keys:[["F2"]],callback:t=>n.editorFastOpen(t)},{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>n.editorOpen(t,e)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:mg,runOnlyIf:()=>I(t.getSelected())}),e.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>{var e;return I(t.getSelected())&&!(null!==(e=t.getSelectedRangeActive())&&void 0!==e&&e.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var e;return I(t.getSelected())&&(null===(e=t.getSelectedRangeActive())||void 0===e?void 0:e.highlight.isHeader())},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>I(t.getSelected())&&!t.getSelectedRangeActive().highlight.isHeader()&&t.getSelectedRangeActive().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>I(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>I(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>I(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>I(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>I(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>I(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>I(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>I(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:t=>n.moveCellSelectionInlineStart(t)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:t=>n.moveCellSelectionInlineEnd(t)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],o);const i=n.tabNavigation();e.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:gg,group:pg,position:"before",callback:t=>i.before(t)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:gg,group:pg,callback:t=>i.after(t),position:"after"}])}function Eg(t){var e;const n=function(t){return e=>{if(!e)return null;const{rowIndexMapper:n,columnIndexMapper:o}=t;if(n.isHidden(e.row)||o.isHidden(e.col))return null;const i=dg(t),r=ug(t);return null===i||null===r?null:(e.row=co(e.row,i.row,r.row),e.col=co(e.col,i.col,r.col),e)}}(t),o={wrapped:!1,flipped:!1};let i,r=!0,s=!1;t.addHook("afterSelection",()=>{var e;r&&(i=null===(e=t.getSelectedRangeActive())||void 0===e?void 0:e.highlight)}),t.addHook("beforeRowWrap",(t,e,n)=>{o.wrapped=!0,o.flipped=n}),t.addHook("beforeEmptyDataStateShow",()=>{s=!0}),t.addHook("beforeEmptyDataStateHide",()=>{s=!1});t.getShortcutManager().getContext(fg).addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:gg,group:pg,position:"before",callback(){const{tabNavigation:e}=t.getSettings();t.getSelectedRangeActive()&&!e&&(r=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:gg,group:pg,callback(e){const{tabNavigation:n,autoWrapRow:s}=t.getSettings();r=!0,(!n||!t.selection.isSelected()||s&&o.wrapped&&o.flipped||!s&&o.wrapped)&&(s&&o.wrapped&&o.flipped&&(i=e.shiftKey?dg(t):ug(t)),o.wrapped=!1,o.flipped=!1)},position:"after"}]);const a=null!==(e=t.rootGridElement)&&void 0!==e?e:t.rootElement;t.getFocusScopeManager().registerScope("grid",a,{contains:e=>!(a!==e&&!a.contains(e))||null===e.closest(".htMenu")&&t.rootPortalElement.contains(e),runOnlyIf:()=>{const{navigableHeaders:e}=t.getSettings();return!((s||!e)&&0===t.countRenderedRows()&&0===t.countRenderedCols()&&t.countRowHeaders()>0&&t.countColHeaders()>0)&&(!e&&t.countRenderedRows()>0&&t.countRenderedCols()>0||e&&(t.countRowHeaders()>0||t.countColHeaders()>0))},onActivate:e=>{if("tab_from_above"===e){var o;const e=null!==(o=n(i))&&void 0!==o?o:dg(t);if(e){!1!==t.runHooks("modifyFocusOnTabNavigation","from_above",e)&&t.selectCell(e.row,e.col)}}else if("tab_from_below"===e){var r;const e=null!==(r=n(i))&&void 0!==r?r:ug(t);if(e){!1!==t.runHooks("modifyFocusOnTabNavigation","from_below",e)&&t.selectCell(e.row,e.col)}}}})}const Mg=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]),Tg=t=>t.map(t=>{const e=t.toLowerCase();return Mg.has(e)?Mg.get(e):e}).sort().join("+"),_g=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]),Hg=t=>{let{which:e,key:n}=t;if(_g.has(e))return _g.get(e);const o=String.fromCharCode(e).toLowerCase();return/^[a-z0-9]$/.test(o)?o:n.toLowerCase()},Ig=Symbol("shortcut-context");function Ag(t){return Et(t)&&t.__kindOf===Ig}const Pg=["meta","alt","shift","control"],Og=function(){const t=new Set;return{press(e){t.add(e)},release(e){t.delete(e)},releaseAll(){t.clear()},isPressed:e=>t.has(e)}}(),Ng=[];let Dg=0;const Lg=t=>{let{ownerWindow:e,handleEvent:n,beforeKeyDown:o,afterKeyDown:i}=t;const r=wo({errorIdExists:t=>`The "${t}" context name is already registered.`});let s="grid";const a=function(t){const e=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";const n=wo({errorIdExists:e=>`The "${e}" shortcut is already registered in the "${t}" context.`}),o=function(){let{keys:t,callback:e,group:o,runOnlyIf:i=()=>!0,captureCtrl:r=!1,preventDefault:s=!0,stopPropagation:a=!1,relativeToGroup:l,position:h,forwardToContext:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};A(o)&&wt("You need to define the shortcut's group."),!1===Ze(e)&&wt("The shortcut's callback needs to be a function."),!1===Array.isArray(t)&&wt(T`Pass the shortcut\'s keys as an array of arrays,\x20
39
+ using the KeyboardEvent.key properties:\x20
40
+ https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const d={callback:e,group:o,runOnlyIf:i,captureCtrl:r,preventDefault:s,stopPropagation:a};I(l)&&(d.relativeToGroup=l,d.position=h),Ag(c)&&(d.forwardToContext=c),t.forEach(t=>{const e=Tg(t);if(n.hasItem(e)){const t=n.getItem(e);let o=t.findIndex(t=>t.group===l);-1!==o?"before"===h?o-=1:o+=1:o=t.length,t.splice(o,0,d)}else n.addItem(e,[d])})},i=t=>{const e=Tg(t);n.removeItem(e)};return{__kindOf:Ig,scope:e,addShortcut:o,addShortcuts:function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.forEach(t=>{Tt(e,(n,o)=>{!1===Object.prototype.hasOwnProperty.call(t,o)&&(t[o]=e[o])}),o(t)})},getShortcuts:t=>{const e=Tg(t),o=n.getItem(e);return I(o)?o.slice():[]},hasShortcut:t=>{const e=Tg(t);return n.hasItem(e)},removeShortcutsByKeys:i,removeShortcutsByGroup:t=>{n.getItems().forEach(e=>{let[n,o]=e;const r=o.filter(e=>e.group!==t);0===r.length?i((t=>t.split("+"))(n)):(o.length=0,o.push(...r))})}}}(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table");return r.addItem(t,e),e},l=()=>s,h=t=>r.getItem(t);let c=!1;const d=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:l();const o=Ag(n)?n:h(n);let i=!1;if(!o.hasShortcut(e))return i;const r=o.getShortcuts(e);for(let n=0;n<r.length;n++){const{callback:o,runOnlyIf:s,preventDefault:a,stopPropagation:l,captureCtrl:h,forwardToContext:u}=r[n];if(!0===s(t)){if(c=h,i=!1===o(t,e),c=!1,a&&t.preventDefault(),l&&(an(t),t.stopPropagation()),i)break;u&&d(t,e,u)}}return i},u=function(t,e,n,o,i){const r=t=>Pg.includes(t),s=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];return t.altKey&&n.push("alt"),e&&(t.ctrlKey||t.metaKey)?n.push("control/meta"):(t.ctrlKey&&n.push("control"),t.metaKey&&n.push("meta")),t.shiftKey&&n.push("shift"),n},a=t=>{if(!1===e(t))return;if(!1===n(t)||229===t.keyCode||"string"!=typeof t.key||ln(t))return;const a=Hg(t);let l=[];r(a)||(l=s(t));const h=[a].concat(l);!i(t,h)&&(Zt()&&l.includes("meta")||!Zt()&&l.includes("control"))&&i(t,[a].concat(s(t,!0))),o(t)},l=t=>{if("string"==typeof t.key){const e=Hg(t);r(e)&&Og.press(e)}},h=t=>{if("string"==typeof t.key){const e=Hg(t);r(e)&&Og.release(e)}},c=()=>{Og.releaseAll()};return{mount:()=>{let e=t;for(Dg+=1;e;)1===Dg&&(e.document.documentElement.addEventListener("keydown",l),Ng.push({event:"keydown",listener:l}),e.document.documentElement.addEventListener("keyup",h),Ng.push({event:"keyup",listener:h})),e.document.documentElement.addEventListener("keydown",a),e.document.documentElement.addEventListener("blur",c),e=ie(e)},unmount:()=>{let e=t;for(Dg-=1;e;){if(0===Dg){for(let t=0;t<Ng.length;t++){const{event:n,listener:o}=Ng[t];e.document.documentElement.removeEventListener(n,o)}Ng.length=0}e.document.documentElement.removeEventListener("keydown",a),e.document.documentElement.removeEventListener("blur",c),e=ie(e)}},isPressed:t=>Og.isPressed(t),releasePressedKeys:()=>Og.releaseAll()}}(e,t=>{const e=l(),o=Ag(e)?e:h(e);return n(t,o.scope)},o,i,d);return u.mount(),{addContext:a,getActiveContextName:l,getContext:h,getOrCreateContext:function(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"table";return null!==(e=h(t))&&void 0!==e?e:a(t,n)},setActiveContextName:t=>{r.hasItem(t)||wt(T`You've tried to activate the "${t}" shortcut context\x20
41
+ that does not exist. Before activation, register the context using the "addContext" method.`),s=t},isCtrlPressed:()=>!c&&(u.isPressed("control")||u.isPressed("meta")),releasePressedKeys:()=>u.releasePressedKeys(),destroy:()=>u.unmount()}};function Vg(t){const{classNames:e}=function(t,e){const n={element:void 0,classNames:[]};let o=t;for(;null!==o&&o!==t.ownerDocument.documentElement&&!n.element;){if("string"==typeof e&&o.classList.contains(e))n.element=o,n.classNames.push(e);else if(e instanceof RegExp){const t=Array.from(o.classList).filter(t=>e.test(t));t.length&&(n.element=o,n.classNames.push(...t))}o=o.parentElement}return n}(t,/ht-theme-[a-zA-Z0-9_-]+/);return e.pop()}function Bg(t,e,n){Fg(t,e),e.set(t,n)}function Fg(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wg(t,e){return t.get(jg(t,e))}function zg(t,e,n){return t.set(jg(t,e),n),n}function jg(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const $g="handsontable-core-styles";var Ug=new WeakMap,Yg=new WeakMap,Gg=new WeakMap,Kg=new WeakMap,qg=new WeakMap,Xg=new WeakMap,Zg=new WeakMap,Jg=new WeakMap,Qg=new WeakSet;class tf{constructor(t){let{hot:e,rootElement:n,rootDocument:o,onThemeChange:i=()=>{},injectCoreCss:r=!0}=t;var s,a;Fg(s=this,a=Qg),a.add(s),Bg(this,Ug,void 0),Bg(this,Yg,void 0),Bg(this,Gg,void 0),Bg(this,Kg,void 0),Bg(this,qg,void 0),Bg(this,Xg,{}),Bg(this,Zg,{}),Bg(this,Jg,void 0),zg(Ug,this,e),zg(Gg,this,n),zg(qg,this,o),zg(Jg,this,i),r&&jg(Qg,this,ef).call(this)}getCSSVariableValue(t){var e;if(Wg(Xg,this)[`--ht-${t}`])return Wg(Xg,this)[`--ht-${t}`];const n=null!==(e=jg(Qg,this,sf).call(this,`--ht-${t}`))&&void 0!==e?e:jg(Qg,this,af).call(this,`--ht-${t}`);return null!==n?(Wg(Xg,this)[`--ht-${t}`]=n,n):void 0}getStyleForTD(t){var e;return null===(e=Wg(Zg,this))||void 0===e||null===(e=e.td)||void 0===e?void 0:e[t]}getDefaultRowHeight(t){const e=jg(Qg,this,nf).call(this);return void 0!==t&&t===Wg(Ug,this).view.getFirstRenderedVisibleRow()?e+1:e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(t){/ht-theme-.*/.test(t)?(jg(Qg,this,lf).call(this),t&&t!==Wg(Yg,this)&&zg(Yg,this,t),Wg(Jg,this).call(this,Wg(Yg,this)),jg(Qg,this,of).call(this)):Qt(`${t} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return Wg(Yg,this)}clearCache(){jg(Qg,this,lf).call(this),jg(Qg,this,of).call(this)}}function ef(){if(!Wg(Ug,this)||!Wg(qg,this)||!Wg(qg,this).head)return;const t=Wg(qg,this).getElementById($g);if(t&&t instanceof HTMLStyleElement)return;const e=Wg(qg,this).createElement("style");e.id=$g,e.textContent='/*!\n * Copyright (c) HANDSONCODE sp. z o. o.\n *\n * HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in\n * Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number\n * 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.\n *\n * This software is protected by applicable copyright laws, including international treaties, and dual-\n * licensed - depending on whether your use for commercial purposes, meaning intended for or\n * resulting in commercial advantage or monetary compensation, or not.\n *\n * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing\n * the suitability, performance, and usefulness of this software outside the production environment,\n * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.\n *\n * Your use of this software for commercial purposes is subject to the terms included in an applicable\n * license agreement.\n *\n * In any case, you must not make any such use of this software as to develop software which may be\n * considered competitive with this software.\n *\n * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"\n * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO\n * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,\n * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM\n * USE OR INABILITY TO USE THIS SOFTWARE.\n *\n * Version: 17.0.1\n * Release date: 25/03/2026 (built at 25/03/2026 09:28:45)\n */\n.ht-root-wrapper {\n font-family: var(--ht-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n position: relative;\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.htFocusCatcher {\n display: block !important;\n position: absolute;\n width: 0;\n height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n opacity: 0;\n z-index: -1;\n}\n\n.ht-grid {\n flex: 1 1 auto;\n min-height: 0;\n}\n\n.htScrollbarTest {\n scrollbar-width: auto;\n scrollbar-color: var(--ht-scrollbar-thumb-color) var(--ht-scrollbar-track-color);\n}\n\n.htScrollbarSafariTest::-webkit-scrollbar {\n width: 9px;\n height: 9px;\n}\n\n.handsontable {\n font-family: var(--ht-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n position: relative;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n letter-spacing: var(--ht-letter-spacing);\n color: var(--ht-foreground-color);\n /* Miscellaneous */\n touch-action: manipulation;\n}\n.handsontable .wtHolder {\n scrollbar-width: auto;\n scrollbar-color: var(--ht-scrollbar-thumb-color) var(--ht-scrollbar-track-color);\n}\n.handsontable .wtHolder::-webkit-scrollbar {\n width: 9px;\n height: 9px;\n}\n.handsontable .wtHolder::-webkit-scrollbar-track {\n background: var(--ht-scrollbar-track-color);\n border-radius: var(--ht-scrollbar-border-radius);\n}\n.handsontable .wtHolder::-webkit-scrollbar-thumb {\n background-color: var(--ht-scrollbar-thumb-color);\n border-radius: var(--ht-scrollbar-border-radius);\n}\n.handsontable .wtHolder::-webkit-scrollbar-corner {\n background: var(--ht-scrollbar-track-color);\n border-end-end-radius: var(--ht-scrollbar-border-radius);\n}\n.handsontable.ht-wrapper {\n border-radius: var(--ht-wrapper-border-radius, 0);\n height: 100%;\n width: 100%;\n}\n.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type {\n border-inline-start-width: 1px;\n}\n.handsontable.ht-wrapper::before {\n content: "";\n display: block;\n position: absolute;\n inset: 0;\n border: var(--ht-wrapper-border-width) solid var(--ht-wrapper-border-color);\n border-radius: var(--ht-wrapper-border-radius, 0);\n z-index: 999;\n pointer-events: none;\n overflow: hidden;\n}\n.handsontable.htGhostTable.htNestedHeaders table {\n border-spacing: 0;\n border-collapse: collapse;\n}\n.handsontable.htGhostTable table thead th {\n border-bottom-width: 0;\n}\n.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,\n.handsontable.htGhostTable table tbody tr:first-of-type td:first-child {\n height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 1px);\n}\n.handsontable.htGhostTable table tbody tr th,\n.handsontable.htGhostTable table tbody tr td {\n border-top-width: 0;\n height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 1px);\n}\n.handsontable.htHasScrollX:not(.htHorizontallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder, .handsontable.htHasScrollY:not(.htVerticallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder {\n border-radius: var(--ht-wrapper-border-radius, 0);\n}\n.handsontable:not(.htHorizontallyScrollableByWindow).htPagination .ht_master .wtHolder, .handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder, .handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder, .handsontable:not(.htVerticallyScrollableByWindow).htPagination .ht_master .wtHolder, .handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder, .handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder {\n background-color: var(--ht-background-color);\n}\n.handsontable tr.ht__row_even th {\n background-color: var(--ht-row-header-even-background-color);\n}\n.handsontable tr.ht__row_even td {\n background-color: var(--ht-row-cell-even-background-color);\n}\n.handsontable tr.ht__row_odd th {\n background-color: var(--ht-row-header-odd-background-color);\n}\n.handsontable tr.ht__row_odd td {\n background-color: var(--ht-row-cell-odd-background-color);\n}\n.handsontable th,\n.handsontable td {\n height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 1px);\n padding: var(--ht-cell-vertical-padding) var(--ht-cell-horizontal-padding);\n vertical-align: top;\n border-top-width: 0;\n border-inline-start-width: 0;\n border-inline-end-width: 1px;\n border-bottom-width: 1px;\n border-style: solid;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n white-space: pre-wrap;\n overflow: hidden;\n outline: none;\n outline-width: 0;\n empty-cells: show;\n box-sizing: border-box;\n color: var(--ht-foreground-color);\n border-top-color: var(--ht-cell-vertical-border-color);\n border-bottom-color: var(--ht-cell-vertical-border-color);\n border-inline-start-color: var(--ht-cell-horizontal-border-color);\n border-inline-end-color: var(--ht-cell-horizontal-border-color);\n}\n.handsontable th.invisibleSelection,\n.handsontable td.invisibleSelection {\n outline: none;\n}\n.handsontable th.invisibleSelection::selection,\n.handsontable td.invisibleSelection::selection {\n background: transparent;\n}\n.handsontable th {\n position: relative;\n overflow: visible;\n text-align: center;\n font-weight: var(--ht-header-font-weight);\n white-space: nowrap;\n color: var(--ht-header-foreground-color);\n background-color: var(--ht-header-background-color);\n}\n.handsontable th:last-child {\n /* Foundation framework fix */\n border-inline-start-width: 0;\n border-inline-end-width: 1px;\n border-bottom-width: 1px;\n border-inline-end-color: var(--ht-border-color);\n}\n.handsontable th:last-child.ht__active_highlight {\n border-inline-end-color: var(--ht-header-active-border-color);\n}\n.handsontable th:first-child {\n border-inline-start-color: var(--ht-border-color);\n}\n.handsontable th:first-child.ht__active_highlight {\n border-inline-start-color: var(--ht-header-active-border-color);\n}\n.handsontable th:first-child, .handsontable th:nth-child(2) {\n border-inline-start-width: 1px;\n}\n.handsontable th.current {\n box-shadow: inset 0 0 0 1px var(--ht-cell-selection-border-color);\n}\n.handsontable th.active {\n color: var(--ht-header-active-foreground-color);\n background-color: var(--ht-header-active-background-color);\n}\n.handsontable th.ht__highlight {\n color: var(--ht-header-highlighted-foreground-color);\n background-color: var(--ht-header-highlighted-background-color);\n}\n.handsontable th.ht__active_highlight {\n border-color: var(--ht-header-active-border-color);\n color: var(--ht-header-active-foreground-color);\n background-color: var(--ht-header-active-background-color);\n}\n.handsontable tbody tr.ht__row_odd th.ht__highlight, .handsontable tbody tr.ht__row_even th.ht__highlight {\n color: var(--ht-header-row-highlighted-foreground-color);\n background-color: var(--ht-header-row-highlighted-background-color);\n}\n.handsontable tbody tr.ht__row_odd th.ht__active_highlight, .handsontable tbody tr.ht__row_even th.ht__active_highlight {\n color: var(--ht-header-row-active-foreground-color);\n background-color: var(--ht-header-row-active-background-color);\n}\n.handsontable tbody tr:first-of-type th:first-child:empty::after,\n.handsontable tbody tr:first-of-type td:first-child:empty::after {\n content: "";\n display: block;\n min-height: var(--ht-line-height);\n}\n.handsontable tbody tr th {\n padding: 0;\n color: var(--ht-header-row-foreground-color);\n background-color: var(--ht-header-row-background-color);\n}\n.handsontable tbody tr th.ht__active_highlight {\n box-shadow: 0 -1px 0 0 var(--ht-header-active-border-color);\n}\n.handsontable tbody tr th .relative {\n padding: var(--ht-cell-vertical-padding) var(--ht-cell-horizontal-padding);\n min-height: 100%;\n}\n.handsontable tbody tr td:first-child {\n border-inline-start-color: var(--ht-border-color);\n}\n.handsontable tbody tr td:last-child {\n border-inline-end-color: var(--ht-border-color);\n}\n.handsontable thead tr th {\n padding: 0;\n}\n.handsontable thead tr th.ht__active_highlight {\n box-shadow: -1px 0 0 0 var(--ht-header-active-border-color);\n}\n.handsontable thead tr th .relative {\n padding: var(--ht-cell-vertical-padding) var(--ht-cell-horizontal-padding);\n}\n.handsontable thead tr th .relative .colHeader {\n text-overflow: ellipsis;\n overflow: hidden;\n vertical-align: top;\n max-width: calc(100% + 1px);\n}\n.handsontable thead tr th .relative:has(.collapsibleIndicator, .changeType) .colHeader {\n max-width: calc(100% - (var(--ht-icon-size) + var(--ht-gap-size)) - 1px);\n}\n.handsontable tr:first-child th,\n.handsontable tr:first-child td {\n border-top-color: var(--ht-border-color);\n border-top-width: 1px;\n}\n.handsontable tr:first-child th.ht__active_highlight,\n.handsontable tr:first-child td.ht__active_highlight {\n border-top-color: var(--ht-header-active-border-color);\n}\n.handsontable tr:last-child th,\n.handsontable tr:last-child td {\n border-bottom-color: var(--ht-border-color);\n}\n.handsontable tr:last-child th.ht__active_highlight,\n.handsontable tr:last-child td.ht__active_highlight {\n border-bottom-color: var(--ht-header-active-border-color);\n}\n.handsontable div[class^=ht_clone] thead .ht__highlight .relative::after {\n content: "";\n display: block;\n position: absolute;\n left: -1px;\n right: -1px;\n bottom: -1px;\n height: var(--ht-header-highlighted-shadow-size);\n background-color: var(--ht-accent-color);\n}\n.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative::after {\n bottom: 0;\n}\n.handsontable div[class^=ht_clone] tbody .ht__highlight .relative::after {\n content: "";\n display: block;\n position: absolute;\n top: -1px;\n right: -1px;\n bottom: -1px;\n width: var(--ht-header-highlighted-shadow-size);\n background-color: var(--ht-accent-color);\n}\n.handsontable div[class^=ht_clone] td:first-of-type {\n border-inline-start-width: 1px;\n}\n.handsontable thead tr:not(:last-child) th {\n /* Fix for - nested columns with hidden column */\n overflow: hidden;\n}\n.handsontable .hide {\n display: none;\n}\n.handsontable .relative {\n position: relative;\n box-sizing: border-box;\n}\n.handsontable .wtHider {\n width: 0;\n}\n.handsontable .wtSpreader {\n position: relative;\n /* must be 0, otherwise blank space appears in scroll demo after scrolling max to the right */\n width: 0;\n height: auto;\n}\n.handsontable .htAutoSize {\n position: absolute;\n left: -99000px;\n top: -99000px;\n visibility: hidden;\n}\n.handsontable .htTextEllipsis {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n}\n.handsontable table,\n.handsontable tbody,\n.handsontable thead,\n.handsontable input,\n.handsontable textarea,\n.handsontable div {\n box-sizing: content-box;\n}\n.handsontable input,\n.handsontable textarea {\n min-height: initial;\n}\n.handsontable .htCore {\n width: 0;\n margin: 0;\n border-width: 0;\n border-spacing: 0;\n border-collapse: separate;\n outline-width: 0;\n table-layout: fixed;\n cursor: default;\n background-color: var(--ht-background-color);\n}\n.handsontable col {\n width: 64px;\n}\n.handsontable col.rowHeader {\n width: 64px;\n}\n.handsontable col.hidden {\n width: 0 !important;\n}\n.handsontable span.colHeader, .handsontable span.rowHeader {\n display: inline-block;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n}\n.handsontable tr.hidden {\n display: none;\n}\n.handsontable tr.hidden td,\n.handsontable tr.hidden th {\n display: none;\n}\n.handsontable a {\n color: var(--ht-link-color);\n}\n.handsontable a:hover {\n color: var(--ht-link-hover-color);\n}\n.handsontable .ht_clone_top th:nth-child(2) {\n border-inline-start-width: 0;\n border-inline-end-width: 1px;\n}\n.handsontable.htRowHeaders thead tr th:nth-child(2) {\n border-inline-start-width: 1px;\n}\n.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,\n.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,\n.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) ~ .handsontable:not(.htGhostTable) tbody tr th,\n.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) ~ .handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child {\n border-inline-end-width: 0;\n border-inline-start-width: 1px;\n}\n.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th, .handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) ~ .handsontable thead tr:last-child th,\n.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th, .handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) ~ .handsontable thead tr.lastChild th {\n border-bottom-width: 0;\n}\n.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,\n.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td {\n border-top-width: 0;\n}\n.handsontable.htAutoRowSize .ht_master.innerBorderTop ~ .ht_clone_inline_start tbody tr:first-child th,\n.handsontable.htAutoRowSize .ht_master.innerBorderTop ~ .ht_clone_inline_start tbody tr:first-child td {\n border-top-width: 0;\n}\n.handsontable .ht_master table.htCore > thead,\n.handsontable .ht_master table.htCore > tbody > tr > th,\n.handsontable .ht_clone_inline_start table.htCore > thead {\n visibility: hidden;\n}\n\n.ht_master,\n.ht_clone_inline_start,\n.ht_clone_top,\n.ht_clone_bottom {\n overflow: hidden;\n}\n.ht_master .wtHolder,\n.ht_clone_inline_start .wtHolder,\n.ht_clone_top .wtHolder,\n.ht_clone_bottom .wtHolder {\n overflow: hidden;\n}\n\n.ht_master .wtHolder {\n overflow: auto;\n}\n\n[dir=rtl].handsontable td[dir=ltr] {\n border-inline-end-width: 0;\n border-inline-start-width: 1px;\n}\n[dir=rtl].handsontable tbody tr td[dir=ltr]:last-child {\n border-inline-start-color: var(--ht-border-color);\n}\n[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative::after {\n right: auto;\n left: -1px;\n}\n\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child {\n border-start-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child {\n border-start-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child,\n.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore {\n border-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child {\n border-start-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child {\n border-end-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child {\n border-end-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_top .htCore {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n border-start-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child {\n border-start-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_inline_start .htCore {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child {\n border-start-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child,\n.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child,\n.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_bottom .htCore {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n border-end-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child,\n.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child {\n border-end-start-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child,\n.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child {\n border-end-end-radius: var(--ht-wrapper-border-radius);\n}\n.handsontable.ht-wrapper.htHasScrollX .htCore {\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child,\n.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child,\n.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child {\n border-end-start-radius: 0 !important;\n}\n.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child,\n.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child,\n.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child {\n border-end-end-radius: 0 !important;\n}\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child,\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child,\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child {\n border-start-end-radius: 0 !important;\n}\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child,\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child,\n.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child {\n border-end-end-radius: 0 !important;\n}\n\n.handsontable.mobile {\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-overflow-scrolling: touch;\n}\n.handsontable.mobile .wtHolder {\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-overflow-scrolling: touch;\n}\n.handsontable.mobile .handsontableInput:focus {\n box-shadow: inset 0 0 0 2px var(--ht-accent-color);\n -webkit-appearance: none;\n}\n.handsontable .topSelectionHandle,\n.handsontable .topSelectionHandle-HitArea,\n.handsontable .bottomSelectionHandle,\n.handsontable .bottomSelectionHandle-HitArea {\n inset-inline-start: -10000px;\n inset-inline-end: unset;\n top: -10000px;\n z-index: 9999;\n}\n.handsontable.hide-tween {\n -webkit-animation: opacity-hide 0.2s;\n animation: opacity-hide 0.2s;\n animation-fill-mode: forwards;\n -webkit-animation-fill-mode: forwards;\n}\n.handsontable.show-tween {\n -webkit-animation: opacity-show 0.3s;\n animation: opacity-show 0.3s;\n animation-fill-mode: forwards;\n -webkit-animation-fill-mode: forwards;\n}\n\n.ht_clone_master {\n z-index: 100;\n}\n\n.ht_clone_inline_start {\n z-index: 120;\n}\n\n.ht_clone_bottom {\n z-index: 130;\n}\n\n.ht_clone_bottom_inline_start_corner {\n z-index: 150;\n}\n\n.ht_clone_top {\n z-index: 160;\n}\n\n.ht_clone_top_inline_start_corner {\n z-index: 180;\n}\n\n.ht_editor_hidden {\n z-index: -1;\n}\n\n.ht_editor_visible {\n z-index: 200;\n}\n\n.handsontable td.area {\n position: relative;\n}\n.handsontable td.area::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-1 {\n position: relative;\n}\n.handsontable td.area-1::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-2 {\n position: relative;\n}\n.handsontable td.area-2::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-3 {\n position: relative;\n}\n.handsontable td.area-3::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-4 {\n position: relative;\n}\n.handsontable td.area-4::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-5 {\n position: relative;\n}\n.handsontable td.area-5::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-6 {\n position: relative;\n}\n.handsontable td.area-6::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area-7 {\n position: relative;\n}\n.handsontable td.area-7::before {\n content: "";\n position: absolute;\n inset: 0;\n background: var(--ht-cell-selection-background-color, #1a42e8);\n}\n.handsontable td.area::before {\n opacity: 0.14;\n}\n.handsontable td.area-1::before {\n opacity: 0.21;\n}\n.handsontable td.area-2::before {\n opacity: 0.28;\n}\n.handsontable td.area-3::before {\n opacity: 0.35;\n}\n.handsontable td.area-4::before {\n opacity: 0.42;\n}\n.handsontable td.area-5::before {\n opacity: 0.49;\n}\n.handsontable td.area-6::before {\n opacity: 0.56;\n}\n.handsontable td.area-7::before {\n opacity: 0.63;\n}\n.handsontable td.area {\n border-color: color-mix(in srgb, var(--ht-border-color), var(--ht-foreground-color) 10%);\n}\n.handsontable .wtBorder {\n position: absolute;\n font-size: 0;\n}\n.handsontable .wtBorder:nth-child(1), .handsontable .wtBorder:nth-child(3) {\n z-index: 2;\n}\n.handsontable .wtBorder:nth-child(2), .handsontable .wtBorder:nth-child(4) {\n z-index: 1;\n}\n.handsontable .wtBorder.hidden {\n display: none !important;\n}\n.handsontable .wtBorder.current {\n z-index: 10;\n background-color: var(--ht-cell-selection-border-color) !important;\n}\n.handsontable .wtBorder.area {\n z-index: 8;\n background-color: var(--ht-cell-selection-border-color) !important;\n}\n.handsontable .wtBorder.fill {\n z-index: 6;\n background-color: var(--ht-cell-autofill-fill-border-color, #68696c) !important;\n}\n.handsontable .wtBorder.corner {\n border-radius: var(--ht-cell-autofill-border-radius) !important;\n background-color: var(--ht-cell-autofill-background-color, #1a42e8) !important;\n border-color: var(--ht-cell-autofill-border-color) !important;\n font-size: 0;\n cursor: crosshair;\n z-index: 10;\n}\n.handsontable .wtBorder.corner::after {\n content: "";\n position: absolute;\n border-radius: var(--ht-cell-autofill-border-radius);\n inset: min(0px, (var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size)) / 2);\n background: transparent;\n}\n.handsontable .wtBorder.corner.wtCornerInlineEndEdge::after {\n inset-inline-end: 0;\n}\n.handsontable .wtBorder.corner.wtCornerBlockEndEdge::after {\n inset-block-end: 0;\n}\n\n.hot-display-license-info {\n font-family: var(--ht-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n padding: var(--ht-license-vertical-padding, 16px) var(--ht-license-horizontal-padding, 16px);\n font-size: var(--ht-font-size-small);\n line-height: var(--ht-line-height-small);\n color: var(--ht-license-foreground-color);\n background-color: var(--ht-license-background-color, #f7f7f9);\n text-align: left;\n border: 1px solid var(--ht-border-color, #f7f7f9);\n margin-top: 10px;\n border-radius: var(--ht-wrapper-border-radius);\n}\n.hot-display-license-info a {\n font-size: var(--ht-license-font-size);\n color: var(--ht-link-color);\n}\n.hot-display-license-info a:hover {\n color: var(--ht-link-hover-color);\n}\n\n.handsontable .htAutocompleteArrow {\n position: relative;\n cursor: default;\n width: var(--ht-icon-size);\n height: var(--ht-icon-size);\n font-size: 0;\n float: right;\n top: calc((var(--ht-line-height) - var(--ht-icon-size)) / 2);\n margin-inline-start: calc(var(--ht-gap-size) * 2);\n margin-inline-end: 1px;\n}\n.handsontable .htAutocompleteArrow::after {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0.6;\n}\n\n[dir=rtl].handsontable .htAutocompleteArrow {\n float: left;\n}\n\n.handsontable .htCheckboxRendererInput {\n position: relative;\n display: inline-block;\n width: var(--ht-checkbox-size);\n height: var(--ht-checkbox-size);\n margin: 0;\n vertical-align: middle;\n cursor: pointer;\n margin-top: -2px;\n outline: none;\n}\n.handsontable .htCheckboxRendererInput:first-child {\n margin-inline-end: var(--ht-gap-size);\n}\n.handsontable .htCheckboxRendererInput:last-child {\n margin-inline-start: var(--ht-gap-size);\n}\n.handsontable .htCheckboxRendererInput::before {\n content: "";\n display: inline-block;\n position: absolute;\n top: 0;\n left: 0;\n width: var(--ht-checkbox-size);\n height: var(--ht-checkbox-size);\n border-radius: var(--ht-checkbox-border-radius);\n border: 1px solid var(--ht-checkbox-border-color);\n background-color: var(--ht-checkbox-background-color);\n box-sizing: border-box;\n pointer-events: none;\n transition: all var(--ht-table-transition) ease-in-out;\n}\n.handsontable .htCheckboxRendererInput::after {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n color: var(--ht-checkbox-icon-color);\n pointer-events: none;\n width: var(--ht-checkbox-size) !important;\n height: var(--ht-checkbox-size) !important;\n}\n.handsontable .htCheckboxRendererInput:checked::before {\n border-color: var(--ht-checkbox-checked-border-color);\n background-color: var(--ht-checkbox-checked-background-color);\n}\n.handsontable .htCheckboxRendererInput:checked::after {\n color: var(--ht-checkbox-checked-icon-color);\n}\n.handsontable .htCheckboxRendererInput:checked:disabled::before {\n border-color: var(--ht-checkbox-checked-disabled-border-color);\n background-color: var(--ht-checkbox-checked-disabled-background-color);\n}\n.handsontable .htCheckboxRendererInput:checked:disabled::after {\n color: var(--ht-checkbox-checked-disabled-icon-color);\n}\n.handsontable .htCheckboxRendererInput:checked:focus::before {\n border-color: var(--ht-checkbox-checked-focus-border-color);\n background-color: var(--ht-checkbox-checked-focus-background-color);\n}\n.handsontable .htCheckboxRendererInput:checked:focus::after {\n color: var(--ht-checkbox-checked-focus-icon-color);\n}\n.handsontable .htCheckboxRendererInput:focus::before {\n border-color: var(--ht-checkbox-focus-border-color);\n background-color: var(--ht-checkbox-focus-background-color);\n outline: 1px solid var(--ht-checkbox-focus-ring-color);\n}\n.handsontable .htCheckboxRendererInput:focus::after {\n color: var(--ht-checkbox-focus-icon-color);\n}\n.handsontable .htCheckboxRendererInput:disabled {\n cursor: initial;\n}\n.handsontable .htCheckboxRendererInput:disabled::before {\n border-color: var(--ht-checkbox-disabled-border-color);\n background-color: var(--ht-checkbox-disabled-background-color);\n}\n.handsontable .htCheckboxRendererInput:disabled::after {\n color: var(--ht-checkbox-disabled-icon-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate::before {\n border-color: var(--ht-checkbox-indeterminate-border-color);\n background-color: var(--ht-checkbox-indeterminate-background-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate::after {\n color: var(--ht-checkbox-indeterminate-icon-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate:disabled::before {\n border-color: var(--ht-checkbox-indeterminate-disabled-border-color);\n background-color: var(--ht-checkbox-indeterminate-disabled-background-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate:disabled::after {\n color: var(--ht-checkbox-indeterminate-disabled-icon-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate:focus::before {\n border-color: var(--ht-checkbox-indeterminate-focus-border-color);\n background-color: var(--ht-checkbox-indeterminate-focus-background-color);\n}\n.handsontable .htCheckboxRendererInput:indeterminate:focus::after {\n color: var(--ht-checkbox-indeterminate-focus-icon-color);\n}\n.handsontable .htCheckboxRendererInput.noValue {\n opacity: 0.5;\n}\n.handsontable .htCheckboxRendererLabel {\n display: inline-block;\n position: relative;\n font-size: inherit;\n line-height: inherit;\n cursor: pointer;\n color: inherit;\n margin: 0;\n}\n.handsontable .htCheckboxRendererLabel.fullWidth {\n width: 100%;\n}\n\n.handsontable .htPlaceholder {\n color: var(--ht-placeholder-color);\n}\n.handsontable .htDimmed {\n color: var(--ht-read-only-color) !important;\n background-color: var(--ht-cell-read-only-background-color) !important;\n}\n.handsontable .htLeft {\n text-align: left;\n}\n.handsontable .htCenter {\n text-align: center;\n}\n.handsontable .htRight {\n text-align: right;\n}\n.handsontable .htJustify {\n text-align: justify;\n}\n.handsontable .htTop {\n vertical-align: top;\n}\n.handsontable .htMiddle {\n vertical-align: middle;\n}\n.handsontable .htBottom {\n vertical-align: bottom;\n}\n.handsontable .htInvalid {\n /* gives priority over td.area selection background */\n background-color: var(--ht-cell-error-background-color) !important;\n}\n.handsontable .htNoWrap {\n white-space: nowrap;\n}\n.handsontable .htSearchResult {\n background-color: var(--ht-cell-success-background-color) !important;\n}\n\n.handsontable .ht-multi-select-renderer {\n padding: var(--ht-cell-vertical-padding) var(--ht-cell-horizontal-padding);\n overflow: hidden;\n}\n.handsontable .ht-multi-select-chips-container {\n display: flex;\n flex-wrap: nowrap;\n align-items: center;\n gap: var(--ht-gap-size);\n overflow: hidden;\n max-width: 100%;\n}\n.handsontable .ht-multi-select-chip {\n display: inline-flex;\n align-items: center;\n gap: var(--ht-gap-size);\n padding: var(--ht-chip-vertical-padding) calc((var(--ht-line-height) - var(--ht-icon-size)) / 2) var(--ht-chip-vertical-padding) var(--ht-chip-horizontal-padding);\n border-radius: var(--ht-chip-border-radius);\n background: var(--ht-chip-background);\n white-space: nowrap;\n flex-shrink: 0;\n max-width: 100px;\n box-sizing: border-box;\n}\n.handsontable .ht-multi-select-chip-label {\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--ht-foreground-color);\n font-style: normal;\n font-weight: var(--ht-font-weight);\n line-height: var(--ht-line-height, 40px);\n letter-spacing: var(--ht-letter-spacing, 0);\n padding: 0 var(--ht-chip-gap);\n}\n.handsontable .ht-multi-select-chip-remove {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--ht-icon-size) !important;\n height: var(--ht-icon-size) !important;\n padding: 0;\n cursor: pointer;\n flex-shrink: 0;\n color: var(--ht-icon-button-icon-color);\n background-size: contain;\n background-repeat: no-repeat;\n background-position: center;\n}\n.handsontable .ht-multi-select-chip-remove::before {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n}\n.handsontable .ht-multi-select-chip-remove:hover {\n background-color: var(--ht-icon-button-hover-background-color);\n}\n.handsontable .ht-multi-select-overflow {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 calc(var(--ht-gap-size) * 2);\n background: var(--ht-chip-background);\n border-radius: var(--ht-chip-border-radius);\n color: var(--ht-foreground-color);\n white-space: nowrap;\n flex-shrink: 0;\n}\n\n.handsontableInputHolder {\n position: absolute;\n top: 0;\n left: 0;\n}\n.handsontableInputHolder .handsontableInput {\n display: block;\n margin: 0;\n padding: calc(var(--ht-cell-vertical-padding, 4px) + 1px) calc(var(--ht-cell-horizontal-padding, 8px) + 1px);\n font-family: inherit !important;\n font-size: inherit !important;\n line-height: inherit !important;\n color: var(--ht-cell-editor-foreground-color);\n background-color: var(--ht-cell-editor-background-color, #ffffff);\n box-shadow: inset 0 0 0 var(--ht-cell-editor-border-width, 2px) var(--ht-cell-editor-border-color, #1a42e8), 0 0 var(--ht-cell-editor-shadow-blur-radius, 0) 0 var(--ht-cell-editor-shadow-color, transparent);\n border: none;\n border-radius: 0;\n -webkit-appearance: none !important;\n box-sizing: border-box;\n /* Miscellaneous */\n outline-width: 0;\n /* overwrite styles potentially made by a framework */\n}\n.handsontableInputHolder .handsontableInput:focus {\n outline: none;\n}\n\n.htSelectEditor {\n position: absolute;\n}\n.htSelectEditor select {\n position: absolute;\n inset: 0;\n width: 100%;\n height: 100%;\n padding: calc(var(--ht-cell-vertical-padding, 4px) + 1px) calc(var(--ht-cell-horizontal-padding, 8px) + 1px);\n padding-inline-end: 26px;\n margin: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n color: var(--ht-cell-editor-foreground-color);\n background-color: var(--ht-cell-editor-background-color, #ffffff);\n font-family: inherit !important;\n font-size: inherit !important;\n line-height: inherit !important;\n box-shadow: inset 0 0 0 var(--ht-cell-editor-border-width, 2px) var(--ht-cell-editor-border-color, #1a42e8), 0 0 var(--ht-cell-editor-shadow-blur-radius, 0) 0 var(--ht-cell-editor-shadow-color, transparent);\n border: none;\n border-radius: 0;\n box-sizing: border-box;\n -webkit-appearance: none !important;\n}\n.htSelectEditor select:focus {\n outline: none;\n}\n.htSelectEditor .htAutocompleteArrow {\n top: 50%;\n transform: translateY(-50%);\n margin-inline-end: 4px;\n z-index: 1;\n pointer-events: none;\n}\n\n.handsontable.listbox {\n box-shadow: var(--ht-menu-shadow-x, 0) var(--ht-menu-shadow-y, 0) var(--ht-menu-shadow-blur, 8px) color-mix(in srgb, var(--ht-menu-shadow-color, rgb(0, 0, 0)) var(--ht-menu-shadow-opacity, 100%), transparent);\n margin: 0;\n border: var(--ht-menu-border-width, 1px) solid var(--ht-menu-border-color, #e5e5e9);\n}\n.handsontable.listbox .ht_master {\n overflow: hidden;\n background-color: var(--ht-background-color);\n}\n.handsontable.listbox .wtHolder {\n overflow: auto;\n border-radius: 0 !important;\n}\n.handsontable.listbox .wtHider, .handsontable.listbox .htCore {\n border-radius: 0 !important;\n}\n.handsontable.listbox table {\n overflow: hidden;\n}\n.handsontable.listbox table th,\n.handsontable.listbox table tr:first-child th,\n.handsontable.listbox table tr:last-child th,\n.handsontable.listbox table tr:first-child td,\n.handsontable.listbox table td {\n border-color: transparent !important;\n}\n.handsontable.listbox table th,\n.handsontable.listbox table td {\n white-space: nowrap;\n text-overflow: ellipsis;\n border-radius: 0 !important;\n}\n.handsontable.listbox table .wtBorder {\n visibility: hidden;\n}\n.handsontable.listbox table strong {\n font-weight: bold;\n color: inherit;\n}\n.handsontable.listbox table tr td:hover td {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent) !important;\n cursor: pointer;\n box-shadow: none !important;\n}\n.handsontable.listbox table td {\n transition: var(--ht-table-transition) background ease-in-out;\n}\n.handsontable.listbox table td:hover {\n background-color: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent) !important;\n cursor: pointer;\n}\n.handsontable.listbox table td.current:not([aria-expanded=true]) {\n box-shadow: inset 0 0 0 1px var(--ht-accent-color);\n}\n.handsontable.listbox table td.htDimmed {\n cursor: default;\n font-style: inherit;\n color: inherit !important;\n}\n.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover) {\n background-color: inherit !important;\n}\n.handsontable.listbox table thead th {\n height: auto !important;\n text-align: left;\n}\n.handsontable.listbox table thead th .relative {\n padding-top: calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));\n padding-bottom: calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));\n}\n.handsontable.listbox .ht_clone_top .wtHider {\n overflow: hidden;\n}\n.handsontable.listbox .ht_clone_top table {\n border-radius: 0;\n}\n.handsontable.listbox .htBorders div {\n background: none !important;\n}\n.handsontable.autocompleteEditor tr.ht__row_even th,\n.handsontable.autocompleteEditor tr.ht__row_even td {\n background-color: var(--ht-background-color, #ffffff);\n}\n.handsontable.autocompleteEditor tr.ht__row_odd th,\n.handsontable.autocompleteEditor tr.ht__row_odd td {\n background-color: var(--ht-background-color, #ffffff);\n}\n\n[dir=rtl].handsontable.listbox table thead th {\n text-align: right;\n}\n\n.pika-single {\n font-family: var(--ht-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n box-shadow: var(--ht-menu-shadow-x, 0) var(--ht-menu-shadow-y, 0) var(--ht-menu-shadow-blur, 8px) color-mix(in srgb, var(--ht-menu-shadow-color, rgb(0, 0, 0)) var(--ht-menu-shadow-opacity, 100%), transparent);\n position: relative;\n display: block;\n padding: 10px;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n color: var(--ht-foreground-color);\n background: var(--ht-background-color, #ffffff);\n border: var(--ht-menu-border-width, 1px) solid var(--ht-menu-border-color, #e5e5e9);\n border-radius: var(--ht-menu-border-radius);\n z-index: 9999;\n}\n.pika-single.is-hidden {\n display: none;\n}\n.pika-single .pika-row {\n background-color: transparent;\n}\n.pika-single .pika-title {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.pika-single .pika-label {\n position: relative;\n order: 2;\n padding: 5px;\n color: var(--ht-accent-color);\n}\n.pika-single .pika-label .pika-select {\n position: absolute;\n inset: 0;\n opacity: 0;\n cursor: pointer;\n}\n.pika-single .pika-prev,\n.pika-single .pika-next {\n width: 20px;\n height: 20px;\n white-space: nowrap;\n text-indent: -9999px;\n cursor: pointer;\n color: var(--ht-accent-color);\n background: none;\n border: none;\n padding: 0;\n}\n.pika-single .pika-prev {\n order: 1;\n margin-right: auto;\n}\n.pika-single .pika-next {\n order: 3;\n margin-left: auto;\n}\n.pika-single .pika-table thead {\n height: 50px;\n}\n.pika-single .pika-table th {\n padding: 1px;\n vertical-align: middle;\n}\n.pika-single .pika-table th abbr {\n text-decoration: none;\n font-weight: normal;\n border: none;\n cursor: initial;\n}\n.pika-single .pika-table td {\n padding: 1px;\n vertical-align: middle;\n}\n.pika-single .pika-table td.is-disabled .pika-button {\n pointer-events: none;\n opacity: 0.5;\n}\n.pika-single .pika-table td.is-today .pika-button {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent);\n}\n.pika-single .pika-table td.is-selected .pika-button {\n background: var(--ht-accent-color, #1a42e8);\n color: var(--ht-primary-button-foreground-color, #ffffff);\n}\n.pika-single .pika-table td.pika-week {\n width: 12.5%;\n text-align: center;\n}\n.pika-single .pika-table .pika-button {\n width: 100%;\n aspect-ratio: 1/1;\n background: transparent;\n color: var(--ht-foreground-color);\n border: none;\n border-radius: var(--ht-button-border-radius);\n margin: 0;\n padding: 10px;\n cursor: pointer;\n font-size: inherit;\n}\n.pika-single .pika-table .pika-button:hover {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent);\n}\n\n[dir=rtl].htDatepickerHolder .pika-single .pika-next {\n transform: rotate(180deg);\n margin-left: 0;\n margin-right: auto;\n}\n[dir=rtl].htDatepickerHolder .pika-single .pika-prev {\n transform: rotate(180deg);\n margin-left: auto;\n margin-right: 0;\n}\n\n.handsontableEditor {\n position: absolute;\n}\n.handsontableEditor .ht-multi-select-editor {\n box-shadow: var(--ht-menu-shadow-x, 0) var(--ht-menu-shadow-y, 0) var(--ht-menu-shadow-blur, 8px) color-mix(in srgb, var(--ht-menu-shadow-color, rgb(0, 0, 0)) var(--ht-menu-shadow-opacity, 100%), transparent);\n scrollbar-width: auto;\n scrollbar-color: var(--ht-scrollbar-thumb-color) var(--ht-scrollbar-track-color);\n overflow-y: auto;\n border-radius: 0 0 var(--ht-menu-border-radius) var(--ht-menu-border-radius);\n border: var(--ht-menu-border-width) solid var(--ht-menu-border-color);\n background: var(--ht-background-color);\n width: max-content;\n min-width: 120px;\n padding: var(--ht-menu-vertical-padding) var(--ht-menu-horizontal-padding);\n}\n.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper {\n display: flex;\n padding: var(--ht-menu-item-vertical-padding) var(--ht-menu-item-horizontal-padding);\n align-items: center;\n gap: var(--ht-gap-size);\n align-self: stretch;\n position: relative;\n}\n.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-icon {\n position: absolute;\n left: calc(var(--ht-menu-item-horizontal-padding) + 10px);\n top: 50%;\n transform: translateY(-50%);\n width: 16px;\n height: 16px;\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n opacity: 0.5;\n pointer-events: none;\n z-index: 1;\n}\n.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input {\n box-sizing: border-box;\n width: 100%;\n border-radius: var(--ht-input-border-radius);\n color: var(--ht-input-foreground-color);\n background-color: var(--ht-input-background-color);\n border: 1px solid var(--ht-input-border-color);\n transition: var(--ht-table-transition) all ease-in-out;\n line-height: var(--ht-line-height);\n font-size: var(--ht-font-size);\n padding: var(--ht-input-vertical-padding) var(--ht-menu-item-horizontal-padding) var(--ht-input-vertical-padding) 32px;\n}\n.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover {\n border-color: var(--ht-input-hover-border-color);\n color: var(--ht-input-hover-foreground-color);\n background-color: var(--ht-input-hover-background-color);\n}\n.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled {\n border-color: var(--ht-input-disabled-border-color);\n color: var(--ht-input-disabled-foreground-color);\n background-color: var(--ht-input-disabled-background-color);\n}\n.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus {\n border-color: var(--ht-input-focus-border-color);\n color: var(--ht-input-focus-foreground-color);\n background-color: var(--ht-input-focus-background-color);\n outline: none;\n outline-offset: 0;\n box-shadow: none;\n}\n.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder {\n color: var(--ht-foreground-color);\n opacity: 0.6;\n}\n.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator {\n width: 100%;\n height: 1px;\n background-color: var(--ht-menu-border-color);\n margin: var(--ht-menu-vertical-padding) 0 var(--ht-menu-vertical-padding) 0;\n padding: 0;\n}\n.handsontableEditor .ht-multi-select-editor ul {\n list-style: none;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n margin: 0;\n padding: var(--ht-gap-size) var(--ht-menu-horizontal-padding);\n}\n.handsontableEditor .ht-multi-select-editor ul li {\n display: flex;\n align-items: center;\n align-self: stretch;\n background: var(--ht-background-color);\n padding: var(--ht-menu-item-vertical-padding) var(--ht-menu-item-horizontal-padding);\n user-select: none;\n cursor: pointer;\n}\n.handsontableEditor .ht-multi-select-editor ul li * {\n cursor: pointer;\n}\n.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected {\n background: color-mix(in srgb, var(--ht-menu-item-active-color) var(--ht-menu-item-active-color-opacity, 100%), transparent);\n}\n.handsontableEditor .ht-multi-select-editor ul li div {\n display: flex;\n align-items: center;\n flex: 1 0 0;\n}\n.handsontableEditor .ht-multi-select-editor ul li div input {\n position: relative;\n appearance: none;\n margin: 0;\n padding: 0;\n width: var(--ht-checkbox-size);\n height: var(--ht-checkbox-size);\n display: flex;\n}\n.handsontableEditor .ht-multi-select-editor ul li div input::after {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n}\n.handsontableEditor .ht-multi-select-editor ul li div input::before {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n width: var(--ht-checkbox-size);\n height: var(--ht-checkbox-size);\n border-radius: var(--ht-checkbox-border-radius);\n border: 1px solid var(--ht-checkbox-border-color);\n background: var(--ht-checkbox-background-color);\n background-repeat: no-repeat;\n background-position: center;\n}\n.handsontableEditor .ht-multi-select-editor ul li div input:checked::before {\n border-color: var(--ht-checkbox-checked-border-color);\n background: var(--ht-checkbox-checked-background-color);\n}\n.handsontableEditor .ht-multi-select-editor ul li div input:checked::after {\n color: var(--ht-checkbox-checked-icon-color);\n background-color: currentColor;\n}\n.handsontableEditor .ht-multi-select-editor ul li div input:focus {\n outline: none;\n}\n.handsontableEditor .ht-multi-select-editor ul li div label {\n overflow: hidden;\n color: var(--ht-foreground-color);\n text-overflow: ellipsis;\n font-size: var(--ht-font-size);\n font-style: normal;\n font-weight: 400;\n line-height: var(--ht-line-height);\n letter-spacing: var(--ht-letter-spacing);\n width: 100%;\n padding: 0 0 0 calc(var(--ht-gap-size) * 2);\n}\n.handsontableEditor .ht-multi-select-editor ul li:hover {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent);\n}\n.handsontableEditor .ht-multi-select-editor ul li:has(input:focus) {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent);\n}\n\n.handsontable .htUISelectCaption {\n width: 100%;\n padding: var(--ht-input-vertical-padding) var(--ht-input-horizontal-padding);\n padding-inline-end: calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));\n margin: 0;\n font-family: inherit;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n border-radius: var(--ht-input-border-radius);\n box-sizing: border-box;\n cursor: pointer;\n outline: none !important;\n border: var(--ht-input-border-width) solid var(--ht-input-border-color);\n color: var(--ht-input-foreground-color);\n background-color: var(--ht-input-background-color);\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n transition: var(--ht-table-transition) all ease-in-out;\n}\n.handsontable .htUISelectCaption::after {\n content: "";\n display: block;\n position: absolute;\n right: calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size) / 4);\n top: 50%;\n transform: translateY(-50%);\n}\n.handsontable .htUISelectCaption:hover {\n border-color: var(--ht-input-hover-border-color);\n color: var(--ht-input-hover-foreground-color);\n background-color: var(--ht-input-hover-background-color);\n}\n.handsontable .htUISelectCaption:disabled {\n border-color: var(--ht-input-disabled-border-color);\n color: var(--ht-input-disabled-foreground-color);\n background-color: var(--ht-input-disabled-background-color);\n}\n.handsontable .htUISelectCaption:focus {\n border-color: var(--ht-input-focus-border-color);\n color: var(--ht-input-focus-foreground-color);\n background-color: var(--ht-input-focus-background-color);\n}\n.handsontable .htUISelect {\n cursor: pointer;\n position: relative;\n outline: none !important;\n}\n.handsontable .htUISelect:focus .htUISelectCaption {\n border-color: var(--ht-input-focus-border-color);\n color: var(--ht-input-focus-foreground-color);\n background-color: var(--ht-input-focus-background-color);\n}\n\n[dir=rtl].handsontable .htUISelectCaption::after {\n right: auto;\n left: calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size) / 4);\n}\n\n.handsontable .htFiltersMenuCondition .htUIInput input,\n.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input {\n width: 100%;\n padding: var(--ht-input-vertical-padding) var(--ht-input-horizontal-padding);\n font-family: inherit;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n border-radius: var(--ht-input-border-radius);\n box-sizing: border-box;\n cursor: pointer;\n outline: none !important;\n border: var(--ht-input-border-width) solid var(--ht-input-border-color);\n color: var(--ht-input-foreground-color);\n background-color: var(--ht-input-background-color);\n transition: var(--ht-table-transition) all ease-in-out;\n}\n.handsontable .htFiltersMenuCondition .htUIInput input:hover,\n.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover {\n border-color: var(--ht-input-hover-border-color);\n color: var(--ht-input-hover-foreground-color);\n background-color: var(--ht-input-hover-background-color);\n}\n.handsontable .htFiltersMenuCondition .htUIInput input:disabled,\n.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled {\n border-color: var(--ht-input-disabled-border-color);\n color: var(--ht-input-disabled-foreground-color);\n background-color: var(--ht-input-disabled-background-color);\n}\n.handsontable .htFiltersMenuCondition .htUIInput input:focus,\n.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus {\n border-color: var(--ht-input-focus-border-color);\n color: var(--ht-input-focus-foreground-color);\n background-color: var(--ht-input-focus-background-color);\n}\n.handsontable .htUIInput {\n position: relative;\n padding: 0;\n outline: none !important;\n text-align: center;\n}\n.handsontable .htUIInputIcon {\n position: absolute;\n}\n\n.handsontable .htUIInput.htUIButton input, .handsontable .ht-button {\n min-width: 64px;\n padding: var(--ht-button-vertical-padding) var(--ht-button-horizontal-padding);\n font-family: inherit;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n border-radius: var(--ht-button-border-radius);\n border-width: 1px;\n border-style: solid;\n box-sizing: border-box;\n outline: none !important;\n cursor: pointer;\n transition: var(--ht-table-transition) all ease-in-out;\n}\n.handsontable .htUIInput.htUIButtonCancel input, .handsontable .ht-button--secondary {\n border-color: var(--ht-secondary-button-border-color);\n background-color: var(--ht-secondary-button-background-color);\n color: var(--ht-secondary-button-foreground-color);\n}\n.handsontable .htUIInput.htUIButtonCancel input:hover, .handsontable .ht-button--secondary:hover {\n border-color: var(--ht-secondary-button-hover-border-color);\n background-color: var(--ht-secondary-button-hover-background-color);\n color: var(--ht-secondary-button-hover-foreground-color);\n}\n.handsontable .htUIInput.htUIButtonCancel input:disabled, .handsontable .ht-button--secondary:disabled {\n border-color: var(--ht-secondary-button-disabled-border-color);\n background-color: var(--ht-secondary-button-disabled-background-color);\n color: var(--ht-secondary-button-disabled-foreground-color);\n}\n.handsontable .htUIInput.htUIButtonCancel input:focus, .handsontable .ht-button--secondary:focus {\n border-color: var(--ht-secondary-button-focus-border-color);\n background-color: var(--ht-secondary-button-focus-background-color);\n color: var(--ht-secondary-button-focus-foreground-color);\n box-shadow: 0 0 0 1px var(--ht-accent-color);\n}\n\n.htUIInput.htUIButtonOK input, .ht-button--primary {\n border-color: var(--ht-primary-button-border-color);\n background-color: var(--ht-primary-button-background-color);\n color: var(--ht-primary-button-foreground-color);\n}\n.htUIInput.htUIButtonOK input:hover, .ht-button--primary:hover {\n border-color: var(--ht-primary-button-hover-border-color);\n background-color: var(--ht-primary-button-hover-background-color);\n color: var(--ht-primary-button-hover-foreground-color);\n}\n.htUIInput.htUIButtonOK input:disabled, .ht-button--primary:disabled {\n border-color: var(--ht-primary-button-disabled-border-color);\n background-color: var(--ht-primary-button-disabled-background-color);\n color: var(--ht-primary-button-disabled-foreground-color);\n}\n.htUIInput.htUIButtonOK input:focus, .ht-button--primary:focus {\n border-color: var(--ht-primary-button-focus-border-color);\n background-color: var(--ht-primary-button-focus-background-color);\n color: var(--ht-primary-button-focus-foreground-color);\n box-shadow: 0 0 0 1px var(--ht-accent-color);\n}\n\n.handsontable .htUIRadio {\n position: relative;\n display: inline-flex;\n margin: 0;\n padding: var(--ht-gap-size) calc(2 * var(--ht-gap-size));\n padding-bottom: 0;\n align-items: center;\n gap: var(--ht-gap-size);\n cursor: pointer;\n}\n.handsontable .htUIRadio:first-child {\n padding-inline-start: 0;\n}\n.handsontable .htUIRadio > input[type=radio] {\n position: relative;\n width: var(--ht-radio-size);\n height: var(--ht-radio-size);\n margin: 0;\n appearance: none;\n cursor: pointer;\n border-radius: calc(0.5 * var(--ht-radio-size));\n outline: none;\n}\n.handsontable .htUIRadio > input[type=radio]::before {\n content: "";\n display: block;\n position: absolute;\n inset: 0;\n border-radius: calc(0.5 * var(--ht-radio-size));\n border: 1px solid var(--ht-radio-border-color);\n background-color: var(--ht-radio-background-color);\n}\n.handsontable .htUIRadio > input[type=radio]::after {\n content: "";\n display: block;\n position: absolute;\n color: var(--ht-radio-icon-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked::before {\n border-color: var(--ht-radio-checked-border-color);\n background-color: var(--ht-radio-checked-background-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked::after {\n color: var(--ht-radio-checked-icon-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked:disabled {\n cursor: initial;\n}\n.handsontable .htUIRadio > input[type=radio]:checked:disabled::before {\n border-color: var(--ht-radio-checked-disabled-border-color);\n background-color: var(--ht-radio-checked-disabled-background-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked:disabled::after {\n color: var(--ht-radio-checked-disabled-icon-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked:focus::before {\n border-color: var(--ht-radio-checked-focus-border-color);\n background-color: var(--ht-radio-checked-focus-background-color);\n}\n.handsontable .htUIRadio > input[type=radio]:checked:focus::after {\n color: var(--ht-radio-checked-focus-icon-color);\n}\n.handsontable .htUIRadio > input[type=radio]:disabled {\n cursor: initial;\n}\n.handsontable .htUIRadio > input[type=radio]:disabled::before {\n border-color: var(--ht-radio-disabled-border-color);\n background-color: var(--ht-radio-disabled-background-color);\n}\n.handsontable .htUIRadio > input[type=radio]:disabled::after {\n color: var(--ht-radio-disabled-icon-color);\n}\n.handsontable .htUIRadio > input[type=radio]:focus::before {\n border-color: var(--ht-radio-focus-border-color);\n background-color: var(--ht-radio-focus-background-color);\n outline: 1px solid var(--ht-radio-focus-ring-color);\n}\n.handsontable .htUIRadio > input[type=radio]:focus::after {\n color: var(--ht-radio-focus-icon-color);\n}\n.handsontable .htUIRadio label {\n vertical-align: middle;\n cursor: pointer;\n color: inherit;\n}\n.handsontable .htUIRadio label::before {\n content: "";\n display: block;\n position: absolute;\n inset: 0;\n}\n\n.handsontable .collapsibleIndicator {\n top: calc((var(--ht-line-height) - var(--ht-icon-size)) / 2);\n margin-inline-start: var(--ht-gap-size);\n margin-inline-end: 1px;\n}\n.handsontable .collapsibleIndicator,\n.handsontable .ht_nestingButton {\n position: relative;\n width: var(--ht-icon-size);\n height: var(--ht-icon-size);\n box-sizing: border-box;\n border-radius: var(--ht-collapse-button-border-radius);\n overflow: hidden;\n cursor: pointer;\n /* hide text */\n text-indent: -100px;\n font-size: 0;\n float: right;\n}\n.handsontable .collapsibleIndicator::before,\n.handsontable .ht_nestingButton::before {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n transition: var(--ht-table-transition) all ease-in-out;\n}\n.handsontable .collapsibleIndicator.expanded, .handsontable .collapsibleIndicator.ht_nestingCollapse,\n.handsontable .ht_nestingButton.expanded,\n.handsontable .ht_nestingButton.ht_nestingCollapse {\n background-color: var(--ht-collapse-button-open-background-color);\n box-shadow: 0 0 0 1px var(--ht-collapse-button-open-border-color);\n}\n.handsontable .collapsibleIndicator.expanded::before, .handsontable .collapsibleIndicator.ht_nestingCollapse::before,\n.handsontable .ht_nestingButton.expanded::before,\n.handsontable .ht_nestingButton.ht_nestingCollapse::before {\n color: var(--ht-collapse-button-open-icon-color);\n}\n.handsontable .collapsibleIndicator.expanded:hover, .handsontable .collapsibleIndicator.ht_nestingCollapse:hover,\n.handsontable .ht_nestingButton.expanded:hover,\n.handsontable .ht_nestingButton.ht_nestingCollapse:hover {\n background-color: var(--ht-collapse-button-open-hover-background-color);\n box-shadow: 0 0 0 1px var(--ht-collapse-button-open-hover-border-color);\n}\n.handsontable .collapsibleIndicator.expanded:hover::before, .handsontable .collapsibleIndicator.ht_nestingCollapse:hover::before,\n.handsontable .ht_nestingButton.expanded:hover::before,\n.handsontable .ht_nestingButton.ht_nestingCollapse:hover::before {\n color: var(--ht-collapse-button-open-hover-icon-color);\n}\n.handsontable .collapsibleIndicator.collapsed, .handsontable .collapsibleIndicator.ht_nestingExpand,\n.handsontable .ht_nestingButton.collapsed,\n.handsontable .ht_nestingButton.ht_nestingExpand {\n background-color: var(--ht-collapse-button-close-background-color);\n box-shadow: 0 0 0 1px var(--ht-collapse-button-close-border-color);\n}\n.handsontable .collapsibleIndicator.collapsed::before, .handsontable .collapsibleIndicator.ht_nestingExpand::before,\n.handsontable .ht_nestingButton.collapsed::before,\n.handsontable .ht_nestingButton.ht_nestingExpand::before {\n color: var(--ht-collapse-button-close-icon-color);\n}\n.handsontable .collapsibleIndicator.collapsed:hover, .handsontable .collapsibleIndicator.ht_nestingExpand:hover,\n.handsontable .ht_nestingButton.collapsed:hover,\n.handsontable .ht_nestingButton.ht_nestingExpand:hover {\n background-color: var(--ht-collapse-button-close-hover-background-color);\n box-shadow: 0 0 0 1px var(--ht-collapse-button-close-hover-border-color);\n}\n.handsontable .collapsibleIndicator.collapsed:hover::before, .handsontable .collapsibleIndicator.ht_nestingExpand:hover::before,\n.handsontable .ht_nestingButton.collapsed:hover::before,\n.handsontable .ht_nestingButton.ht_nestingExpand:hover::before {\n color: var(--ht-collapse-button-close-hover-icon-color);\n}\n.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed::before, .handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.collapsed::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand::before {\n color: var(--ht-collapse-button-close-icon-active-color);\n}\n.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover::before, .handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover::before {\n color: var(--ht-collapse-button-close-hover-icon-active-color);\n}\n.handsontable th.ht__active_highlight .collapsibleIndicator.expanded::before, .handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.expanded::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse::before {\n color: var(--ht-collapse-button-open-icon-active-color);\n}\n.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover::before, .handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover::before,\n.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover::before {\n color: var(--ht-collapse-button-open-hover-icon-active-color);\n}\n\n[dir=rtl].handsontable .collapsibleIndicator,\n[dir=rtl].handsontable .ht_nestingButton {\n float: left;\n}\n\n.handsontable thead th.hiddenHeader:not(:first-of-type) {\n display: none;\n}\n.handsontable thead th.hiddenHeaderText .colHeader {\n opacity: 0;\n}\n\n.handsontable th.ht_nestingLevels > .relative {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n.handsontable th.ht_nestingLevels span:last-child {\n padding-left: calc(var(--ht-icon-size) + 5px);\n}\n.handsontable th.ht_nestingLevels span.ht_nestingLevel {\n display: inline-block;\n}\n.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty {\n position: relative;\n display: inline-block;\n width: 5px;\n height: 1px;\n order: -2;\n}\n.handsontable th.ht_nestingLevels .ht_nestingButton {\n position: relative;\n cursor: pointer;\n order: -1;\n}\n\n.handsontable th.beforeHiddenColumn, .handsontable th.afterHiddenColumn {\n position: relative;\n}\n.handsontable th.beforeHiddenColumn::before, .handsontable th.beforeHiddenColumn::after, .handsontable th.afterHiddenColumn::before, .handsontable th.afterHiddenColumn::after {\n position: absolute;\n top: 50%;\n width: 10px !important;\n height: 10px !important;\n transform: translateY(-50%);\n color: var(--ht-hidden-indicator-color);\n}\n.handsontable th.beforeHiddenColumn::after {\n content: "";\n display: block;\n right: -2px;\n}\n.handsontable th.afterHiddenColumn::before {\n content: "";\n display: block;\n left: -2px;\n}\n.handsontable th.ht__active_highlight.beforeHiddenColumn::before, .handsontable th.ht__active_highlight.beforeHiddenColumn::after, .handsontable th.ht__active_highlight.afterHiddenColumn::before, .handsontable th.ht__active_highlight.afterHiddenColumn::after {\n color: var(--ht-icon-button-active-icon-color, var(--ht-icon-active-button-icon-color));\n}\n\n[dir=rtl].handsontable th.beforeHiddenColumn::after {\n right: initial;\n left: -2px;\n transform: translateY(-50%) rotate(180deg);\n}\n[dir=rtl].handsontable th.afterHiddenColumn::before {\n right: -2px;\n left: initial;\n transform: translateY(-50%) rotate(180deg);\n}\n\n.handsontable th.beforeHiddenRow, .handsontable th.afterHiddenRow {\n position: relative;\n}\n.handsontable th.beforeHiddenRow::before, .handsontable th.beforeHiddenRow::after, .handsontable th.afterHiddenRow::before, .handsontable th.afterHiddenRow::after {\n position: absolute;\n left: 50%;\n width: 10px !important;\n height: 10px !important;\n transform: translateX(-50%);\n color: var(--ht-hidden-indicator-color);\n}\n.handsontable th.beforeHiddenRow::after {\n content: "";\n display: block;\n bottom: -2px;\n}\n.handsontable th.afterHiddenRow::before {\n content: "";\n display: block;\n top: -2px;\n}\n.handsontable th.ht__active_highlight.beforeHiddenRow::before, .handsontable th.ht__active_highlight.beforeHiddenRow::after, .handsontable th.ht__active_highlight.afterHiddenRow::before, .handsontable th.ht__active_highlight.afterHiddenRow::after {\n color: var(--ht-icon-button-active-icon-color, var(--ht-icon-active-button-icon-color));\n}\n\n.handsontable .changeType {\n position: relative;\n box-sizing: border-box;\n width: var(--ht-icon-size);\n height: var(--ht-icon-size);\n border-radius: var(--ht-icon-button-border-radius);\n box-shadow: 0 0 0 1px var(--ht-icon-button-border-color);\n border: none;\n color: inherit;\n padding: 0;\n margin: 0;\n background-color: var(--ht-icon-button-background-color);\n order: 1;\n z-index: 1;\n float: right;\n top: calc((var(--ht-line-height) - var(--ht-icon-size)) / 2);\n margin-inline-start: var(--ht-gap-size);\n margin-inline-end: 1px;\n}\n.handsontable .changeType::before {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n color: var(--ht-icon-button-icon-color);\n}\n.handsontable .changeType:hover {\n cursor: pointer;\n box-shadow: 0 0 0 1px var(--ht-icon-button-hover-border-color);\n background-color: var(--ht-icon-button-hover-background-color);\n}\n.handsontable .changeType:hover::before {\n color: var(--ht-icon-button-hover-icon-color);\n}\n.handsontable .ht__active_highlight .changeType {\n box-shadow: 0 0 0 1px var(--ht-icon-button-active-border-color, var(--ht-icon-active-button-border-color));\n background-color: var(--ht-icon-button-active-background-color, var(--ht-icon-active-button-background-color));\n}\n.handsontable .ht__active_highlight .changeType::before {\n color: var(--ht-icon-button-active-icon-color, var(--ht-icon-active-button-icon-color));\n}\n.handsontable .ht__active_highlight .changeType:hover {\n box-shadow: 0 0 0 1px var(--ht-icon-button-active-hover-border-color, var(--ht-icon-active-button-hover-border-color));\n background-color: var(--ht-icon-button-active-hover-background-color, var(--ht-icon-active-button-hover-background-color));\n}\n.handsontable .ht__active_highlight .changeType:hover::before {\n color: var(--ht-icon-button-active-hover-icon-color, var(--ht-icon-active-button-hover-icon-color));\n}\n.handsontable th.htFiltersActive {\n background-color: var(--ht-header-filter-background-color);\n}\n.handsontable th.htFiltersActive.ht__active_highlight {\n background-color: color-mix(in srgb, var(--ht-header-active-background-color), var(--ht-header-filter-background-color) 20%);\n}\n.handsontable th.htFiltersActive.ht__active_highlight .changeType::after {\n background-color: var(--ht-header-active-foreground-color);\n}\n.handsontable.htDropdownMenu > .ht_master, .handsontable.htContextMenu > .ht_master, .handsontable.htFiltersConditionsMenu > .ht_master {\n box-shadow: var(--ht-menu-shadow-x, 0) var(--ht-menu-shadow-y, 0) var(--ht-menu-shadow-blur, 8px) color-mix(in srgb, var(--ht-menu-shadow-color, rgb(0, 0, 0)) var(--ht-menu-shadow-opacity, 100%), transparent);\n border: var(--ht-menu-border-width, 1px) solid var(--ht-menu-border-color, #e5e5e9);\n border-radius: var(--ht-menu-border-radius);\n overflow: hidden;\n padding: var(--ht-menu-vertical-padding, 8px) var(--ht-menu-horizontal-padding, 0);\n background-color: var(--ht-background-color, #ffffff);\n}\n.handsontable.htDropdownMenu:not(.htGhostTable), .handsontable.htContextMenu:not(.htGhostTable), .handsontable.htFiltersConditionsMenu:not(.htGhostTable) {\n display: none;\n position: absolute;\n /* needs to be higher than 1050 - z-index for Twitter Bootstrap modal (#1569) */\n z-index: 1060;\n}\n.handsontable.htDropdownMenu .ht_clone_top,\n.handsontable.htDropdownMenu .ht_clone_bottom,\n.handsontable.htDropdownMenu .ht_clone_inline_start,\n.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,\n.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner, .handsontable.htContextMenu .ht_clone_top,\n.handsontable.htContextMenu .ht_clone_bottom,\n.handsontable.htContextMenu .ht_clone_inline_start,\n.handsontable.htContextMenu .ht_clone_top_inline_start_corner,\n.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner, .handsontable.htFiltersConditionsMenu .ht_clone_top,\n.handsontable.htFiltersConditionsMenu .ht_clone_bottom,\n.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,\n.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,\n.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner {\n display: none;\n}\n.handsontable.htDropdownMenu table.htCore, .handsontable.htContextMenu table.htCore, .handsontable.htFiltersConditionsMenu table.htCore {\n overflow: hidden;\n}\n.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore, .handsontable.htContextMenu .htCustomMenuRenderer .table.htCore, .handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore {\n box-shadow: none;\n}\n.handsontable.htDropdownMenu.handsontable:focus, .handsontable.htContextMenu.handsontable:focus, .handsontable.htFiltersConditionsMenu.handsontable:focus {\n outline: none;\n}\n.handsontable.htDropdownMenu .wtBorder, .handsontable.htContextMenu .wtBorder, .handsontable.htFiltersConditionsMenu .wtBorder {\n visibility: hidden;\n}\n.handsontable.htDropdownMenu tbody tr:first-of-type td:first-child, .handsontable.htDropdownMenu tbody tr:first-of-type th:first-child, .handsontable.htContextMenu tbody tr:first-of-type td:first-child, .handsontable.htContextMenu tbody tr:first-of-type th:first-child, .handsontable.htFiltersConditionsMenu tbody tr:first-of-type td:first-child, .handsontable.htFiltersConditionsMenu tbody tr:first-of-type th:first-child {\n height: calc(var(--ht-cell-vertical-padding) * 2 + var(--ht-line-height) + 1px);\n}\n.handsontable.htDropdownMenu table tbody tr td, .handsontable.htContextMenu table tbody tr td, .handsontable.htFiltersConditionsMenu table tbody tr td {\n position: relative;\n padding: var(--ht-menu-item-vertical-padding, 4px) var(--ht-menu-item-horizontal-padding, 8px);\n border-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n background: var(--ht-background-color, #ffffff);\n cursor: pointer;\n transition: var(--ht-table-transition) background ease-in-out;\n}\n.handsontable.htDropdownMenu table tbody tr td:first-child, .handsontable.htContextMenu table tbody tr td:first-child, .handsontable.htFiltersConditionsMenu table tbody tr td:first-child {\n border-top-width: 0;\n border-inline-end-width: 0;\n border-bottom-width: 0;\n border-inline-start-width: 0;\n}\n.handsontable.htDropdownMenu table tbody tr td.htDimmed, .handsontable.htContextMenu table tbody tr td.htDimmed, .handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed {\n font-style: normal;\n color: inherit !important;\n background-color: inherit !important;\n}\n.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover, .handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover, .handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled):hover {\n background: color-mix(in srgb, var(--ht-menu-item-hover-color) var(--ht-menu-item-hover-color-opacity, 100%), transparent) !important;\n cursor: pointer;\n}\n.handsontable.htDropdownMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]), .handsontable.htContextMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]), .handsontable.htFiltersConditionsMenu table tbody tr td:not(.handsontable.htDropdownMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htCustomMenuRenderer, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled).current:not([aria-expanded=true]) {\n box-shadow: inset 0 0 0 1px var(--ht-accent-color);\n}\n.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper, .handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper, .handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper {\n margin-inline-end: calc(2 * var(--ht-gap-size, 4px) + var(--ht-icon-size));\n}\n.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper::after, .handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper::after, .handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper::after {\n content: "";\n display: block;\n position: absolute;\n top: 50%;\n right: calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size) * 2);\n transform: translateY(-50%);\n}\n.handsontable.htDropdownMenu table tbody tr td.htSeparator, .handsontable.htContextMenu table tbody tr td.htSeparator, .handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator {\n border-top: 1px solid var(--ht-border-color);\n height: 0;\n padding: 0;\n cursor: default;\n}\n.handsontable.htDropdownMenu table tbody tr td.htDisabled, .handsontable.htContextMenu table tbody tr td.htDisabled, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled {\n color: var(--ht-disabled-color);\n cursor: default;\n}\n.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover, .handsontable.htContextMenu table tbody tr td.htDisabled:hover, .handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover {\n background: var(--ht-background-color);\n color: var(--ht-disabled-color);\n}\n.handsontable.htDropdownMenu table tbody tr td.htHidden, .handsontable.htContextMenu table tbody tr td.htHidden, .handsontable.htFiltersConditionsMenu table tbody tr td.htHidden {\n display: none;\n}\n.handsontable.htDropdownMenu table tbody tr td:has(.htItemWrapper .selected), .handsontable.htContextMenu table tbody tr td:has(.htItemWrapper .selected), .handsontable.htFiltersConditionsMenu table tbody tr td:has(.htItemWrapper .selected) {\n background-color: color-mix(in srgb, var(--ht-menu-item-active-color) var(--ht-menu-item-active-color-opacity, 100%), transparent);\n}\n.handsontable.htDropdownMenu table tbody tr td .htItemWrapper, .handsontable.htContextMenu table tbody tr td .htItemWrapper, .handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper {\n margin-inline: calc(2 * var(--ht-gap-size, 4px));\n}\n.handsontable.htDropdownMenu table tbody tr td .htItemWrapper::before, .handsontable.htContextMenu table tbody tr td .htItemWrapper::before, .handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper::before {\n vertical-align: text-bottom;\n margin-right: 12px;\n}\n.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected, .handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected, .handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected {\n font-size: 0;\n inset: 0;\n}\n.handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected::after, .handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected::after, .handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected::after {\n content: "";\n display: block;\n position: absolute;\n top: 50%;\n right: calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size) * 2);\n color: var(--ht-accent-color);\n transform: translateY(-50%);\n}\n.handsontable.htDropdownMenu table tbody tr td div span.selected, .handsontable.htContextMenu table tbody tr td div span.selected, .handsontable.htFiltersConditionsMenu table tbody tr td div span.selected {\n position: absolute;\n inset-inline-end: 0;\n}\n.handsontable.htDropdownMenu table tbody tr td .htUIButton, .handsontable.htContextMenu table tbody tr td .htUIButton, .handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton {\n width: calc(50% - var(--ht-gap-size));\n}\n.handsontable.htDropdownMenu table tbody tr td .htUIButton input, .handsontable.htContextMenu table tbody tr td .htUIButton input, .handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input {\n width: 100%;\n}\n.handsontable .htUIClearAll a,\n.handsontable .htUISelectAll a {\n padding: var(--ht-gap-size);\n display: inline-block;\n text-decoration: none;\n}\n.handsontable .htUIMultipleSelect .ht_master .wtHolder {\n overflow-y: scroll !important;\n background: transparent;\n border-radius: 0 !important;\n}\n.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore {\n box-shadow: none;\n}\n\n[dir=rtl].handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper::after, [dir=rtl].handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper::after, [dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper::after {\n left: calc(4 * var(--ht-gap-size));\n right: auto;\n transform: translateY(-50%) rotate(180deg);\n}\n[dir=rtl].handsontable.htDropdownMenu table tbody tr td .htItemWrapper span.selected::after, [dir=rtl].handsontable.htContextMenu table tbody tr td .htItemWrapper span.selected::after, [dir=rtl].handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected::after {\n left: calc(4 * var(--ht-gap-size));\n right: auto;\n}\n[dir=rtl].handsontable .changeType {\n float: left;\n}\n\n.handsontable.htFiltersConditionsMenu:not(.htGhostTable) {\n z-index: 1070;\n}\n.handsontable .ht_master table td.htCustomMenuRenderer {\n cursor: auto;\n}\n.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar {\n padding-top: calc(var(--ht-menu-item-vertical-padding, 4px) * 2);\n}\n.handsontable .htFiltersMenuLabel {\n font-size: var(--ht-font-size-small);\n line-height: var(--ht-line-height-small);\n font-weight: var(--ht-font-weight);\n margin-bottom: calc(var(--ht-gap-size, 2px) * 2);\n}\n.handsontable .htFiltersMenuLabel:empty {\n display: none;\n}\n.handsontable .htFiltersMenuCondition {\n padding-top: calc(var(--ht-gap-size, 2px) * 3) !important;\n padding-bottom: 0 !important;\n}\n.handsontable .htFiltersMenuCondition .border {\n border-bottom: 1px solid var(--ht-border-color) !important;\n}\n.handsontable .htFiltersMenuCondition .htUIInput {\n margin-top: calc(var(--ht-gap-size, 2px) * 2);\n}\n.handsontable .htFiltersMenuValue {\n padding-top: calc(var(--ht-gap-size, 2px) * 3) !important;\n padding-bottom: 0 !important;\n border-bottom: 1px solid var(--ht-border-color) !important;\n}\n.handsontable .htFiltersMenuOperators {\n padding-top: calc(var(--ht-gap-size, 2px) * 2) !important;\n padding-bottom: 0 !important;\n}\n.handsontable .htUISelectionControls {\n padding-top: calc(var(--ht-gap-size, 2px) * 2) !important;\n padding-bottom: var(--ht-gap-size, 2px) !important;\n margin: 0 calc(var(--ht-gap-size, 2px) * -1);\n}\n.handsontable .htUIMultipleSelectHot {\n --ht-cell-horizontal-padding: calc(\n var(--ht-menu-item-horizontal-padding, 2px) +\n var(--ht-gap-size, 2px) * 2);\n overflow: initial !important;\n width: calc(100% + var(--ht-menu-item-horizontal-padding, 2px) * 2 + var(--ht-gap-size, 2px) * 4);\n margin: 0 calc((var(--ht-menu-item-horizontal-padding, 2px) + var(--ht-gap-size, 2px) * 2) * -1);\n}\n.handsontable .htUIMultipleSelectHot::before {\n content: "";\n display: block;\n position: absolute;\n top: -1px;\n left: 0;\n width: 100%;\n height: 1px;\n background-color: var(--ht-border-color);\n}\n.handsontable .htUIMultipleSelectHot .wtHolder {\n padding: 0;\n overflow-x: hidden;\n box-sizing: border-box;\n}\n.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader {\n padding: calc(var(--ht-gap-size) * 2) 0;\n}\n.handsontable .htUIMultipleSelectHot .wtHolder td {\n height: auto !important;\n padding: 4px var(--ht-cell-horizontal-padding);\n}\n.handsontable .htUIClearAll,\n.handsontable .htUISelectAll {\n display: inline-block;\n margin-right: var(--ht-gap-size, 4px);\n margin-bottom: var(--ht-gap-size, 4px);\n}\n.handsontable .htUIClearAll a,\n.handsontable .htUISelectAll a {\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n color: var(--ht-link-color);\n border-radius: var(--ht-button-border-radius);\n}\n.handsontable .htUIClearAll a:hover,\n.handsontable .htUISelectAll a:hover {\n color: var(--ht-link-hover-color);\n}\n.handsontable .htUIClearAll a:focus,\n.handsontable .htUISelectAll a:focus {\n outline: 1px solid var(--ht-link-hover-color);\n}\n.handsontable .htUIMultipleSelect .ht_master .wtHolder {\n overflow: auto;\n}\n.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,\n.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,\n.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,\n.handsontable .htUIMultipleSelect .ht_master .wtHolder td {\n background: none;\n}\n.handsontable .htUIInput.htUIButton {\n cursor: pointer;\n display: inline-block;\n}\n.handsontable .htUIInput.htUIButtonOK {\n margin-inline-start: 0;\n margin-inline-end: calc(2 * var(--ht-gap-size, 2px));\n}\n\n.handsontable .htCommentCell {\n position: relative;\n}\n.handsontable .htCommentCell::after {\n content: "";\n display: block;\n position: absolute;\n top: 0;\n inset-inline-end: 0;\n inset-inline-start: unset;\n border-inline-start: var(--ht-comments-indicator-size, 4px) solid transparent;\n border-inline-end: none;\n border-top: var(--ht-comments-indicator-size, 4px) solid var(--ht-comments-indicator-color, #1a42e8);\n}\n\n.htCommentsContainer .htComments {\n display: none;\n z-index: 1059;\n position: absolute;\n}\n.htCommentsContainer .htCommentTextArea {\n font-family: var(--ht-font-family), -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;\n box-shadow: var(--ht-menu-shadow-x, 0) var(--ht-menu-shadow-y, 0) var(--ht-menu-shadow-blur, 8px) color-mix(in srgb, var(--ht-menu-shadow-color, rgb(0, 0, 0)) var(--ht-menu-shadow-opacity, 100%), transparent);\n width: 240px;\n height: 88px;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n font-weight: var(--ht-font-weight);\n margin: 0 -1px;\n padding: var(--ht-comments-textarea-vertical-padding) var(--ht-comments-textarea-horizontal-padding);\n border: var(--ht-comments-textarea-border-width, 1px) solid var(--ht-comments-textarea-border-color, transparent);\n border-inline-start: var(--ht-comments-textarea-border-width, 1px) solid var(--ht-comments-textarea-border-color, #1a42e8);\n color: var(--ht-comments-textarea-foreground-color);\n background-color: var(--ht-comments-textarea-background-color, #ffffff);\n outline: 0 !important;\n box-sizing: border-box;\n -webkit-appearance: none;\n}\n.htCommentsContainer .htCommentTextArea:focus {\n border: var(--ht-comments-textarea-focus-border-width, 1px) solid var(--ht-comments-textarea-focus-border-color, #1a42e8);\n color: var(--ht-comments-textarea-focus-foreground-color);\n background-color: var(--ht-comments-textarea-focus-background-color, #ffffff);\n}\n\n.htBorders .wtBorder.ht-border-style-dashed-vertical {\n background-image: repeating-linear-gradient(to bottom, var(--ht-custom-border-color) 0 5px, transparent 0 10px);\n}\n.htBorders .wtBorder.ht-border-style-dashed-horizontal {\n background-image: repeating-linear-gradient(to right, var(--ht-custom-border-color) 0 5px, transparent 0 10px);\n}\n.htBorders .wtBorder.ht-border-style-dotted-horizontal {\n background-image: radial-gradient(circle, var(--ht-custom-border-color) calc(var(--ht-custom-border-size) / 2), transparent 0);\n background-size: calc(var(--ht-custom-border-size) * 2) var(--ht-custom-border-size);\n background-repeat: repeat-x;\n}\n.htBorders .wtBorder.ht-border-style-dotted-vertical {\n background-image: radial-gradient(circle, var(--ht-custom-border-color) calc(var(--ht-custom-border-size) / 2), transparent 0);\n background-size: var(--ht-custom-border-size) calc(var(--ht-custom-border-size) * 2);\n background-repeat: repeat-y;\n}\n\n.handsontable .columnSorting:not(.indicatorDisabled) {\n position: relative;\n}\n.handsontable .columnSorting:not(.indicatorDisabled).sortAction {\n min-width: calc(var(--ht-icon-size, 16px) + 8px);\n}\n.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending, .handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending {\n padding-inline-end: calc(var(--ht-icon-size, 16px) + 2px);\n max-width: calc(100% - (var(--ht-icon-size, 16px) * 2 + var(--ht-gap-size, 4px) + 3px)) !important;\n}\n.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover {\n text-decoration: none;\n cursor: pointer;\n}\n.handsontable .columnSorting:not(.indicatorDisabled).sortAction::before {\n content: "";\n display: block;\n width: var(--ht-icon-size, 16px);\n position: absolute;\n top: 50%;\n right: 2px;\n transform: translateY(-50%);\n text-align: right;\n}\n.handsontable .htRight .columnSorting.sortAction.ascending, .handsontable .htRight .columnSorting.sortAction.descending {\n padding-inline-start: calc(var(--ht-icon-size, 16px) + 2px);\n padding-inline-end: 0;\n}\n.handsontable .htRight .columnSorting.sortAction::before {\n left: 2px;\n right: auto;\n text-align: left;\n}\n\n[dir=rtl] .handsontable .columnSorting.sortAction::before {\n left: 2px;\n right: auto;\n text-align: left;\n}\n[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending, [dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending {\n padding-inline-start: 0;\n padding-inline-end: calc(var(--ht-icon-size, 16px) + 2px);\n}\n[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending, [dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending {\n padding-inline-start: calc(var(--ht-icon-size, 16px) + 2px);\n padding-inline-end: 0;\n}\n[dir=rtl] .handsontable .htLeft .columnSorting.sortAction::before {\n left: auto;\n right: 2px;\n text-align: right;\n}\n\n.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled)::before {\n content: "*";\n display: inline-block;\n position: relative;\n /* The multi-line header and header with longer text need more padding to not hide arrow,\n we make header wider in `GhostTable` to make some space for arrow which is positioned absolutely in the main table */\n padding-inline-end: calc(var(--ht-icon-size, 16px) + 2px);\n}\n\n.handsontable .colHeader.columnSorting::after {\n content: "";\n display: block;\n width: 8px;\n position: absolute;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n margin-top: 4px;\n font-size: 8px;\n text-align: right;\n}\n.handsontable .colHeader.columnSorting[class^=sort-]::after, .handsontable .colHeader.columnSorting[class*=" sort-"]::after {\n content: "+";\n}\n.handsontable .colHeader.columnSorting.sort-1::after {\n content: "1";\n}\n.handsontable .colHeader.columnSorting.sort-2::after {\n content: "2";\n}\n.handsontable .colHeader.columnSorting.sort-3::after {\n content: "3";\n}\n.handsontable .colHeader.columnSorting.sort-4::after {\n content: "4";\n}\n.handsontable .colHeader.columnSorting.sort-5::after {\n content: "5";\n}\n.handsontable .colHeader.columnSorting.sort-6::after {\n content: "6";\n}\n.handsontable .colHeader.columnSorting.sort-7::after {\n content: "7";\n}\n.handsontable .htRight .colHeader.columnSorting::after {\n left: 0;\n right: auto;\n text-align: left;\n}\n\n[dir=rtl] .handsontable .colHeader.columnSorting::after {\n left: 0;\n right: auto;\n text-align: left;\n}\n[dir=rtl] .handsontable .htLeft .colHeader.columnSorting::after {\n left: auto;\n right: 0;\n text-align: right;\n}\n\n.htGhostTable th div button.changeType + span.colHeader.columnSorting:not(.indicatorDisabled) {\n padding-right: var(--ht-gap-size);\n}\n\n.handsontable .htRowHeaders .ht_master.innerBorderInlineStart ~ .ht_clone_top_inline_start_corner th:nth-child(2), .handsontable .htRowHeaders .ht_master.innerBorderInlineStart ~ .ht_clone_inline_start td:first-of-type {\n border-left: 0 none;\n}\n.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight {\n box-shadow: none;\n}\n\n.handsontable .manualColumnResizer {\n position: absolute;\n top: 0;\n width: 10px;\n margin: 0;\n cursor: col-resize;\n background: none;\n opacity: 0;\n z-index: 210;\n}\n.handsontable .manualColumnResizer::before, .handsontable .manualColumnResizer::after {\n content: "";\n display: block;\n position: absolute;\n top: 50%;\n left: 1px;\n width: 2px;\n height: calc(100% - 12px);\n max-height: 16px;\n margin-top: 0.5px;\n background: var(--ht-resize-indicator-color);\n border-radius: 2px;\n transform: translateY(-50%);\n}\n.handsontable .manualColumnResizer::after {\n left: auto;\n right: 0;\n}\n.handsontable .manualColumnResizer:hover, .handsontable .manualColumnResizer.active {\n opacity: 1;\n}\n.handsontable .manualColumnResizerGuide {\n position: absolute;\n inset-inline-end: unset;\n top: 0;\n width: 0;\n margin-inline-start: 5px;\n margin-inline-end: unset;\n display: none;\n border-inline-end: 1px solid var(--ht-accent-color);\n border-inline-start: none;\n}\n.handsontable .manualColumnResizerGuide.active {\n display: block;\n z-index: 209;\n}\n\n.handsontable .manualRowResizer {\n position: absolute;\n left: 0;\n z-index: 210;\n height: 10px;\n margin: 0;\n cursor: row-resize;\n background: none;\n opacity: 0;\n}\n.handsontable .manualRowResizer::before, .handsontable .manualRowResizer::after {\n content: "";\n display: block;\n position: absolute;\n top: 1px;\n left: 50%;\n width: calc(100% - 12px);\n max-width: 16px;\n height: 2px;\n background: var(--ht-resize-indicator-color);\n border-radius: 2px;\n transform: translateX(-50%);\n}\n.handsontable .manualRowResizer::after {\n top: auto;\n bottom: 0;\n}\n.handsontable .manualRowResizer:hover, .handsontable .manualRowResizer.active {\n opacity: 1;\n}\n.handsontable .manualRowResizerGuide {\n position: absolute;\n left: 0;\n bottom: 0;\n height: 0;\n margin-top: 5px;\n display: none;\n border-bottom: 1px solid var(--ht-accent-color);\n border-top: none;\n}\n.handsontable .manualRowResizerGuide.active {\n display: block;\n z-index: 209;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight]:not([class*=fullySelectedMergedCell])::before {\n opacity: 0;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-multiple]::before {\n opacity: 0.14;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before {\n opacity: 0.14;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before {\n opacity: 0.21;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before {\n opacity: 0.28;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-3]:before {\n opacity: 0.35;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-4]:before {\n opacity: 0.42;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before {\n opacity: 0.49;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before {\n opacity: 0.56;\n}\n\n.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before {\n opacity: 0.63;\n}\n\n.handsontable .wtHider {\n position: relative;\n}\n.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight, .handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight {\n cursor: move;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n cursor: grab;\n}\n.handsontable .ht__manualColumnMove.on-moving--columns *,\n.handsontable .ht__manualColumnMove.on-moving--columns thead th.ht__highlight, .handsontable.ht__manualColumnMove.on-moving--columns *,\n.handsontable.ht__manualColumnMove.on-moving--columns thead th.ht__highlight {\n cursor: move;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.handsontable .ht__manualColumnMove.on-moving--columns .manualColumnResizer, .handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer {\n display: none;\n}\n.handsontable .ht__manualColumnMove--guideline, .handsontable .ht__manualColumnMove--backlight, .handsontable.ht__manualColumnMove--guideline, .handsontable.ht__manualColumnMove--backlight {\n position: absolute;\n height: 100%;\n display: none;\n}\n.handsontable .ht__manualColumnMove--guideline, .handsontable.ht__manualColumnMove--guideline {\n width: 1px;\n top: 0;\n margin-inline-start: -0.5px;\n margin-inline-end: 0;\n z-index: 205;\n background: var(--ht-move-indicator-color, #1a42e8);\n}\n.handsontable .ht__manualColumnMove--backlight, .handsontable.ht__manualColumnMove--backlight {\n display: none;\n z-index: 205;\n pointer-events: none;\n background: color-mix(in srgb, var(--ht-move-backlight-color) var(--ht-move-backlight-opacity, 100%), transparent);\n}\n.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,\n.handsontable .on-moving--columns .ht__manualColumnMove--backlight, .handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,\n.handsontable.on-moving--columns .ht__manualColumnMove--backlight {\n display: block;\n}\n\n.handsontable .wtHider {\n position: relative;\n}\n.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight, .handsontable.ht__manualRowMove.after-selection--rows tbody th.ht__highlight {\n cursor: move;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n cursor: grab;\n}\n.handsontable .ht__manualRowMove.on-moving--rows *,\n.handsontable .ht__manualRowMove.on-moving--rows tbody th.ht__highlight, .handsontable.ht__manualRowMove.on-moving--rows *,\n.handsontable.ht__manualRowMove.on-moving--rows tbody th.ht__highlight {\n cursor: move;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n cursor: grabbing;\n}\n.handsontable .ht__manualRowMove.on-moving--rows .manualRowResizer, .handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer {\n display: none;\n}\n.handsontable .ht__manualRowMove--guideline, .handsontable .ht__manualRowMove--backlight, .handsontable.ht__manualRowMove--guideline, .handsontable.ht__manualRowMove--backlight {\n position: absolute;\n width: 100%;\n display: none;\n}\n.handsontable .ht__manualRowMove--guideline, .handsontable.ht__manualRowMove--guideline {\n border-top: 1px solid var(--ht-move-indicator-color);\n left: 0;\n z-index: 205;\n}\n.handsontable .ht__manualRowMove--backlight, .handsontable.ht__manualRowMove--backlight {\n display: none;\n z-index: 205;\n pointer-events: none;\n background: color-mix(in srgb, var(--ht-move-backlight-color) var(--ht-move-backlight-opacity, 100%), transparent);\n}\n.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,\n.handsontable .on-moving--rows .ht__manualRowMove--backlight, .handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,\n.handsontable.on-moving--rows .ht__manualRowMove--backlight {\n display: block;\n}\n\n.ht-dialog {\n scrollbar-width: auto;\n scrollbar-color: var(--ht-scrollbar-thumb-color) var(--ht-scrollbar-track-color);\n position: absolute;\n top: 0;\n left: 0;\n display: none;\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n letter-spacing: var(--ht-letter-spacing);\n width: 100%;\n height: 100%;\n z-index: 1060;\n opacity: 0;\n overflow-y: auto;\n border-radius: var(--ht-wrapper-border-radius);\n border: 1px solid var(--ht-border-color);\n box-sizing: border-box !important;\n}\n.ht-dialog[dir=rtl] {\n left: auto;\n right: 0;\n}\n.ht-dialog:focus {\n border: 1px solid var(--ht-accent-color);\n outline: none;\n}\n.ht-dialog:has(.htFocusCatcher:focus) {\n border: 1px solid var(--ht-accent-color);\n outline: none;\n}\n.ht-dialog * {\n box-sizing: border-box !important;\n}\n.ht-dialog--background-solid {\n background-color: var(--ht-dialog-solid-background-color);\n}\n.ht-dialog--background-semi-transparent {\n background-color: color-mix(in srgb, var(--ht-dialog-semi-transparent-background-color) var(--ht-dialog-semi-transparent-background-opacity, 100%), transparent);\n}\n.ht-dialog--animation {\n transition: opacity var(--ht-table-transition) ease-in-out;\n}\n.ht-dialog--show {\n opacity: 1;\n}\n.ht-dialog__content-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n min-height: 100%;\n padding: calc(var(--ht-gap-size) * 4);\n border-radius: var(--ht-wrapper-border-radius);\n}\n.ht-dialog__content {\n position: relative;\n padding: var(--ht-dialog-content-padding-horizontal) var(--ht-dialog-content-padding-vertical);\n max-width: 480px;\n color: var(--ht-foreground-color);\n}\n.ht-dialog__content--background {\n box-shadow: var(--ht-shadow-x, 0) var(--ht-shadow-y, 0) var(--ht-shadow-blur, 8px) color-mix(in srgb, var(--ht-shadow-color, rgb(0, 0, 0)) var(--ht-shadow-opacity, 100%), transparent);\n border-radius: var(--ht-dialog-content-border-radius);\n background-color: var(--ht-dialog-content-background-color);\n}\n.ht-dialog--confirm .ht-dialog__content-wrapper {\n text-align: center;\n padding: calc(var(--ht-gap-size) * 2);\n}\n.ht-dialog--confirm .ht-dialog__content-wrapper-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n max-width: 480px;\n padding: calc(var(--ht-gap-size) * 2);\n border-radius: var(--ht-wrapper-border-radius);\n}\n.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background {\n box-shadow: var(--ht-shadow-x, 0) var(--ht-shadow-y, 0) var(--ht-shadow-blur, 8px) color-mix(in srgb, var(--ht-shadow-color, rgb(0, 0, 0)) var(--ht-shadow-opacity, 100%), transparent);\n border-radius: var(--ht-dialog-content-border-radius);\n background-color: var(--ht-dialog-content-background-color);\n}\n.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus {\n outline: none;\n box-shadow: 0 0 0 1px var(--ht-accent-color);\n}\n.ht-dialog--confirm .ht-dialog__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--ht-gap-size);\n}\n.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons) {\n gap: calc(var(--ht-gap-size) * 2);\n}\n.ht-dialog--confirm .ht-dialog__title {\n margin: 0;\n font-size: var(--ht-font-size);\n font-weight: var(--ht-font-weight);\n line-height: var(--ht-line-height);\n}\n.ht-dialog--confirm .ht-dialog__description {\n margin: 0;\n color: var(--ht-foreground-secondary-color);\n font-size: var(--ht-font-size-small);\n line-height: var(--ht-line-height-small);\n font-weight: var(--ht-font-weight);\n}\n.ht-dialog--confirm .ht-dialog__buttons {\n display: flex;\n justify-content: center;\n flex-direction: row;\n flex-wrap: wrap;\n gap: calc(var(--ht-gap-size) * 2);\n}\n\n.handsontable.ht-pagination {\n color: var(--ht-pagination-bar-foreground-color);\n background: var(--ht-pagination-bar-background-color);\n border: 1px solid var(--ht-wrapper-border-color);\n border-top-color: transparent;\n border-radius: 0 0 var(--ht-wrapper-border-radius) var(--ht-wrapper-border-radius);\n font-size: var(--ht-font-size);\n line-height: var(--ht-line-height);\n box-sizing: border-box;\n overflow-x: auto;\n}\n.handsontable.ht-pagination--bordered {\n border-top-color: var(--ht-wrapper-border-color);\n}\n.handsontable.ht-pagination .ht-pagination__inner {\n display: flex;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n gap: calc(var(--ht-gap-size) * 4);\n border-radius: 0 0 var(--ht-wrapper-border-radius) var(--ht-wrapper-border-radius);\n padding-inline: var(--ht-pagination-bar-horizontal-padding);\n padding-block: var(--ht-pagination-bar-vertical-padding);\n min-width: 230px;\n}\n.handsontable.ht-pagination .ht-page-size-section {\n display: flex;\n align-items: center;\n gap: calc(var(--ht-gap-size) * 2);\n}\n.handsontable.ht-pagination .ht-page-size-section__label {\n white-space: nowrap;\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper {\n position: relative;\n border-radius: var(--ht-input-border-radius);\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper select {\n padding-inline-start: var(--ht-gap-size);\n padding-inline-end: calc(var(--ht-gap-size) + var(--ht-icon-size));\n padding-top: var(--ht-gap-size);\n padding-bottom: var(--ht-gap-size);\n border-radius: var(--ht-input-border-radius);\n color: var(--ht-input-foreground-color);\n background-color: var(--ht-input-background-color);\n border: 1px solid var(--ht-input-border-color);\n line-height: calc(var(--ht-line-height) - 4px);\n -webkit-appearance: none;\n font-size: inherit;\n cursor: pointer;\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled {\n opacity: 0.4;\n cursor: default;\n color: var(--ht-input-disabled-foreground-color);\n background-color: var(--ht-input-disabled-background-color);\n border-color: var(--ht-input-disabled-border-color);\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled) {\n color: var(--ht-input-hover-foreground-color);\n background-color: var(--ht-input-hover-background-color);\n border-color: var(--ht-input-hover-border-color);\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus {\n color: var(--ht-input-focus-foreground-color);\n background-color: var(--ht-input-focus-background-color);\n border-color: var(--ht-input-focus-border-color);\n outline: none;\n}\n.handsontable.ht-pagination .ht-page-size-section__select-wrapper::after {\n content: "";\n display: block;\n position: absolute;\n inset-inline-end: var(--ht-gap-size);\n inset-block-end: 50%;\n transform: translateY(50%);\n background-color: var(--ht-foreground-color);\n pointer-events: none;\n}\n.handsontable.ht-pagination .ht-page-counter-section {\n margin-inline-end: auto;\n}\n.handsontable.ht-pagination .ht-page-navigation-section {\n display: flex;\n align-items: center;\n gap: 1px;\n}\n.handsontable.ht-pagination .ht-page-navigation-section__button {\n font-size: inherit;\n border: 1px solid var(--ht-pagination-bar-background-color);\n color: var(--ht-secondary-button-foreground-color);\n background-color: var(--ht-pagination-bar-background-color);\n border-radius: var(--ht-icon-button-large-border-radius);\n padding: var(--ht-icon-button-large-padding);\n cursor: pointer;\n}\n.handsontable.ht-pagination .ht-page-navigation-section__button::before {\n content: "";\n display: block;\n}\n.handsontable.ht-pagination .ht-page-navigation-section__button--disabled {\n cursor: default;\n pointer-events: none;\n color: var(--ht-secondary-button-disabled-foreground-color);\n}\n.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled) {\n background-color: var(--ht-secondary-button-hover-background-color);\n}\n.handsontable.ht-pagination .ht-page-navigation-section__button:focus {\n outline: none;\n border: 1px solid var(--ht-accent-color);\n}\n.handsontable.ht-pagination .ht-page-navigation-section__label {\n white-space: nowrap;\n min-width: 100px;\n text-align: center;\n}\n.handsontable.ht-wrapper.htPagination {\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n.handsontable.ht-wrapper.htPagination .htCore {\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n}\n.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child,\n.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child,\n.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child {\n border-end-start-radius: 0 !important;\n}\n.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child,\n.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child,\n.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child {\n border-end-end-radius: 0 !important;\n}\n\n.ht-loading__icon-svg {\n display: block;\n width: var(--ht-icon-size);\n height: var(--ht-icon-size);\n color: var(--ht-accent-color);\n animation: ht-loading-spin 1s linear infinite;\n transform-origin: 50% 50%;\n}\n.ht-loading__content {\n display: flex;\n align-items: center;\n gap: calc(var(--ht-gap-size) * 2);\n}\n.ht-loading__title {\n margin: 0;\n font-size: var(--ht-font-size);\n font-weight: var(--ht-font-weight);\n line-height: var(--ht-line-height);\n}\n.ht-loading__description {\n margin: 0;\n color: var(--ht-foreground-secondary-color);\n font-size: var(--ht-font-size-small);\n line-height: var(--ht-line-height-small);\n font-weight: var(--ht-font-weight);\n}\n\n@keyframes ht-loading-spin {\n to {\n transform: rotate(360deg);\n }\n}\n.ht-empty-data-state {\n scrollbar-width: auto;\n scrollbar-color: var(--ht-scrollbar-thumb-color) var(--ht-scrollbar-track-color);\n display: none;\n position: absolute;\n width: 100%;\n left: 0;\n z-index: 999;\n overflow-y: auto;\n border: 1px solid var(--ht-border-color);\n border-radius: var(--ht-wrapper-border-radius);\n box-sizing: border-box;\n background-color: var(--ht-background-color);\n}\n.ht-empty-data-state * {\n box-sizing: border-box !important;\n}\n.ht-empty-data-state__content-wrapper {\n display: flex;\n align-items: center;\n justify-content: center;\n text-align: center;\n width: 100%;\n min-height: 100%;\n padding: calc(var(--ht-gap-size) * 2);\n border-radius: var(--ht-wrapper-border-radius);\n}\n.ht-empty-data-state__content-wrapper-inner {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n max-width: 480px;\n padding: calc(var(--ht-gap-size) * 2);\n border-radius: var(--ht-wrapper-border-radius);\n}\n.ht-empty-data-state__content-wrapper-inner:focus {\n outline: none;\n box-shadow: 0 0 0 1px var(--ht-accent-color);\n}\n.ht-empty-data-state__content {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--ht-gap-size);\n}\n.ht-empty-data-state__title {\n margin: 0;\n font-size: var(--ht-font-size);\n font-weight: var(--ht-font-weight);\n line-height: var(--ht-line-height);\n}\n.ht-empty-data-state__description {\n margin: 0;\n color: var(--ht-foreground-secondary-color);\n font-size: var(--ht-font-size-small);\n line-height: var(--ht-line-height-small);\n font-weight: var(--ht-font-weight);\n}\n.ht-empty-data-state__buttons {\n display: flex;\n justify-content: center;\n flex-direction: row;\n flex-wrap: wrap;\n gap: calc(var(--ht-gap-size) * 2);\n}\n.ht-empty-data-state__buttons--has-buttons {\n margin-top: calc(var(--ht-gap-size) * 2);\n}\n.ht-empty-data-state--disable-top-border {\n border-start-start-radius: 0;\n border-start-end-radius: 0;\n border-top-width: 0;\n}\n.ht-empty-data-state--disable-inline-border {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n border-inline-start-width: 0;\n}\n.ht-empty-data-state--disable-bottom-border, .ht-empty-data-state:has(~ .ht-pagination) {\n border-end-start-radius: 0;\n border-end-end-radius: 0;\n border-bottom-width: 0;\n}\n',Wg(qg,this).head.appendChild(e)}function nf(){const t=this.getCSSVariableValue("line-height"),e=this.getCSSVariableValue("cell-vertical-padding"),n=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===t||null===e||isNaN(n)?null:t+2*e+n}function of(){zg(Kg,this,getComputedStyle(Wg(Gg,this)));const t=jg(Qg,this,rf).call(this,["box-sizing","border-bottom-width"]);Wg(Zg,this).td={...Wg(Zg,this).td,"box-sizing":t["box-sizing"],"border-bottom-width":t["border-bottom-width"]}}function rf(t){const e=Wg(qg,this),n=Wg(Gg,this),o=e.createElement("table"),i=e.createElement("tbody"),r=e.createElement("tr"),s=e.createElement("tr"),a=e.createElement("td");s.appendChild(a),i.appendChild(r),i.appendChild(s),o.appendChild(i),n.appendChild(o);const l=getComputedStyle(a),h={};return t.forEach(t=>{h[t]=l.getPropertyValue(t)}),n.removeChild(o),h}function sf(t){const e=Math.ceil(parseFloat(jg(Qg,this,af).call(this,t)));return Number.isNaN(e)?null:e}function af(t){var e;const n=null===(e=Wg(Kg,this))||void 0===e?void 0:e.getPropertyValue(t);return""===n?null:n}function lf(){zg(Zg,this,{}),zg(Xg,this,{})}let hf=null,cf=0;var df={size_0:"0px",size_0_5:"2px",size_1:"4px",size_2:"8px",size_1_5:"6px",size_3:"12px",size_4:"16px",size_5:"20px",size_6:"24px",size_7:"28px",size_8:"32px",size_9:"36px",size_10:"40px",size_0_25:"1px"},uf={default:{cellVertical:"sizing.size_1",cellHorizontal:"sizing.size_2",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1",buttonHorizontal:"sizing.size_3",buttonVertical:"sizing.size_1_5",dialogHorizontal:"sizing.size_2",dialogVertical:"sizing.size_2",inputHorizontal:"sizing.size_3",inputVertical:"sizing.size_1_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_1",menuItemHorizontal:"sizing.size_3"},compact:{cellVertical:"sizing.size_0_5",cellHorizontal:"sizing.size_1_5",barsHorizontal:"sizing.size_2",barsVertical:"sizing.size_1",gap:"sizing.size_0_5",buttonHorizontal:"sizing.size_2",buttonVertical:"sizing.size_0_5",dialogHorizontal:"sizing.size_1_5",dialogVertical:"sizing.size_1_5",inputHorizontal:"sizing.size_2",inputVertical:"sizing.size_0_5",menuVertical:"sizing.size_2",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_0_5",menuItemHorizontal:"sizing.size_2"},comfortable:{cellVertical:"sizing.size_2",cellHorizontal:"sizing.size_3",barsHorizontal:"sizing.size_4",barsVertical:"sizing.size_2",gap:"sizing.size_1_5",buttonHorizontal:"sizing.size_4",buttonVertical:"sizing.size_2",dialogHorizontal:"sizing.size_3",dialogVertical:"sizing.size_3",inputHorizontal:"sizing.size_4",inputVertical:"sizing.size_2",menuVertical:"sizing.size_3",menuHorizontal:"sizing.size_0",menuItemVertical:"sizing.size_2",menuItemHorizontal:"sizing.size_2"}};const gf=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),ff=new Set(["light","dark","auto"]),pf=new Set(["default","compact","comfortable"]),mf=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),bf=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","wrapperBorderWidth","wrapperBorderRadius","wrapperBorderColor","rowHeaderOddBackgroundColor","rowHeaderEvenBackgroundColor","rowCellOddBackgroundColor","rowCellEvenBackgroundColor","cellEditorBorderWidth","cellEditorBorderColor","cellEditorForegroundColor","cellEditorBackgroundColor","cellEditorShadowBlurRadius","cellEditorShadowColor","cellSuccessBackgroundColor","cellErrorBackgroundColor","cellReadOnlyBackgroundColor","cellSelectionBorderColor","cellSelectionBackgroundColor","cellAutofillSize","cellAutofillHitAreaSize","cellAutofillBorderWidth","cellAutofillBorderRadius","cellAutofillBorderColor","cellAutofillBackgroundColor","cellAutofillFillBorderColor","cellMobileHandleSize","cellMobileHandleBorderWidth","cellMobileHandleBorderRadius","cellMobileHandleBorderColor","cellMobileHandleBackgroundColor","cellMobileHandleBackgroundOpacity","resizeIndicatorColor","moveBacklightColor","moveBacklightOpacity","moveIndicatorColor","hiddenIndicatorColor","scrollbarBorderRadius","scrollbarTrackColor","scrollbarThumbColor","headerFontWeight","headerForegroundColor","headerBackgroundColor","headerHighlightedShadowSize","headerHighlightedForegroundColor","headerHighlightedBackgroundColor","headerActiveBorderColor","headerActiveForegroundColor","headerActiveBackgroundColor","headerFilterBackgroundColor","headerRowForegroundColor","headerRowBackgroundColor","headerRowHighlightedForegroundColor","headerRowHighlightedBackgroundColor","headerRowActiveForegroundColor","headerRowActiveBackgroundColor","checkboxSize","checkboxBorderRadius","checkboxBorderColor","checkboxBackgroundColor","checkboxIconColor","checkboxFocusBorderColor","checkboxFocusBackgroundColor","checkboxFocusIconColor","checkboxFocusRingColor","checkboxDisabledBorderColor","checkboxDisabledBackgroundColor","checkboxDisabledIconColor","checkboxCheckedBorderColor","checkboxCheckedBackgroundColor","checkboxCheckedIconColor","checkboxCheckedFocusBorderColor","checkboxCheckedFocusBackgroundColor","checkboxCheckedFocusIconColor","checkboxCheckedDisabledBorderColor","checkboxCheckedDisabledBackgroundColor","checkboxCheckedDisabledIconColor","checkboxIndeterminateBorderColor","checkboxIndeterminateBackgroundColor","checkboxIndeterminateIconColor","checkboxIndeterminateFocusBorderColor","checkboxIndeterminateFocusBackgroundColor","checkboxIndeterminateFocusIconColor","checkboxIndeterminateDisabledBorderColor","checkboxIndeterminateDisabledBackgroundColor","checkboxIndeterminateDisabledIconColor","radioSize","radioBorderColor","radioBackgroundColor","radioIconColor","radioFocusBorderColor","radioFocusBackgroundColor","radioFocusIconColor","radioFocusRingColor","radioDisabledBorderColor","radioDisabledBackgroundColor","radioDisabledIconColor","radioCheckedBorderColor","radioCheckedBackgroundColor","radioCheckedIconColor","radioCheckedFocusBorderColor","radioCheckedFocusBackgroundColor","radioCheckedFocusIconColor","radioCheckedDisabledBorderColor","radioCheckedDisabledBackgroundColor","radioCheckedDisabledIconColor","iconButtonBorderRadius","iconButtonLargeBorderRadius","iconButtonLargePadding","iconButtonBorderColor","iconButtonBackgroundColor","iconButtonIconColor","iconButtonHoverBorderColor","iconButtonHoverBackgroundColor","iconButtonHoverIconColor","iconButtonActiveBorderColor","iconButtonActiveBackgroundColor","iconButtonActiveIconColor","iconButtonActiveHoverBorderColor","iconButtonActiveHoverBackgroundColor","iconButtonActiveHoverIconColor","collapseButtonBorderRadius","collapseButtonOpenBorderColor","collapseButtonOpenBackgroundColor","collapseButtonOpenIconColor","collapseButtonOpenIconActiveColor","collapseButtonOpenHoverBorderColor","collapseButtonOpenHoverBackgroundColor","collapseButtonOpenHoverIconColor","collapseButtonOpenHoverIconActiveColor","collapseButtonCloseBorderColor","collapseButtonCloseBackgroundColor","collapseButtonCloseIconColor","collapseButtonCloseIconActiveColor","collapseButtonCloseHoverBorderColor","collapseButtonCloseHoverBackgroundColor","collapseButtonCloseHoverIconColor","collapseButtonCloseHoverIconActiveColor","buttonBorderRadius","buttonHorizontalPadding","buttonVerticalPadding","primaryButtonBorderColor","primaryButtonForegroundColor","primaryButtonBackgroundColor","primaryButtonDisabledBorderColor","primaryButtonDisabledForegroundColor","primaryButtonDisabledBackgroundColor","primaryButtonHoverBorderColor","primaryButtonHoverForegroundColor","primaryButtonHoverBackgroundColor","primaryButtonFocusBorderColor","primaryButtonFocusForegroundColor","primaryButtonFocusBackgroundColor","secondaryButtonBorderColor","secondaryButtonForegroundColor","secondaryButtonBackgroundColor","secondaryButtonDisabledBorderColor","secondaryButtonDisabledForegroundColor","secondaryButtonDisabledBackgroundColor","secondaryButtonHoverBorderColor","secondaryButtonHoverForegroundColor","secondaryButtonHoverBackgroundColor","secondaryButtonFocusBorderColor","secondaryButtonFocusForegroundColor","secondaryButtonFocusBackgroundColor","commentsTextareaHorizontalPadding","commentsTextareaVerticalPadding","commentsTextareaBorderWidth","commentsTextareaBorderColor","commentsTextareaForegroundColor","commentsTextareaBackgroundColor","commentsTextareaFocusBorderWidth","commentsTextareaFocusBorderColor","commentsTextareaFocusForegroundColor","commentsTextareaFocusBackgroundColor","commentsIndicatorSize","commentsIndicatorColor","licenseHorizontalPadding","licenseVerticalPadding","licenseForegroundColor","licenseBackgroundColor","linkColor","linkHoverColor","inputBorderWidth","inputBorderRadius","inputHorizontalPadding","inputVerticalPadding","inputBorderColor","inputForegroundColor","inputBackgroundColor","inputHoverBorderColor","inputHoverForegroundColor","inputHoverBackgroundColor","inputDisabledBorderColor","inputDisabledForegroundColor","inputDisabledBackgroundColor","inputFocusBorderColor","inputFocusForegroundColor","inputFocusBackgroundColor","menuBorderWidth","menuBorderRadius","menuHorizontalPadding","menuVerticalPadding","menuItemHorizontalPadding","menuItemVerticalPadding","menuBorderColor","menuShadowX","menuShadowY","menuShadowBlur","menuShadowColor","menuShadowOpacity","menuItemHoverColor","menuItemHoverColorOpacity","menuItemActiveColor","menuItemActiveColorOpacity","dialogSemiTransparentBackgroundColor","dialogSemiTransparentBackgroundOpacity","dialogSolidBackgroundColor","dialogContentPaddingHorizontal","dialogContentPaddingVertical","dialogContentBorderRadius","dialogContentBackgroundColor","paginationBarForegroundColor","paginationBarBackgroundColor","paginationBarHorizontalPadding","paginationBarVerticalPadding","chipBackground","chipBorderRadius","chipVerticalPadding","chipHorizontalPadding","chipGap"]);function wf(t){if(!ff.has(t)){wt(`[ThemeBuilder] Invalid color scheme: "${t}". Must be one of: ${[...ff].join(", ")}.`)}return t}function vf(t){if(!pf.has(t)){wt(`[ThemeBuilder] Invalid density: "${t}". Must be one of: ${[...pf].join(", ")}.`)}return t}function yf(t,e){Et(t)?(t.type&&t.sizes||wt(`[ThemeBuilder] ${e} must be a string or an object with a 'type' and 'sizes' property.`),vf(t.type),function(t,e){Et(t)||wt(`[ThemeBuilder] ${e}.sizes must be an object.`),Object.keys(t).forEach(t=>{pf.has(t)||Qt(`[ThemeBuilder] Unknown density size key: "${t}" in ${e}.sizes. This may be a custom density size or a typo.`)})}(t.sizes,`${e}.sizes`)):"string"==typeof t&&vf(t)}function Cf(t,e){Object.entries(t).forEach(t=>{let[n,o]=t;const i=`${e}.${n}`;"string"!=typeof o&&(Et(o)?Cf(o,i):wt(`[ThemeBuilder] ${i} must be a string or an object.`))})}function Sf(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{type:i="key",warnMissing:r=!1}=o;if(!t)return void(r&&Qt(`[ThemeBuilder] No ${i}s provided in ${n}. All ${i}s are missing.`));if(Object.keys(t).forEach(t=>{e.has(t)||Qt(`[ThemeBuilder] Unknown ${i} key: "${t}" in ${n}. This may be a custom ${i} or a typo.`)}),r){const o=[];e.forEach(e=>{e in t||o.push(e)}),o.length>0&&Qt(`[ThemeBuilder] Missing ${i}(s) in ${n}: ${o.join(", ")}`)}}function Rf(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{requiredFields:o=[]}=n;"object"==typeof t&&null!==t||wt(`[ThemeBuilder] ${e} must be an object.`);const{name:i,sizing:r,density:s,icons:a,colors:l,tokens:h,colorScheme:c}=t;Sf(t,gf,e,{type:"param"}),o.forEach(n=>{void 0===t[n]&&wt(`[ThemeBuilder] ${e}.${n} is required.`)}),void 0!==i&&function(t,e){"string"==typeof t&&""!==t.trim()||wt(`[ThemeBuilder] ${e}.name must be a non-empty string.`)}(i,e),void 0!==r&&(Et(r)||wt(`[ThemeBuilder] ${e}.sizing must be an object.`)),void 0!==s&&(Et(s)||"string"==typeof s||wt(`[ThemeBuilder] ${e}.density must be a string or an object.`),yf(s,`${e}.density`)),void 0!==a&&(Et(a)||wt(`[ThemeBuilder] ${e}.icons must be an object.`),Sf(a,mf,`${e}.icons`,{type:"icon",warnMissing:o.includes("icons")})),void 0!==l&&(Et(l)||wt(`[ThemeBuilder] ${e}.colors must be an object.`),Cf(l,`${e}.colors`)),void 0!==h&&(Et(h)||wt(`[ThemeBuilder] ${e}.tokens must be an object.`),Sf(h,bf,`${e}.tokens`,{type:"token",warnMissing:o.includes("tokens")})),void 0!==c&&wf(c)}function kf(t,e,n){xf(t,e),e.set(t,n)}function xf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ef(t,e){return t.get(Tf(t,e))}function Mf(t,e,n){return t.set(Tf(t,e),n),n}function Tf(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const _f=["sizing","icons","colors","tokens"],Hf=["name","icons","colors","tokens"];var If=new WeakMap,Af=new WeakMap,Pf=new WeakMap,Of=new WeakMap,Nf=new WeakMap,Df=new WeakSet;class Lf{constructor(t){var e,n;xf(e=this,n=Df),n.add(e),kf(this,If,void 0),kf(this,Af,void 0),kf(this,Pf,new Set),kf(this,Of,"auto"),kf(this,Nf,"default"),Rf(t,"themeConfig",{requiredFields:Hf}),Mf(If,this,{name:void 0,sizing:df,density:{type:Ef(Nf,this),sizes:uf},icons:{},colors:{},tokens:{},colorScheme:Ef(Of,this)}),Tf(Df,this,Ff).call(this,t),Mf(If,this,Ef(Af,this))}subscribe(t){return"function"!=typeof t&&wt("[ThemeBuilder] listener must be a function."),Ef(Pf,this).add(t),()=>Ef(Pf,this).delete(t)}params(t){return Rf(t,"params"),Tf(Df,this,Ff).call(this,t),Tf(Df,this,Vf).call(this),this}setColorScheme(t){return Mf(Of,this,wf(t)),Ef(Af,this).colorScheme=Ef(Of,this),Ef(If,this).colorScheme=Ef(Of,this),Tf(Df,this,Vf).call(this),this}setDensityType(t){return Mf(Nf,this,vf(t)),Ef(Af,this).density.type=Ef(Nf,this),Ef(If,this).density.type=Ef(Nf,this),Tf(Df,this,Vf).call(this),this}getThemeConfig(){return Ef(Af,this)}}function Vf(){const t=this.getThemeConfig();Ef(Pf,this).forEach(e=>e(t))}function Bf(t,e){var n;if(Et(e))t.density=Nt(t.density,e),Mf(Nf,this,e.type),null!==(n=Ef(If,this))&&void 0!==n&&n.density&&(Ef(If,this).density.type=e.type);else if("string"==typeof e){var o;t.density.type=e,Mf(Nf,this,e),null!==(o=Ef(If,this))&&void 0!==o&&o.density&&(Ef(If,this).density.type=e)}}function Ff(t){const e=St(Ef(If,this));var n;(void 0!==t.name&&(void 0!==Ef(If,this).name?Qt('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):e.name=t.name),_f.forEach(n=>{void 0!==t[n]&&Et(t[n])&&(e[n]=Nt(e[n],t[n]))}),void 0!==t.density&&Tf(Df,this,Bf).call(this,e,t.density),void 0!==t.colorScheme)&&(e.colorScheme=t.colorScheme,Mf(Of,this,t.colorScheme),null!==(n=Ef(If,this))&&void 0!==n&&n.colorScheme&&(Ef(If,this).colorScheme=t.colorScheme));Mf(Af,this,e)}const Wf=(t,e)=>`width: var(--ht-icon-size);\n height: var(--ht-icon-size);\n -webkit-mask-size: contain;\n -webkit-mask-image: url("${t[e]}");\n background-color: currentColor;`,zf="--ht-",jf=["font-family"],$f=["tokens.","colors.","sizing.","density."];function Uf(t,e){if(function(t){return"string"==typeof t&&$f.some(e=>t.includes(e))}(t))return(n=t).includes("tokens.")?`var(${zf}${Z(n.split(".").slice(1).join("-"))})`:`var(${zf}${Z(n.split(".").join("-"))})`;var n;if(Array.isArray(t)){if(t.length>=2){const[n,o]=t;return"string"==typeof n&&"string"==typeof o?`light-dark(${Uf(n,e)}, ${Uf(o,e)})`:"string"==typeof n?Uf(n,e):"string"==typeof o?Uf(o,e):""}return Uf(t[0],e)}return e&&jf.includes(e)?String(t):Z(t)}function Yf(t,e,n){return`${function(t,e){return`${zf}${t?`${t}-`:""}${Z(e)}`}(t,e)}: ${Uf(n,e)};`}function Gf(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o="";return Object.entries(t).forEach(t=>{let[i,r]=t;const s=Z(i),a=n?`${n}-${s}`:s;Et(r)?o+=Gf(r,e,a):o+=`${Yf(e,a,r)}\n`}),o}function Kf(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function qf(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Xf(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Zf=new WeakSet;class Jf{constructor(t){let{hot:e,themeObject:n}=t;Kf(this,Zf),qf(this,"hot",void 0),qf(this,"themeStyles",void 0),qf(this,"themeClassName",void 0),qf(this,"themeConfig",void 0),this.hot=e,this.update(n)}getClassName(){return this.themeClassName}update(t){this.hot&&(void 0===t.getThemeConfig&&wt('[ThemeManager] The "theme" option must be an instance of ThemeBuilder.'),this.themeConfig=t.getThemeConfig(),this.themeClassName=`ht-theme-${this.themeConfig.name}`,"function"==typeof t.subscribe&&t.subscribe(t=>{var e;null!==(e=this.hot)&&void 0!==e&&e.stylesHandler&&(this.themeConfig=t,Xf(Zf,this,Qf).call(this),this.hot.stylesHandler.clearCache(),this.hot.render(),this.hot.runHooks("afterSetTheme",this.themeClassName,!1))}),this.mount(),this.hot.runHooks("afterSetTheme",this.themeClassName,!0))}mount(){Xf(Zf,this,Qf).call(this)}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){this.unmount(),this.hot.themeManager=null}}function Qf(){if(!(this.themeConfig&&this.hot&&this.hot.rootDocument&&this.hot.rootWrapperElement))return;const t="auto"===this.themeConfig.colorScheme?"light dark":this.themeConfig.colorScheme;var e;this.themeStyles?this.themeStyles.textContent="":this.themeStyles=this.hot.rootDocument.createElement("style"),this.themeStyles.textContent=`:where(.${this.themeClassName}) {\n`,this.themeStyles.textContent+=`color-scheme: ${t};\n`,this.themeConfig.sizing&&(this.themeStyles.textContent+=Gf(this.themeConfig.sizing,"sizing")),this.themeConfig.density&&this.themeConfig.density.type&&this.themeConfig.density.sizes&&this.themeConfig.density.sizes[this.themeConfig.density.type]&&(this.themeStyles.textContent+=Gf(this.themeConfig.density.sizes[this.themeConfig.density.type],"density")),this.themeConfig.colors&&(this.themeStyles.textContent+=Gf(this.themeConfig.colors,"colors")),this.themeConfig.tokens&&(this.themeStyles.textContent+=Gf(this.themeConfig.tokens)),this.themeConfig.icons&&(this.themeStyles.textContent+=(e=this.themeConfig.icons,`.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper::after,\n.htContextMenu table tbody tr td.htSubmenu .htItemWrapper::after,\n.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper::after,\n.pika-single .pika-next {\n ${Wf(e,"arrowRight")}\n}\n\n.pika-single .pika-prev {\n ${Wf(e,"arrowLeft")}\n}\n\n.ht-page-size-section__select-wrapper::after {\n ${Wf(e,"arrowDown")}\n}\n\n.changeType::before {\n ${Wf(e,"menu")}\n}\n\n.htUISelectCaption::after,\n.htAutocompleteArrow::after {\n ${Wf(e,"selectArrow")}\n}\n\n.columnSorting.sortAction.ascending::before {\n ${Wf(e,"arrowNarrowUp")}\n}\n\n.columnSorting.sortAction.descending::before {\n ${Wf(e,"arrowNarrowDown")}\n}\n\n.ht-page-navigation-section .ht-page-first::before {\n ${Wf(e,"arrowLeftWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-first::before {\n ${Wf(e,"arrowRightWithBar")}\n}\n\n.ht-page-navigation-section .ht-page-prev::before {\n ${Wf(e,"arrowLeft")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-prev::before {\n ${Wf(e,"arrowRight")}\n}\n\n.ht-page-navigation-section .ht-page-next::before {\n ${Wf(e,"arrowRight")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-next::before {\n ${Wf(e,"arrowLeft")}\n}\n\n.ht-page-navigation-section .ht-page-last::before {\n ${Wf(e,"arrowRightWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-last::before {\n ${Wf(e,"arrowLeftWithBar")}\n}\n\n.htDropdownMenu table tbody tr td .htItemWrapper span.selected::after,\n.htContextMenu table tbody tr td .htItemWrapper span.selected::after,\n.htFiltersConditionsMenu table tbody tr td .htItemWrapper span.selected::after {\n ${Wf(e,"check")}\n}\n\n.htCheckboxRendererInput {\n appearance: none;\n}\n\n.htCheckboxRendererInput::after {\n ${Wf(e,"checkbox")}\n}\n\nth.beforeHiddenColumn::after {\n ${Wf(e,"caretHiddenLeft")}\n}\n\nth.afterHiddenColumn::before {\n ${Wf(e,"caretHiddenRight")}\n}\n\nth.beforeHiddenRow::after {\n ${Wf(e,"caretHiddenUp")}\n}\n\nth.afterHiddenRow::before {\n ${Wf(e,"caretHiddenDown")}\n}\n\n.collapsibleIndicator::before,\n.ht_nestingButton::before {\n ${Wf(e,"collapseOff")}\n}\n\n.collapsibleIndicator.collapsed::before,\n.ht_nestingButton.ht_nestingExpand::before {\n ${Wf(e,"collapseOn")}\n}\n\n.htUIRadio > input[type="radio"]::after {\n ${Wf(e,"radio")}\n}\n\n.ht-multi-select-chip-remove::before {\n ${Wf(e,"chipClose")}\n}\n\n.ht-multi-select-editor-search-icon {\n ${Wf(e,"search")}\n}\n\n.ht-multi-select-editor-item-selected input::after {\n ${Wf(e,"checkbox")}\n}`)),this.themeStyles.textContent+="}",this.hot.rootWrapperElement&&this.hot.rootWrapperElement.querySelector("style")?this.hot.rootWrapperElement.querySelector("style").textContent=this.themeStyles.textContent:this.hot.rootWrapperElement.prepend(this.themeStyles)}const tp={name:"main",density:"default",icons:{arrowRight:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.64648 10.9393L9.93938 7.64644L6.64648 4.35354' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowRightWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.9292 4.64188L8.27934 7.99203L4.9292 11.3422M11.0711 4.08353V11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowLeft:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M9.93933 10.9393L6.64644 7.64644L9.93933 4.35354' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowLeftWithBar:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0713 4.64188L7.72115 7.99203L11.0713 11.3422M4.92936 4.08353L4.92936 11.3422' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E",arrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cg opacity='0.6'%3E%3Cpath d='M11.5859 6L8.29304 9.29289L5.00015 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E",menu:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",selectArrow:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11.0002 6.66663C11.4262 6.66663 11.6487 7.15963 11.3917 7.47813L11.3537 7.52013L8.35372 10.5201C8.26762 10.6062 8.15307 10.6579 8.03156 10.6656C7.91005 10.6732 7.78992 10.6363 7.69372 10.5616L7.64672 10.5201L4.64672 7.52013L4.60522 7.47313L4.57822 7.43463L4.55122 7.38663L4.54272 7.36863L4.52922 7.33513L4.51322 7.28113L4.50822 7.25463L4.50322 7.22463L4.50122 7.19613V7.13713L4.50372 7.10813L4.50822 7.07813L4.51322 7.05213L4.52922 6.99813L4.54272 6.96463L4.57772 6.89863L4.61022 6.85363L4.64672 6.81313L4.69372 6.77163L4.73222 6.74463L4.78022 6.71763L4.79822 6.70913L4.83172 6.69563L4.88572 6.67963L4.91222 6.67463L4.94222 6.66963L4.97072 6.66763L11.0002 6.66663Z' fill='currentColor'/%3E%3C/svg%3E%0A",arrowNarrowUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00008 12.6667L8.00008 3.33335M8.00008 3.33335L5.33342 6.00002M8.00008 3.33335L10.6667 6.00002' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",arrowNarrowDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.00004 3.33331V12.6666M8.00004 12.6666L10.6667 9.99998M8.00004 12.6666L5.33337 9.99998' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",check:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 8.00002L6.66671 11.3334L13.3334 4.66669' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",checkbox:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 8L7 10L11 6' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",caretHiddenLeft:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6.08482 1.35771L6.11503 1.3551H6.17649L6.2067 1.35771L6.23795 1.36239L6.26503 1.3676L6.32128 1.38427L6.35618 1.39833L6.42493 1.43479L6.4718 1.46864L6.51399 1.50667L6.55722 1.55562L6.58534 1.59573L6.61347 1.64573L6.62232 1.66448L6.63639 1.69937L6.65305 1.75562L6.65826 1.78323L6.66347 1.81448L6.66555 1.84417L6.66659 1.87489V8.12489C6.66659 8.56864 6.15305 8.80042 5.82128 8.53271L5.77753 8.49312L2.65253 5.36812C2.56286 5.27844 2.50899 5.15912 2.50103 5.03254C2.49307 4.90596 2.53157 4.78083 2.6093 4.68062L2.65253 4.63167L5.77753 1.50667L5.82649 1.46344L5.86659 1.43531L5.91659 1.40719L5.93534 1.39833L5.97024 1.38427L6.02649 1.3676L6.05409 1.36239L6.08482 1.35771Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenRight:"data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 10 10' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.33337 1.87499C3.33337 1.43124 3.84692 1.19947 4.17869 1.46718L4.22244 1.50676L7.34744 4.63176C7.43711 4.72145 7.49098 4.84077 7.49894 4.96735C7.5069 5.09392 7.4684 5.21905 7.39067 5.31926L7.34744 5.36822L4.22244 8.49322L4.17348 8.53645L4.13337 8.56457L4.08337 8.5927L4.06462 8.60155L4.02973 8.61562L3.97348 8.63228L3.94587 8.63749L3.91462 8.6427L3.88494 8.64478L3.85421 8.64582L3.82348 8.64478L3.79327 8.64218L3.76202 8.63749L3.73494 8.63228L3.67869 8.61562L3.64379 8.60155L3.57504 8.5651L3.52817 8.53124L3.48598 8.49322L3.44275 8.44426L3.41462 8.40416L3.3865 8.35416L3.37764 8.33541L3.36358 8.30051L3.34692 8.24426L3.34171 8.21666L3.3365 8.18541L3.33442 8.15572L3.33337 1.87499Z' fill='currentColor'/%3E%3C/svg%3E",caretHiddenUp:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.76425 2.43099C3.82165 2.3736 3.89801 2.33913 3.97902 2.33403C4.06003 2.32894 4.14012 2.35358 4.20425 2.40333L4.23558 2.43099L6.23558 4.43099L6.26325 4.46233L6.28125 4.48799L6.29925 4.51999L6.30492 4.53199L6.31392 4.55433L6.32458 4.59033L6.32792 4.60799L6.33125 4.62799L6.33258 4.64699L6.33325 4.66666L6.33258 4.68633L6.33092 4.70566L6.32792 4.72566L6.32458 4.74299L6.31392 4.77899L6.30492 4.80133L6.28158 4.84533L6.25992 4.87533L6.23558 4.90233L6.20425 4.92999L6.17858 4.94799L6.14658 4.96599L6.13458 4.97166L6.11225 4.98066L6.07625 4.99133L6.05858 4.99466L6.03858 4.99799L6.01958 4.99933L5.99992 4.99999H1.99992C1.71592 4.99999 1.56758 4.67133 1.73892 4.45899L1.76425 4.43099L3.76425 2.43099Z' fill='currentColor'/%3E%3C/svg%3E%0A",caretHiddenDown:"data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='8' viewBox='0 0 8 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5.9999 3C6.2839 3 6.43224 3.32867 6.2609 3.541L6.23557 3.569L4.23557 5.569C4.17817 5.62639 4.10181 5.66087 4.0208 5.66596C3.93979 5.67106 3.8597 5.64642 3.79557 5.59667L3.76424 5.569L1.76424 3.569L1.73657 3.53767L1.71857 3.512L1.70057 3.48L1.6949 3.468L1.6859 3.44567L1.67524 3.40967L1.6719 3.392L1.66857 3.372L1.66724 3.353V3.31367L1.6689 3.29433L1.6719 3.27433L1.67524 3.257L1.6859 3.221L1.6949 3.19867L1.71824 3.15467L1.7399 3.12467L1.76424 3.09767L1.79557 3.07L1.82124 3.052L1.85324 3.034L1.86524 3.02833L1.88757 3.01933L1.92357 3.00867L1.94124 3.00533L1.96124 3.002L1.98024 3.00067L5.9999 3Z' fill='currentColor'/%3E%3C/svg%3E%0A",collapseOff:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.33325 8H11.6666' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",collapseOn:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7.49988 11.6667C7.49988 11.9428 7.72374 12.1667 7.99988 12.1667C8.27602 12.1667 8.49988 11.9428 8.49988 11.6667V8.50002H11.6666C11.9427 8.50002 12.1666 8.27616 12.1666 8.00002C12.1666 7.72388 11.9427 7.50002 11.6666 7.50002H8.49988V4.33337C8.49988 4.05723 8.27602 3.83337 7.99988 3.83337C7.72374 3.83337 7.49988 4.05723 7.49988 4.33337V7.50002H4.33325C4.05711 7.50002 3.83325 7.72388 3.83325 8.00002C3.83325 8.27616 4.05711 8.50002 4.33325 8.50002H7.49988V11.6667Z' fill='currentColor'/%3E%3C/svg%3E%0A",radio:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='4' fill='currentColor'/%3E%3C/svg%3E%0A",chipClose:"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 4L4 12M4 4L12 12' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A",search:"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none'%3E%3Cg opacity='0.5'%3E%3Cpath d='M28 28L20 20M4 13.3333C4 14.559 4.24141 15.7727 4.71046 16.905C5.1795 18.0374 5.86699 19.0663 6.73367 19.933C7.60035 20.7997 8.62925 21.4872 9.76162 21.9562C10.894 22.4253 12.1077 22.6667 13.3333 22.6667C14.559 22.6667 15.7727 22.4253 16.905 21.9562C18.0374 21.4872 19.0663 20.7997 19.933 19.933C20.7997 19.0663 21.4872 18.0374 21.9562 16.905C22.4253 15.7727 22.6667 14.559 22.6667 13.3333C22.6667 12.1077 22.4253 10.894 21.9562 9.76162C21.4872 8.62925 20.7997 7.60035 19.933 6.73367C19.0663 5.86699 18.0374 5.1795 16.905 4.71046C15.7727 4.24141 14.559 4 13.3333 4C12.1077 4 10.894 4.24141 9.76162 4.71046C8.62925 5.1795 7.60035 5.86699 6.73367 6.73367C5.86699 7.60035 5.1795 8.62925 4.71046 9.76162C4.24141 10.894 4 12.1077 4 13.3333Z' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/g%3E%3C/svg%3E"},colors:{white:"#ffffffff",black:"#000000ff",primary:{100:"#6180ffff",200:"#5573f0ff",300:"#4669f6ff",400:"#2e56fcff",500:"#1a42e8ff",600:"#1535bcff"},palette:{50:"#f7f7f9ff",100:"#e7e7e9ff",200:"#b9b9bbff",300:"#a3a3a3ff",400:"#68696cff",500:"#404144ff",600:"#313132ff",700:"#282829ff",800:"#222222ff",900:"#1e1e1fff",950:"#050506ff"},transparent:"#ffffff00"},tokens:{fontFamily:"Inter",fontSize:"14px",fontSizeSmall:"12px",lineHeight:"20px",lineHeightSmall:"18px",fontWeight:"400",letterSpacing:"0px",borderColor:["colors.palette.100","colors.palette.700"],accentColor:["colors.primary.500","colors.primary.300"],foregroundColor:["colors.palette.800","colors.palette.200"],foregroundSecondaryColor:["colors.palette.400","colors.palette.300"],backgroundColor:["colors.white","colors.palette.950"],backgroundSecondaryColor:["colors.palette.50","colors.palette.900"],placeholderColor:["colors.palette.300","colors.palette.400"],readOnlyColor:["colors.palette.400","colors.palette.300"],disabledColor:["colors.palette.300","colors.palette.400"],gapSize:"density.gap",iconSize:"sizing.size_4",tableTransition:"0.15s",wrapperBorderWidth:"0px",wrapperBorderRadius:"sizing.size_1",wrapperBorderColor:"tokens.borderColor",barForegroundColor:"tokens.foregroundColor",barBackgroundColor:"tokens.backgroundSecondaryColor",barHorizontalPadding:"density.barsHorizontal",barVerticalPadding:"density.barsVertical",shadowColor:["colors.palette.800","colors.palette.200"],shadowX:"sizing.size_0",shadowY:"sizing.size_2",shadowBlur:"sizing.size_4",shadowOpacity:"8%",cellHorizontalPadding:"density.cellHorizontal",cellVerticalPadding:"density.cellVertical",cellHorizontalBorderColor:"tokens.borderColor",cellVerticalBorderColor:"tokens.borderColor",cellSelectionBorderColor:"tokens.accentColor",cellSelectionBackgroundColor:["colors.primary.400","colors.primary.200"],cellSuccessBackgroundColor:"#37bc6c33",cellErrorBackgroundColor:"#fa4d3233",cellReadOnlyBackgroundColor:"tokens.backgroundSecondaryColor",cellAutofillSize:"sizing.size_1_5",cellAutofillHitAreaSize:"sizing.size_3",cellAutofillBorderWidth:"sizing.size_0_25",cellAutofillBorderRadius:"sizing.size_1",cellAutofillBorderColor:"tokens.backgroundColor",cellAutofillBackgroundColor:"tokens.accentColor",cellAutofillFillBorderColor:"tokens.foregroundColor",cellEditorBorderWidth:"2px",cellEditorBorderColor:"tokens.accentColor",cellEditorForegroundColor:["colors.palette.950","colors.white"],cellEditorBackgroundColor:"tokens.backgroundColor",cellEditorShadowBlurRadius:"0px",cellEditorShadowColor:"tokens.accentColor",cellMobileHandleSize:"sizing.size_3",cellMobileHandleBorderWidth:"sizing.size_0_25",cellMobileHandleBorderRadius:"sizing.size_3",cellMobileHandleBorderColor:"tokens.accentColor",cellMobileHandleBackgroundColor:"tokens.accentColor",cellMobileHandleBackgroundOpacity:"40%",headerFontWeight:"tokens.fontWeight",headerForegroundColor:"tokens.foregroundColor",headerBackgroundColor:"tokens.backgroundSecondaryColor",headerHighlightedShadowSize:"0px",headerHighlightedForegroundColor:["colors.palette.950","colors.white"],headerHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerActiveBorderColor:["colors.primary.400","colors.primary.200"],headerActiveForegroundColor:"colors.white",headerActiveBackgroundColor:"tokens.accentColor",headerFilterBackgroundColor:"tokens.cellSuccessBackgroundColor",headerRowForegroundColor:"tokens.foregroundColor",headerRowBackgroundColor:"tokens.backgroundSecondaryColor",headerRowHighlightedForegroundColor:["colors.palette.950","colors.white"],headerRowHighlightedBackgroundColor:["colors.palette.100","colors.palette.700"],headerRowActiveForegroundColor:"colors.white",headerRowActiveBackgroundColor:"tokens.accentColor",rowHeaderOddBackgroundColor:"tokens.backgroundSecondaryColor",rowHeaderEvenBackgroundColor:"tokens.backgroundSecondaryColor",rowCellOddBackgroundColor:"tokens.backgroundColor",rowCellEvenBackgroundColor:"tokens.backgroundColor",buttonBorderRadius:"sizing.size_1",buttonHorizontalPadding:"density.buttonHorizontal",buttonVerticalPadding:"density.buttonVertical",primaryButtonBorderColor:"colors.transparent",primaryButtonForegroundColor:"colors.white",primaryButtonBackgroundColor:"tokens.accentColor",primaryButtonDisabledBorderColor:"colors.transparent",primaryButtonDisabledForegroundColor:"tokens.disabledColor",primaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],primaryButtonHoverBorderColor:"colors.transparent",primaryButtonHoverForegroundColor:"tokens.backgroundColor",primaryButtonHoverBackgroundColor:["colors.primary.600","colors.primary.100"],primaryButtonFocusBorderColor:"tokens.backgroundColor",primaryButtonFocusForegroundColor:"tokens.backgroundColor",primaryButtonFocusBackgroundColor:"tokens.accentColor",secondaryButtonBorderColor:"tokens.borderColor",secondaryButtonForegroundColor:"tokens.foregroundColor",secondaryButtonBackgroundColor:"tokens.backgroundColor",secondaryButtonDisabledBorderColor:"tokens.borderColor",secondaryButtonDisabledForegroundColor:"tokens.disabledColor",secondaryButtonDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonHoverBorderColor:"tokens.borderColor",secondaryButtonHoverForegroundColor:"tokens.foregroundColor",secondaryButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],secondaryButtonFocusBorderColor:"tokens.borderColor",secondaryButtonFocusForegroundColor:"tokens.foregroundColor",secondaryButtonFocusBackgroundColor:"tokens.backgroundColor",iconButtonBorderRadius:"sizing.size_0_5",iconButtonLargeBorderRadius:"sizing.size_1",iconButtonLargePadding:"sizing.size_1",iconButtonBorderColor:["colors.palette.50","colors.palette.900"],iconButtonBackgroundColor:"tokens.backgroundSecondaryColor",iconButtonIconColor:["colors.palette.300","colors.palette.400"],iconButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],iconButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],iconButtonHoverIconColor:["colors.palette.300","colors.palette.400"],iconButtonActiveBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveBackgroundColor:"tokens.accentColor",iconButtonActiveIconColor:"colors.white",iconButtonActiveHoverBorderColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverBackgroundColor:["colors.primary.400","colors.primary.200"],iconButtonActiveHoverIconColor:"colors.white",collapseButtonBorderRadius:"sizing.size_1",collapseButtonOpenBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenBackgroundColor:["colors.white","colors.palette.950"],collapseButtonOpenIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonOpenHoverBackgroundColor:["colors.palette.50","colors.palette.900"],collapseButtonOpenHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonOpenHoverIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseIconActiveColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverBorderColor:["colors.palette.200","colors.palette.500"],collapseButtonCloseHoverBackgroundColor:["colors.palette.100","colors.palette.700"],collapseButtonCloseHoverIconColor:["colors.palette.400","colors.palette.300"],collapseButtonCloseHoverIconActiveColor:["colors.palette.400","colors.palette.300"],linkColor:["colors.primary.600","colors.primary.100"],linkHoverColor:"tokens.accentColor",inputBorderWidth:"1px",inputBorderRadius:"sizing.size_1",inputHorizontalPadding:"density.inputHorizontal",inputVerticalPadding:"density.inputVertical",inputBorderColor:"tokens.borderColor",inputForegroundColor:"tokens.foregroundColor",inputBackgroundColor:"tokens.backgroundSecondaryColor",inputHoverBorderColor:"tokens.borderColor",inputHoverForegroundColor:"tokens.foregroundColor",inputHoverBackgroundColor:"tokens.backgroundColor",inputDisabledBorderColor:"tokens.borderColor",inputDisabledForegroundColor:"tokens.disabledColor",inputDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],inputFocusBorderColor:"tokens.accentColor",inputFocusForegroundColor:"tokens.foregroundColor",inputFocusBackgroundColor:"tokens.backgroundColor",checkboxSize:"tokens.iconSize",checkboxBorderRadius:"sizing.size_1",checkboxBorderColor:["colors.palette.200","colors.palette.500"],checkboxBackgroundColor:"tokens.backgroundColor",checkboxIconColor:"colors.transparent",checkboxFocusBorderColor:["colors.palette.200","colors.palette.500"],checkboxFocusBackgroundColor:"tokens.backgroundColor",checkboxFocusIconColor:"colors.transparent",checkboxFocusRingColor:"tokens.accentColor",checkboxDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxDisabledIconColor:"colors.transparent",checkboxCheckedBorderColor:["colors.primary.400","colors.primary.200"],checkboxCheckedBackgroundColor:"tokens.accentColor",checkboxCheckedIconColor:"colors.white",checkboxCheckedFocusBorderColor:"tokens.backgroundColor",checkboxCheckedFocusBackgroundColor:"tokens.accentColor",checkboxCheckedFocusIconColor:"colors.white",checkboxCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],checkboxCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],checkboxCheckedDisabledIconColor:"tokens.disabledColor",checkboxIndeterminateBorderColor:["colors.primary.400","colors.primary.200"],checkboxIndeterminateBackgroundColor:"tokens.accentColor",checkboxIndeterminateIconColor:"colors.white",checkboxIndeterminateFocusBorderColor:"tokens.backgroundColor",checkboxIndeterminateFocusBackgroundColor:"tokens.accentColor",checkboxIndeterminateFocusIconColor:"colors.white",checkboxIndeterminateDisabledBorderColor:["colors.palette.200","colors.palette.600"],checkboxIndeterminateDisabledBackgroundColor:["colors.palette.200","colors.palette.500"],checkboxIndeterminateDisabledIconColor:"tokens.disabledColor",radioSize:"tokens.iconSize",radioBorderColor:["colors.palette.200","colors.palette.500"],radioBackgroundColor:"tokens.backgroundColor",radioIconColor:"colors.transparent",radioFocusBorderColor:"tokens.borderColor",radioFocusBackgroundColor:"tokens.backgroundColor",radioFocusIconColor:"colors.transparent",radioFocusRingColor:"tokens.accentColor",radioDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioDisabledIconColor:"colors.transparent",radioCheckedBorderColor:"tokens.accentColor",radioCheckedBackgroundColor:"tokens.backgroundColor",radioCheckedIconColor:"tokens.accentColor",radioCheckedFocusBorderColor:["colors.primary.400","colors.primary.200"],radioCheckedFocusBackgroundColor:"tokens.backgroundColor",radioCheckedFocusIconColor:["colors.primary.400","colors.primary.200"],radioCheckedDisabledBorderColor:["colors.palette.200","colors.palette.500"],radioCheckedDisabledBackgroundColor:["colors.palette.100","colors.palette.700"],radioCheckedDisabledIconColor:"tokens.disabledColor",moveBacklightColor:["colors.palette.800","colors.palette.200"],moveBacklightOpacity:"8%",moveIndicatorColor:"tokens.accentColor",resizeIndicatorColor:["colors.palette.300","colors.palette.400"],hiddenIndicatorColor:["colors.palette.300","colors.palette.400"],menuBorderWidth:"1px",menuBorderRadius:"sizing.size_1",menuHorizontalPadding:"density.menuHorizontal",menuVerticalPadding:"density.menuVertical",menuItemHorizontalPadding:"density.menuItemHorizontal",menuItemVerticalPadding:"density.menuItemVertical",menuBorderColor:"tokens.borderColor",menuShadowX:"tokens.shadowX",menuShadowY:"tokens.shadowY",menuShadowBlur:"tokens.shadowBlur",menuShadowColor:["colors.palette.950","colors.white"],menuShadowOpacity:"8%",menuItemHoverColor:["colors.palette.800","colors.palette.200"],menuItemHoverColorOpacity:"4%",menuItemActiveColor:"tokens.accentColor",menuItemActiveColorOpacity:"8%",commentsTextareaHorizontalPadding:"density.cellHorizontal",commentsTextareaVerticalPadding:"density.cellVertical",commentsTextareaBorderWidth:"1px",commentsTextareaBorderColor:"colors.transparent",commentsTextareaForegroundColor:"tokens.foregroundColor",commentsTextareaBackgroundColor:"tokens.backgroundSecondaryColor",commentsTextareaFocusBorderWidth:"1px",commentsTextareaFocusBorderColor:"tokens.accentColor",commentsTextareaFocusForegroundColor:"tokens.foregroundColor",commentsTextareaFocusBackgroundColor:"tokens.backgroundColor",commentsIndicatorSize:"sizing.size_1_5",commentsIndicatorColor:"tokens.accentColor",licenseHorizontalPadding:"tokens.barHorizontalPadding",licenseVerticalPadding:"tokens.barVerticalPadding",licenseForegroundColor:"tokens.barForegroundColor",licenseBackgroundColor:"tokens.barBackgroundColor",paginationBarForegroundColor:"tokens.barForegroundColor",paginationBarBackgroundColor:"tokens.barBackgroundColor",paginationBarHorizontalPadding:"tokens.barHorizontalPadding",paginationBarVerticalPadding:"tokens.barVerticalPadding",dialogSemiTransparentBackgroundColor:["colors.white","colors.palette.950"],dialogSemiTransparentBackgroundOpacity:"80%",dialogSolidBackgroundColor:["colors.white","colors.palette.950"],dialogContentPaddingHorizontal:"density.dialogHorizontal",dialogContentPaddingVertical:"density.dialogVertical",dialogContentBorderRadius:"sizing.size_2",dialogContentBackgroundColor:"tokens.backgroundSecondaryColor",chipBackground:"tokens.backgroundSecondaryColor",chipBorderRadius:"sizing.size_0_5",chipVerticalPadding:"sizing.size_0",chipHorizontalPadding:"sizing.size_0_5",chipGap:"sizing.size_1",scrollbarBorderRadius:"sizing.size_2",scrollbarTrackColor:"tokens.backgroundSecondaryColor",scrollbarThumbColor:["colors.palette.300","colors.palette.400"]}},{hasItem:ep,getItem:np,getNames:op,getValues:ip,register:rp}=Hn("themes");function sp(t){return ep(t)}function ap(t){if(sp(t))return np(t);Qt(`Theme "${t}" is not registered. Please ensure it is registered before using it.`)}function lp(t,e){const{themeName:n,themeConfigObject:o}=function(t,e){let n=t,o=St(e);return"string"==typeof t&&Et(e)?o.name=t:Et(t)&&(o=St(t),n=o.name),{themeName:n,themeConfigObject:o}}(t,e),i=new Lf(o);return sp(n)?(Qt(`Theme "${n}" is already registered. Registration skipped.`),ap(n)):(rp(n,i),i)}let hp=null;const cp=new Map;function dp(t,e){var n,o,i=this;let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=this;const a=new zn(s);let l,h,c,d,u,g,f=!0;const p={...e.initialState,...e};var m;ga(r)&&(m=this,da.set(m,!0)),this.rootContainer=t,this.rootWrapperElement=void 0,this.rootGridElement=void 0,this.rootPortalElement=void 0,this.rootElement=fa(this)?t.ownerDocument.createElement("div"):t,this.rootDocument=t.ownerDocument,this.rootWindow=this.rootDocument.defaultView,fa(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),ue(this.rootElement,["ht-wrapper","handsontable"]),ue(this.rootWrapperElement,"ht-root-wrapper"),ue(this.rootGridElement,"ht-grid"),this.rootGridElement.appendChild(this.rootElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootContainer.appendChild(this.rootWrapperElement),ue(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const b=null!==(n=null==p?void 0:p.layoutDirection)&&void 0!==n?n:"inherit",w=["rtl","ltr"].includes(b)?b:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",w),null===(o=this.rootWrapperElement)||void 0===o||o.setAttribute("dir",w),this.isRtl=function(){return"rtl"===w},this.isLtr=function(){return!s.isRtl()},this.getDirectionFactor=function(){return s.isLtr()?1:-1},this.stylesHandler=new tf({hot:s,rootElement:s.rootElement,rootDocument:s.rootDocument,onThemeChange:t=>{var e;fa(this)&&(ge(this.rootWrapperElement,/ht-theme-.*/g),ge(this.rootPortalElement,/ht-theme-.*/g),t&&(ue(this.rootWrapperElement,t),ue(this.rootPortalElement,t),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||Qt(`The "${t}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`)),null===(e=this.view)||void 0===e||null===(e=e._wt)||void 0===e||null===(e=e.selectionManager)||void 0===e||e.refreshAllBorderHandleStyles())},injectCoreCss:"boolean"!=typeof(null==e?void 0:e.injectCoreCss)||e.injectCoreCss}),this.themeManager=null,p.language=function(t){let e=yl(t);return Ic(e)||(e=kc,Cl(t)),e}(p.language);const v=Object.fromEntries(Object.entries(p).filter(t=>{let[e]=t;return!(Mn.getSingleton().isRegistered(e)||Mn.getSingleton().isDeprecated(e))})),y=new gu(s,v,[wu,xu]),R=y.getTableMeta(),T=y.getGlobalMeta(),_=wo();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${U()}`,cp.set(this.guid,this),this.columnIndexMapper=new vl,this.rowIndexMapper=new vl,this.columnIndexMapper.addLocalHook("indexesSequenceChange",t=>{s.runHooks("afterColumnSequenceChange",t)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",t=>{s.runHooks("afterRowSequenceChange",t)}),a.addEventListener(this.rootDocument.documentElement,"compositionstart",t=>{s.runHooks("beforeCompositionStart",t)}),h=new Ud(s);const H=Hn(this.guid);H.register("cellRangeMapper",new Ou({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let O=new Nd(R,{rowIndexMapper:s.rowIndexMapper,columnIndexMapper:s.columnIndexMapper,countCols:()=>s.countCols(),countRows:()=>s.countRows(),propToCol:t=>l.propToCol(t),isEditorOpened:()=>!!s.getActiveEditor()&&s.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return i.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return i.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>s.getShortcutManager(),createCellCoords:(t,e)=>s._createCellCoords(t,e),createCellRange:(t,e,n)=>s._createCellRange(t,e,n),visualToRenderableCoords:t=>{const{row:e,col:n}=t;return s._createCellCoords(e>=0?s.rowIndexMapper.getRenderableFromVisualIndex(e):e,n>=0?s.columnIndexMapper.getRenderableFromVisualIndex(n):n)},renderableToVisualCoords:t=>{const{row:e,col:n}=t;return s._createCellCoords(e>=0?s.rowIndexMapper.getVisualFromRenderableIndex(e):e,n>=0?s.columnIndexMapper.getVisualFromRenderableIndex(n):n)},findFirstNonHiddenRenderableRow:(t,e)=>{const n=e>t?1:-1,o=Math.min(t,e),i=Math.max(t,e),r=s.rowIndexMapper.getNearestNotHiddenIndex(t,n);return null===r||1===n&&r>i||-1===n&&r<o?null:r>=0?s.rowIndexMapper.getRenderableFromVisualIndex(r):r},findFirstNonHiddenRenderableColumn:(t,e)=>{const n=e>t?1:-1,o=Math.min(t,e),i=Math.max(t,e),r=s.columnIndexMapper.getNearestNotHiddenIndex(t,n);return null===r||1===n&&r>i||-1===n&&r<o?null:r>=0?s.columnIndexMapper.getRenderableFromVisualIndex(r):r},isDisabledCellSelection:(t,e)=>t<0||e<0?s.getSettings().disableVisualSelection:s.getCellMeta(t,e).disableVisualSelection});this.selection=O;const N=t=>{let{hiddenIndexesChanged:e}=t;this.forceFullRender=!0,e&&this.selection.commit()};function D(t,e){const n="className"===t?s.rootElement:s.table;if(f)ue(n,e);else{let o=[],i=[];T[t]&&(o=Array.isArray(T[t])?T[t]:M(T[t])),e&&(i=Array.isArray(e)?e:M(e));const r=E(o,i),s=E(i,o);r.length&&ge(n,r),s.length&&ue(n,s)}T[t]=e}function L(t){let e;void 0===t?(e=sp("main")?ap("main"):lp(tp),e=ap("main")):e="function"!=typeof t.getThemeConfig?lp(t):t,s.themeManager=function(t){let{hot:e,themeObject:n}=t;return new Jf({hot:e,themeObject:n})}({hot:s,themeObject:e})}function V(){let t=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,t=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===t&&(t=!0,this.onQueueEmpty(this.valid))}}}function B(t,e,n){if(!t.length)return void n();const o=s.getActiveEditor(),i=new V;let r=!0;i.onQueueEmpty=()=>{o&&r&&o._closeAfterDataChange&&o.cancelChanges(),n()};for(let n=t.length-1;n>=0;n--){const[o,a,,h]=t[n],c=l.propToCol(a);let d;d=Number.isInteger(c)?s.getCellMeta(o,c):{...Object.getPrototypeOf(R),...R},s.getCellValidator(d)&&(i.addValidatorToQueue(),s.validateCell(h,d,function(e,n){return function(o){"boolean"!=typeof o&&wt("Validation error: result is not boolean"),!1===o&&!1===n.allowInvalid&&(r=!1,t.splice(e,1),n.valid=!0),i.removeValidatorFormQueue()}}(n,d),e))}i.checkIfQueueIsEmpty()}function F(t,e){for(let e=t.length-1;e>=0;e--){let n=!1;if(null!==t[e]){if(null!==t[e][2]&&void 0!==t[e][2]||null!==t[e][3]&&void 0!==t[e][3]){if(R.allowInsertRow)for(;t[e][0]>s.countRows()-1;){const{delta:t}=l.createRow(void 0,void 0,{source:"auto"});if(0===t){n=!0;break}}if("array"===s.dataType&&(!R.columns||0===R.columns.length)&&R.allowInsertColumn)for(;l.propToCol(t[e][1])>s.countCols()-1;){const{delta:t}=l.createCol(void 0,void 0,{source:"auto"});if(0===t){n=!0;break}}n||l.set(t[e][0],t[e][1],t[e][3])}}else t.splice(e,1)}const n=t.length>0,o=d.getActiveEditor(),i=null==o?void 0:o._closeAfterDataChange;n?(c.adjustRowsAndCols(),s.runHooks("beforeChangeRender",t,e),null!=o&&o.isOpened()&&i&&d.closeEditor(),s.view.adjustElementsSize(),s.render(),(null!=o&&o.isOpened()&&i||null==o||!o.isOpened())&&d.prepareEditor(),s.runHooks("afterChange",t,e||"edit"),o&&I(o.refreshValue)&&o.refreshValue()):s.render()}function W(t,e,n){return Array.isArray(t)?t:[[t,e,n]]}function z(t,e){const n=s.runHooks("beforeChange",t,e||"edit"),o=t.filter(t=>null!==t);var i;if(!1===n||0===o.length)return null===(i=s.getActiveEditor())||void 0===i||i.cancelChanges(),[];for(let t=o.length-1;t>=0;t--){const[e,n,,i]=o[t],r=l.propToCol(n);let a;a=Number.isInteger(r)?s.getCellMeta(e,r):{...Object.getPrototypeOf(R),...R},o[t][3]=Fd(i,a)}return o}this.columnIndexMapper.addLocalHook("cacheUpdated",t=>{N(t),this.runHooks("afterColumnSequenceCacheUpdate",t)}),this.rowIndexMapper.addLocalHook("cacheUpdated",t=>{N(t),this.runHooks("afterRowSequenceCacheUpdate",t)}),this.selection.addLocalHook("afterSetRangeEnd",(t,e)=>{const n=At(!1),o=this.selection.getSelectedRange(),{from:i,to:r}=o.current(),a=o.size()-1;this.runHooks("afterSelection",i.row,i.col,r.row,r.col,n,a),this.runHooks("afterSelectionByProp",i.row,s.colToProp(i.col),r.row,s.colToProp(r.col),n,a);const l=O.getSelectionSource();!e||["loadData","updateData"].includes(l)||n.isTouched()&&(!n.isTouched()||n.value)||g.scrollTo(t);const h=O.isSelectedByRowHeader(),c=O.isSelectedByColumnHeader();h&&c?ue(this.rootElement,["ht__selection--rows","ht__selection--columns"]):h?(ge(this.rootElement,"ht__selection--columns"),ue(this.rootElement,"ht__selection--rows")):c?(ge(this.rootElement,"ht__selection--rows"),ue(this.rootElement,"ht__selection--columns")):ge(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData"].includes(l)||d.closeEditor(null),["refresh","loadData","updateData"].includes(l)||(s.view.render(),d.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",t=>{this.runHooks("beforeSelectionFocusSet",t.row,t.col)}),this.selection.addLocalHook("afterSetFocus",t=>{const e=At(!1);this.runHooks("afterSelectionFocusSet",t.row,t.col,e),(!e.isTouched()||e.isTouched()&&!e.value)&&g.scrollTo(t),d.closeEditor(),s.view.render(),d.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",t=>{const e=t.length-1,{from:n,to:o}=t[e];this.runHooks("afterSelectionEnd",n.row,n.col,o.row,o.col,e),this.runHooks("afterSelectionEndByProp",n.row,s.colToProp(n.col),o.row,s.colToProp(o.col),e),"refresh"===O.getSelectionSource()&&(s.view.render(),d.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",t=>{const e=this.runHooks("afterIsMultipleSelection",t.value);t.value&&(t.value=e)}),this.selection.addLocalHook("afterDeselect",()=>{d.closeEditor(),s.view.render(),ge(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSetRangeStart",...e)}).addLocalHook("beforeSetRangeStartOnly",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSetRangeStartOnly",...e)}).addLocalHook("beforeSetRangeEnd",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSetRangeEnd",...e)}).addLocalHook("beforeSelectColumns",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSelectColumns",...e)}).addLocalHook("afterSelectColumns",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterSelectColumns",...e)}).addLocalHook("beforeSelectRows",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSelectRows",...e)}).addLocalHook("afterSelectRows",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterSelectRows",...e)}).addLocalHook("beforeSelectAll",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeSelectAll",...e)}).addLocalHook("afterSelectAll",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterSelectAll",...e)}).addLocalHook("beforeModifyTransformStart",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("modifyTransformStart",...e)}).addLocalHook("afterModifyTransformStart",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterModifyTransformStart",...e)}).addLocalHook("beforeModifyTransformFocus",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("modifyTransformFocus",...e)}).addLocalHook("afterModifyTransformFocus",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterModifyTransformFocus",...e)}).addLocalHook("beforeModifyTransformEnd",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("modifyTransformEnd",...e)}).addLocalHook("afterModifyTransformEnd",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("afterModifyTransformEnd",...e)}).addLocalHook("beforeRowWrap",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeRowWrap",...e)}).addLocalHook("beforeColumnWrap",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i.runHooks("beforeColumnWrap",...e)}).addLocalHook("insertRowRequire",t=>this.alter("insert_row_above",t,1,"auto")).addLocalHook("insertColRequire",t=>this.alter("insert_col_start",t,1,"auto")),c={alter(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0;const r=t=>{if(0===t.length)return[];const e=[...t];e.sort((t,e)=>{let[n]=t,[o]=e;return n===o?0:n>o?1:-1});return S(e,(t,e)=>{let[n,o]=e;const i=t[t.length-1],[r,s]=i,a=r+s;if(n<=a){const t=Math.max(o-(a-n),0);i[1]+=t}else t.push([n,o]);return t},[e[0]])};switch(t){case"insert_row_below":case"insert_row_above":const i=s.countSourceRows();if(R.maxRows===i)return;const a="insert_row_below"===t?"below":"above";e=null!=e?e:"below"===a?i:0;const{delta:h,startPhysicalIndex:c}=l.createRow(e,n,{source:o,mode:a});O.shiftRows(s.toVisualRow(c),h);break;case"insert_col_start":case"insert_col_end":const u="insert_col_end"===t?"end":"start";e=null!=e?e:"end"===u?s.countSourceCols():0;const{delta:g,startPhysicalIndex:f}=l.createCol(e,n,{source:o,mode:u});if(g){if(Array.isArray(R.colHeaders)){const t=[s.toVisualColumn(f),0];t.length+=g,Array.prototype.splice.apply(R.colHeaders,t)}O.shiftColumns(s.toVisualColumn(f),g)}break;case"remove_row":const p=t=>{let e=0;x(t,t=>{let[n,i]=t;const r=P(n)?s.countRows()-1:Math.max(n-e,0);Number.isInteger(n)&&(n=Math.max(n-e,0));if(!l.removeRow(n,i,o))return;if(O.isSelected()){const{row:t}=s.getSelectedRangeActive().highlight;t>=n&&t<=n+i-1&&d.closeEditor(!0)}const a=s.countRows(),h=R.fixedRowsTop;h>=r+1&&(R.fixedRowsTop-=Math.min(i,h-r));const c=R.fixedRowsBottom;if(c&&r>=a-c&&(R.fixedRowsBottom-=Math.min(i,c)),0===a)O.deselect();else if("ContextMenu.removeRow"===o){const t=O.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),O.refresh()}else O.shiftRows(n,-i);e+=i})};Array.isArray(e)?p(r(e)):p([[e,n]]);break;case"remove_col":const m=t=>{let e=0;x(t,t=>{let[n,i]=t;const r=P(n)?s.countCols()-1:Math.max(n-e,0);let a=s.toPhysicalColumn(r);Number.isInteger(n)&&(n=Math.max(n-e,0));if(!l.removeCol(n,i,o))return;if(O.isSelected()){const{col:t}=s.getSelectedRangeActive().highlight;t>=n&&t<=n+i-1&&d.closeEditor(!0)}if(0===s.countCols())O.deselect();else if("ContextMenu.removeColumn"===o){const t=O.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),O.refresh()}else O.shiftColumns(n,-i);const h=R.fixedColumnsStart;h>=r+1&&(R.fixedColumnsStart-=Math.min(i,h-r)),Array.isArray(R.colHeaders)&&(void 0===a&&(a=-1),R.colHeaders.splice(a,i)),e+=i})};Array.isArray(e)?m(r(e)):m([[e,n]]);break;default:wt(`There is no such action "${t}"`)}i||c.adjustRowsAndCols(),s.view.adjustElementsSize(),s.view.render()},adjustRowsAndCols(){const t=R.minRows,e=R.minSpareRows,n=R.minCols,o=R.minSpareCols;if(t){const e=s.countRows();e<t&&l.createRow(e,t-e,{source:"auto"})}if(e){const t=s.countEmptyRows(!0);if(t<e){const n=e-t,o=Math.min(n,R.maxRows-s.countSourceRows());l.createRow(s.countRows(),o,{source:"auto"})}}{let t;(n||o)&&(t=s.countEmptyCols(!0));let e=s.countCols();if(n&&!R.columns&&e<n){const o=n-e;t+=o,l.createCol(e,o,{source:"auto"})}if(o&&!R.columns&&"array"===s.dataType&&t<o){e=s.countCols();const n=o-t,i=Math.min(n,R.maxCols-e);l.createCol(e,i,{source:"auto"})}}},populateFromArray(t,e,n,o,i){let r,a,l,h;const c=[],d={},u=[],g=t.row,f=t.col;if(a=e.length,0===a)return!1;let p=0,m=0;switch(Et(n)&&(p=n.col-f+1,m=n.row-g+1),i){case"shift_down":const i=C(e),w=i.length,v=Math.max(w,p),y=s.getData().slice(g),S=C(y).slice(f,f+v);for(l=0;l<v;l+=1)if(l<w){for(r=0,a=i[l].length;r<m-a;r+=1)i[l].push(i[l][r%a]);l<S.length?u.push(i[l].concat(S[l])):u.push(i[l].concat(new Array(y.length).fill(null)))}else u.push(i[l%w].concat(S[l]));s.populateFromArray(g,f,C(u));break;case"shift_right":const k=e.length,x=Math.max(k,m),E=s.getData().slice(g).map(t=>t.slice(f));for(r=0;r<x;r+=1)if(r<k){for(l=0,h=e[r].length;l<p-h;l+=1)e[r].push(e[r][l%h]);if(r<E.length)for(let t=0;t<E[r].length;t+=1)e[r].push(E[r][t]);else e[r].push(...new Array(E[0].length).fill(null))}else e.push(e[r%a].slice(0,x).concat(E[r]));s.populateFromArray(g,f,e);break;default:d.row=t.row,d.col=t.col;let M,T=0,_=0,H=!0;const I=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=e[t%e.length];return null!==n?o[n%o.length]:o},A=e.length,P=n?n.row-t.row+1:0;for(a=n?P:Math.max(A,P),r=0;r<a&&!(n&&d.row>n.row&&P>A||!R.allowInsertRow&&d.row>s.countRows()-1||d.row>=R.maxRows);r++){const e=r-T,i=I(e).length,u=n?n.col-t.col+1:0;if(h=n?u:Math.max(i,u),d.col=t.col,M=s.getCellMeta(d.row,d.col),"CopyPaste.paste"!==o&&"Autofill.fill"!==o||!M.skipRowOnPaste){for(_=0,l=0;l<h;l++){var b;if(n&&d.col>n.col&&u>i||!R.allowInsertColumn&&d.col>s.countCols()-1||d.col>=R.maxCols)break;if(M=s.getCellMeta(d.row,d.col),("CopyPaste.paste"===o||"Autofill.fill"===o)&&M.skipColumnOnPaste){_+=1,d.col+=1,h+=1;continue}if(M.readOnly&&"UndoRedo.undo"!==o){d.col+=1;continue}const t=l-_,r=!!M.valueSetter;let a=I(e,t),g=null!==(b=s.getSourceDataAtCell(d.row,d.col))&&void 0!==b?b:null;if(null!==a&&"object"==typeof a)if(Array.isArray(a)&&null===g&&(g=[]),r||"object"==typeof g&&null!==g){if(null!==g){const t=vt(Array.isArray(g)?g:g[0]||g),e=vt(Array.isArray(a)?a:a[0]||a);r||xt(t,e)||Array.isArray(t)&&Array.isArray(e)?a=St(a):H=!1}}else H=!1,M.parsePastedValue&&"CopyPaste.paste"===o&&(H=!0);else r||null===g||"object"!=typeof g||(H=!1);H&&c.push([d.row,d.col,a]),H=!0,d.col+=1}d.row+=1}else T+=1,d.row+=1,a+=1}s.setDataAtCell(c,null,null,o||"populateFromArray")}}},this.init=function(){var t,e;h.setData(R.data),s.runHooks("beforeInit"),(Gt()||qt())&&ue(s.rootElement,"mobile"),this.updateSettings(p,!0),this.view=new Ha(this),d=Gn.getInstance(s,R,O),g=Bu(s),u.init(),fa(this)&&(!function(t){const e=t.ownerDocument;if(!hf){hf=e.createElement("div"),hf.setAttribute("role","status"),hf.setAttribute("aria-live","assertive"),hf.setAttribute("aria-atomic","true");const n=hf.style;n.position="absolute",n.width="1px",n.height="1px",n.margin="-1px",n.overflow="hidden",n.clipPath="rect(0 0 0 0)",n.whiteSpace="nowrap",t.appendChild(hf)}cf+=1}(s.rootPortalElement),j(p.licenseKey,this.rootWrapperElement,"25/03/2026")),s.runHooks("init"),this.render(),f&&null===s.rootElement.offsetParent&&(t=s.rootElement,e=()=>{s.view._wt.wtOverlays.updateLastSpreaderSize(),s.view.adjustElementsSize(),s.render()},new IntersectionObserver((n,o)=>{n.forEach(n=>{n.isIntersecting&&null!==t.offsetParent&&(e(),o.unobserve(t))})},{root:t.ownerDocument.body}).observe(t)),"object"==typeof f&&(s.runHooks("afterChange",f[0],f[1]),f=!1),s.runHooks("afterInit")},this._createCellCoords=function(t,e){return s.view._wt.createCellCoords(t,e)},this._createCellRange=function(t,e,n){return s.view._wt.createCellRange(t,e,n)},this.validateCell=function(t,e,n,o){let i=s.getCellValidator(e);function r(t){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===e.hidden)return void n(t);const o=e.visualCol,i=e.visualRow,r=s.getCell(i,o,!0);if(r&&"TH"!==r.nodeName){const t=s.rowIndexMapper.getRenderableFromVisualIndex(i),e=s.columnIndexMapper.getRenderableFromVisualIndex(o);s.view._wt.getSetting("cellRenderer",t,e,r)}n(t)}var a,l;l=i,"[object RegExp]"===Object.prototype.toString.call(l)&&(a=i,i=function(t,e){e(a.test(t))}),Ze(i)?(t=s.runHooks("beforeValidate",t,e.visualRow,e.prop,o),s._registerMicrotask(()=>{i.call(e,t,n=>{s&&(n=s.runHooks("afterValidate",n,t,e.visualRow,e.prop,o),e.valid=n,r(n),s.runHooks("postAfterValidate",n,t,e.visualRow,e.prop,o))})})):s._registerMicrotask(()=>{e.valid=!0,r(e.valid,!1)})},this.setDataAtCell=function(t,e,n,o){const i=W(t,e,n),r=[];let a,c,d,u=o;for(a=0,c=i.length;a<c;a++){const[t,e,n]=i[a];"object"!=typeof i[a]&&wt("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof i[a][1]&&wt("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`"),d=e>=this.countCols()?e:l.colToProp(e),r.push([t,d,h.getAtCell(this.toPhysicalRow(t),e),n])}u||"object"!=typeof t||(u=e);const g=z(r,u);s.runHooks("afterSetDataAtCell",g,u),B(g,u,()=>{F(g,u)})},this.setDataAtRowProp=function(t,e,n,o){const i=W(t,e,n),r=[];let a,l,c=o;for(a=0,l=i.length;a<l;a++){const[t,e,n]=i[a];r.push([t,e,h.getAtCell(this.toPhysicalRow(t),e),n])}c||"object"!=typeof t||(c=e);const d=z(r,o);s.runHooks("afterSetDataAtRowProp",d,c),B(d,c,()=>{F(d,c)})},this.listen=function(){s&&!s.isListening()&&(cp.forEach(t=>{s!==t&&t.unlisten()}),hp=s.guid,s.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(hp=null,s.runHooks("afterUnlisten"))},this.isListening=function(){return hp===s.guid},this.destroyEditor=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.closeEditor(t),s.view.render(),e&&O.isSelected()&&d.prepareEditor()},this.populateFromArray=function(t,e,n,o,i,r,a){"object"==typeof n&&"object"==typeof n[0]||wt("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof o?s._createCellCoords(o,i):null;return c.populateFromArray(s._createCellCoords(t,e),n,l,r,a)},this.spliceCol=function(t,e,n){for(var o=arguments.length,i=new Array(o>3?o-3:0),r=3;r<o;r++)i[r-3]=arguments[r];return l.spliceCol(t,e,n,...i)},this.spliceRow=function(t,e,n){for(var o=arguments.length,i=new Array(o>3?o-3:0),r=3;r<o;r++)i[r-3]=arguments[r];return l.spliceRow(t,e,n,...i)},this.getSelected=function(){if(O.isSelected())return k(O.getSelectedRange(),t=>{let{from:e,to:n}=t;return[e.row,e.col,n.row,n.col]})},this.getSelectedLast=function(){const t=this.getSelected();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){const t=this.getSelectedRangeActive();if(!t)return;const{from:e,to:n}=t;return[e.row,e.col,n.row,n.col]},this.getSelectedRange=function(){if(O.isSelected())return Array.from(O.getSelectedRange())},this.getSelectedRangeLast=function(){const t=this.getSelectedRange();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return O.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return O.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(t){if(!O.isSelected()||0===this.countRows()||0===this.countCols())return;const e=[];x(O.getSelectedRange(),t=>{if(t.isSingleHeader())return;const n=t.getTopStartCorner(),o=t.getBottomEndCorner();ao(n.row,o.row,t=>{ao(n.col,o.col,n=>{this.getCellMeta(t,n).readOnly||e.push([t,n,null])})})}),e.length>0&&this.setDataAtCell(e,t)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const t=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(t,0),this.isRenderSuspended()||t!==this.renderSuspendedCounter||s.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||s.view.render())},this.batchRender=function(t){this.suspendRender();const e=t();return this.resumeRender(),e},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(e,0),(!this.isExecutionSuspended()&&e===this.executionSuspendedCounter||t)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const n=t();return this.resumeExecution(e),n},this.batch=function(t){this.suspendRender(),this.suspendExecution();const e=t();return this.resumeExecution(),this.resumeRender(),e},this.refreshDimensions=function(){if(!s.view)return;const t=s.view,{width:e,height:n}=t.getLastSize(),{width:o,height:i}=s.rootElement.getBoundingClientRect(),r=o!==e||i!==n;!1===s.runHooks("beforeRefreshDimensions",{width:e,height:n},{width:o,height:i},r)||((r||t._wt.wtOverlays.scrollableElement===s.rootWindow)&&(t.setLastSize(o,i),t.adjustElementsSize(),s.render()),s.runHooks("afterRefreshDimensions",{width:e,height:n},{width:o,height:i},r))},this.updateData=function(t,e){mu(t,t=>{l=t},t=>{l=t,s.columnIndexMapper.fitToLength(this.getInitialColumnCount()),s.rowIndexMapper.fitToLength(this.countSourceRows()),c.adjustRowsAndCols(),O.markSource("updateData"),O.refresh(),O.markEndSource()},{hotInstance:s,dataMap:l,dataSource:h,internalSource:"updateData",source:e,metaManager:y,firstRun:f})},this.loadData=function(t,e){mu(t,t=>{l=t},()=>{y.clearCellsCache(),s.initIndexMappers(),c.adjustRowsAndCols(),O.markSource("loadData"),O.refresh(),O.markEndSource(),f&&(f=[null,"loadData"])},{hotInstance:s,dataMap:l,dataSource:h,internalSource:"loadData",source:e,metaManager:y,firstRun:f})},this.getInitialColumnCount=function(){const t=R.columns;let e=0;if(Array.isArray(t))e=t.length;else if(Ze(t))if("array"===s.dataType){const n=this.countSourceCols();for(let o=0;o<n;o+=1)t(o)&&(e+=1)}else"object"!==s.dataType&&"function"!==s.dataType||(e=l.colToPropCache.length);else if(I(R.dataSchema)){const t=l.getSchema();e=Array.isArray(t)?t.length:It(t)}else e=this.countSourceCols();return e},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(t,e,n,o){return A(t)?l.getAll():l.getRange(s._createCellCoords(t,e),s._createCellCoords(n,o),l.DESTINATION_RENDERER)},this.getCopyableText=function(t,e,n,o){return l.getCopyableText(s._createCellCoords(t,e),s._createCellCoords(n,o))},this.getCopyableData=function(t,e){return l.getCopyable(t,l.colToProp(e))},this.getCopyableSourceData=function(t,e){return h.getCopyable(t,l.colToProp(e))},this.getSchema=function(){return l.getSchema()},this.updateSettings=function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(f?s.loadData:s.updateData).bind(this);let o,i,r=!1;for(o in I(t.rows)&&wt('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),I(t.cols)&&wt('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),I(t.ganttChart)&&wt('Since 8.0.0 the "ganttChart" setting is no longer supported.'),I(t.rowHeights)&&I(t.minRowHeights)&&Qt("Both `rowHeights` and `minRowHeights` are defined in your configuration. As one is the alias of the other, only one of them can be used at a time. `rowHeights` will be used as the row height configuration."),t)if("data"===o||"language"===o);else if("className"===o)D("className",t.className);else if("tableClassName"===o&&s.table)D("tableClassName",t.tableClassName),s.view._wt.wtOverlays.syncOverlayTableClassNames();else if(Mn.getSingleton().isRegistered(o)||Mn.getSingleton().isDeprecated(o)){const e=t[o];Ze(e)?(Mn.getSingleton().addAsFixed(o,e,s),R[o]=e):Array.isArray(e)&&(Mn.getSingleton().add(o,e,s),R[o]=e)}else!e&&Pt(t,o)&&(T[o]=t[o]);const a=Vg(s.rootContainer),h=Pt(t,"themeName"),d=Pt(t,"theme");if(h&&d&&Qt("Both `theme` and `themeName` are defined in your configuration. These options are aliases and cannot be used together. The `themeName` option will be ignored."),e){let e;d&&"string"==typeof t.theme?e=t.theme:h&&"string"==typeof t.themeName&&t.themeName&&!d?(e=t.themeName,R.theme=t.themeName,R.themeName=void 0):a?e=a:s.themeManager&&(e=s.themeManager.getClassName()),s.useTheme(e)}else{const e=s.getCurrentThemeName();var u;if(d&&"string"==typeof t.theme&&e!==t.theme)s.useTheme(t.theme),null===(u=s.themeManager)||void 0===u||u.unmount();else if(h&&!d&&e!==t.themeName){var g;R.theme=t.themeName,R.themeName=void 0,s.useTheme(t.themeName),null===(g=s.themeManager)||void 0===g||g.unmount()}else if(fa(s)&&!a&&Et(t.theme))if(null===s.themeManager)L(t.theme),s.useTheme(s.themeManager.getClassName());else{let e;e="function"!=typeof t.theme.getThemeConfig?lp(t.theme):t.theme,s.themeManager.update(e),s.useTheme(s.themeManager.getClassName())}}void 0===t.data&&void 0===R.data?n(null,"updateSettings"):void 0!==t.data?n(t.data,"updateSettings"):void 0!==t.columns&&(l.createMap(),s.initIndexMappers()),!f&&t.language&&function(t){const e=yl(t);Ic(e)?(s.runHooks("beforeLanguageChange",e),T.language=e,s.runHooks("afterLanguageChange",e)):Cl(t)}(t.language);const p=s.countCols(),m=R.columns;if(m&&Ze(m)&&(r=!0),void 0===t.cell&&void 0===t.cells&&void 0===t.columns||y.clearCache(),p>0)for(o=0,i=0;o<p;o++){if(m){const t=r?m(o):m[i];t&&y.updateColumnMeta(i,t)}i+=1}I(t.cell)&&Tt(t.cell,t=>{s.setCellMetaObject(t.row,t.col,t)}),s.runHooks("afterCellMetaReset"),f&&fu(s,"init");let b=s.rootElement.style.height;if(""!==b&&(b=parseInt(s.rootElement.style.height,10)),e){s.rootElement.getAttribute("style")&&s.rootElement.setAttribute("data-initialstyle",s.rootElement.getAttribute("style"))}let w=t.height;if(void 0!==t.height)if(Ze(w)&&(w=w()),w=s.runHooks("beforeHeightChange",w),null===w){const t=s.rootElement.getAttribute("data-initialstyle");t&&(t.indexOf("height")>-1||t.indexOf("overflow")>-1)?s.rootElement.setAttribute("style",t):(s.rootElement.style.height="",s.rootElement.style.overflow="")}else void 0!==w&&(s.rootElement.style.height=isNaN(w)?`${w}`:`${w}px`,s.rootElement.style.overflow="clip");if(void 0!==t.width){let e=t.width;Ze(e)&&(e=e()),e=s.runHooks("beforeWidthChange",e),s.rootElement.style.width=isNaN(e)?`${e}`:`${e}px`}e||(s.view&&(s.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),s.view._wt.exportSettingsAsClassNames()),s.runHooks("afterUpdateSettings",t)),c.adjustRowsAndCols(),s.view&&!f&&(s.render(),s.view._wt.wtOverlays.adjustElementsSize()),e||!s.view||""!==b&&""!==w&&void 0!==w||b===w||s.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const t=s.getSelectedRangeActive();if(R.getValue){if(Ze(R.getValue))return R.getValue.call(s);if(t)return s.getData()[t.highlight.row][R.getValue]}else if(t)return s.getDataAtCell(t.highlight.row,t.highlight.col);return null},this.getSettings=function(){return R},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(t,e,n,o,i){c.alter(t,e,n,o,i)},this.getCell=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=e,i=t;if(e>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(e)))return null;o=this.columnIndexMapper.getRenderableFromVisualIndex(e)}if(t>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(t)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(t)}return null===i||null===o||void 0===i||void 0===o?null:s.view.getCellAtCoords(s._createCellCoords(i,o),n)},this.getCoords=function(t){const e=this.view._wt.wtTable.getCoords(t);if(null===e)return null;const{row:n,col:o}=e;let i=n,r=o;return n>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(n)),o>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(o)),s._createCellCoords(i,r)},this.colToProp=function(t){return l.colToProp(t)},this.propToCol=function(t){return l.propToCol(t)},this.toVisualRow=t=>this.rowIndexMapper.getVisualFromPhysicalIndex(t),this.toVisualColumn=t=>this.columnIndexMapper.getVisualFromPhysicalIndex(t),this.toPhysicalRow=t=>this.rowIndexMapper.getPhysicalFromVisualIndex(t),this.toPhysicalColumn=t=>this.columnIndexMapper.getPhysicalFromVisualIndex(t),this.getDataAtCell=function(t,e){return l.get(t,l.colToProp(e))},this.getDataAtRowProp=function(t,e){return l.get(t,e)},this.getDataAtCol=function(t){const e=[],n=l.getRange(s._createCellCoords(0,t),s._createCellCoords(R.data.length-1,t),l.DESTINATION_RENDERER);for(let t=0;t<n.length;t+=1)for(let o=0;o<n[t].length;o+=1)e.push(n[t][o]);return e},this.getDataAtProp=function(t){const e=[],n=l.getRange(s._createCellCoords(0,l.propToCol(t)),s._createCellCoords(R.data.length-1,l.propToCol(t)),l.DESTINATION_RENDERER);for(let t=0;t<n.length;t+=1)for(let o=0;o<n[t].length;o+=1)e.push(n[t][o]);return e},this.getSourceData=function(t,e,n,o){let i;return i=void 0===t?h.getData():h.getByRange(s._createCellCoords(t,e),s._createCellCoords(n,o)),i},this.getSourceDataArray=function(t,e,n,o){let i;return i=void 0===t?h.getData(!0):h.getByRange(s._createCellCoords(t,e),s._createCellCoords(n,o),!0),i},this.getSourceDataAtCol=function(t){return h.getAtColumn(t)},this.setSourceDataAtCell=function(t,e,n,o){const i=W(t,e,n),r=this.hasHook("afterSetSourceDataAtCell"),a=[],l=(t,e)=>{const n=this.toVisualRow(t),o=this.toVisualColumn(e);return Number.isInteger(o)?this.getCellMeta(n,o):{...Object.getPrototypeOf(R),...R}};r&&x(i,t=>{let[e,n,o]=t;const i=Fd(o,l(e,n));a.push([e,n,h.getAtCell(e,n),i])}),x(i,t=>{let[e,n,i]=t;const r=l(e,n),s=Fd(i,r);(function(t,e,n){const o=e.sourceDataValidator;if(!Ze(o))return!0;if(!0===o(t,e,n))return!0;const{row:i,col:r,sourceDataWarningMessage:s,allowInvalid:a}=e;return s&&pu(s,[{row:i,col:r,value:t}]),!0===a})(s,r,null!=o?o:"setSourceDataAtCell")&&h.setAtCell(e,n,s)}),r&&this.runHooks("afterSetSourceDataAtCell",a,o),this.render();const c=s.getActiveEditor();c&&I(c.refreshValue)&&c.refreshValue()},this.getSourceDataAtRow=function(t){return h.getAtRow(t)},this.getSourceDataAtCell=function(t,e){return h.getAtCell(t,e)},this.getDataAtRow=function(t){return l.getRange(s._createCellCoords(t,0),s._createCellCoords(t,this.countCols()-1),l.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(t,e,n,o){const i=void 0===t?[0,0,this.countRows(),this.countCols()]:[t,e,n,o],[r,s]=i;let[,,a,l]=i,h=null,c=null;void 0===a&&(a=r),void 0===l&&(l=s);let d="mixed";return ao(Math.max(Math.min(r,a),0),Math.max(r,a),t=>{let e=!0;return ao(Math.max(Math.min(s,l),0),Math.max(s,l),n=>{const o=this.getCellMeta(t,n);return c=o.type,h?e=h===c:h=c,e}),d=e?c:"mixed",e}),d},this.removeCellMeta=function(t,e,n){const[o,i]=[this.toPhysicalRow(t),this.toPhysicalColumn(e)];let r=y.getCellMetaKeyValue(o,i,n);!1!==s.runHooks("beforeRemoveCellMeta",t,e,n,r)&&(y.removeCellMeta(o,i,n),s.runHooks("afterRemoveCellMeta",t,e,n,r)),r=null},this.spliceCellsMeta=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];o.length>0&&!Array.isArray(o[0])&&wt("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),e>0&&y.removeRow(this.toPhysicalRow(t),e),o.length>0&&x(o.reverse(),e=>{y.createRow(this.toPhysicalRow(t)),x(e,(e,n)=>this.setCellMetaObject(t,n,e))}),s.render()},this.setCellMetaObject=function(t,e,n){"object"==typeof n&&Tt(n,(n,o)=>{this.setCellMeta(t,e,o,n)})},this.setCellMeta=function(t,e,n,o){if(!1===s.runHooks("beforeSetCellMeta",t,e,n,o))return;let i=t,r=e;t<this.countRows()&&(i=this.toPhysicalRow(t)),e<this.countCols()&&(r=this.toPhysicalColumn(e)),y.setCellMeta(i,r,n,o),s.runHooks("afterSetCellMeta",t,e,n,o)},this.getCellsMeta=function(){return y.getCellsMeta()},this.getCellMeta=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},o=this.toPhysicalRow(t),i=this.toPhysicalColumn(e);return null===o&&(o=t),null===i&&(i=e),y.getCellMeta(o,i,{visualRow:t,visualColumn:e,...n})},this.getColumnMeta=function(t){return y.getColumnMeta(this.toPhysicalColumn(t))},this.getCellMetaAtRow=function(t){return y.getCellsMetaAtRow(t)},this.isColumnModificationAllowed=function(){return!("object"===s.dataType||R.columns)},this.getCellRenderer=function(t,e){const n="number"==typeof t?s.getCellMeta(t,e).renderer:t.renderer;return"string"==typeof n?Ao(n):A(n)?Ao("text"):n},this.getCellEditor=function(t,e){const n="number"==typeof t?s.getCellMeta(t,e).editor:t.editor;return"string"==typeof n?Bn(n):A(n)?Bn("text"):n},this.getCellValidator=function(t,e){const n="number"==typeof t?s.getCellMeta(t,e).validator:t.validator;return"string"==typeof n?"function"==typeof(o=n)?o:(Do(o)||wt(`No registered validator found under "${o}" name`),No(o)):n;var o},this.validateCells=function(t){this._validateCells(t)},this.validateRows=function(t,e){Array.isArray(t)||wt("validateRows parameter `rows` must be an array"),this._validateCells(e,t)},this.validateColumns=function(t,e){Array.isArray(t)||wt("validateColumns parameter `columns` must be an array"),this._validateCells(e,void 0,t)},this._validateCells=function(t,e,n){const o=new V;t&&(o.onQueueEmpty=t);let i=s.countRows()-1;for(;i>=0;){if(void 0!==e&&-1===e.indexOf(i)){i-=1;continue}let t=s.countCols()-1;for(;t>=0;)void 0===n||-1!==n.indexOf(t)?(o.addValidatorToQueue(),s.validateCell(s.getDataAtCell(i,t),s.getCellMeta(i,t),t=>{"boolean"!=typeof t&&wt("Validation error: result is not boolean"),!1===t&&(o.valid=!1),o.removeValidatorFormQueue()},"validateCells"),t-=1):t-=1;i-=1}o.checkIfQueueIsEmpty()},this.getRowHeader=function(t){let e=R.rowHeaders,n=t;return void 0!==n&&(n=s.runHooks("modifyRowHeader",n)),void 0===n?(e=[],ao(s.countRows()-1,t=>{e.push(s.getRowHeader(t))})):Array.isArray(e)&&void 0!==e[n]?e=e[n]:Ze(e)?e=e(n):e&&"string"!=typeof e&&"number"!=typeof e&&(e=n+1),e},this.hasRowHeaders=function(){return!!R.rowHeaders},this.hasColHeaders=function(){if(void 0!==R.colHeaders&&null!==R.colHeaders)return!!R.colHeaders;for(let t=0,e=s.countCols();t<e;t++)if(s.getColHeader(t))return!0;return!1},this.getColHeader=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=s.runHooks("modifyColHeader",t);if(void 0===n){const t=[],e=s.countCols();for(let n=0;n<e;n++)t.push(s.getColHeader(n));return t}let o=R.colHeaders;const i=s.toPhysicalColumn(n),r=function(t){const e=[],n=s.countCols();let o=0;for(;o<n;o++)Ze(R.columns)&&R.columns(o)&&e.push(o);return e[t]}(i);return!1===R.colHeaders?o=null:R.columns&&Ze(R.columns)&&R.columns(r)&&R.columns(r).title?o=R.columns(r).title:R.columns&&R.columns[i]&&R.columns[i].title?o=R.columns[i].title:Array.isArray(R.colHeaders)&&void 0!==R.colHeaders[i]?o=R.colHeaders[i]:Ze(R.colHeaders)?o=R.colHeaders(i):R.colHeaders&&"string"!=typeof R.colHeaders&&"number"!=typeof R.colHeaders&&(o=function(t){let e,n=t+1,o="";for(;n>0;)e=(n-1)%26,o=String.fromCharCode(65+e)+o,n=parseInt((n-e)/26,10);return o}(n)),o=s.runHooks("modifyColumnHeaderValue",o,t,e),o},this._getColWidthFromSettings=function(t){let e;if(t>=0){e=s.getCellMeta(0,t).width}if(void 0!==e&&e!==R.width||(e=R.colWidths),null!=e){switch(typeof e){case"object":e=e[t];break;case"function":e=e(t)}"string"==typeof e&&(e=Number.parseInt(e,10))}return e},this.getColWidth=function(t,e){let n=s._getColWidthFromSettings(t);return n=s.runHooks("modifyColWidth",n,t,e),void 0===n&&(n=ri),n},this._getRowHeightFromSettings=function(t){var e;const n=s.stylesHandler.getDefaultRowHeight(t);let o=null!==(e=R.rowHeights)&&void 0!==e?e:R.minRowHeights;if(null!=o){switch(typeof o){case"object":o=o[t];break;case"function":o=o(t)}"string"==typeof o&&(o=Number.parseInt(o,10))}return null!=o&&o<n?n:o},this.getRowHeight=function(t,e){let n=s._getRowHeightFromSettings(t);return n=s.runHooks("modifyRowHeight",n,t,e),n},this.countSourceRows=function(){return h.countRows()},this.countSourceCols=function(){return h.countFirstRowKeys()},this.countRows=function(){return l.getLength()},this.countCols=function(){const t=R.maxCols,e=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(t,e)},this.countRenderedRows=function(){return s.view._wt.drawn?s.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return s.view._wt.drawn?s.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return s.view._wt.drawn?s.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return s.view._wt.drawn?s.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=0;return lo(s.countRows()-1,n=>{if(s.isEmptyRow(n))e+=1;else if(!0===t)return!1}),e},this.countEmptyCols=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=0;return lo(s.countCols()-1,n=>{if(s.isEmptyCol(n))e+=1;else if(!0===t)return!1}),e},this.isEmptyRow=function(t){return R.isEmptyRow.call(s,t)},this.isEmptyCol=function(t){return R.isEmptyCol.call(s,t)},this.selectCell=function(t,e,n,o){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!A(t)&&!A(e)&&this.selectCells([[t,e,n,o]],i,r)},this.selectCells=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&g.suspend();const n=O.selectCells(t);return n&&e&&s.listen(),g.resume(),n},this.selectColumns=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2?arguments[2]:void 0;return O.selectColumns(t,e,n)},this.selectRows=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2?arguments[2]:void 0;return O.selectRows(t,e,n)},this.deselectCell=function(){O.deselect()},this.selectAll=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2?arguments[2]:void 0;g.skipNextScrollCycle(),O.selectAll(t,e,n)};const Y=(t,e)=>t.getNearestNotHiddenIndex(e,1,!0);this.scrollViewportTo=function(t,e){var n;"number"==typeof t&&(t={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(n=arguments[4])||void 0===n||n});const{row:o,col:i,considerHiddenIndexes:r}=null!=t?t:{};let a=o,l=i;if(Ze(e)&&this.addHookOnce("afterScroll",e),void 0===r||r){const t=Number.isInteger(o)&&o>=0,e=Number.isInteger(i)&&i>=0,n=t?Y(this.rowIndexMapper,o):void 0,r=e?Y(this.columnIndexMapper,i):void 0;if(null===n||null===r)return!1;a=t?s.rowIndexMapper.getRenderableFromVisualIndex(n):o,l=e?s.columnIndexMapper.getRenderableFromVisualIndex(r):i}const h=Number.isInteger(a),c=Number.isInteger(l);let d=!1;return h&&a>=0&&c&&l>=0?d=s.view.scrollViewport(s._createCellCoords(a,l),t.horizontalSnap,t.verticalSnap):h&&a>=0&&(c&&l<0||!c)?d=s.view.scrollViewportVertically(a,t.verticalSnap):c&&l>=0&&(h&&a<0||!h)&&(d=s.view.scrollViewportHorizontally(l,t.horizontalSnap)),Ze(e)&&(d?this.view.render():(this.removeHook("afterScroll",e),this._registerMicrotask(()=>e()))),d},this.scrollToFocusedCell=function(t){if(!this.selection.isSelected())return!1;Ze(t)&&this.addHookOnce("afterScroll",t);const{highlight:e}=this.getSelectedRangeActive(),n=this.scrollViewportTo(e.toObject());return n?this.view.render():Ze(t)&&(this.removeHook("afterScroll",t),this._registerMicrotask(()=>t())),n},this.destroy=function(){var t;(s._clearTimeouts(),s._clearMicrotasks(),s.view&&s.view.destroy(),h&&h.destroy(),h=null,fa(this))&&(0!==cf&&(1===cf&&(hf.remove(),hf=null),cf-=1),this.getFocusScopeManager().destroy(),null===(t=s.themeManager)||void 0===t||t.destroy());this.getShortcutManager().destroy(),H.clear(),y.clearCache(),cp.delete(this.guid),a.destroy(),d&&d.destroy(),s.rootContainer&&be(s.rootContainer),s.rootPortalElement&&s.rootPortalElement.remove(),s.batchExecution(()=>{s.rowIndexMapper.unregisterAll(),s.columnIndexMapper.unregisterAll(),_.getItems().forEach(t=>{let[,e]=t;e.destroy()}),_.clear(),s.runHooks("afterDestroy")},!0),Mn.getSingleton().destroy(s),Tt(s,(t,e,n)=>{var o;Ze(t)?n[e]=(o=e,()=>{wt(`The "${o}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==e&&(n[e]=null)}),s.isDestroyed=!0,l&&l.destroy(),l=null,c=null,O=null,d=null,s=null},this.getActiveEditor=function(){return d.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return s.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return s.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return s.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return s.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return s.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return s.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return s.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return s.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return s.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return s.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return s.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return s.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(t){return _.getItem($(t))},this.getPluginName=function(t){return _.getId(t)},this.getInstance=function(){return s},this.addHook=function(t,e,n){Mn.getSingleton().add(t,e,s,n)},this.hasHook=function(t){return Mn.getSingleton().has(t,s)||Mn.getSingleton().has(t)},this.addHookOnce=function(t,e,n){Mn.getSingleton().once(t,e,s,n)},this.removeHook=function(t,e){Mn.getSingleton().remove(t,e,s)},this.runHooks=function(t,e,n,o,i,r,a){return Mn.getSingleton().run(s,t,e,n,o,i,r,a)},this.getTranslatedPhrase=function(t,e){return Ac(R.language,t,e)},this.toHTML=()=>Qn(this),this.toTableElement=()=>{const t=this.rootDocument.createElement("div");return t.insertAdjacentHTML("afterbegin",Qn(this)),t.firstElementChild},this.timeouts=[],this.useTheme=t=>{const e=!!f;this.stylesHandler.useTheme(t);const n=this.stylesHandler.getThemeName();!e&&n&&(Vg(this.rootContainer)&&(ge(this.rootContainer,/ht-theme-.*/g),ue(this.rootContainer,n)),s.render(),s.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",n,e)},this.getCurrentThemeName=()=>this.stylesHandler.getThemeName(),this.getTableHeight=()=>this.rootElement.offsetHeight,this.getTableWidth=()=>this.rootElement.offsetWidth,this._registerTimeout=function(t){let e=t;"function"==typeof e&&(e=setTimeout(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(e)},this._clearTimeouts=function(){x(this.timeouts,t=>{clearTimeout(t)})},this.microtasks=[],this._registerMicrotask=function(t){const e={cancelled:!1};this.microtasks.push(e),this.rootWindow.queueMicrotask(()=>{e.cancelled||t()})},this._clearMicrotasks=function(){x(this.microtasks,t=>{t.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return d},this._getDataSource=function(){return h},this._getMetaManager=function(){return y};const G=Lg({handleEvent:()=>s.isListening(),beforeKeyDown:t=>this.runHooks("beforeKeyDown",t),afterKeyDown:t=>{this.isDestroyed||s.runHooks("afterDocumentKeyDown",t)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",t=>{!1===t.ctrlKey&&!1===t.metaKey&&G.releasePressedKeys()}),this.getShortcutManager=function(){return G},u=new ig(s);const K=fa(this)?$u(s):null;this.getFocusManager=function(){return u},this.getFocusScopeManager=function(){return fa(s)||wt("The FocusScopeManager is only available for the main Handsontable instance."),K};const q=p.theme,X=p.themeName,Z=Vg(s.rootContainer);var J;!fa(s)||Z||!Et(q)&&(q||X)||L(q),ko().forEach(t=>{const e=xo(t);_.addItem(t,new e(this))}),J=s,[xg,kg].forEach(t=>t(J)),fa(this)&&function(t){[Eg].forEach(e=>e(t))}(s),G.setActiveContextName("grid"),Mn.getSingleton().run(s,"construct")}function up(t,e,n,o,i,r,s){const a=s.ariaTags,l=[],h=[],c=[],d=[];s._isBaseRendererCalled=!0,s.className&&ue(e,s.className),s.readOnly?(l.push(s.readOnlyCellClassName),a&&d.push(["aria-readonly","true"])):a&&c.push("aria-readonly"),!1===s.valid&&s.invalidCellClassName?(l.push(s.invalidCellClassName),a&&d.push(["aria-invalid","true"])):(h.push(s.invalidCellClassName),a&&c.push("aria-invalid")),!1===s.wordWrap&&s.noWordWrapClassName&&l.push(s.noWordWrapClassName),!r&&s.placeholder&&l.push(s.placeholderCellClassName),s.textEllipsis&&l.push("htTextEllipsis"),ge(e,h),ue(e,l),pe(e,c),fe(e,d)}function gp(t,e,n){t.addEventListener(e,n,!1)}function fp(t,e,n){t.removeEventListener(e,n,!1)}function pp(t){return t.ownerDocument.defaultView.getComputedStyle(t)}function mp(t){const e={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:t=>t.value,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},n=t.body,o=t.createTextNode(""),i=t.createElement("span");let r;function s(){var t,s;o.textContent=e.textContent(r),i.style.position="absolute",i.style.fontSize=pp(r).fontSize,i.style.fontFamily=pp(r).fontFamily,i.style.whiteSpace="pre",n.appendChild(i);const a=parseInt((null===(t=pp(r))||void 0===t?void 0:t.paddingInlineStart)||0,10),l=parseInt((null===(s=pp(r))||void 0===s?void 0:s.paddingInlineEnd)||0,10),h=i.clientWidth+a+l+1;n.removeChild(i);const c=r.style;c.height=`${e.minHeight}px`,e.minWidth>h?c.width=`${e.minWidth}px`:h>e.maxWidth?c.width=`${e.maxWidth}px`:c.width=`${h}px`;const d=r.scrollHeight?r.scrollHeight-1:0;e.minHeight>d?c.height=`${e.minHeight}px`:e.maxHeight<d?(c.height=`${e.maxHeight}px`,c.overflowY="visible"):c.height=`${d}px`}function a(){t.defaultView.setTimeout(s,0)}return{init:function(t,n){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];r=t,function(t){if(t&&t.minHeight)if("inherit"===t.minHeight)e.minHeight=r.clientHeight;else{const n=parseInt(t.minHeight,10);isNaN(n)||(e.minHeight=n)}if(t&&t.maxHeight)if("inherit"===t.maxHeight)e.maxHeight=r.clientHeight;else{const n=parseInt(t.maxHeight,10);isNaN(n)||(e.maxHeight=n)}if(t&&t.minWidth)if("inherit"===t.minWidth)e.minWidth=r.clientWidth;else{const n=parseInt(t.minWidth,10);isNaN(n)||(e.minWidth=n)}if(t&&t.maxWidth)if("inherit"===t.maxWidth)e.maxWidth=r.clientWidth;else{const n=parseInt(t.maxWidth,10);isNaN(n)||(e.maxWidth=n)}i.firstChild||(i.className="autoResize",i.style.display="inline-block",i.appendChild(o))}(n),"TEXTAREA"===r.nodeName&&(r.style.resize="none",r.style.height=`${e.minHeight}px`,r.style.minWidth=`${e.minWidth}px`,r.style.maxWidth=`${e.maxWidth}px`,r.style.overflowY="hidden"),l&&(gp(r,"input",s),gp(r,"keydown",a)),s()},resize:s,unObserve(){fp(r,"input",s),fp(r,"keydown",a)}}}function bp(t,e){const n=De(e),o=e.value.split("\n");let i=n,r=0;for(let e=0;e<o.length;e++){const s=o[e];0!==e&&(r+=o[e-1].length+1);const a=r+s.length;if("home"===t?i=r:"end"===t&&(i=a),n<=a)break}Ve(e,i)}function wp(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}up.RENDERER_TYPE="base";const vp="ht_editor_hidden",yp="textEditor";class Cp extends Cg{static get EDITOR_TYPE(){return"text"}constructor(t){super(t),wp(this,"eventManager",new zn(this)),wp(this,"autoResize",mp(this.hot.rootDocument)),wp(this,"TEXTAREA",void 0),wp(this,"textareaStyle",void 0),wp(this,"TEXTAREA_PARENT",void 0),wp(this,"textareaParentStyle",void 0),wp(this,"layerClass",void 0),this.eventManager=new zn(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(t){this.TEXTAREA.value=t}open(){this._opened=!0,this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.autoResize.unObserve(),oe(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(t,e,n,o,i,r){const s=this.state;if(super.prepare(t,e,n,o,i,r),!r.readOnly){this.refreshDimensions(!0);const{allowInvalid:t}=r;t&&!this.isOpened()&&(this.TEXTAREA.value=""),s===yg.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(t,e){this.state===yg.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(t,e))}focus(){this.TEXTAREA.select(),Ve(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"textarea";const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement(t),fe(this.TEXTAREA,[["data-hot-input",""],J(-1)]),ue(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),ue(this.TEXTAREA_PARENT,"handsontableInputHolder"),de(this.TEXTAREA_PARENT,this.layerClass)&&ge(this.TEXTAREA_PARENT,this.layerClass),ue(this.TEXTAREA_PARENT,vp),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){zt.edge.value&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",ge(this.TEXTAREA_PARENT,this.layerClass),ue(this.TEXTAREA_PARENT,vp)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const t=this.TEXTAREA_PARENT.childNodes;let e=!1;ao(t.length-1,n=>{if(de(t[n],"handsontableEditor"))return e=!0,!1}),de(this.TEXTAREA_PARENT,vp)&&ge(this.TEXTAREA_PARENT,vp),e?(this.layerClass="ht_editor_visible",ue(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),ue(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const t=this.hot.toPhysicalRow(this.row),e=this.hot.getSourceDataAtCell(t,this.col);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==yg.EDITING&&!t)return;if(this.TD=this.getEditedCell(),!this.TD)return void(t||this.close());const{top:e,start:n,width:o,maxWidth:i,height:r,maxHeight:s}=this.getEditedCellRect();this.textareaParentStyle.top=`${e}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${n}px`,this.showEditableElement();const a=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=a.fontSize,this.TEXTAREA.style.fontFamily=a.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(o,i),minHeight:Math.min(r,s),maxWidth:i,maxHeight:s},!0)}bindEvents(){Kt()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===yg.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===yg.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={runOnlyIf:()=>I(this.hot.getSelected()),group:yp},n=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(n(),!1),runOnlyIf:t=>!this.hot.selection.isMultiple()&&!t.altKey},{keys:[["Meta","Enter"]],callback:()=>(n(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(n(),!1)},{keys:[["Home"]],callback:(t,e)=>{let[n]=e;bp(n,this.TEXTAREA)}},{keys:[["End"]],callback:(t,e)=>{let[n]=e;bp(n,this.TEXTAREA)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(yp)}}function Sp(t,e,n,o,i,r,s){let a=r;!a&&s.placeholder&&(a=s.placeholder),a=H(a),s.trimWhitespace&&(a=a.trim()),Se(e,a)}Sp.RENDERER_TYPE="text";const Rp={CELL_TYPE:"text",editor:Cp,renderer:Sp};function kp(t,e){const n=new dp(t,e||{},ua);return n.init(),n}Zd(Rp),Po(up),kp.editors={BaseEditor:Cg},kp.Core=function(t){return new dp(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},ua)},kp.DefaultSettings=eu(),kp.hooks=Mn.getSingleton(),kp.CellCoords=pi,kp.CellRange=Ci,kp.packageName="handsontable",kp.buildDate="25/03/2026 09:28:47",kp.version="17.0.1",kp.languages={dictionaryKeys:Rc,getLanguageDictionary:Hc,getLanguagesDictionaries:function(){return Tc()},registerLanguageDictionary:_c,getTranslatedPhrase:Ac},kp.themes={hasTheme:sp,getTheme:ap,getThemeNames:function(){return op()},getThemes:function(){return ip()},registerTheme:lp};var xp=null;function Ep(){var t;"undefined"!=typeof console&&(t=console).warn.apply(t,arguments)}function Mp(t){return Tp(t,"hot-renderer")?(Ep("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!Tp(t,"hot-editor")&&(Ep("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function Tp(t,n){return e.Children.toArray(t).some(function(t){return void 0!==t.props[n]})}function _p(t,n){if(!t||!n||"boolean"==typeof n)return null;var o=e.createElement(n,null),i=Hp({},!1);return i.className="".concat("hot-wrapper-editor-container"," ").concat(i.className),p.createPortal(e.createElement("div",Object.assign({},i),o),t.body)}function Hp(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{id:t.id||(e?"hot-"+Math.random().toString(36).substring(5):void 0),className:t.className||"",style:t.style||{}}}function Ip(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=Array(e);n<e;n++)o[n]=t[n];return o}function Ap(t,e,n){return e=Dp(e),function(t,e){if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Lp()?Reflect.construct(e,n||[],Dp(t).constructor):e.apply(t,n))}function Pp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Op(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,Wp(o.key),o)}}function Np(t,e,n){return e&&Op(t.prototype,e),n&&Op(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Dp(t){return Dp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dp(t)}function Lp(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(Lp=function(){return!!t})()}function Vp(t,e){return Vp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vp(t,e)}function Bp(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var o,i,r,s,a=[],l=!0,h=!1;try{if(r=(n=n.call(t)).next,0===e);else for(;!(l=(o=r.call(n)).done)&&(a.push(o.value),a.length!==e);l=!0);}catch(t){h=!0,i=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(h)throw i}}return a}}(t,e)||jp(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fp(t){return function(t){if(Array.isArray(t))return Ip(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||jp(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wp(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function jp(t,e){if(t){if("string"==typeof t)return Ip(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ip(t,e):void 0}}var $p=function(){return Np(function t(){Pp(this,t)},null,[{key:"getSettings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.prevProps,o=void 0===n?{}:n,i=e.isInit,r=void 0!==i&&i,s=e.initOnlySettingKeys,a=void 0===s?[]:s,l=function(e){return!(r||!a.includes(e))&&o[e]===t[e]},h={};for(var c in t)"children"!==c&&!l(c)&&t.hasOwnProperty(c)&&(h[c]=t[c]);return h}}])}(),Up=d(void 0),Yp=function(t){var n=t.children,o=i([]),a=r(function(t,e){o.current[e]=t},[]),l=i(new Map),h=i(new Map),c=r(function(){return h.current.clear()},[]),d=i(new Map),u=r(function(){return d.current.clear()},[]),g=i(new Map),f=r(function(t){return function(n,o,i,r,s,a,l){var c="".concat(i,"-").concat(r),u=n.guid,f="".concat(u,"-").concat(c),m="".concat(c,"-").concat(u);if(h.current.has(c)&&(o.innerHTML=h.current.get(c).innerHTML),o&&!o.getAttribute("ghost-table")){for(var b=d.current.get(m),w=g.current.get(f);o.firstChild;)o.removeChild(o.firstChild);if(b&&w)o.appendChild(w);else{var v=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0;e||(e=document),xp||(xp=e.createDocumentFragment());var i=null!=o?o:e.createElement("DIV");return xp.appendChild(i),{portal:p.createPortal(t,i,n),portalContainer:i}}(e.createElement(t,{instance:n,TD:o,row:i,col:r,prop:s,value:a,cellProperties:l}),o.ownerDocument,m,w),y=v.portal,C=v.portalContainer;g.current.set(f,C),o.appendChild(C),d.current.set(m,y)}}return h.current.set("".concat(i,"-").concat(r),o),o}},[]),m=i(function(){}),b=r(function(t){m.current=t},[]),w=r(function(){m.current(Fp(d.current.values()))},[]),v=s(function(){return{componentRendererColumns:l.current,columnsSettings:o.current,emitColumnSettings:a,getRendererWrapper:f,clearPortalCache:u,clearRenderedCellCache:c,setRenderersPortalManagerRef:b,pushCellPortalsIntoPortalManager:w}},[a,f,c,b,w]);return e.createElement(Up.Provider,{value:v},n)};function Gp(){return u(Up)}var Kp=d(void 0),qp=function(t){var n=t.columnIndex,o=t.getOwnerDocument,i=t.children,r=s(function(){return{columnIndex:n,getOwnerDocument:o}},[n,o]);return e.createElement(Kp.Provider,{value:r},i)},Xp=["close","focus","open"],Zp=["getValue","setValue"],Jp={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function Qp(t,e){return function(){function n(o){var i;return Pp(this,n),i=Ap(this,n,[o]),e.current=i,Object.getOwnPropertyNames(kp.editors.BaseEditor.prototype).forEach(function(e){if("constructor"!==e&&!Zp.includes(e)){var o=kp.editors.BaseEditor.prototype[e];n.prototype[e]=function(){for(var n,i,r,s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];(Xp.includes(e)||(i=o.call.apply(o,[this].concat(a))),Jp[e]&&null!==(n=t.current)&&void 0!==n&&n[Jp[e]])&&(i=(r=t.current[Jp[e]]).call.apply(r,[this].concat(a)));return i}.bind(i)}}),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vp(t,e)}(n,kp.editors.BaseEditor),Np(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){this.value=t}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}()}var tm=d(void 0),em=function(t){var n=t.hooksRef,o=t.hotCustomEditorInstanceRef,i=t.children;return e.createElement(tm.Provider,{value:{hooksRef:n,hotCustomEditorInstanceRef:o}},i)},nm=function(t){return t.type===im},om=["_columnIndex","_getOwnerDocument","children"],im=function(t){var n=Gp(),o=n.componentRendererColumns,r=n.emitColumnSettings,s=n.getRendererWrapper,l=u(Kp),h=l.columnIndex,c=l.getOwnerDocument,d=i(null),g=i(null);a(function(){var n,i=function(){var e=$p.getSettings(Object.keys(t).filter(function(t){return!om.includes(t)}).reduce(function(e,n){return e[n]=t[n],e},{}));return t.renderer?(e.renderer=s(t.renderer),o.set(h,!0)):t.hotRenderer&&(e.renderer=t.hotRenderer),t.editor?e.editor=Qp(d,g):t.hotEditor&&(e.editor=t.hotEditor),e}();r(i,h),Mp(t.children)||(n=t.children,e.Children.toArray(n).length&&Ep("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children."))});var f=_p(c(),t.editor);return e.createElement(em,{hooksRef:d,hotCustomEditorInstanceRef:g},f)},rm=n(function(t,n){var o=Bp(g([]),2),i=o[0],r=o[1];return l(n,function(){return r}),e.createElement(c,null,i)});function sm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var am,lm={exports:{}},hm={exports:{}},cm={};var dm,um,gm,fm,pm,mm,bm,wm,vm,ym,Cm,Sm,Rm,km,xm={};function Em(){return um||(um=1,"production"===process.env.NODE_ENV?hm.exports=function(){if(am)return cm;am=1;var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,h=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,u=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,p=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function v(t){if("object"===zp(t)&&null!==t){var u=t.$$typeof;switch(u){case e:switch(t=t.type){case l:case h:case o:case r:case i:case d:return t;default:switch(t=t&&t.$$typeof){case a:case c:case f:case g:case s:return t;default:return u}}case n:return u}}}function y(t){return v(t)===h}return cm.AsyncMode=l,cm.ConcurrentMode=h,cm.ContextConsumer=a,cm.ContextProvider=s,cm.Element=e,cm.ForwardRef=c,cm.Fragment=o,cm.Lazy=f,cm.Memo=g,cm.Portal=n,cm.Profiler=r,cm.StrictMode=i,cm.Suspense=d,cm.isAsyncMode=function(t){return y(t)||v(t)===l},cm.isConcurrentMode=y,cm.isContextConsumer=function(t){return v(t)===a},cm.isContextProvider=function(t){return v(t)===s},cm.isElement=function(t){return"object"===zp(t)&&null!==t&&t.$$typeof===e},cm.isForwardRef=function(t){return v(t)===c},cm.isFragment=function(t){return v(t)===o},cm.isLazy=function(t){return v(t)===f},cm.isMemo=function(t){return v(t)===g},cm.isPortal=function(t){return v(t)===n},cm.isProfiler=function(t){return v(t)===r},cm.isStrictMode=function(t){return v(t)===i},cm.isSuspense=function(t){return v(t)===d},cm.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===r||t===i||t===d||t===u||"object"===zp(t)&&null!==t&&(t.$$typeof===f||t.$$typeof===g||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===m||t.$$typeof===b||t.$$typeof===w||t.$$typeof===p)},cm.typeOf=v,cm}():hm.exports=(dm||(dm=1,"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,o=t?Symbol.for("react.fragment"):60107,i=t?Symbol.for("react.strict_mode"):60108,r=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,a=t?Symbol.for("react.context"):60110,l=t?Symbol.for("react.async_mode"):60111,h=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,d=t?Symbol.for("react.suspense"):60113,u=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,f=t?Symbol.for("react.lazy"):60116,p=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,w=t?Symbol.for("react.scope"):60119;function v(t){if("object"===zp(t)&&null!==t){var u=t.$$typeof;switch(u){case e:var p=t.type;switch(p){case l:case h:case o:case r:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case a:case c:case f:case g:case s:return m;default:return u}}case n:return u}}}var y=l,C=h,S=a,R=s,k=e,x=c,E=o,M=f,T=g,_=n,H=r,I=i,A=d,P=!1;function O(t){return v(t)===h}xm.AsyncMode=y,xm.ConcurrentMode=C,xm.ContextConsumer=S,xm.ContextProvider=R,xm.Element=k,xm.ForwardRef=x,xm.Fragment=E,xm.Lazy=M,xm.Memo=T,xm.Portal=_,xm.Profiler=H,xm.StrictMode=I,xm.Suspense=A,xm.isAsyncMode=function(t){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(t)||v(t)===l},xm.isConcurrentMode=O,xm.isContextConsumer=function(t){return v(t)===a},xm.isContextProvider=function(t){return v(t)===s},xm.isElement=function(t){return"object"===zp(t)&&null!==t&&t.$$typeof===e},xm.isForwardRef=function(t){return v(t)===c},xm.isFragment=function(t){return v(t)===o},xm.isLazy=function(t){return v(t)===f},xm.isMemo=function(t){return v(t)===g},xm.isPortal=function(t){return v(t)===n},xm.isProfiler=function(t){return v(t)===r},xm.isStrictMode=function(t){return v(t)===i},xm.isSuspense=function(t){return v(t)===d},xm.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===r||t===i||t===d||t===u||"object"===zp(t)&&null!==t&&(t.$$typeof===f||t.$$typeof===g||t.$$typeof===s||t.$$typeof===a||t.$$typeof===c||t.$$typeof===m||t.$$typeof===b||t.$$typeof===w||t.$$typeof===p)},xm.typeOf=v}()),xm)),hm.exports}
42
+ /*
43
+ object-assign
44
+ (c) Sindre Sorhus
45
+ @license MIT
46
+ */function Mm(){if(fm)return gm;fm=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return gm=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(t){o[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(t){return!1}}()?Object.assign:function(o,i){for(var r,s,a=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(o),l=1;l<arguments.length;l++){for(var h in r=Object(arguments[l]))e.call(r,h)&&(a[h]=r[h]);if(t){s=t(r);for(var c=0;c<s.length;c++)n.call(r,s[c])&&(a[s[c]]=r[s[c]])}}return a},gm}function Tm(){if(mm)return pm;mm=1;return pm="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function _m(){return wm?bm:(wm=1,bm=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Hm=Em();lm.exports=function(){if(Sm)return Cm;Sm=1;var t=Em(),e=Mm(),n=Tm(),o=_m(),i=function(){if(ym)return vm;ym=1;var t=function(){};if("production"!==process.env.NODE_ENV){var e=Tm(),n={},o=_m();t=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}}function i(i,r,s,a,l){if("production"!==process.env.NODE_ENV)for(var h in i)if(o(i,h)){var c;try{if("function"!=typeof i[h]){var d=Error((a||"React class")+": "+s+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+zp(i[h])+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}c=i[h](r,h,a,s,null,e)}catch(t){c=t}if(!c||c instanceof Error||t((a||"React class")+": type specification of "+s+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+zp(c)+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in n)){n[c.message]=!0;var u=l?l():"";t("Failed "+s+" type: "+c.message+(null!=u?u:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},vm=i}(),r=function(){};function s(){return null}return"production"!==process.env.NODE_ENV&&(r=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}),Cm=function(a,l){var h="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:p("array"),bigint:p("bigint"),bool:p("boolean"),func:p("function"),number:p("number"),object:p("object"),string:p("string"),symbol:p("symbol"),any:f(s),arrayOf:function(t){return f(function(e,o,i,r,s){if("function"!=typeof t)return new g("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var a=e[o];if(!Array.isArray(a))return new g("Invalid "+r+" `"+s+"` of type `"+w(a)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<a.length;l++){var h=t(a,l,i,r,s+"["+l+"]",n);if(h instanceof Error)return h}return null})},element:f(function(t,e,n,o,i){var r=t[e];return a(r)?null:new g("Invalid "+o+" `"+i+"` of type `"+w(r)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:f(function(e,n,o,i,r){var s=e[n];return t.isValidElementType(s)?null:new g("Invalid "+i+" `"+r+"` of type `"+w(s)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(t){return f(function(e,n,o,i,r){if(!(e[n]instanceof t)){var s=t.name||c;return new g("Invalid "+i+" `"+r+"` of type `"+((a=e[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `"+o+"`, expected instance of `"+s+"`.")}var a;return null})},node:f(function(t,e,n,o,i){return b(t[e])?null:new g("Invalid "+o+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(t){return f(function(e,i,r,s,a){if("function"!=typeof t)return new g("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=e[i],h=w(l);if("object"!==h)return new g("Invalid "+s+" `"+a+"` of type `"+h+"` supplied to `"+r+"`, expected an object.");for(var c in l)if(o(l,c)){var d=t(l,c,r,s,a+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(t){return Array.isArray(t)?f(function(e,n,o,i,r){for(var s=e[n],a=0;a<t.length;a++)if(u(s,t[a]))return null;var l=JSON.stringify(t,function(t,e){return"symbol"===v(e)?String(e):e});return new g("Invalid "+i+" `"+r+"` of value `"+String(s)+"` supplied to `"+o+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&r(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),s)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&r("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var e=0;e<t.length;e++){var i=t[e];if("function"!=typeof i)return r("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(i)+" at index "+e+"."),s}return f(function(e,i,r,s,a){for(var l=[],h=0;h<t.length;h++){var c=(0,t[h])(e,i,r,s,a,n);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new g("Invalid "+s+" `"+a+"` supplied to `"+r+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(t){return f(function(e,o,i,r,s){var a=e[o],l=w(a);if("object"!==l)return new g("Invalid "+r+" `"+s+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var h in t){var c=t[h];if("function"!=typeof c)return m(i,r,s,h,v(c));var d=c(a,h,i,r,s+"."+h,n);if(d)return d}return null})},exact:function(t){return f(function(i,r,s,a,l){var h=i[r],c=w(h);if("object"!==c)return new g("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+s+"`, expected `object`.");var d=e({},i[r],t);for(var u in d){var f=t[u];if(o(t,u)&&"function"!=typeof f)return m(s,a,l,u,v(f));if(!f)return new g("Invalid "+a+" `"+l+"` key `"+u+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(i[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var p=f(h,u,s,a,l+"."+u,n);if(p)return p}return null})}};function u(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function g(t,e){this.message=t,this.data=e&&"object"===zp(e)?e:{},this.stack=""}function f(t){if("production"!==process.env.NODE_ENV)var e={},o=0;function i(i,s,a,h,d,u,f){if(h=h||c,u=u||a,f!==n){if(l){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=h+":"+a;!e[m]&&o<3&&(r("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+h+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),e[m]=!0,o++)}}return null==s[a]?i?null===s[a]?new g("The "+d+" `"+u+"` is marked as required in `"+h+"`, but its value is `null`."):new g("The "+d+" `"+u+"` is marked as required in `"+h+"`, but its value is `undefined`."):null:t(s,a,h,d,u)}var s=i.bind(null,!1);return s.isRequired=i.bind(null,!0),s}function p(t){return f(function(e,n,o,i,r,s){var a=e[n];return w(a)!==t?new g("Invalid "+i+" `"+r+"` of type `"+v(a)+"` supplied to `"+o+"`, expected `"+t+"`.",{expectedType:t}):null})}function m(t,e,n,o,i){return new g((t||"React class")+": "+e+" type `"+n+"."+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function b(t){switch(zp(t)){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(b);if(null===t||a(t))return!0;var e=function(t){var e=t&&(h&&t[h]||t["@@iterator"]);if("function"==typeof e)return e}(t);if(!e)return!1;var n,o=e.call(t);if(e!==t.entries){for(;!(n=o.next()).done;)if(!b(n.value))return!1}else for(;!(n=o.next()).done;){var i=n.value;if(i&&!b(i[1]))return!1}return!0;default:return!1}}function w(t){var e=zp(t);return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,e){return"symbol"===t||!!e&&("Symbol"===e["@@toStringTag"]||"function"==typeof Symbol&&e instanceof Symbol)}(e,t)?"symbol":e}function v(t){if(null==t)return""+t;var e=w(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function y(t){var e=v(t);switch(e){case"array":case"object":return"an "+e;case"boolean":case"date":case"regexp":return"a "+e;default:return e}}return g.prototype=Error.prototype,d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Cm}()(Hm.isElement,!0)}else lm.exports=function(){if(km)return Rm;km=1;var t=Tm();function e(){}function n(){}return n.resetWarningCache=e,Rm=function(){function o(e,n,o,i,r,s){if(s!==t){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function i(){return o}o.isRequired=o;var r={array:o,bigint:o,bool:o,func:o,number:o,object:o,string:o,symbol:o,any:o,arrayOf:i,element:o,elementType:o,instanceOf:i,node:o,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:e};return r.PropTypes=r,r}}()();var Im=sm(lm.exports),Am=n(function(t,n){var o,s,d,u=i(null),g=i(null),f=i(null),p=i(null),m=i(),b=Gp(),w=r(function(){return u.current&&u.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):u.current},[u]),v=r(function(){return!u.current||u.current.isDestroyed},[u]),y=r(function(){b.clearRenderedCellCache(),b.componentRendererColumns.clear()},[b]),C=r(function(){return"undefined"!=typeof window?g.current?g.current.ownerDocument:document:null},[g]),S=function(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=v()?[]:(null===(e=w())||void 0===e||null===(e=e.getSettings())||void 0===e?void 0:e._initOnlySettings)||[],r=$p.getSettings(t,{prevProps:o,isInit:n,initOnlySettingKeys:i});return b.columnsSettings.length&&(r.columns=b.columnsSettings),t.renderer?(r.renderer=b.getRendererWrapper(t.renderer),b.componentRendererColumns.set("global",!0)):r.renderer=t.hotRenderer||Ao("text"),t.editor?r.editor=Qp(f,p):r.editor=t.hotEditor||Bn("text"),r},R=function(t){var e,n;t&&(null!==(e=t.getPlugin("autoRowSize"))&&void 0!==e&&e.enabled||null!==(n=t.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&b.componentRendererColumns.size>0&&Ep("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};a(function(){var n,o,i=S(!0);return m.current=t,u.current=new kp.Core(g.current,i),u.current.addHook("beforeViewRender",function(){b.clearPortalCache(),b.clearRenderedCellCache()}),u.current.addHook("afterViewRender",function(){b.pushCellPortalsIntoPortalManager()}),u.current.init(),R(u.current),Mp(t.children)||(n=t.children,o=im,e.Children.toArray(n).some(function(t){return t.type!==o})&&Ep("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var t;y(),null===(t=w())||void 0===t||t.destroy()}},[]),o=function(){y();var e=w(),n=S(!1,m.current);m.current=t,null==e||e.updateSettings(n,!1),R(e),Mp(t.children)},d=e.useRef(!1),a(function(){if(d.current)return o();d.current=!0},s),l(n,function(){return{get hotElementRef(){return g.current},get hotInstance(){return w()}}});var k=h.toArray(t.children).filter(nm).map(function(t,n){return e.createElement(qp,{columnIndex:n,getOwnerDocument:C,key:n},t)}),x=Hp(t),E=_p(C(),t.editor);return e.createElement(c,null,e.createElement("div",Object.assign({ref:g},x),k),e.createElement(rm,{ref:b.setRenderersPortalManagerRef}),e.createElement(em,{hooksRef:f,hotCustomEditorInstanceRef:p},E))});Am.propTypes={style:Im.object,id:Im.string,className:Im.string};var Pm=["children"],Om=n(function(t,n){var i,r=t.children,s=function(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n={};for(var o in t)if({}.hasOwnProperty.call(t,o)){if(-1!==e.indexOf(o))continue;n[o]=t[o]}return n}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Pm),a=null!==(i=s.id)&&void 0!==i?i:o();return e.createElement(Yp,null,e.createElement(Am,Object.assign({id:a},s,{ref:n}),r))});function Nm(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Om.version="17.0.1";const Dm="handsontableEditor";class Lm extends Cp{constructor(){super(...arguments),Nm(this,"isFlippedVertically",!1),Nm(this,"isFlippedHorizontally",!1)}static get EDITOR_TYPE(){return"handsontable"}open(){super.open();const t=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),t.width="",t.height="",t.overflow=""),"none"===t.display&&(t.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Ve(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getTargetDropdownWidth(),height:this.getTargetDropdownHeight()}),this.refreshDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(t,e,n,o,i,r){super.prepare(t,e,n,o,i,r);const s=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,themeName:this.hot.getCurrentThemeName(),afterOnCellMouseDown(t,e){const n=this.getSourceData(e.row,e.col);void 0!==n&&s.setValue(n),s.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&yt(a,r.handsontable),this.htOptions=a}beginEditing(t,e){const n=this.hot.getSettings().onBeginEditing;n&&!1===n()||super.beginEditing(t,e)}createElements(){super.createElements();const t=this.hot.rootDocument.createElement("DIV");t.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(t),this.htContainer=t,this.assignHooks()}finishEditing(t,e,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedActive()){const t=this.htEditor.getValue();void 0!==t&&this.setValue(t)}super.finishEditing(t,e,n)}flipDropdownVerticallyIfNeeded(){const{view:t}=this.hot,e=this.getEditedCellRect();let n=e.top;if(t.isVerticallyScrollableByWindow()){const e=t.getTableOffset().top-this.hot.rootWindow.scrollY;n=Math.max(n+e,0)}const o=this.getDropdownHeight(),i=t.getWorkspaceHeight()-n-e.height,r=o>i&&n>i+e.height;return r?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:r,spaceAbove:n,spaceBelow:i}}flipDropdownVertically(){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-this.getDropdownHeight()+"px",this.isFlippedVertically=!0}unflipDropdownVertically(){const t=this.htEditor.rootElement.style;t.position="absolute",t.top="",this.isFlippedVertically=!1}flipDropdownHorizontallyIfNeeded(){const{view:t}=this.hot,e=this.getEditedCellRect();let n=e.start+e.width;if(t.isHorizontallyScrollableByWindow()){const e=t.getTableOffset().left-this.hot.rootWindow.scrollX;n=Math.max(n+e,0)}const o=this.getDropdownWidth(),i=t.getWorkspaceWidth()-n+e.width,r=o>i&&n>i;return r?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:r,spaceInlineStart:n,spaceInlineEnd:i}}flipDropdownHorizontally(){const t=this.htEditor.rootElement.style,{width:e}=this.getEditedCellRect();t.position="absolute",t[this.hot.isRtl()?"right":"left"]=-(this.getDropdownWidth()-e)+"px",this.isFlippedHorizontally=!0}unflipDropdownHorizontally(){const t=this.htEditor.rootElement.style;t.position="absolute",t[this.hot.isRtl()?"right":"left"]="",this.isFlippedHorizontally=!1}getDropdownHeight(){return this.htEditor.getTableHeight()}getDropdownWidth(){return this.htEditor.getTableWidth()}getTargetDropdownWidth(){return this.htEditor.view.getTableWidth()}getTargetDropdownHeight(){return this.htEditor.view.getTableHeight()+1}assignHooks(){this.hot.addHook("afterDestroy",()=>{var t;null===(t=this.htEditor)||void 0===t||t.destroy()}),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const e={group:Dm,relativeToGroup:mg,position:"before"},n=(t,e)=>{const n=this.htEditor;if(void 0!==t&&(t<0||this.isFlippedVertically&&t>n.countRows()-1?n.deselectCell():n.selectCell(t,0),n.getData().length))return e.preventDefault(),an(e),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:t=>{const e=this.htEditor;let o,i;return!e.getSelectedActive()&&this.isFlippedVertically?o=e.countRows()-1:e.getSelectedActive()&&(this.isFlippedVertically?(i=e.getSelectedActive()[0],o=Math.max(0,i-1)):(i=e.getSelectedActive()[0],o=i-1)),n(o,t)},preventDefault:!1},{keys:[["ArrowDown"]],callback:t=>{const e=this.htEditor;let o,i;if(e.getSelectedActive()||this.isFlippedVertically){if(e.getSelectedActive())if(this.isFlippedVertically)o=e.getSelectedActive()[0]+1;else if(!this.isFlippedVertically){const t=e.countRows()-1;i=e.getSelectedActive()[0],o=Math.min(t,i+1)}}else o=0;return n(o,t)},preventDefault:!1}],e)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(Dm)}}function Vm(t,e,n){Bm(t,e),e.set(t,n)}function Bm(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fm(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wm(t,e){return t.get(zm(t,e))}function zm(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var jm=new WeakMap,$m=new WeakMap,Um=new WeakSet;class Ym extends Lm{constructor(){var t,e;super(...arguments),Bm(t=this,e=Um),e.add(t),Fm(this,"query",null),Fm(this,"strippedChoices",[]),Fm(this,"rawChoices",[]),Vm(this,jm,this.hot.guid.slice(0,9)),Vm(this,$m,Je(()=>{this.focus()},100))}static get EDITOR_TYPE(){return"autocomplete"}getValue(){const t=this.rawChoices.find(t=>{const e=this.stripValueIfNeeded(t);return(Dt(e)?e.value:e)===this.TEXTAREA.value});return I(t)?t:this.TEXTAREA.value}createElements(){super.createElements(),ue(this.htContainer,"autocompleteEditor"),ue(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[["type","text"],["role","combobox"],ht("listbox"),["aria-autocomplete","list"]])}prepare(t,e,n,o,i,r){var s;super.prepare(t,e,n,o,i,r),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[ft("false"),(s=`${Wm(jm,this)}-listbox-${t}-${e}`,["aria-controls",s])]),this.htOptions={...this.htOptions,valueGetter:t=>Dt(t)?t.value:t}}open(){super.open();const t=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,e=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,o=null==n?void 0:n.length,{row:i,col:r}=this;var s;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",t=>this.onBeforeKeyDown(t)),this.htEditor.addHook("afterScroll",Wm($m,this)),this.htEditor.updateSettings({colWidths:t?[Ae(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(t,i,r,s,a,l,h)=>{Sp(0,i,0,0,0,l,h);const{filteringCaseSensitive:c,allowHtml:d,locale:u}=this.cellProperties,g=this.query;let f,p,m=H(l);var b;m&&!d&&(f=!0===c?m.indexOf(g):m.toLocaleLowerCase(u).indexOf(g.toLocaleLowerCase(u)),-1!==f&&(p=m.substr(f,g.length),m=m.replace(p,`<strong>${p}</strong>`))),e&&fe(i,[["role","option"],...n?[(b=o,["aria-setsize",b])]:[],...n?[bt(n.indexOf(l)+1)]:[],["id",`${this.htEditor.rootElement.id}_${r}-${s}`]]),i.innerHTML=m},afterSelectionEnd:(t,n)=>{if(e){const e=t=>{var e;fe(t,[["aria-selected","true"]]),fe(this.TEXTAREA,...(e=t.id,["aria-activedescendant",e]))},o=this.htEditor.getCell(t,n,!0);null!==o?e(o):this.htEditor.addHookOnce("afterScrollVertically",()=>{const o=this.htEditor.getCell(t,n,!0);e(o)})}}}),e&&(fe(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,"role","presentation"),fe(this.htEditor.rootElement,[["role","listbox"],(s="polite",["aria-live",s]),mt("text"),["id",`${Wm(jm,this)}-listbox-${i}-${r}`]]),fe(this.TEXTAREA,...ft("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&fe(this.TEXTAREA,[ft("false")])}discardEditor(t){super.discardEditor(t),this.hot.view.render()}finishEditing(t,e,n){if(this.isOpened()){const e=this.hot.getSelectedRangeActive();(A(e)||I(e)&&!e.includes(this.hot._createCellCoords(this.row,this.col)))&&(t=!0)}super.finishEditing(t,e,n)}queryChoices(t){const e=this.cellProperties.source;this.query=t,"function"==typeof e?e.call(this.cellProperties,t,t=>{this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))}):Array.isArray(e)?(this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))):this.updateChoicesList([])}updateChoicesList(t){const e=De(this.TEXTAREA),n=(o=this.TEXTAREA).selectionEnd?o.selectionEnd:0;var o;const i=this.cellProperties.sortByRelevance,r=this.cellProperties.filter,s=this.stripValueIfNeeded(this.getValue()),a=Dt(s)?s.value:s;let l=null,h=t;i||(h=h.toSorted());const c=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,g=u?a:a.toLocaleLowerCase(d);for(let t=0;t<h.length;t++){const e=Dt(h[t])?q(H(h[t].value)):q(H(h[t]));if(-1!==(u?e:e.toLocaleLowerCase(d)).indexOf(g)&&(c.push(t),!1===r))break}!1===r?s.length>0&&(l=c[0]):(h=c.map(t=>h[t]),l=h.indexOf(g)>-1?h.indexOf(g):0),this.strippedChoices=h,0===h.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(C([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l)),this.hot.listen(),Ve(this.TEXTAREA,e,e===n?void 0:n)}flipDropdownVerticallyIfNeeded(){const t=super.flipDropdownVerticallyIfNeeded(),{isFlipped:e,spaceAbove:n,spaceBelow:o}=t;return this.limitDropdownIfNeeded(e?n:o),t}limitDropdownIfNeeded(t){const e=this.getDropdownHeight();if(e>t){let n=0,o=0,i=null;do{o=this.htEditor.stylesHandler.getDefaultRowHeight(),n+=o}while(n<t);i=n-o,this.isFlippedVertically&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+e-i+"px"),this.setDropdownHeight(n-o)}}updateDropdownDimensions(){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return Xt()?Number.isInteger(t.defaultView.devicePixelRatio||1)?0:2:0}(),e=this.getTargetEditorWidth()+t,n=this.getTargetEditorHeight()+t;this.htEditor.updateSettings({width:e,height:n}),zm(Um,this,Gm).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(t){this.htEditor.updateSettings({height:t}),zm(Um,this,Gm).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}highlightBestMatchingChoice(t){"number"==typeof t?this.htEditor.selectCell(t,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getTargetEditorHeight(){let t=0;if(!this.hot.getCurrentThemeName()){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10)}const e=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length),n=Array.from({length:e},(t,e)=>e).reduce((t,e)=>t+(this.hot.stylesHandler.getDefaultRowHeight()+(0===e?1:0)),0);return n+t}getTargetEditorWidth(){let t=0;if(!this.hot.getCurrentThemeName()){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore"));t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10)}return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(t){return this.stripValuesIfNeeded([t])[0]}stripValuesIfNeeded(t){const{allowHtml:e}=this.cellProperties,n=t=>H(e?t:q(t));return t.every(t=>Dt(t))?t.map(t=>({key:n(t.key),value:n(t.value)})):t.map(t=>n(t))}onBeforeKeyDown(t){if(on(t.keyCode)||t.keyCode===en.BACKSPACE||t.keyCode===en.DELETE||t.keyCode===en.INSERT){let e=10;if(t.keyCode===en.C&&(t.ctrlKey||t.metaKey))return;this.isOpened()||(e+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},e)}}}function Gm(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+Fe(this.hot.rootDocument)})}class Km extends Cg{static get EDITOR_TYPE(){return"checkbox"}beginEditing(t,e){if(e&&"mouseup"===e.type&&"TD"===e.target.nodeName){const t=this.TD.querySelector('input[type="checkbox"]');de(t,"htBadValue")||t.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}function qm(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xm,Zm={exports:{}};var Jm,Qm=(Xm||(Xm=1,(Jm=Zm).exports=function(){var t,e;function n(){return t.apply(null,arguments)}function o(e){t=e}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function r(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function a(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(s(t,e))return!1;return!0}function l(t){return void 0===t}function h(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function d(t,e){var n,o=[],i=t.length;for(n=0;n<i;++n)o.push(e(t[n],n));return o}function u(t,e){for(var n in e)s(e,n)&&(t[n]=e[n]);return s(e,"toString")&&(t.toString=e.toString),s(e,"valueOf")&&(t.valueOf=e.valueOf),t}function g(t,e,n,o){return Gn(t,e,n,o,!0).utc()}function f(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function p(t){return null==t._pf&&(t._pf=f()),t._pf}function m(t){var n=null,o=!1,i=t._d&&!isNaN(t._d.getTime());return i&&(n=p(t),o=e.call(n.parsedDateParts,function(t){return null!=t}),i=n.overflow<0&&!n.empty&&!n.invalidEra&&!n.invalidMonth&&!n.invalidWeekday&&!n.weekdayMismatch&&!n.nullInput&&!n.invalidFormat&&!n.userInvalidated&&(!n.meridiem||n.meridiem&&o),t._strict&&(i=i&&0===n.charsLeftOver&&0===n.unusedTokens.length&&void 0===n.bigHour)),null!=Object.isFrozen&&Object.isFrozen(t)?i:(t._isValid=i,t._isValid)}function b(t){var e=g(NaN);return null!=t?u(p(e),t):p(e).userInvalidated=!0,e}e=Array.prototype.some?Array.prototype.some:function(t){var e,n=Object(this),o=n.length>>>0;for(e=0;e<o;e++)if(e in n&&t.call(this,n[e],e,n))return!0;return!1};var w=n.momentProperties=[],v=!1;function y(t,e){var n,o,i,r=w.length;if(l(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),l(e._i)||(t._i=e._i),l(e._f)||(t._f=e._f),l(e._l)||(t._l=e._l),l(e._strict)||(t._strict=e._strict),l(e._tzm)||(t._tzm=e._tzm),l(e._isUTC)||(t._isUTC=e._isUTC),l(e._offset)||(t._offset=e._offset),l(e._pf)||(t._pf=p(e)),l(e._locale)||(t._locale=e._locale),r>0)for(n=0;n<r;n++)l(i=e[o=w[n]])||(t[o]=i);return t}function C(t){y(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,n.updateOffset(this),v=!1)}function S(t){return t instanceof C||null!=t&&null!=t._isAMomentObject}function R(t){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function k(t,e){var o=!0;return u(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,t),o){var i,r,a,l=[],h=arguments.length;for(r=0;r<h;r++){if(i="","object"==typeof arguments[r]){for(a in i+="\n["+r+"] ",arguments[0])s(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[r];l.push(i)}R(t+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),o=!1}return e.apply(this,arguments)},e)}var x,E={};function M(t,e){null!=n.deprecationHandler&&n.deprecationHandler(t,e),E[t]||(R(e),E[t]=!0)}function T(t){return"undefined"!=typeof Function&&t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function _(t){var e,n;for(n in t)s(t,n)&&(T(e=t[n])?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function H(t,e){var n,o=u({},t);for(n in e)s(e,n)&&(r(t[n])&&r(e[n])?(o[n]={},u(o[n],t[n]),u(o[n],e[n])):null!=e[n]?o[n]=e[n]:delete o[n]);for(n in t)s(t,n)&&!s(e,n)&&r(t[n])&&(o[n]=u({},o[n]));return o}function I(t){null!=t&&this.set(t)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null,x=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)s(t,e)&&n.push(e);return n};var A={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function P(t,e,n){var o=this._calendar[t]||this._calendar.sameElse;return T(o)?o.call(e,n):o}function O(t,e,n){var o=""+Math.abs(t),i=e-o.length;return(t>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+o}var N=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,D=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,L={},V={};function B(t,e,n,o){var i=o;"string"==typeof o&&(i=function(){return this[o]()}),t&&(V[t]=i),e&&(V[e[0]]=function(){return O(i.apply(this,arguments),e[1],e[2])}),n&&(V[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function F(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function W(t){var e,n,o=t.match(N);for(e=0,n=o.length;e<n;e++)V[o[e]]?o[e]=V[o[e]]:o[e]=F(o[e]);return function(e){var i,r="";for(i=0;i<n;i++)r+=T(o[i])?o[i].call(e,t):o[i];return r}}function z(t,e){return t.isValid()?(e=j(e,t.localeData()),L[e]=L[e]||W(e),L[e](t)):t.localeData().invalidDate()}function j(t,e){var n=5;function o(t){return e.longDateFormat(t)||t}for(D.lastIndex=0;n>=0&&D.test(t);)t=t.replace(D,o),D.lastIndex=0,n-=1;return t}var $={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function U(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(N).map(function(t){return"MMMM"===t||"MM"===t||"DD"===t||"dddd"===t?t.slice(1):t}).join(""),this._longDateFormat[t])}var Y="Invalid date";function G(){return this._invalidDate}var K="%d",q=/\d{1,2}/;function X(t){return this._ordinal.replace("%d",t)}var Z={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function J(t,e,n,o){var i=this._relativeTime[n];return T(i)?i(t,e,n,o):i.replace(/%d/i,t)}function Q(t,e){var n=this._relativeTime[t>0?"future":"past"];return T(n)?n(e):n.replace(/%s/i,e)}var tt={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function et(t){return"string"==typeof t?tt[t]||tt[t.toLowerCase()]:void 0}function nt(t){var e,n,o={};for(n in t)s(t,n)&&(e=et(n))&&(o[e]=t[n]);return o}var ot={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function it(t){var e,n=[];for(e in t)s(t,e)&&n.push({unit:e,priority:ot[e]});return n.sort(function(t,e){return t.priority-e.priority}),n}var rt,st=/\d/,at=/\d\d/,lt=/\d{3}/,ht=/\d{4}/,ct=/[+-]?\d{6}/,dt=/\d\d?/,ut=/\d\d\d\d?/,gt=/\d\d\d\d\d\d?/,ft=/\d{1,3}/,pt=/\d{1,4}/,mt=/[+-]?\d{1,6}/,bt=/\d+/,wt=/[+-]?\d+/,vt=/Z|[+-]\d\d:?\d\d/gi,yt=/Z|[+-]\d\d(?::?\d\d)?/gi,Ct=/[+-]?\d+(\.\d{1,3})?/,St=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Rt=/^[1-9]\d?/,kt=/^([1-9]\d|\d)/;function xt(t,e,n){rt[t]=T(e)?e:function(t,o){return t&&n?n:e}}function Et(t,e){return s(rt,t)?rt[t](e._strict,e._locale):new RegExp(Mt(t))}function Mt(t){return Tt(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,o,i){return e||n||o||i}))}function Tt(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function _t(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function Ht(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=_t(e)),n}rt={};var It={};function At(t,e){var n,o,i=e;for("string"==typeof t&&(t=[t]),h(e)&&(i=function(t,n){n[e]=Ht(t)}),o=t.length,n=0;n<o;n++)It[t[n]]=i}function Pt(t,e){At(t,function(t,n,o,i){o._w=o._w||{},e(t,o._w,o,i)})}function Ot(t,e,n){null!=e&&s(It,t)&&It[t](e,n._a,n,t)}function Nt(t){return t%4==0&&t%100!=0||t%400==0}var Dt=0,Lt=1,Vt=2,Bt=3,Ft=4,Wt=5,zt=6,jt=7,$t=8;function Ut(t){return Nt(t)?366:365}B("Y",0,0,function(){var t=this.year();return t<=9999?O(t,4):"+"+t}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),xt("Y",wt),xt("YY",dt,at),xt("YYYY",pt,ht),xt("YYYYY",mt,ct),xt("YYYYYY",mt,ct),At(["YYYYY","YYYYYY"],Dt),At("YYYY",function(t,e){e[Dt]=2===t.length?n.parseTwoDigitYear(t):Ht(t)}),At("YY",function(t,e){e[Dt]=n.parseTwoDigitYear(t)}),At("Y",function(t,e){e[Dt]=parseInt(t,10)}),n.parseTwoDigitYear=function(t){return Ht(t)+(Ht(t)>68?1900:2e3)};var Yt,Gt=qt("FullYear",!0);function Kt(){return Nt(this.year())}function qt(t,e){return function(o){return null!=o?(Zt(this,t,o),n.updateOffset(this,e),this):Xt(this,t)}}function Xt(t,e){if(!t.isValid())return NaN;var n=t._d,o=t._isUTC;switch(e){case"Milliseconds":return o?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return o?n.getUTCSeconds():n.getSeconds();case"Minutes":return o?n.getUTCMinutes():n.getMinutes();case"Hours":return o?n.getUTCHours():n.getHours();case"Date":return o?n.getUTCDate():n.getDate();case"Day":return o?n.getUTCDay():n.getDay();case"Month":return o?n.getUTCMonth():n.getMonth();case"FullYear":return o?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Zt(t,e,n){var o,i,r,s,a;if(t.isValid()&&!isNaN(n)){switch(o=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?o.setUTCMilliseconds(n):o.setMilliseconds(n));case"Seconds":return void(i?o.setUTCSeconds(n):o.setSeconds(n));case"Minutes":return void(i?o.setUTCMinutes(n):o.setMinutes(n));case"Hours":return void(i?o.setUTCHours(n):o.setHours(n));case"Date":return void(i?o.setUTCDate(n):o.setDate(n));case"FullYear":break;default:return}r=n,s=t.month(),a=29!==(a=t.date())||1!==s||Nt(r)?a:28,i?o.setUTCFullYear(r,s,a):o.setFullYear(r,s,a)}}function Jt(t){return T(this[t=et(t)])?this[t]():this}function Qt(t,e){if("object"==typeof t){var n,o=it(t=nt(t)),i=o.length;for(n=0;n<i;n++)this[o[n].unit](t[o[n].unit])}else if(T(this[t=et(t)]))return this[t](e);return this}function te(t,e){return(t%e+e)%e}function ee(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=te(e,12);return t+=(e-n)/12,1===n?Nt(t)?29:28:31-n%7%2}Yt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),xt("M",dt,Rt),xt("MM",dt,at),xt("MMM",function(t,e){return e.monthsShortRegex(t)}),xt("MMMM",function(t,e){return e.monthsRegex(t)}),At(["M","MM"],function(t,e){e[Lt]=Ht(t)-1}),At(["MMM","MMMM"],function(t,e,n,o){var i=n._locale.monthsParse(t,o,n._strict);null!=i?e[Lt]=i:p(n).invalidMonth=t});var ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),oe="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ie=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,re=St,se=St;function ae(t,e){return t?i(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||ie).test(e)?"format":"standalone"][t.month()]:i(this._months)?this._months:this._months.standalone}function le(t,e){return t?i(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[ie.test(e)?"format":"standalone"][t.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function he(t,e,n){var o,i,r,s=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)r=g([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(r,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Yt.call(this._shortMonthsParse,s))?i:null:-1!==(i=Yt.call(this._longMonthsParse,s))?i:null:"MMM"===e?-1!==(i=Yt.call(this._shortMonthsParse,s))||-1!==(i=Yt.call(this._longMonthsParse,s))?i:null:-1!==(i=Yt.call(this._longMonthsParse,s))||-1!==(i=Yt.call(this._shortMonthsParse,s))?i:null}function ce(t,e,n){var o,i,r;if(this._monthsParseExact)return he.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),o=0;o<12;o++){if(i=g([2e3,o]),n&&!this._longMonthsParse[o]&&(this._longMonthsParse[o]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[o]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[o]||(r="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(r.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[o].test(t))return o;if(n&&"MMM"===e&&this._shortMonthsParse[o].test(t))return o;if(!n&&this._monthsParse[o].test(t))return o}}function de(t,e){if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=Ht(e);else if(!h(e=t.localeData().monthsParse(e)))return t;var n=e,o=t.date();return o=o<29?o:Math.min(o,ee(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,o):t._d.setMonth(n,o),t}function ue(t){return null!=t?(de(this,t),n.updateOffset(this,!0),this):Xt(this,"Month")}function ge(){return ee(this.year(),this.month())}function fe(t){return this._monthsParseExact?(s(this,"_monthsRegex")||me.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=re),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function pe(t){return this._monthsParseExact?(s(this,"_monthsRegex")||me.call(this),t?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=se),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function me(){function t(t,e){return e.length-t.length}var e,n,o,i,r=[],s=[],a=[];for(e=0;e<12;e++)n=g([2e3,e]),o=Tt(this.monthsShort(n,"")),i=Tt(this.months(n,"")),r.push(o),s.push(i),a.push(i),a.push(o);r.sort(t),s.sort(t),a.sort(t),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function be(t,e,n,o,i,r,s){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,o,i,r,s),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,o,i,r,s),a}function we(t){var e,n;return t<100&&t>=0?((n=Array.prototype.slice.call(arguments))[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function ve(t,e,n){var o=7+e-n;return-(7+we(t,0,o).getUTCDay()-e)%7+o-1}function ye(t,e,n,o,i){var r,s,a=1+7*(e-1)+(7+n-o)%7+ve(t,o,i);return a<=0?s=Ut(r=t-1)+a:a>Ut(t)?(r=t+1,s=a-Ut(t)):(r=t,s=a),{year:r,dayOfYear:s}}function Ce(t,e,n){var o,i,r=ve(t.year(),e,n),s=Math.floor((t.dayOfYear()-r-1)/7)+1;return s<1?o=s+Se(i=t.year()-1,e,n):s>Se(t.year(),e,n)?(o=s-Se(t.year(),e,n),i=t.year()+1):(i=t.year(),o=s),{week:o,year:i}}function Se(t,e,n){var o=ve(t,e,n),i=ve(t+1,e,n);return(Ut(t)-o+i)/7}function Re(t){return Ce(t,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),xt("w",dt,Rt),xt("ww",dt,at),xt("W",dt,Rt),xt("WW",dt,at),Pt(["w","ww","W","WW"],function(t,e,n,o){e[o.substr(0,1)]=Ht(t)});var ke={dow:0,doy:6};function xe(){return this._week.dow}function Ee(){return this._week.doy}function Me(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function Te(t){var e=Ce(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function _e(t,e){return"string"!=typeof t?t:isNaN(t)?"number"==typeof(t=e.weekdaysParse(t))?t:null:parseInt(t,10)}function He(t,e){return"string"==typeof t?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Ie(t,e){return t.slice(e,7).concat(t.slice(0,e))}B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),xt("d",dt),xt("e",dt),xt("E",dt),xt("dd",function(t,e){return e.weekdaysMinRegex(t)}),xt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),xt("dddd",function(t,e){return e.weekdaysRegex(t)}),Pt(["dd","ddd","dddd"],function(t,e,n,o){var i=n._locale.weekdaysParse(t,o,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t}),Pt(["d","e","E"],function(t,e,n,o){e[o]=Ht(t)});var Ae="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Pe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Oe="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ne=St,De=St,Le=St;function Ve(t,e){var n=i(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ie(n,this._week.dow):t?n[t.day()]:n}function Be(t){return!0===t?Ie(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Fe(t){return!0===t?Ie(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function We(t,e,n){var o,i,r,s=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)r=g([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(r,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Yt.call(this._weekdaysParse,s))?i:null:"ddd"===e?-1!==(i=Yt.call(this._shortWeekdaysParse,s))?i:null:-1!==(i=Yt.call(this._minWeekdaysParse,s))?i:null:"dddd"===e?-1!==(i=Yt.call(this._weekdaysParse,s))||-1!==(i=Yt.call(this._shortWeekdaysParse,s))||-1!==(i=Yt.call(this._minWeekdaysParse,s))?i:null:"ddd"===e?-1!==(i=Yt.call(this._shortWeekdaysParse,s))||-1!==(i=Yt.call(this._weekdaysParse,s))||-1!==(i=Yt.call(this._minWeekdaysParse,s))?i:null:-1!==(i=Yt.call(this._minWeekdaysParse,s))||-1!==(i=Yt.call(this._weekdaysParse,s))||-1!==(i=Yt.call(this._shortWeekdaysParse,s))?i:null}function ze(t,e,n){var o,i,r;if(this._weekdaysParseExact)return We.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),o=0;o<7;o++){if(i=g([2e3,1]).day(o),n&&!this._fullWeekdaysParse[o]&&(this._fullWeekdaysParse[o]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[o]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[o]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[o]||(r="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(r.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[o].test(t))return o;if(n&&"ddd"===e&&this._shortWeekdaysParse[o].test(t))return o;if(n&&"dd"===e&&this._minWeekdaysParse[o].test(t))return o;if(!n&&this._weekdaysParse[o].test(t))return o}}function je(t){if(!this.isValid())return null!=t?this:NaN;var e=Xt(this,"Day");return null!=t?(t=_e(t,this.localeData()),this.add(t-e,"d")):e}function $e(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Ue(t){if(!this.isValid())return null!=t?this:NaN;if(null!=t){var e=He(t,this.localeData());return this.day(this.day()%7?e:e-7)}return this.day()||7}function Ye(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qe.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=Ne),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ge(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qe.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=De),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Ke(t){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||qe.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Le),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function qe(){function t(t,e){return e.length-t.length}var e,n,o,i,r,s=[],a=[],l=[],h=[];for(e=0;e<7;e++)n=g([2e3,1]).day(e),o=Tt(this.weekdaysMin(n,"")),i=Tt(this.weekdaysShort(n,"")),r=Tt(this.weekdays(n,"")),s.push(o),a.push(i),l.push(r),h.push(o),h.push(i),h.push(r);s.sort(t),a.sort(t),l.sort(t),h.sort(t),this._weekdaysRegex=new RegExp("^("+h.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+s.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ze(){return this.hours()||24}function Je(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qe(t,e){return e._meridiemParse}function tn(t){return"p"===(t+"").toLowerCase().charAt(0)}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Xe),B("k",["kk",2],0,Ze),B("hmm",0,0,function(){return""+Xe.apply(this)+O(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Xe.apply(this)+O(this.minutes(),2)+O(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+O(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+O(this.minutes(),2)+O(this.seconds(),2)}),Je("a",!0),Je("A",!1),xt("a",Qe),xt("A",Qe),xt("H",dt,kt),xt("h",dt,Rt),xt("k",dt,Rt),xt("HH",dt,at),xt("hh",dt,at),xt("kk",dt,at),xt("hmm",ut),xt("hmmss",gt),xt("Hmm",ut),xt("Hmmss",gt),At(["H","HH"],Bt),At(["k","kk"],function(t,e,n){var o=Ht(t);e[Bt]=24===o?0:o}),At(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),At(["h","hh"],function(t,e,n){e[Bt]=Ht(t),p(n).bigHour=!0}),At("hmm",function(t,e,n){var o=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Ft]=Ht(t.substr(o)),p(n).bigHour=!0}),At("hmmss",function(t,e,n){var o=t.length-4,i=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Ft]=Ht(t.substr(o,2)),e[Wt]=Ht(t.substr(i)),p(n).bigHour=!0}),At("Hmm",function(t,e,n){var o=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Ft]=Ht(t.substr(o))}),At("Hmmss",function(t,e,n){var o=t.length-4,i=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Ft]=Ht(t.substr(o,2)),e[Wt]=Ht(t.substr(i))});var en=/[ap]\.?m?\.?/i,nn=qt("Hours",!0);function on(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var rn,sn={calendar:A,longDateFormat:$,invalidDate:Y,ordinal:K,dayOfMonthOrdinalParse:q,relativeTime:Z,months:ne,monthsShort:oe,week:ke,weekdays:Ae,weekdaysMin:Oe,weekdaysShort:Pe,meridiemParse:en},an={},ln={};function hn(t,e){var n,o=Math.min(t.length,e.length);for(n=0;n<o;n+=1)if(t[n]!==e[n])return n;return o}function cn(t){return t?t.toLowerCase().replace("_","-"):t}function dn(t){for(var e,n,o,i,r=0;r<t.length;){for(e=(i=cn(t[r]).split("-")).length,n=(n=cn(t[r+1]))?n.split("-"):null;e>0;){if(o=gn(i.slice(0,e).join("-")))return o;if(n&&n.length>=e&&hn(i,n)>=e-1)break;e--}r++}return rn}function un(t){return!(!t||!t.match("^[^/\\\\]*$"))}function gn(t){var e=null;if(void 0===an[t]&&Jm&&Jm.exports&&un(t))try{e=rn._abbr,qm("./locale/"+t),fn(e)}catch(e){an[t]=null}return an[t]}function fn(t,e){var n;return t&&((n=l(e)?bn(t):pn(t,e))?rn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),rn._abbr}function pn(t,e){if(null!==e){var n,o=sn;if(e.abbr=t,null!=an[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),o=an[t]._config;else if(null!=e.parentLocale)if(null!=an[e.parentLocale])o=an[e.parentLocale]._config;else{if(null==(n=gn(e.parentLocale)))return ln[e.parentLocale]||(ln[e.parentLocale]=[]),ln[e.parentLocale].push({name:t,config:e}),null;o=n._config}return an[t]=new I(H(o,e)),ln[t]&&ln[t].forEach(function(t){pn(t.name,t.config)}),fn(t),an[t]}return delete an[t],null}function mn(t,e){if(null!=e){var n,o,i=sn;null!=an[t]&&null!=an[t].parentLocale?an[t].set(H(an[t]._config,e)):(null!=(o=gn(t))&&(i=o._config),e=H(i,e),null==o&&(e.abbr=t),(n=new I(e)).parentLocale=an[t],an[t]=n),fn(t)}else null!=an[t]&&(null!=an[t].parentLocale?(an[t]=an[t].parentLocale,t===fn()&&fn(t)):null!=an[t]&&delete an[t]);return an[t]}function bn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return rn;if(!i(t)){if(e=gn(t))return e;t=[t]}return dn(t)}function wn(){return x(an)}function vn(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[Lt]<0||n[Lt]>11?Lt:n[Vt]<1||n[Vt]>ee(n[Dt],n[Lt])?Vt:n[Bt]<0||n[Bt]>24||24===n[Bt]&&(0!==n[Ft]||0!==n[Wt]||0!==n[zt])?Bt:n[Ft]<0||n[Ft]>59?Ft:n[Wt]<0||n[Wt]>59?Wt:n[zt]<0||n[zt]>999?zt:-1,p(t)._overflowDayOfYear&&(e<Dt||e>Vt)&&(e=Vt),p(t)._overflowWeeks&&-1===e&&(e=jt),p(t)._overflowWeekday&&-1===e&&(e=$t),p(t).overflow=e),t}var yn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,Rn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],kn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],xn=/^\/?Date\((-?\d+)/i,En=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Mn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Tn(t){var e,n,o,i,r,s,a=t._i,l=yn.exec(a)||Cn.exec(a),h=Rn.length,c=kn.length;if(l){for(p(t).iso=!0,e=0,n=h;e<n;e++)if(Rn[e][1].exec(l[1])){i=Rn[e][0],o=!1!==Rn[e][2];break}if(null==i)return void(t._isValid=!1);if(l[3]){for(e=0,n=c;e<n;e++)if(kn[e][1].exec(l[3])){r=(l[2]||" ")+kn[e][0];break}if(null==r)return void(t._isValid=!1)}if(!o&&null!=r)return void(t._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(t._isValid=!1);s="Z"}t._f=i+(r||"")+(s||""),Fn(t)}else t._isValid=!1}function _n(t,e,n,o,i,r){var s=[Hn(t),oe.indexOf(e),parseInt(n,10),parseInt(o,10),parseInt(i,10)];return r&&s.push(parseInt(r,10)),s}function Hn(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function In(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function An(t,e,n){return!t||Pe.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(p(n).weekdayMismatch=!0,n._isValid=!1,!1)}function Pn(t,e,n){if(t)return Mn[t];if(e)return 0;var o=parseInt(n,10),i=o%100;return(o-i)/100*60+i}function On(t){var e,n=En.exec(In(t._i));if(n){if(e=_n(n[4],n[3],n[2],n[5],n[6],n[7]),!An(n[1],e,t))return;t._a=e,t._tzm=Pn(n[8],n[9],n[10]),t._d=we.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function Nn(t){var e=xn.exec(t._i);null===e?(Tn(t),!1===t._isValid&&(delete t._isValid,On(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:n.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Dn(t,e,n){return null!=t?t:null!=e?e:n}function Ln(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Vn(t){var e,n,o,i,r,s=[];if(!t._d){for(o=Ln(t),t._w&&null==t._a[Vt]&&null==t._a[Lt]&&Bn(t),null!=t._dayOfYear&&(r=Dn(t._a[Dt],o[Dt]),(t._dayOfYear>Ut(r)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=we(r,0,t._dayOfYear),t._a[Lt]=n.getUTCMonth(),t._a[Vt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=o[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Bt]&&0===t._a[Ft]&&0===t._a[Wt]&&0===t._a[zt]&&(t._nextDay=!0,t._a[Bt]=0),t._d=(t._useUTC?we:be).apply(null,s),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Bt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(p(t).weekdayMismatch=!0)}}function Bn(t){var e,n,o,i,r,s,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(r=1,s=4,n=Dn(e.GG,t._a[Dt],Ce(Kn(),1,4).year),o=Dn(e.W,1),((i=Dn(e.E,1))<1||i>7)&&(l=!0)):(r=t._locale._week.dow,s=t._locale._week.doy,h=Ce(Kn(),r,s),n=Dn(e.gg,t._a[Dt],h.year),o=Dn(e.w,h.week),null!=e.d?((i=e.d)<0||i>6)&&(l=!0):null!=e.e?(i=e.e+r,(e.e<0||e.e>6)&&(l=!0)):i=r),o<1||o>Se(n,r,s)?p(t)._overflowWeeks=!0:null!=l?p(t)._overflowWeekday=!0:(a=ye(n,o,i,r,s),t._a[Dt]=a.year,t._dayOfYear=a.dayOfYear)}function Fn(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],p(t).empty=!0;var e,o,i,r,s,a,l,h=""+t._i,c=h.length,d=0;for(l=(i=j(t._f,t._locale).match(N)||[]).length,e=0;e<l;e++)r=i[e],(o=(h.match(Et(r,t))||[])[0])&&((s=h.substr(0,h.indexOf(o))).length>0&&p(t).unusedInput.push(s),h=h.slice(h.indexOf(o)+o.length),d+=o.length),V[r]?(o?p(t).empty=!1:p(t).unusedTokens.push(r),Ot(r,o,t)):t._strict&&!o&&p(t).unusedTokens.push(r);p(t).charsLeftOver=c-d,h.length>0&&p(t).unusedInput.push(h),t._a[Bt]<=12&&!0===p(t).bigHour&&t._a[Bt]>0&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[Bt]=Wn(t._locale,t._a[Bt],t._meridiem),null!==(a=p(t).era)&&(t._a[Dt]=t._locale.erasConvertYear(a,t._a[Dt])),Vn(t),vn(t)}else On(t);else Tn(t)}function Wn(t,e,n){var o;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?((o=t.isPM(n))&&e<12&&(e+=12),o||12!==e||(e=0),e):e}function zn(t){var e,n,o,i,r,s,a=!1,l=t._f.length;if(0===l)return p(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<l;i++)r=0,s=!1,e=y({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Fn(e),m(e)&&(s=!0),r+=p(e).charsLeftOver,r+=10*p(e).unusedTokens.length,p(e).score=r,a?r<o&&(o=r,n=e):(null==o||r<o||s)&&(o=r,n=e,s&&(a=!0));u(t,n||e)}function jn(t){if(!t._d){var e=nt(t._i),n=void 0===e.day?e.date:e.day;t._a=d([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(t){return t&&parseInt(t,10)}),Vn(t)}}function $n(t){var e=new C(vn(Un(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Un(t){var e=t._i,n=t._f;return t._locale=t._locale||bn(t._l),null===e||void 0===n&&""===e?b({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),S(e)?new C(vn(e)):(c(e)?t._d=e:i(n)?zn(t):n?Fn(t):Yn(t),m(t)||(t._d=null),t))}function Yn(t){var e=t._i;l(e)?t._d=new Date(n.now()):c(e)?t._d=new Date(e.valueOf()):"string"==typeof e?Nn(t):i(e)?(t._a=d(e.slice(0),function(t){return parseInt(t,10)}),Vn(t)):r(e)?jn(t):h(e)?t._d=new Date(e):n.createFromInputFallback(t)}function Gn(t,e,n,o,s){var l={};return!0!==e&&!1!==e||(o=e,e=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(r(t)&&a(t)||i(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=s,l._l=n,l._i=t,l._f=e,l._strict=o,$n(l)}function Kn(t,e,n,o){return Gn(t,e,n,o,!1)}n.createFromInputFallback=k("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){};var qn=k("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Kn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:b()}),Xn=k("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Kn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:b()});function Zn(t,e){var n,o;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return Kn();for(n=e[0],o=1;o<e.length;++o)e[o].isValid()&&!e[o][t](n)||(n=e[o]);return n}function Jn(){return Zn("isBefore",[].slice.call(arguments,0))}function Qn(){return Zn("isAfter",[].slice.call(arguments,0))}var to=function(){return Date.now?Date.now():+new Date},eo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function no(t){var e,n,o=!1,i=eo.length;for(e in t)if(s(t,e)&&(-1===Yt.call(eo,e)||null!=t[e]&&isNaN(t[e])))return!1;for(n=0;n<i;++n)if(t[eo[n]]){if(o)return!1;parseFloat(t[eo[n]])!==Ht(t[eo[n]])&&(o=!0)}return!0}function oo(){return this._isValid}function io(){return To(NaN)}function ro(t){var e=nt(t),n=e.year||0,o=e.quarter||0,i=e.month||0,r=e.week||e.isoWeek||0,s=e.day||0,a=e.hour||0,l=e.minute||0,h=e.second||0,c=e.millisecond||0;this._isValid=no(e),this._milliseconds=+c+1e3*h+6e4*l+1e3*a*60*60,this._days=+s+7*r,this._months=+i+3*o+12*n,this._data={},this._locale=bn(),this._bubble()}function so(t){return t instanceof ro}function ao(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function lo(t,e,n){var o,i=Math.min(t.length,e.length),r=Math.abs(t.length-e.length),s=0;for(o=0;o<i;o++)Ht(t[o])!==Ht(e[o])&&s++;return s+r}function ho(t,e){B(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+O(~~(t/60),2)+e+O(~~t%60,2)})}ho("Z",":"),ho("ZZ",""),xt("Z",yt),xt("ZZ",yt),At(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=uo(yt,t)});var co=/([\+\-]|\d\d)/gi;function uo(t,e){var n,o,i=(e||"").match(t);return null===i?null:0===(o=60*(n=((i[i.length-1]||[])+"").match(co)||["-",0,0])[1]+Ht(n[2]))?0:"+"===n[0]?o:-o}function go(t,e){var o,i;return e._isUTC?(o=e.clone(),i=(S(t)||c(t)?t.valueOf():Kn(t).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+i),n.updateOffset(o,!1),o):Kn(t).local()}function fo(t){return-Math.round(t._d.getTimezoneOffset())}function po(t,e,o){var i,r=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=uo(yt,t)))return this}else Math.abs(t)<16&&!o&&(t*=60);return!this._isUTC&&e&&(i=fo(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?Po(this,To(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?r:fo(this)}function mo(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function bo(t){return this.utcOffset(0,t)}function wo(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(fo(this),"m")),this}function vo(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=uo(vt,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function yo(t){return!!this.isValid()&&(t=t?Kn(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function Co(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function So(){if(!l(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=Un(e))._a?(t=e._isUTC?g(e._a):Kn(e._a),this._isDSTShifted=this.isValid()&&lo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Ro(){return!!this.isValid()&&!this._isUTC}function ko(){return!!this.isValid()&&this._isUTC}function xo(){return!!this.isValid()&&this._isUTC&&0===this._offset}n.updateOffset=function(){};var Eo=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Mo=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function To(t,e){var n,o,i,r=t,a=null;return so(t)?r={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(r={},e?r[e]=+t:r.milliseconds=+t):(a=Eo.exec(t))?(n="-"===a[1]?-1:1,r={y:0,d:Ht(a[Vt])*n,h:Ht(a[Bt])*n,m:Ht(a[Ft])*n,s:Ht(a[Wt])*n,ms:Ht(ao(1e3*a[zt]))*n}):(a=Mo.exec(t))?(n="-"===a[1]?-1:1,r={y:_o(a[2],n),M:_o(a[3],n),w:_o(a[4],n),d:_o(a[5],n),h:_o(a[6],n),m:_o(a[7],n),s:_o(a[8],n)}):null==r?r={}:"object"==typeof r&&("from"in r||"to"in r)&&(i=Io(Kn(r.from),Kn(r.to)),(r={}).ms=i.milliseconds,r.M=i.months),o=new ro(r),so(t)&&s(t,"_locale")&&(o._locale=t._locale),so(t)&&s(t,"_isValid")&&(o._isValid=t._isValid),o}function _o(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Ho(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Io(t,e){var n;return t.isValid()&&e.isValid()?(e=go(e,t),t.isBefore(e)?n=Ho(t,e):((n=Ho(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Ao(t,e){return function(n,o){var i;return null===o||isNaN(+o)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=o,o=i),Po(this,To(n,o),t),this}}function Po(t,e,o,i){var r=e._milliseconds,s=ao(e._days),a=ao(e._months);t.isValid()&&(i=null==i||i,a&&de(t,Xt(t,"Month")+a*o),s&&Zt(t,"Date",Xt(t,"Date")+s*o),r&&t._d.setTime(t._d.valueOf()+r*o),i&&n.updateOffset(t,s||a))}To.fn=ro.prototype,To.invalid=io;var Oo=Ao(1,"add"),No=Ao(-1,"subtract");function Do(t){return"string"==typeof t||t instanceof String}function Lo(t){return S(t)||c(t)||Do(t)||h(t)||Bo(t)||Vo(t)||null==t}function Vo(t){var e,n,o=r(t)&&!a(t),i=!1,l=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],h=l.length;for(e=0;e<h;e+=1)n=l[e],i=i||s(t,n);return o&&i}function Bo(t){var e=i(t),n=!1;return e&&(n=0===t.filter(function(e){return!h(e)&&Do(t)}).length),e&&n}function Fo(t){var e,n,o=r(t)&&!a(t),i=!1,l=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(e=0;e<l.length;e+=1)n=l[e],i=i||s(t,n);return o&&i}function Wo(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function zo(t,e){1===arguments.length&&(arguments[0]?Lo(arguments[0])?(t=arguments[0],e=void 0):Fo(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var o=t||Kn(),i=go(o,this).startOf("day"),r=n.calendarFormat(this,i)||"sameElse",s=e&&(T(e[r])?e[r].call(this,o):e[r]);return this.format(s||this.localeData().calendar(r,this,Kn(o)))}function jo(){return new C(this)}function $o(t,e){var n=S(t)?t:Kn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function Uo(t,e){var n=S(t)?t:Kn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())}function Yo(t,e,n,o){var i=S(t)?t:Kn(t),r=S(e)?e:Kn(e);return!!(this.isValid()&&i.isValid()&&r.isValid())&&("("===(o=o||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===o[1]?this.isBefore(r,n):!this.isAfter(r,n))}function Go(t,e){var n,o=S(t)?t:Kn(t);return!(!this.isValid()||!o.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()===o.valueOf():(n=o.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))}function Ko(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function qo(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Xo(t,e,n){var o,i,r;if(!this.isValid())return NaN;if(!(o=go(t,this)).isValid())return NaN;switch(i=6e4*(o.utcOffset()-this.utcOffset()),e=et(e)){case"year":r=Zo(this,o)/12;break;case"month":r=Zo(this,o);break;case"quarter":r=Zo(this,o)/3;break;case"second":r=(this-o)/1e3;break;case"minute":r=(this-o)/6e4;break;case"hour":r=(this-o)/36e5;break;case"day":r=(this-o-i)/864e5;break;case"week":r=(this-o-i)/6048e5;break;default:r=this-o}return n?r:_t(r)}function Zo(t,e){if(t.date()<e.date())return-Zo(e,t);var n=12*(e.year()-t.year())+(e.month()-t.month()),o=t.clone().add(n,"months");return-(n+(e-o<0?(e-o)/(o-t.clone().add(n-1,"months")):(e-o)/(t.clone().add(n+1,"months")-o)))||0}function Jo(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Qo(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):T(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ti(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t,e,n,o,i="moment",r="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",r="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",o=r+'[")]',this.format(t+e+n+o)}function ei(t){t||(t=this.isUtc()?n.defaultFormatUtc:n.defaultFormat);var e=z(this,t);return this.localeData().postformat(e)}function ni(t,e){return this.isValid()&&(S(t)&&t.isValid()||Kn(t).isValid())?To({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function oi(t){return this.from(Kn(),t)}function ii(t,e){return this.isValid()&&(S(t)&&t.isValid()||Kn(t).isValid())?To({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function ri(t){return this.to(Kn(),t)}function si(t){var e;return void 0===t?this._locale._abbr:(null!=(e=bn(t))&&(this._locale=e),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ai=k("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});function li(){return this._locale}var hi=1e3,ci=60*hi,di=60*ci,ui=3506328*di;function gi(t,e){return(t%e+e)%e}function fi(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-ui:new Date(t,e,n).valueOf()}function pi(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-ui:Date.UTC(t,e,n)}function mi(t){var e,o;if(void 0===(t=et(t))||"millisecond"===t||!this.isValid())return this;switch(o=this._isUTC?pi:fi,t){case"year":e=o(this.year(),0,1);break;case"quarter":e=o(this.year(),this.month()-this.month()%3,1);break;case"month":e=o(this.year(),this.month(),1);break;case"week":e=o(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=o(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=gi(e+(this._isUTC?0:this.utcOffset()*ci),di);break;case"minute":e=this._d.valueOf(),e-=gi(e,ci);break;case"second":e=this._d.valueOf(),e-=gi(e,hi)}return this._d.setTime(e),n.updateOffset(this,!0),this}function bi(t){var e,o;if(void 0===(t=et(t))||"millisecond"===t||!this.isValid())return this;switch(o=this._isUTC?pi:fi,t){case"year":e=o(this.year()+1,0,1)-1;break;case"quarter":e=o(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=o(this.year(),this.month()+1,1)-1;break;case"week":e=o(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=o(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=o(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=di-gi(e+(this._isUTC?0:this.utcOffset()*ci),di)-1;break;case"minute":e=this._d.valueOf(),e+=ci-gi(e,ci)-1;break;case"second":e=this._d.valueOf(),e+=hi-gi(e,hi)-1}return this._d.setTime(e),n.updateOffset(this,!0),this}function wi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function yi(){return new Date(this.valueOf())}function Ci(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Si(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Ri(){return this.isValid()?this.toISOString():null}function ki(){return m(this)}function xi(){return u({},p(this))}function Ei(){return p(this).overflow}function Mi(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ti(t,e){var o,i,r,s=this._eras||bn("en")._eras;for(o=0,i=s.length;o<i;++o)switch("string"==typeof s[o].since&&(r=n(s[o].since).startOf("day"),s[o].since=r.valueOf()),typeof s[o].until){case"undefined":s[o].until=1/0;break;case"string":r=n(s[o].until).startOf("day").valueOf(),s[o].until=r.valueOf()}return s}function _i(t,e,n){var o,i,r,s,a,l=this.eras();for(t=t.toUpperCase(),o=0,i=l.length;o<i;++o)if(r=l[o].name.toUpperCase(),s=l[o].abbr.toUpperCase(),a=l[o].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return l[o];break;case"NNNN":if(r===t)return l[o];break;case"NNNNN":if(a===t)return l[o]}else if([r,s,a].indexOf(t)>=0)return l[o]}function Hi(t,e){var o=t.since<=t.until?1:-1;return void 0===e?n(t.since).year():n(t.since).year()+(e-t.offset)*o}function Ii(){var t,e,n,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),o[t].since<=n&&n<=o[t].until)return o[t].name;if(o[t].until<=n&&n<=o[t].since)return o[t].name}return""}function Ai(){var t,e,n,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),o[t].since<=n&&n<=o[t].until)return o[t].narrow;if(o[t].until<=n&&n<=o[t].since)return o[t].narrow}return""}function Pi(){var t,e,n,o=this.localeData().eras();for(t=0,e=o.length;t<e;++t){if(n=this.clone().startOf("day").valueOf(),o[t].since<=n&&n<=o[t].until)return o[t].abbr;if(o[t].until<=n&&n<=o[t].since)return o[t].abbr}return""}function Oi(){var t,e,o,i,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(o=r[t].since<=r[t].until?1:-1,i=this.clone().startOf("day").valueOf(),r[t].since<=i&&i<=r[t].until||r[t].until<=i&&i<=r[t].since)return(this.year()-n(r[t].since).year())*o+r[t].offset;return this.year()}function Ni(t){return s(this,"_erasNameRegex")||zi.call(this),t?this._erasNameRegex:this._erasRegex}function Di(t){return s(this,"_erasAbbrRegex")||zi.call(this),t?this._erasAbbrRegex:this._erasRegex}function Li(t){return s(this,"_erasNarrowRegex")||zi.call(this),t?this._erasNarrowRegex:this._erasRegex}function Vi(t,e){return e.erasAbbrRegex(t)}function Bi(t,e){return e.erasNameRegex(t)}function Fi(t,e){return e.erasNarrowRegex(t)}function Wi(t,e){return e._eraYearOrdinalRegex||bt}function zi(){var t,e,n,o,i,r=[],s=[],a=[],l=[],h=this.eras();for(t=0,e=h.length;t<e;++t)n=Tt(h[t].name),o=Tt(h[t].abbr),i=Tt(h[t].narrow),s.push(n),r.push(o),a.push(i),l.push(n),l.push(o),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function ji(t,e){B(0,[t,t.length],0,e)}function $i(t){return Xi.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ui(t){return Xi.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Yi(){return Se(this.year(),1,4)}function Gi(){return Se(this.isoWeekYear(),1,4)}function Ki(){var t=this.localeData()._week;return Se(this.year(),t.dow,t.doy)}function qi(){var t=this.localeData()._week;return Se(this.weekYear(),t.dow,t.doy)}function Xi(t,e,n,o,i){var r;return null==t?Ce(this,o,i).year:(e>(r=Se(t,o,i))&&(e=r),Zi.call(this,t,e,n,o,i))}function Zi(t,e,n,o,i){var r=ye(t,e,n,o,i),s=we(r.year,0,r.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}function Ji(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}B("N",0,0,"eraAbbr"),B("NN",0,0,"eraAbbr"),B("NNN",0,0,"eraAbbr"),B("NNNN",0,0,"eraName"),B("NNNNN",0,0,"eraNarrow"),B("y",["y",1],"yo","eraYear"),B("y",["yy",2],0,"eraYear"),B("y",["yyy",3],0,"eraYear"),B("y",["yyyy",4],0,"eraYear"),xt("N",Vi),xt("NN",Vi),xt("NNN",Vi),xt("NNNN",Bi),xt("NNNNN",Fi),At(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,o){var i=n._locale.erasParse(t,o,n._strict);i?p(n).era=i:p(n).invalidEra=t}),xt("y",bt),xt("yy",bt),xt("yyy",bt),xt("yyyy",bt),xt("yo",Wi),At(["y","yy","yyy","yyyy"],Dt),At(["yo"],function(t,e,n,o){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Dt]=n._locale.eraYearOrdinalParse(t,i):e[Dt]=parseInt(t,10)}),B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ji("gggg","weekYear"),ji("ggggg","weekYear"),ji("GGGG","isoWeekYear"),ji("GGGGG","isoWeekYear"),xt("G",wt),xt("g",wt),xt("GG",dt,at),xt("gg",dt,at),xt("GGGG",pt,ht),xt("gggg",pt,ht),xt("GGGGG",mt,ct),xt("ggggg",mt,ct),Pt(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,o){e[o.substr(0,2)]=Ht(t)}),Pt(["gg","GG"],function(t,e,o,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,"Qo","quarter"),xt("Q",st),At("Q",function(t,e){e[Lt]=3*(Ht(t)-1)}),B("D",["DD",2],"Do","date"),xt("D",dt,Rt),xt("DD",dt,at),xt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),At(["D","DD"],Vt),At("Do",function(t,e){e[Vt]=Ht(t.match(dt)[0])});var Qi=qt("Date",!0);function tr(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}B("DDD",["DDDD",3],"DDDo","dayOfYear"),xt("DDD",ft),xt("DDDD",lt),At(["DDD","DDDD"],function(t,e,n){n._dayOfYear=Ht(t)}),B("m",["mm",2],0,"minute"),xt("m",dt,kt),xt("mm",dt,at),At(["m","mm"],Ft);var er=qt("Minutes",!1);B("s",["ss",2],0,"second"),xt("s",dt,kt),xt("ss",dt,at),At(["s","ss"],Wt);var nr,or,ir=qt("Seconds",!1);for(B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),B(0,["SSS",3],0,"millisecond"),B(0,["SSSS",4],0,function(){return 10*this.millisecond()}),B(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),B(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),B(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),B(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),B(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),xt("S",ft,st),xt("SS",ft,at),xt("SSS",ft,lt),nr="SSSS";nr.length<=9;nr+="S")xt(nr,bt);function rr(t,e){e[zt]=Ht(1e3*("0."+t))}for(nr="S";nr.length<=9;nr+="S")At(nr,rr);function sr(){return this._isUTC?"UTC":""}function ar(){return this._isUTC?"Coordinated Universal Time":""}or=qt("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var lr=C.prototype;function hr(t){return Kn(1e3*t)}function cr(){return Kn.apply(null,arguments).parseZone()}function dr(t){return t}lr.add=Oo,lr.calendar=zo,lr.clone=jo,lr.diff=Xo,lr.endOf=bi,lr.format=ei,lr.from=ni,lr.fromNow=oi,lr.to=ii,lr.toNow=ri,lr.get=Jt,lr.invalidAt=Ei,lr.isAfter=$o,lr.isBefore=Uo,lr.isBetween=Yo,lr.isSame=Go,lr.isSameOrAfter=Ko,lr.isSameOrBefore=qo,lr.isValid=ki,lr.lang=ai,lr.locale=si,lr.localeData=li,lr.max=Xn,lr.min=qn,lr.parsingFlags=xi,lr.set=Qt,lr.startOf=mi,lr.subtract=No,lr.toArray=Ci,lr.toObject=Si,lr.toDate=yi,lr.toISOString=Qo,lr.inspect=ti,"undefined"!=typeof Symbol&&null!=Symbol.for&&(lr[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),lr.toJSON=Ri,lr.toString=Jo,lr.unix=vi,lr.valueOf=wi,lr.creationData=Mi,lr.eraName=Ii,lr.eraNarrow=Ai,lr.eraAbbr=Pi,lr.eraYear=Oi,lr.year=Gt,lr.isLeapYear=Kt,lr.weekYear=$i,lr.isoWeekYear=Ui,lr.quarter=lr.quarters=Ji,lr.month=ue,lr.daysInMonth=ge,lr.week=lr.weeks=Me,lr.isoWeek=lr.isoWeeks=Te,lr.weeksInYear=Ki,lr.weeksInWeekYear=qi,lr.isoWeeksInYear=Yi,lr.isoWeeksInISOWeekYear=Gi,lr.date=Qi,lr.day=lr.days=je,lr.weekday=$e,lr.isoWeekday=Ue,lr.dayOfYear=tr,lr.hour=lr.hours=nn,lr.minute=lr.minutes=er,lr.second=lr.seconds=ir,lr.millisecond=lr.milliseconds=or,lr.utcOffset=po,lr.utc=bo,lr.local=wo,lr.parseZone=vo,lr.hasAlignedHourOffset=yo,lr.isDST=Co,lr.isLocal=Ro,lr.isUtcOffset=ko,lr.isUtc=xo,lr.isUTC=xo,lr.zoneAbbr=sr,lr.zoneName=ar,lr.dates=k("dates accessor is deprecated. Use date instead.",Qi),lr.months=k("months accessor is deprecated. Use month instead",ue),lr.years=k("years accessor is deprecated. Use year instead",Gt),lr.zone=k("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mo),lr.isDSTShifted=k("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",So);var ur=I.prototype;function gr(t,e,n,o){var i=bn(),r=g().set(o,e);return i[n](r,t)}function fr(t,e,n){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return gr(t,e,n,"month");var o,i=[];for(o=0;o<12;o++)i[o]=gr(t,o,n,"month");return i}function pr(t,e,n,o){"boolean"==typeof t?(h(e)&&(n=e,e=void 0),e=e||""):(n=e=t,t=!1,h(e)&&(n=e,e=void 0),e=e||"");var i,r=bn(),s=t?r._week.dow:0,a=[];if(null!=n)return gr(e,(n+s)%7,o,"day");for(i=0;i<7;i++)a[i]=gr(e,(i+s)%7,o,"day");return a}function mr(t,e){return fr(t,e,"months")}function br(t,e){return fr(t,e,"monthsShort")}function wr(t,e,n){return pr(t,e,n,"weekdays")}function vr(t,e,n){return pr(t,e,n,"weekdaysShort")}function yr(t,e,n){return pr(t,e,n,"weekdaysMin")}ur.calendar=P,ur.longDateFormat=U,ur.invalidDate=G,ur.ordinal=X,ur.preparse=dr,ur.postformat=dr,ur.relativeTime=J,ur.pastFuture=Q,ur.set=_,ur.eras=Ti,ur.erasParse=_i,ur.erasConvertYear=Hi,ur.erasAbbrRegex=Di,ur.erasNameRegex=Ni,ur.erasNarrowRegex=Li,ur.months=ae,ur.monthsShort=le,ur.monthsParse=ce,ur.monthsRegex=pe,ur.monthsShortRegex=fe,ur.week=Re,ur.firstDayOfYear=Ee,ur.firstDayOfWeek=xe,ur.weekdays=Ve,ur.weekdaysMin=Fe,ur.weekdaysShort=Be,ur.weekdaysParse=ze,ur.weekdaysRegex=Ye,ur.weekdaysShortRegex=Ge,ur.weekdaysMinRegex=Ke,ur.isPM=tn,ur.meridiem=on,fn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===Ht(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),n.lang=k("moment.lang is deprecated. Use moment.locale instead.",fn),n.langData=k("moment.langData is deprecated. Use moment.localeData instead.",bn);var Cr=Math.abs;function Sr(){var t=this._data;return this._milliseconds=Cr(this._milliseconds),this._days=Cr(this._days),this._months=Cr(this._months),t.milliseconds=Cr(t.milliseconds),t.seconds=Cr(t.seconds),t.minutes=Cr(t.minutes),t.hours=Cr(t.hours),t.months=Cr(t.months),t.years=Cr(t.years),this}function Rr(t,e,n,o){var i=To(e,n);return t._milliseconds+=o*i._milliseconds,t._days+=o*i._days,t._months+=o*i._months,t._bubble()}function kr(t,e){return Rr(this,t,e,1)}function xr(t,e){return Rr(this,t,e,-1)}function Er(t){return t<0?Math.floor(t):Math.ceil(t)}function Mr(){var t,e,n,o,i,r=this._milliseconds,s=this._days,a=this._months,l=this._data;return r>=0&&s>=0&&a>=0||r<=0&&s<=0&&a<=0||(r+=864e5*Er(_r(a)+s),s=0,a=0),l.milliseconds=r%1e3,t=_t(r/1e3),l.seconds=t%60,e=_t(t/60),l.minutes=e%60,n=_t(e/60),l.hours=n%24,s+=_t(n/24),a+=i=_t(Tr(s)),s-=Er(_r(i)),o=_t(a/12),a%=12,l.days=s,l.months=a,l.years=o,this}function Tr(t){return 4800*t/146097}function _r(t){return 146097*t/4800}function Hr(t){if(!this.isValid())return NaN;var e,n,o=this._milliseconds;if("month"===(t=et(t))||"quarter"===t||"year"===t)switch(e=this._days+o/864e5,n=this._months+Tr(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(_r(this._months)),t){case"week":return e/7+o/6048e5;case"day":return e+o/864e5;case"hour":return 24*e+o/36e5;case"minute":return 1440*e+o/6e4;case"second":return 86400*e+o/1e3;case"millisecond":return Math.floor(864e5*e)+o;default:throw new Error("Unknown unit "+t)}}function Ir(t){return function(){return this.as(t)}}var Ar=Ir("ms"),Pr=Ir("s"),Or=Ir("m"),Nr=Ir("h"),Dr=Ir("d"),Lr=Ir("w"),Vr=Ir("M"),Br=Ir("Q"),Fr=Ir("y"),Wr=Ar;function zr(){return To(this)}function jr(t){return t=et(t),this.isValid()?this[t+"s"]():NaN}function $r(t){return function(){return this.isValid()?this._data[t]:NaN}}var Ur=$r("milliseconds"),Yr=$r("seconds"),Gr=$r("minutes"),Kr=$r("hours"),qr=$r("days"),Xr=$r("months"),Zr=$r("years");function Jr(){return _t(this.days()/7)}var Qr=Math.round,ts={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function es(t,e,n,o,i){return i.relativeTime(e||1,!!n,t,o)}function ns(t,e,n,o){var i=To(t).abs(),r=Qr(i.as("s")),s=Qr(i.as("m")),a=Qr(i.as("h")),l=Qr(i.as("d")),h=Qr(i.as("M")),c=Qr(i.as("w")),d=Qr(i.as("y")),u=r<=n.ss&&["s",r]||r<n.s&&["ss",r]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(u=u||c<=1&&["w"]||c<n.w&&["ww",c]),(u=u||h<=1&&["M"]||h<n.M&&["MM",h]||d<=1&&["y"]||["yy",d])[2]=e,u[3]=+t>0,u[4]=o,es.apply(null,u)}function os(t){return void 0===t?Qr:"function"==typeof t&&(Qr=t,!0)}function is(t,e){return void 0!==ts[t]&&(void 0===e?ts[t]:(ts[t]=e,"s"===t&&(ts.ss=e-1),!0))}function rs(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,o,i=!1,r=ts;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(r=Object.assign({},ts,e),null!=e.s&&null==e.ss&&(r.ss=e.s-1)),o=ns(this,!i,r,n=this.localeData()),i&&(o=n.pastFuture(+this,o)),n.postformat(o)}var ss=Math.abs;function as(t){return(t>0)-(t<0)||+t}function ls(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,o,i,r,s,a,l=ss(this._milliseconds)/1e3,h=ss(this._days),c=ss(this._months),d=this.asSeconds();return d?(t=_t(l/60),e=_t(t/60),l%=60,t%=60,n=_t(c/12),c%=12,o=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=d<0?"-":"",r=as(this._months)!==as(d)?"-":"",s=as(this._days)!==as(d)?"-":"",a=as(this._milliseconds)!==as(d)?"-":"",i+"P"+(n?r+n+"Y":"")+(c?r+c+"M":"")+(h?s+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+o+"S":"")):"P0D"}var hs=ro.prototype;return hs.isValid=oo,hs.abs=Sr,hs.add=kr,hs.subtract=xr,hs.as=Hr,hs.asMilliseconds=Ar,hs.asSeconds=Pr,hs.asMinutes=Or,hs.asHours=Nr,hs.asDays=Dr,hs.asWeeks=Lr,hs.asMonths=Vr,hs.asQuarters=Br,hs.asYears=Fr,hs.valueOf=Wr,hs._bubble=Mr,hs.clone=zr,hs.get=jr,hs.milliseconds=Ur,hs.seconds=Yr,hs.minutes=Gr,hs.hours=Kr,hs.days=qr,hs.weeks=Jr,hs.months=Xr,hs.years=Zr,hs.humanize=rs,hs.toISOString=ls,hs.toString=ls,hs.toJSON=ls,hs.locale=si,hs.localeData=li,hs.toIsoString=k("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ls),hs.lang=ai,B("X",0,0,"unix"),B("x",0,0,"valueOf"),xt("x",wt),xt("X",Ct),At("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t))}),At("x",function(t,e,n){n._d=new Date(Ht(t))}),
47
+ //! moment.js
48
+ n.version="2.30.1",o(Kn),n.fn=lr,n.min=Jn,n.max=Qn,n.now=to,n.utc=g,n.unix=hr,n.months=mr,n.isDate=c,n.locale=fn,n.invalid=b,n.duration=To,n.isMoment=S,n.weekdays=wr,n.parseZone=cr,n.localeData=bn,n.isDuration=so,n.monthsShort=br,n.weekdaysMin=yr,n.defineLocale=pn,n.updateLocale=mn,n.locales=wn,n.weekdaysShort=vr,n.normalizeUnits=et,n.relativeTimeRounding=os,n.relativeTimeThreshold=is,n.calendarFormat=Wo,n.prototype=lr,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n}()),Zm.exports),tb=b(Qm);
49
+ /*!
50
+ * Pikaday
51
+ *
52
+ * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
53
+ */
54
+ const eb=()=>window,nb=()=>window.document,ob=(t,e)=>window.setTimeout(t,e),ib=function(t,e,n,o){t.addEventListener(e,n,!!o)},rb=function(t,e,n,o){t.removeEventListener(e,n,!!o)},sb=function(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")},ab=function(t,e){sb(t,e)||(t.className=""===t.className?e:t.className+" "+e)},lb=function(t,e){var n;t.className=(n=(" "+t.className+" ").replace(" "+e+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},hb=function(t){return/Array/.test(Object.prototype.toString.call(t))},cb=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},db=function(t){let e=t.getDay();return 0===e||6===e},ub=function(t){return t%4==0&&t%100!=0||t%400==0},gb=function(t,e){return[31,ub(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},fb=function(t){cb(t)&&t.setHours(0,0,0,0)},pb=function(t,e){return t.getTime()===e.getTime()},mb=function(t,e,n){let o,i;for(o in e)i=void 0!==t[o],i&&"object"==typeof e[o]&&null!==e[o]&&void 0===e[o].nodeName?cb(e[o])?n&&(t[o]=new Date(e[o].getTime())):hb(e[o])?n&&(t[o]=e[o].slice(0)):t[o]=mb({},e[o],n):!n&&i||(t[o]=e[o]);return t},bb=function(t,e,n){let o=nb().createEvent("HTMLEvents");o.initEvent(e,!0,!1),o=mb(o,n),t.dispatchEvent(o)},wb=function(t){return t.month<0&&(t.year-=Math.ceil(Math.abs(t.month)/12),t.month+=12),t.month>11&&(t.year+=Math.floor(Math.abs(t.month)/12),t.month-=12),t},vb={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},yb=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},Cb=function(t){let e=[],n="false";if(t.isEmpty){if(!t.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';e.push("is-outside-current-month"),t.enableSelectionDaysInNextAndPreviousMonths||e.push("is-selection-disabled")}return t.isDisabled&&e.push("is-disabled"),t.isToday&&e.push("is-today"),t.isSelected&&(e.push("is-selected"),n="true"),t.hasEvent&&e.push("has-event"),t.isInRange&&e.push("is-inrange"),t.isStartRange&&e.push("is-startrange"),t.isEndRange&&e.push("is-endrange"),'<td data-day="'+t.day+'" class="'+e.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+t.year+'" data-pika-month="'+t.month+'" data-pika-day="'+t.day+'">'+t.day+"</button></td>"},Sb=function(t,e,n,o,i){let r=new Date(o,n,e),s=t.hasMoment?t.moment(r).isoWeek():function(t,e){t.setHours(0,0,0,0);let n=t.getDate(),o=t.getDay(),i=e,r=i-1,s=function(t){return(t+7-1)%7};t.setDate(n+r-s(o));let a=new Date(t.getFullYear(),0,i),l=(t.getTime()-a.getTime())/864e5;return 1+Math.round((l-r+s(a.getDay()))/7)}(r,i);return'<td class="pika-week">'+s+"</td>"},Rb=function(t,e,n,o){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(o?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"},kb=function(t,e,n,o,i,r){let s,a,l,h,c,d=t._o,u=n===d.minYear,g=n===d.maxYear,f='<div id="'+r+'" class="pika-title" role="heading" aria-live="polite">',p=!0,m=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(n===i?s-e:12+s-e)+'"'+(s===o?' selected="selected"':"")+(u&&s<d.minMonth||g&&s>d.maxMonth?' disabled="disabled"':"")+">"+d.i18n.months[s]+"</option>");for(h='<div class="pika-label">'+d.i18n.months[o]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",hb(d.yearRange)?(s=d.yearRange[0],a=d.yearRange[1]+1):(s=n-d.yearRange,a=1+n+d.yearRange),l=[];s<a&&s<=d.maxYear;s++)s>=d.minYear&&l.push('<option value="'+s+'"'+(s===n?' selected="selected"':"")+">"+s+"</option>");return c='<div class="pika-label">'+n+d.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",d.showMonthAfterYear?f+=c+h:f+=h+c,u&&(0===o||d.minMonth>=o)&&(p=!1),g&&(11===o||d.maxMonth<=o)&&(m=!1),0===e&&(f+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),e===t._o.numberOfMonths-1&&(f+='<button class="pika-next'+(m?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),f+"</div>"},xb=function(t,e,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(t){let e,n=[];for(t.showWeekNumber&&n.push("<th></th>"),e=0;e<7;e++)n.push('<th scope="col"><abbr title="'+yb(t,e)+'">'+yb(t,e,!0)+"</abbr></th>");return"<thead><tr>"+(t.isRTL?n.reverse():n).join("")+"</tr></thead>"}(t)+("<tbody>"+e.join("")+"</tbody></table>")};function Eb(t){let e=this,n=e.config(t);e._onMouseDown=function(t){if(!e._v)return;let o=(t=t||eb().event).target||t.srcElement;if(o)if(sb(o,"is-disabled")||(!sb(o,"pika-button")||sb(o,"is-empty")||sb(o.parentNode,"is-disabled")?sb(o,"pika-prev")?e.prevMonth():sb(o,"pika-next")&&e.nextMonth():(e.setDate(new Date(o.getAttribute("data-pika-year"),o.getAttribute("data-pika-month"),o.getAttribute("data-pika-day"))),n.bound&&ob(function(){e.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()},100))),sb(o,"pika-select"))e._c=!0;else{if(!t.preventDefault)return t.returnValue=!1,!1;t.preventDefault()}},e._onChange=function(t){let n=(t=t||eb().event).target||t.srcElement;n&&(sb(n,"pika-select-month")?e.gotoMonth(n.value):sb(n,"pika-select-year")&&e.gotoYear(n.value))},e._onKeyChange=function(t){if(t=t||eb().event,e.isVisible())switch(t.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:e.adjustDate("subtract",1);break;case 38:e.adjustDate("subtract",7);break;case 39:e.adjustDate("add",1);break;case 40:e.adjustDate("add",7);break;case 8:case 46:e.setDate(null)}},e._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,n.format);if(this.hasMoment){let t=this.moment(n.field.value,n.format,n.formatStrict);return t&&t.isValid()?t.toDate():null}return new Date(Date.parse(n.field.value))},e._onInputChange=function(t){let n;t.firedBy!==e&&(n=e._parseFieldValue(),cb(n)&&e.setDate(n),e._v||e.show())},e._onInputFocus=function(){e.show()},e._onInputClick=function(){e.show()},e._onInputBlur=function(){let t=nb().activeElement;do{if(sb(t,"pika-single"))return}while(t=t.parentNode);e._c||(e._b=ob(function(){e.hide()},50)),e._c=!1},e._onClick=function(t){let o=(t=t||eb().event).target||t.srcElement,i=o;if(o){!hasEventListeners&&sb(o,"pika-select")&&(o.onchange||(o.setAttribute("onchange","return;"),ib(o,"change",e._onChange)));do{if(sb(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);e._v&&o!==n.trigger&&i!==n.trigger&&e.hide()}},e.el=nb().createElement("div"),e.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),ib(e.el,"mousedown",e._onMouseDown,!0),ib(e.el,"touchend",e._onMouseDown,!0),ib(e.el,"change",e._onChange),n.keyboardInput&&ib(nb(),"keydown",e._onKeyChange),n.field&&(n.container?n.container.appendChild(e.el):n.bound?nb().body.appendChild(e.el):n.field.parentNode.insertBefore(e.el,n.field.nextSibling),ib(n.field,"change",e._onInputChange),n.defaultDate||(n.defaultDate=e._parseFieldValue(),n.setDefaultDate=!0));let o=n.defaultDate;cb(o)?n.setDefaultDate?e.setDate(o,!0):e.gotoDate(o):e.gotoDate(new Date),n.bound?(this.hide(),e.el.className+=" is-bound",ib(n.trigger,"click",e._onInputClick),ib(n.trigger,"focus",e._onInputFocus),ib(n.trigger,"blur",e._onInputBlur)):this.show()}function Mb(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function Tb(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _b(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Eb.prototype={config:function(t){this._o||(this._o=mb({},vb,!0));let e=mb(this._o,t,!0);e.isRTL=!!e.isRTL,e.field=e.field&&e.field.nodeName?e.field:null,e.theme="string"==typeof e.theme&&e.theme?e.theme:null,e.bound=!!(void 0!==e.bound?e.field&&e.bound:e.field),e.trigger=e.trigger&&e.trigger.nodeName?e.trigger:e.field,e.disableWeekends=!!e.disableWeekends,e.disableDayFn="function"==typeof e.disableDayFn?e.disableDayFn:null;let n=parseInt(e.numberOfMonths,10)||1;if(e.numberOfMonths=n>4?4:n,cb(e.minDate)||(e.minDate=!1),cb(e.maxDate)||(e.maxDate=!1),e.minDate&&e.maxDate&&e.maxDate<e.minDate&&(e.maxDate=e.minDate=!1),e.minDate&&this.setMinDate(e.minDate),e.maxDate&&this.setMaxDate(e.maxDate),hb(e.yearRange)){let t=(new Date).getFullYear()-10;e.yearRange[0]=parseInt(e.yearRange[0],10)||t,e.yearRange[1]=parseInt(e.yearRange[1],10)||t}else e.yearRange=Math.abs(parseInt(e.yearRange,10))||vb.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(t){return t=t||this._o.format,cb(this._d)?this._o.toString?this._o.toString(this._d,t):this.hasMoment?this.moment(this._d).format(t):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(t,e){this.hasMoment&&this.moment.isMoment(t)&&this.setDate(t.toDate(),e)},useMoment:function(t){this.hasMoment=!0,this.moment=t},getDate:function(){return cb(this._d)?new Date(this._d.getTime()):null},setDate:function(t,e){if(!t)return this._d=null,this._o.field&&(this._o.field.value="",bb(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),!cb(t))return;let n=this._o.minDate,o=this._o.maxDate;cb(n)&&t<n?t=n:cb(o)&&t>o&&(t=o),this._d=new Date(t.getTime()),fb(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),bb(this._o.field,"change",{firedBy:this})),e||"function"!=typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(t){let e=!0;if(cb(t)){if(this.calendars){let n=new Date(this.calendars[0].year,this.calendars[0].month,1),o=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=t.getTime();o.setMonth(o.getMonth()+1),o.setDate(o.getDate()-1),e=i<n.getTime()||o.getTime()<i}e&&(this.calendars=[{month:t.getMonth(),year:t.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(t,e){let n,o=this.getDate()||new Date,i=24*parseInt(e)*60*60*1e3;"add"===t?n=new Date(o.valueOf()+i):"subtract"===t&&(n=new Date(o.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=wb(this.calendars[0]);for(let t=1;t<this._o.numberOfMonths;t++)this.calendars[t]=wb({month:this.calendars[0].month+t,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(t){isNaN(t)||(this.calendars[0].month=parseInt(t,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(t){isNaN(t)||(this.calendars[0].year=parseInt(t,10),this.adjustCalendars())},setMinDate:function(t){t instanceof Date?(fb(t),this._o.minDate=t,this._o.minYear=t.getFullYear(),this._o.minMonth=t.getMonth()):(this._o.minDate=vb.minDate,this._o.minYear=vb.minYear,this._o.minMonth=vb.minMonth,this._o.startRange=vb.startRange),this.draw()},setMaxDate:function(t){t instanceof Date?(fb(t),this._o.maxDate=t,this._o.maxYear=t.getFullYear(),this._o.maxMonth=t.getMonth()):(this._o.maxDate=vb.maxDate,this._o.maxYear=vb.maxYear,this._o.maxMonth=vb.maxMonth,this._o.endRange=vb.endRange),this.draw()},setStartRange:function(t){this._o.startRange=t},setEndRange:function(t){this._o.endRange=t},draw:function(t){if(!this._v&&!t)return;let e,n=this._o,o=n.minYear,i=n.maxYear,r=n.minMonth,s=n.maxMonth,a="";this._y<=o&&(this._y=o,!isNaN(r)&&this._m<r&&(this._m=r)),this._y>=i&&(this._y=i,!isNaN(s)&&this._m>s&&(this._m=s));for(let t=0;t<n.numberOfMonths;t++)e="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+kb(this,t,this.calendars[t].year,this.calendars[t].month,this.calendars[0].year,e)+this.render(this.calendars[t].year,this.calendars[t].month,e)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&ob(function(){n.trigger.focus()},1),"function"==typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)},adjustPosition:function(){let t,e,n,o,i,r,s,a,l,h,c;this._o.container||(this.el.style.position="absolute",t=this._o.trigger,e=this.el.offsetWidth,n=this.el.offsetHeight,o=eb().innerWidth||nb().documentElement.clientWidth,i=eb().innerHeight||nb().documentElement.clientHeight,r=nb().body.scrollTop||nb().documentElement.scrollTop,h=!0,c=!0,l=t.getBoundingClientRect(),s=l.left+eb().pageXOffset,a=l.bottom+eb().pageYOffset,(this._o.reposition&&s+e>o||this._o.position.indexOf("right")>-1&&s-e+t.offsetWidth>0)&&(s=s-e+t.offsetWidth,h=!1),(this._o.reposition&&a+n>i+r||this._o.position.indexOf("top")>-1&&a-n-t.offsetHeight>0)&&(a=a-n-t.offsetHeight,c=!1),s<0&&(s=0),a<0&&(a=0),this.el.style.left=s+"px",this.el.style.top=a+"px",ab(this.el,h?"left-aligned":"right-aligned"),ab(this.el,c?"bottom-aligned":"top-aligned"),lb(this.el,h?"right-aligned":"left-aligned"),lb(this.el,c?"top-aligned":"bottom-aligned"))},render:function(t,e,n){let o=this._o,i=new Date,r=gb(t,e),s=new Date(t,e,1).getDay(),a=[],l=[];fb(i),o.firstDay>0&&(s-=o.firstDay,s<0&&(s+=7));let h=0===e?11:e-1,c=11===e?0:e+1,d=0===e?t-1:t,u=11===e?t+1:t,g=gb(d,h),f=r+s,p=f;for(;p>7;)p-=7;f+=7-p;let m=!1;for(let n=0,p=0;n<f;n++){let f=new Date(t,e,n-s+1),b=!!cb(this._d)&&pb(f,this._d),w=pb(f,i),v=-1!==o.events.indexOf(f.toDateString()),y=n<s||n>=r+s,C=n-s+1,S=e,R=t,k=o.startRange&&pb(o.startRange,f),x=o.endRange&&pb(o.endRange,f),E=o.startRange&&o.endRange&&o.startRange<f&&f<o.endRange;y&&(n<s?(C=g+C,S=h,R=d):(C-=r,S=c,R=u));let M={day:C,month:S,year:R,hasEvent:v,isSelected:b,isToday:w,isDisabled:o.minDate&&f<o.minDate||o.maxDate&&f>o.maxDate||o.disableWeekends&&db(f)||o.disableDayFn&&o.disableDayFn(f),isEmpty:y,isStartRange:k,isEndRange:x,isInRange:E,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:o.enableSelectionDaysInNextAndPreviousMonths};o.pickWholeWeek&&b&&(m=!0),l.push(Cb(M)),7===++p&&(o.showWeekNumber&&l.unshift(Sb(this,n-s,e,t,o.firstWeekOfYearMinDays)),a.push(Rb(l,o.isRTL,o.pickWholeWeek,m)),l=[],p=0,m=!1)}return xb(o,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),lb(this.el,"is-hidden"),this._o.bound&&(ib(nb(),"click",this._onClick),this.adjustPosition()),"function"==typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){let t=this._v;!1!==t&&(this._o.bound&&rb(nb(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),ab(this.el,"is-hidden"),this._v=!1,void 0!==t&&"function"==typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){let t=this._o;this.hide(),rb(this.el,"mousedown",this._onMouseDown,!0),rb(this.el,"touchend",this._onMouseDown,!0),rb(this.el,"change",this._onChange),t.keyboardInput&&rb(nb(),"keydown",this._onKeyChange),t.field&&(rb(t.field,"change",this._onInputChange),t.bound&&(rb(t.trigger,"click",this._onInputClick),rb(t.trigger,"focus",this._onInputFocus),rb(t.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};const Hb="date",Ib="dateEditor",Ab=new WeakSet;var Pb=new WeakSet;class Ob extends Cp{constructor(){super(...arguments),Mb(this,Pb),Tb(this,"parentDestroyed",!1),Tb(this,"$datePicker",null)}static get EDITOR_TYPE(){return Hb}init(){"function"!=typeof tb&&wt("You need to include moment.js to your project."),super.init(),this.hot.addHook("afterDestroy",()=>{this.parentDestroyed=!0,this.destroyElements()}),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),ue(this.datePicker,"htDatepickerHolder"),this.hot.rootPortalElement.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",t=>{de(t.target,"pika-day")&&this.hideDatepicker(),t.stopPropagation()})}destroyElements(){const t=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),t&&t.removeChild(this.datePicker)}prepare(t,e,n,o,i,r){super.prepare(t,e,n,o,i,r)}open(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Ab.has(this.cellProperties.instance)||(Ab.add(this.cellProperties.instance),te("The Pikaday-based `date` editor is deprecated and will be removed in the next major release, replaced by the native HTML date input.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type documentation: https://handsontable.com/docs/date-cell-type/"));const e=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(t),super.open(),e.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:Ib})}close(){var t;null!==(t=this.$datePicker)&&void 0!==t&&t.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{const t=this.hot._getEditorManager();t.closeEditor(),this.hot.view.render(),t.prepareEditor()});this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(Ib),super.close()}finishEditing(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(t,e)}showDatepicker(t){const e=_b(Pb,this,Nb).call(this),n=this.hot.view.isMouseDown(),o=!!t&&rn(t.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new Eb(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(tb),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,tb(i,e,!0).isValid()&&this.$datePicker.setMoment(tb(i,e),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,tb(i,e,!0).isValid()&&this.$datePicker.setMoment(tb(i,e),!0),o||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){var t;const e=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&Ct(n,this.cellProperties.datePickerConfig);const o=n.onSelect,i=n.onClose;return n.field=e,n.trigger=e,n.container=this.datePicker,n.bound=!1,n.keyboardInput=!1,n.format=null!==(t=n.format)&&void 0!==t?t:_b(Pb,this,Nb).call(this),n.reposition=n.reposition||!1,n.isRTL=!1,n.onSelect=t=>{let e=t;isNaN(e.getTime())||(e=tb(e).format(_b(Pb,this,Nb).call(this))),this.setValue(e),o&&o(),Gt()&&this.hideDatepicker()},n.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),i&&i()},n}refreshDimensions(t){var e;if(super.refreshDimensions(t),this.state!==yg.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:o}=this.hot,{wtOverlays:i}=this.hot.view._wt,{wtTable:r}=null!==(e=i.getParentOverlay(this.TD))&&void 0!==e?e:this.hot.view._wt,s=n.getVisualFromRenderableIndex(r.getFirstPartiallyVisibleRow()),a=n.getVisualFromRenderableIndex(r.getLastPartiallyVisibleRow()),l=o.getVisualFromRenderableIndex(r.getFirstPartiallyVisibleColumn()),h=o.getVisualFromRenderableIndex(r.getLastPartiallyVisibleColumn());if(this.row>=s&&this.row<=a&&this.col>=l&&this.col<=h){const t=this.TD.getBoundingClientRect(),e=Ae(this.datePicker),n=Pe(this.datePicker),o=Pe(this.TD),i=this.hot.rootWindow,r=this.hot.rootDocument.documentElement,s=i.pageYOffset,a=i.pageYOffset+r.clientHeight,l=i.pageXOffset,h=i.pageXOffset+r.clientWidth;let c=s+t.top+o;if(c+n>a){const e=s+t.top-n;c=e>=s?Math.max(s,e-1):a-n}this.datePickerStyle.top=`${c}px`;const d=l+t.left,u=l+t.right;let g;this.hot.isRtl()?(g=u-e,g<l&&(g=Math.min(d,h-e))):(g=d,g+e>h&&(g=Math.max(u-e,l))),g=co(g,l,h-e),this.datePickerStyle.left=`${g}px`}else this.hideDatepicker()}}function Nb(){var t;return null!==(t=this.cellProperties.dateFormat)&&void 0!==t?t:"DD/MM/YYYY"}class Db extends Ym{static get EDITOR_TYPE(){return"dropdown"}prepare(t,e,n,o,i,r){r.filter=!1,r.strict=!0,super.prepare(t,e,n,o,i,r)}}const Lb=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function Vb(t){if(P(t))return null;if("string"==typeof t&&Lb.test(t)){const[e,n,o]=t.split("-").map(Number);return new Date(e,n-1,o)}return null}function Bb(t){if("string"!=typeof t||!Lb.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.getTime())&&t===e.toISOString().slice(0,10)}const Fb=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function Wb(t){if(P(t))return null;if("string"!=typeof t)return null;const e=Fb.exec(t);if(!e)return null;const n=Number(e[1]),o=Number(e[2]),i=void 0!==e[3]?Number(e[3]):0,r=e[4],s=void 0!==r?Number(r.padEnd(3,"0").slice(0,3)):0;return new Date(1970,0,1,n,o,i,s)}function zb(t){return"string"==typeof t&&Fb.test(t)}class jb extends Cp{static get EDITOR_TYPE(){return"intl-date"}init(){super.init(),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(t){P(t)&&(t=this.cellProperties.defaultDate),Bb(t)?super.setValue(t):Qt(T`IntlDateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
55
+ required by the native date input. Received:`,t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class $b extends Cp{static get EDITOR_TYPE(){return"intl-time"}init(){super.init(),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}createElements(){super.createElements("input"),this.TEXTAREA.setAttribute("type","time")}setValue(t){zb(t)?super.setValue(t):Qt(T`IntlTimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
56
+ required by the native time input. Received:`,t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class Ub extends Cp{static get EDITOR_TYPE(){return"numeric"}}function Yb(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Gb extends Cp{constructor(){super(...arguments),Yb(this,"autoResize",mp(this.hot.rootDocument,{textContent:t=>"•".repeat(t.value.length)}))}static get EDITOR_TYPE(){return"password"}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,be(this.TEXTAREA_PARENT),this.TEXTAREA.setAttribute(...J(-1)),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const Kb="ht_editor_visible",qb="selectEditor";class Xb extends Cg{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const t=this.hot.rootDocument.createElement("DIV"),e=this.hot.getSettings().ariaTags;t.className="htAutocompleteArrow",e&&t.setAttribute("aria-hidden","true"),t.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),ue(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(t,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(t){this.select.value=t}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",de(this.selectWrapper,Kb)&&ge(this.selectWrapper,Kb),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(t,e,n,o,i,r){super.prepare(t,e,n,o,i,r);const s=this.cellProperties.selectOptions;let a;a="function"==typeof s?this.prepareOptions(s(this.row,this.col,this.prop)):this.prepareOptions(s),be(this.select),Tt(a,(t,e)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=e,Ce(n,t,this.hot.getSettings().sanitizer),this.select.appendChild(n)})}prepareOptions(t){let e={};if(Array.isArray(t))for(let n=0,o=t.length;n<o;n++)e[t[n]]=t[n];else"object"==typeof t&&(e=t);return e}refreshValue(){const t=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){if(this.state!==yg.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:t,start:e,width:n,height:o}=this.getEditedCellRect(),i=this.selectWrapper.style;i.height=`${o}px`,i.width=`${n}px`,i.top=`${t}px`,i[this.hot.isRtl()?"right":"left"]=`${e}px`,i.margin="0px",ue(this.selectWrapper,Kb)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={group:qb};this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const t=this.select.selectedIndex-1;t>=0&&(this.select[t].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const t=this.select.selectedIndex+1;t<=this.select.length-1&&(this.select[t].selected=!0)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(qb)}}class Zb extends Cp{static get EDITOR_TYPE(){return"time"}prepare(t,e,n,o,i,r){super.prepare(t,e,n,o,i,r),this.TEXTAREA.dir="ltr"}}function Jb(t){return t.querySelector('input[type="checkbox"]')}function Qb(t,e){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];const o=e[e.length-1];let i,r=e;"function"==typeof o&&(i=o,r=r.slice(0,-1));const s=i?(t,e)=>e.some(e=>i(t,e)):(t,e)=>e.includes(t),[a,...l]=r;let h=a;return x(l,t=>{h=h.filter(e=>s(e,t))}),h}(t,e,(t,e)=>JSON.stringify(t)===JSON.stringify(e))}function tw(t,e){return Dt(e)?Array.isArray(t)&&t.some(t=>Dt(t)?xt(t,e):t===e):t.includes(e)}function ew(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}var nw=new WeakSet;class ow{constructor(t){let{input:e,eventManager:n}=t;ew(this,nw),this.input=e,this.eventManager=n,this.enabled=!0,this.onInput=this.onInput.bind(this)}getInputElement(){return this.input}setValue(t){this.input.value=t}toggle(t){this.enabled=t,this.input&&(t?this.listen():this.unlisten())}listen(){this.eventManager.addEventListener(this.input,"input",this.onInput)}unlisten(){this.eventManager.removeEventListener(this.input,"input",this.onInput)}onInput(){(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")})(nw,this,iw).call(this,this.input.value)}}function iw(t){this.runLocalHooks("triggerFilter",t)}kt(ow,os);const rw="ht-multi-select-editor",sw=`${rw}-search-input-wrapper`,aw=`${rw}-search-icon`,lw=`${rw}-search-input`,hw=`${rw}-separator`,cw=`${rw}-item-`,dw=`${rw}-item-selected`;function uw(t){const e=Jb(t);ue(t,dw),e.checked||(e.checked=!0)}function gw(t){const e=Jb(t);ge(t,dw),e.checked&&(e.checked=!1)}function fw(t){let{dropdownListElement:e,index:n}=t;const o=e.children[n];if(o){const t=Jb(o);t&&t.blur()}}function pw(t,e,n){mw(t,e),e.set(t,n)}function mw(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bw(t,e){return t.get(vw(t,e))}function ww(t,e,n){return t.set(vw(t,e),n),n}function vw(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var yw=new WeakMap,Cw=new WeakMap,Sw=new WeakMap,Rw=new WeakMap,kw=new WeakMap,xw=new WeakMap,Ew=new WeakMap,Mw=new WeakMap,Tw=new WeakMap,_w=new WeakMap,Hw=new WeakSet;class Iw{constructor(t,e){var n,o;mw(n=this,o=Hw),o.add(n),pw(this,yw,null),pw(this,Cw,null),pw(this,Sw,null),pw(this,Rw,null),pw(this,kw,null),pw(this,xw,null),pw(this,Ew,null),pw(this,Mw,null),pw(this,Tw,new zn(this)),pw(this,_w,{visibleRowsNumber:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null}),ww(Cw,this,t),ww(Mw,this,bw(Cw,this).ownerDocument),ww(yw,this,e),this.init()}init(){ww(Sw,this,function(t){let{root:e}=t;return e.createElement("ul")}({root:bw(Mw,this)})),ww(Rw,this,function(t){let{root:e}=t;const n=e.createElement("input");return fe(n,[st("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",lw]]),ue(n,lw),n}({root:bw(Mw,this)}));const t=function(t){let{root:e}=t;const n=e.createElement("div");return ue(n,aw),fe(n,[["aria-hidden","true"]]),n}({root:bw(Mw,this)});ww(xw,this,function(t){let{root:e}=t;const n=e.createElement("div");return n.className=sw,n}({root:bw(Mw,this)})),ww(kw,this,function(t){let{root:e}=t;const n=e.createElement("div");return n.className=hw,n}({root:bw(Mw,this)})),bw(xw,this).appendChild(t),bw(xw,this).appendChild(bw(Rw,this)),bw(Cw,this).appendChild(bw(xw,this)),bw(Cw,this).appendChild(bw(kw,this)),bw(Cw,this).appendChild(bw(Sw,this)),ww(Ew,this,new ow({input:bw(Rw,this),eventManager:bw(Tw,this)}))}setVisibleRowsNumberSetting(t){bw(_w,this).visibleRowsNumberSetting=t}setSourceSortFunction(t){bw(_w,this).sourceSortFunction=null!=t?t:null}setSearchInputVisibility(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];bw(xw,this).style.display=t?"":"none",bw(kw,this).style.display=t?"":"none",bw(Ew,this).toggle(t)}fillDropdown(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.removeAllDropdownItems(),bw(_w,this).currentlySelectedItemIndex=0,Array.isArray(e)||(e=[]),bw(_w,this).sourceSortFunction&&(t=bw(_w,this).sourceSortFunction(t)),t.forEach((t,n)=>{var o;vw(Hw,this,Vw).call(this,{rootDocument:bw(Mw,this),itemKey:null==t?void 0:t.key,itemValue:null!==(o=null==t?void 0:t.value)&&void 0!==o?o:t,indexWithinList:n,checked:tw(e,t),disabled:bw(_w,this).areCheckboxesDisabled})}),bw(_w,this).entriesCount=t.length,this.runLocalHooks("afterDropdownFill")}updateDimensions(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=vw(Hw,this,Nw).call(this),o=vw(Hw,this,Pw).call(this,t),i=o?t.spaceAbove:t.spaceBelow;if(!e&&o&&(bw(_w,this).flippedVertically=!0),bw(_w,this).entriesCount>0&&i<this.getHeight(!0)){const t=Math.max(Math.floor((i-vw(Hw,this,Lw).call(this))/n)-1,1);bw(_w,this).actualRenderedItemsCount=bw(_w,this).visibleRowsNumberSetting?Math.min(t,bw(_w,this).visibleRowsNumberSetting):t}else bw(_w,this).actualRenderedItemsCount=Math.min(bw(_w,this).entriesCount,bw(_w,this).visibleRowsNumberSetting);bw(_w,this).actualRenderedItemsCount&&bw(_w,this).entriesCount>bw(_w,this).actualRenderedItemsCount?bw(Cw,this).style.height=`${this.getHeight()}px`:bw(Cw,this).style.height="",vw(Hw,this,Ow).call(this,t),bw(Cw,this).scrollTop=0}getDropdownWidth(){return function(t){let{dropdownListElement:e}=t;return e.offsetWidth}({dropdownListElement:bw(Sw,this)})}deselectAllItems(){!function(t){let{dropdownListElement:e}=t;e.querySelectorAll(`.${dw}`).forEach(t=>gw(t))}({dropdownListElement:bw(Sw,this)})}focusFirstItem(){bw(_w,this).entriesCount>0&&vw(Hw,this,Aw).call(this,0)}focusItem(t){vw(Hw,this,Aw).call(this,t)}focusPreviousItem(){0!==bw(_w,this).currentlySelectedItemIndex?(fw({dropdownListElement:bw(Sw,this),index:bw(_w,this).currentlySelectedItemIndex}),vw(Hw,this,Aw).call(this,bw(_w,this).currentlySelectedItemIndex-1)):this.focusSearchInput()}focusNextItem(){bw(_w,this).currentlySelectedItemIndex!==bw(_w,this).entriesCount-1&&(fw({dropdownListElement:bw(Sw,this),index:bw(_w,this).currentlySelectedItemIndex}),vw(Hw,this,Aw).call(this,bw(_w,this).currentlySelectedItemIndex+1))}focusSearchInput(){bw(Rw,this)&&bw(Rw,this).focus()}reset(){this.removeAllDropdownItems(),vw(Hw,this,Ww).call(this),bw(Rw,this)&&(bw(Rw,this).value=""),bw(Cw,this).style.position="",bw(Cw,this).style.top="",bw(Cw,this).style.height="",bw(Cw,this).scrollTop=0}isFlippedVertically(){return bw(_w,this).flippedVertically}getHeight(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=bw(Mw,this).defaultView.getComputedStyle(bw(Cw,this));return vw(Hw,this,Dw).call(this,t)+vw(Hw,this,Lw).call(this)+(!0===e?2*parseInt(n.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return bw(Ew,this)}removeAllDropdownItems(){Array.from(bw(Sw,this).children).forEach(t=>vw(Hw,this,Fw).call(this,t)),bw(_w,this).checkboxChangeListeners.clear(),bw(Sw,this).innerHTML=""}disableCheckboxes(){bw(_w,this).areCheckboxesDisabled=!0,function(t){let{dropdownListElement:e}=t;e.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(t=>{t.dataset.disabled=!0})}({dropdownListElement:bw(Sw,this)})}enableCheckboxes(){bw(_w,this).areCheckboxesDisabled=!1,function(t){let{dropdownListElement:e}=t;e.querySelectorAll('input[type="checkbox"]').forEach(t=>{t.dataset.disabled=!1})}({dropdownListElement:bw(Sw,this)})}}function Aw(t){bw(_w,this).currentlySelectedItemIndex=t,function(t){let{dropdownListElement:e,index:n}=t;const o=e.children[n];if(o){const t=Jb(o);t&&t.focus()}}({dropdownListElement:bw(Sw,this),index:t})}function Pw(t){const{spaceAbove:e,spaceBelow:n,cellHeight:o}=t;return this.getHeight(!0)>n&&e>n+o}function Ow(t){const{cellHeight:e}=t;bw(_w,this).flippedVertically?(bw(Cw,this).style.position="absolute",bw(Cw,this).style.top=-this.getHeight(!1,!0)-e-2+"px"):(bw(Cw,this).style.position="",bw(Cw,this).style.top="")}function Nw(){const t=bw(Mw,this).defaultView.getComputedStyle(bw(Cw,this));return 2*parseInt(t.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(t.getPropertyValue("--ht-line-height"),10)}function Dw(){var t;let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=bw(_w,this).entriesCount;return(e?n:null!==(t=bw(_w,this).actualRenderedItemsCount)&&void 0!==t?t:n)*vw(Hw,this,Nw).call(this)}function Lw(){if(!bw(Ew,this).enabled)return 0;const t=bw(Mw,this).defaultView.getComputedStyle(bw(Cw,this));return bw(xw,this).offsetHeight+(bw(kw,this).offsetHeight+2*parseInt(t.getPropertyValue("--ht-menu-vertical-padding"),10))}function Vw(t){let{rootDocument:e,itemKey:n,itemValue:o,indexWithinList:i,checked:r=!1,disabled:s=!1}=t;const a=function(t){let{rootDocument:e,instanceId:n,itemKey:o,itemValue:i,indexWithinList:r,checked:s=!1,disabled:a=!1}=t;const l=e.createElement("li"),h=e.createElement("div"),c=e.createElement("input"),d=e.createElement("label");return c.id=`${n}-${cw}${r}`,c.type="checkbox",c.dataset.value=i,c.dataset.index=r,c.dataset.disabled=!s&&a,o&&(c.dataset.key=o),d.htmlFor=c.id,d.textContent=i,h.appendChild(c),h.appendChild(d),l.appendChild(h),l}({rootDocument:e,instanceId:bw(yw,this),itemKey:n,itemValue:o,indexWithinList:i,checked:r,disabled:s});r&&uw(a),vw(Hw,this,Bw).call(this,a),bw(Sw,this).appendChild(a)}function Bw(t){const e=Jb(t),n=()=>{"true"===e.dataset.disabled&&e.checked?e.checked=!1:e.checked?(uw(t),this.runLocalHooks("afterDropdownItemChecked",e.dataset.key,e.dataset.value)):(gw(t),this.runLocalHooks("afterDropdownItemUnchecked",e.dataset.key,e.dataset.value))},o=t=>{t.target!==e&&"true"!==e.dataset.disabled&&"LABEL"!==t.target.tagName&&(e.checked=!e.checked,e.dispatchEvent(new Event("change")))};bw(_w,this).checkboxChangeListeners.set(e,{change:n,click:o}),bw(Tw,this).addEventListener(e,"change",n),bw(Tw,this).addEventListener(t,"click",o)}function Fw(t){const e=Jb(t),n=bw(_w,this).checkboxChangeListeners.get(e);bw(Tw,this).removeEventListener(e,"change",n.change),bw(Tw,this).removeEventListener(t,"click",n.click),bw(_w,this).checkboxChangeListeners.delete(e)}function Ww(){bw(_w,this).visibleRowsNumberSetting=null,bw(_w,this).entriesCount=0,bw(_w,this).flippedVertically=!1,bw(_w,this).currentlySelectedItemIndex=0,bw(_w,this).checkboxChangeListeners.clear(),bw(_w,this).areCheckboxesDisabled=!1,bw(_w,this).sourceSortFunction=null}function zw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(Iw,os);class jw{constructor(t){var e;zw(this,"selectedItems",null!==(e=this.selectedItems)&&void 0!==e?e:new Set),zw(this,"maxSelectionsCount",1/0),Array.isArray(t)?this.selectedItems=new Set(t):this.selectedItems=new Set}setMaxSelectionCount(t){this.maxSelectionsCount=t}add(t){this.selectedItems.size>=this.maxSelectionsCount||(Array.isArray(t)?t.forEach(t=>this.selectedItems.add(t)):this.selectedItems.add(t))}remove(t){if(!Dt(t))return this.selectedItems.delete(t);{const e=Array.from(this.selectedItems).find(e=>xt(e,t));if(void 0!==e)return this.selectedItems.delete(e),!0}return!1}has(t){return tw(this.getItemsArray(),t)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}}function $w(t,e,n){Uw(t,e),e.set(t,n)}function Uw(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yw(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Gw(t,e){return t.get(qw(t,e))}function Kw(t,e,n){return t.set(qw(t,e),n),n}function qw(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const Xw="multiselect",Zw="multiselectEditor";var Jw=new WeakMap,Qw=new WeakMap,tv=new WeakSet;class ev extends Cg{static get EDITOR_TYPE(){return Xw}constructor(t){var e,n,o;super(t),Uw(n=this,o=tv),o.add(n),Yw(this,"_closeAfterDataChange",!1),$w(this,Jw,new jw),$w(this,Qw,null),Yw(this,"dropdownContainerElement",null),Yw(this,"dropdownController",null!==(e=this.dropdownController)&&void 0!==e?e:null),this.eventManager=new zn(this),this.createElements(),this.bindEvents()}createElements(){const{rootDocument:t}=this.hot;Kw(Qw,this,t.createElement("div")),Gw(Qw,this).style.display="none",ue(Gw(Qw,this),"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),ue(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),fe(this.dropdownContainerElement,[st("Select options"),["role","group"]]),Gw(Qw,this).appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(Gw(Qw,this)),this.dropdownController=new Iw(this.dropdownContainerElement,this.hot.guid)}prepare(t,e,n,o,i,r){super.prepare(t,e,n,o,i,r);const s=function(t){return Y(t)?JSON.parse(t):t}(i),a=Qb(Array.isArray(s)?s:[s],qw(tv,this,nv).call(this));this.dropdownController.reset(),a.length>=qw(tv,this,pv).call(this,"maxSelections")&&qw(tv,this,av).call(this),qw(tv,this,fv).call(this,a),this.dropdownController.setSourceSortFunction(this.cellProperties.sourceSortFunction),this.dropdownController.fillDropdown(qw(tv,this,nv).call(this),a),this.dropdownController.setVisibleRowsNumberSetting(qw(tv,this,pv).call(this,"visibleRows")),this.dropdownController.setSearchInputVisibility(qw(tv,this,pv).call(this,"searchInput")),void 0!==r.maxSelections&&Gw(Jw,this).setMaxSelectionCount(r.maxSelections)}finishEditing(t,e,n){super.finishEditing(t,e,n)}bindEvents(){var t=this;this.dropdownController.addLocalHook("afterDropdownItemChecked",(t,e)=>{qw(tv,this,uv).call(this,t,e),Gw(Jw,this).getSize()>=this.cellProperties.maxSelections&&qw(tv,this,av).call(this)}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(t,e)=>{qw(tv,this,gv).call(this,t,e),Gw(Jw,this).getSize()<this.cellProperties.maxSelections&&qw(tv,this,lv).call(this)}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterSetSourceDataAtCell",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return qw(tv,t,mv).call(t,...n)}),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",t=>qw(tv,this,hv).call(this,t))}open(t){if(on(null==t?void 0:t.keyCode)){const e=1===t.key.length?t.key:String.fromCharCode(t.keyCode);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(e),qw(tv,this,hv).call(this,e)),t.preventDefault(),this.enableFullEditMode()}qw(tv,this,rv).call(this),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),qw(tv,this,ov).call(this),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(qw(tv,this,cv).call(this))}close(){qw(tv,this,sv).call(this),qw(tv,this,iv).call(this),this.dropdownController.getInputController().unlisten()}getValue(){return Gw(Jw,this).getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();const{top:t,start:e,height:n}=this.getEditedCellRect(),o=Gw(Qw,this).style;o.top=`${t+n}px`,o[this.hot.isRtl()?"right":"left"]=`${e}px`,ue(Gw(Qw,this),"ht_editor_visible")}focus(){!1===qw(tv,this,pv).call(this,"searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}}function nv(){var t;return null!==(t=this.cellProperties.source)&&void 0!==t?t:[]}function ov(){const t=this.hot.getShortcutManager().getContext("editor");t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{this.hot.rootDocument.activeElement===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:Zw}),t.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!qw(tv,this,pv).call(this,"enterCommits"),callback:t=>{const e=this.hot.rootDocument.activeElement;return"INPUT"===e.tagName&&"checkbox"===e.type&&(e.checked=!e.checked,e.dispatchEvent(new Event("change"))),t.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!qw(tv,this,pv).call(this,"enterCommits"),callback:t=>{t.preventDefault()}}],{group:Zw,relativeToGroup:mg,position:"before"})}function iv(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(Zw)}function rv(){Gw(Qw,this).style.display=""}function sv(){Gw(Qw,this).style.display="none"}function av(){this.dropdownController.disableCheckboxes()}function lv(){this.dropdownController.enableCheckboxes()}function hv(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(e=qw(tv,this,pv).call(this,"filterSelectedItems"))||void 0===e||e;const o=qw(tv,this,nv).call(this).filter(e=>{var o;const i=null!==(o=null==e?void 0:e.value)&&void 0!==o?o:e;return!(n||!Gw(Jw,this).has(e))||(this.cellProperties.filteringCaseSensitive?i.includes(t):i.toLowerCase().includes(t.toLowerCase()))});this.dropdownController.fillDropdown(o,Gw(Jw,this).getItemsArray()),this.dropdownController.updateDimensions(qw(tv,this,cv).call(this),!0)}function cv(){const t=this.getEditedCellRect(),e=this.hot.view.isVerticallyScrollableByWindow(),n=this.hot.view.getWorkspaceHeight();let o=t.top;if(e){const t=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;o=Math.max(o+t,0)}return{spaceAbove:o,spaceBelow:n-o-t.height,cellHeight:t.height}}function dv(){const t=Gw(Jw,this).getItemsArray();this.saveValue([[t]])}function uv(t,e){t?Gw(Jw,this).add({key:t,value:e}):Gw(Jw,this).add(e),qw(tv,this,dv).call(this),this.refreshDimensions()}function gv(t,e){t?Gw(Jw,this).remove({key:t,value:e}):Gw(Jw,this).remove(e),qw(tv,this,dv).call(this),this.refreshDimensions()}function fv(t){t.length>0?Kw(Jw,this,new jw(t)):Kw(Jw,this,new jw)}function pv(t){return this.cellProperties[t]}function mv(t,e){this.isOpened()&&e===`${Xw}-renderer`&&parseInt(t[0][0],10)===this.cellProperties.visualRow&&parseInt(t[0][1],10)===this.cellProperties.visualCol&&(qw(tv,this,fv).call(this,t[0][3]),this.dropdownController.fillDropdown(qw(tv,this,nv).call(this),Gw(Jw,this).getItemsArray()),this.dropdownController.focusItem(0),Gw(Jw,this).getSize()>=this.cellProperties.maxSelections?qw(tv,this,av).call(this):qw(tv,this,lv).call(this))}function bv(t,e,n,o,i,r){Ce(e,null==r?"":r,!1)}bv.RENDERER_TYPE="html";function wv(t,e,n,o,i,r,s){const{rootDocument:a}=t,l=s.allowHtml?bv:Sp,h=a.createElement("DIV"),c=t.getSettings().ariaTags;if(h.className="htAutocompleteArrow",c&&h.setAttribute("aria-hidden","true"),h.appendChild(a.createTextNode(String.fromCharCode(9660))),l.apply(this,[t,e,n,o,i,r,s]),e.firstChild||e.appendChild(a.createTextNode(String.fromCharCode(160))),e.insertBefore(h,e.firstChild),ue(e,"htAutocomplete"),!t.acArrowListener){const i=new zn(t);t.acArrowListener=function(i){de(i.target,"htAutocompleteArrow")&&t.view._wt.getSetting("onCellDblClick",null,t._createCellCoords(n,o),e)},i.addEventListener(t.rootElement,"mousedown",t.acArrowListener),t.addHookOnce("afterDestroy",()=>{i.destroy()})}}wv.RENDERER_TYPE="autocomplete";function vv(t,e,n,o,i,r,s){wv.apply(this,[t,e,n,o,i,r,s])}vv.RENDERER_TYPE="dropdown";const yv="#bad-value#",Cv=new WeakMap,Sv=new WeakMap,Rv="data-row",kv="data-col",xv="checkboxRenderer",Ev="checkbox";function Mv(t,e,n,o,i,r,s){const{rootDocument:a}=t,l=t.getSettings().ariaTags;!function(t){let e=Sv.get(t);if(!e){const{rootElement:n}=t;e=new zn(t),e.addEventListener(n,"click",e=>function(t,e){const{target:n}=t;if(!Tv(n))return;if(!n.hasAttribute(Rv)||!n.hasAttribute(kv))return;const o=parseInt(n.getAttribute(Rv),10),i=parseInt(n.getAttribute(kv),10),r=e.getCellMeta(o,i);r.readOnly&&t.preventDefault()}(e,t)),e.addEventListener(n,"mouseup",e=>function(t,e){const{target:n}=t;if(!Tv(n))return;if(!n.hasAttribute(Rv)||!n.hasAttribute(kv))return;setTimeout(e.listen,10)}(e,t)),e.addEventListener(n,"change",e=>function(t,e){const{target:n}=t;if(!Tv(n))return;if(!n.hasAttribute(Rv)||!n.hasAttribute(kv))return;const o=parseInt(n.getAttribute(Rv),10),i=parseInt(n.getAttribute(kv),10),r=e.getCellMeta(o,i);if(!r.readOnly){let n=null;n=t.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,e.setDataAtCell(o,i,n)}}(e,t)),Sv.set(t,e)}}(t);let h=function(t){const e=t.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("tabindex","-1"),e.cloneNode(!1)}(a);const c=s.label;let d=!1;if(void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1),be(e),r===s.checkedTemplate||H(r).toLocaleLowerCase(s.locale)===H(s.checkedTemplate).toLocaleLowerCase(s.locale)?h.checked=!0:r===s.uncheckedTemplate||H(r).toLocaleLowerCase(s.locale)===H(s.uncheckedTemplate).toLocaleLowerCase(s.locale)?h.checked=!1:P(r)?ue(h,"noValue"):(h.style.display="none",ue(h,"htBadValue"),d=!0),fe(h,[[Rv,n],[kv,o]]),l&&fe(h,[st(h.checked?t.getTranslatedPhrase(dc):t.getTranslatedPhrase(uc)),pt(h.checked),["role","checkbox"]]),!d&&c){let s="";if(c.value)s="function"==typeof c.value?c.value.call(this,n,o,i,r):c.value;else if(c.property){const e=t.getDataAtRowProp(n,c.property);s=null!==e?e:""}const l=function(t,e,n){const o=t.createElement("label");o.className="htCheckboxRendererLabel "+(n?"fullWidth":"");const i=t.createTextNode(e);if(n){const e=t.createElement("span");e.appendChild(i),o.appendChild(e)}else o.appendChild(i);return o.cloneNode(!0)}(a,s,!0!==c.separated);"before"===c.position?c.separated?(e.appendChild(l),e.appendChild(h)):(l.appendChild(h),h=l):c.position&&"after"!==c.position||(c.separated?(e.appendChild(h),e.appendChild(l)):(l.insertBefore(h,l.firstChild),h=l))}function u(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=t.getSelectedRange(),o=[],i=new Map;let r=[],s=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:h}=n[a].getTopStartCorner(),{row:c,col:d}=n[a].getBottomEndCorner();for(let n=l;n<=c;n+=1)for(let a=h;a<=d;a+=1){const l=t.getCellMeta(n,a);if(l.hidden)continue;const h={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==e||l.readOnly||(i.has(o.length)?i.set(o.length,[...i.get(o.length),[n,a,null]]):i.set(o.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const c=t.getDataAtCell(n,a);!1===e?[l.checkedTemplate,l.checkedTemplate.toString()].includes(c)?r.push([n,a,l.uncheckedTemplate,h]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(c)&&r.push([n,a,l.checkedTemplate,h]):r.push([n,a,l.uncheckedTemplate,h]),s+=1}o.push(s),s=0}r=r.every(t=>{let[,,e]=t;return e===r[0][2]})?r.map(t=>{let[e,n,o]=t;return[e,n,o]}):r.map(t=>{let[e,n,,o]=t;return[e,n,o.checkedTemplate]}),r.length>0&&o.forEach((e,n)=>{let o=r.splice(0,e);i.size&&i.has(n)&&(o=[...o,...i.get(n)]),t.setDataAtCell(o)})}}function g(){const e=t.getSelectedRange();if(e){for(let n=0;n<e.length;n++){const o=e[n].getTopStartCorner(),i=e[n].getBottomEndCorner();for(let e=o.row;e<=i.row;e++)for(let n=o.col;n<=i.col;n++){if(t.getCellMeta(e,n).readOnly)continue;const o=t.getCell(e,n);if(Xe(o)){if(o.querySelectorAll("input[type=checkbox]").length>0)return!0}}}return!1}}(!c||c&&!c.separated)&&e.appendChild(h),d&&e.appendChild(a.createTextNode(yv)),Cv.has(t)||(Cv.set(t,!0),function(){const e=t.getShortcutManager().getContext("grid"),n={group:xv,relativeToGroup:mg,position:"before"};e.addShortcuts([{keys:[["space"]],callback:()=>(u(),!g()),runOnlyIf:()=>{var e;return null===(e=t.getSelectedRangeActive())||void 0===e?void 0:e.highlight.isCell()}},{keys:[["enter"]],callback:()=>(u(),!g()),runOnlyIf:()=>{const e=t.getSelectedRangeActive();return t.getSettings().enterBeginsEditing&&(null==e?void 0:e.highlight.isCell())&&!t.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(u(!0),!g()),runOnlyIf:()=>{var e;return null===(e=t.getSelectedRangeActive())||void 0===e?void 0:e.highlight.isCell()}}],n)}())}function Tv(t){return"INPUT"===t.tagName&&"checkbox"===t.getAttribute("type")}Mn.getSingleton().add("modifyAutoColumnSizeSeed",function(t,e,n){const{label:o,type:i,row:r,column:s,prop:a}=e;if(i!==Ev||!o)return;const{value:l,property:h}=o;let c=n;if(l)c="function"==typeof l?l(r,s,a,n):l;else if(h){const t=this.getDataAtRowProp(r,h);c=null!==t?t:n}return`${H(c).length}`}),Mv.RENDERER_TYPE=Ev;function _v(t,e,n,o,i,r,s){wv.apply(this,[t,e,n,o,i,r,s])}_v.RENDERER_TYPE="handsontable";const Hv={year:"numeric",month:"2-digit",day:"2-digit"};function Iv(t,e){const{dateFormat:n,locale:o,allowEmpty:i}=e;if(P(t))return i?t:yv;const r=Vb(t);if(null===r)return yv;const s=Et(n)?n:Hv;return new Intl.DateTimeFormat(o,s).format(r)}function Av(t,e,n,o,i,r,s){Sp.apply(this,[t,e,n,o,i,r,s])}Av.valueFormatter=Iv,Av.RENDERER_TYPE="intl-date";const Pv={hour:"numeric",minute:"2-digit"};function Ov(t,e,n,o,i,r,s){Sp.apply(this,[t,e,n,o,i,r,s]),e.dir="ltr"}Ov.RENDERER_TYPE="intl-time";var Nv,Dv,Lv,Vv,Bv,Fv,Wv="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function zv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}
57
+ /*!
58
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
59
+ *
60
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
61
+ * of this software and associated documentation files (the "Software"), to deal
62
+ * in the Software without restriction, including without limitation the rights
63
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
64
+ * copies of the Software, and to permit persons to whom the Software is
65
+ * furnished to do so, subject to the following conditions:
66
+ *
67
+ * The above copyright notice and this permission notice shall be included in
68
+ * all copies or substantial portions of the Software.
69
+ *
70
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
71
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
72
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
73
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
74
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
75
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
76
+ * SOFTWARE.
77
+ */function jv(){return Dv?Nv:(Dv=1,Nv={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(t){let e=t%10;return 1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}})}
78
+ /*!
79
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
80
+ *
81
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
82
+ * of this software and associated documentation files (the "Software"), to deal
83
+ * in the Software without restriction, including without limitation the rights
84
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
85
+ * copies of the Software, and to permit persons to whom the Software is
86
+ * furnished to do so, subject to the following conditions:
87
+ *
88
+ * The above copyright notice and this permission notice shall be included in
89
+ * all copies or substantial portions of the Software.
90
+ *
91
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
92
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
93
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
94
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
95
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
96
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
97
+ * SOFTWARE.
98
+ */function $v(){if(Vv)return Lv;Vv=1;const t=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function e(t){return t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function n(o,i,r,s,a,l,h){if(!isNaN(+o))return+o;let c="",d=o.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==o)return-1*n(d,i,r,s,a,l);for(let e=0;e<t.length;e++){let h=t[e];if(c=o.replace(RegExp(`([0-9 ])(${h.key})$`),"$1"),c!==o)return n(c,i,r,s,a,l)*h.factor}if(c=o.replace("%",""),c!==o)return n(c,i,r,s,a,l)/100;let u=parseFloat(o);if(isNaN(u))return;let g=s(u);if(g&&"."!==g&&(c=o.replace(new RegExp(`${e(g)}$`),""),c!==o))return n(c,i,r,s,a,l);let f={};Object.keys(l).forEach(t=>{f[l[t]]=t});let p=Object.keys(f).sort().reverse(),m=p.length;for(let t=0;t<m;t++){let e=p[t],h=f[e];if(c=o.replace(e,""),c!==o){let t;switch(h){case"thousand":t=Math.pow(10,3);break;case"million":t=Math.pow(10,6);break;case"billion":t=Math.pow(10,9);break;case"trillion":t=Math.pow(10,12)}return n(c,i,r,s,a,l)*t}}}function o(t,o,i="",r,s,a,l){if(""===t)return;if(t===s)return 0;let h=function(t,n,o){let i=t.replace(o,"");return i=i.replace(new RegExp(`([0-9])${e(n.thousands)}([0-9])`,"g"),"$1$2"),i=i.replace(n.decimal,"."),i}(t,o,i);return n(h,o,i,r,s,a)}return Lv={unformat:function(t,e){const n=qv();let i,r=n.currentDelimiters(),s=n.currentCurrency().symbol,a=n.currentOrdinal(),l=n.getZeroFormat(),h=n.currentAbbreviations();if("string"==typeof t)i=function(t,e){if(!t.indexOf(":")||":"===e.thousands)return!1;let n=t.split(":");if(3!==n.length)return!1;let o=+n[0],i=+n[1],r=+n[2];return!isNaN(o)&&!isNaN(i)&&!isNaN(r)}(t,r)?function(t){let e=t.split(":"),n=+e[0],o=+e[1];return+e[2]+60*o+3600*n}(t):o(t,r,s,a,l,h);else{if("number"!=typeof t)return;i=t}if(void 0!==i)return i}},Lv}
99
+ /*!
100
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
101
+ *
102
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
103
+ * of this software and associated documentation files (the "Software"), to deal
104
+ * in the Software without restriction, including without limitation the rights
105
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
106
+ * copies of the Software, and to permit persons to whom the Software is
107
+ * furnished to do so, subject to the following conditions:
108
+ *
109
+ * The above copyright notice and this permission notice shall be included in
110
+ * all copies or substantial portions of the Software.
111
+ *
112
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
113
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
114
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
115
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
116
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
117
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
118
+ * SOFTWARE.
119
+ */function Uv(){if(Fv)return Bv;Fv=1;let t=$v();const e=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(t,e)=>"byte"===e.output,message:"`base` must be provided only when the output is `byte`",mandatory:t=>"byte"===t.output},characteristic:{type:"number",restriction:t=>t>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(t,e)=>!0===e.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:t=>t>=0,message:"value must be positive"},{restriction:(t,e)=>!e.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:t=>t>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:(t,e)=>"percent"===e.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},o={languageTag:{type:"string",mandatory:!0,restriction:t=>t.match(e),message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function i(e){return void 0!==t.unformat(e)}function r(t,e,o,i=!1){let s=Object.keys(t).map(i=>{if(!e[i])return console.error(`${o} Invalid key: ${i}`),!1;let s=t[i],a=e[i];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!r(s,n,`[Validate ${i}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${o} ${i} type mismatched: "${a.type}" expected, "${typeof s}" provided`),!1;if(a.restrictions&&a.restrictions.length){let e=a.restrictions.length;for(let n=0;n<e;n++){let{restriction:e,message:r}=a.restrictions[n];if(!e(s,t))return console.error(`${o} ${i} invalid value: ${r}`),!1}}if(a.restriction&&!a.restriction(s,t))return console.error(`${o} ${i} invalid value: ${a.message}`),!1;if(a.validValues&&-1===a.validValues.indexOf(s))return console.error(`${o} ${i} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1;if(a.children){if(!r(s,a.children,`[Validate ${i}]`))return!1}return!0});return i||s.push(...Object.keys(e).map(n=>{let i=e[n];if("string"==typeof i&&(i={type:i}),i.mandatory){let e=i.mandatory;if("function"==typeof e&&(e=e(t)),e&&void 0===t[n])return console.error(`${o} Missing mandatory key "${n}"`),!1}return!0})),s.reduce((t,e)=>t&&e,!0)}function s(t){return r(t,n,"[Validate format]")}return Bv={validate:function(t,e){let n=i(t),o=s(e);return n&&o},validateFormat:s,validateInput:i,validateLanguage:function(t){return r(t,o,"[Validate language]")}},Bv}
120
+ /*!
121
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
122
+ *
123
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
124
+ * of this software and associated documentation files (the "Software"), to deal
125
+ * in the Software without restriction, including without limitation the rights
126
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
127
+ * copies of the Software, and to permit persons to whom the Software is
128
+ * furnished to do so, subject to the following conditions:
129
+ *
130
+ * The above copyright notice and this permission notice shall be included in
131
+ * all copies or substantial portions of the Software.
132
+ *
133
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
134
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
135
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
136
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
137
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
138
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
139
+ * SOFTWARE.
140
+ */var Yv,Gv,Kv={parseFormat:function(t,e={}){return"string"!=typeof t?t:(function(t,e){if(-1===t.indexOf("$")){if(-1===t.indexOf("%"))return-1!==t.indexOf("bd")?(e.output="byte",void(e.base="general")):-1!==t.indexOf("b")?(e.output="byte",void(e.base="binary")):-1!==t.indexOf("d")?(e.output="byte",void(e.base="decimal")):void(-1===t.indexOf(":")?-1!==t.indexOf("o")&&(e.output="ordinal"):e.output="time");e.output="percent"}else e.output="currency"}(t=function(t,e){let n=t.match(/{([^}]*)}$/);return n?(e.postfix=n[1],t.slice(0,-n[0].length)):t}(t=function(t,e){let n=t.match(/^{([^}]*)}/);return n?(e.prefix=n[1],t.slice(n[0].length)):t}(t,e),e),e),function(t,e){let n=t.match(/[1-9]+[0-9]*/);n&&(e.totalLength=+n[0])}(t,e),function(t,e){let n=t.split(".")[0].match(/0+/);n&&(e.characteristic=n[0].length)}(t,e),function(t,e){if(-1!==t.indexOf(".")){let n=t.split(".")[0];e.optionalCharacteristic=-1===n.indexOf("0")}}(t,e),function(t,e){-1!==t.indexOf("a")&&(e.average=!0)}(t,e),function(t,e){-1!==t.indexOf("K")?e.forceAverage="thousand":-1!==t.indexOf("M")?e.forceAverage="million":-1!==t.indexOf("B")?e.forceAverage="billion":-1!==t.indexOf("T")&&(e.forceAverage="trillion")}(t,e),function(t,e){let n=t.split(".")[1];if(n){let t=n.match(/0+/);t&&(e.mantissa=t[0].length)}}(t,e),function(t,e){t.match(/\[\.]/)?e.optionalMantissa=!0:t.match(/\./)&&(e.optionalMantissa=!1)}(t,e),function(t,e){const n=t.split(".")[1];n&&(e.trimMantissa=-1!==n.indexOf("["))}(t,e),function(t,e){-1!==t.indexOf(",")&&(e.thousandSeparated=!0)}(t,e),function(t,e){-1!==t.indexOf(" ")&&(e.spaceSeparated=!0,e.spaceSeparatedCurrency=!0,(e.average||e.forceAverage)&&(e.spaceSeparatedAbbreviation=!0))}(t,e),function(t,e){t.match(/^\+?\([^)]*\)$/)&&(e.negative="parenthesis"),t.match(/^\+?-/)&&(e.negative="sign")}(t,e),function(t,e){t.match(/^\+/)&&(e.forceSign=!0)}(t,e),e)}};
141
+ /*!
142
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
143
+ *
144
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
145
+ * of this software and associated documentation files (the "Software"), to deal
146
+ * in the Software without restriction, including without limitation the rights
147
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
148
+ * copies of the Software, and to permit persons to whom the Software is
149
+ * furnished to do so, subject to the following conditions:
150
+ *
151
+ * The above copyright notice and this permission notice shall be included in
152
+ * all copies or substantial portions of the Software.
153
+ *
154
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
155
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
156
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
157
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
158
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
159
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
160
+ * SOFTWARE.
161
+ */function qv(){if(Gv)return Yv;Gv=1;const t=jv(),e=Uv(),n=Kv;let o,i={},r={},s=null,a={};function l(t){o=t}function h(){return r[o]}return i.languages=()=>Object.assign({},r),i.currentLanguage=()=>o,i.currentBytes=()=>h().bytes||{},i.currentCurrency=()=>h().currency,i.currentAbbreviations=()=>h().abbreviations,i.currentDelimiters=()=>h().delimiters,i.currentOrdinal=()=>h().ordinal,i.currentDefaults=()=>Object.assign({},h().defaults,a),i.currentOrdinalDefaultFormat=()=>Object.assign({},i.currentDefaults(),h().ordinalFormat),i.currentByteDefaultFormat=()=>Object.assign({},i.currentDefaults(),h().byteFormat),i.currentPercentageDefaultFormat=()=>Object.assign({},i.currentDefaults(),h().percentageFormat),i.currentCurrencyDefaultFormat=()=>Object.assign({},i.currentDefaults(),h().currencyFormat),i.currentTimeDefaultFormat=()=>Object.assign({},i.currentDefaults(),h().timeFormat),i.setDefaults=t=>{t=n.parseFormat(t),e.validateFormat(t)&&(a=t)},i.getZeroFormat=()=>s,i.setZeroFormat=t=>s="string"==typeof t?t:null,i.hasZeroFormat=()=>null!==s,i.languageData=t=>{if(t){if(r[t])return r[t];throw new Error(`Unknown tag "${t}"`)}return h()},i.registerLanguage=(t,n=!1)=>{if(!e.validateLanguage(t))throw new Error("Invalid language data");r[t.languageTag]=t,n&&l(t.languageTag)},i.setLanguage=(e,n=t.languageTag)=>{if(!r[e]){let t=e.split("-")[0],o=Object.keys(r).find(e=>e.split("-")[0]===t);return r[o]?void l(o):void l(n)}l(e)},i.registerLanguage(t),o=t.languageTag,Yv=i}
162
+ /*!
163
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
164
+ *
165
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
166
+ * of this software and associated documentation files (the "Software"), to deal
167
+ * in the Software without restriction, including without limitation the rights
168
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
169
+ * copies of the Software, and to permit persons to whom the Software is
170
+ * furnished to do so, subject to the following conditions:
171
+ *
172
+ * The above copyright notice and this permission notice shall be included in
173
+ * all copies or substantial portions of the Software.
174
+ *
175
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
176
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
177
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
178
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
179
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
180
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
181
+ * SOFTWARE.
182
+ */
183
+ function Xv(t,e){t.forEach(t=>{let n;try{n=function(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${t}`)}catch(e){console.error(`Unable to load "${t}". No matching language file found.`)}n&&e.registerLanguage(n)})}var Zv={exports:{}};!function(t){!function(e){var n,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,r=Math.floor,s="[BigNumber Error] ",a=s+"Number primitive has more than 15 significant digits: ",l=1e14,h=14,c=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],u=1e7,g=1e9;function f(t){var e=0|t;return t>0||t===e?e:e-1}function p(t){for(var e,n,o=1,i=t.length,r=t[0]+"";o<i;){for(e=t[o++]+"",n=h-e.length;n--;e="0"+e);r+=e}for(i=r.length;48===r.charCodeAt(--i););return r.slice(0,i+1||1)}function m(t,e){var n,o,i=t.c,r=e.c,s=t.s,a=e.s,l=t.e,h=e.e;if(!s||!a)return null;if(n=i&&!i[0],o=r&&!r[0],n||o)return n?o?0:-a:s;if(s!=a)return s;if(n=s<0,o=l==h,!i||!r)return o?0:!i^n?1:-1;if(!o)return l>h^n?1:-1;for(a=(l=i.length)<(h=r.length)?l:h,s=0;s<a;s++)if(i[s]!=r[s])return i[s]>r[s]^n?1:-1;return l==h?0:l>h^n?1:-1}function b(t,e,n,o){if(t<e||t>n||t!==r(t))throw Error(s+(o||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function w(t){var e=t.c.length-1;return f(t.e/h)==e&&t.c[e]%2!=0}function v(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function y(t,e,n){var o,i;if(e<0){for(i=n+".";++e;i+=n);t=i+t}else if(++e>(o=t.length)){for(i=n,e-=o;--e;i+=n);t+=i}else e<o&&(t=t.slice(0,e)+"."+t.slice(e));return t}n=function t(e){var n,C,S,R,k,x,E,M,T,_,H=$.prototype={constructor:$,toString:null,valueOf:null},I=new $(1),A=20,P=4,O=-7,N=21,D=-1e7,L=1e7,V=!1,B=1,F=0,W={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz",j=!0;function $(t,e){var n,i,s,l,d,u,g,f,p=this;if(!(p instanceof $))return new $(t,e);if(null==e){if(t&&!0===t._isBigNumber)return p.s=t.s,void(!t.c||t.e>L?p.c=p.e=null:t.e<D?p.c=[p.e=0]:(p.e=t.e,p.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(p.s=1/t<0?(t=-t,-1):1,t===~~t){for(l=0,d=t;d>=10;d/=10,l++);return void(l>L?p.c=p.e=null:(p.e=l,p.c=[t]))}f=String(t)}else{if(!o.test(f=String(t)))return S(p,f,u);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(l=f.indexOf("."))>-1&&(f=f.replace(".","")),(d=f.search(/e/i))>0?(l<0&&(l=d),l+=+f.slice(d+1),f=f.substring(0,d)):l<0&&(l=f.length)}else{if(b(e,2,z.length,"Base"),10==e&&j)return K(p=new $(t),A+p.e+1,P);if(f=String(t),u="number"==typeof t){if(0*t!=0)return S(p,f,u,e);if(p.s=1/t<0?(f=f.slice(1),-1):1,$.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(a+t)}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=z.slice(0,e),l=d=0,g=f.length;d<g;d++)if(n.indexOf(i=f.charAt(d))<0){if("."==i){if(d>l){l=g;continue}}else if(!s&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){s=!0,d=-1,l=0;continue}return S(p,String(t),u,e)}u=!1,(l=(f=C(f,e,10,p.s)).indexOf("."))>-1?f=f.replace(".",""):l=f.length}for(d=0;48===f.charCodeAt(d);d++);for(g=f.length;48===f.charCodeAt(--g););if(f=f.slice(d,++g)){if(g-=d,u&&$.DEBUG&&g>15&&(t>c||t!==r(t)))throw Error(a+p.s*t);if((l=l-d-1)>L)p.c=p.e=null;else if(l<D)p.c=[p.e=0];else{if(p.e=l,p.c=[],d=(l+1)%h,l<0&&(d+=h),d<g){for(d&&p.c.push(+f.slice(0,d)),g-=h;d<g;)p.c.push(+f.slice(d,d+=h));d=h-(f=f.slice(d)).length}else d-=g;for(;d--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function U(t,e,n,o){var i,r,s,a,l;if(null==n?n=P:b(n,0,8),!t.c)return t.toString();if(i=t.c[0],s=t.e,null==e)l=p(t.c),l=1==o||2==o&&(s<=O||s>=N)?v(l,s):y(l,s,"0");else if(r=(t=K(new $(t),e,n)).e,a=(l=p(t.c)).length,1==o||2==o&&(e<=r||r<=O)){for(;a<e;l+="0",a++);l=v(l,r)}else if(e-=s,l=y(l,r,"0"),r+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=r-a)>0)for(r+1==a&&(l+=".");e--;l+="0");return t.s<0&&i?"-"+l:l}function Y(t,e){for(var n,o,i=1,r=new $(t[0]);i<t.length;i++)(!(o=new $(t[i])).s||(n=m(r,o))===e||0===n&&r.s===e)&&(r=o);return r}function G(t,e,n){for(var o=1,i=e.length;!e[--i];e.pop());for(i=e[0];i>=10;i/=10,o++);return(n=o+n*h-1)>L?t.c=t.e=null:n<D?t.c=[t.e=0]:(t.e=n,t.c=e),t}function K(t,e,n,o){var s,a,c,u,g,f,p,m=t.c,b=d;if(m){t:{for(s=1,u=m[0];u>=10;u/=10,s++);if((a=e-s)<0)a+=h,c=e,g=m[f=0],p=r(g/b[s-c-1]%10);else if((f=i((a+1)/h))>=m.length){if(!o)break t;for(;m.length<=f;m.push(0));g=p=0,s=1,c=(a%=h)-h+1}else{for(g=u=m[f],s=1;u>=10;u/=10,s++);p=(c=(a%=h)-h+s)<0?0:r(g/b[s-c-1]%10)}if(o=o||e<0||null!=m[f+1]||(c<0?g:g%b[s-c-1]),o=n<4?(p||o)&&(0==n||n==(t.s<0?3:2)):p>5||5==p&&(4==n||o||6==n&&(a>0?c>0?g/b[s-c]:0:m[f-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,o?(e-=t.e+1,m[0]=b[(h-e%h)%h],t.e=-e||0):m[0]=t.e=0,t;if(0==a?(m.length=f,u=1,f--):(m.length=f+1,u=b[h-a],m[f]=c>0?r(g/b[s-c]%b[c])*u:0),o)for(;;){if(0==f){for(a=1,c=m[0];c>=10;c/=10,a++);for(c=m[0]+=u,u=1;c>=10;c/=10,u++);a!=u&&(t.e++,m[0]==l&&(m[0]=1));break}if(m[f]+=u,m[f]!=l)break;m[f--]=0,u=1}for(a=m.length;0===m[--a];m.pop());}t.e>L?t.c=t.e=null:t.e<D&&(t.c=[t.e=0])}return t}function q(t){var e,n=t.e;return null===n?t.toString():(e=p(t.c),e=n<=O||n>=N?v(e,n):y(e,n,"0"),t.s<0?"-"+e:e)}return $.clone=t,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(s+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(b(n=t[e],0,g,e),A=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(b(n=t[e],0,8,e),P=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(b(n[0],-g,0,e),b(n[1],0,g,e),O=n[0],N=n[1]):(b(n,-g,g,e),O=-(N=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)b(n[0],-g,-1,e),b(n[1],1,g,e),D=n[0],L=n[1];else{if(b(n,-g,g,e),!n)throw Error(s+e+" cannot be zero: "+n);D=-(L=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(s+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw V=!n,Error(s+"crypto unavailable");V=n}else V=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(b(n=t[e],0,9,e),B=n),t.hasOwnProperty(e="POW_PRECISION")&&(b(n=t[e],0,g,e),F=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(s+e+" not an object: "+n);W=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(s+e+" invalid: "+n);j="0123456789"==n.slice(0,10),z=n}}return{DECIMAL_PLACES:A,ROUNDING_MODE:P,EXPONENTIAL_AT:[O,N],RANGE:[D,L],CRYPTO:V,MODULO_MODE:B,POW_PRECISION:F,FORMAT:W,ALPHABET:z}},$.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!$.DEBUG)return!0;var e,n,o=t.c,i=t.e,a=t.s;t:if("[object Array]"=={}.toString.call(o)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===r(i)){if(0===o[0]){if(0===i&&1===o.length)return!0;break t}if((e=(i+1)%h)<1&&(e+=h),String(o[0]).length==e){for(e=0;e<o.length;e++)if((n=o[e])<0||n>=l||n!==r(n))break t;if(0!==n)return!0}}}else if(null===o&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(s+"Invalid BigNumber: "+t)},$.maximum=$.max=function(){return Y(arguments,-1)},$.minimum=$.min=function(){return Y(arguments,1)},$.random=(R=9007199254740992,k=Math.random()*R&2097151?function(){return r(Math.random()*R)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,o,a,l,c=0,u=[],f=new $(I);if(null==t?t=A:b(t,0,g),a=i(t/h),V)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(a*=2));c<a;)(l=131072*e[c]+(e[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[c]=n[0],e[c+1]=n[1]):(u.push(l%1e14),c+=2);c=a/2}else{if(!crypto.randomBytes)throw V=!1,Error(s+"crypto unavailable");for(e=crypto.randomBytes(a*=7);c<a;)(l=281474976710656*(31&e[c])+1099511627776*e[c+1]+4294967296*e[c+2]+16777216*e[c+3]+(e[c+4]<<16)+(e[c+5]<<8)+e[c+6])>=9e15?crypto.randomBytes(7).copy(e,c):(u.push(l%1e14),c+=7);c=a/7}if(!V)for(;c<a;)(l=k())<9e15&&(u[c++]=l%1e14);for(a=u[--c],t%=h,a&&t&&(l=d[h-t],u[c]=r(a/l)*l);0===u[c];u.pop(),c--);if(c<0)u=[o=0];else{for(o=-1;0===u[0];u.splice(0,1),o-=h);for(c=1,l=u[0];l>=10;l/=10,c++);c<h&&(o-=h-c)}return f.e=o,f.c=u,f}),$.sum=function(){for(var t=1,e=arguments,n=new $(e[0]);t<e.length;)n=n.plus(e[t++]);return n},C=function(){var t="0123456789";function e(t,e,n,o){for(var i,r,s=[0],a=0,l=t.length;a<l;){for(r=s.length;r--;s[r]*=e);for(s[0]+=o.indexOf(t.charAt(a++)),i=0;i<s.length;i++)s[i]>n-1&&(null==s[i+1]&&(s[i+1]=0),s[i+1]+=s[i]/n|0,s[i]%=n)}return s.reverse()}return function(o,i,r,s,a){var l,h,c,d,u,g,f,m,b=o.indexOf("."),w=A,v=P;for(b>=0&&(d=F,F=0,o=o.replace(".",""),g=(m=new $(i)).pow(o.length-b),F=d,m.c=e(y(p(g.c),g.e,"0"),10,r,t),m.e=m.c.length),c=d=(f=e(o,i,r,a?(l=z,t):(l=t,z))).length;0==f[--d];f.pop());if(!f[0])return l.charAt(0);if(b<0?--c:(g.c=f,g.e=c,g.s=s,f=(g=n(g,m,w,v,r)).c,u=g.r,c=g.e),b=f[h=c+w+1],d=r/2,u=u||h<0||null!=f[h+1],u=v<4?(null!=b||u)&&(0==v||v==(g.s<0?3:2)):b>d||b==d&&(4==v||u||6==v&&1&f[h-1]||v==(g.s<0?8:7)),h<1||!f[0])o=u?y(l.charAt(1),-w,l.charAt(0)):l.charAt(0);else{if(f.length=h,u)for(--r;++f[--h]>r;)f[h]=0,h||(++c,f=[1].concat(f));for(d=f.length;!f[--d];);for(b=0,o="";b<=d;o+=l.charAt(f[b++]));o=y(o,c,l.charAt(0))}return o}}(),n=function(){function t(t,e,n){var o,i,r,s,a=0,l=t.length,h=e%u,c=e/u|0;for(t=t.slice();l--;)a=((i=h*(r=t[l]%u)+(o=c*r+(s=t[l]/u|0)*h)%u*u+a)/n|0)+(o/u|0)+c*s,t[l]=i%n;return a&&(t=[a].concat(t)),t}function e(t,e,n,o){var i,r;if(n!=o)r=n>o?1:-1;else for(i=r=0;i<n;i++)if(t[i]!=e[i]){r=t[i]>e[i]?1:-1;break}return r}function n(t,e,n,o){for(var i=0;n--;)t[n]-=i,i=t[n]<e[n]?1:0,t[n]=i*o+t[n]-e[n];for(;!t[0]&&t.length>1;t.splice(0,1));}return function(o,i,s,a,c){var d,u,g,p,m,b,w,v,y,C,S,R,k,x,E,M,T,_=o.s==i.s?1:-1,H=o.c,I=i.c;if(!(H&&H[0]&&I&&I[0]))return new $(o.s&&i.s&&(H?!I||H[0]!=I[0]:I)?H&&0==H[0]||!I?0*_:_/0:NaN);for(y=(v=new $(_)).c=[],_=s+(u=o.e-i.e)+1,c||(c=l,u=f(o.e/h)-f(i.e/h),_=_/h|0),g=0;I[g]==(H[g]||0);g++);if(I[g]>(H[g]||0)&&u--,_<0)y.push(1),p=!0;else{for(x=H.length,M=I.length,g=0,_+=2,(m=r(c/(I[0]+1)))>1&&(I=t(I,m,c),H=t(H,m,c),M=I.length,x=H.length),k=M,S=(C=H.slice(0,M)).length;S<M;C[S++]=0);T=I.slice(),T=[0].concat(T),E=I[0],I[1]>=c/2&&E++;do{if(m=0,(d=e(I,C,M,S))<0){if(R=C[0],M!=S&&(R=R*c+(C[1]||0)),(m=r(R/E))>1)for(m>=c&&(m=c-1),w=(b=t(I,m,c)).length,S=C.length;1==e(b,C,w,S);)m--,n(b,M<w?T:I,w,c),w=b.length,d=1;else 0==m&&(d=m=1),w=(b=I.slice()).length;if(w<S&&(b=[0].concat(b)),n(C,b,S,c),S=C.length,-1==d)for(;e(I,C,M,S)<1;)m++,n(C,M<S?T:I,S,c),S=C.length}else 0===d&&(m++,C=[0]);y[g++]=m,C[0]?C[S++]=H[k]||0:(C=[H[k]],S=1)}while((k++<x||null!=C[0])&&_--);p=null!=C[0],y[0]||y.splice(0,1)}if(c==l){for(g=1,_=y[0];_>=10;_/=10,g++);K(v,s+(v.e=g+u*h-1)+1,a,p)}else v.e=u,v.r=+p;return v}}(),x=/^(-?)0([xbo])(?=\w[\w.]*$)/i,E=/^([^.]+)\.$/,M=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,_=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(t,e,n,o){var i,r=n?e:e.replace(_,"");if(T.test(r))t.s=isNaN(r)?null:r<0?-1:1;else{if(!n&&(r=r.replace(x,function(t,e,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,o&&o!=i?t:e}),o&&(i=o,r=r.replace(E,"$1").replace(M,"0.$1")),e!=r))return new $(r,i);if($.DEBUG)throw Error(s+"Not a"+(o?" base "+o:"")+" number: "+e);t.s=null}t.c=t.e=null},H.absoluteValue=H.abs=function(){var t=new $(this);return t.s<0&&(t.s=1),t},H.comparedTo=function(t,e){return m(this,new $(t,e))},H.decimalPlaces=H.dp=function(t,e){var n,o,i,r=this;if(null!=t)return b(t,0,g),null==e?e=P:b(e,0,8),K(new $(r),t+r.e+1,e);if(!(n=r.c))return null;if(o=((i=n.length-1)-f(this.e/h))*h,i=n[i])for(;i%10==0;i/=10,o--);return o<0&&(o=0),o},H.dividedBy=H.div=function(t,e){return n(this,new $(t,e),A,P)},H.dividedToIntegerBy=H.idiv=function(t,e){return n(this,new $(t,e),0,1)},H.exponentiatedBy=H.pow=function(t,e){var n,o,a,l,c,d,u,g,f=this;if((t=new $(t)).c&&!t.isInteger())throw Error(s+"Exponent not an integer: "+q(t));if(null!=e&&(e=new $(e)),c=t.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!t.c||!t.c[0])return g=new $(Math.pow(+q(f),c?t.s*(2-w(t)):+q(t))),e?g.mod(e):g;if(d=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new $(NaN);(o=!d&&f.isInteger()&&e.isInteger())&&(f=f.mod(e))}else{if(t.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||c&&f.c[1]>=24e7:f.c[0]<8e13||c&&f.c[0]<=9999975e7)))return l=f.s<0&&w(t)?-0:0,f.e>-1&&(l=1/l),new $(d?1/l:l);F&&(l=i(F/h+2))}for(c?(n=new $(.5),d&&(t.s=1),u=w(t)):u=(a=Math.abs(+q(t)))%2,g=new $(I);;){if(u){if(!(g=g.times(f)).c)break;l?g.c.length>l&&(g.c.length=l):o&&(g=g.mod(e))}if(a){if(0===(a=r(a/2)))break;u=a%2}else if(K(t=t.times(n),t.e+1,1),t.e>14)u=w(t);else{if(0===(a=+q(t)))break;u=a%2}f=f.times(f),l?f.c&&f.c.length>l&&(f.c.length=l):o&&(f=f.mod(e))}return o?g:(d&&(g=I.div(g)),e?g.mod(e):l?K(g,F,P,void 0):g)},H.integerValue=function(t){var e=new $(this);return null==t?t=P:b(t,0,8),K(e,e.e+1,t)},H.isEqualTo=H.eq=function(t,e){return 0===m(this,new $(t,e))},H.isFinite=function(){return!!this.c},H.isGreaterThan=H.gt=function(t,e){return m(this,new $(t,e))>0},H.isGreaterThanOrEqualTo=H.gte=function(t,e){return 1===(e=m(this,new $(t,e)))||0===e},H.isInteger=function(){return!!this.c&&f(this.e/h)>this.c.length-2},H.isLessThan=H.lt=function(t,e){return m(this,new $(t,e))<0},H.isLessThanOrEqualTo=H.lte=function(t,e){return-1===(e=m(this,new $(t,e)))||0===e},H.isNaN=function(){return!this.s},H.isNegative=function(){return this.s<0},H.isPositive=function(){return this.s>0},H.isZero=function(){return!!this.c&&0==this.c[0]},H.minus=function(t,e){var n,o,i,r,s=this,a=s.s;if(e=(t=new $(t,e)).s,!a||!e)return new $(NaN);if(a!=e)return t.s=-e,s.plus(t);var c=s.e/h,d=t.e/h,u=s.c,g=t.c;if(!c||!d){if(!u||!g)return u?(t.s=-e,t):new $(g?s:NaN);if(!u[0]||!g[0])return g[0]?(t.s=-e,t):new $(u[0]?s:3==P?-0:0)}if(c=f(c),d=f(d),u=u.slice(),a=c-d){for((r=a<0)?(a=-a,i=u):(d=c,i=g),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(o=(r=(a=u.length)<(e=g.length))?a:e,a=e=0;e<o;e++)if(u[e]!=g[e]){r=u[e]<g[e];break}if(r&&(i=u,u=g,g=i,t.s=-t.s),(e=(o=g.length)-(n=u.length))>0)for(;e--;u[n++]=0);for(e=l-1;o>a;){if(u[--o]<g[o]){for(n=o;n&&!u[--n];u[n]=e);--u[n],u[o]+=l}u[o]-=g[o]}for(;0==u[0];u.splice(0,1),--d);return u[0]?G(t,u,d):(t.s=3==P?-1:1,t.c=[t.e=0],t)},H.modulo=H.mod=function(t,e){var o,i,r=this;return t=new $(t,e),!r.c||!t.s||t.c&&!t.c[0]?new $(NaN):!t.c||r.c&&!r.c[0]?new $(r):(9==B?(i=t.s,t.s=1,o=n(r,t,0,3),t.s=i,o.s*=i):o=n(r,t,0,B),(t=r.minus(o.times(t))).c[0]||1!=B||(t.s=r.s),t)},H.multipliedBy=H.times=function(t,e){var n,o,i,r,s,a,c,d,g,p,m,b,w,v,y,C=this,S=C.c,R=(t=new $(t,e)).c;if(!(S&&R&&S[0]&&R[0]))return!C.s||!t.s||S&&!S[0]&&!R||R&&!R[0]&&!S?t.c=t.e=t.s=null:(t.s*=C.s,S&&R?(t.c=[0],t.e=0):t.c=t.e=null),t;for(o=f(C.e/h)+f(t.e/h),t.s*=C.s,(c=S.length)<(p=R.length)&&(w=S,S=R,R=w,i=c,c=p,p=i),i=c+p,w=[];i--;w.push(0));for(v=l,y=u,i=p;--i>=0;){for(n=0,m=R[i]%y,b=R[i]/y|0,r=i+(s=c);r>i;)n=((d=m*(d=S[--s]%y)+(a=b*d+(g=S[s]/y|0)*m)%y*y+w[r]+n)/v|0)+(a/y|0)+b*g,w[r--]=d%v;w[r]=n}return n?++o:w.splice(0,1),G(t,w,o)},H.negated=function(){var t=new $(this);return t.s=-t.s||null,t},H.plus=function(t,e){var n,o=this,i=o.s;if(e=(t=new $(t,e)).s,!i||!e)return new $(NaN);if(i!=e)return t.s=-e,o.minus(t);var r=o.e/h,s=t.e/h,a=o.c,c=t.c;if(!r||!s){if(!a||!c)return new $(i/0);if(!a[0]||!c[0])return c[0]?t:new $(a[0]?o:0*i)}if(r=f(r),s=f(s),a=a.slice(),i=r-s){for(i>0?(s=r,n=c):(i=-i,n=a),n.reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(e=c.length)<0&&(n=c,c=a,a=n,e=i),i=0;e;)i=(a[--e]=a[e]+c[e]+i)/l|0,a[e]=l===a[e]?0:a[e]%l;return i&&(a=[i].concat(a),++s),G(t,a,s)},H.precision=H.sd=function(t,e){var n,o,i,r=this;if(null!=t&&t!==!!t)return b(t,1,g),null==e?e=P:b(e,0,8),K(new $(r),t,e);if(!(n=r.c))return null;if(o=(i=n.length-1)*h+1,i=n[i]){for(;i%10==0;i/=10,o--);for(i=n[0];i>=10;i/=10,o++);}return t&&r.e+1>o&&(o=r.e+1),o},H.shiftedBy=function(t){return b(t,-9007199254740991,c),this.times("1e"+t)},H.squareRoot=H.sqrt=function(){var t,e,o,i,r,s=this,a=s.c,l=s.s,h=s.e,c=A+4,d=new $("0.5");if(1!==l||!a||!a[0])return new $(!l||l<0&&(!a||a[0])?NaN:a?s:1/0);if(0==(l=Math.sqrt(+q(s)))||l==1/0?(((e=p(a)).length+h)%2==0&&(e+="0"),l=Math.sqrt(+e),h=f((h+1)/2)-(h<0||h%2),o=new $(e=l==1/0?"5e"+h:(e=l.toExponential()).slice(0,e.indexOf("e")+1)+h)):o=new $(l+""),o.c[0])for((l=(h=o.e)+c)<3&&(l=0);;)if(r=o,o=d.times(r.plus(n(s,r,c,1))),p(r.c).slice(0,l)===(e=p(o.c)).slice(0,l)){if(o.e<h&&--l,"9999"!=(e=e.slice(l-3,l+1))&&(i||"4999"!=e)){+e&&(+e.slice(1)||"5"!=e.charAt(0))||(K(o,o.e+A+2,1),t=!o.times(o).eq(s));break}if(!i&&(K(r,r.e+A+2,0),r.times(r).eq(s))){o=r;break}c+=4,l+=4,i=1}return K(o,o.e+A+1,P,t)},H.toExponential=function(t,e){return null!=t&&(b(t,0,g),t++),U(this,t,e,1)},H.toFixed=function(t,e){return null!=t&&(b(t,0,g),t=t+this.e+1),U(this,t,e)},H.toFormat=function(t,e,n){var o,i=this;if(null==n)null!=t&&e&&"object"==typeof e?(n=e,e=null):t&&"object"==typeof t?(n=t,t=e=null):n=W;else if("object"!=typeof n)throw Error(s+"Argument not an object: "+n);if(o=i.toFixed(t,e),i.c){var r,a=o.split("."),l=+n.groupSize,h=+n.secondaryGroupSize,c=n.groupSeparator||"",d=a[0],u=a[1],g=i.s<0,f=g?d.slice(1):d,p=f.length;if(h&&(r=l,l=h,h=r,p-=r),l>0&&p>0){for(r=p%l||l,d=f.substr(0,r);r<p;r+=l)d+=c+f.substr(r,l);h>0&&(d+=c+f.slice(r)),g&&(d="-"+d)}o=u?d+(n.decimalSeparator||"")+((h=+n.fractionGroupSize)?u.replace(new RegExp("\\d{"+h+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):u):d}return(n.prefix||"")+o+(n.suffix||"")},H.toFraction=function(t){var e,o,i,r,a,l,c,u,g,f,m,b,w=this,v=w.c;if(null!=t&&(!(c=new $(t)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(s+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+q(c));if(!v)return new $(w);for(e=new $(I),g=o=new $(I),i=u=new $(I),b=p(v),a=e.e=b.length-w.e-1,e.c[0]=d[(l=a%h)<0?h+l:l],t=!t||c.comparedTo(e)>0?a>0?e:g:c,l=L,L=1/0,c=new $(b),u.c[0]=0;f=n(c,e,0,1),1!=(r=o.plus(f.times(i))).comparedTo(t);)o=i,i=r,g=u.plus(f.times(r=g)),u=r,e=c.minus(f.times(r=e)),c=r;return r=n(t.minus(o),i,0,1),u=u.plus(r.times(g)),o=o.plus(r.times(i)),u.s=g.s=w.s,m=n(g,i,a*=2,P).minus(w).abs().comparedTo(n(u,o,a,P).minus(w).abs())<1?[g,i]:[u,o],L=l,m},H.toNumber=function(){return+q(this)},H.toPrecision=function(t,e){return null!=t&&b(t,1,g),U(this,t,e,2)},H.toString=function(t){var e,n=this,o=n.s,i=n.e;return null===i?o?(e="Infinity",o<0&&(e="-"+e)):e="NaN":(null==t?e=i<=O||i>=N?v(p(n.c),i):y(p(n.c),i,"0"):10===t&&j?e=y(p((n=K(new $(n),A+i+1,P)).c),n.e,"0"):(b(t,2,z.length,"Base"),e=C(y(p(n.c),i,"0"),10,t,o,!0)),o<0&&n.c[0]&&(e="-"+e)),e},H.valueOf=H.toJSON=function(){return q(this)},H._isBigNumber=!0,null!=e&&$.set(e),$}(),n.default=n.BigNumber=n,t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(Wv)}(Zv);var Jv=Zv.exports;
184
+ /*!
185
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
186
+ *
187
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
188
+ * of this software and associated documentation files (the "Software"), to deal
189
+ * in the Software without restriction, including without limitation the rights
190
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
191
+ * copies of the Software, and to permit persons to whom the Software is
192
+ * furnished to do so, subject to the following conditions:
193
+ *
194
+ * The above copyright notice and this permission notice shall be included in
195
+ * all copies or substantial portions of the Software.
196
+ *
197
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
198
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
199
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
200
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
201
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
202
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
203
+ * SOFTWARE.
204
+ */const Qv=qv(),ty=Uv(),ey=Kv,ny=Jv,oy={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},iy={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:ry,decimalSuffixes:sy}=Qv.currentBytes(),ay={general:{scale:1024,suffixes:sy},binary:{scale:1024,suffixes:ry},decimal:{scale:1e3,suffixes:sy}};function ly(t,e={},n){if("string"==typeof e&&(e=ey.parseFormat(e)),!ty.validateFormat(e))return"ERROR: invalid format";let o=e.prefix||"",i=e.postfix||"",r=function(t,e,n){switch(e.output){case"currency":return function(t,e,n){const o=n.currentCurrency();let i,r=Object.assign({},e),s=Object.assign({},iy,r),a="",l=!!s.totalLength||!!s.forceAverage||s.average,h=r.currencyPosition||o.position,c=r.currencySymbol||o.symbol;const d=void 0!==s.spaceSeparatedCurrency?s.spaceSeparatedCurrency:s.spaceSeparated;void 0===r.lowPrecision&&(r.lowPrecision=!1);d&&(a=" ");"infix"===h&&(i=a+c+a);let u=uy({instance:t,providedFormat:r,state:n,decimalSeparator:i});"prefix"===h&&(u=t._value<0&&"sign"===s.negative?`-${a}${c}${u.slice(1)}`:t._value>0&&s.forceSign?`+${a}${c}${u.slice(1)}`:c+a+u);h&&"postfix"!==h||(a=!s.spaceSeparatedAbbreviation&&l?"":a,u=u+a+c);return u}(t,e=gy(e,Qv.currentCurrencyDefaultFormat()),Qv);case"percent":return function(t,e,n,o){let i=e.prefixSymbol,r=uy({instance:o(100*t._value),providedFormat:e,state:n}),s=Object.assign({},iy,e);if(i)return`%${s.spaceSeparated?" ":""}${r}`;return`${r}${s.spaceSeparated?" ":""}%`}(t,e=gy(e,Qv.currentPercentageDefaultFormat()),Qv,n);case"byte":return function(t,e,n,o){let i=e.base||"binary",r=Object.assign({},iy,e);const{binarySuffixes:s,decimalSuffixes:a}=n.currentBytes();let l={general:{scale:1024,suffixes:a||sy,marker:"bd"},binary:{scale:1024,suffixes:s||ry,marker:"b"},decimal:{scale:1e3,suffixes:a||sy,marker:"d"}}[i],{value:h,suffix:c}=hy(t._value,l.suffixes,l.scale),d=uy({instance:o(h),providedFormat:e,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${r.spaceSeparated?" ":""}${c}`}(t,e=gy(e,Qv.currentByteDefaultFormat()),Qv,n);case"time":return e=gy(e,Qv.currentTimeDefaultFormat()),function(t){let e=Math.floor(t._value/60/60),n=Math.floor((t._value-60*e*60)/60),o=Math.round(t._value-60*e*60-60*n);return`${e}:${n<10?"0":""}${n}:${o<10?"0":""}${o}`}(t);case"ordinal":return function(t,e,n){let o=n.currentOrdinal(),i=Object.assign({},iy,e),r=uy({instance:t,providedFormat:e,state:n}),s=o(t._value);return`${r}${i.spaceSeparated?" ":""}${s}`}(t,e=gy(e,Qv.currentOrdinalDefaultFormat()),Qv);default:return uy({instance:t,providedFormat:e})}}(t,e,n);return r=function(t,e){return e+t}(r,o),r=function(t,e){return t+e}(r,i),r}function hy(t,e,n){let o=e[0],i=Math.abs(t);if(i>=n){for(let r=1;r<e.length;++r){let s=Math.pow(n,r),a=Math.pow(n,r+1);if(i>=s&&i<a){o=e[r],t/=s;break}}o===e[0]&&(t/=Math.pow(n,e.length-1),o=e[e.length-1])}return{value:t,suffix:o}}function cy(t){let e="";for(let n=0;n<t;n++)e+="0";return e}function dy(t,e,n=Math.round){if(-1!==t.toString().indexOf("e"))return function(t,e){let n=t.toString(),[o,i]=n.split("e"),[r,s=""]=o.split(".");if(+i>0)n=r+s+cy(i-s.length);else{let t=".";t=+r<0?`-0${t}`:`0${t}`;let o=(cy(-i-1)+Math.abs(r)+s).substr(0,e);o.length<e&&(o+=cy(e-o.length)),n=t+o}return+i>0&&e>0&&(n+=`.${cy(e)}`),n}(t,e);return new ny(n(+`${t}e+${e}`)/Math.pow(10,e)).toFixed(e)}function uy({instance:t,providedFormat:e,state:n=Qv,decimalSeparator:o,defaults:i=n.currentDefaults()}){let r=t._value;if(0===r&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(r))return r.toString();let s=Object.assign({},iy,i,e),a=s.totalLength,l=a?0:s.characteristic,h=s.optionalCharacteristic,c=s.forceAverage,d=s.lowPrecision,u=!!a||!!c||s.average,g=a?-1:u&&void 0===e.mantissa?0:s.mantissa,f=!a&&(void 0===e.optionalMantissa?-1===g:s.optionalMantissa),p=s.trimMantissa,m=s.thousandSeparated,b=s.spaceSeparated,w=s.negative,v=s.forceSign,y=s.exponential,C=s.roundingFunction,S="";if(u){let t=function({value:t,forceAverage:e,lowPrecision:n=!0,abbreviations:o,spaceSeparated:i=!1,totalLength:r=0,roundingFunction:s=Math.round}){let a="",l=Math.abs(t),h=-1;if(e&&o[e]&&oy[e]?(a=o[e],t/=oy[e]):l>=oy.trillion||n&&1===s(l/oy.trillion)?(a=o.trillion,t/=oy.trillion):l<oy.trillion&&l>=oy.billion||n&&1===s(l/oy.billion)?(a=o.billion,t/=oy.billion):l<oy.billion&&l>=oy.million||n&&1===s(l/oy.million)?(a=o.million,t/=oy.million):(l<oy.million&&l>=oy.thousand||n&&1===s(l/oy.thousand))&&(a=o.thousand,t/=oy.thousand),a&&(a=(i?" ":"")+a),r){let e=t<0,n=t.toString().split(".")[0],o=e?n.length-1:n.length;h=Math.max(r-o,0)}return{value:t,abbreviation:a,mantissaPrecision:h}}({value:r,forceAverage:c,lowPrecision:d,abbreviations:n.currentAbbreviations(),spaceSeparated:b,roundingFunction:C,totalLength:a});r=t.value,S+=t.abbreviation,a&&(g=t.mantissaPrecision)}if(y){let t=function({value:t,characteristicPrecision:e}){let[n,o]=t.toExponential().split("e"),i=+n;return e?(1<e&&(i*=Math.pow(10,e-1),o=+o-(e-1),o=o>=0?`+${o}`:o),{value:i,abbreviation:`e${o}`}):{value:i,abbreviation:`e${o}`}}({value:r,characteristicPrecision:l});r=t.value,S=t.abbreviation+S}let R=function(t,e,n,o,i,r){if(-1===o)return t;let s=dy(e,o,r),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(n||i))return a;let h=l.match(/0+$/);return i&&h?`${a}.${l.toString().slice(0,h.index)}`:s.toString()}(r.toString(),r,f,g,p,C);return R=function(t,e,n,o){let i=t,[r,s]=i.toString().split(".");if(r.match(/^-?0$/)&&n)return s?`${r.replace("0","")}.${s}`:r.replace("0","");const a=e<0&&0===r.indexOf("-");if(a&&(r=r.slice(1),i=i.slice(1)),r.length<o){let t=o-r.length;for(let e=0;e<t;e++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}(R,r,h,l),R=function(t,e,n,o,i){let r=o.currentDelimiters(),s=r.thousands;i=i||r.decimal;let a=r.thousandsSize||3,l=t.toString(),h=l.split(".")[0],c=l.split(".")[1];const d=e<0&&0===h.indexOf("-");if(n){d&&(h=h.slice(1));let t=function(t,e){let n=[],o=0;for(let i=t;i>0;i--)o===e&&(n.unshift(i),o=0),o++;return n}(h.length,a);t.forEach((t,e)=>{h=h.slice(0,t+e)+s+h.slice(t+e)}),d&&(h=`-${h}`)}return l=c?h+i+c:h,l}(R,r,m,n,o),(u||y)&&(R=function(t,e){return t+e}(R,S)),(v||r<0)&&(R=function(t,e,n){return 0===e?t:0===+t?t.replace("-",""):e>0?`+${t}`:"sign"===n?t:`(${t.replace("-","")})`}(R,r,w)),R}function gy(t,e){if(!t)return e;let n=Object.keys(t);return 1===n.length&&"output"===n[0]?e:t}
205
+ /*!
206
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
207
+ *
208
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
209
+ * of this software and associated documentation files (the "Software"), to deal
210
+ * in the Software without restriction, including without limitation the rights
211
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
212
+ * copies of the Software, and to permit persons to whom the Software is
213
+ * furnished to do so, subject to the following conditions:
214
+ *
215
+ * The above copyright notice and this permission notice shall be included in
216
+ * all copies or substantial portions of the Software.
217
+ *
218
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
219
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
220
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
221
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
222
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
223
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
224
+ * SOFTWARE.
225
+ */
226
+ const fy=Jv;function py(t,e,n){let o=new fy(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new fy(i),t._value=o.minus(i).toNumber(),t}
227
+ /*!
228
+ * Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
229
+ *
230
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
231
+ * of this software and associated documentation files (the "Software"), to deal
232
+ * in the Software without restriction, including without limitation the rights
233
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
234
+ * copies of the Software, and to permit persons to whom the Software is
235
+ * furnished to do so, subject to the following conditions:
236
+ *
237
+ * The above copyright notice and this permission notice shall be included in
238
+ * all copies or substantial portions of the Software.
239
+ *
240
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
241
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
242
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
243
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
244
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
245
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
246
+ * SOFTWARE.
247
+ */
248
+ const my=qv(),by=Uv(),wy=(t=>({loadLanguagesInNode:e=>Xv(e,t)}))(xy),vy=$v();let yy=(t=>({format:(...e)=>ly(...e,t),getByteUnit:(...e)=>function(t){let e=ay.general;return hy(t._value,e.suffixes,e.scale).suffix}(...e,t),getBinaryByteUnit:(...e)=>function(t){let e=ay.binary;return hy(t._value,e.suffixes,e.scale).suffix}(...e,t),getDecimalByteUnit:(...e)=>function(t){let e=ay.decimal;return hy(t._value,e.suffixes,e.scale).suffix}(...e,t),formatOrDefault:gy}))(xy),Cy=(t=>({add:(e,n)=>function(t,e,n){let o=new fy(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new fy(i),t._value=o.plus(i).toNumber(),t}(e,n,t),subtract:(e,n)=>py(e,n,t),multiply:(e,n)=>function(t,e,n){let o=new fy(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new fy(i),t._value=o.times(i).toNumber(),t}(e,n,t),divide:(e,n)=>function(t,e,n){let o=new fy(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new fy(i),t._value=o.dividedBy(i).toNumber(),t}(e,n,t),set:(e,n)=>function(t,e,n){let o=e;return n.isNumbro(e)&&(o=e._value),t._value=o,t}(e,n,t),difference:(e,n)=>function(t,e,n){let o=n(t._value);return py(o,e,n),Math.abs(o._value)}(e,n,t),BigNumber:fy}))(xy);const Sy=Kv;class Ry{constructor(t){this._value=t}clone(){return xy(this._value)}format(t={}){return yy.format(this,t)}formatCurrency(t){return"string"==typeof t&&(t=Sy.parseFormat(t)),(t=yy.formatOrDefault(t,my.currentCurrencyDefaultFormat())).output="currency",yy.format(this,t)}formatTime(t={}){return t.output="time",yy.format(this,t)}binaryByteUnits(){return yy.getBinaryByteUnit(this)}decimalByteUnits(){return yy.getDecimalByteUnit(this)}byteUnits(){return yy.getByteUnit(this)}difference(t){return Cy.difference(this,t)}add(t){return Cy.add(this,t)}subtract(t){return Cy.subtract(this,t)}multiply(t){return Cy.multiply(this,t)}divide(t){return Cy.divide(this,t)}set(t){return Cy.set(this,ky(t))}value(){return this._value}valueOf(){return this._value}}function ky(t){let e=t;return xy.isNumbro(t)?e=t._value:"string"==typeof t?e=xy.unformat(t):isNaN(t)&&(e=NaN),e}function xy(t){return new Ry(ky(t))}xy.version="2.5.0",xy.isNumbro=function(t){return t instanceof Ry},xy.language=my.currentLanguage,xy.registerLanguage=my.registerLanguage,xy.setLanguage=my.setLanguage,xy.languages=my.languages,xy.languageData=my.languageData,xy.zeroFormat=my.setZeroFormat,xy.defaultFormat=my.currentDefaults,xy.setDefaults=my.setDefaults,xy.defaultCurrencyFormat=my.currentCurrencyDefaultFormat,xy.validate=by.validate,xy.loadLanguagesInNode=wy.loadLanguagesInNode,xy.unformat=vy.unformat,xy.BigNumber=Cy.BigNumber;var Ey=zv(xy);const My={useGrouping:!1,maximumFractionDigits:20};function Ty(t){const{numericFormat:e}=t;return void 0!==(null==e?void 0:e.pattern)||void 0!==(null==e?void 0:e.culture)}const _y=new WeakSet;function Hy(t,e){return so(t)&&(t=Ty(e)?function(t,e){const{numericFormat:n}=e,o=n&&n.culture||"-",i=n&&n.pattern;if(void 0!==o&&!Ey.languages()[o]){const t=o.replace("-",""),e=Ey.allLanguages?Ey.allLanguages[o]:Ey[t];e&&Ey.registerLanguage(e)}return Ey.setLanguage(o),Ey(t).format(i||"0")}(t,e):function(t,e){const{numericFormat:n,locale:o}=e;return new Intl.NumberFormat(o,null!=n?n:My).format(t)}(t,e)),t}function Iy(t,e,n,o,i,r,s){if(Ty(s)&&!_y.has(s.instance)&&(_y.add(s.instance),te("The `numericFormat.pattern` and `numericFormat.culture` options are deprecated and will be removed in the next major release. Pass `Intl.NumberFormat` options directly to `numericFormat` and use the `locale` cell property instead of `culture`.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`numericFormat` documentation: https://handsontable.com/docs/api/options/#numericformat\n`locale` documentation: https://handsontable.com/docs/api/options/#locale")),so(t.getDataAtCell(n,o))){let t=[];if(Array.isArray(s.className))t=s.className;else{var a;const e=null!==(a=s.className)&&void 0!==a?a:"";e.length&&(t=e.split(" "))}t.indexOf("htLeft")<0&&t.indexOf("htCenter")<0&&t.indexOf("htRight")<0&&t.indexOf("htJustify")<0&&t.push("htRight"),t.indexOf("htNumeric")<0&&t.push("htNumeric"),s.className=t.join(" "),e.dir="ltr"}Sp.apply(this,[t,e,n,o,i,r,s])}Iy.valueFormatter=Hy,Iy.RENDERER_TYPE="numeric";function Ay(t,e,n,o,i,r){Ce(e,r,t.getSettings().sanitizer)}Ay.valueFormatter=function(t,e){const n=e.hashLength||H(t).length,o=e.hashSymbol||"*";let i="";for(let t=0;t<n;t++)i+=o;return i},Ay.RENDERER_TYPE="password";function Py(t,e,n,o,i,r,s){Sp.apply(this,[t,e,n,o,i,r,s])}Py.RENDERER_TYPE="select";const Oy=new WeakSet;function Ny(t,e,n,o,i,r,s){Oy.has(s.instance)||"string"!=typeof s.timeFormat||(Oy.add(s.instance),te("The `time` cell type with string-based `timeFormat` (moment.js) is deprecated. In the next major release, `time` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-time` cell type now; it will become the `time` cell type after the next major release (the `intl-time` will become an alias for `time`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`time` cell type: https://handsontable.com/docs/time-cell-type/")),Sp.apply(this,[t,e,n,o,i,r,s]),e.dir="ltr"}Ny.RENDERER_TYPE="time";function Dy(t,e){const n=t=>{return Et(e=t)&&I(e.key)&&I(e.value)?n(t.key)&&n(t.value):null==t;var e};let o=t;n(o)&&(o=""),this.allowEmpty&&""===o?e(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,Ly(o,e)):Ly(o,e)(this.source):e(!0)}function Ly(t,e){const n=t;return function(t){let o=!1;for(let e=0,i=t.length;e<i;e++)if(xt(n,t[e])){o=!0;break}e(o)}}Dy.VALIDATOR_TYPE="autocomplete";function Vy(t,e){const n=Vn(Hb,this.instance);let o=t,i=!0;null==o&&(o="");let r=tb(o,this.dateFormat||n.defaultDateFormat,!0).isValid(),s=tb(new Date(o)).isValid()||r;if(this.allowEmpty&&""===o&&(s=!0,r=!0),s||(i=!1),!s&&r&&(i=!0),s&&!r)if(!0===this.correctFormat){const t=function(t,e){const n=tb(function(t){const e=new Date(t);return isNaN(new Date(`${t}T00:00`).getDate())?e:new Date(e.getTime()+6e4*e.getTimezoneOffset())}(t)),o=tb(t,e),i=t.search(/[A-Za-z]/g)>-1;let r;r=n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||i?n:o;return r.format(e)}(o,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"dateValidator"),i=!0}else i=!1;e(i)}Vy.VALIDATOR_TYPE="date";function By(t,e){Dy.apply(this,[t,e])}By.VALIDATOR_TYPE="dropdown";function Fy(t,e){this.allowEmpty&&P(t)?e(!0):e(Bb(t))}Fy.VALIDATOR_TYPE="intl-date";function Wy(t,e){this.allowEmpty&&P(t)?e(!0):e(zb(t))}Wy.VALIDATOR_TYPE="intl-time";function zy(t,e){let n=t;null==n&&(n=""),this.allowEmpty&&""===n?e(!0):(this.allowEmpty||""!==n)&&Array.isArray(n)?Array.isArray(n)&&0===n.length?e(!0):this.source?"function"==typeof this.source?this.source(n,jy(n,e)):jy(n,e)(this.source):e(!0):e(!1)}function jy(t,e){const n=t;return function(t){let o=!0;for(let e=0,i=n.length;e<i;e++){let i=!1;for(let o=0,r=t.length;o<r;o++){if(Dt(n[e])&&!Dt(t[o])||!Dt(n[e])&&Dt(t[o])){i=!1;break}(Dt(n[e])&&Dt(t[o])&&xt(n[e],t[o])||"string"==typeof n[e]&&"string"==typeof t[o]&&n[e]===t[o])&&(i=!0)}if(!i){o=!1;break}}e(o)}}zy.VALIDATOR_TYPE="multiselect";function $y(t,e){let n=t;null==n&&(n=""),this.allowEmpty&&""===n?e(!0):e(""!==n&&so(t))}$y.VALIDATOR_TYPE="numeric";const Uy=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function Yy(t,e){const n=this.timeFormat||"h:mm:ss a";let o=!0,i=t;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const r=/^\d{1,2}$/.test(i);r&&(i+=":00");const s=tb(i,Uy,!0).isValid()?tb(i):tb(i,n);let a=s.isValid(),l=tb(i,n,!0).isValid()&&!r;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(o=!1),!a&&l&&(o=!0),a&&!l)if(!0===this.correctFormat){const t=s.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"timeValidator"),o=!0}else o=!1;e(o)}function Gy(t){return Et(t)&&void 0!==t.value?t.value:t}function Ky(t,e,n){return Dt(this.getSourceDataAtCell(this.toPhysicalRow(e),this.toPhysicalColumn(n)))?Dt(t)?t:{key:t,value:t}:t}Yy.VALIDATOR_TYPE="time";const qy={CELL_TYPE:"autocomplete",editor:Ym,renderer:wv,validator:Dy,valueGetter:Gy,valueSetter:Ky,parsePastedValue:!0};const Xy={CELL_TYPE:"checkbox",editor:Km,renderer:Mv,valueSetter:function(t,e,n){const{checkedTemplate:o,uncheckedTemplate:i}=this.getCellMeta(e,n),r=H(t),s=r===H(o),a=r===H(i);return s||a?s?o:i:t}},Zy=new WeakSet;function Jy(t,e,n,o,i,r,s){Zy.has(s.instance)||"string"!=typeof s.dateFormat||(Zy.add(s.instance),te("The `date` cell type with string-based `dateFormat` (moment.js) is deprecated. In the next major release, `date` will accept only Intl.DateTimeFormat options (object). To start migrating, use the `intl-date` cell type now; it will become the `date` cell type after the next major release (the `intl-date` will become an alias for `date`).\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`date` cell type: https://handsontable.com/docs/date-cell-type/")),wv.apply(this,[t,e,n,o,i,r,s])}Jy.RENDERER_TYPE="date";const Qy={CELL_TYPE:"date",editor:Ob,renderer:Jy,validator:Vy};const tC={CELL_TYPE:"dropdown",editor:Db,renderer:vv,validator:By,filter:!1,strict:!0,valueGetter:function(t){return Gy.call(this,t)},valueSetter:function(t,e,n,o){return Ky.call(this,t,e,n,o)},parsePastedValue:!0},eC={CELL_TYPE:"handsontable",editor:Lm,renderer:_v},nC={CELL_TYPE:"intl-date",editor:jb,renderer:Av,validator:Fy,sourceDataValidator:function(t,e){return!(!e.allowEmpty||!P(t))||Bb(t)},sourceDataWarningMessage:'Source data warning ([itemsCount]). Invalid value for "intl-date" cell type.\n\n[affectedCells]\n\nExpected a value compatible with the ISO 8601 date format ("YYYY-MM-DD").',valueFormatter:Iv},oC={CELL_TYPE:"intl-time",editor:$b,renderer:Ov,validator:Wy,sourceDataValidator:function(t,e){return!(!e.allowEmpty||!P(t))||zb(t)},sourceDataWarningMessage:'Source data warning ([itemsCount]). Invalid value for "intl-time" cell type.\n\n[affectedCells]\n\nExpected a value compatible with the 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS").',valueFormatter:function(t,e){const{timeFormat:n,locale:o,allowEmpty:i}=e;if(P(t))return i?t:yv;const r=Wb(t);if(null===r)return yv;const s=Et(n)?n:Pv;return new Intl.DateTimeFormat(o,s).format(r)}},iC="ht-multi-select",rC=`${iC}-chip`,sC=`${iC}-chip-remove`,aC=`${iC}-chip-label`,lC=`${iC}-overflow`,hC=new WeakSet,cC=new WeakMap,dC=new WeakMap;function uC(t,e){return Dt(t)?t[e]:t}function gC(t){if(null==t||""===t)return[];if(Array.isArray(t))return t;if("string"==typeof t)try{const e=JSON.parse(t);return Array.isArray(e)?e:[e]}catch{return t.trim()?[t]:[]}return[t]}function fC(t,e){if(dC.has(t))return;dC.set(t,new zn(t));dC.get(t).addEventListener(t.rootElement,"click",n=>{if(!de(n.target,sC))return;n.preventDefault(),n.stopPropagation();const o=n.target.closest(`.${rC}`);if(!o)return;const i=o.dataset.row,r=o.dataset.prop,s=t.toPhysicalRow(i),a="string"==typeof r?r:t.toPhysicalColumn(r),l=t.propToCol(r),h=t.getSourceDataAtCell(s,l),c=o.dataset.key,d=function(t,e){return t.filter(t=>uC(t,"key")!==e)}(gC(h),c);t.setSourceDataAtCell(s,a,d,`${e}-renderer`),t.render()}),t.addHook("beforeOnCellMouseDown",t=>{de(t.target,sC)&&an(t)})}function pC(t,e,n){const o=t,i=e.querySelectorAll(`.${rC}`);for(let t=0;t<i.length;t++)i[t].style.display="";if(null===o||0===i.length)return;let r=e.querySelector(`.${lC}`);r?(r.style.display="",r.style.visibility="hidden"):(r=function(t,e){const n=t.createElement("span");return ue(n,lC),n.textContent=`+${e}`,n}(n,i.length),r.style.visibility="hidden",e.appendChild(r));const s=n.defaultView.getComputedStyle(e),a=parseFloat(s.gap)||0,l=r.offsetWidth;let h=0,c=0;for(let t=0;t<i.length;t++){const e=h+i[t].offsetWidth+(t<i.length-1?a:0);if(!(e<=o-(t<i.length-1?l+a:0)))break;h=e,c+=1}const d=i.length-c;if(d>0){for(let t=c;t<i.length;t++)i[t].style.display="none";r.textContent=`+${d}`,r.style.visibility="visible"}else r.style.display="none"}const mC="multiselect";function bC(t,e,n,o,i,r,s){up.apply(this,[t,e,n,o,i,r,s]);let a=r;if(!a&&s.placeholder)return a=s.placeholder,a=H(a),void Se(e,a);const{rootDocument:l}=t,h=t.getSettings().ariaTags,c=t.toPhysicalRow(n),d="string"==typeof o?o:t.toPhysicalColumn(o),u=gC(t.getSourceDataAtCell(c,d));if(be(e),ue(e,"ht-multi-select-renderer"),0===u.length)return void e.appendChild(l.createTextNode(""));const g=l.createElement("div");g.className="ht-multi-select-chips-container",u.forEach(t=>{const e=function(t,e,n,o,i){const r=t.createElement("span"),s=uC(e,"value");ue(r,rC),r.dataset.row=o,r.dataset.prop=i,r.title=s;const a=t.createElement("span");ue(a,aC),a.textContent=s,r.appendChild(a);const l=t.createElement("span");return ue(l,sC),n&&l.setAttribute("aria-hidden","true"),r.dataset.key=uC(e,"key"),r.appendChild(l),r}(l,t,h,n,i);g.appendChild(e)}),e.appendChild(g),fC(t,mC);const f=function(t,e){var n,o,i;const r=t.getColWidth(e);return cC.has(t)?(null===(n=cC.get(t))||void 0===n||null===(n=n[e])||void 0===n?void 0:n.width)!==r&&cC.set(t,{...cC.get(t),[e]:{width:r}}):cC.set(t,{[e]:{width:r}}),hC.has(t)||(t.addHook("beforeColumnResize",(e,n)=>{var o;(null===(o=cC.get(t))||void 0===o||null===(o=o[n])||void 0===o?void 0:o.width)!==e&&cC.set(t,{...cC.get(t),[n]:{width:e}})}),hC.add(t)),null!==(o=null===(i=cC.get(t))||void 0===i||null===(i=i[e])||void 0===i?void 0:i.width)&&void 0!==o?o:r}(t,o);!function(t,e,n){pC(t,e,n)}(f,g,l)}bC.RENDERER_TYPE=mC;const wC={CELL_TYPE:"multiselect",_complexDataFormat:!0,editor:ev,renderer:bC,validator:zy,valueGetter:function(t){return Array.isArray(t)?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return t.join(e)}(t.map(t=>Dt(t)?t.value:t),", "):t},valueSetter:function(t,e,n){if(Array.isArray(t)){const o=this.getSourceDataAtCell(this.toPhysicalRow(e),n);if(Array.isArray(o)&&o.length>0&&Dt(o[0]))return t.map(t=>Dt(t)?t:{key:t,value:t})}return t},parsePastedValue:!0};const vC={CELL_TYPE:"numeric",editor:Ub,renderer:Iy,validator:$y,dataType:"number",valueSetter:function(t){if("string"==typeof t&&so(t,[","])){const e=function(t){const e=t.replace(",",".");return!1===isNaN(parseFloat(e))?parseFloat(e):null}(t);return tu(e)?t:e}return t},valueFormatter:Hy},yC={CELL_TYPE:"password",editor:Gb,renderer:Ay,copyable:!1},CC={CELL_TYPE:"select",editor:Xb,renderer:Py},SC={CELL_TYPE:"time",editor:Zb,renderer:Ny,validator:Yy};function RC(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kC(t,e,n){xC(t,e),e.set(t,n)}function xC(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function EC(t,e,n){return t.set(TC(t,e),n),n}function MC(t,e){return t.get(TC(t,e))}function TC(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const _C=new Map([["plugin",function(t){return!!xo(t)}],["cell-type",Kd],["editor",On],["renderer",_o],["validator",Do]]),HC=Symbol("mainSetting"),IC=[];let AC=null;var PC=new WeakMap,OC=new WeakMap,NC=new WeakSet;class DC{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}static get SETTINGS_VALIDATORS(){return null}constructor(t){var e,n;xC(e=this,n=NC),n.add(e),kC(this,PC,null),RC(this,"eventManager",new zn(this)),RC(this,"pluginName",null),RC(this,"pluginsInitializedCallbacks",[]),RC(this,"isPluginsReady",!1),RC(this,"enabled",!1),RC(this,"initialized",!1),kC(this,OC,{}),Mt(this,"hot",t,{writable:!1}),AC=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",t=>this.onUpdateSettings(t)),this.hot.addHook("beforeInit",()=>this.init())}init(){this.pluginName=this.hot.getPluginName(this),this.updatePluginSettings(this.hot.getSettings()[this.constructor.PLUGIN_KEY]);const t=this.constructor.PLUGIN_DEPS,e=Array.isArray(t)?t:[];if(e.length>0){const t=[];if(e.forEach(e=>{const[n,o]=e.split(":");_C.has(n)||wt(`Unknown plugin dependency type "${n}" was found.`),_C.get(n)(o)||t.push(` - ${o} (${n})`)}),t.length>0){const e=[`The ${this.pluginName} plugin requires the following modules:\n`,`${t.join("\n")}\n`].join("");IC.push(e)}}AC||(AC=ko()),AC.indexOf(this.pluginName)>=0&&AC.splice(AC.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()});if(0===AC.length){if(IC.length>0){const t=[`${IC.join("\n")}\n`,"You have to import and register them manually."].join("");IC.length=0,wt(t)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var t;null===(t=this.eventManager)||void 0===t||t.clear(),this.clearHooks(),this.enabled=!1}getSetting(t){var e=this;const n=this.constructor.DEFAULT_SETTINGS,o=this.constructor.SETTINGS_VALIDATORS;if(void 0===t)return Et(MC(PC,this))?Ot(MC(PC,this),n):MC(PC,this);let i;var r;if((Array.isArray(MC(PC,this))||Et(MC(PC,this)))&&n[HC]===t)i=Array.isArray(MC(PC,this))?MC(PC,this):null!==(r=MC(PC,this)[t])&&void 0!==r?r:n[t];else if(t.includes(".")){const e=_t(MC(PC,this),t),o=_t(n,t);i=Et(e)?Ot(e,o):void 0!==e?e:o}else i=Et(MC(PC,this))?Ot(MC(PC,this),n)[t]:n[t];if("function"==typeof i&&o&&"object"==typeof o){const n=o[t];if(n&&"function"==typeof n)return function(){for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];const a=i(...r);if(!1===n(a)){const n=r.map(t=>"string"==typeof t?`"${t}"`:"").join(", "),o=r.length>0?n:"";return void Qt(`${e.pluginName} Plugin: "${t}" function (${o}) result is not valid and will be ignored.`)}return a}}return i}updatePluginSettings(t){const e=this.constructor.SETTINGS_VALIDATORS;if(e&&"function"==typeof e&&"object"!=typeof t){return!1===e(t)?void Qt(`${this.pluginName} Plugin: option is not valid and it will be ignored.`):(EC(PC,this,t),MC(PC,this))}return e&&"object"==typeof e&&"object"==typeof t?(null!==MC(PC,this)&&"object"==typeof MC(PC,this)||EC(PC,this,{...this.constructor.DEFAULT_SETTINGS}),Object.keys(e).forEach(n=>{if(!(n in t))return;const o=e[n];!1!==(!o||o(t[n]))?MC(PC,this)[n]=t[n]:Qt(`${this.pluginName} Plugin: "${n}" option is not valid and it will be ignored.`)}),MC(PC,this)):(EC(PC,this,t),t)}addHook(t,e,n){MC(OC,this)[t]=MC(OC,this)[t]||[];const o=MC(OC,this)[t];this.hot.addHook(t,e,n),o.push(e),MC(OC,this)[t]=o}removeHooks(t){x(MC(OC,this)[t]||[],e=>{this.hot.removeHook(t,e)})}clearHooks(){const t=MC(OC,this);Tt(t,(t,e)=>this.removeHooks(e)),t.length=0}callOnPluginsReady(t){this.isPluginsReady?t():this.pluginsInitializedCallbacks.push(t)}onAfterPluginsInitialized(){x(this.pluginsInitializedCallbacks,t=>t()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(t){const e=TC(NC,this,LC).call(this,t);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&e&&(this.updatePluginSettings(t[this.constructor.PLUGIN_KEY]),this.updatePlugin(t)))}updatePlugin(){}destroy(){var t;EC(PC,this,null),null===(t=this.eventManager)||void 0===t||t.destroy(),this.clearHooks(),Tt(this,(t,e)=>{"hot"!==e&&(this[e]=null)}),delete this.t,delete this.hot}}function LC(t){if(!t)return!1;const e=this.constructor.SETTING_KEYS;if("boolean"==typeof e)return e;for(let n=0;n<e.length;n++)if(void 0!==t[e[n]])return!0;return!1}function VC(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let BC=class{constructor(t){VC(this,"hot",null),VC(this,"container",null),VC(this,"injected",!1),VC(this,"rows",[]),VC(this,"columns",[]),VC(this,"samples",null),VC(this,"settings",{useHeaders:!0}),this.hot=t}addRow(t,e){this.columns.length&&wt("Doesn't support multi-dimensional table"),this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={row:t};this.rows.push(n),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(t)),this.table.tr.appendChild(this.createRow(t)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(t){const e=this.hot.getColHeader(0);if(null!=e){const e={row:-1};this.rows.push(e),this.container=this.createContainer(this.hot.rootElement.className),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),e.table=this.table.table}}addColumn(t,e){this.rows.length&&wt("Doesn't support multi-dimensional table"),this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={col:t};this.columns.push(n),this.samples=e,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(t)&&this.hot.view.appendColHeader(t,this.table.th,void 0,-1),this.table.tBody.appendChild(this.createCol(t)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}getHeights(t){this.injected||this.injectTable(),x(this.rows,e=>{const{height:n}=e.table.getBoundingClientRect();t(e.row,Math.ceil(n))})}getWidths(t){this.injected||this.injectTable(),x(this.columns,e=>{const{width:n}=e.table.getBoundingClientRect();t(e.col,Math.ceil(n))})}setSettings(t){this.settings=t}setSetting(t,e){this.settings||(this.settings={}),this.settings[t]=e}getSettings(){return this.settings}getSetting(t){return this.settings?this.settings[t]:null}createColGroupsCol(t){const e=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&e.appendChild(this.createColElement(-1,-1)),this.samples.forEach(n=>{x(n.strings,n=>{e.appendChild(this.createColElement(n.col,t))})}),e}createRow(t){const{rootDocument:e}=this.hot,n=e.createDocumentFragment(),o=e.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(t,o),n.appendChild(o)),this.samples.forEach(o=>{x(o.strings,o=>{const i=o.col,r=this.hot.getCellMeta(t,i),s=this.hot.getCellRenderer(r),a=e.createElement("td");a.setAttribute("ghost-table",1),s(this.hot,a,t,i,this.hot.colToProp(i),o.value,r),n.appendChild(a)})}),n}appendColumnHeadersRow(){const{rootDocument:t}=this.hot,e=t.createDocumentFragment(),n=[];if(this.hot.hasRowHeaders()){const o=t.createElement("th");n.push([-1,o]),e.appendChild(o)}this.samples.forEach(o=>{x(o.strings,o=>{const i=o.col,r=t.createElement("th");n.push([i,r]),e.appendChild(r)})}),this.table.tHead.appendChild(e),x(n,t=>{const[e,n]=t;this.hot.view.appendColHeader(e,n)})}createCol(t){const{rootDocument:e}=this.hot,n=e.createDocumentFragment();return this.samples.forEach(o=>{x(o.strings,o=>{const i=o.row,r=this.hot.getCellMeta(i,t),s=this.hot.getCellRenderer(r),a=e.createElement("td"),l=e.createElement("tr");a.setAttribute("ghost-table",1),s(this.hot,a,i,t,this.hot.colToProp(t),o.value,r),l.appendChild(a),n.appendChild(l)})}),n}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((t||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(t,e){const n=this.hot.rootDocument.createElement("col");let o=0;e>=0&&t>=0&&(o=this.hot.getCellMeta(e,t).colspan);let i=this.hot.getColWidth(t);if(o>1)for(let e=t+1;e<t+o;e++)i+=this.hot.getColWidth(e);return n.style.width=`${i}px`,n}createTable(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:e}=this.hot,n=e.createDocumentFragment(),o=e.createElement("table"),i=e.createElement("thead"),r=e.createElement("tbody"),s=e.createElement("colgroup"),a=e.createElement("tr"),l=e.createElement("th");return this.isVertical()&&o.appendChild(s),this.isHorizontal()&&(a.appendChild(l),i.appendChild(a),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&r.appendChild(a),o.appendChild(r),ue(o,t),n.appendChild(o),{fragment:n,table:o,tHead:i,tBody:r,colGroup:s,tr:a,th:l}}createContainer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:e}=this.hot,n=e.createDocumentFragment(),o=e.createElement("div");return ue(o,`htGhostTable htAutoSize ${t.trim()}`),n.appendChild(o),{fragment:n,container:o}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};function FC(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class WC{static get SAMPLE_COUNT(){return 3}constructor(t){FC(this,"samples",null),FC(this,"dataFactory",null),FC(this,"customSampleCount",null),FC(this,"allowDuplicates",!1),FC(this,"includeHidden",!1),this.dataFactory=t}getSampleCount(){return this.customSampleCount?this.customSampleCount:WC.SAMPLE_COUNT}setSampleCount(t){this.customSampleCount=t}setAllowDuplicates(t){this.allowDuplicates=t}setIncludeHidden(t){this.includeHidden=t}generateRowSamples(t,e){return this.generateSamples("row",e,t)}generateColumnSamples(t,e){return this.generateSamples("col",e,t)}generateSamples(t,e,n){const o=new Map,{from:i,to:r}="number"==typeof n?{from:n,to:n}:n;return ao(i,r,n=>{const i=this.generateSample(t,e,n);o.set(n,i)}),o}generateSample(t,e,n){"row"!==t&&"col"!==t&&wt("Unsupported sample type");const o=new Map,i="row"===t?"col":"row",r=[];return ao(e.from,e.to,e=>{const s="row"===t?this.dataFactory(n,e,this):this.dataFactory(e,n,this);if(!1===s)return;const{value:a,bundleSeed:l}=s,h="string"==typeof l&&l.length>0;let c;c=h?l:Et(a)?`${Object.keys(a).length}`:Array.isArray(a)?`${a.length}`:`${H(a).length}`,o.has(c)||o.set(c,{needed:this.getSampleCount(),strings:[]});const d=o.get(c);if(d.needed){(!(r.indexOf(a)>-1)||this.allowDuplicates||h)&&(d.strings.push({value:a,[i]:e}),r.push(a),d.needed-=1)}}),o}}function zC(t,e,n){jC(t,e),e.set(t,n)}function jC(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $C(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UC(t,e){return t.get(GC(t,e))}function YC(t,e,n){return t.set(GC(t,e),n),n}function GC(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("modifyAutoColumnSizeSeed");const KC="autoColumnSize";var qC=new WeakMap,XC=new WeakMap,ZC=new WeakMap,JC=new WeakSet;class QC extends DC{static get PLUGIN_KEY(){return KC}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(t){var e,n;super(t),jC(e=this,n=JC),n.add(e),$C(this,"ghostTable",new BC(this.hot)),$C(this,"samplesGenerator",new WC((t,e)=>{const n=this.hot.toPhysicalRow(t),o=this.hot.toPhysicalColumn(e);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(o))return!1;const i=this.hot.getCellMeta(t,e);let r="";i.spanned||(r=this.hot.getDataAtCell(t,e),"function"==typeof i.valueFormatter&&(r=i.valueFormatter(r,i)));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,i,r)),{value:r,bundleSeed:s}})),$C(this,"inProgress",!1),$C(this,"measuredColumns",0),$C(this,"columnWidthsMap",new Fa),zC(this,qC,!1),zC(this,XC,[]),zC(this,ZC,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",(t,e,n)=>GC(JC,this,sS).call(this,t,e,n))}isEnabled(){return!1!==this.hot.getSettings()[KC]&&!this.hot.getSettings().colWidths}enablePlugin(){var t=this;if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return GC(JC,t,iS).call(t,...n)}),this.addHook("beforeChangeRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return GC(JC,t,rS).call(t,...n)}),this.addHook("afterFormulasValuesUpdate",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return GC(JC,t,lS).call(t,...n)}),this.addHook("beforeRender",()=>GC(JC,this,oS).call(this)),this.addHook("modifyColWidth",(t,e)=>this.getColumnWidth(e,t)),this.addHook("init",()=>GC(JC,this,aS).call(this)),super.enablePlugin()}updatePlugin(){YC(ZC,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",(t,e,n)=>GC(JC,this,sS).call(this,t,e,n))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const t=this.getFirstVisibleColumn(),e=this.getLastVisibleColumn();if(-1===t||-1===e)return;const n=this.hot.forceFullRender;this.calculateColumnsWidth({from:t,to:e},void 0,n)}calculateColumnsWidth(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;ao(o.from,o.to,t=>{let e=this.hot.toPhysicalColumn(t);null===e&&(e=t),(n||null===this.columnWidthsMap.getValueAtIndex(e)&&!this.hot._getColWidthFromSettings(e))&&GC(JC,this,eS).call(this,t,i)}),this.ghostTable.columns.length&&(GC(JC,this,nS).call(this),this.measuredColumns=o.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const o=this.hot.countCols()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return Vt(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+QC.CALCULATION_STEP,o)},t,e),n=n+QC.CALCULATION_STEP+1,n<o?i=Lt(r):(Vt(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateColumnsWidth({from:0,to:s},t,e),n=s+1),n<o?r():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const t=this.hot.getSettings()[KC];let e=QC.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return Et(t)&&(e=t.syncLimit,G(e)?e=ho(n,e):e>>=0),Math.min(e,n)}getColumnWidth(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t)),n&&"number"==typeof o&&(o=Math.max(o,ri))),o}getFirstVisibleColumn(){var t;return null!==(t=this.hot.getFirstRenderedVisibleColumn())&&void 0!==t?t:-1}getLastVisibleColumn(){var t;return null!==(t=this.hot.getLastRenderedVisibleColumn())&&void 0!==t?t:-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce((t,e,n)=>{const o=UC(XC,this).length;return(o-1<n||UC(XC,this)[n]!==e)&&t.push(this.hot.toVisualColumn(n)),o-1<n?UC(XC,this).push(e):UC(XC,this)[n]=e,t},[])}clearCache(t){Array.isArray(t)?this.hot.batchExecution(()=>{t.forEach(t=>{this.columnWidthsMap.setValueAtIndex(t,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(t=>null===t).length}destroy(){this.ghostTable.clean(),super.destroy()}}function tS(t){const e={from:0,to:this.hot.countRows()-1};t.forEach(t=>{const n=this.hot.toPhysicalColumn(t);null!==n&&(this.hot._getColWidthFromSettings(n)||GC(JC,this,eS).call(this,t,e))}),this.ghostTable.columns.length&&(GC(JC,this,nS).call(this),this.ghostTable.clean())}function eS(t,e){this.samplesGenerator.generateColumnSamples(t,e).forEach((t,e)=>this.ghostTable.addColumn(e,t))}function nS(){this.hot.batchExecution(()=>{this.ghostTable.getWidths((t,e)=>{const n=this.hot.toPhysicalColumn(t);this.columnWidthsMap.setValueAtIndex(n,e)})},!0)}function oS(){this.calculateVisibleColumnsWidth(),this.inProgress||(GC(JC,this,tS).call(this,UC(ZC,this)),YC(ZC,this,[]))}function iS(t,e){e||this.recalculateAllColumnsWidth()}function rS(t){const e=t.reduce((t,e)=>{let[,n]=e;const o=this.hot.propToCol(n);return Number.isInteger(o)&&-1===t.indexOf(o)&&t.push(o),t},[]);UC(ZC,this).push(...e)}function sS(t,e,n){let o=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),o=this.getColumnWidth(e,void 0,!1)),o}function aS(){YC(XC,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),YC(qC,this,!0)}function lS(t){if(!UC(qC,this))return;const e=t.reduce((t,e)=>{var n;const o=null===(n=e.address)||void 0===n?void 0:n.col;if(Number.isInteger(o)){const e=this.hot.toVisualColumn(o);-1===t.indexOf(e)&&t.push(e)}return t},[]);UC(ZC,this).push(...e)}const hS={horizontal:"horizontal",vertical:"vertical"};function cS(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function dS(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function uS(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("modifyAutofillRange"),Mn.getSingleton().register("beforeAutofill"),Mn.getSingleton().register("afterAutofill");const gS="autofill",fS=["fillHandle"];var pS=new WeakSet;class mS extends DC{constructor(){super(...arguments),cS(this,pS),dS(this,"addingStarted",!1),dS(this,"mouseDownOnCellCorner",!1),dS(this,"mouseDragOutside",!1),dS(this,"handleDraggedCells",0),dS(this,"directions",[]),dS(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return gS}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[gS,...fS]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",t=>uS(pS,this,vS).call(this,t)),this.addHook("afterOnCellCornerDblClick",t=>uS(pS,this,wS).call(this,t)),this.addHook("beforeOnCellMouseOver",(t,e)=>uS(pS,this,yS).call(this,e)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this.hot.getSelectedRangeLast(),{row:n,col:o}=e.getTopStartCorner(),{row:i,col:r}=e.getBottomEndCorner(),s=this.hot.runHooks("modifyCopyableRange",[{startRow:n,startCol:o,endRow:i,endCol:r}]),a=[],l=[],h=[];return x(s,t=>{for(let e=t.startRow;e<=t.endRow;e+=1)-1===a.indexOf(e)&&a.push(e);for(let e=t.startCol;e<=t.endCol;e+=1)-1===l.indexOf(e)&&l.push(e)}),x(a,e=>{const n=[];x(l,o=>{const i=t?this.hot.getSourceDataAtCell(e,o):null;t&&(Et(i)||Array.isArray(i))?n.push(this.hot.getCopyableSourceData(e,o)):n.push(this.hot.getCopyableData(e,o))}),h.push(n)}),h}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[t,e,n,o]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),r=i.getTopStartCorner(),s=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[r.row,r.col,s.row,s.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,t),Math.min(r.col,e),Math.max(s.row,n),Math.max(s.col,o)],a),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=function(t,e,n){let o,i,r;return e[0]===t[0]&&e[1]<t[1]?(r="left",o=n(e[0],e[1]),i=n(e[2],t[1]-1)):e[2]===t[2]&&e[0]===t[0]&&e[3]>t[3]?(r="right",o=n(e[0],t[3]+1),i=n(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(r="up",o=n(e[0],e[1]),i=n(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(r="down",o=n(t[2]+1,e[1]),i=n(e[2],e[3])),o&&o.normalize(),i&&i.normalize(),{directionOfDrag:r,startOfDragCoords:o,endOfDragCoords:i}}(a,l,(t,e)=>this.hot._createCellCoords(t,e));if(c&&c.row>-1&&c.col>-1){const t=this.getSelectionData(),e=this.getSelectionData(!0),n=i.clone(),o=this.hot._createCellRange(c,c,d),r=this.hot.runHooks("beforeAutofill",t,n,o,h);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let s=r;const a=r;if(["up","left"].indexOf(h)>-1&&(1!==a.length||0!==a[0].length))if(s=[],"up"===h){const t=d.row-c.row+1,e=t%a.length;for(let n=0;n<t;n++)s.push(a[(n+(a.length-e))%a.length])}else{const t=d.col-c.col+1,e=t%a[0].length;for(let n=0;n<a.length;n++){s.push([]);for(let o=0;o<t;o++)s[n].push(a[n][(o+(a[n].length-e))%a[n].length])}}if(e.some(t=>t.some(t=>Et(t)||Array.isArray(t)))){const t=uS(pS,this,bS).call(this,s,e,c,d,h);t.length&&(s=t)}this.hot.populateFromArray(c.row,c.col,s,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",s,n,o,h),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(t){return t.row<0&&(t.row=0),t.col<0&&(t.col=0),t}getCoordsOfDragAndDropBorders(t){const e=this.hot.getSelectedRangeLast(),n=e.getBottomEndCorner();let o=t;if(this.directions.includes(hS.vertical)&&this.directions.includes(hS.horizontal)){const i=e.getTopStartCorner();(n.col<=t.col||i.col>=t.col)&&(o=this.hot._createCellCoords(n.row,t.col)),(n.row<t.row||i.row>t.row)&&(o=this.hot._createCellCoords(t.row,n.col))}else if(this.directions.includes(hS.vertical))o=this.hot._createCellCoords(t.row,n.col);else{if(!this.directions.includes(hS.horizontal))return;o=this.hot._createCellCoords(n.row,t.col)}return this.reduceSelectionAreaIfNeeded(o)}showBorder(t){const e=this.getCoordsOfDragAndDropBorders(t);e&&this.redrawBorders(e)}addRow(){this.hot._registerTimeout(()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1},200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const t=this.hot.getSelectedLast(),e=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.countRows();t[2]<n-1&&e[2]===n-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(t){const e=this.hot.getData(),n=this.hot.countRows();let o;for(let i=t[2]+1;i<n;i++){for(let n=t[1];n<=t[3];n++){if(!P(e[i][n]))return-1}const n=e[i][t[1]-1],r=e[i][t[3]+1];P(n)&&P(r)||(o=i)}return o}addSelectionFromStartAreaToSpecificRowIndex(t,e){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(t[0],t[1])).add(this.hot._createCellCoords(e,t[3])).commit()}setSelection(t){this.hot.selectCell(...k(t,t=>Math.max(t,0)),!1,!1)}selectAdjacent(){const t=this.hot.getSelectedLast(),e=this.getIndexOfLastAdjacentFilledInRow(t);return-1!==e&&void 0!==e&&(this.addSelectionFromStartAreaToSpecificRowIndex(t,e),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(t){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(t).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(t){const{documentElement:e}=this.hot.rootDocument,n=ke(this.hot.table).top-(this.hot.rootWindow.pageYOffset||e.scrollTop)+Pe(this.hot.table),o=ke(this.hot.table).left-(this.hot.rootWindow.pageXOffset||e.scrollLeft)+Ae(this.hot.table);return t.clientY>n&&t.clientX<=o}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mouseup",()=>uS(pS,this,CS).call(this)),this.eventManager.addEventListener(t,"mousemove",t=>uS(pS,this,SS).call(this,t))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const t=function(t){const e={};return!0===t?(e.directions=Object.keys(hS),e.autoInsertRow=!0):Et(t)?(I(t.autoInsertRow)?t.direction===hS.horizontal?e.autoInsertRow=!1:e.autoInsertRow=t.autoInsertRow:e.autoInsertRow=!1,I(t.direction)?e.directions=[t.direction]:e.directions=Object.keys(hS)):"string"==typeof t?(e.directions=[t],e.autoInsertRow=!0):(e.directions=[],e.autoInsertRow=!1),e}(this.hot.getSettings().fillHandle);this.directions=t.directions,this.autoInsertRow=t.autoInsertRow}destroy(){super.destroy()}}function bS(t,e,n,o){const i=[];for(let r=Math.min(n.row,o.row);r<=Math.max(n.row,o.row);r+=1){i.push([]);for(let s=Math.min(n.col,o.col);s<=Math.max(n.col,o.col);s+=1){const a=this.hot.getSourceDataAtCell(r,s),l=this.hot.getCellMeta(r,s).source,h=this.hot.getCellMeta(r,s)._complexDataFormat||Et(null==l?void 0:l[0])||Array.isArray(null==l?void 0:l[0]),c=r-Math.min(n.row,o.row),d=s-Math.min(n.col,o.col),u=c%e.length,g=d%e[0].length;Et(a)||Array.isArray(a)||h?i[c][d]=e[u][g]:i[c][d]=t[u][g]}}return i}function wS(){this.selectAdjacent()&&this.fillIn()}function vS(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function yS(t){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(t),this.addNewRowIfNeeded())}function CS(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function SS(t){const e=this.getIfMouseWasDraggedOutside(t);!1===this.addingStarted&&this.handleDraggedCells>0&&e?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function RS(t,e,n){kS(t,e),e.set(t,n)}function kS(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xS(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ES(t,e,n){return t.set(TS(t,e),n),n}function MS(t,e){return t.get(TS(t,e))}function TS(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const _S="autoRowSize",HS="htFirstDatasetColumnNotRendered",IS="htAutoRowSize";var AS=new WeakMap,PS=new WeakMap,OS=new WeakSet;class NS extends DC{static get PLUGIN_KEY(){return _S}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(t){var e,n;super(t),kS(e=this,n=OS),n.add(e),xS(this,"headerHeight",null),xS(this,"ghostTable",new BC(this.hot)),xS(this,"samplesGenerator",new WC((t,e)=>{const n=this.hot.toPhysicalColumn(e);if(this.hot.columnIndexMapper.isHidden(n))return!1;let o,i;if(t>=0&&e>=0&&(o=this.hot.getCellMeta(t,e),o.hidden))return!1;var r;t>=0?(i=this.hot.getDataAtCell(t,e),"function"==typeof(null===(r=o)||void 0===r?void 0:r.valueFormatter)&&(i=o.valueFormatter(i,o))):-1===t&&(i=this.hot.getColHeader(e));return{value:i}})),xS(this,"inProgress",!1),xS(this,"measuredRows",0),xS(this,"rowHeightsMap",new Fa),RS(this,AS,[]),RS(this,PS,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",(t,e,n)=>TS(OS,this,FS).call(this,t,e,n))}isEnabled(){const t=this.hot.getSettings()[_S];return!0===t||Et(t)}enablePlugin(){var t=this;if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const e=this.getSetting("samplingRatio");e&&!isNaN(e)&&this.samplesGenerator.setSampleCount(parseInt(e,10)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return TS(OS,t,WS).call(t,...n)}),this.addHook("beforeChangeRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return TS(OS,t,zS).call(t,...n)}),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return TS(OS,t,$S).call(t,...n)}),this.addHook("beforeViewRender",()=>TS(OS,this,VS).call(this)),this.addHook("beforeRender",()=>TS(OS,this,BS).call(this)),this.addHook("modifyRowHeight",(t,e)=>this.getRowHeight(e,t)),this.addHook("init",()=>TS(OS,this,jS).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),ue(this.hot.rootElement,IS),super.enablePlugin()}disablePlugin(){this.headerHeight=null,ge(this.hot.rootElement,IS),super.disablePlugin(),TS(OS,this,LS).call(this,!1),this.addHook("beforeRowResize",(t,e,n)=>TS(OS,this,FS).call(this,t,e,n))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const t=this.getFirstVisibleRow(),e=this.getLastVisibleRow();if(-1===t||-1===e)return;const n=this.hot.forceFullRender;this.calculateRowsHeight({from:t,to:e},void 0,n)}calculateRowsHeight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;if(null!==this.hot.getColHeader(0)){const t=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(t.get(-1))}ao(o.from,o.to,t=>{let e=this.hot.toPhysicalRow(t);if(null===e&&(e=t),n||null===this.rowHeightsMap.getValueAtIndex(e)){this.samplesGenerator.generateRowSamples(t,i).forEach((t,e)=>this.ghostTable.addRow(e,t))}}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((t,e)=>{t<0?this.headerHeight=e:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(t),e)})},!0),this.measuredRows=o.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const o=this.hot.countRows()-1;let i=null;this.inProgress=!0;const r=()=>{if(!this.hot)return Vt(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+NS.CALCULATION_STEP,o)},t,e),n=n+NS.CALCULATION_STEP+1,n<o?i=Lt(r):(Vt(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateRowsHeight({from:0,to:s},t,e),n=s+1),n<o?r():(this.inProgress=!1,this.hot.view.adjustElementsSize())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const t=this.hot.getSettings()[_S];let e=NS.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return Et(t)&&(e=t.syncLimit,G(e)?e=ho(n,e):e>>=0),Math.min(e,n)}getRowHeight(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.stylesHandler.getDefaultRowHeight(t);var n;if(t<0)return null!==(n=this.headerHeight)&&void 0!==n?n:e;const o=this.hot.toPhysicalRow(t);if(this.hot.rowIndexMapper.isHidden(o))return e;const i=this.rowHeightsMap.getValueAtIndex(o);let r=e;return null!==i&&i>e&&(r=i,t===this.hot.view.getFirstRenderedVisibleRow()&&(r+=1)),r}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var t;return null!==(t=this.hot.getFirstRenderedVisibleRow())&&void 0!==t?t:-1}getLastVisibleRow(){var t;return null!==(t=this.hot.getLastRenderedVisibleRow())&&void 0!==t?t:-1}clearCache(t){this.headerHeight=null,Array.isArray(t)?this.hot.batchExecution(()=>{t.forEach(t=>{this.rowHeightsMap.setValueAtIndex(t,null)})},!0):this.rowHeightsMap.clear()}clearCacheByRange(t){const{from:e,to:n}="number"==typeof t?{from:t,to:t}:t;this.hot.batchExecution(()=>{ao(Math.min(e,n),Math.max(e,n),t=>{this.rowHeightsMap.setValueAtIndex(t,null)})},!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(t=>null===t).length}destroy(){this.ghostTable.clean(),super.destroy()}}function DS(t){const e={from:0,to:this.hot.countCols()-1};t.forEach(t=>{this.samplesGenerator.generateRowSamples(t,e).forEach((t,e)=>this.ghostTable.addRow(e,t))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((t,e)=>{const n=this.hot.toPhysicalRow(t);this.rowHeightsMap.setValueAtIndex(n,e)})},!0),this.ghostTable.clean())}function LS(t){const e=this.hot.getFirstRenderedVisibleColumn(),n=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(e);!1===t||n===this.hot.columnIndexMapper.getPhysicalFromRenderableIndex(0)?ge(this.hot.rootElement,HS):ue(this.hot.rootElement,HS)}function VS(){TS(OS,this,LS).call(this)}function BS(){this.calculateVisibleRowsHeight(),this.inProgress||(TS(OS,this,DS).call(this,MS(AS,this)),ES(AS,this,[]))}function FS(t,e,n){let o=t;return n&&(this.calculateRowsHeight(e,void 0,!0),o=this.getRowHeight(e)),o}function WS(t,e){e||this.recalculateAllRowsHeight()}function zS(t){const e=t.reduce((t,e)=>{let[n]=e;return-1===t.indexOf(n)&&t.push(n),t},[]);MS(AS,this).push(...e)}function jS(){this.recalculateAllRowsHeight(),ES(PS,this,!0)}function $S(t){if(!MS(PS,this))return;const e=t.reduce((t,e)=>{var n;const o=null===(n=e.address)||void 0===n?void 0:n.row;if(Number.isInteger(o)){const e=this.hot.toVisualRow(o);-1===t.indexOf(e)&&t.push(e)}return t},[]);MS(AS,this).push(...e)}const{getListWithInsertedItems:US,getListWithRemovedItems:YS}=Xa("physicallyIndexed");const{getListWithInsertedItems:GS,getListWithRemovedItems:KS}=Xa("physicallyIndexed");function qS(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function XS(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const ZS="bindRowsWithHeaders",JS=new Map([["loose",class extends La{constructor(){super(t=>t)}insert(t,e){const n=Ua(this.indexedValues,e);this.indexedValues=US(n,t,e,this.initValueOrFn),super.insert(t,e)}remove(t){const e=YS(this.indexedValues,t);this.indexedValues=$a(e,t),super.remove(t)}}],["strict",class extends La{constructor(){super(t=>t)}insert(t,e){this.indexedValues=GS(this.indexedValues,t,e,(t,e)=>this.getNextValue(e)),super.insert(t,e)}remove(t){this.indexedValues=KS(this.indexedValues,t),super.remove(t)}getNextValue(t){return Math.max(...this.getValues())+1+t}}]]);var QS=new WeakSet;class tR extends DC{constructor(){super(...arguments),qS(this,QS),XS(this,"headerIndexes",null)}static get PLUGIN_KEY(){return ZS}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[ZS]}enablePlugin(){var t;if(this.enabled)return;const e=null!==(t=JS.get(this.getSetting()))&&void 0!==t?t:JS.get("loose");this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new e),this.addHook("modifyRowHeader",t=>function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(QS,this,eR).call(this,t)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function eR(t){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(t))}function nR(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oR(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iR(t,e){return t.get(sR(t,e))}function rR(t,e,n){return t.set(sR(t,e),n),n}function sR(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const aR="collapsibleColumns",lR=["nestedHeaders"],hR="collapsibleIndicator",cR=aR,dR=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var uR=new WeakMap,gR=new WeakSet;class fR extends DC{constructor(){var t,e;super(...arguments),nR(t=this,e=gR),e.add(t),oR(this,"nestedHeadersPlugin",null),oR(this,"headerStateManager",null),function(t,e,n){nR(t,e),e.set(t,n)}(this,uR,null)}static get PLUGIN_KEY(){return aR}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[aR,...lR]}isEnabled(){return!!this.hot.getSettings()[aR]}enablePlugin(){var t=this;if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();e||Qt("You need to configure the Nested Headers plugin in order to use collapsible headers."),rR(uR,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>sR(gR,this,bR).call(this)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return sR(gR,t,wR).call(t,...n)}),this.addHook("afterGetColHeader",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return sR(gR,t,pR).call(t,...n)}),this.addHook("beforeOnCellMouseDown",(t,e,n)=>sR(gR,this,mR).call(this,t,e,n)),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:t}=this.hot.getSettings();"boolean"==typeof t?this.headerStateManager.mapState(t=>({collapsible:t.origColspan>1})):Array.isArray(t)&&(this.headerStateManager.mapState(()=>({collapsible:!1})),this.headerStateManager.mergeStateWith(t))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),rR(uR,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var t;const{row:e,col:n}=this.hot.getSelectedRangeActive().highlight,{collapsible:o,isCollapsed:i,columnIndex:r}=null!==(t=this.headerStateManager.getHeaderTreeNodeData(e,n))&&void 0!==t?t:{};if(o)return i?this.expandSection({row:e,col:r}):this.collapseSection({row:e,col:r}),!1},runOnlyIf:()=>{var t,e;return(null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.isSingle())&&(null===(e=this.hot.getSelectedRangeActive())||void 0===e?void 0:e.highlight.isHeader())},group:cR,relativeToGroup:mg,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(cR)}clearButtons(){if(!this.hot.view)return;const t=this.hot.view._wt.getSetting("columnHeaders").length,e=this.hot.view._wt.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(t){t&&t.parentNode.removeChild(t)};ao(0,t-1,t=>{const r=e.childNodes[t],s=n.childNodes[t],a=o?o.childNodes[t]:null;ao(0,r.childNodes.length-1,t=>{let e=r.childNodes[t].querySelector(`.${hR}`);i(e),s&&s.childNodes[t]&&(e=s.childNodes[t].querySelector(`.${hR}`),i(e)),o&&a&&a.childNodes[t]&&(e=a.childNodes[t].querySelector(`.${hR}`),i(e))})})}expandSection(t){this.toggleCollapsibleSection([t],"expand")}collapseSection(t){this.toggleCollapsibleSection([t],"collapse")}toggleAllCollapsibleSections(t){const e=this.headerStateManager.mapNodes(e=>{const{collapsible:n,origColspan:o,headerLevel:i,columnIndex:r,isCollapsed:s}=e;if(!0===n&&o>1&&(s&&"expand"===t||!s&&"collapse"===t))return{row:this.headerStateManager.levelToRowCoords(i),col:r}});this.toggleCollapsibleSection(e,t)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(t,e){if(dR.has(e)||wt(`Unsupported action is passed (${e}).`),!Array.isArray(t))return;const n=R(t,t=>{let{row:e}=t;return e<0});let o=n.length>0;x(n,t=>{var n;let{row:i,col:r}=t;const{collapsible:s,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(i,r))&&void 0!==n?n:{};if(!s||a&&"collapse"===e||!a&&"expand"===e)return o=!1,!1});const i=[],r=[];o&&x(n,t=>{let{row:n,col:o}=t;const{colspanCompensation:s,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(e,n,o);s>0&&(r.push(...a),i.push(l))});const s=this.getCollapsedColumns();let a=[];"collapse"===e?a=function(t){const e=[];return x(t,t=>{-1===e.indexOf(t)&&e.push(t)}),e}([...s,...r]):"expand"===e&&(a=R(s,t=>!r.includes(t)));const l=dR.get(e);if(!1===this.hot.runHooks(l.beforeHook,s,a,o))return void x(i,t=>{t()});this.hot.batchExecution(()=>{x(r,t=>{iR(uR,this).setValueAtIndex(this.hot.toPhysicalColumn(t),l.hideColumn)})},!0);const h=this.getCollapsedColumns().length!==s.length,c=this.hot.getSelectedRangeActive();if("collapse"===e&&h&&c){const{row:t,col:e}=c.highlight;if((this.hot.rowIndexMapper.isHidden(t)||this.hot.columnIndexMapper.isHidden(e))&&r.includes(e)){const n=t>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(t,1,!0):t,o=e>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(e,1,!0):e;null!==n&&null!==o&&this.hot.selectCell(n,o)}}this.hot.runHooks(l.afterHook,s,a,o,h),this.hot.view.adjustElementsSize(),this.hot.render()}getCollapsedColumns(){return iR(uR,this).getHiddenIndexes()}destroy(){rR(uR,this,null),super.destroy()}}function pR(t,e,n){var o;const{collapsible:i,origColspan:r,isCollapsed:s}=null!==(o=this.headerStateManager.getHeaderSettings(n,t))&&void 0!==o?o:{},a=i&&r>1&&t>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let h=e.querySelector(`.${hR}`);var c;(pe(e,[ft("")[0]]),a)?(h||(h=this.hot.rootDocument.createElement("div"),ue(h,hR),e.querySelector("div:first-child").appendChild(h)),ge(h,["collapsed","expanded"]),s?(ue(h,"collapsed"),Se(h,"+"),l&&fe(e,...ft(!1))):(ue(h,"expanded"),Se(h,"-"),l&&fe(e,...ft(!0))),l&&fe(h,"aria-hidden","true")):null===(c=h)||void 0===c||c.remove()}function mR(t,e){de(t.target,hR)&&(de(t.target,"expanded")?(this.eventManager.fireEvent(t.target,"mouseup"),this.toggleCollapsibleSection([e],"collapse")):de(t.target,"collapsed")&&(this.eventManager.fireEvent(t.target,"mouseup"),this.toggleCollapsibleSection([e],"expand")),an(t))}function bR(){this.updatePlugin()}function wR(t,e){e||this.updatePlugin()}function vR(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const yR=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class CR{constructor(t,e){vR(this,"hot",void 0),vR(this,"sortingStates",new Ga),vR(this,"sortEmptyCells",false),vR(this,"indicator",true),vR(this,"headerAction",true),vR(this,"compareFunctionFactory",void 0),vR(this,"mapName",void 0),this.hot=t,this.mapName=e,this.hot.columnIndexMapper.registerMap(e,this.sortingStates)}updateAllColumnsProperties(t){Et(t)&&Tt(t,(t,e)=>{yR.includes(e)&&(this[e]=t)})}getAllColumnsProperties(){const t={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(t.compareFunctionFactory=this.compareFunctionFactory),t}getSortOrderOfColumn(t){var e;return null===(e=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(t)))||void 0===e?void 0:e.sortOrder}getIndexOfColumnInSortQueue(t){return t=this.hot.toPhysicalColumn(t),this.sortingStates.getEntries().findIndex(e=>{let[n]=e;return n===t})}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(t){return Et(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(t)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map(t=>{let[e,n]=t;return{column:this.hot.toVisualColumn(e),...n}})}getColumnSortState(t){const e=this.getSortOrderOfColumn(t);if(I(e))return{column:t,sortOrder:e}}setSortStates(t){this.sortingStates.clear();for(let e=0;e<t.length;e+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(t[e].column),{sortOrder:t[e].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}function SR(t,e,n){const o=e.locale;return function(e,i){const{sortEmptyCells:r}=n;return"string"==typeof e&&(e=e.toLocaleLowerCase(o)),"string"==typeof i&&(i=i.toLocaleLowerCase(o)),e===i?HR:P(e)?P(i)?HR:r&&"asc"===t?IR:AR:P(i)?r&&"asc"===t?AR:IR:isNaN(e)&&!isNaN(i)?"asc"===t?AR:IR:!isNaN(e)&&isNaN(i)?"asc"===t?IR:AR:(isNaN(e)||isNaN(i)||(e=parseFloat(e),i=parseFloat(i)),e<i?"asc"===t?IR:AR:e>i?"asc"===t?AR:IR:HR)}}const RR="default";const{register:kR,getItem:xR,hasItem:ER}=Hn("sorting.compareFunctionFactory"),{register:MR,getItem:TR}=Hn("sorting.mainSortComparator");function _R(t){return ER(t)?xR(t):xR(RR)}kR("checkbox",function(t,e,n){const o=e.checkedTemplate,i=e.uncheckedTemplate,{sortEmptyCells:r}=n;return function(s,a){const l=P(s),h=P(a),c=l?i:s,d=h?i:a,u=c===i||c===o,g=d===i||d===o;if(!1===r){if(l&&!1===h)return AR;if(!1===l&&h)return IR}return!1===u&&g?"asc"===t?IR:AR:u&&!1===g?"asc"===t?AR:IR:!1===u&&!1===g?SR(t,e,n)(s,a):c===i&&d===o?"asc"===t?IR:AR:c===o&&d===i?"asc"===t?AR:IR:HR}}),kR("date",function(t,e,n){return WR(t,e.dateFormat,n)}),kR("intl-date",function(t,e,n){return function(t,e,n){return function(e,o){const{sortEmptyCells:i}=n;if(e===o)return HR;if(P(e))return P(o)?HR:i&&"asc"===t?IR:AR;if(P(o))return i&&"asc"===t?AR:IR;const r=Vb(e),s=Vb(o);return null===r?AR:null===s?IR:s>r?"asc"===t?IR:AR:s<r?"asc"===t?AR:IR:HR}}(t,e.dateFormat,n)}),kR(RR,SR),kR("numeric",function(t,e,n){return function(e,o){const i=parseFloat(e),r=parseFloat(o),{sortEmptyCells:s}=n;if(i===r||isNaN(i)&&isNaN(r))return HR;if(s){if(P(e))return"asc"===t?IR:AR;if(P(o))return"asc"===t?AR:IR}return isNaN(i)?AR:isNaN(r)?IR:i<r?"asc"===t?IR:AR:i>r?"asc"===t?AR:IR:HR}}),kR("time",function(t,e,n){return WR(t,e.timeFormat,n)}),kR("intl-time",function(t,e,n){return function(t,e,n){return function(e,o){const{sortEmptyCells:i}=n;if(e===o)return HR;if(P(e))return P(o)?HR:i&&"asc"===t?IR:AR;if(P(o))return i&&"asc"===t?AR:IR;const r=Wb(e),s=Wb(o);return null===r?AR:null===s?IR:s>r?"asc"===t?IR:AR:s<r?"asc"===t?AR:IR:HR}}(t,e.timeFormat,n)});const HR=0,IR=-1,AR=1;const PR="asc",OR="desc",NR="colHeader";function DR(t){if(t.some(t=>!1===function(t){if(!1===Et(t))return!1;const{column:e,sortOrder:n}=t;return Number.isInteger(e)&&[PR,OR].includes(n)}(t)))return!1;const e=t.map(t=>{let{column:e}=t;return e});return new Set(e).size===e.length}function LR(t){if(t!==OR)return t===PR?OR:PR}function VR(t){return t.querySelector(`.${NR}`)}function BR(t,e){if(t<0||!e.parentNode)return!1;const n=e.parentNode.parentNode.childNodes;return-1===Array.from(n).indexOf(e.parentNode)-n.length}function FR(t,e,n){return-1===t&&e>=0&&!1===hn(n)}function WR(t,e,n){return function(o,i){const{sortEmptyCells:r}=n;if(o===i)return HR;if(P(o))return P(i)?HR:r&&"asc"===t?IR:AR;if(P(i))return r&&"asc"===t?AR:IR;const s=tb(o,e),a=tb(i,e);return s.isValid()?a.isValid()?a.isAfter(s)?"asc"===t?IR:AR:a.isBefore(s)?"asc"===t?AR:IR:HR:IR:AR}}const zR="indicatorDisabled",jR="columnSorting",$R="sortAction",UR=new Map([[PR,"ascending"],[OR,"descending"]]);function YR(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function GR(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KR(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const qR="columnSorting",XR="append",ZR=qR;MR(qR,function(t,e){return function(n,o){const[,...i]=n,[,...r]=o;return function(n){const o=t[n],s=e[n],a=i[n],l=r[n],h=s.columnSorting;return(h.compareFunctionFactory?h.compareFunctionFactory:_R(s.type))(o,s,h)(a,l)}(0)}}),Mn.getSingleton().register("beforeColumnSort"),Mn.getSingleton().register("afterColumnSort");const JR=new WeakMap;var QR=new WeakSet;class tk extends DC{constructor(){super(...arguments),YR(this,QR),GR(this,"columnStatesManager",null),GR(this,"columnMetaCache",null),GR(this,"pluginKey",qR),GR(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return qR}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var t,e,n=this;if(JR.has(this.hot)&&JR.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),t=JR.get(this.hot),e=this.pluginKey,void Qt(T`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
249
+ Only \`${t}\` will work. The \`${e}\` plugin will remain disabled.`);this.enabled||(JR.set(this.hot,this.pluginKey),this.columnStatesManager=new CR(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new Fa(t=>{let e=this.hot.toVisualColumn(t);return null===e&&(e=t),this.getMergedPluginSettings(e)}),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",(t,e)=>KR(QR,this,nk).call(this,t,e)),this.addHook("beforeOnCellMouseDown",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return KR(QR,n,ik).call(n,...e)}),this.addHook("afterOnCellMouseDown",(t,e)=>this.onAfterOnCellMouseDown(t,e)),this.addHook("afterInit",()=>KR(QR,this,ek).call(this)),this.addHook("afterLoadData",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return KR(QR,n,ok).call(n,...e)}),this.hot.view&&KR(QR,this,ek).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const t=(t,e)=>{const n=VR(e);!1!==BR(t,e)&&null!==n&&this.updateHeaderClasses(n)};JR.delete(this.hot),this.hot.addHook("afterGetColHeader",t),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("afterGetColHeader",t)}),this.hot.batchExecution(()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)},!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeActive();return this.sort(this.getColumnNextConfig(t.col)),!1},runOnlyIf:()=>{var t,e;const n=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return n&&(null===(e=this.hot.getSelectedRangeActive())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.row&&n.col>=0},relativeToGroup:mg,position:"before",group:ZR})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(ZR)}sort(t){const e=this.getSortConfig(),n=this.getNormalizedSortConfigs(t),o=this.areValidSortConfigs(n);!1!==this.hot.runHooks("beforeColumnSort",e,n,o)&&(0===e.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new Za),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),o&&(this.columnStatesManager.setSortStates(n),this.sortByPresetSortStates(n)),this.hot.runHooks("afterColumnSort",e,o?n:e,o),o&&this.hot.render())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(t){return I(t)?this.columnStatesManager.getColumnSortState(t):this.columnStatesManager.getSortStates()}setSortConfig(t){const e=this.getNormalizedSortConfigs(t);this.areValidSortConfigs(e)&&this.columnStatesManager.setSortStates(e)}getNormalizedSortConfigs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t.slice(0,1):[t]}areValidSortConfigs(t){const e=this.hot.countCols();return DR(t)&&t.every(t=>{let{column:n}=t;return n<=e&&n>=0})}getColumnNextConfig(t){const e=this.columnStatesManager.getSortOrderOfColumn(t);if(I(e)){const n=LR(e);return I(n)?{column:t,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(t)&&t>=0&&t<n)return{column:t,sortOrder:LR()}}getNextSortConfig(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:XR;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(t),o=-1!==n,i=this.getSortConfig(),r=this.getColumnNextConfig(t);if(o){if(A(r))return[...i.slice(0,n),...i.slice(n+1)];if(e===XR)return[...i.slice(0,n),...i.slice(n+1),r];if("replace"===e)return[...i.slice(0,n),r,...i.slice(n+1)]}return I(r)?i.concat(r):i}getPluginColumnConfig(t){if(Et(t)){const e=t[this.pluginKey];if(Et(e))return e}return{}}getMergedPluginSettings(t){const e=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),o=this.hot.getCellMeta(0,t),i=Object.getPrototypeOf(o);return Array.isArray(i.columns)?Object.assign(n,e,this.getPluginColumnConfig(i.columns[t])):Ze(i.columns)?Object.assign(n,e,this.getPluginColumnConfig(i.columns(t))):Object.assign(n,e)}getFirstCellSettings(t){const e=this.hot.getCellMeta(0,t),n=Object.create(e);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(t)),n}getNumberOfRowsToSort(t){const e=this.hot.getSettings();return e.maxRows<=t?e.maxRows:t-e.minSpareRows}sortByPresetSortStates(t){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===t.length)return;const e=[],n=this.hot.countRows(),o=e=>k(t,t=>this.hot.getDataAtCell(e,t.column));for(let t=0;t<this.getNumberOfRowsToSort(n);t+=1)e.push([this.hot.toPhysicalRow(t)].concat(o(t)));const i=k(e,t=>t[0]);!function(t,e){const n=TR(e);for(var o=arguments.length,i=new Array(o>2?o-2:0),r=2;r<o;r++)i[r-2]=arguments[r];t.sort(n(...i))}(e,this.pluginKey,k(t,t=>t.sortOrder),k(t,t=>this.getFirstCellSettings(t.column)));for(let t=e.length;t<n;t+=1)e.push([t].concat(o(t)));const r=k(e,t=>t[0]),s=new Map(k(i,(t,e)=>[t,r[e]])),a=k(this.hot.rowIndexMapper.getIndexesSequence(),t=>s.has(t)?s.get(t):t);this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(t){if(Et(t)){this.columnStatesManager.updateAllColumnsProperties(t);const e=t.initialConfig;(Array.isArray(e)||Et(e))&&this.sort(e)}else this.hot.render()}updateHeaderClasses(t){if(ge(t,Array.from(UR.values()).concat($R,zR,jR)),!1!==this.enabled){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];ue(t,function(t,e,n,o){const i=[jR];if(o&&i.push($R),!1===n)return i.push(zR),i;const r=t.getSortOrderOfColumn(e);return I(r)&&i.push(UR.get(r)),i}(...n))}}onUpdateSettings(t){super.onUpdateSettings(t),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),I(t[this.pluginKey])&&this.sortBySettings(t[this.pluginKey])}wasClickableHeaderClicked(t,e){return this.getFirstCellSettings(e)[this.pluginKey].headerAction&&de(t.target,NR)}onAfterOnCellMouseDown(t,e){if(!1!==FR(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(e.col));const t=this.hot.getActiveEditor(),n=this.getColumnNextConfig(e.col);null!=t&&t.isOpened()&&this.hot.getCellValidator(t.row,t.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(n)}):this.sort(n)}}destroy(){var t;null===(t=this.columnStatesManager)||void 0===t||t.destroy(),super.destroy()}}function ek(){const t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}function nk(t,e){const n=VR(e);if(!1===BR(t,e)||null===n)return;const o=this.getFirstCellSettings(t)[this.pluginKey],i=o.indicator,r=o.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,t,i,r),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(t);fe(e,...(s=n?`${n}ending`:"none",["aria-sort",s]))}var s}function ok(t){!0===t&&this.hot.view&&KR(QR,this,ek).call(this)}function ik(t,e,n,o){!1!==FR(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(o.column=!0)}function rk(t){return null==t||isNaN(t)}function sk(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ak{constructor(t,e){sk(this,"plugin",void 0),sk(this,"hot",void 0),sk(this,"endpoints",[]),sk(this,"settings",void 0),sk(this,"settingsType","array"),sk(this,"currentEndpoint",null),sk(this,"cellsToSetCache",[]),this.plugin=t,this.hot=this.plugin.hot,this.settings=e}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(t){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[t]:this.endpoints[t]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(t){return this.parseSettings(t.call(this))}parseSettings(t){const e=[];let n=t;if(n||"function"!=typeof this.settings)return n||(n=this.settings),x(n,t=>{const n={};this.assignSetting(t,n,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(t,n,"reversedRowCoords",!1),this.assignSetting(t,n,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,n,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,n,"sourceColumn",t.destinationColumn),this.assignSetting(t,n,"type","sum"),this.assignSetting(t,n,"forceNumeric",!1),this.assignSetting(t,n,"suppressDataTypeErrors",!0),this.assignSetting(t,n,"customFunction",null),this.assignSetting(t,n,"readOnly",!0),this.assignSetting(t,n,"roundFloat",!1),e.push(n)}),e;this.settingsType="function"}assignSetting(t,e,n,o){if("ranges"!==n||void 0!==t[n]){if("ranges"!==n||0!==t[n].length)if(void 0===t[n]){if(o instanceof Error)throw o;e[n]=o}else"destinationRow"===n&&e.reversedRowCoords?e[n]=this.hot.countRows()-t[n]-1:e[n]=t[n]}else e[n]=o}resetSetupBeforeStructureAlteration(t,e,n){if("function"!==this.settingsType)return;const o=t.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();x(i,i=>{"row"===o&&i.destinationRow>=e&&("insert_row"===t?i.alterRowOffset=n:"remove_row"===t&&(i.alterRowOffset=-1*n)),"col"===o&&i.destinationColumn>=e&&("insert_col"===t?i.alterColumnOffset=n:"remove_col"===t&&(i.alterColumnOffset=-1*n))}),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(t,e,n,o,i){let r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("auto"===i)return;if("function"===this.settingsType){const t=()=>(this.hot.removeHook("beforeViewRender",t),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",t)}const s=t.indexOf("row")>-1?"row":"col",a=t.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),h=0===t.indexOf("move_row"),c=e;x(l,t=>{"row"===s&&t.destinationRow>=c&&(t.alterRowOffset=a*n),"col"===s&&t.destinationColumn>=c&&(t.alterColumnOffset=a*n)}),this.resetAllEndpoints(l,!h),x(l,h?t=>{this.extendEndpointRanges(t,c,o[0],o.length),this.recreatePhysicalRanges(t),this.clearOffsetInformation(t)}:t=>{this.shiftEndpointCoordinates(t,c)}),r&&this.refreshAllEndpoints()}clearOffsetInformation(t){t.alterRowOffset=void 0,t.alterColumnOffset=void 0}extendEndpointRanges(t,e,n,o){x(t.ranges,t=>{t[1]&&(e>=t[0]&&e<=t[1]?n>t[1]?t[1]+=o:n<t[0]&&(t[0]-=o):n>=t[0]&&n<=t[1]&&(t[1]-=o,e<=t[0]&&(t[0]+=1,t[1]+=1)))})}recreatePhysicalRanges(t){const e=t.ranges,n=[],o=[];x(e,t=>{const e=[];if(t[1])for(let n=t[0];n<=t[1];n++)e.push(this.hot.toPhysicalRow(n));else e.push(this.hot.toPhysicalRow(t[0]));o.push(e)}),x(o,t=>{let e=[];x(t,(o,i)=>{0===i?e.push(o):t[i]!==t[i-1]+1&&(e.push(t[i-1]),n.push(e),e=[],e.push(o)),i===t.length-1&&(e.push(o),n.push(e))})}),t.ranges=n}shiftEndpointCoordinates(t,e){t.alterRowOffset&&0!==t.alterRowOffset?(t.destinationRow+=t.alterRowOffset||0,x(t.ranges,n=>{x(n,(o,i)=>{o>=e&&(n[i]+=t.alterRowOffset||0)})})):t.alterColumnOffset&&0!==t.alterColumnOffset&&(t.destinationColumn+=t.alterColumnOffset||0,t.sourceColumn+=t.alterColumnOffset||0)}resetAllEndpoints(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t.some(t=>{const e=t.alterRowOffset||0,n=t.alterColumnOffset||0;return t.destinationRow+e>=this.hot.countRows()||t.destinationColumn+n>=this.hot.countCols()})||(this.cellsToSetCache=[],x(t,t=>{this.resetEndpointValue(t,e)}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],x(this.getAllEndpoints(),t=>{this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t,"init")}),this.currentEndpoint=null,this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(t){const e=[];this.cellsToSetCache=[],x(t,(t,n,o)=>{`${t[2]||""}`!=`${t[3]}`&&x(this.getAllEndpoints(),(t,i)=>{this.hot.propToCol(o[n][1])===t.sourceColumn&&-1===e.indexOf(i)&&e.push(i)})}),x(e,t=>{this.refreshEndpoint(this.getEndpoint(t))}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach(t=>{const e=this.hot.toVisualRow(t.destinationRow);if(null!==e){const n=this.hot.getCellMeta(e,t.destinationColumn);n.readOnly=t.readOnly,n.className="columnSummaryResult"}})}refreshEndpoint(t){this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t),this.currentEndpoint=null}resetEndpointValue(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=t.alterRowOffset||0,o=t.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(t.destinationRow+(e?n:0)),this.hot.toVisualColumn(t.destinationColumn+(e?o:0)),""])}setEndpointValue(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=this.hot.toVisualRow(t.destinationRow);if(t.destinationRow>=this.hot.countRows()||t.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(t.destinationRow);if(null!==i){const n=this.hot.getCellMeta(i,t.destinationColumn);"init"!==e&&n.readOnly===t.readOnly||(n.readOnly=t.readOnly,n.className="columnSummaryResult")}t.result=function(t,e){if("number"!=typeof t)return t;const n=t=>t.toString();switch(typeof e){case"number":return n(t.toFixed(Math.min(Math.max(0,e),100)));case"boolean":return e?n(Math.round(t)):t;case"string":if("auto"===e){const e=Math.round(t).toString().length;return n(t.toFixed(8-e))}return t;default:return t}}(t.result,t.roundFloat),n?this.hot.setDataAtCell(o,t.destinationColumn,t.result,"ColumnSummary.set"):this.cellsToSetCache.push([o,t.destinationColumn,t.result]),t.alterRowOffset=void 0,t.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Qt("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}function lk(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function hk(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ck(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const dk="columnSummary";var uk=new WeakSet;class gk extends DC{constructor(){super(...arguments),lk(this,uk),hk(this,"endpoints",null)}static get PLUGIN_KEY(){return dk}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[dk]}enablePlugin(){var t=this;this.enabled||(this.settings=this.hot.getSettings()[dk],this.endpoints=new ak(this,this.settings),this.addHook("afterInit",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,fk).call(t,...n)}),this.addHook("afterChange",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,mk).call(t,...n)}),this.addHook("afterUpdateSettings",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,pk).call(t,...n)}),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,bk).call(t,...n)}),this.addHook("afterUpdateData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,wk).call(t,...n)}),this.addHook("beforeCreateRow",(t,e,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",t,e,null,n)),this.addHook("beforeCreateCol",(t,e,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",t,e,null,n)),this.addHook("beforeRemoveRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.endpoints.resetSetupBeforeStructureAlteration("remove_row",...n)}),this.addHook("beforeRemoveCol",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.endpoints.resetSetupBeforeStructureAlteration("remove_col",...n)}),this.addHook("afterCreateRow",(t,e,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",t,e,null,n)),this.addHook("afterCreateCol",(t,e,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",t,e,null,n)),this.addHook("afterRemoveRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.endpoints.resetSetupAfterStructureAlteration("remove_row",...n)}),this.addHook("afterRemoveCol",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.endpoints.resetSetupAfterStructureAlteration("remove_col",...n)}),this.addHook("afterRowMove",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ck(uk,t,vk).call(t,...n)}),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(t){switch(t.type.toLowerCase()){case"sum":t.result=this.calculateSum(t);break;case"min":case"max":t.result=this.calculateMinMax(t,t.type);break;case"count":t.result=this.countEntries(t);break;case"average":t.result=this.calculateAverage(t);break;case"custom":t.result=t.customFunction.call(this,t)}}calculateSum(t){let e=0;return Tt(t.ranges,n=>{e+=this.getPartialSum(n,t.sourceColumn)}),e}getPartialSum(t,e){let n=0,o=t[1]||t[0],i=null,r=0;do{if(i=this.getCellValue(o,e),i=rk(i)?null:i,null!==i){const t=(`${i}`.split(".")[1]||[]).length||1;t>r&&(r=t)}n+=i||0,o-=1}while(o>=t[0]);return Math.round(n*10**r)/10**r}calculateMinMax(t,e){let n=null;return Tt(t.ranges,o=>{const i=this.getPartialMinMax(o,t.sourceColumn,e);if(null===n&&null!==i&&(n=i),null!==i)switch(e){case"min":n=Math.min(n,i);break;case"max":n=Math.max(n,i)}}),null===n?"Not enough data":n}getPartialMinMax(t,e,n){let o,i=null,r=t[1]||t[0];do{if(o=this.getCellValue(r,e),o=rk(o)?null:o,null===i)i=o;else if(null!==o)switch(n){case"min":i=Math.min(i,o);break;case"max":i=Math.max(i,o)}r-=1}while(r>=t[0]);return i}countEmpty(t,e){let n,o=0,i=t[1]||t[0];do{n=this.getCellValue(i,e),n=rk(n)?null:n,null===n&&(o+=1),i-=1}while(i>=t[0]);return o}countEntries(t){let e=0;return Tt(t.ranges,n=>{const o=void 0===n[1]?1:n[1]-n[0]+1,i=this.countEmpty(n,t.sourceColumn);e+=o,e-=i}),e}calculateAverage(t){return this.calculateSum(t)/this.countEntries(t)}getCellValue(t,e){const n=this.hot.toVisualRow(t),o=this.hot.toVisualColumn(e);let i=this.hot.getSourceDataAtCell(t,e),r="";return null!==n&&null!==o&&(r=this.hot.getCellMeta(n,o).className||""),r.indexOf("columnSummaryResult")>-1?null:(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&(this.endpoints.currentEndpoint.suppressDataTypeErrors||wt(T`ColumnSummary plugin: cell at (${t}, ${e}) is not in a\x20
250
+ numeric format. Cannot do the calculation.`)),i)}}function fk(){this.endpoints.initEndpoints()}function pk(t){void 0!==t.columns&&this.endpoints.refreshCellMetas()}function mk(t,e){t&&"ColumnSummary.reset"!==e&&"ColumnSummary.set"!==e&&"loadData"!==e&&this.endpoints.refreshChangedEndpoints(t)}function bk(t,e){e||this.endpoints.refreshAllEndpoints()}function wk(t,e){e||this.endpoints.refreshAllEndpoints()}function vk(t,e){this.endpoints.resetSetupBeforeStructureAlteration("move_row",t[0],t.length,t,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",e,t.length,t,this.pluginName)}function yk(t,e,n){Ck(t,e),e.set(t,n)}function Ck(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sk(t,e){return t.get(kk(t,e))}function Rk(t,e,n){return t.set(kk(t,e),n),n}function kk(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var xk=new WeakMap,Ek=new WeakMap,Mk=new WeakMap,Tk=new WeakSet;class _k{constructor(){var t,e;Ck(t=this,e=Tk),e.add(t),yk(this,xk,!0),yk(this,Ek,null),yk(this,Mk,new ResizeObserver(t=>kk(Tk,this,Hk).call(this,t)))}setObservedElement(t){Rk(Ek,this,t)}unobserve(){Sk(Mk,this).unobserve(Sk(Ek,this))}observe(){Rk(xk,this,!0),Sk(Mk,this).observe(Sk(Ek,this))}destroy(){Sk(Mk,this).disconnect()}}function Hk(t){!Sk(xk,this)&&Array.isArray(t)&&t.length?t.forEach(t=>{let{borderBoxSize:e}=t;const{inlineSize:n,blockSize:o}=e[0];this.runLocalHooks("resize",n,o)}):Rk(xk,this,!1)}function Ik(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Ak(t,e){return t.get(Ok(t,e))}function Pk(t,e,n){return t.set(Ok(t,e),n),n}function Ok(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}kt(_k,os);var Nk=new WeakMap,Dk=new WeakMap,Lk=new WeakMap,Vk=new WeakMap,Bk=new WeakMap,Fk=new WeakMap,Wk=new WeakMap,zk=new WeakMap;class jk{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(t,e,n){var o=this;Ik(this,Nk,void 0),Ik(this,Dk,void 0),Ik(this,Lk,!1),Ik(this,Vk,null),Ik(this,Bk,void 0),Ik(this,Fk,void 0),Ik(this,Wk,!0),Ik(this,zk,new _k),Pk(Nk,this,t),Pk(Dk,this,n),Pk(Lk,this,e),Pk(Bk,this,this.createEditor()),Pk(Fk,this,Ak(Bk,this).style),Ak(zk,this).setObservedElement(this.getInputElement()),Ak(zk,this).addLocalHook("resize",function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return o.runLocalHooks("resize",...e)}),this.hide()}setPosition(t,e){Ak(Fk,this).left=`${t}px`,Ak(Fk,this).top=`${e}px`}setSize(t,e){if(t&&e){const n=this.getInputElement();n.style.width=`${t}px`,n.style.height=`${e}px`}}getSize(){return{width:Ae(this.getInputElement()),height:Pe(this.getInputElement())}}observeSize(){Ak(zk,this).observe()}resetSize(){const t=this.getInputElement();t.style.width="",t.style.height=""}setReadOnlyState(t){this.getInputElement().readOnly=t}show(){Ak(Fk,this).display="block",Pk(Wk,this,!1)}hide(){Ak(zk,this).unobserve(),Ak(Wk,this)||(Ak(Fk,this).display="none"),Pk(Wk,this,!0)}isVisible(){return"block"===Ak(Fk,this).display}setValue(){const t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return Ak(Nk,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const t=Ak(Nk,this).createElement("div"),e=Ak(Nk,this).createElement("textarea");return t.style.display="none",Pk(Vk,this,Ak(Nk,this).createElement("div")),Ak(Vk,this).setAttribute("dir",Ak(Lk,this)?"rtl":"ltr"),ue(Ak(Vk,this),jk.CLASS_EDITOR_CONTAINER),Ak(Dk,this).appendChild(Ak(Vk,this)),ue(t,jk.CLASS_EDITOR),ue(e,jk.CLASS_INPUT),e.setAttribute("data-hot-input",!0),t.appendChild(e),Ak(Vk,this).appendChild(t),t}getInputElement(){return Ak(Bk,this).querySelector(`.${jk.CLASS_INPUT}`)}getEditorElement(){return Ak(Bk,this)}destroy(){const t=Ak(Vk,this)?Ak(Vk,this).parentNode:null;Ak(Bk,this).parentNode.removeChild(Ak(Bk,this)),Pk(Bk,this,null),Pk(Fk,this,null),Ak(zk,this).destroy(),t&&t.removeChild(Ak(Vk,this))}}function $k(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(jk,os);class Uk{constructor(t){$k(this,"wasLastActionShow",!0),$k(this,"showDebounced",null),$k(this,"hidingTimer",null),this.updateDelay(t)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")},250)}show(t){this.wasLastActionShow=!0,this.showDebounced(t)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=Je(t=>{this.wasLastActionShow&&this.runLocalHooks("show",t.from.row,t.from.col)},t)}destroy(){this.clearLocalHooks()}}function Yk(t,e){const n={};return x(t,t=>{t.forAll((t,o)=>{t>=0&&o>=0&&(n[t]||(n[t]=[]),n[t][o]=e(t,o))})}),n}function Gk(t,e,n,o,i){x(t,t=>{t.forAll((t,r)=>{t>=0&&r>=0&&function(t,e,n,o,i,r){const s=i(t,e);let a=o;s.className&&(a="vertical"===n?function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${e}`}(s.className,o):function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${e}`}(s.className,o));r(t,e,"className",a)}(t,r,e,n,o,i)})})}function Kk(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}function qk(t,e){let n=!1;return Array.isArray(t)&&x(t,t=>(t.forAll((t,o)=>{if(t>=0&&o>=0&&e(t,o))return n=!0,!1}),n)),n}function Xk(t,e){const n={top:0,left:0};if(e!==t.ownerDocument){const{frameElement:t}=e.defaultView,{top:o,left:i}=t.getBoundingClientRect();n.top=o,n.left=i}return n}kt(Uk,os);const Zk="---------";const Jk="alignment";const Qk="clear_column";const tx="col_left";const ex="col_right";const nx="make_read_only";const ox="redo";const ix="remove_col";const rx="remove_row";const sx="row_above";const ax="row_below";const lx="no_items";const hx="undo";const cx=[sx,ax,tx,ex,Qk,rx,ix,hx,ox,nx,Jk,Zk,lx],dx={[Zk]:function(){return{name:Zk}},[lx]:function(){return{key:lx,name(){return this.getTranslatedPhrase(_l)},disabled:!0,isCommand:!1}},[sx]:function(){return{key:sx,name(){return this.getTranslatedPhrase(Hl)},callback(){const t=this.getSelectedRangeActive().getTopLeftCorner();this.alter("insert_row_above",t.row,1,"ContextMenu.rowAbove")},disabled(){const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&t.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)||!!this.selection.isSelectedByCorner()&&0===this.countRows()},hidden(){return!this.getSettings().allowInsertRow}}},[ax]:function(){return{key:ax,name(){return this.getTranslatedPhrase(Il)},callback(){const t=this.getSelectedRangeActive().getBottomRightCorner();this.alter("insert_row_below",t.row,1,"ContextMenu.rowBelow")},disabled(){const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&t.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)},hidden(){return!this.getSettings().allowInsertRow}}},[tx]:function(){return{key:tx,name(){return this.getTranslatedPhrase(Al)},callback(){const t=this.getSelectedRangeActive().getTopLeftCorner(),e=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(e,t.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByRowHeader()||t.isSingleHeader()&&t.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)||!!this.selection.isSelectedByCorner()&&0===this.countCols()},hidden(){return!this.getSettings().allowInsertColumn}}},[ex]:function(){return{key:ex,name(){return this.getTranslatedPhrase(Pl)},callback(){const t=this.getSelectedRangeActive().getTopRightCorner(),e=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(e,t.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByRowHeader()||t.isSingleHeader()&&t.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)},hidden(){return!this.getSettings().allowInsertColumn}}},[Qk]:function(){return{key:Qk,name(){return this.getTranslatedPhrase(Bl)},callback(t,e){const n=e[0].start.col,o=e[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(e[0].start.row,e[0].end.row),o,"ContextMenu.clearColumn")},disabled(){const t=this.getSelectedRangeActive();if(!t||t.isSingleHeader()&&t.highlight.col<0||!this.selection.isSelectedByColumnHeader())return!0;let e=!1;return t.forAll((t,n)=>{if(t<0||n<0)return!0;const{readOnly:o}=this.getCellMeta(t,n);return!!o||(e=!0,!1)}),!e}}},[rx]:function(){return{key:rx,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[n,,o]=t[0];n-o!==0&&(e=1)}return this.getTranslatedPhrase(Ol,e)},callback(){this.alter("remove_row",function(t){const e=Cd(t.getSelected());if(0===e||1===e)return[];const n=Sd(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),o=new Set;x(t.getSelected(),t=>{const{from:e,to:i}=n(t),r=Math.max(e.row,0),s=i.row-r+1;x(Array.from(new Array(s),(t,e)=>r+e),t=>{o.has(t)||o.add(t)})});const i=S(Array.from(o).sort((t,e)=>t-e),(t,e,n,o)=>(0!==n&&e===o[n-1]+1?t[t.length-1][1]+=1:t.push([e,1]),t),[]);return i}(this),1,"ContextMenu.removeRow")},disabled(){const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader()&&t.highlight.row<0)return!0;const e=this.countRows();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByColumnHeader()||0===e},hidden(){return!this.getSettings().allowRemoveRow}}},[ix]:function(){return{key:ix,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[,n,,o]=t[0];n-o!==0&&(e=1)}return this.getTranslatedPhrase(Nl,e)},callback(){this.alter("remove_col",function(t){const e=Cd(t.getSelected());if(0===e||1===e)return[];const n=Sd(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),o=new Set;x(t.getSelected(),t=>{const{from:e,to:i}=n(t),r=Math.max(e.col,0),s=i.col-r+1;x(Array.from(new Array(s),(t,e)=>r+e),t=>{o.has(t)||o.add(t)})});const i=S(Array.from(o).sort((t,e)=>t-e),(t,e,n,o)=>(0!==n&&e===o[n-1]+1?t[t.length-1][1]+=1:t.push([e,1]),t),[]);return i}(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader()&&t.highlight.col<0)return!0;const e=this.countCols();return this.selection.isSelectedByCorner()?0===e:this.selection.isSelectedByRowHeader()||0===e},hidden(){return!this.getSettings().allowRemoveColumn}}},[hx]:function(){return{key:hx,name(){return this.getTranslatedPhrase(Dl)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[ox]:function(){return{key:ox,name(){return this.getTranslatedPhrase(Ll)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[nx]:function(){return{key:nx,checkable:!0,ariaChecked(){return qk(this.getSelectedRange(),(t,e)=>this.getCellMeta(t,e).readOnly)},ariaLabel(){return this.getTranslatedPhrase(Vl)},name(){let t=this.getTranslatedPhrase(Vl);return qk(this.getSelectedRange(),(t,e)=>this.getCellMeta(t,e).readOnly)&&(t=Kk(t)),t},callback(){const t=this.getSelectedRange(),e=qk(t,(t,e)=>this.getCellMeta(t,e).readOnly);x(t,t=>{t.forAll((t,n)=>{t>=0&&n>=0&&this.setCellMeta(t,n,"readOnly",!e)})}),this.render()},disabled(){const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}},[Jk]:function(){return{key:Jk,name(){return this.getTranslatedPhrase(Ql)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${Jk}:left`,name(){return this.getTranslatedPhrase(th)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${Jk}:center`,name(){return this.getTranslatedPhrase(eh)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${Jk}:right`,name(){return this.getTranslatedPhrase(nh)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htRight";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${Jk}:justify`,name(){return this.getTranslatedPhrase(oh)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{name:Zk},{key:`${Jk}:top`,name(){return this.getTranslatedPhrase(ih)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htTop";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${Jk}:middle`,name(){return this.getTranslatedPhrase(rh)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${Jk}:bottom`,name(){return this.getTranslatedPhrase(sh)},callback(){const t=this.getSelectedRange(),e=Yk(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htBottom";this.runHooks("beforeCellAlignment",e,t,n,o),Gk(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1}]}}}};function ux(){const t={};return Tt(dx,(e,n)=>{t[n]=e()}),t}function gx(t,e,n){fx(t,e),e.set(t,n)}function fx(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function px(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mx(t,e,n){return t.set(wx(t,e),n),n}function bx(t,e){return t.get(wx(t,e))}function wx(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const vx="comments",yx="comment",Cx="value",Sx="style",Rx="readOnly",kx=vx,xx=`plugin:${vx}`;var Ex=new WeakMap,Mx=new WeakMap,Tx=new WeakMap,_x=new WeakMap,Hx=new WeakMap,Ix=new WeakMap,Ax=new WeakMap,Px=new WeakSet;class Ox extends DC{constructor(){var t,e;super(...arguments),fx(t=this,e=Px),e.add(t),px(this,"range",{}),gx(this,Ex,null),gx(this,Mx,null),gx(this,Tx,!1),gx(this,_x,!1),gx(this,Hx,!1),gx(this,Ix,null),gx(this,Ax,"")}static get PLUGIN_KEY(){return vx}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[vx]}enablePlugin(){var t=this;this.enabled||(bx(Ex,this)||(mx(Ex,this,new jk(this.hot.rootDocument,this.hot.isRtl(),this.hot.rootPortalElement)),bx(Ex,this).addLocalHook("resize",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return wx(Px,t,zx).call(t,...n)}),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.hide()})),bx(Mx,this)||mx(Mx,this,new Uk(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",t=>this.addToContextMenu(t)),this.addHook("afterRenderer",(t,e,n,o,i,r)=>wx(Px,this,Bx).call(this,t,r)),this.addHook("afterScroll",()=>wx(Px,this,$x).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",t=>wx(Px,this,jx).call(this,t)),this.addHook("beforeCompositionStart",t=>wx(Px,this,jx).call(this,t)),bx(Mx,this).addLocalHook("hide",()=>this.hide()),bx(Mx,this).addLocalHook("show",(t,e)=>this.showAtCell(t,e)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){bx(Mx,this).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=this.hot.getShortcutManager(),e=t.getContext("grid"),n=t.addContext(xx);e.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const e=this.hot.getSelectedRangeActive();mx(_x,this,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(e),this.show(),this.focusEditor(),t.setActiveContextName(xx),this.hot._registerTimeout(()=>{mx(_x,this,!1)})})},stopPropagation:!0,runOnlyIf:()=>{var t;return null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight.isCell()},group:kx}),n.addShortcut({keys:[["Escape"]],callback:()=>{bx(Ex,this).setValue(bx(Ax,this)),this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>bx(Ex,this).isVisible()&&bx(Ex,this).isFocused(),group:kx}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>bx(Ex,this).isVisible()&&bx(Ex,this).isFocused(),group:kx}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:t.getContext("grid"),callback:()=>{mx(Hx,this,!0),bx(Ex,this).setValue(bx(Ex,this).getValue()),this.setComment(),this.hide(),t.setActiveContextName("grid")},group:kx})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(kx)}registerListeners(){const{rootDocument:t}=this.hot,e=this.getEditorInputElement();this.eventManager.addEventListener(t,"mouseover",t=>wx(Px,this,Lx).call(this,t)),this.eventManager.addEventListener(t,"mousedown",t=>wx(Px,this,Nx).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>wx(Px,this,Vx).call(this)),this.eventManager.addEventListener(e,"focus",()=>wx(Px,this,Wx).call(this)),this.eventManager.addEventListener(e,"blur",()=>wx(Px,this,Fx).call(this)),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",t=>wx(Px,this,Dx).call(this,t))}setRange(t){this.range=t}clearRange(){this.range={}}targetIsCellWithComment(t){const e=re(t.target,"TD","TBODY");return!!(e&&de(e,"htCommentCell")&&re(e,[this.hot.rootElement]))}targetIsCommentTextArea(t){return this.getEditorInputElement()===t.target}setComment(t){this.range.from||wt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const e=bx(Ex,this).getValue();let n="";null!=t?n=t:null!=e&&(n=e);const{row:o,col:i}=wx(Px,this,Ux).call(this);this.updateCommentMeta(o,i,{[Cx]:n}),this.hot.render()}setCommentAtCell(t,e,n){this.setRange({from:this.hot._createCellCoords(t,e)}),this.setComment(n)}removeComment(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.range.from||wt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:e,col:n}=wx(Px,this,Ux).call(this);this.hot.setCellMeta(e,n,yx),t&&this.hot.render(),this.hide()}removeCommentAtCell(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(t,e)}),this.removeComment(n)}getComment(){const{row:t,col:e}=wx(Px,this,Ux).call(this);return this.getCommentMeta(t,e,Cx)}getCommentAtCell(t,e){return this.getCommentMeta(t,e,Cx)}show(){var t;this.range.from||wt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:e,col:n}=wx(Px,this,Ux).call(this);if(e<0||e>this.hot.countSourceRows()-1||n<0||n>this.hot.countSourceCols()-1)return!1;const o=this.hot.getCellMeta(e,n);return bx(Mx,this).cancelHiding(),bx(Ex,this).setValue(null!==(t=o[yx]?o[yx][Cx]:null)&&void 0!==t?t:""),bx(Ex,this).show(),this.refreshEditor(!0),!0}showAtCell(t,e){return this.setRange({from:this.hot._createCellCoords(t,e)}),this.show()}hide(){bx(Ex,this).hide()}refreshEditor(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&bx(Ex,this).isVisible()))return;const{rowIndexMapper:t,columnIndexMapper:e}=this.hot,{row:n,col:o}=wx(Px,this,Ux).call(this);let i=t.getRenderableFromVisualIndex(n),r=e.getRenderableFromVisualIndex(o);const s=null===i;bx(Ex,this).setPosition(0,0),null===i&&(i=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(n,-1))),null===r&&(r=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(o,-1)));const a=null===i,l=null===r;i=null!=i?i:0,r=null!=r?r:0;const{rootWindow:h,view:{_wt:c}}=this.hot,{wtTable:d}=c,u=c.getCell({row:i,col:r},!0),g=this.getCommentMeta(n,o,Sx);g?bx(Ex,this).setSize(g.width,g.height):bx(Ex,this).resetSize();const f=l?0:d.getColumnWidth(r),p=s&&!a?Pe(u):0,{left:m,top:b,width:w,height:v}=u.getBoundingClientRect(),{width:y,height:C}=bx(Ex,this).getSize(),{innerWidth:S,innerHeight:R}=this.hot.rootWindow,k=this.hot.rootDocument.documentElement,x=Fe(this.hot.rootDocument),E=We(this.hot.rootWindow)?x:0,M=ze(this.hot.rootWindow)?x:0;let T=m+h.scrollX+f,_=b+h.scrollY+p;this.hot.isRtl()&&(T-=y+f),this.hot.isLtr()&&m+w+y>S-E?T=m+h.scrollX-y-1:this.hot.isRtl()&&T<-(k.scrollWidth-k.clientWidth)&&(T=m+h.scrollX+f+1),b+C>R-M&&(_-=C-v+1),bx(Ex,this).setPosition(T,_),bx(Ex,this).setReadOnlyState(this.getCommentMeta(n,o,Rx)),bx(Ex,this).observeSize()}focusEditor(){bx(Ex,this).focus()}updateCommentMeta(t,e,n){const o=this.hot.getCellMeta(t,e)[yx];let i;o?(i=St(o),Ct(i,n)):i=n,this.hot.setCellMeta(t,e,yx,i)}getCommentMeta(t,e,n){const o=this.hot.getCellMeta(t,e);if(o[yx])return o[yx][n]}addToContextMenu(t){var e;t.items.push({name:Zk},(e=this,{key:"commentsAddEdit",name(){var t;const n=null===(t=this.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return null!=n&&n.isCell()&&e.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(Xl):this.getTranslatedPhrase(ql)},callback(){const t=this.getSelectedRangeActive();e.setRange(t),e.show(),e.focusEditor()},disabled(){const t=this.getSelectedRangeActive();return!!(!t||t.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}),function(t){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(Zl)},callback(){this.getSelectedRangeActive().forAll((e,n)=>{e>=0&&n>=0&&t.removeCommentAtCell(e,n,!1)}),this.render()},disabled(){const t=this.getSelectedRangeActive();return!!(!t||t.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this),function(t){return{key:"commentsReadOnly",name(){const e=this.getTranslatedPhrase(Jl);return qk(this.getSelectedRange(),(e,n)=>t.getCommentMeta(e,n,Rx))?Kk(e):e},callback(){this.getSelectedRangeActive().forAll((e,n)=>{if(e>=0&&n>=0){const o=!!t.getCommentMeta(e,n,Rx);t.updateCommentMeta(e,n,{[Rx]:!o})}})},disabled(){const e=this.getSelectedRangeActive();return!!(!e||e.highlight.isHeader()||!t.getCommentAtCell(e.highlight.row,e.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}(this))}getEditorInputElement(){return bx(Ex,this).getInputElement()}destroy(){var t,e;null===(t=bx(Ex,this))||void 0===t||t.destroy(),null===(e=bx(Mx,this))||void 0===e||e.destroy(),super.destroy()}}function Nx(t){if(this.hot.view&&this.hot.view._wt&&!bx(Tx,this)&&!this.targetIsCommentTextArea(t)){const e=re(t.target,"TD","TBODY");let n=null;e&&(n=this.hot.getCoords(e)),(!e||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}}function Dx(t){t.stopPropagation()}function Lx(t){const{rootDocument:e}=this.hot;if(!(bx(Tx,this)||bx(Ex,this).isFocused()||de(t.target,"wtBorder")||bx(Ix,this)===t.target)&&bx(Ex,this))if(mx(Ix,this,e.elementFromPoint(t.clientX,t.clientY)),this.targetIsCellWithComment(t)){const e=this.hot._createCellRange(this.hot.getCoords(t.target));bx(Mx,this).show(e)}else ae(t.target,e)&&!this.targetIsCommentTextArea(t)&&bx(Mx,this).hide()}function Vx(){mx(Tx,this,!1)}function Bx(t,e){e[yx]&&e[yx][Cx]&&ue(t,e.commentedCellClassName)}function Fx(){bx(Hx,this)?mx(Hx,this,!1):(mx(Ax,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment())}function Wx(){mx(Ax,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(xx)}function zx(t,e){const{row:n,col:o}=wx(Px,this,Ux).call(this);this.updateCommentMeta(n,o,{[Sx]:{width:t,height:e}})}function jx(t){bx(Ex,this).isFocused()&&an(t)}function $x(){bx(_x,this)||this.hide()}function Ux(){return this.range instanceof Ci?this.range.highlight:this.hot._createCellCoords(this.range.from.row,this.range.from.col)}function Yx(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Gx{constructor(t){Yx(this,"hot",void 0),Yx(this,"commands",{}),Yx(this,"commonCallback",null),this.hot=t}registerCommand(t,e){this.commands[t]=e}setCommonCallback(t){this.commonCallback=t}execute(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];const i=t.split(":"),r=i[0],s=2===i.length?i[1]:null;let a=this.commands[r];if(a||wt(`Menu command '${r}' not exists.`),s&&a.submenu&&(a=function(t,e){let n;return x(e,e=>{const o=e.key?e.key.split(":"):null;if(Array.isArray(o)&&o[1]===t)return n=e,!1}),n}(s,a.submenu.items)),!0===a.disabled)return;if("function"==typeof a.disabled&&!0===a.disabled.call(this.hot))return;if(Pt(a,"submenu"))return;const l=[];"function"==typeof a.callback&&l.push(a.callback),"function"==typeof this.commonCallback&&l.push(this.commonCallback),n.unshift(i.join(":")),x(l,t=>t.apply(this.hot,n))}}function Kx(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qx{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Kx(this,"hot",void 0),Kx(this,"predefinedItems",ux()),Kx(this,"defaultOrderPattern",void 0),this.hot=t,this.defaultOrderPattern=e}setPredefinedItems(t){const e={};this.defaultOrderPattern.length=0,Tt(t,(t,n)=>{let o="";t.name===Zk?(e[Zk]=t,o=Zk):isNaN(parseInt(n,10))?(t.key=void 0===t.key?n:t.key,e[n]=t,o=t.key):(e[t.key]=t,o=t.key),this.defaultOrderPattern.push(o)}),this.predefinedItems=e}getItems(){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const o=[];let i=t;i&&i.items?i=i.items:Array.isArray(i)||(i=e);Et(i)?Tt(i,(t,e)=>{let i=n["string"==typeof t?t:e];i||(i=t),Et(t)?yt(i,t):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=e),o.push(i)}):x(i,(t,e)=>{let i=n[t];!i&&cx.indexOf(t)>=0||(i||(i={name:t,key:`${e}`}),Et(t)&&yt(i,t),void 0===i.key&&(i.key=e),o.push(i))});return o}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}function Xx(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Zx{constructor(t,e){Xx(this,"top",void 0),Xx(this,"topRelative",void 0),Xx(this,"left",void 0),Xx(this,"leftRelative",void 0),Xx(this,"scrollTop",void 0),Xx(this,"scrollLeft",void 0),Xx(this,"cellHeight",void 0),Xx(this,"cellWidth",void 0);const n=e.scrollY,o=e.scrollX;let i,r,s,a,l,h;this.rootWindow=e,this.type=this.getSourceType(t),"literal"===this.type?(i=parseInt(t.top,10),s=parseInt(t.left,10),l=t.height||0,h=t.width||0,r=i,a=s,i+=n,s+=o):"event"===this.type&&(i=parseInt(t.pageY,10),s=parseInt(t.pageX,10),l=t.target.clientHeight,h=t.target.clientWidth,r=i-n,a=s-o),this.top=i,this.topRelative=r,this.left=s,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=o,this.cellHeight=l,this.cellWidth=h}getSourceType(t){let e="literal";return t instanceof Event&&(e="event"),e}fitsAbove(t){return this.topRelative>=t.offsetHeight}fitsBelow(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+t.offsetHeight<=e}fitsOnRight(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.document.documentElement.clientWidth;return this.leftRelative+this.cellWidth+t.offsetWidth<=e}fitsOnLeft(t){return this.leftRelative>=t.offsetWidth}}function Jx(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function Qx(t,e){return t.get(eE(t,e))}function tE(t,e,n){return t.set(eE(t,e),n),n}function eE(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var nE=new WeakMap,oE=new WeakMap,iE=new WeakMap,rE=new WeakMap,sE=new WeakMap;class aE{constructor(t){Jx(this,nE,void 0),Jx(this,oE,void 0),Jx(this,iE,void 0),Jx(this,rE,!1),Jx(this,sE,{above:0,below:0,left:0,right:0}),tE(rE,this,t)}setOffset(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Qx(sE,this)[t]=e,this}setElement(t){return tE(nE,this,t),this}setParentElement(t){return tE(oE,this,t),this}updatePosition(t){tE(iE,this,new Zx(t,Qx(nE,this).ownerDocument.defaultView)),Qx(rE,this)?(Qx(iE,this).fitsBelow(Qx(nE,this))?this.setPositionBelowCursor():Qx(iE,this).fitsAbove(Qx(nE,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===Qx(nE,this).dir?Qx(iE,this).fitsOnLeft(Qx(nE,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():Qx(iE,this).fitsOnRight(Qx(nE,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let t=Qx(sE,this).above+Qx(iE,this).top-Qx(nE,this).offsetHeight;if(Qx(oE,this)){const e=Qx(oE,this).ownerDocument.defaultView.getComputedStyle(Qx(oE,this).querySelector(".ht_master")),n=Number.parseInt(e.paddingTop,10),o=Number.parseInt(e.borderTop,10);t=Qx(iE,this).top+Qx(iE,this).cellHeight-Qx(nE,this).scrollHeight+n+o}Qx(nE,this).style.top=`${t}px`}setPositionBelowCursor(){let t=Qx(sE,this).below+Qx(iE,this).top+1;if(Qx(oE,this)){const e=Qx(oE,this).ownerDocument.defaultView.getComputedStyle(Qx(oE,this).querySelector(".ht_master")),n=Number.parseInt(e.paddingTop,10),o=Number.parseInt(e.borderTop,10);t=Qx(iE,this).top-n-o}Qx(nE,this).style.top=`${t}px`}setPositionOnRightOfCursor(){let t=Qx(iE,this).left;if(Qx(oE,this)){const e=Qx(oE,this).ownerDocument.defaultView,n=Number.parseInt(e.getComputedStyle(Qx(oE,this).querySelector(".htCore")).borderRightWidth,10);t+=Qx(iE,this).cellWidth+n}else t+=Qx(sE,this).right;Qx(nE,this).style.left=`${t}px`}setPositionOnLeftOfCursor(){let t=Qx(sE,this).left+Qx(iE,this).left-Qx(nE,this).offsetWidth;if(Qx(oE,this)){const e=Qx(oE,this).ownerDocument.defaultView;t-=Number.parseInt(e.getComputedStyle(Qx(oE,this).querySelector(".htCore")).borderLeftWidth,10)}Qx(nE,this).style.left=`${t}px`}}function lE(t){let{initialPage:e=-1,size:n=()=>0,onItemSelect:o=()=>{},onClear:i=()=>{}}=t;const r=new Set;let s=co(e,-1,l()-1);function a(t,e){const n=l()-1;if(t<0&&(t=n),t>n&&(t=0),r.has(t))return-1;r.add(t);return!1===o(t,!1)&&(t=a(1===e?++t:--t,e)),t}function l(){return Math.max(n(),0)}return{setCurrentPage:function(t){t>-1&&t<l()&&!1!==o(t,!0)&&(s=t)},setPageCursorAt:function(t){t>-1&&t<l()&&(s=t)},getCurrentPage:function(){return s},toFirstItem:function(){l()>0&&(r.clear(),s=a(0,1))},toLastItem:function(){l()>0&&(r.clear(),s=a(l()-1,-1))},toNextItem:function(){l()>0&&(r.clear(),s=a(++s,1))},toPreviousItem:function(){l()>0&&(r.clear(),s=a(--s,-1))},getSize:l,clear:function(){r.clear(),s=e,i()}}}function hE(t){return Pt(t,"submenu")}function cE(t){return new RegExp(Zk,"i").test(t.name)}function dE(t,e){return!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(e)}function uE(t){return Pt(t,"disableSelection")}function gE(t,e){const n=t.slice(0);for(let t=0;t<n.length&&n[t].name===e;)n.shift();return n}function fE(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Zk,n=t.slice(0);return n=gE(n,e),n=function(t,e){let n=t.slice(0);return n.reverse(),n=gE(n,e),n.reverse(),n}(n,e),n=function(t){const e=[];return x(t,(t,n)=>{n>0?e[e.length-1].name!==t.name&&e.push(t):e.push(t)}),e}(n),n}function pE(t){return lE({size:()=>t.countRows(),onItemSelect(e,n){const o=t.getCell(e,0);if(!o||function(t){return de(t,"htSeparator")}(o)||function(t){return de(t,"htDisabled")}(o)||function(t){return de(t,"htSelectionDisabled")}(o))return!1;t.selectCell(e,0,...n?[e,0,!1,!1]:[])},onClear(){t.deselectCell()}})}const mE="menu",bE=mE;function wE(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function vE(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yE(t,e,n){return t.set(SE(t,e),n),n}function CE(t,e){return t.get(SE(t,e))}function SE(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var RE=new WeakMap,kE=new WeakMap,xE=new WeakMap;class EE{get tableBorderWidth(){return void 0===CE(xE,this)&&this.hotMenu&&yE(xE,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),CE(xE,this)}constructor(t,e){var n=this;vE(this,"hot",void 0),vE(this,"options",void 0),vE(this,"eventManager",new zn(this)),vE(this,"container",void 0),vE(this,"positioner",void 0),vE(this,"hotMenu",null),vE(this,"hotSubMenus",{}),vE(this,"parentMenu",void 0),vE(this,"menuItems",null),vE(this,"origOutsideClickDeselects",null),wE(this,RE,void 0),wE(this,kE,void 0),wE(this,xE,void 0),this.hot=t,this.options=e||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootPortalElement},this.container=this.createContainer(this.options.name),this.positioner=new aE(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return n.parentMenu.runLocalHooks("afterSelectionChange",...e)}),this.hot.addHook("afterSetTheme",(t,e)=>{this.options.container!==this.hot.rootPortalElement&&(ge(this.options.container,/ht-theme-.*/g),ue(this.options.container,t)),e||this.close()})}registerEvents(){let t=this.hot.rootWindow;for(;t;)this.eventManager.addEventListener(t.document,"mousedown",t=>this.onDocumentMouseDown(t)),this.eventManager.addEventListener(t.document,"touchstart",t=>this.onDocumentMouseDown(t)),this.eventManager.addEventListener(t.document,"contextmenu",t=>this.onDocumentContextMenu(t)),t=ie(t)}setMenuItems(t){this.menuItems=t}getNavigator(){return CE(RE,this)}getKeyboardShortcutsCtrl(){return CE(kE,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedActive()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedActive())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const t=Je(t=>this.openSubMenu(t),300),e=this.options.minWidth||215;let n=!1,o=R(this.menuItems,t=>(t.key===lx&&(n=!0),function(t,e){return!t.hidden||!("function"==typeof t.hidden&&t.hidden.call(e))}(t,this.hot)));if(o.length<1&&!n)o.push(ux()[lx]);else if(0===o.length)return;o=fE(o,Zk);let i=!1;const r={data:o,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:t=>I(t)&&t<e?e:t,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(s=this.hot,(t,e,n,o,i,r,a)=>{const l=t.getSourceDataAtRow(n),h=s.rootDocument.createElement("div"),c="function"==typeof r?r.call(s):r,d="function"==typeof l.ariaLabel?l.ariaLabel.call(s):l.ariaLabel,u="function"==typeof l.ariaChecked?l.ariaChecked.call(s):l.ariaChecked;if(a.readOnlyCellClassName="",be(e),ue(h,"htItemWrapper"),s.getSettings().ariaTags){const t=!dE(l,s)&&!uE(l)&&!cE(l);fe(e,[...(g=l,!0===g.checkable?[["role","menuitemcheckbox"],st(d),pt(u)]:[["role","menuitem"],st(c)]),...t?[J(-1)]:[],...dE(l,s)?[lt()]:[],...hE(l)?[ft(!1)]:[]])}var g;e.className="",e.appendChild(h),cE(l)?ue(e,"htSeparator"):"function"==typeof l.renderer?(ue(e,"htCustomMenuRenderer"),e.appendChild(l.renderer(t,h,n,o,i,c))):Ce(h,c,s.getSettings().sanitizer),dE(l,s)?ue(e,"htDisabled"):uE(l)?ue(e,"htSelectionDisabled"):hE(l)&&ue(e,"htSubmenu")})}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(t,e)=>{CE(RE,this).setPageCursorAt(e.row)},afterOnCellMouseOver:(e,n)=>{this.isAllSubMenusClosed()?t(n.row):this.openSubMenu(n.row)},afterOnCellContextMenu:t=>{t.preventDefault(),Xt()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(t,e,n,o,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:t=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(t))},afterOnCellMouseUp:t=>{Xt()&&hn(t)||!i||!this.hasSelectedItem()||(Gt()||qt()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};var s;this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,r),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),yE(RE,this,pE(this.hotMenu)),yE(kE,this,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function o(t,e){s(e).addShortcuts(t,{group:mE})}function i(t,e){const i=s(e);t.forEach(t=>{let{keys:e}=t;e.forEach(t=>i.removeShortcutsByKeys(t))}),n.push({shortcuts:t,contextName:e}),o(t,e)}function r(t){return t?`${bE}:${t}`:bE}function s(e){var n;const o=t.hotMenu.getShortcutManager(),i=r(e);return null!==(n=o.getContext(i))&&void 0!==n?n:o.addContext(i)}return o(function(t){const{hot:e,hotMenu:n}=t;return[{keys:[["Control/Meta","A"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:()=>t.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(n,o)=>{const i=e.getSettings(),r="function"==typeof i.tabMoves?i.tabMoves(n):i.tabMoves;o.includes("shift")?e.selection.transformStart(-r.row,-r.col):e.selection.transformStart(r.row,r.col),t.close(!0)}},{keys:[["Escape"]],callback:()=>t.close()},{keys:[["ArrowDown"]],callback:()=>t.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>t.getNavigator().toPreviousItem()},{keys:[[e.isRtl()?"ArrowLeft":"ArrowRight"]],callback:()=>{const e=n.getSelectedActive();if(e){const n=t.openSubMenu(e[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[[e.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{n.getSelectedActive()&&t.isSubMenu()&&(t.close(),t.isSubMenu()&&t.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>t.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>t.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:e=>{const o=n.getSelectedActive();o&&(n.getSourceDataAtRow(o[0]).submenu?t.openSubMenu(o[0]).getNavigator().toFirstItem():(t.executeCommand(e),t.close(!0)))}},{keys:[["PageUp"]],callback:()=>{n.getSelectedActive()?n.selection.transformStart(-n.countVisibleRows(),0):t.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{n.getSelectedActive()?n.selection.transformStart(n.countVisibleRows(),0):t.getNavigator().toLastItem()}}]}(t)),e.forEach(t=>{let{shortcuts:e,contextName:n}=t;i(e,n)}),{addCustomShortcuts:i,getCustomShortcuts:function(){return[...n]},getContext:s,listen:function(e){t.hotMenu.getShortcutManager().setActiveContextName(r(e))}}}(this)),CE(kE,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(t&&this.isSubMenu())this.parentMenu.close();else if(CE(RE,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const t=this.parentMenu.hotMenu.getSelectedActive();if(t){fe(this.parentMenu.hotMenu.getCell(t[0],0),[ft(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(t){if(!this.hotMenu)return!1;const e=this.hotMenu.getCell(t,0);if(this.closeAllSubMenus(),!e||!function(t){return de(t,"htSubmenu")}(e))return!1;const n=this.hotMenu.getSourceDataAtRow(t),o=new EE(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return o.setMenuItems(n.submenu.items),o.open(),o.setPosition(e.getBoundingClientRect()),this.hotSubMenus[n.key]=o,this.hot.getSettings().ariaTags&&fe(e,[ft(!0)]),o}closeSubMenu(t){const e=this.hotMenu.getSourceDataAtRow(t),n=this.hotSubMenus[e.key];if(n){n.destroy(),delete this.hotSubMenus[e.key];const o=this.hotMenu.getCell(t,0);this.hot.getSettings().ariaTags&&fe(o,[ft(!1)])}}closeAllSubMenus(){x(this.hotMenu.getData(),(t,e)=>this.closeSubMenu(e))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const t=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),t&&t.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(t){if(!this.isOpened()||!this.hasSelectedItem())return;const e=this.getSelectedItem();if(this.runLocalHooks("select",e,t),this.isCommandPassive(e))return;const n=this.hot.getSelectedRange(),o=n?function(t){return k(t,t=>({start:t.getTopStartCorner(),end:t.getBottomEndCorner()}))}(n):[];this.runLocalHooks("executeCommand",e.key,o,t),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",e.key,o,t)}isCommandPassive(t){return!1===t.isCommand||cE(t)||dE(t,this.hot)||hE(t)}setOffset(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(t,e)}setPosition(t){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(t)}updateMenuDimensions(){const{wtTable:t}=this.hotMenu.view._wt,e=this.hotMenu.getSettings().data,n=t.hider.style,o=t.holder.style,i=parseInt(n.width,10),r=S(e,(t,e,n)=>{const o=this.hotMenu.getCell(n,0)?Pe(this.hotMenu.getCell(n,0)):0;return t+(e.name===Zk?1:o)},0);o.width=`${i}px`,o.height=`${r}px`,n.height=o.height}createContainer(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const e=this.options.container.ownerDocument;let n,o=t;return o&&(Ze(o)&&(o=o.call(this.hot),o=null===o||A(o)?"":o.toString()),o=o.replace(/[^A-Za-z0-9]/g,"_"),o=`${this.options.className}Sub_${o}`,n=e.querySelector(`.${this.options.className}.${o}`)),n||(n=e.createElement("div"),ue(n,`htMenu handsontable ${this.options.className}`),o&&ue(n,o),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&fe(this.hotMenu.rootElement,[["role","menu"],J(-1)])}onDocumentMouseDown(t){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!ae(t.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||ae(t.target,".htMenu")||this.close(!0))}onDocumentContextMenu(t){this.isOpened()&&de(t.target,"htCore")&&ae(t.target,this.hotMenu.rootElement)&&t.preventDefault()}}function ME(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function TE(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _E(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}kt(EE,os);const HE="contextMenu",IE=HE;Mn.getSingleton().register("afterContextMenuDefaultOptions"),Mn.getSingleton().register("beforeContextMenuShow"),Mn.getSingleton().register("afterContextMenuShow"),Mn.getSingleton().register("afterContextMenuHide"),Mn.getSingleton().register("afterContextMenuExecute");var AE=new WeakSet;class PE extends DC{constructor(){super(...arguments),ME(this,AE),TE(this,"commandExecutor",new Gx(this.hot)),TE(this,"itemsFactory",null),TE(this,"menu",null)}static get PLUGIN_KEY(){return HE}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[sx,ax,Zk,tx,ex,Zk,rx,ix,Zk,hx,ox,Zk,nx,Zk,Jk]}isEnabled(){return!!this.hot.getSettings()[HE]}enablePlugin(){var t=this;if(this.enabled)return;const e=this.hot.getSettings()[HE];"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.menu=new EE(this.hot,{className:"htContextMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootPortalElement}),this.menu.addLocalHook("beforeOpen",()=>_E(AE,this,NE).call(this)),this.menu.addLocalHook("afterOpen",()=>_E(AE,this,DE).call(this)),this.menu.addLocalHook("afterClose",()=>_E(AE,this,LE).call(this)),this.menu.addLocalHook("executeCommand",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.executeCommand.call(t,...n)}),this.addHook("afterOnCellContextMenu",t=>_E(AE,this,OE).call(this,t)),this.addHook("beforeDialogShow",()=>this.close()),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeActive();this.hot.scrollToFocusedCell();const e=this.hot.getCell(t.row,t.col,!0).getBoundingClientRect(),n=Xk(this.menu.container,this.hot.rootDocument);this.open({left:e.left+n.left,top:e.top+n.top-1+e.height},{left:e.width,above:-e.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&!this.menu.isOpened()},group:IE})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(IE)}open(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(e=this.menu)&&void 0!==e&&e.isOpened()||(this.prepareMenuItems(),this.menu.open(),Tt(n,(t,e)=>{this.menu.setOffset(e,t)}),this.menu.setPosition(t))}close(){var t;null===(t=this.menu)||void 0===t||t.close(),this.itemsFactory=null}executeCommand(t){null===this.itemsFactory&&this.prepareMenuItems();for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];this.commandExecutor.execute(t,...n)}prepareMenuItems(){this.itemsFactory=new qx(this.hot,PE.DEFAULT_ITEMS);const t=this.hot.getSettings()[HE],e={items:this.itemsFactory.getItems(t)};this.hot.runHooks("afterContextMenuDefaultOptions",e),this.itemsFactory.setPredefinedItems(e.items);const n=this.itemsFactory.getItems(t);this.hot.runHooks("beforeContextMenuSetItems",n),this.menu.setMenuItems(n),x(n,t=>this.commandExecutor.registerCommand(t.key,t))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function OE(t){const e=this.hot.getSettings(),n=e.rowHeaders,o=e.colHeaders;const i=t.target;if(this.close(),de(i,"handsontableInput"))return;if(t.preventDefault(),t.stopPropagation(),!n&&!o&&!(function(t){return"TD"===t.nodeName||"TD"===t.parentNode.nodeName}(i)||de(i,"current")&&de(i,"wtBorder")))return;const r=Xk(this.menu.container,this.hot.rootDocument);this.open({top:t.clientY+r.top,left:t.clientX+r.left})}function NE(){this.hot.runHooks("beforeContextMenuShow",this)}function DE(){this.hot.runHooks("afterContextMenuShow",this)}function LE(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}PE.SEPARATOR={name:Zk};class VE{constructor(){this.data={}}setData(t,e){this.data[t]=e}getData(t){return this.data[t]||void 0}}class BE{constructor(){this.clipboardData=new VE}preventDefault(){}composedPath(){return[]}}function FE(t,e,n){WE(t,e),e.set(t,n)}function WE(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zE(t,e){return t.get($E(t,e))}function jE(t,e,n){return t.set($E(t,e),n),n}function $E(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var UE=new WeakMap,YE=new WeakMap,GE=new WeakMap,KE=new WeakMap,qE=new WeakMap,XE=new WeakMap,ZE=new WeakSet;class JE{constructor(t){let{countRows:e,countColumns:n,rowsLimit:o,columnsLimit:i,countColumnHeaders:r}=t;var s,a;WE(s=this,a=ZE),a.add(s),FE(this,UE,void 0),FE(this,YE,void 0),FE(this,GE,void 0),FE(this,KE,void 0),FE(this,qE,void 0),FE(this,XE,void 0),jE(YE,this,e),jE(GE,this,n),jE(KE,this,o),jE(qE,this,i),jE(XE,this,r)}setSelectedRange(t){jE(UE,this,t)}getCellsRange(){if(0===zE(YE,this).call(this)||0===zE(GE,this).call(this))return null;const{row:t,col:e}=zE(UE,this).getTopStartCorner(),{row:n,col:o}=zE(UE,this).getBottomEndCorner(),i=$E(ZE,this,tM).call(this,t,n),r=$E(ZE,this,QE).call(this,e,o);return{isRangeTrimmed:n!==i||o!==r,startRow:t,startCol:e,endRow:i,endCol:r}}getMostBottomColumnHeadersRange(){if(0===zE(GE,this).call(this)||0===zE(XE,this).call(this))return null;const{col:t}=zE(UE,this).getTopStartCorner(),{col:e}=zE(UE,this).getBottomEndCorner(),n=$E(ZE,this,QE).call(this,t,e);return{isRangeTrimmed:e!==n,startRow:-1,startCol:t,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===zE(GE,this).call(this)||0===zE(XE,this).call(this))return null;const{col:t}=zE(UE,this).getTopStartCorner(),{col:e}=zE(UE,this).getBottomEndCorner(),n=$E(ZE,this,QE).call(this,t,e);return{isRangeTrimmed:e!==n,startRow:-zE(XE,this).call(this),startCol:t,endRow:-1,endCol:n}}}function QE(t,e){return Math.min(e,Math.max(t+zE(qE,this).call(this)-1,t))}function tM(t,e){return Math.min(e,Math.max(t+zE(KE,this).call(this)-1,t))}function eM(t){const e=[],n=[];return x(t,t=>{ao(Math.min(t.startRow,t.endRow),Math.max(t.startRow,t.endRow),t=>{-1===e.indexOf(t)&&e.push(t)});ao(Math.min(t.startCol,t.endCol),Math.max(t.startCol,t.endCol),t=>{-1===n.indexOf(t)&&n.push(t)})}),{rows:e,columns:n}}function nM(t,e,n){oM(t,e),e.set(t,n)}function oM(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iM(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rM(t,e){return t.get(aM(t,e))}function sM(t,e,n){return t.set(aM(t,e),n),n}function aM(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("afterCopyLimit"),Mn.getSingleton().register("modifyCopyableRange"),Mn.getSingleton().register("beforeCut"),Mn.getSingleton().register("afterCut"),Mn.getSingleton().register("beforePaste"),Mn.getSingleton().register("afterPaste"),Mn.getSingleton().register("beforeCopy"),Mn.getSingleton().register("afterCopy");const lM="copyPaste",hM=["fragmentSelection"],cM="application/ht-source-data-json-html",dM=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),uM=new WeakSet;var gM=new WeakMap,fM=new WeakMap,pM=new WeakMap,mM=new WeakMap,bM=new WeakMap,wM=new WeakMap,vM=new WeakMap,yM=new WeakMap,CM=new WeakSet;class SM extends DC{constructor(){var t,e;super(...arguments),oM(t=this,e=CM),e.add(t),iM(this,"columnsLimit",1/0),iM(this,"rowsLimit",1/0),iM(this,"pasteMode","overwrite"),iM(this,"uiContainer",this.hot.rootDocument.body),nM(this,gM,!1),nM(this,fM,!1),nM(this,pM,!1),nM(this,mM,"cells-only"),nM(this,bM,!1),nM(this,wM,!1),nM(this,vM,new JE({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),nM(this,yM,!1),iM(this,"copyableRanges",[])}static get PLUGIN_KEY(){return lM}static get SETTING_KEYS(){return[lM,...hM]}static get PLUGIN_PRIORITY(){return 80}static get DEFAULT_SETTINGS(){return{pasteMode:"overwrite",rowsLimit:1/0,columnsLimit:1/0,copyColumnHeaders:!1,copyColumnGroupHeaders:!1,copyColumnHeadersOnly:!1}}isEnabled(){return!!this.hot.getSettings()[lM]}enablePlugin(){var t,e,n=this;this.enabled||(this.pasteMode=null!==(t=this.getSetting("pasteMode"))&&void 0!==t?t:this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),sM(gM,this,this.getSetting("copyColumnHeaders")),sM(fM,this,this.getSetting("copyColumnGroupHeaders")),sM(pM,this,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=null!==(e=this.getSetting("uiContainer"))&&void 0!==e?e:this.uiContainer,this.addHook("afterContextMenuDefaultOptions",t=>aM(CM,this,TM).call(this,t)),this.addHook("afterSelection",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return aM(CM,n,_M).call(n,...e)}),this.addHook("afterSelectionEnd",()=>aM(CM,this,HM).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",function(){return n.onCopy(...arguments)}),this.eventManager.addEventListener(this.hot.rootDocument,"cut",function(){return n.onCut(...arguments)}),this.eventManager.addEventListener(this.hot.rootDocument,"paste",function(){return n.onPaste(...arguments)}),Yt()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return aM(CM,n,IM).call(n,...e)}),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return aM(CM,n,AM).call(n,...e)}),this.addHook("afterSelection",()=>aM(CM,this,PM).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){sM(mM,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),sM(bM,this,!0),aM(CM,this,RM).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){sM(wM,this,!0),aM(CM,this,RM).call(this,"cut")}getRangedCopyableData(t){return Bd(this.getRangedData(t))}getRangedData(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[],{rows:o,columns:i}=eM(t);return x(o,t=>{const o=[];x(i,n=>{if(t<0)o.push(this.hot.getColHeader(n,t));else{let i=e?this.hot.getCopyableSourceData(t,n):this.hot.getCopyableData(t,n);e&&(Et(i)||Array.isArray(i))&&(i=JSON.stringify(i)),o.push(i)}}),n.push(o)}),n}paste(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;if(!t&&!e)return;const n=new BE;t&&n.clipboardData.setData("text/plain",t),e&&n.clipboardData.setData("text/html",e),this.onPaste(n)}setCopyableText(){const t=this.hot.getSelectedRangeActive();if(!t)return;if(t.isSingleHeader())return void(this.copyableRanges=[]);rM(vM,this).setSelectedRange(t);const e=new Map([["headers",null],["cells",null]]);"column-headers-only"===rM(mM,this)?e.set("headers",rM(vM,this).getMostBottomColumnHeadersRange()):("with-column-headers"===rM(mM,this)?e.set("headers",rM(vM,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===rM(mM,this)&&e.set("headers",rM(vM,this).getAllColumnHeadersRange()),e.set("cells",rM(vM,this).getCellsRange())),this.copyableRanges=Array.from(e.values()).filter(t=>null!==t).map(t=>{let{startRow:e,startCol:n,endRow:o,endCol:i}=t;return{startRow:e,startCol:n,endRow:o,endCol:i}}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const n=e.get("cells");if(null!==n&&n.isRangeTrimmed){const{startRow:t,startCol:e,endRow:o,endCol:i}=n;this.hot.runHooks("afterCopyLimit",o-t+1,i-e+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var t;return null===(t=this.hot.getActiveEditor())||void 0===t?void 0:t.isOpened()}populateValues(t){let{plainData:e,originalPlainData:n,sourceData:o}=t;if(!e.length)return[null,null,null,null];const i=this.hot.getSelectedRangeActive(),r=e.length,s=e[0].length,a=[],{row:l,col:h}=i.getTopStartCorner(),{row:c,col:d}=i.getBottomEndCorner();let u=l,g=h,f=l,p=h;for(;a.length<r||u<=c;){const{skipRowOnPaste:t,visualRow:i}=this.hot.getCellMeta(u,h);if(u=i+1,!0===t)continue;f=i,g=h;const l=[],c=a.length%r;for(;l.length<s||g<=d;){var m,b;const{skipColumnOnPaste:t,visualCol:r,parsePastedValue:a}=this.hot.getCellMeta(i,g),h=l.length%s;if(g=r+1,!0===t)continue;p=r;const d=null==o||null===(m=o[c])||void 0===m?void 0:m[h],u=null==n||null===(b=n[c])||void 0===b?void 0:b[h];let f=e[c][h];if(a&&o&&Y(d)&&f===u){f=JSON.parse(d)}l.push(f)}a.push(l)}return sM(yM,this,!0),this.hot.populateFromArray(l,h,a,void 0,void 0,"CopyPaste.paste",this.pasteMode),[l,h,f,p]}onCopy(t){const e=t.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!rM(bM,this)||this.isEditorOpened()||Xe(e)&&(o&&e!==n||!o&&e!==this.hot.rootDocument.body&&!oe(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),sM(bM,this,!1);const i=this.getRangedData(this.copyableRanges),r=this.getRangedData(this.copyableRanges,!0),s=aM(CM,this,kM).call(this,this.copyableRanges);!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,s)&&(aM(CM,this,MM).call(this,t,i,r),this.hot.runHooks("afterCopy",i,this.copyableRanges,s)),sM(mM,this,"cells-only")}onCut(t){const e=t.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!rM(wM,this)||this.isEditorOpened()||Xe(e)&&(o&&e!==n||!o&&e!==this.hot.rootDocument.body&&!oe(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),sM(wM,this,!1);const i=this.getRangedData(this.copyableRanges),r=this.getRangedData(this.copyableRanges,!0);!!this.hot.runHooks("beforeCut",i,this.copyableRanges)&&(aM(CM,this,MM).call(this,t,i,r),this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges))}onPaste(t){const e=t.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=null==e?void 0:e.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||Xe(e)&&(o&&e!==n||!o&&e!==this.hot.rootDocument.body&&!oe(e,this.hot.rootElement)))return;let i,r;if(t.preventDefault(),t&&void 0!==t.clipboardData){const e=t.clipboardData.getData(cM);if(e){r=ro(e,this.hot.rootDocument).data}const n=t.clipboardData.getData("text/html"),{sanitizer:o}=this.hot.getSettings();let s=n;if("function"==typeof o?s=o(n,"CopyPaste.paste"):(uM.has(this.hot)||(uM.add(this.hot),te("The HTML sanitization using DOMPurify library is deprecated and will be removed in the next major release. Use the `sanitizer` option instead.\n\nMigration guide: https://handsontable.com/docs/migration-from-16.2-to-17.0/\n`sanitizer` documentation: https://handsontable.com/docs/api/options/#sanitizer")),s=X(n,{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0})),s&&/(<table)|(<TABLE)/g.test(s)){i=ro(s,this.hot.rootDocument).data}else i=t.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof i&&(i=function(t){const e=[[""]];if(0===t.length)return e;let n,o=0,i=0;for(;t.length>0&&n!==t.length;)if(n=t.length,t.match(Vd))t=t.replace(Vd,""),o+=1,e[i][o]="";else if(t.match(Dd))t=t.replace(Dd,""),o=0,i+=1,e[i]=[""];else{let n="";if(t.startsWith('"')){let e=0,o=!0;for(;o;){const i=t.slice(0,1);'"'===i&&(e+=1),n+=i,(0===(t=t.slice(1)).length||t.match(/^[\t\r\n]/)&&e%2==0)&&(o=!1)}n=n.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,t=>new Array(Math.floor(t.length/2)).fill('"').join(""))}else{const e=t.match(Ld);n=e?e[0]:"",t=t.slice(n.length)}e[i][o]=n}return e}(i)),void 0===i||i&&0===i.length)return;const s=St(i);if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[a,l,h,c]=this.populateValues({plainData:i,sourceData:r,originalPlainData:s});null!==a&&null!==l&&this.hot.selectCell(a,l,Math.min(this.hot.countRows()-1,h),Math.min(this.hot.countCols()-1,c)),this.hot.runHooks("afterPaste",i,this.copyableRanges)}destroy(){super.destroy()}}function RM(t){if(Yt()){const e=this.hot.getSelectedRangeActive();if(e){const{row:n,col:o}=e.highlight,i=this.hot.getCell(n,o,!0);i&&function(t,e){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];Ke(t,n),e(),qe(t,n)}(i,()=>{this.hot.rootDocument.execCommand(t)})}}else this.hot.rootDocument.execCommand(t)}function kM(t){const{rows:e}=eM(t);let n=0;for(let t=0;t<e.length&&!(e[t]>=0);t++)n+=1;return{columnHeadersCount:n}}function xM(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeActive();if(t){const{row:e,col:n}=t.highlight,o=this.hot.getCell(e,n,!0);o&&Ke(o)}}}function EM(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeActive();if(t){const{row:e,col:n}=t.highlight,o=this.hot.getCell(e,n,!0);null!=o&&o.hasAttribute("contenteditable")&&qe(o)}}}function MM(t,e,n){const o=Bd(e);if(t&&t.clipboardData){const i=to(e),r=to(n);t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",[dM,i].join("")),t.clipboardData.setData(cM,[dM,r].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",o)}function TM(t){var e;t.items.push({name:"---------"},(e=this,{key:"copy",name(){return this.getTranslatedPhrase(Fl)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1})),rM(gM,this)&&t.items.push(function(t){return{key:"copy_with_column_headers",name(){const t=this.getSelectedRangeActive(),e=t?co(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Wl,e)},callback(){t.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),rM(fM,this)&&t.items.push(function(t){return{key:"copy_with_column_group_headers",name(){const t=this.getSelectedRangeActive(),e=t?co(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(zl,e)},callback(){t.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),rM(pM,this)&&t.items.push(function(t){return{key:"copy_column_headers_only",name(){const t=this.getSelectedRangeActive(),e=t?co(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(jl,e)},callback(){t.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this)),t.items.push(function(t){return{key:"cut",name(){return this.getTranslatedPhrase($l)},callback(){t.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader())return!0;const e=this.getSelected();return!e||e.length>1},hidden:!1}}(this))}function _M(t,e,n,o,i){rM(yM,this)&&(i.value=!0),sM(yM,this,!1)}function HM(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function IM(){aM(CM,this,EM).call(this)}function AM(){aM(CM,this,xM).call(this)}function PM(){aM(CM,this,EM).call(this)}function OM(t,e){return`border_row${t}col${e}`}function NM(t){var e,n;(I(t.start)||I(t.left))&&(t.start=null!==(e=t.start)&&void 0!==e?e:t.left);(I(t.end)||I(t.right))&&(t.end=null!==(n=t.end)&&void 0!==n?n:t.right);return delete t.left,delete t.right,t}function DM(t){return I(t.start)&&(t.left=t.start),I(t.end)&&(t.right=t.end),t}function LM(t,e){return{id:OM(t,e),border:{width:1,color:"#000",cornerVisible:!1},row:t,col:e,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}}function VM(t,e){let n=!1;return x(t.getSelectedRange(),o=>{o.forAll((o,i)=>{if(o<0||i<0)return;const r=t.getCellMeta(o,i).borders;if(r){if(!e)return n=!0,!1;if(!Pt(r[e],"hide")||!1===r[e].hide)return n=!0,!1}})}),n}function BM(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}const FM=new Map([["left","start"],["right","end"]]);function WM(t){return{key:"borders:bottom",name(){let t=this.getTranslatedPhrase(ch);return VM(this,"bottom")&&(t=BM(t)),t},callback(e,n){const o=VM(this,"bottom");t.prepareBorder(n,"bottom",o)}}}function zM(t){const e=t.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let t=this.getTranslatedPhrase(dh);return VM(this,e)&&(t=BM(t)),t},callback(n,o){const i=VM(this,e);t.prepareBorder(o,e,i)}}}function jM(t){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(uh)},callback(e,n){t.prepareBorder(n,"noBorders")},disabled(){return!VM(this)}}}function $M(t){const e=t.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let t=this.getTranslatedPhrase(hh);return VM(this,e)&&(t=BM(t)),t},callback(n,o){const i=VM(this,e);t.prepareBorder(o,e,i)}}}function UM(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function YM(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function GM(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const KM="customBorders",qM=["dashed","dotted","solid"];var XM=new WeakSet;class ZM extends DC{constructor(){super(...arguments),UM(this,XM),YM(this,"savedBorders",[])}static get PLUGIN_KEY(){return KM}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[KM]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>GM(XM,this,QM).call(this,t)),this.addHook("init",()=>GM(XM,this,tT).call(this)),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(t,e){let n=["top","bottom","start","end"],o=null;e&&(this.checkSettingsCohesion([e]),n=Object.keys(e),o=NM(e));const i=Sd(Cd(t),{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});x(t,t=>{i(t).forAll((t,e)=>{x(n,n=>{var i,r;this.prepareBorderFromCustomAdded(t,e,o,(i=n,null!==(r=FM.get(i))&&void 0!==r?r:i))})})}),this.hot.view.render()}getBorders(t){if(!Array.isArray(t))return this.savedBorders;const e=Sd(Cd(t),{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),n=[];return x(t,t=>{e(t).forAll((t,e)=>{x(this.savedBorders,o=>{o.row===t&&o.col===e&&n.push(DM(o))})})}),n}clearBorders(t){t?this.setBorders(t):(x(this.savedBorders,t=>{this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange(),this.hot.removeCellMeta(t.row,t.col,"borders")}),this.savedBorders.length=0)}insertBorderIntoSettings(t,e){this.checkSavedBorders(t)||this.savedBorders.push(t);const n=this.hot._createCellRange(this.hot._createCellCoords(t.row,t.col));this.checkCustomSelections(t,n,e)||this.hot.selection.highlight.addCustomSelection({border:t,visualCellRange:n})}prepareBorderFromCustomAdded(t,e,n,o){const i=this.hot.countRows(),r=this.hot.countCols();if(t>=i||e>=r)return;let s=LM(t,e);var a,l;n&&(a=s,Pt(l=n,"border")&&l.border&&(a.border=l.border),Pt(l,"top")&&I(l.top)&&(l.top?(Et(l.top)||(l.top={width:1,color:"#000"}),a.top=l.top):(l.top={hide:!0},a.top=l.top)),Pt(l,"bottom")&&I(l.bottom)&&(l.bottom?(Et(l.bottom)||(l.bottom={width:1,color:"#000"}),a.bottom=l.bottom):(l.bottom={hide:!0},a.bottom=l.bottom)),Pt(l,"start")&&I(l.start)&&(l.start?(Et(l.start)||(l.start={width:1,color:"#000"}),a.start=l.start):(l.start={hide:!0},a.start=l.start)),Pt(l,"end")&&I(l.end)&&(l.end?(Et(l.end)||(l.end={width:1,color:"#000"}),a.end=l.end):(l.end={hide:!0},a.end=l.end)),s=a,x(this.hot.selection.highlight.customSelections,t=>{if(s.id===t.settings.id)return Object.assign(t.settings,n),s.id=t.settings.id,s.top=t.settings.top,s.bottom=t.settings.bottom,s.start=t.settings.start,s.end=t.settings.end,!1})),this.hot.setCellMeta(t,e,"borders",DM(s)),this.insertBorderIntoSettings(s,o)}prepareBorderFromCustomAddedRange(t,e){const n=Math.min(t.to.row,this.hot.countRows()-1),o=Math.min(t.to.col,this.hot.countCols()-1);ao(t.from.row,n,n=>{ao(t.from.col,o,o=>{const i=LM(n,o);let r=0;n===t.from.row&&Pt(e,"top")&&(r+=1,i.top=e.top),n===t.to.row&&Pt(e,"bottom")&&(r+=1,i.bottom=e.bottom),o===t.from.col&&Pt(e,"start")&&(r+=1,i.start=e.start),o===t.to.col&&Pt(e,"end")&&(r+=1,i.end=e.end),r>0&&(this.hot.setCellMeta(n,o,"borders",DM(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(t,e){const n=OM(t,e);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(t,e,"borders")}setBorder(t,e,n,o){let i=this.hot.getCellMeta(t,e).borders;if(i=i&&void 0!==i.border?NM(i):LM(t,e),o){i[n]={hide:!0};if(4===this.countHide(i))this.removeAllBorders(t,e);else{this.checkCustomSelectionsFromContextMenu(i,n,o)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(t,e,"borders",DM(i))}}else{i[n]={width:1,color:"#000"};this.checkCustomSelectionsFromContextMenu(i,n,o)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(t,e,"borders",DM(i))}}prepareBorder(t,e,n){x(t,t=>{let{start:o,end:i}=t;if(o.row===i.row&&o.col===i.col)"noBorders"===e?this.removeAllBorders(o.row,o.col):this.setBorder(o.row,o.col,e,n);else switch(e){case"noBorders":ao(o.col,i.col,t=>{ao(o.row,i.row,e=>{this.removeAllBorders(e,t)})});break;case"top":ao(o.col,i.col,t=>{this.setBorder(o.row,t,e,n)});break;case"bottom":ao(o.col,i.col,t=>{this.setBorder(i.row,t,e,n)});break;case"start":ao(o.row,i.row,t=>{this.setBorder(t,o.col,e,n)});break;case"end":ao(o.row,i.row,t=>{this.setBorder(t,i.col,e,n)})}})}createCustomBorders(t){x(t,t=>{const e=NM(t);t.range?this.prepareBorderFromCustomAddedRange(t.range,e):this.prepareBorderFromCustomAdded(t.row,t.col,e)})}countHide(t){const{top:e,bottom:n,start:o,end:i}=t;return S([e,n,o,i],(t,e)=>{let n=t;return e&&e.hide&&(n+=1),n},0)}clearBordersFromSelectionSettings(t){const e=k(this.hot.selection.highlight.customSelections,t=>t.settings.id).indexOf(t);e>-1&&this.hot.selection.highlight.customSelections[e].clear()}clearNullCellRange(){x(this.hot.selection.highlight.customSelections,(t,e)=>{if(null===t.cellRange)return this.hot.selection.highlight.customSelections[e].destroy(),this.hot.selection.highlight.customSelections.splice(e,1),!1})}hideBorders(){x(this.savedBorders,t=>{this.clearBordersFromSelectionSettings(t.id),this.clearNullCellRange()})}spliceBorder(t){const e=k(this.savedBorders,t=>t.id).indexOf(t);e>-1&&this.savedBorders.splice(e,1)}checkSavedBorders(t){let e=!1;return 4===this.countHide(t)?(this.spliceBorder(t.id),e=!0):x(this.savedBorders,(n,o)=>{if(t.id===n.id)return this.savedBorders[o]=t,e=!0,!1}),e}checkCustomSelectionsFromContextMenu(t,e,n){let o=!1;return x(this.hot.selection.highlight.customSelections,i=>{if(t.id===i.settings.id){return x(this.hot.view._wt.selectionManager.getBorderInstances(i),t=>{t.toggleHiddenClass(e,n)}),o=!0,!1}}),o}checkCustomSelections(t,e,n){const o=this.countHide(t);let i=!1;return 4===o?(this.removeAllBorders(t.row,t.col),i=!0):x(this.hot.selection.highlight.customSelections,o=>{if(t.id===o.settings.id){if(o.visualCellRange=e,o.commit(),n){x(this.hot.view._wt.selectionManager.getBorderInstances(o),e=>{e.changeBorderStyle(n,t)})}return i=!0,!1}}),i}changeBorderSettings(){const t=this.hot.getSettings()[KM];if(Array.isArray(t)){const e=St(t);this.checkSettingsCohesion(e),e.length||(this.savedBorders=e),this.createCustomBorders(e)}else void 0!==t&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(t){const e=t.some(t=>I(t.left)||I(t.right));const n=function(t){return t.some(t=>I(t.start)||I(t.end))}(t);e&&n&&wt('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".'),this.hot.isRtl()&&e&&wt('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".'),GM(XM,this,JM).call(this,t)}destroy(){super.destroy()}}function JM(t){t.forEach(t=>{Object.keys(t).forEach(e=>{const n=t[e].style;I(n)&&!qM.includes(n)?(Qt(`The "${n}" border style is not supported. Please use one of the following styles: ${qM.join(", ")}.\nThe border style will be ignored.`),delete t[e].style):I(n)&&"solid"===n&&delete t[e].style})})}function QM(t){var e;this.hot.getSettings()[KM]&&t.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(ah)},disabled(){const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(e=this,{key:"borders:top",name(){let t=this.getTranslatedPhrase(lh);return VM(this,"top")&&(t=BM(t)),t},callback(t,n){const o=VM(this,"top");e.prepareBorder(n,"top",o)}}),$M(this),WM(this),zM(this),jM(this)]}})}function tT(){this.changeBorderSettings()}function eT(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function nT(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function oT(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const iT="dragToScroll";var rT=new WeakSet;class sT extends DC{constructor(){super(...arguments),eT(this,rT),nT(this,"boundaries",null),nT(this,"callback",null),nT(this,"listening",!1)}static get PLUGIN_KEY(){return iT}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[iT]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",t=>oT(rT,this,aT).call(this,t)),this.addHook("afterOnCellCornerMouseDown",t=>oT(rT,this,aT).call(this,t)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=t}setCallback(t){this.callback=t}check(t,e){let n=0,o=0;e<this.boundaries.top?o=e-this.boundaries.top:e>this.boundaries.bottom&&(o=e-this.boundaries.bottom),t<this.boundaries.left?n=t-this.boundaries.left:t>this.boundaries.right&&(n=t-this.boundaries.right),this.callback(n,o)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:t}=this.hot;let e=t;for(;e;)this.eventManager.addEventListener(e.document,"contextmenu",()=>this.unlisten()),this.eventManager.addEventListener(e.document,"mouseup",()=>this.unlisten()),this.eventManager.addEventListener(e.document,"mousemove",t=>this.onMouseMove(t)),e=ie(e)}unregisterEvents(){this.eventManager.clear()}onMouseMove(t){this.isListening()&&this.check(t.clientX,t.clientY)}destroy(){super.destroy()}}function aT(t){if(hn(t))return;const e=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(e!==this.hot.rootWindow?e.getBoundingClientRect():void 0),this.setCallback((t,n)=>{var o,i;const r=null!==(o=e.scrollLeft)&&void 0!==o?o:e.scrollX,s=null!==(i=e.scrollTop)&&void 0!==i?i:e.scrollY;e.scroll(r+50*Math.sign(t),s+20*Math.sign(n))}),this.listen()}function lT(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hT(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cT(t,e,n){return t.set(dT(t,e),n),n}function dT(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("afterDropdownMenuDefaultOptions"),Mn.getSingleton().register("beforeDropdownMenuShow"),Mn.getSingleton().register("afterDropdownMenuShow"),Mn.getSingleton().register("afterDropdownMenuHide"),Mn.getSingleton().register("afterDropdownMenuExecute");const uT="dropdownMenu",gT="changeType",fT=uT;var pT=new WeakMap,mT=new WeakSet;class bT extends DC{static get PLUGIN_KEY(){return uT}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[tx,ex,Zk,ix,Zk,Qk,Zk,nx,Zk,Jk]}constructor(t){var e,n;super(t),lT(e=this,n=mT),n.add(e),hT(this,"commandExecutor",new Gx(this.hot)),hT(this,"itemsFactory",null),hT(this,"menu",null),function(t,e,n){lT(t,e),e.set(t,n)}(this,pT,!1),this.hot.addHook("afterGetColHeader",(t,e)=>dT(mT,this,yT).call(this,t,e))}isEnabled(){return this.hot.getSettings()[uT]}enablePlugin(){var t=this;if(this.enabled)return;this.itemsFactory=new qx(this.hot,bT.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return dT(mT,t,ET).call(t,...n)}),this.addHook("beforeViewportScrollHorizontally",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return dT(mT,t,xT).call(t,...n)}),this.addHook("beforeDialogShow",()=>this.close());const e=this.hot.getSettings()[uT],n={items:this.itemsFactory.getItems(e)};this.registerEvents(),"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);const o=this.itemsFactory.getItems(e);this.menu&&this.menu.destroy(),this.menu=new EE(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:e.uiContainer||this.hot.rootPortalElement}),this.hot.runHooks("beforeDropdownMenuSetItems",o),this.menu.setMenuItems(o),this.menu.addLocalHook("beforeOpen",()=>dT(mT,this,CT).call(this)),this.menu.addLocalHook("afterOpen",()=>dT(mT,this,ST).call(this)),this.menu.addLocalHook("afterSubmenuOpen",t=>dT(mT,this,RT).call(this,t)),this.menu.addLocalHook("afterClose",()=>dT(mT,this,kT).call(this)),this.menu.addLocalHook("executeCommand",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return t.executeCommand.call(t,...n)}),x(o,t=>this.commandExecutor.registerCommand(t.key,t))})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=()=>{const{highlight:t}=this.hot.getSelectedRangeActive();if((t.isHeader()&&-1===t.row||t.isCell())&&t.col>=0){this.hot.selectColumns(t.col,t.col,-1);const{from:e}=this.hot.getSelectedRangeActive(),n=Xk(this.menu.container,this.hot.rootDocument),o=this.hot.getCell(-1,e.col,!0).querySelector(`.${gT}`),i=o.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+o.offsetHeight+n.top},{left:i.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&e.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:fT},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{var t;const e=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return e&&this.hot.selection.isCellVisible(e)&&e.isCell()&&!this.menu.isOpened()},group:fT}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(fT)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",t=>dT(mT,this,vT).call(this,t))}open(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(e=this.menu)&&void 0!==e&&e.isOpened()||(this.menu.open(),Tt(n,(t,e)=>{this.menu.setOffset(e,t)}),this.menu.setPosition(t))}close(){var t;null===(t=this.menu)||void 0===t||t.close()}executeCommand(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];this.commandExecutor.execute(t,...n)}setListening(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(t?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function wT(t){t.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function vT(t){if(de(t.target,gT)){const e=Xk(this.menu.container,this.hot.rootDocument),n=t.target.getBoundingClientRect();t.stopPropagation(),cT(pT,this,!1),this.open({left:n.left+e.left,top:n.top+t.target.offsetHeight+e.top},{left:n.width,right:0,above:0,below:3})}}function yT(t,e){const n=e.parentNode;if(!n)return;const o=n.parentNode.childNodes,i=Array.prototype.indexOf.call(o,n);if(t<0||i!==o.length-1)return;const r=e.querySelector(`.${gT}`);if(this.enabled&&r)return;if(!this.enabled)return void(r&&r.parentNode.removeChild(r));const s=this.hot.rootDocument.createElement("button");s.className=gT,s.type="button",s.tabIndex=-1,this.hot.getSettings().ariaTags&&(fe(s,[["aria-hidden","true"],st(" ")]),fe(e,[ht("menu")])),s.onclick=function(){return!1},e.firstChild.insertBefore(s,e.firstChild.firstChild)}function CT(){this.hot.runHooks("beforeDropdownMenuShow",this)}function ST(){this.hot.runHooks("afterDropdownMenuShow",this),dT(mT,this,wT).call(this,this.menu)}function RT(t){dT(mT,this,wT).call(this,t)}function kT(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function xT(t){return n=this,(e=pT).get(dT(e,n))?null:t;var e,n}function ET(t){de(t.target,gT)&&cT(pT,this,!0)}function MT(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}bT.SEPARATOR={name:Zk};class TT{constructor(t){MT(this,"hot",void 0),MT(this,"options",{}),this.hot=t}setOptions(t){this.options=t}getData(){const{startRow:t,startCol:e,endRow:n,endCol:o}=this._getDataRange(),i=this.options,r=[];return ao(t,n,t=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(t)||(ao(e,o,e=>{!i.exportHiddenColumns&&this._isHiddenColumn(e)||n.push(this.hot.getDataAtCell(t,e))}),r.push(n))}),r}getRowHeaders(){const t=[];if(this.options.rowHeaders){const{startRow:e,endRow:n}=this._getDataRange(),o=this.hot.getRowHeader();ao(e,n,e=>{!this.options.exportHiddenRows&&this._isHiddenRow(e)||t.push(o[e])})}return t}getColumnHeaders(){const t=[];if(this.options.columnHeaders){const{startCol:e,endCol:n}=this._getDataRange(),o=this.hot.getColHeader();ao(e,n,e=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(e)||t.push(o[e])})}return t}_getDataRange(){const t=this.hot.countCols()-1,e=this.hot.countRows()-1;let[n=0,o=0,i=e,r=t]=this.options.range;return n=Math.max(n,0),o=Math.max(o,0),i=Math.min(i,e),r=Math.min(r,t),{startRow:n,startCol:o,endRow:i,endCol:r}}_isHiddenRow(t){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(t))}_isHiddenColumn(t){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(t))}}function _T(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class HT{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(t,e){_T(this,"dataProvider",void 0),_T(this,"options",void 0),this.dataProvider=t,this.options=this._mergeOptions(e),this.dataProvider.setOptions(this.options)}_mergeOptions(t){let e=Rt(this.constructor.DEFAULT_OPTIONS);const n=new Date;return e=yt(Rt(HT.DEFAULT_OPTIONS),e),e=yt(e,t),e.filename=K(e.filename,{YYYY:n.getFullYear(),MM:`${n.getMonth()+1}`.padStart(2,"0"),DD:`${n.getDate()}`.padStart(2,"0")}),e}}function IT(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function AT(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const PT=String.fromCharCode(13),OT=String.fromCharCode(34),NT=String.fromCharCode(10),DT=String.fromCharCode(61),LT=String.fromCharCode(43),VT=String.fromCharCode(45),BT=String.fromCharCode(64),FT=String.fromCharCode(9);var WT=new WeakSet;function zT(t){return t.startsWith(DT)||t.startsWith(LT)||t.startsWith(VT)||t.startsWith(BT)||t.startsWith(FT)||t.startsWith(PT)?`'${t}`:t}function jT(t,e){return e.test(t)?`'${t}`:t}const $T="csv",UT={[$T]:class extends HT{constructor(){super(...arguments),IT(this,WT)}static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",sanitizeValues:!1}}export(){const t=this.options,e=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const o=n.length>0,i=this.dataProvider.getRowHeaders(),r=i.length>0;let s=t.bom?String.fromCharCode(65279):"";return o&&(n=k(n,e=>this._escapeCell(e,{force:!0,sanitizeValue:t.sanitizeValues})),r&&(s+=t.columnDelimiter),s+=n.join(t.columnDelimiter),s+=t.rowDelimiter),x(e,(e,n)=>{n>0&&(s+=t.rowDelimiter),r&&(s+=this._escapeCell(i[n],{sanitizeValue:t.sanitizeValues}),s+=t.columnDelimiter);const o=e.map(e=>this._escapeCell(e,{sanitizeValue:t.sanitizeValues})).join(t.columnDelimiter);s+=o}),s}_escapeCell(t){let{force:e=!1,sanitizeValue:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=H(t);return""===o||(n&&(e=!0),n instanceof RegExp?o=AT(WT,this,jT).call(this,o,n):"function"==typeof n?o=n(o):n&&(o=AT(WT,this,zT).call(this,o)),(e||o.indexOf(PT)>=0||o.indexOf(OT)>=0||o.indexOf(NT)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`)),o}}};class YT extends DC{static get PLUGIN_KEY(){return"exportFile"}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(t,e).export()}exportAsBlob(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(t,e))}downloadFile(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:n,rootWindow:o}=this.hot,i=this._createTypeFormatter(t,e),r=this._createBlob(i),s=o.URL||o.webkitURL,a=n.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const t=s.createObjectURL(r);a.style.display="none",a.setAttribute("href",t),a.setAttribute("download",l),n.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),n.body.removeChild(a),setTimeout(()=>{s.revokeObjectURL(t)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,l)}_createTypeFormatter(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return UT[t]||wt(`Export format type "${t}" is not supported.`),function(t,e,n){return"function"==typeof UT[t]?new UT[t](e,n):null}(t,new TT(this.hot),e)}_createBlob(t){let e=null;return"undefined"!=typeof Blob&&(e=new Blob([t.export()],{type:`${t.options.mimeType};charset=${t.options.encoding}`})),e}}function GT(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class KT{constructor(t,e){let{id:n,stateless:o=!0}=e;GT(this,"hot",void 0),GT(this,"id",void 0),GT(this,"elements",[]),GT(this,"hidden",!1),GT(this,"stateId",""),GT(this,"state",void 0),this.hot=t,this.id=n,this.stateId=`Filters.component.${this.id}`,this.state=o?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Ga)}getElements(){return this.elements}reset(){x(this.elements,t=>t.reset())}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(t){this.state&&this.setState(this.state.getValueAtIndex(t))}setState(){wt("The state setting logic is not implemented")}saveState(t){this.state&&this.state.setValueAtIndex(t,this.getState())}getState(){wt("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),x(this.elements,t=>t.destroy()),this.state=null,this.elements=null,this.hot=null}}kt(KT,os);const qT={};function XT(t,e){qT[t]||wt(`Filter condition "${t}" does not exist.`);const{condition:n,descriptor:o}=qT[t];let i=e;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(t){return n.apply(t.meta.instance,[].concat([t],[i]))}}function ZT(t){return qT[t]||wt(`Filter condition "${t}" does not exist.`),qT[t].descriptor}function JT(t,e,n){n.key=t,qT[t]={condition:e,descriptor:n}}const QT="none";JT(QT,function(){return!0},{name:Ch,inputsCount:0,showOperators:!1});const t_="empty";JT(t_,function(t){return P(t.value)},{name:Sh,inputsCount:0,showOperators:!0});const e_="not_empty";JT(e_,function(t,e){return!XT(t_,e)(t)},{name:Rh,inputsCount:0,showOperators:!0});const n_="eq";JT(n_,function(t,e){let[n]=e;return H(t.value).toLocaleLowerCase(t.meta.locale)===H(n)},{name:kh,inputsCount:1,showOperators:!0});const o_="neq";JT(o_,function(t,e){return!XT(n_,e)(t)},{name:xh,inputsCount:1,showOperators:!0});JT("gt",function(t,e){let[n]=e,o=n;return"numeric"===t.meta.type&&(o=parseFloat(o,10)),t.value>o},{name:Ih,inputsCount:1,showOperators:!0});JT("gte",function(t,e){let[n]=e,o=n;return"numeric"===t.meta.type&&(o=parseFloat(o,10)),t.value>=o},{name:Ah,inputsCount:1,showOperators:!0});JT("lt",function(t,e){let[n]=e,o=n;return"numeric"===t.meta.type&&(o=parseFloat(o,10)),t.value<o},{name:Ph,inputsCount:1,showOperators:!0});JT("lte",function(t,e){let[n]=e,o=n;return"numeric"===t.meta.type&&(o=parseFloat(o,10)),t.value<=o},{name:Oh,inputsCount:1,showOperators:!0});const i_="date_after";JT(i_,function(t,e){let[n]=e;const o=tb(t.value,t.meta.dateFormat),i=tb(n,t.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)>=0},{name:Lh,inputsCount:1,showOperators:!0});const r_="date_before";JT(r_,function(t,e){let[n]=e;const o=tb(t.value,t.meta.dateFormat),i=tb(n,t.meta.dateFormat);return!(!o.isValid()||!i.isValid())&&o.diff(i)<=0},{name:Vh,inputsCount:1,showOperators:!0});const s_="between";JT(s_,function(t,e){let[n,o]=e,i=n,r=o;if("numeric"===t.meta.type){const t=parseFloat(i,10),e=parseFloat(r,10);i=Math.min(t,e),r=Math.max(t,e)}else if("date"===t.meta.type){const e=XT(r_,[r]),n=XT(i_,[i]);return e(t)&&n(t)}return t.value>=i&&t.value<=r},{name:Nh,inputsCount:2,showOperators:!0});const a_="not_between";JT(a_,function(t,e){return!XT(s_,e)(t)},{name:Dh,inputsCount:2,showOperators:!0});const l_="begins_with";JT(l_,function(t,e){let[n]=e;return H(t.value).toLocaleLowerCase(t.meta.locale).startsWith(H(n))},{name:Eh,inputsCount:1,showOperators:!0});const h_="ends_with";JT(h_,function(t,e){let[n]=e;return H(t.value).toLocaleLowerCase(t.meta.locale).endsWith(H(n))},{name:Mh,inputsCount:1,showOperators:!0});const c_="contains";JT(c_,function(t,e){let[n]=e;return H(t.value).toLocaleLowerCase(t.meta.locale).indexOf(H(n))>=0},{name:Th,inputsCount:1,showOperators:!0});const d_="not_contains";JT(d_,function(t,e){return!XT(c_,e)(t)},{name:_h,inputsCount:1,showOperators:!0});const u_="date_tomorrow";JT(u_,function(t){const e=tb(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(tb().subtract(-1,"days").startOf("day"),"d")},{name:Fh,inputsCount:0});const g_="date_today";JT(g_,function(t){const e=tb(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(tb().startOf("day"),"d")},{name:Bh,inputsCount:0});const f_="date_yesterday";JT(f_,function(t){const e=tb(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame(tb().subtract(1,"days").startOf("day"),"d")},{name:Wh,inputsCount:0});const p_="intl_date_before";JT(p_,function(t,e){let[n]=e;const o=Vb(t.value),i=Vb(n);return null!==o&&null!==i&&o<=i},{name:Vh,inputsCount:1,showOperators:!0,inputType:"date"});const m_="intl_date_after";JT(m_,function(t,e){let[n]=e;const o=Vb(t.value),i=Vb(n);return null!==o&&null!==i&&o>=i},{name:Lh,inputsCount:1,showOperators:!0,inputType:"date"});const b_="intl_date_between";JT(b_,function(t,e){let[n,o]=e;const i=XT(p_,[o]),r=XT(m_,[n]);return i(t)&&r(t)},{name:Nh,inputsCount:2,showOperators:!0,inputType:"date"});const w_="intl_date_tomorrow";JT(w_,function(t){const e=Vb(t.value);if(null===e)return!1;const n=new Date;return n.setDate(n.getDate()+1),e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()},{name:Fh,inputsCount:0,inputType:"date"});const v_="intl_date_today";JT(v_,function(t){const e=Vb(t.value);if(null===e)return!1;const n=new Date;return e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()},{name:Bh,inputsCount:0,inputType:"date"});const y_="intl_date_yesterday";JT(y_,function(t){const e=Vb(t.value);if(null===e)return!1;const n=new Date;return n.setDate(n.getDate()-1),e.getFullYear()===n.getFullYear()&&e.getMonth()===n.getMonth()&&e.getDate()===n.getDate()},{name:Wh,inputsCount:0,inputType:"date"});const C_="intl_time_before";JT(C_,function(t,e){let[n]=e;const o=Wb(t.value),i=Wb(n);return null!==o&&null!==i&&o<=i},{name:Vh,inputsCount:1,showOperators:!0,inputType:"time"});const S_="intl_time_after";JT(S_,function(t,e){let[n]=e;const o=Wb(t.value),i=Wb(n);return null!==o&&null!==i&&o>=i},{name:Lh,inputsCount:1,showOperators:!0,inputType:"time"});const R_="intl_time_between";function k_(t,e){let n=t;return""===n&&(n=`(${e})`),n}function x_(t){const e=new Set(t);return function(t){return e.has(t)}}function E_(t){return null==t?"":t}function M_(t){return Array.from(new Set(t)).map(t=>E_(t)).sort((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:t===e?0:t>e?1:-1)}function T_(t,e,n,o){const i=[],r=t===e;let s;return r||(s=x_(e)),t.forEach(t=>{let e=!1;(r||s(t))&&(e=!0);const a={checked:e,value:t,visualValue:k_(t,n)};o&&o(a),i.push(a)}),i}JT(R_,function(t,e){let[n,o]=e;const i=XT(C_,[o]),r=XT(S_,[n]);return i(t)&&r(t)},{name:Nh,inputsCount:2,showOperators:!0,inputType:"time"}),function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ft||(Ft="object"==typeof Intl?new Intl.Collator(t,e).compare:"function"==typeof String.prototype.localeCompare?(t,e)=>`${t}`.localeCompare(e):(t,e)=>t===e?0:t>e?-1:1)}();const __="by_value";JT(__,function(t,e){let[n]=e;return n(t.value)},{name:"By value",inputsCount:0,inputValuesDecorator(t){let[e]=t;return[x_(e)]},showOperators:!1});const H_={};function I_(t,e,n){H_[t]={name:e,func:n}}const A_="conjunction";I_(A_,$h,function(t,e){return t.every(t=>t.func(e))});const P_="disjunction";I_(P_,Uh,function(t,e){return t.some(t=>t.func(e))});const O_="disjunctionWithExtraCondition";I_(O_,Uh,function(t,e){return t.length<3&&wt("Operation doesn't work on less then three conditions."),t.slice(0,t.length-1).some(t=>t.func(e))&&t[t.length-1].func(e)});const N_="numeric",D_="text",L_="date",V_="intl-date",B_="intl-time",F_={[N_]:[QT,Zk,t_,e_,Zk,n_,o_,Zk,"gt","gte","lt","lte",s_,a_],[D_]:[QT,Zk,t_,e_,Zk,n_,o_,Zk,l_,h_,Zk,c_,d_],[L_]:[QT,Zk,t_,e_,Zk,n_,o_,Zk,r_,i_,s_,Zk,u_,g_,f_],[V_]:[QT,Zk,t_,e_,Zk,n_,o_,Zk,p_,m_,b_,Zk,w_,v_,y_],[B_]:[QT,Zk,t_,e_,Zk,n_,o_,Zk,Zk,l_,h_,Zk,c_,d_,Zk,C_,S_,R_]};function W_(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const z_="built",j_="building",$_=["click","input","keydown","keypress","keyup","focus","blur","change"];let U_=class t{static get DEFAULTS(){return Rt({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,n){W_(this,"hot",void 0),W_(this,"eventManager",new zn(this)),W_(this,"options",void 0),W_(this,"_element",void 0),W_(this,"buildState",void 0),this.hot=e,this.options=yt(t.DEFAULTS,n),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(t){this.options.value=t,this.update()}getValue(){return this.options.value}get element(){return this.buildState===j_?this._element:this.buildState===z_?(this.update(),this._element):(this.buildState=j_,this.build(),this.buildState=z_,this._element)}isBuilt(){return this.buildState===z_}translateIfPossible(t){return"string"==typeof t&&t.startsWith(vh)?this.hot.getTranslatedPhrase(t):t}build(){const t=(t,e)=>{this.eventManager.addEventListener(t,e,t=>this.runLocalHooks(e,t,this))};if(this.buildState||(this.buildState=j_),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&ue(this._element,this.options.className),this.options.children.length)x(this.options.children,t=>this._element.appendChild(t.element));else if(this.options.wrapIt){const e=this.hot.rootDocument.createElement(this.options.tagName);e.setAttribute("data-hot-input",!0),Tt(this.options,(t,n)=>{void 0!==e[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(e[n]=this.translateIfPossible(t))}),this._element.appendChild(e),x($_,n=>t(e,n))}else x($_,e=>t(this._element,e))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}};function Y_(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function G_(t,e){return t.get(K_(t,e))}function K_(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}kt(U_,os);var q_=new WeakMap,X_=new WeakSet;class Z_ extends U_{static get DEFAULTS(){return Rt({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(t,e){var n,o;super(t,yt(Z_.DEFAULTS,e)),Y_(n=this,o=X_),o.add(n),function(t,e,n){Y_(t,e),e.set(t,n)}(this,q_,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",t=>K_(X_,this,J_).call(this,t)),this.addLocalHook("input",t=>K_(X_,this,J_).call(this,t))}build(){super.build();const t=this.hot.rootDocument.createElement("div");var e,n,o;e=q_,n=this,o=this._element.firstChild,e.set(K_(e,n),o),ue(this._element,"htUIInput"),ue(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(G_(q_,this).type=this.options.type,G_(q_,this).placeholder=this.translateIfPossible(this.options.placeholder),G_(q_,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&G_(q_,this).focus()}}function J_(t){this.options.value=t.target.value}function Q_(t,e,n){tH(t,e),e.set(t,n)}function tH(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function eH(t,e,n){return t.set(oH(t,e),n),n}function nH(t,e){return t.get(oH(t,e))}function oH(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var iH=new WeakMap,rH=new WeakMap,sH=new WeakMap,aH=new WeakMap,lH=new WeakMap,hH=new WeakSet;class cH extends U_{static get DEFAULTS(){return Rt({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(t,e){var n,o;super(t,yt(cH.DEFAULTS,e)),tH(n=this,o=hH),o.add(n),Q_(this,iH,null),Q_(this,rH,[]),Q_(this,sH,void 0),Q_(this,aH,void 0),Q_(this,lH,void 0),this.registerHooks()}getMenu(){return nH(iH,this)}registerHooks(){this.addLocalHook("click",()=>oH(hH,this,gH).call(this))}setItems(t){eH(rH,this,this.translateNames(t)),nH(iH,this)&&nH(iH,this).setMenuItems(nH(rH,this))}translateNames(t){return x(t,t=>{t.name=this.translateIfPossible(t.name)}),t}build(){super.build(),eH(iH,this,new EE(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),nH(iH,this).setMenuItems(nH(rH,this));const t=new U_(this.hot,{className:"htUISelectCaption"}),e=new U_(this.hot,{className:"htUISelectDropdown"});eH(sH,this,t),eH(aH,this,t.element),eH(lH,this,e),this.hot.getSettings().ariaTags&&(fe(e.element,[["aria-hidden","true"]]),fe(this._element,[["role","listbox"]])),x([t,e],t=>this._element.appendChild(t.element)),nH(iH,this).addLocalHook("select",t=>oH(hH,this,dH).call(this,t)),nH(iH,this).addLocalHook("afterClose",()=>oH(hH,this,uH).call(this)),this.update()}update(){if(!this.isBuilt())return;let t;t=this.options.value?this.options.value.name:nH(iH,this).hot.getTranslatedPhrase(Ch),nH(aH,this).textContent=t,super.update()}openOptions(){const t=this.element.getBoundingClientRect();nH(iH,this)&&(nH(iH,this).open(),nH(iH,this).setPosition({left:this.hot.isLtr()?t.left-5:t.left-31,top:t.top-1,width:t.width,height:t.height}),nH(iH,this).getNavigator().toFirstItem(),nH(iH,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{this.closeOptions(),this.runLocalHooks("tabKeydown",t)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){nH(iH,this)&&nH(iH,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){nH(iH,this)&&(nH(iH,this).destroy(),eH(iH,this,null)),nH(sH,this)&&nH(sH,this).destroy(),nH(lH,this)&&nH(lH,this).destroy(),super.destroy()}}function dH(t){t.name!==Zk&&(this.options.value=t,this.update(),this.runLocalHooks("select",this.options.value))}function uH(){this.runLocalHooks("afterClose")}function gH(){this.openOptions()}function fH(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function pH(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mH(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var bH=new WeakSet;class wH extends KT{constructor(t,e){super(t,{id:e.id,stateless:!1}),fH(this,bH),pH(this,"name",""),pH(this,"addSeparator",!1),this.name=e.name,this.addSeparator=e.addSeparator,this.elements.push(new cH(this.hot,{menuContainer:e.menuContainer})),this.elements.push(new Z_(this.hot,{placeholder:Jh})),this.elements.push(new Z_(this.hot,{placeholder:Qh})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",t=>mH(bH,this,vH).call(this,t)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",t=>this.runLocalHooks("selectTabKeydown",t)),x(this.getInputElements(),t=>{t.addLocalHook("keydown",t=>mH(bH,this,yH).call(this,t))})}setState(t){if(this.reset(),!t)return;const e=Rt(t.command);e.name.startsWith(yh)&&(e.name=this.hot.getTranslatedPhrase(e.name)),this.getSelectElement().setValue(e),x(t.args,(t,n)=>{if(n>e.inputsCount-1)return!1;const o=this.getInputElement(n);o.setValue(t),o[e.inputsCount>n?"show":"hide"](),n||this.hot._registerTimeout(()=>o.focus(),10)})}getState(){const t=this.getSelectElement().getValue()||ZT(QT),e=[];return x(this.getInputElements(),(n,o)=>{t.inputsCount>o&&e.push(n.getValue())}),{command:t,args:e}}updateState(t,e){const n=ZT(t?t.name:QT);this.state.setValueAtIndex(e,{command:n,args:t?t.args:[]}),t||x(this.getInputElements(),t=>t.setValue(null))}getSelectElement(){return this.elements.filter(t=>t instanceof cH)[0]}getInputElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[t]}getInputElements(){return this.elements.filter(t=>t instanceof Z_)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,n,o,i,r)=>{ue(e.parentNode,"htFiltersMenuCondition"),this.addSeparator&&ue(e.parentNode,"border");const s=this.hot.rootDocument.createElement("div");return ue(s,"htFiltersMenuLabel"),s.textContent=r,e.appendChild(s),e.parentElement.hasAttribute("ghost-table")||x(this.elements,t=>e.appendChild(t.element)),e}}}reset(){const t=this.hot.getPlugin("filters").getSelectedColumn();let e=[ZT(QT)];if(null!==t){const{visualIndex:n}=t;e=function(t){const e=[];let n=t;return F_[n]||(n=D_),x(F_[n],t=>{let n;n=t===Zk?{name:Zk}:Rt(ZT(t)),e.push(n)}),e}(this.hot.getDataType(0,n,this.hot.countRows(),n))}x(this.getInputElements(),t=>t.hide()),this.getSelectElement().setItems(e),super.reset(),this.getSelectElement().setValue(e[0])}}function vH(t){x(this.getInputElements(),(e,n)=>{var o;e[t.inputsCount>n?"show":"hide"](),e.options.type=null!==(o=t.inputType)&&void 0!==o?o:"text",0===n&&this.hot._registerTimeout(()=>e.focus(),10)}),this.runLocalHooks("change",t)}function yH(t){sn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),an(t))}function CH(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function SH(t,e){return t.get(kH(t,e))}function RH(t,e,n){return t.set(kH(t,e),n),n}function kH(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var xH=new WeakMap,EH=new WeakMap;class MH extends U_{static get DEFAULTS(){return Rt({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(t,e){super(t,yt(MH.DEFAULTS,e)),CH(this,xH,void 0),CH(this,EH,void 0)}build(){super.build();const t=this.hot.rootDocument.createElement("label");t.textContent=this.translateIfPossible(this.options.label.textContent),t.htmlFor=this.translateIfPossible(this.options.label.htmlFor),RH(EH,this,t),RH(xH,this,this._element.firstChild),SH(xH,this).checked=this.options.checked,this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(SH(EH,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&SH(xH,this).checked}setChecked(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(SH(xH,this).checked=t)}focus(){this.isBuilt()&&SH(xH,this).focus()}}function TH(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function _H(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var HH=new WeakSet;class IH extends KT{constructor(t,e){super(t,{id:e.id,stateless:!1}),TH(this,HH),_H(this,"name",""),this.name=e.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>(ue(e.parentNode,"htFiltersMenuOperators"),x(this.elements,t=>e.appendChild(t.element)),e)}}buildOperatorsElement(){const t=[A_,P_];x(t,e=>{const n=new MH(this.hot,{name:"operator",label:{htmlFor:e,textContent:(o=e,H_[o].name)},value:e,checked:e===t[0],id:e});var o;n.addLocalHook("change",t=>function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(HH,this,AH).call(this,t)),this.elements.push(n)})}setChecked(t){this.elements.length<t&&wt(T`Radio button with index ${t} doesn't exist.`),x(this.elements,(e,n)=>{e.setChecked(n===t)})}getActiveOperationId(){const t=this.elements.find(t=>t instanceof MH&&t.isChecked());return t?t.getValue():A_}getState(){return this.getActiveOperationId()}setState(t){this.reset(),t&&this.getActiveOperationId()!==t&&x(this.elements,e=>{e.setChecked(e.getValue()===t)})}updateState(){let t=arguments.length>1?arguments[1]:void 0,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:A_;e===O_&&(e=P_),this.state.setValueAtIndex(t,e)}reset(){this.setChecked(0)}}function AH(t){this.setState(t.target.value)}function PH(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function OH(t,e){return t.get(NH(t,e))}function NH(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var DH=new WeakMap;class LH extends U_{static get DEFAULTS(){return Rt({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(t,e){super(t,yt(LH.DEFAULTS,e)),PH(this,DH,void 0)}build(){var t,e,n;super.build(),t=DH,e=this,n=this._element.firstChild,t.set(NH(t,e),n)}update(){this.isBuilt()&&(OH(DH,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&OH(DH,this).focus()}activate(){OH(DH,this).click()}}function VH(t,e,n){BH(t,e),e.set(t,n)}function BH(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FH(t,e){return t.get(zH(t,e))}function WH(t,e,n){return t.set(zH(t,e),n),n}function zH(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const jH="multipleSelect.itemBox";var $H=new WeakMap,UH=new WeakMap,YH=new WeakMap,GH=new WeakMap,KH=new WeakMap,qH=new WeakMap,XH=new WeakSet;class ZH extends U_{static get DEFAULTS(){return Rt({className:"htUIMultipleSelect",value:[]})}constructor(t,e){var n,o;super(t,yt(ZH.DEFAULTS,e)),BH(n=this,o=XH),o.add(n),VH(this,$H,[]),VH(this,UH,void 0),VH(this,YH,void 0),VH(this,GH,void 0),VH(this,KH,void 0),VH(this,qH,void 0),WH(GH,this,new Z_(this.hot,{placeholder:Zh,className:"htUIMultipleSelectSearch"})),WH(KH,this,new LH(this.hot,{textContent:Gh,className:"htUISelectAll"})),WH(qH,this,new LH(this.hot,{textContent:Kh,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return FH(UH,this)}registerHooks(){FH(GH,this).addLocalHook("keydown",t=>zH(XH,this,QH).call(this,t)),FH(GH,this).addLocalHook("input",t=>zH(XH,this,JH).call(this,t)),FH(KH,this).addLocalHook("click",t=>zH(XH,this,tI).call(this,t)),FH(qH,this).addLocalHook("click",t=>zH(XH,this,eI).call(this,t))}setItems(t){var e;WH($H,this,t),null===(e=FH(UH,this))||void 0===e||e.loadData(FH($H,this))}setLocale(t){WH(YH,this,t)}getLocale(){return FH(YH,this)}getItems(){return[...FH($H,this)]}getValue(){return function(t){const e=[];return t.forEach(t=>{t.checked&&e.push(t.value)}),e}(FH($H,this))}getSearchInputElement(){return FH(GH,this)}getSelectAllElement(){return FH(KH,this)}getClearAllElement(){return FH(qH,this)}isSelectedAllValues(){return FH($H,this).length===this.getValue().length}build(){var t;super.build();const{rootDocument:e}=this.hot,n=e.createElement("div"),o=new U_(this.hot,{className:"htUISelectionControls",children:[FH(KH,this),FH(qH,this)]});this._element.appendChild(FH(GH,this).element),this._element.appendChild(o.element),this._element.appendChild(n),null===(t=FH(UH,this))||void 0===t||t.destroy(),ue(n,"htUIMultipleSelectHot"),WH(UH,this,new this.hot.constructor(n,{data:[[]],columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(t,e,n,o,i,r)=>{t.title=r.instance.getDataAtRowProp(e,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{FH(UH,this).listen()},modifyColWidth:t=>{const n=FH(UH,this).container.scrollWidth-Fe(e);return void 0!==t&&t<n?n:t},autoColumnSize:!0,autoRowSize:!1,hiddenRows:!0,maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:this.hot.getCurrentThemeName(),layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),FH(UH,this).init();const i=FH(UH,this).getShortcutManager().getContext("grid");i.removeShortcutsByKeys(["Tab"]),i.removeShortcutsByKeys(["Shift","Tab"]),i.addShortcut({keys:[["Escape"]],callback:t=>{this.runLocalHooks("keydown",t,this)},group:jH}),i.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{FH(UH,this).deselectCell(),this.runLocalHooks("keydown",t,this),this.runLocalHooks("listTabKeydown",t,this)},group:jH})}focus(){this.isBuilt()&&FH(UH,this).listen()}reset(){FH(GH,this).reset(),FH(KH,this).reset(),FH(qH,this).reset()}update(){this.isBuilt()&&0!==FH(UH,this).rootElement.offsetHeight&&(FH(UH,this).updateSettings({data:nI(FH($H,this),this.options.value)}),super.update())}destroy(){var t;null===(t=FH(UH,this))||void 0===t||t.destroy(),FH(GH,this).destroy(),FH(qH,this).destroy(),FH(KH,this).destroy(),WH(GH,this,null),WH(qH,this,null),WH(KH,this,null),WH(UH,this,null),WH($H,this,null),super.destroy()}}function JH(t){const e=t.target.value.toLocaleLowerCase(this.getLocale());if("apply"===this.options.searchMode){const t=FH(UH,this).getPlugin("hiddenRows");t.showRows(t.getHiddenRows()),FH($H,this).forEach((n,o)=>{n.checked=`${n.value}`.toLocaleLowerCase(this.getLocale()).indexOf(e)>=0,n.checked||t.hideRow(o)}),FH(UH,this).view.adjustElementsSize(),FH(UH,this).render()}else{let t;t=""===e?[...FH($H,this)]:FH($H,this).filter(t=>`${t.value}`.toLocaleLowerCase(this.getLocale()).indexOf(e)>=0),FH(UH,this).loadData(t)}}function QH(t){this.runLocalHooks("keydown",t,this);Qe(sn,t.keyCode)("ARROW_DOWN")&&(t.preventDefault(),an(t),FH(UH,this).listen(),FH(UH,this).selectCell(0,0))}function tI(t){const e=[];t.preventDefault(),FH(UH,this).getSourceData().forEach((t,n)=>{t.checked=!0,e.push(Oa(t,n)[0])}),FH(UH,this).setSourceDataAtCell(e)}function eI(t){const e=[];t.preventDefault(),FH(UH,this).getSourceData().forEach((t,n)=>{t.checked=!1,e.push(Oa(t,n)[0])}),FH(UH,this).setSourceDataAtCell(e)}function nI(t,e){const n=x_(e);return t.map(t=>(t.checked=n(t.value),t))}function oI(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function iI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function rI(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var sI,aI=new WeakSet;class lI extends KT{constructor(t,e){super(t,{id:e.id,stateless:!1}),oI(this,aI),iI(this,"name",""),iI(this,"searchMode",void 0),this.name=e.name,this.searchMode=e.searchMode,this.elements.push(new ZH(this.hot,{searchMode:this.searchMode})),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",t=>rI(aI,this,hI).call(this,t)).addLocalHook("listTabKeydown",t=>this.runLocalHooks("listTabKeydown",t)),this.hot.addHook("modifyFiltersMultiSelectValue",(t,e)=>rI(aI,this,dI).call(this,t,e))}getElements(){const t=this.getMultipleSelectElement();return[t.getSearchInputElement(),t.getSelectAllElement(),t.getClearAllElement(),this.getMultipleSelectElement()]}setState(t){if(this.reset(),t&&t.command.key===__){const e=this.getMultipleSelectElement();e.setItems(t.itemsSnapshot),e.setValue(t.args[0]),e.setLocale(t.locale)}}getState(){const t=this.getMultipleSelectElement(),e=t.getItems();return{command:{key:t.isSelectedAllValues()||!e.length?QT:__},args:[t.getValue()],itemsSnapshot:e}}updateState(t){const e=(e,n,o,i,r)=>{const[s]=R(n,t=>t.name===__),a={},l=this.hot.getTranslatedPhrase(Yh);if(s){const n=i(e,r),h=k(n,t=>t.value),c=new Map(n.map(t=>[t.value,t.meta])),d=M_(h);o&&(s.args[0]=o);const u=[],g=T_(d,s.args[0],l,t=>{t.checked&&u.push(t.value),rI(aI,this,cI).call(this,t,c)}),f=t.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,f).locale,a.args=[u],a.command=ZT(__),a.itemsSnapshot=g}else a.args=[],a.command=ZT(QT);this.state.setValueAtIndex(e,a)};e(t.editedConditionStack.column,t.editedConditionStack.conditions,t.conditionArgsChange,t.filteredRowsFactory),t.dependentConditionStacks.length&&e(t.dependentConditionStacks[0].column,t.dependentConditionStacks[0].conditions,t.conditionArgsChange,t.filteredRowsFactory,t.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter(t=>t instanceof ZH)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,n,o,i,r)=>{ue(e.parentNode,"htFiltersMenuValue");const s=this.hot.rootDocument.createElement("div");return ue(s,"htFiltersMenuLabel"),s.textContent=r,e.appendChild(s),e.parentElement.hasAttribute("ghost-table")||x(this.elements,t=>e.appendChild(t.element)),e}}}reset(){const t=this.hot.getTranslatedPhrase(Yh),e=this._getColumnVisibleValues(),n=e.map(t=>t.value),o=new Map(e.map(t=>[t.value,t.meta])),i=M_(n),r=T_(i,i,t,t=>{rI(aI,this,cI).call(this,t,o)});this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(i);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const t=this.hot.getPlugin("filters").getSelectedColumn();return null===t?[]:k(this.hot.getDataAtCol(t.visualIndex),(e,n)=>({value:E_(e),meta:this.hot.getCellMeta(n,t.visualIndex)}))}}function hI(t){sn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),an(t)),sn(t.keyCode,"ENTER")&&("apply"===this.searchMode&&this.runLocalHooks("accept"),an(t))}function cI(t,e){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(t.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",t.visualValue,e.get(t.value)))}function dI(t,e){return e.valueFormatter?e.valueFormatter(t,e):t}function uI(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function gI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var fI=new WeakSet;class pI extends KT{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(t,e){super(t,{id:e.id,stateless:!0}),uI(this,fI),gI(this,"name",""),this.name=e.name,this.elements.push(new Z_(this.hot,{type:"button",value:qh,className:"htUIButton htUIButtonOK",identifier:pI.BUTTON_OK})),this.elements.push(new Z_(this.hot,{type:"button",value:Xh,className:"htUIButton htUIButtonCancel",identifier:pI.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){x(this.elements,t=>{t.addLocalHook("click",(t,e)=>function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(fI,this,mI).call(this,t,e))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>(ue(e.parentNode,"htFiltersMenuActionBar"),x(this.elements,t=>e.appendChild(t.element)),e)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function mI(t,e){e.options.identifier===sI.BUTTON_OK?this.accept():this.cancel()}function bI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}sI=pI;const wI="ConditionCollection.filteringStates";class vI{constructor(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];bI(this,"hot",void 0),bI(this,"isMapRegistrable",void 0),bI(this,"filteringStates",new Ga),this.hot=t,this.isMapRegistrable=e,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(wI,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(t,e){var n;const o=this.filteringStates.getValueAtIndex(e),i=null!==(n=null==o?void 0:o.conditions)&&void 0!==n?n:[],r=null==o?void 0:o.operation;return this.isMatchInConditions(i,t,r)}isMatchInConditions(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A_;return!t.length||function(t){H_[t]||wt(`Operation with id "${t}" does not exist.`);const e=H_[t].func;return function(t,n){return e(t,n)}}(n)(t,e)}addCondition(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:A_,o=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,t).locale,r=e.args.map(t=>"string"==typeof t?t.toLocaleLowerCase(i):t),s=e.name||e.command.key;this.runLocalHooks("beforeAdd",t);const a=this.getOperation(t);a?a!==n&&wt(T`The column of index ${t} has been already applied with a \`${a}\`\x20
251
+ filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
252
+ Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
253
+ use it consequently for a particular column).`):A(H_[n])&&wt(T`Unexpected operation named \`${n}\`. Possible ones are\x20
254
+ \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(t);0===l.length?this.filteringStates.setValueAtIndex(t,{operation:n,conditions:[{name:s,args:r,func:XT(s,r)}]},o):l.push({name:s,args:r,func:XT(s,r)}),this.runLocalHooks("afterAdd",t)}getConditions(t){var e,n;return null!==(e=null===(n=this.filteringStates.getValueAtIndex(t))||void 0===n?void 0:n.conditions)&&void 0!==e?e:[]}getOperation(t){var e;return null===(e=this.filteringStates.getValueAtIndex(t))||void 0===e?void 0:e.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(t=>{let[e]=t;return e})}getColumnStackPosition(t){return this.getFilteredColumns().indexOf(t)}exportAllConditions(){return this.filteringStates.getEntries().reduce((t,e)=>{let[n,{operation:o,conditions:i}]=e;return t.push({column:n,operation:o,conditions:i.map(t=>{let{name:e,args:n}=t;return{name:e,args:[...n]}})}),t},[])}importAllConditions(t){this.clean(),t.forEach(t=>{t.conditions.forEach(e=>this.addCondition(t.column,e))})}removeConditions(t){this.runLocalHooks("beforeRemove",t),this.filteringStates.clearValue(t),this.runLocalHooks("afterRemove",t)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(t,e){const n=this.getConditions(t);return e?n.some(t=>t.name===e):n.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(wI),this.filteringStates=null,this.clearLocalHooks()}}function yI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}kt(vI,os);class CI{constructor(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];yI(this,"conditionCollection",void 0),yI(this,"columnDataFactory",void 0),this.conditionCollection=t,this.columnDataFactory=e}filter(){let t=[];return x(this.conditionCollection.getFilteredColumns(),(e,n)=>{let o=this.columnDataFactory(e);n&&(o=this._getIntersectData(o,t)),t=this.filterByColumn(e,o)}),t}filterByColumn(t){const e=[];return x(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=>{void 0!==n&&this.conditionCollection.isMatch(n,t)&&e.push(n)}),e}_getIntersectData(t,e){const n=[];return x(e,e=>{const o=e.meta.row;void 0!==t[o]&&(n[o]=t[o])}),n}}function SI(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function RI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kI(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var xI=new WeakSet;class EI{constructor(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];SI(this,xI),RI(this,"hot",void 0),RI(this,"conditionCollection",void 0),RI(this,"columnDataFactory",void 0),RI(this,"changes",[]),RI(this,"grouping",!1),RI(this,"latestEditedColumnPosition",-1),RI(this,"latestOrderStack",[]),this.hot=t,this.conditionCollection=e,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",t=>kI(xI,this,MI).call(this,t)),this.conditionCollection.addLocalHook("afterRemove",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("afterAdd",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("beforeClean",()=>kI(xI,this,TI).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>kI(xI,this,_I).call(this))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,x(this.changes,t=>{this.updateStatesAtColumn(t)}),this.changes.length=0}updateStatesAtColumn(t,e){var n=this;if(this.grouping)return void(-1===this.changes.indexOf(t)&&this.changes.push(t));const o=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(t);-1===i&&(i=this.latestEditedColumnPosition);const r=o.slice(0,i),s=o.slice(i);s.length&&s[0].column===t&&s.shift();const a=function(t){const e=t.length;return function n(o){return function(){for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];const a=o.concat(r);let l;return l=a.length>=e?t.apply(this,a):n(a),l}}([])}(function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new vI(n.hot,!1),r=[].concat(t,o);i.importAllConditions(r);const s=n.columnDataFactory(e);let a;a=i.isEmpty()?s:new CI(i,t=>n.columnDataFactory(t)).filter();const l=x_(k(a,t=>t.meta.row));return i.destroy(),R(s,t=>l(t.meta.row))})(r),l=[].concat(this.conditionCollection.getConditions(t));this.runLocalHooks("update",{editedConditionStack:{column:t,conditions:l},dependentConditionStacks:s,filteredRowsFactory:a,conditionArgsChange:e})}destroy(){this.clearLocalHooks(),Tt(this,(t,e)=>{this[e]=null})}}function MI(t){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(t)}function TI(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function _I(){x(this.latestOrderStack,t=>{this.updateStatesAtColumn(t)})}kt(EI,os);const HI="filters";function II(t,e){let n,o=-1;const i=(r=e,lE({initialPage:0,size:()=>r.length,onItemSelect:(t,e)=>{const n=r[t];return n instanceof ZH?e:!(n.element&&!Re(n.element))&&void n.focus()}}));var r;const s=t=>()=>{n.isOpened()&&n.getKeyboardShortcutsCtrl().listen(HI),i.setCurrentPage(e.indexOf(t))};function a(t){const r=n.getKeyboardShortcutsCtrl(),s=t.getKeyboardShortcutsCtrl();i.clear(),s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:r.getContext(HI),callback:()=>{t.isSubMenu()&&t.close(),r.listen(HI)}}]),t.isSubMenu()||r.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const e=n.getNavigator();e.getCurrentPage()>-1&&(o=e.getCurrentPage()),e.clear(),t.shiftKey?i.toPreviousItem():i.toNextItem()}},{keys:[["Escape"]],callback:()=>{n.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:t=>{const n=e[i.getCurrentPage()];n instanceof cH&&(n.openOptions(),t.preventDefault()),n instanceof LH&&(n.activate(),t.preventDefault()),n instanceof U_||t.preventDefault()}}],HI)}function l(t){t.addLocalHook("afterSelectionChange",t=>{t.key.startsWith("filter_")||i.clear()}),t.addLocalHook("afterSubmenuOpen",a),t.addLocalHook("afterOpen",a),n=t}return e.forEach(t=>{t instanceof U_&&(t.addLocalHook("click",s(t)),t.addLocalHook("focus",s(t)),t.addLocalHook("afterClose",s(t)))}),l(t),{...i,listen:function(){n.focus(),n.getKeyboardShortcutsCtrl().listen(HI)},setMenu:l,getMenu:function(){return n},getLastMenuPage:function(){return o}}}function AI(t,e,n){PI(t,e),e.set(t,n)}function PI(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function OI(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function NI(t,e,n){return t.set(LI(t,e),n),n}function DI(t,e){return t.get(LI(t,e))}function LI(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const VI="filters",BI=VI;var FI=new WeakMap,WI=new WeakMap,zI=new WeakMap,jI=new WeakSet;class $I extends DC{static get PLUGIN_KEY(){return VI}static get PLUGIN_PRIORITY(){return 250}static get DEFAULT_SETTINGS(){return{searchMode:"show"}}static get SETTINGS_VALIDATORS(){return{searchMode:t=>"string"==typeof t&&["show","apply"].includes(t)}}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(t){var e,n,o;super(t),e=this,PI(n=this,o=jI),o.add(n),OI(this,"dropdownMenuPlugin",null),OI(this,"conditionCollection",null),OI(this,"conditionUpdateObserver",null),OI(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),OI(this,"filtersRowsMap",null),AI(this,FI,void 0),AI(this,WI,new WeakSet),AI(this,zI,[]),this.hot.addHook("afterGetColHeader",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return LI(jI,e,QI).call(e,...n)})}isEnabled(){return!!this.hot.getSettings()[VI]}enablePlugin(){var t=this;if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Ka),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,n=e&&e.uiContainer||this.hot.rootPortalElement,o=t=>(t.addLocalHook("accept",()=>LI(jI,this,XI).call(this,"accept")),t.addLocalHook("cancel",()=>LI(jI,this,XI).call(this,"cancel")),t.addLocalHook("change",e=>LI(jI,this,ZI).call(this,t,e)),t),i=()=>`${this.hot.getTranslatedPhrase(zh)}:`,r=()=>`${this.hot.getTranslatedPhrase(jh)}:`;if(!this.components.get("filter_by_condition")){const t=new wH(this.hot,{id:"filter_by_condition",name:i,addSeparator:!1,menuContainer:n});t.addLocalHook("afterClose",()=>LI(jI,this,JI).call(this)),this.components.set("filter_by_condition",o(t))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new IH(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const t=new wH(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:n});t.addLocalHook("afterClose",()=>LI(jI,this,JI).call(this)),this.components.set("filter_by_condition2",o(t))}if(!this.components.get("filter_by_value")){const t=this.getSetting("searchMode");this.components.set("filter_by_value",o(new lI(this.hot,{id:"filter_by_value",name:r,searchMode:t})))}if(this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new pI(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new vI(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new EI(this.hot,this.conditionCollection,t=>this.getDataMapAtColumn(t)),this.conditionUpdateObserver.addLocalHook("update",t=>LI(jI,this,tA).call(this,t))),this.components.forEach(t=>t.show()),this.addHook("afterDropdownMenuDefaultOptions",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return LI(jI,t,qI).call(t,...n)}),this.addHook("beforeDropdownMenuShow",()=>LI(jI,this,KI).call(this)),this.addHook("afterDropdownMenuShow",()=>LI(jI,this,YI).call(this)),this.addHook("afterDropdownMenuHide",()=>LI(jI,this,GI).call(this)),this.addHook("afterChange",t=>LI(jI,this,UI).call(this,t)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!DI(FI,this)&&this.dropdownMenuPlugin.enabled){const t=[{focus:()=>{const t=DI(FI,this).getMenu(),e=t.getNavigator(),n=DI(FI,this).getLastMenuPage();t.focus(),n>0?e.setCurrentPage(n):e.toFirstItem()}},...Array.from(this.components).map(t=>{let[,e]=t;return e.getElements()}).flat()];NI(FI,this,II(this.dropdownMenuPlugin.menu,t));const e=t=>{DI(FI,this).listen(),t.preventDefault(),sn(t.keyCode,"TAB")&&(t.shiftKey?DI(FI,this).toPreviousItem():DI(FI,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",e),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",e)}this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){var t;this.enabled&&(null!==(t=this.dropdownMenuPlugin)&&void 0!==t&&t.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach((t,e)=>{t.destroy(),this.components.set(e,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const t=this.hot.getSelected();this.clearConditions(),this.filter(),t&&this.hot.selectCells(t)},group:BI})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(BI)}addCondition(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:A_;const i=this.hot.toPhysicalColumn(t);this.conditionCollection.addCondition(i,{command:{key:e},args:n},o)}removeConditions(t){const e=this.hot.toPhysicalColumn(t);this.conditionCollection.removeConditions(e)}clearConditions(t){if(void 0===t)this.conditionCollection.clean();else{const e=this.hot.toPhysicalColumn(t);this.conditionCollection.removeConditions(e)}}importConditions(t){this.conditionCollection.importAllConditions(t)}exportConditions(){return this.conditionCollection.exportAllConditions()}filter(){const{navigableHeaders:t}=this.hot.getSettings(),e=!this.conditionCollection.isEmpty(),n=this.exportConditions(),o=this.hot.runHooks("beforeFilter",n,DI(zI,this));if(!1!==o&&e){const e=this._createDataFilter(),n=[];let o=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),o=k(e.filter(),t=>t.meta.row);const t=x_(o);ao(this.hot.countSourceRows()-1,e=>{t(e)||n.push(e)}),x(n,t=>{this.filtersRowsMap.setValueAtIndex(t,!0)})},!0),t||o.length||this.hot.deselectCell(),NI(zI,this,this.exportConditions())}else!1===o||e?this.importConditions(DI(zI,this)):(NI(zI,this,this.exportConditions()),this.filtersRowsMap.clear());this.hot.selection.isSelected()&&this.hot.selectCell(t?-1:0,this.hot.getSelectedRangeActive().highlight.col),!1!==o&&(this.hot.runHooks("afterFilter",n),this.hot.view.adjustElementsSize(),this.hot.render())}getSelectedColumn(){var t;const e=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return e?{visualIndex:e.col,physicalIndex:this.hot.toPhysicalColumn(e.col)}:null}getDataMapAtColumn(t){const e=this.hot.countSourceRows(),n=this.hot.toVisualColumn(t),o=[];for(let i=0;i<e;i++){const e=this.hot._getMetaManager().getCellMeta(i,t,{visualRow:i,visualColumn:t,skipMetaExtension:!0});let r=Wd(this.hot.getSourceDataAtCell(i,n),e);if(this.hot.hasHook("modifyData")){const e=At(r);this.hot.runHooks("modifyData",i,t,e,"get"),e.isTouched()&&(r=e.value)}o.push({meta:e,value:E_(r)})}return o}updateValueComponentCondition(t){const e=M_(this.hot.getDataAtCol(t));this.conditionUpdateObserver.updateStatesAtColumn(t,e)}restoreComponents(t){var e;const n=null===(e=this.getSelectedColumn())||void 0===e?void 0:e.physicalIndex;t.forEach(t=>{t.isHidden()||t.restoreState(n)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(t,e,n,o){let i=t;return i===P_&&e.command.key!==QT&&n.command.key!==QT&&o.command.key!==QT?i=O_:o.command.key!==QT&&(e.command.key!==QT&&n.command.key!==QT||(i=A_)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const t=this.components.get("filter_by_condition"),{command:e}=t.getState(),n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];e.showOperators?this.showComponents(...n):this.hideComponents(...n)}_createDataFilter(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new CI(t,t=>this.getDataMapAtColumn(t))}getIndexesOfComponents(){const t=[];if(!this.dropdownMenuPlugin)return t;const e=this.dropdownMenuPlugin.menu;for(var n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return x(o,n=>{x(e.menuItems,(e,o)=>{e.key===n.getMenuItemDescriptor().key&&t.push(o)})}),t}changeComponentsVisibility(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const e=this.dropdownMenuPlugin.menu.hotMenu,n=e.getPlugin("hiddenRows");for(var o=arguments.length,i=new Array(o>1?o-1:0),r=1;r<o;r++)i[r-1]=arguments[r];const s=this.getIndexesOfComponents(...i);t?n.showRows(s):n.hideRows(s),e.render()}hideComponents(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.changeComponentsVisibility(!1,...e)}showComponents(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.changeComponentsVisibility(!0,...e)}destroy(){this.enabled&&(this.components.forEach((t,e)=>{null!==t&&(t.destroy(),this.components.set(e,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function UI(t){t&&x(t,t=>{const[,e]=t,n=this.hot.propToCol(e);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)})}function YI(){const t=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),t.updateMenuDimensions()}function GI(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function KI(){const t=this.dropdownMenuPlugin.menu;DI(WI,this).has(t)||DI(FI,this).setMenu(t),DI(WI,this).add(t)}function qI(t){t.items.push({name:Zk}),this.components.forEach(e=>{t.items.push(e.getMenuItemDescriptor())})}function XI(t){var e;if("accept"===t){const t=this.getSelectedColumn();var n;if(null===t)return void(null===(n=this.dropdownMenuPlugin)||void 0===n||n.close());const{physicalIndex:e}=t,o=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),o,i,r);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(e);-1===a&&(a=void 0),this.conditionCollection.removeConditions(e),o.command.key!==QT&&(this.conditionCollection.addCondition(e,o,s,a),i.command.key!==QT&&this.conditionCollection.addCondition(e,i,s,a)),r.command.key!==QT&&this.conditionCollection.addCondition(e,r,s,a),this.conditionUpdateObserver.flush(),this.components.forEach(t=>t.saveState(e)),this.filter()}null===(e=this.dropdownMenuPlugin)||void 0===e||e.close()}function ZI(t,e){const n=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),t.constructor!==wH||e.inputsCount||this.setListeningDropdownMenu(),n.updateMenuDimensions()}function JI(){this.setListeningDropdownMenu()}function QI(t,e,n){const o=this.hot.toPhysicalColumn(t);this.enabled&&this.conditionCollection.hasConditions(o)&&n===this.hot.view.getColumnHeadersCount()-1?ue(e,"htFiltersActive"):ge(e,"htFiltersActive")}function tA(t){var e;if(null===(e=this.dropdownMenuPlugin)||void 0===e||!e.enabled)return;const{editedConditionStack:{conditions:n,column:o},conditionArgsChange:i}=t;Array.isArray(i)&&NI(zI,this,DI(zI,this).map(t=>(t.column===o&&n.length>0&&t.conditions.forEach(t=>{"by_value"===t.name&&(t.args=[[...i]])}),t)));const r=n.filter(t=>t.name===__),s=n.filter(t=>t.name!==__);if(r.length>=2||s.length>=3)Qt(T`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
255
+ The overall amount of conditions exceed the capability of the dropdown menu.\x20
256
+ For more details see the documentation.`);else{const e=this.conditionCollection.getOperation(o);this.components.get("filter_by_condition").updateState(s[0],o),this.components.get("filter_by_condition2").updateState(s[1],o),this.components.get("filter_operators").updateState(e,o),this.components.get("filter_by_value").updateState(t)}}const eA="internal-use-in-handsontable",nA={licenseKey:eA,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function oA(t){var e;return{maxColumns:t.maxColumns,maxRows:t.maxRows,language:null===(e=t[GA])||void 0===e||null===(e=e.language)||void 0===e?void 0:e.langCode}}function iA(t){return Object.keys(t).reduce((e,n)=>("hyperformula"!==n&&(e[n]=t[n]),e),{})}function rA(){const t="engine_relationship",e=Hn(GA);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function sA(){const t="shared_engine_usage",e=Hn(GA);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function aA(t){const e=t.getSettings(),n=e[GA],o=null==n?void 0:n.engine;if(!0===n)return null;if(A(o))return null;var i;if("function"==typeof o.hyperformula||"function"==typeof o)return function(t,e,n){const o=e[GA],i=function(t){var e;const n=t[GA],o=iA(null!=n&&null!==(e=n.engine)&&void 0!==e&&e.hyperformula?n.engine:{}),i=oA(t);return{...nA,...o,...i}}(e),r=rA(),s=sA();(function(t,e){e&&e.forEach(e=>{const{name:n,plugin:o,translations:i}=e;try{t.registerFunction(n,o,i)}catch(t){Qt(t.message)}})})(t,o.functions),function(t,e){if(e){const{langCode:n}=e;try{t.registerLanguage(n,e)}catch(t){Qt(t.message)}}}(t,o.language);const a=t.buildEmpty(i);return r.set(a,[n]),s.set(a,[n.guid]),function(t,e){e&&(t.suspendEvaluation(),e.forEach(e=>{const{name:n,expression:o,scope:i,options:r}=e;try{t.addNamedExpression(n,o,i,r)}catch(t){Qt(t.message)}}),t.resumeEvaluation())}(a,o.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}(null!==(i=o.hyperformula)&&void 0!==i?i:o,e,t);if("object"==typeof o&&A(o.hyperformula)){const e=rA(),n=sA().get(o);return e.has(o)||e.set(o,[]),e.get(o).push(t),n&&n.push(t.guid),o.getConfig().licenseKey||o.updateConfig({licenseKey:eA}),o.getConfig().leapYear1900===nA.leapYear1900&&!1!==xt(o.getConfig().nullDate,nA.nullDate)||Qt(T`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
257
+ settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),o}return null}function lA(t){var e;const n=rA(),o=0===n.size?[]:Array.from(null!==(e=n.get(t))&&void 0!==e?e:[]);return new Map(o.map(t=>[t.getPlugin("formulas").sheetId,t]))}function hA(t,e){if(t){const n=rA(),o=n.get(t),i=sA(),r=i.get(t);o&&o.includes(e)&&(o.splice(o.indexOf(e),1),0===o.length&&n.delete(t)),r&&r.includes(e.guid)&&(r.splice(r.indexOf(e.guid),1),0===r.length&&(i.delete(t),t.destroy()))}}const cA="DD/MM/YYYY";function dA(t,e){return"string"==typeof t&&"date"===e}function uA(t,e){return tb(t,e,!0).isValid()}function gA(t,e){return tb(t,e,!0).format(cA)}function fA(t,e){return tb(t,cA,!0).format(e)}function pA(t,e){const n=new Date(Date.UTC(0,0,t+-1));return tb(n).format(e)}function mA(t,e,n){const o=function(t,e){const n=[];return t.forEach(t=>{const o={from:t,to:e};n.forEach(t=>{const e=t.from>t.to,n=t.to<=o.from;t.from>o.from&&n&&e&&(o.from+=1)}),o.from>=e&&(e+=1),n.push(o)}),n}(t,function(t,e,n){const o=Array.from(Array(n).keys()).filter(e=>!1===t.includes(e));var i;return 0===e?null!==(i=o[e])&&void 0!==i?i:0:o[e-1]+1}(t,e,n));return function(t){return t.forEach((e,n)=>{t.slice(n+1).forEach(t=>{const n=t.from<t.to;t.from>e.from&&n&&(t.from-=1)})}),t}(o)}function bA(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function wA(t,e){return t.get(yA(t,e))}function vA(t,e,n){return t.set(yA(t,e),n),n}function yA(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var CA=new WeakMap,SA=new WeakMap,RA=new WeakMap,kA=new WeakMap,xA=new WeakMap,EA=new WeakMap,MA=new WeakMap;class TA{constructor(t,e,n){bA(this,CA,void 0),bA(this,SA,void 0),bA(this,RA,void 0),bA(this,kA,[]),bA(this,xA,[]),bA(this,EA,void 0),bA(this,MA,[]),vA(CA,this,t),vA(SA,this,e),vA(RA,this,n)}setRemovedHfIndexes(t){return vA(MA,this,t.map(t=>{const e=wA(SA,this).getVisualFromPhysicalIndex(t);return this.getHfIndexFromVisualIndex(e)})),wA(MA,this)}getRemovedHfIndexes(){return wA(MA,this)}getHfIndexFromVisualIndex(t){const e=wA(SA,this).getIndexesSequence(),n=wA(SA,this).getNotTrimmedIndexes();return e.indexOf(n[t],t)}syncMoves(t){const e=`move${$(wA(CA,this))}s`;wA(RA,this).getEngine().batch(()=>{t.forEach(t=>{const n=t.from!==t.to,o=t.from+1!==t.to;n&&o&&wA(RA,this).getEngine()[e](wA(RA,this).getSheetId(),t.from,1,t.to)})})}storeMovesInformation(t,e,n){!1!==n&&(vA(xA,this,t.map(t=>this.getHfIndexFromVisualIndex(t))),vA(EA,this,this.getHfIndexFromVisualIndex(e)))}calculateAndSyncMoves(t,e){if(wA(RA,this).isPerformingUndoRedo())return;if(!1===t||!1===e)return;const n=mA(wA(xA,this),wA(EA,this),wA(SA,this).getNumberOfIndexes());null===wA(RA,this).getSheetId()?wA(RA,this).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const t=`set${$(wA(CA,this))}Order`;return e=>{if(wA(RA,this).isPerformingUndoRedo())return;const n=wA(SA,this).getIndexesSequence();if("update"===e&&n.length>0){const e=wA(kA,this).map(t=>n.indexOf(t)),o=wA(RA,this).getEngine().getSheetDimensions(wA(RA,this).getSheetId());let i;i="row"===wA(CA,this)?o.height:o.width;for(let t=e.length;t<i;t+=1)e.push(t);wA(RA,this).getEngine()[t](wA(RA,this).getSheetId(),e)}vA(kA,this,n)}}init(){vA(kA,this,wA(SA,this).getIndexesSequence())}}function _A(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function HA(t,e){return t.get(AA(t,e))}function IA(t,e,n){return t.set(AA(t,e),n),n}function AA(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var PA=new WeakMap,OA=new WeakMap,NA=new WeakMap,DA=new WeakMap,LA=new WeakMap,VA=new WeakMap,BA=new WeakMap;class FA{constructor(t,e,n){_A(this,PA,void 0),_A(this,OA,void 0),_A(this,NA,void 0),_A(this,DA,!1),_A(this,LA,!1),_A(this,VA,null),_A(this,BA,null),IA(PA,this,new TA("row",t,this)),IA(OA,this,new TA("column",e,this)),IA(NA,this,n)}getForAxis(t){return HA("row"===t?PA:OA,this)}setPerformUndo(t){IA(DA,this,t)}setPerformRedo(t){IA(LA,this,t)}isPerformingUndoRedo(){return HA(DA,this)||HA(LA,this)}getSheetId(){return HA(BA,this)}getEngine(){return HA(VA,this)}getPostponeAction(){return HA(NA,this)}setupSyncEndpoint(t,e){IA(VA,this,t),IA(BA,this,e),HA(PA,this).init(),HA(OA,this).init()}}function WA(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zA(t,e,n){jA(t,e),e.set(t,n)}function jA(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $A(t,e,n){return t.set(YA(t,e),n),n}function UA(t,e){return t.get(YA(t,e))}function YA(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const GA="formulas",KA=["maxRows","maxColumns","language"];Mn.getSingleton().register("afterNamedExpressionAdded"),Mn.getSingleton().register("afterNamedExpressionRemoved"),Mn.getSingleton().register("afterSheetAdded"),Mn.getSingleton().register("afterSheetRemoved"),Mn.getSingleton().register("afterSheetRenamed"),Mn.getSingleton().register("afterFormulasValuesUpdate");const qA=t=>"UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;var XA=new WeakMap,ZA=new WeakMap,JA=new WeakMap,QA=new WeakSet;class tP extends DC{constructor(){var t,e,n;super(...arguments),t=this,jA(e=this,n=QA),n.add(e),zA(this,XA,!1),zA(this,ZA,!1),zA(this,JA,[["valuesUpdated",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,SP).call(t,...n)}],["namedExpressionAdded",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,RP).call(t,...n)}],["namedExpressionRemoved",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,kP).call(t,...n)}],["sheetAdded",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,xP).call(t,...n)}],["sheetRenamed",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,EP).call(t,...n)}],["sheetRemoved",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return YA(QA,t,MP).call(t,...n)}]]),WA(this,"staticRegister",Hn("formulas")),WA(this,"engine",null),WA(this,"sheetId",null),WA(this,"sheetName",null),WA(this,"indexSyncer",null),WA(this,"rowAxisSyncer",null),WA(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return GA}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[GA,...KA]}isEnabled(){return!!this.hot.getSettings()[GA]}enablePlugin(){var t,e=this;if(!this.enabled)if(this.engine=null!==(t=aA(this.hot))&&void 0!==t?t:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const t=this.addSheet(this.sheetName,YA(QA,this,oP).call(this));!1!==t&&YA(QA,this,eP).call(this,t)}this.addHook("beforeLoadData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,sP).call(e,...n)}),this.addHook("afterLoadData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,lP).call(e,...n)}),this.addHook("beforeUpdateData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,sP).call(e,...n)}),this.addHook("afterUpdateData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,lP).call(e,...n)}),this.addHook("modifyData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,hP).call(e,...n)}),this.addHook("modifySourceData",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,cP).call(e,...n)}),this.addHook("beforeValidate",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,iP).call(e,...n)}),this.addHook("afterSetSourceDataAtCell",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,uP).call(e,...n)}),this.addHook("afterSetDataAtCell",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,dP).call(e,...n)}),this.addHook("afterSetDataAtRowProp",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,dP).call(e,...n)}),this.addHook("beforeCreateRow",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,gP).call(e,...n)}),this.addHook("beforeCreateCol",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,fP).call(e,...n)}),this.addHook("afterCreateRow",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,bP).call(e,...n)}),this.addHook("afterCreateCol",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,wP).call(e,...n)}),this.addHook("beforeRemoveRow",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,pP).call(e,...n)}),this.addHook("beforeRemoveCol",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,mP).call(e,...n)}),this.addHook("afterRemoveRow",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,vP).call(e,...n)}),this.addHook("afterRemoveCol",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,yP).call(e,...n)}),this.indexSyncer=new FA(this.hot.rowIndexMapper,this.hot.columnIndexMapper,t=>{this.hot.addHookOnce("init",()=>{t()})}),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",(t,e,n,o)=>{this.rowAxisSyncer.storeMovesInformation(t,e,o)}),this.hot.addHook("beforeColumnMove",(t,e,n,o)=>{this.columnAxisSyncer.storeMovesInformation(t,e,o)}),this.hot.addHook("afterRowMove",(t,e,n,o,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(o,i)}),this.hot.addHook("afterColumnMove",(t,e,n,o,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(o,i)}),this.hot.addHook("beforeColumnFreeze",(t,e)=>{this.columnAxisSyncer.storeMovesInformation([t],this.hot.getSettings().fixedColumnsStart,e)}),this.hot.addHook("afterColumnFreeze",(t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)}),this.hot.addHook("beforeColumnUnfreeze",(t,e)=>{this.columnAxisSyncer.storeMovesInformation([t],this.hot.getSettings().fixedColumnsStart-1,e)}),this.hot.addHook("afterColumnUnfreeze",(t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)}),this.addHook("afterCellMetaReset",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,aP).call(e,...n)}),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()}),this.addHook("beforeRedo",()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1)}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformRedo(!1)}),this.addHook("afterDetachChild",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,CP).call(e,...n)}),this.addHook("beforeAutofill",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return YA(QA,e,rP).call(e,...n)}),UA(JA,this).forEach(t=>{let[e,n]=t;return this.engine.on(e,n)}),super.enablePlugin()}else Qt("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){UA(JA,this).forEach(t=>{let[e,n]=t;return this.engine.off(e,n)}),hA(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(t){const e=function(t){var e;const n=t[GA];return{...iA(null!=n&&null!==(e=n.engine)&&void 0!==e&&e.hyperformula?n.engine:{}),...oA(t)}}(this.hot.getSettings());(function(t,e){return Object.keys(e).some(n=>void 0!==e[n]&&e[n]!==t[n])})(this.engine.getConfig(),e)&&this.engine.updateConfig(e);const n=this.hot.getSettings()[GA];if(I(n)&&I(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!t.data&&null===this.sheetName){const t=this.hot.getSettings()[GA].sheetName;if(t&&this.engine.doesSheetExist(t))this.switchSheet(this.sheetName);else{const e=this.addSheet(null!=t?t:void 0,YA(QA,this,oP).call(this));YA(QA,this,eP).call(this,e)}}super.updatePlugin(t)}destroy(){UA(JA,this).forEach(t=>{var e;let[n,o]=t;return null===(e=this.engine)||void 0===e?void 0:e.off(n,o)}),$A(JA,this,null),hA(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(t,e){if(I(e)&&(n=e,!(Array.isArray(n)&&n.length&&n.every(t=>Array.isArray(t)))))return Qt("The provided data should be an array of arrays."),!1;var n;if(null!=t&&this.engine.doesSheetExist(t))return Qt("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!=t?t:void 0);return e&&this.engine.setSheetContent(this.engine.getSheetId(n),e),n}catch(t){return Qt(t.message),!1}}switchSheet(t){if(!this.engine.doesSheetExist(t))return void ee(`The sheet named \`${t}\` does not exist, switch aborted.`);YA(QA,this,eP).call(this,t);const e=this.engine.getSheetSerialized(this.sheetId);e.length>0&&this.hot.loadData(e,`${$(GA)}.switchSheet`)}getCellType(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const o=this.hot.toPhysicalRow(t),i=this.hot.toPhysicalColumn(e);return null!==o&&null!==i?this.engine.getCellType({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)}):"EMPTY"}isFormulaCellType(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)})}renderDependentSheets(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;t.forEach(t=>{var e;const o=null==t||null===(e=t.address)||void 0===e?void 0:e.sheet;void 0!==o&&(n.has(o)||n.add(o))}),lA(this.engine).forEach((t,o)=>{var i;(e||o!==this.sheetId)&&n.has(o)&&(t.render(),null===(i=t.view)||void 0===i||i.adjustElementsSize())})}validateDependentCells(t){const e=t=>{var e;const{row:n,col:o,sheet:i}=null!==(e=null==t?void 0:t.address)&&void 0!==e?e:{};return I(i)?`${i}:${n}x${o}`:""},n=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map(t=>e(t)));t.forEach(t=>{var o,i;const{row:r,col:s}=null!==(o=t.address)&&void 0!==o?o:{};if(!1===I(r)||!1===I(s)||r>=this.hot.countRows()||s>=this.hot.countCols())return;const a=null==t||null===(i=t.address)||void 0===i?void 0:i.sheet,l=e(t);if(void 0!==a&&!n.has(l)){const t=lA(this.engine).get(a);if(!t)return;t.validateCell(t.getDataAtCell(r,s),t.getCellMeta(r,s),()=>{})}})}syncChangeWithEngine(t,e,n){const o={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(o))return void Qt(`Not possible to set cell data at ${JSON.stringify(o)}`);const i=this.hot.getCellMeta(t,e);var r;return dA(n,i.type)&&(uA(n,i.dateFormat)?n=gA(n,i.dateFormat):!1===("string"==typeof(r=n)&&r.startsWith("="))&&(n=`'${n}`)),this.engine.setCellContents(o,n)}}function eP(t){this.sheetName=t,this.sheetId=this.engine.getSheetId(this.sheetName)}function nP(t,e,n){if(Et(n)&&null!==n){const o=this.hot.toVisualRow(t),i=this.hot.toVisualColumn(e);return(n=Wd(n,this.hot.getCellMeta(o,i))).toString()}return n}function oP(t,e,n,o){return this.hot.getSourceDataArray(t,e,n,o).map((t,e)=>t.map((t,n)=>YA(QA,this,nP).call(this,e,n,t)))}function iP(t,e,n){const o=this.hot.propToCol(n);if(this.isFormulaCellType(e,o)){const t={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId},n=this.hot.getCellMeta(e,o);let i=this.engine.getCellValue(t);return"date"===n.type&&so(i)&&(i=pA(i,n.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return t}function rP(t,e,n){const{row:o,col:i}=e.getTopStartCorner(),{row:r,col:s}=e.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:h,col:c}=n.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(o),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId}},u={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(u))return!1;const g=this.engine.getFillRangeData(d,u),{row:f,col:p}=d.start,{row:m,col:b}=d.end,w=m-f+1,v=b-p+1;for(let t=0;t<g.length;t+=1)for(let e=0;e<g[t].length;e+=1){const n=g[t][e],o=f+t%w,i=p+e%v,r=this.hot.getCellMeta(o,i);dA(n,r.type)&&(n.startsWith("'")?g[t][e]=n.slice(1):!1===this.isFormulaCellType(o,i,this.sheetId)&&(g[t][e]=fA(n,r.dateFormat)))}return g}function sP(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes($(GA))||$A(ZA,this,A(this.hot.getSettings().data))}function aP(){if(UA(ZA,this))return void this.switchSheet(this.sheetName);const t=YA(QA,this,oP).call(this);t.forEach((e,n)=>{e.forEach((e,o)=>{const i=this.hot.getCellMeta(n,o,{skipMetaExtension:!0}),r=i.dateFormat;dA(e,i.type)&&(uA(e,r)?t[n][o]=gA(e,r):e.startsWith("=")||(t[n][o]=`'${e}`))})}),$A(XA,this,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),$A(XA,this,!1)}function lP(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.includes($(GA)))return;const o=function(t,e){return!A(e)&&t.doesSheetExist(e)||(e=t.addSheet(e)),e}(this.engine,this.hot.getSettings()[GA].sheetName);if(YA(QA,this,eP).call(this,o),"updateSettings"!==n)if(UA(ZA,this))this.switchSheet(this.sheetName);else{const t=YA(QA,this,oP).call(this);if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,t)){$A(XA,this,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),$A(XA,this,!1)}}}function hP(t,e,n,o){if("get"!==o||UA(XA,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;if(null===t||null===e)return;const i=this.getCellType(t,e);if("VALUE"===i||"EMPTY"===i)return void(n.value=(r=n.value,function(t){return"string"==typeof t&&"'"===t.charAt(0)&&"="===t.charAt(1)}(r)?r.substr(1):r));var r;const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};let a=this.engine.getCellValue(s);const l=this.hot.getCellMeta(t,e,{skipMetaExtension:!0});"date"===l.type&&so(a)&&(a=pA(a,l.dateFormat)),n.value="object"==typeof a&&null!==a?a.value:a}function cP(t,e,n,o){if("get"!==o||UA(XA,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(t),r=this.hot.propToCol(e);if(null===i||null===r)return;const s=this.getCellType(i,r);if("VALUE"===s||"EMPTY"===s)return;const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function dP(t,e){if(qA(e)||0===t.length)return;const n=[],o=[],i=this.engine.batch(()=>{t.forEach(t=>{let[e,i,,r]=t;const s=this.hot.propToCol(i),a=this.hot.toPhysicalRow(e),l=this.hot.toPhysicalColumn(s),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};r=YA(QA,this,nP).call(this,a,l,r),null!==a&&null!==l?this.syncChangeWithEngine(e,s,r):n.push([e,s,r]),o.push({address:h})})});n.length&&this.hot.addHookOnce("afterChange",()=>{const t=this.engine.batch(()=>{n.forEach(t=>{let[e,n,o]=t;this.syncChangeWithEngine(e,n,o)})});this.renderDependentSheets(t,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,o)}function uP(t,e){if(qA(e))return;const n=[],o=[];t.forEach(t=>{let[e,i,,r]=t;const s=this.hot.propToCol(i);if(!so(s))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(o.push({address:a}),n.push(...this.engine.setCellContents(a,r))):Qt(`Not possible to set source cell data at ${JSON.stringify(a)}`)}),this.renderDependentSheets(n),this.validateDependentCells(n,o)}function gP(t,e){let n=this.rowAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countRows()&&(n=t),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[n,e]))return!1}function fP(t,e){let n=this.columnAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countCols()&&(n=t),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[n,e]))return!1}function pP(t,e,n){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(n).every(t=>this.engine.isItPossibleToRemoveRows(this.sheetId,[t,1]))&&void 0}function mP(t,e,n){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(n).every(t=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[t,1]))&&void 0}function bP(t,e,n){if(qA(n))return;const o=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(o)}function wP(t,e,n){if(qA(n))return;const o=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(o)}function vP(t,e,n,o){if(qA(o))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((t,e)=>e-t),r=this.engine.batch(()=>{i.forEach(t=>{this.engine.removeRows(this.sheetId,[t,1])})});this.renderDependentSheets(r)}function yP(t,e,n,o){if(qA(o))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((t,e)=>e-t),r=this.engine.batch(()=>{i.forEach(t=>{this.engine.removeColumns(this.sheetId,[t,1])})});this.renderDependentSheets(r)}function CP(t,e,n){var o;$A(XA,this,!0);const i=YA(QA,this,oP).call(this,n,0,n+((null===(o=e.__children)||void 0===o?void 0:o.length)||0),this.hot.countSourceCols());$A(XA,this,!1),i.forEach((t,e)=>{t.forEach((t,o)=>{this.engine.setCellContents({col:o,row:n+e,sheet:this.sheetId},[[t]])})})}function SP(t){this.hot.runHooks("afterFormulasValuesUpdate",t)}function RP(t,e){this.hot.runHooks("afterNamedExpressionAdded",t,e)}function kP(t,e){this.hot.runHooks("afterNamedExpressionRemoved",t,e)}function xP(t){this.hot.runHooks("afterSheetAdded",t)}function EP(t,e){YA(QA,this,eP).call(this,e),this.hot.runHooks("afterSheetRenamed",t,e)}function MP(t,e){this.hot.runHooks("afterSheetRemoved",t,e)}function TP(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _P(t,e){return t.get(IP(t,e))}function HP(t,e,n){return t.set(IP(t,e),n),n}function IP(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeHideColumns"),Mn.getSingleton().register("afterHideColumns"),Mn.getSingleton().register("beforeUnhideColumns"),Mn.getSingleton().register("afterUnhideColumns");const AP="hiddenColumns";var PP=new WeakMap,OP=new WeakSet;class NP extends DC{constructor(){var t,e;super(...arguments),TP(t=this,e=OP),e.add(t),function(t,e,n){TP(t,e),e.set(t,n)}(this,PP,null)}static get PLUGIN_KEY(){return AP}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[AP]}enablePlugin(){var t=this;this.enabled||(HP(PP,this,new Wa),_P(PP,this).addLocalHook("init",()=>IP(OP,this,WP).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,_P(PP,this)),this.addHook("afterContextMenuDefaultOptions",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return IP(OP,t,FP).call(t,...n)}),this.addHook("afterGetCellMeta",(t,e,n)=>IP(OP,this,LP).call(this,t,e,n)),this.addHook("modifyColWidth",(t,e)=>IP(OP,this,DP).call(this,t,e),2),this.addHook("afterGetColHeader",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return IP(OP,t,BP).call(t,...n)}),this.addHook("modifyCopyableRange",t=>IP(OP,this,VP).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showColumns(t){const e=this.getHiddenColumns(),n=this.isValidConfig(t);let o=e;const i=_P(PP,this).getValues().slice(),r=t.length>0;if(n&&r){x(t.map(t=>this.hot.toPhysicalColumn(t)),t=>{i[t]=!1}),o=S(i,(t,e,n)=>(e&&t.push(this.hot.toVisualColumn(n)),t),[])}!1!==this.hot.runHooks("beforeUnhideColumns",e,o,n&&r)&&(n&&r&&_P(PP,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",e,o,n&&r,n&&o.length<e.length))}showColumn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.showColumns(e)}hideColumns(t){const e=this.getHiddenColumns(),n=this.isValidConfig(t);let o=e;n&&(o=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeHideColumns",e,o,n)&&(n&&this.hot.batchExecution(()=>{x(t,t=>{_P(PP,this).setValueAtIndex(this.hot.toPhysicalColumn(t),!0)})},!0),this.hot.runHooks("afterHideColumns",e,o,n,n&&o.length>e.length))}hideColumn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.hideColumns(e)}getHiddenColumns(){return k(_P(PP,this).getHiddenIndexes(),t=>this.hot.toVisualColumn(t))}isHidden(t){return _P(PP,this).getValueAtIndex(this.hot.toPhysicalColumn(t))||!1}isValidConfig(t){const e=this.hot.countCols();return!!(Array.isArray(t)&&t.length>0)&&t.every(t=>Number.isInteger(t)&&t>=0&&t<e)}resetCellsMeta(){x(this.hot.getCellsMeta(),t=>{t.skipColumnOnPaste=!1})}destroy(){HP(PP,this,null),super.destroy()}}function DP(t,e){return this.isHidden(e)?0:this.getSetting("indicators")&&(this.isHidden(e+1)||this.isHidden(e-1))&&"number"==typeof t&&this.hot.hasColHeaders()?t+15:void 0}function LP(t,e,n){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(e)&&(n.skipColumnOnPaste=!0),this.isHidden(e-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");else if(n.className){const t=n.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenColumn");e>-1&&t.splice(e,1),n.className=t.join(" ")}}}function VP(t){if(this.getSetting("copyPasteEnabled"))return t;const e=[],n=(t,n,o,i)=>{e.push({startRow:t,endRow:n,startCol:o,endCol:i})};return x(t,t=>{let e=!0,o=0;ao(t.startCol,t.endCol,i=>{this.isHidden(i)?(e||n(t.startRow,t.endRow,o,i-1),e=!0):(e&&(o=i),i===t.endCol&&n(t.startRow,t.endRow,o,i),e=!1)})}),e}function BP(t,e){if(!this.getSetting("indicators")||t<0)return;const n=[];t>=1&&this.isHidden(t-1)&&n.push("afterHiddenColumn"),t<this.hot.countCols()-1&&this.isHidden(t+1)&&n.push("beforeHiddenColumn"),ue(e,n)}function FP(t){var e;t.items.push({name:Zk},(e=this,{key:"hidden_columns_hide",name(){const t=this.getSelectedActive();let e=0;if(Array.isArray(t)){const[,n,,o]=t;n-o!==0&&(e=1)}return this.getTranslatedPhrase(ph,e)},callback(){const{from:t,to:n}=this.getSelectedRangeActive(),o=Math.max(Math.min(t.col,n.col),0),i=Math.max(t.col,n.col),r=[];for(let t=o;t<=i;t+=1)r.push(t);e.hideColumns(r);const s=r[r.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.view.adjustElementsSize(),this.render()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}),function(t){const e=[];return{key:"hidden_columns_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(mh,t)},callback(){var n,o;if(0===e.length)return;let i=e[0],r=e[e.length-1];i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,r=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==o?o:this.countCols()-1,t.showColumns(e),this.view.adjustElementsSize(),this.render(),r-i+1===this.countCols()||this.selectColumns(i,r)},disabled:!1,hidden(){const n=k(t.getHiddenColumns(),t=>this.toPhysicalColumn(t));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;e.length=0;const o=this.getSelectedRangeActive(),i=o.getTopStartCorner().col,r=o.getBottomEndCorner().col,s=this.columnIndexMapper,a=s.getRenderableFromVisualIndex(i),l=s.getRenderableFromVisualIndex(r),h=s.getNotTrimmedIndexes(),c=[];if(i!==r){if(r-i+1>l-a+1){const t=h.slice(i,r+1);c.push(...t.filter(t=>n.includes(t)))}}else if(0===a&&a<i)c.push(...h.slice(0,i));else if(null===a)c.push(...h.slice(0,this.countCols()));else{const t=this.countCols()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(t,-1))&&t>r&&c.push(...h.slice(r+1))}return x(c,t=>{e.push(this.toVisualColumn(t))}),0===e.length}}}(this))}function WP(){const t=this.getSetting("columns");Array.isArray(t)&&this.hideColumns(t)}function zP(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jP(t,e){return t.get(UP(t,e))}function $P(t,e,n){return t.set(UP(t,e),n),n}function UP(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeHideRows"),Mn.getSingleton().register("afterHideRows"),Mn.getSingleton().register("beforeUnhideRows"),Mn.getSingleton().register("afterUnhideRows");const YP="hiddenRows";var GP=new WeakMap,KP=new WeakSet;class qP extends DC{constructor(){var t,e;super(...arguments),zP(t=this,e=KP),e.add(t),function(t,e,n){zP(t,e),e.set(t,n)}(this,GP,null)}static get PLUGIN_KEY(){return YP}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[YP]}enablePlugin(){var t=this;this.enabled||($P(GP,this,new Wa),jP(GP,this).addLocalHook("init",()=>UP(KP,this,eO).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,jP(GP,this)),this.addHook("afterContextMenuDefaultOptions",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return UP(KP,t,tO).call(t,...n)}),this.addHook("afterGetCellMeta",(t,e,n)=>UP(KP,this,ZP).call(this,t,e,n)),this.addHook("modifyRowHeight",(t,e)=>UP(KP,this,XP).call(this,t,e)),this.addHook("afterGetRowHeader",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return UP(KP,t,QP).call(t,...n)}),this.addHook("modifyCopyableRange",t=>UP(KP,this,JP).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showRows(t){const e=this.getHiddenRows(),n=this.isValidConfig(t);let o=e;const i=jP(GP,this).getValues().slice(),r=t.length>0;if(n&&r){x(t.map(t=>this.hot.toPhysicalRow(t)),t=>{i[t]=!1}),o=S(i,(t,e,n)=>(e&&t.push(this.hot.toVisualRow(n)),t),[])}!1!==this.hot.runHooks("beforeUnhideRows",e,o,n&&r)&&(n&&r&&jP(GP,this).setValues(i),this.hot.runHooks("afterUnhideRows",e,o,n&&r,n&&o.length<e.length))}showRow(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.showRows(e)}hideRows(t){const e=this.getHiddenRows(),n=this.isValidConfig(t);let o=e;n&&(o=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeHideRows",e,o,n)&&(n&&this.hot.batchExecution(()=>{x(t,t=>{jP(GP,this).setValueAtIndex(this.hot.toPhysicalRow(t),!0)})},!0),this.hot.runHooks("afterHideRows",e,o,n,n&&o.length>e.length))}hideRow(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.hideRows(e)}getHiddenRows(){return k(jP(GP,this).getHiddenIndexes(),t=>this.hot.toVisualRow(t))}isHidden(t){return jP(GP,this).getValueAtIndex(this.hot.toPhysicalRow(t))||!1}isValidConfig(t){const e=this.hot.countRows();return!!(Array.isArray(t)&&t.length>0)&&t.every(t=>Number.isInteger(t)&&t>=0&&t<e)}resetCellsMeta(){x(this.hot.getCellsMeta(),t=>{t.skipRowOnPaste=!1})}destroy(){$P(GP,this,null),super.destroy()}}function XP(t,e){return this.isHidden(e)?0:t}function ZP(t,e,n){if(!1===this.getSetting("copyPasteEnabled")&&this.isHidden(t)&&(n.skipRowOnPaste=!0),this.isHidden(t-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");else if(n.className){const t=n.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenRow");e>-1&&t.splice(e,1),n.className=t.join(" ")}}}function JP(t){if(this.getSetting("copyPasteEnabled"))return t;const e=[],n=(t,n,o,i)=>{e.push({startRow:t,endRow:n,startCol:o,endCol:i})};return x(t,t=>{let e=!0,o=0;ao(t.startRow,t.endRow,i=>{this.isHidden(i)?(e||n(o,i-1,t.startCol,t.endCol),e=!0):(e&&(o=i),i===t.endRow&&n(o,i,t.startCol,t.endCol),e=!1)})}),e}function QP(t,e){if(!this.getSetting("indicators")||t<0)return;const n=[];t>=1&&this.isHidden(t-1)&&n.push("afterHiddenRow"),t<this.hot.countRows()-1&&this.isHidden(t+1)&&n.push("beforeHiddenRow"),ue(e,n)}function tO(t){var e;t.items.push({name:Zk},(e=this,{key:"hidden_rows_hide",name(){const t=this.getSelectedActive();let e=0;if(Array.isArray(t)){const[n,,o]=t;n-o!==0&&(e=1)}return this.getTranslatedPhrase(bh,e)},callback(){const{from:t,to:n}=this.getSelectedRangeActive(),o=Math.max(Math.min(t.row,n.row),0),i=Math.max(t.row,n.row),r=[];for(let t=o;t<=i;t+=1)r.push(t);e.hideRows(r);const s=r[r.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(s,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.view.adjustElementsSize(),this.render()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}),function(t){const e=[];return{key:"hidden_rows_show",name(){const t=e.length>1?1:0;return this.getTranslatedPhrase(wh,t)},callback(){var n,o;if(0===e.length)return;let i=e[0],r=e[e.length-1];i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,r=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==o?o:this.countRows()-1,t.showRows(e),this.view.adjustElementsSize(),this.render(),r-i+1===this.countRows()||this.selectRows(i,r)},disabled:!1,hidden(){const n=k(t.getHiddenRows(),t=>this.toPhysicalRow(t));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;e.length=0;const o=this.getSelectedRangeActive(),i=o.getTopStartCorner().row,r=o.getBottomEndCorner().row,s=this.rowIndexMapper,a=s.getRenderableFromVisualIndex(i),l=s.getRenderableFromVisualIndex(r),h=s.getNotTrimmedIndexes(),c=[];if(i!==r){if(r-i+1>l-a+1){const t=h.slice(i,r+1);c.push(...t.filter(t=>n.includes(t)))}}else if(0===a&&a<i)c.push(...h.slice(0,i));else if(null===a)c.push(...h.slice(0,this.countRows()));else{const t=this.countRows()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(t,-1))&&t>r&&c.push(...h.slice(r+1))}return x(c,t=>{e.push(this.toVisualRow(t))}),0===e.length}}}(this))}function eO(){const t=this.getSetting("rows");Array.isArray(t)&&this.hideRows(t)}function nO(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oO(t,e){return t.get(rO(t,e))}function iO(t,e,n){return t.set(rO(t,e),n),n}function rO(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeColumnFreeze"),Mn.getSingleton().register("afterColumnFreeze"),Mn.getSingleton().register("beforeColumnUnfreeze"),Mn.getSingleton().register("afterColumnUnfreeze");const sO="manualColumnFreeze";var aO=new WeakMap,lO=new WeakSet;class hO extends DC{constructor(){var t,e;super(...arguments),nO(t=this,e=lO),e.add(t),function(t,e,n){nO(t,e),e.set(t,n)}(this,aO,!1)}static get PLUGIN_KEY(){return sO}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[sO]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>rO(lO,this,cO).call(this,t)),this.addHook("beforeColumnMove",(t,e)=>rO(lO,this,dO).call(this,t,e)),super.enablePlugin())}disablePlugin(){iO(aO,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(t){const e=this.hot.getSettings(),n=e.fixedColumnsStart<this.hot.countCols()&&t>e.fixedColumnsStart-1;oO(aO,this)||iO(aO,this,!0);!1!==this.hot.runHooks("beforeColumnFreeze",t,n)&&(n&&(this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart),e._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",t,n))}unfreezeColumn(t){const e=this.hot.getSettings(),n=e.fixedColumnsStart>0&&t<=e.fixedColumnsStart-1;oO(aO,this)||iO(aO,this,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",t,n)&&(n&&(e._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",t,n))}}function cO(t){var e;t.items.push({name:"---------"},(e=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(Ul)},callback(t,n){const[{start:{col:o}}]=n;e.freezeColumn(o),this.view.adjustElementsSize(),this.render()},hidden(){const t=this.getSelectedRange();let e=!1;return(void 0===t||t.length>1||t[0].from.col!==t[0].to.col||t[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(e=!0),e}}),function(t){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(Yl)},callback(e,n){const[{start:{col:o}}]=n;t.unfreezeColumn(o),this.view.adjustElementsSize(),this.render()},hidden(){const t=this.getSelectedRange();let e=!1;return(void 0===t||t.length>1||t[0].from.col!==t[0].to.col||t[0].from.col>=this.getSettings().fixedColumnsStart)&&(e=!0),e}}}(this))}function dO(t,e){if(oO(aO,this)){const n=this.hot.getSettings().fixedColumnsStart;if(e<n)return!1;if(t.some(t=>t<n))return!1}}function uO(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const gO="px";let fO=class{constructor(t){uO(this,"hot",void 0),uO(this,"_element",null),uO(this,"state",0),uO(this,"inlineProperty",void 0),this.hot=t,this.inlineProperty=t.isRtl()?"right":"left"}appendTo(t){t.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(t,e){so(t)&&(this._element.style.top=t+gO),so(e)&&(this._element.style[this.inlineProperty]=e+gO)}getPosition(){const t=this._element.style;return{top:t.top?parseInt(t.top,10):0,start:t[this.inlineProperty]?parseInt(t[this.inlineProperty],10):0}}setSize(t,e){so(t)&&(this._element.style.width=t+gO),so(e)&&(this._element.style.height=e+gO)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(t,e){so(t)&&(this._element.style.marginTop=t+gO),so(e)&&(this._element.style[`margin${$(this.inlineProperty)}`]=e+gO)}getOffset(){const t=this._element.style,e=`margin${$(this.inlineProperty)}`;return{top:t.marginTop?parseInt(t.marginTop,10):0,start:t[e]?parseInt(t[e],10):0}}};let pO=class extends fO{build(){super.build(),ue(this._element,"ht__manualColumnMove--backlight")}};let mO=class extends fO{build(){super.build(),ue(this._element,"ht__manualColumnMove--guideline")}};function bO(t,e,n){wO(t,e),e.set(t,n)}function wO(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vO(t,e,n){return t.set(CO(t,e),n),n}function yO(t,e){return t.get(CO(t,e))}function CO(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeColumnMove"),Mn.getSingleton().register("afterColumnMove");const SO="manualColumnMove",RO="ht__manualColumnMove",kO="show-ui",xO="on-moving--columns",EO="after-selection--columns";var MO=new WeakMap,TO=new WeakMap,_O=new WeakMap,HO=new WeakMap,IO=new WeakMap,AO=new WeakMap,PO=new WeakMap,OO=new WeakMap,NO=new WeakMap,DO=new WeakMap,LO=new WeakMap,VO=new WeakSet;class BO extends DC{constructor(){var t,e;super(...arguments),wO(t=this,e=VO),e.add(t),bO(this,MO,new pO(this.hot)),bO(this,TO,new mO(this.hot)),bO(this,_O,[]),bO(this,HO,0),bO(this,IO,!1),bO(this,AO,{}),bO(this,PO,void 0),bO(this,OO,void 0),bO(this,NO,void 0),bO(this,DO,void 0),bO(this,LO,void 0)}static get PLUGIN_KEY(){return SO}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[SO]}enablePlugin(){var t=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return CO(VO,t,FO).call(t,...n)}),this.addHook("beforeOnCellMouseOver",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return CO(VO,t,zO).call(t,...n)}),this.addHook("afterScrollVertically",()=>CO(VO,this,$O).call(this)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return CO(VO,t,UO).call(t,...n)}),this.buildPluginUI(),this.registerEvents(),ue(this.hot.rootElement,RO),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){ge(this.hot.rootElement,RO),this.unregisterEvents(),yO(MO,this).destroy(),yO(TO,this).destroy(),super.disablePlugin()}moveColumn(t,e){return this.moveColumns([t],e)}moveColumns(t,e){const n=yO(PO,this),o=this.isMovePossible(t,e),i=this.hot.runHooks("beforeColumnMove",t,e,n,o);if(vO(PO,this,void 0),!1===i)return;o&&this.hot.columnIndexMapper.moveIndexes(t,e);const r=o&&this.isColumnOrderChanged(t,e);return this.hot.runHooks("afterColumnMove",t,e,n,o,r),r}dragColumn(t,e){return this.dragColumns([t],e)}dragColumns(t,e){const n=this.countFinalIndex(t,e);return vO(PO,this,e),this.moveColumns(t,n)}isMovePossible(t,e){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),o=t.length+e>n,i=e<0,r=t.some(t=>t<0),s=t.some(t=>t>=n);return!(o||i||r||s)}isColumnOrderChanged(t,e){return t.some((t,n)=>t-n!==e)}countFinalIndex(t,e){const n=S(t,(t,n)=>(n<e&&(t+=1),t),0);return e-n}getColumnsWidth(t,e){const n=this.hot.columnIndexMapper;let o=0;for(let i=t;i<=e;i+=1){const t=n.getRenderableFromVisualIndex(i);i<0?o+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==t&&(o+=this.hot.view._wt.wtTable.getColumnWidth(t)||0)}return o}moveBySettingsOrLoad(){const t=this.hot.getSettings()[SO];Array.isArray(t)&&this.moveColumns(t,0)}isFixedColumnsStart(t){return t<this.hot.getSettings().fixedColumnsStart}prepareColumnsToMoving(t,e){const n=[];return ao(t,e,t=>{n.push(t)}),n}refreshPositions(){const t=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(yO(OO,this))&&t>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1)});const e=this.hot.view._wt.wtTable,n=this.hot.view._wt.wtOverlays.scrollableElement,o="number"==typeof n.scrollX?n.scrollX:n.scrollLeft;let i=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,yO(OO,this)-1);const r=e.hider.offsetWidth,s=e.TBODY.offsetLeft,a=yO(MO,this).getOffset().start,l=yO(MO,this).getSize().width;let h=0,c=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,e=Ae(this.hot.rootElement),i=t.innerWidth-yO(NO,this)-e;c=t.innerWidth-yO(AO,this).eventPageX-i-(void 0===n.scrollX?o:0)}else c=yO(AO,this).eventPageX-(yO(NO,this)-(void 0===n.scrollX?o:0));if(yO(DO,this)&&(h=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(yO(OO,this))&&(i+=o),i+=h,yO(OO,this)<0)yO(LO,this)>0?yO(AO,this).col=0:yO(AO,this).col=t>0?t-1:t;else if(yO(AO,this).TD.offsetWidth/2+i<=c){const t=yO(OO,this)>=yO(HO,this)?yO(HO,this)-1:yO(OO,this);yO(AO,this).col=t+1,i+=yO(AO,this).TD.offsetWidth}else yO(AO,this).col=yO(OO,this);let d=c,u=i;c+l+a>=r?d=r-l-a:c+a<s+h&&(d=s+h+Math.abs(a)),i>=r-1?u=r-1:0===u?u=1:void 0!==n.scrollX&&yO(OO,this)<yO(LO,this)&&(u-=yO(NO,this)<=n.scrollX?yO(NO,this):0),yO(MO,this).setPosition(null,d),yO(TO,this).setPosition(null,u)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>CO(VO,this,WO).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>CO(VO,this,jO).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){yO(MO,this).build(),yO(TO,this).build()}destroy(){yO(MO,this).destroy(),yO(TO,this).destroy(),super.destroy()}}function FO(t,e,n,o){const i=this.hot.view._wt.wtTable,r=this.hot.selection.isSelectedByColumnHeader(),s=this.hot.getSelectedRangeActive(),a=de(t.target,"sortAction");if(!s||!r||yO(IO,this)||0!==t.button||a)return vO(IO,this,!1),yO(_O,this).length=0,void ge(this.hot.rootElement,[xO,kO]);const l=yO(TO,this).isBuilt()&&!yO(TO,this).isAppended(),h=yO(MO,this).isBuilt()&&!yO(MO,this).isAppended();l&&h&&(yO(TO,this).appendTo(i.hider),yO(MO,this).appendTo(i.hider));const{from:c,to:d}=s,u=Math.min(c.col,d.col),g=Math.max(c.col,d.col);if(e.row<0&&e.col>=u&&e.col<=g){o.column=!0,vO(IO,this,!0);const r=n.firstChild?function(t,e){const n={x:t.offsetX,y:t.offsetY};let o=t.target;if(!Xe(e)||o!==e&&o.contains(e))return n;for(;o!==e;)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;return n}(t,n.firstChild).x:t.offsetX;yO(AO,this).eventPageX=t.pageX,vO(OO,this,e.col),yO(AO,this).TD=n,yO(AO,this).col=e.col,vO(_O,this,this.prepareColumnsToMoving(u,g)),vO(DO,this,!!this.hot.getSettings().rowHeaders),vO(HO,this,this.hot.countCols()),vO(LO,this,this.hot.getSettings().fixedColumnsStart),vO(NO,this,ke(this.hot.rootElement).left);const s=yO(DO,this)?-1:0,a=i.holder.scrollTop+i.getColumnHeaderHeight(0)+1,l=e.col<yO(LO,this),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),c=Math.abs(r-(this.hot.isRtl()?n.offsetWidth:0)),d=this.getColumnsWidth(u,e.col-1)+c,f=this.getColumnsWidth(s,u-1)+(l?h:0)+d;yO(MO,this).setPosition(a,f),yO(MO,this).setSize(this.getColumnsWidth(u,g),i.hider.offsetHeight-a),yO(MO,this).setOffset(null,-d),ue(this.hot.rootElement,xO)}else ge(this.hot.rootElement,EO),vO(IO,this,!1),yO(_O,this).length=0}function WO(t){yO(IO,this)&&(yO(AO,this).eventPageX=t.pageX,this.refreshPositions())}function zO(t,e,n,o){this.hot.getSelectedRangeActive()&&yO(IO,this)&&(yO(_O,this).indexOf(e.col)>-1?ge(this.hot.rootElement,kO):ue(this.hot.rootElement,kO),o.row=!0,o.column=!0,o.cell=!0,vO(OO,this,e.col),yO(AO,this).TD=n)}function jO(){const t=yO(AO,this).col,e=yO(_O,this).length;if(vO(OO,this,void 0),vO(IO,this,!1),ge(this.hot.rootElement,[xO,kO,EO]),this.hot.selection.isSelectedByColumnHeader()&&ue(this.hot.rootElement,EO),e<1||void 0===t)return;const n=yO(_O,this)[0],o=this.hot.toPhysicalColumn(n),i=this.dragColumns(yO(_O,this),t);if(yO(_O,this).length=0,!0===i){this.hot.view.adjustElementsSize(),this.hot.render();const t=this.hot.toVisualColumn(o),n=t+e-1;this.hot.selectColumns(t,n)}}function $O(){const t=this.hot.view._wt.wtTable,e=t.getColumnHeaderHeight(0)+1+t.holder.scrollTop;yO(MO,this).setPosition(e),yO(MO,this).setSize(null,t.hider.offsetHeight-e)}function UO(){this.moveBySettingsOrLoad()}function YO(t,e,n){GO(t,e),e.set(t,n)}function GO(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KO(t,e,n){return t.set(XO(t,e),n),n}function qO(t,e){return t.get(XO(t,e))}function XO(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const ZO="manualColumnResize";var JO=new WeakMap,QO=new WeakMap,tN=new WeakMap,eN=new WeakMap,nN=new WeakMap,oN=new WeakMap,iN=new WeakMap,rN=new WeakMap,sN=new WeakMap,aN=new WeakMap,lN=new WeakMap,hN=new WeakMap,cN=new WeakMap,dN=new WeakMap,uN=new WeakMap,gN=new WeakMap,fN=new WeakSet;class pN extends DC{static get PLUGIN_KEY(){return ZO}static get PLUGIN_PRIORITY(){return 130}constructor(t){var e,n;super(t),GO(e=this,n=fN),n.add(e),YO(this,JO,null),YO(this,QO,null),YO(this,tN,[]),YO(this,eN,null),YO(this,nN,null),YO(this,oN,null),YO(this,iN,null),YO(this,rN,null),YO(this,sN,this.hot.rootDocument.createElement("DIV")),YO(this,aN,this.hot.rootDocument.createElement("DIV")),YO(this,lN,null),YO(this,hN,!1),YO(this,cN,0),YO(this,dN,null),YO(this,uN,void 0),YO(this,gN,void 0),ue(qO(sN,this),"manualColumnResizer"),ue(qO(aN,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[ZO]}enablePlugin(){var t=this;this.enabled||(KO(uN,this,new Fa),qO(uN,this).addLocalHook("init",()=>XO(fN,this,mN).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,qO(uN,this)),this.addHook("modifyColWidth",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return XO(fN,t,SN).call(t,...n)},1),this.addHook("beforeStretchingColumnWidth",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return XO(fN,t,RN).call(t,...n)},1),this.addHook("beforeColumnResize",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return XO(fN,t,kN).call(t,...n)}),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){KO(gN,this,qO(uN,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}setManualSize(t,e){const n=Math.max(e,20),o=this.hot.toPhysicalColumn(t);return qO(uN,this).setValueAtIndex(o,n),n}clearManualSize(t){const e=this.hot.toPhysicalColumn(t);qO(uN,this).setValueAtIndex(e,null)}setupHandlePosition(t){if(!t.parentNode||qO(cN,this)>1)return;KO(JO,this,t);const{_wt:e}=this.hot.view,n=e.wtTable.getCoords(qO(JO,this)),o=n.col;if(o<0)return;const i=Pe(qO(JO,this)),r=qO(JO,this).getBoundingClientRect();let s;o<e.getSetting("fixedColumnsStart")&&(s=e.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(qO(JO,this),n.row,n.col)),s||(s=e.wtOverlays.topOverlay.getRelativeCellPosition(qO(JO,this),n.row,n.col)),KO(QO,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(o)),KO(tN,this,[]);const a=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&a){x(this.hot.getSelectedRange(),t=>{ao(t.getTopStartCorner().col,t.getBottomEndCorner().col,t=>{qO(tN,this).includes(t)||qO(tN,this).push(t)})})}qO(tN,this).includes(qO(QO,this))||KO(tN,this,[qO(QO,this)]),KO(rN,this,s.start-6),KO(iN,this,parseInt(r.width,10)),qO(sN,this).style.top=`${s.top}px`,qO(sN,this).style[this.inlineDir]=`${qO(rN,this)+qO(iN,this)}px`,qO(sN,this).style.height=`${i}px`,this.hot.rootElement.appendChild(qO(sN,this))}refreshHandlePosition(){qO(sN,this).style[this.inlineDir]=`${qO(rN,this)+qO(eN,this)}px`}setupGuidePosition(){const t=parseInt(Pe(qO(sN,this)),10),e=parseInt(qO(sN,this).style.top,10)+t,n=this.hot.view.getTableHeight();ue(qO(sN,this),"active"),ue(qO(aN,this),"active"),qO(aN,this).style.top=`${e}px`,this.refreshGuidePosition(),qO(aN,this).style.height=n-t+"px",this.hot.rootElement.appendChild(qO(aN,this))}refreshGuidePosition(){qO(aN,this).style[this.inlineDir]=qO(sN,this).style[this.inlineDir]}hideHandleAndGuide(){ge(qO(sN,this),"active"),ge(qO(aN,this),"active")}checkIfColumnHeader(t){const e=re(t,["THEAD"],this.hot.rootElement),{topOverlay:n,topInlineStartCornerOverlay:o}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.THEAD,o.clone.wtTable.THEAD].includes(e)}getClosestTHParent(t){return"TABLE"!==t.tagName?"TH"===t.tagName?t:this.getClosestTHParent(t.parentNode):null}afterMouseDownTimeout(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,n)=>{const o=this.hot.runHooks("beforeColumnResize",qO(nN,this),e,!0);void 0!==o&&KO(nN,this,o),this.setManualSize(e,qO(nN,this)),this.hot.runHooks("afterColumnResize",qO(nN,this),e,!0),n&&t()};if(qO(cN,this)>=2){qO(tN,this).length>1?(x(qO(tN,this),t=>{e(t)}),t()):x(qO(tN,this),t=>{e(t,!0)})}KO(cN,this,0),KO(dN,this,null)}bindEvents(){const{rootWindow:t,rootElement:e}=this.hot;this.eventManager.addEventListener(e,"mouseover",t=>XO(fN,this,bN).call(this,t)),this.eventManager.addEventListener(e,"mousedown",t=>XO(fN,this,wN).call(this,t)),this.eventManager.addEventListener(t,"mousemove",t=>XO(fN,this,vN).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>XO(fN,this,yN).call(this)),this.eventManager.addEventListener(qO(sN,this),"contextmenu",()=>XO(fN,this,CN).call(this))}destroy(){super.destroy()}}function mN(){const t=this.hot.getSettings()[ZO];Array.isArray(t)?(this.hot.batchExecution(()=>{t.forEach((t,e)=>{qO(uN,this).setValueAtIndex(e,t)})},!0),KO(gN,this,t)):!0===t&&Array.isArray(qO(gN,this))&&this.hot.batchExecution(()=>{qO(gN,this).forEach((t,e)=>{qO(uN,this).setValueAtIndex(e,t)})},!0)}function bN(t){if(!Ge(t.target)&&!0!==qO(hN,this)&&this.checkIfColumnHeader(t.target)){const e=this.getClosestTHParent(t.target);if(!e)return;const n=e.getAttribute("colspan");!e||null!==n&&"1"!==n||qO(lN,this)||this.setupHandlePosition(e)}}function wN(t){t.target.parentNode===this.hot.rootElement&&de(t.target,"manualColumnResizer")&&(this.setupHandlePosition(qO(JO,this)),this.setupGuidePosition(),KO(lN,this,!0),null===qO(dN,this)&&(KO(dN,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(qO(dN,this))),KO(cN,this,qO(cN,this)+1),this.startX=t.pageX,KO(nN,this,qO(iN,this)))}function vN(t){if(qO(lN,this)){const e=(t.pageX-this.startX)*this.hot.getDirectionFactor();KO(eN,this,qO(iN,this)+e),x(qO(tN,this),t=>{KO(nN,this,this.setManualSize(t,qO(eN,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function yN(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,n)=>{this.hot.runHooks("beforeColumnResize",qO(nN,this),e,!1),n&&t(),this.hot.runHooks("afterColumnResize",qO(nN,this),e,!1)};if(qO(lN,this)){if(this.hideHandleAndGuide(),KO(lN,this,!1),qO(nN,this)!==qO(iN,this)){qO(tN,this).length>1?(x(qO(tN,this),t=>{e(t)}),t()):x(qO(tN,this),t=>{e(t,!0)})}this.setupHandlePosition(qO(JO,this))}}function CN(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(qO(sN,this)),this.hot.rootElement.removeChild(qO(aN,this)),KO(lN,this,!1),KO(hN,this,!0),this.hot._registerMicrotask(()=>{KO(hN,this,!1)})}function SN(t,e){let n=t;if(this.enabled){const t=this.hot.toPhysicalColumn(e),o=qO(uN,this).getValueAtIndex(t);this.hot.getSettings()[ZO]&&o&&(n=o)}return n}function RN(t,e){const n=qO(uN,this).getValueAtIndex(this.hot.toPhysicalColumn(e));return"number"==typeof n?n:t}function kN(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function xN(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const EN="px";let MN=class{constructor(t){xN(this,"hot",void 0),xN(this,"_element",null),xN(this,"state",0),this.hot=t}appendTo(t){t.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(t,e){void 0!==t&&(this._element.style.top=t+EN),void 0!==e&&(this._element.style.left=e+EN)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(t,e){t&&(this._element.style.width=t+EN),e&&(this._element.style.height=e+EN)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(t,e){t&&(this._element.style.marginTop=t+EN),e&&(this._element.style.marginLeft=e+EN)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}};class TN extends MN{build(){super.build(),ue(this._element,"ht__manualRowMove--backlight")}}class _N extends MN{build(){super.build(),ue(this._element,"ht__manualRowMove--guideline")}}function HN(t,e,n){IN(t,e),e.set(t,n)}function IN(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function AN(t,e,n){return t.set(ON(t,e),n),n}function PN(t,e){return t.get(ON(t,e))}function ON(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeRowMove"),Mn.getSingleton().register("afterRowMove");const NN="manualRowMove",DN="ht__manualRowMove",LN="show-ui",VN="on-moving--rows",BN="after-selection--rows";var FN=new WeakMap,WN=new WeakMap,zN=new WeakMap,jN=new WeakMap,$N=new WeakMap,UN=new WeakMap,YN=new WeakSet;class GN extends DC{constructor(){var t,e;super(...arguments),IN(t=this,e=YN),e.add(t),HN(this,FN,new TN(this.hot)),HN(this,WN,new _N(this.hot)),HN(this,zN,[]),HN(this,jN,void 0),HN(this,$N,{}),HN(this,UN,void 0)}static get PLUGIN_KEY(){return NN}static get PLUGIN_PRIORITY(){return 140}isEnabled(){return!!this.hot.getSettings()[NN]}enablePlugin(){var t=this;this.enabled||(this.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ON(YN,t,KN).call(t,...n)}),this.addHook("beforeOnCellMouseOver",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ON(YN,t,XN).call(t,...n)}),this.addHook("afterScrollHorizontally",()=>ON(YN,this,JN).call(this)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return ON(YN,t,QN).call(t,...n)}),this.buildPluginUI(),this.registerEvents(),ue(this.hot.rootElement,DN),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){ge(this.hot.rootElement,DN),this.unregisterEvents(),PN(FN,this).destroy(),PN(WN,this).destroy(),super.disablePlugin()}moveRow(t,e){return this.moveRows([t],e)}moveRows(t,e){const n=PN(UN,this),o=this.isMovePossible(t,e),i=this.hot.runHooks("beforeRowMove",t,e,n,o);if(AN(UN,this,void 0),!1===i)return;o&&this.hot.rowIndexMapper.moveIndexes(t,e);const r=o&&this.isRowOrderChanged(t,e);return this.hot.runHooks("afterRowMove",t,e,n,o,r),r}dragRow(t,e){return this.dragRows([t],e)}dragRows(t,e){const n=this.countFinalIndex(t,e);return AN(UN,this,e),this.moveRows(t,n)}isMovePossible(t,e){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),o=t.length+e>n,i=e<0,r=t.some(t=>t<0),s=t.some(t=>t>=n);return!(o||i||r||s)}isRowOrderChanged(t,e){return t.some((t,n)=>t-n!==e)}countFinalIndex(t,e){const n=S(t,(t,n)=>(n<e&&(t+=1),t),0);return e-n}getRowsHeight(t,e){const n=this.hot.rowIndexMapper;let o=0;for(let i=t;i<=e;i++){const t=n.getRenderableFromVisualIndex(i);null!==t&&(o+=this.hot.view._wt.wtTable.getRowHeight(t)||this.hot.stylesHandler.getDefaultRowHeight())}return o}moveBySettingsOrLoad(){const t=this.hot.getSettings()[NN];Array.isArray(t)&&this.moveRows(t,0)}isFixedRowTop(t){return t<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(t){return t>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}prepareRowsToMoving(){const t=this.hot.getSelectedRangeActive(),e=[];if(!t)return e;const{from:n,to:o}=t;return ao(Math.min(n.row,o.row),Math.max(n.row,o.row),t=>{e.push(t)}),e}refreshPositions(){const t=PN($N,this).coords,e=this.hot.getFirstFullyVisibleRow(),n=this.hot.getLastFullyVisibleRow(),o=this.hot.countRows();this.isFixedRowTop(t.row)&&e>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(e-1,-1)),this.isFixedRowBottom(t.row)&&n<o&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1),void 0,!0);const i=this.hot.view._wt.wtTable,r=PN($N,this).TD,s=this.hot.rootElement,a=ke(s),l=He(s),h=i.holder.scrollTop,c=this.hot.rootWindow!==l?l.scrollTop:0,d=a.top-c,u=PN($N,this).eventPageY-d+h,g=i.hider.offsetHeight,f=i.TBODY.offsetTop,p=PN(FN,this).getOffset().top,m=PN(FN,this).getSize().height,b=r.offsetHeight/2,w=r.offsetHeight;let v=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const y=u>=v+b;this.isFixedRowTop(t.row)&&(v+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),t.row<0?PN($N,this).row=e>0?e-1:e:y?(PN($N,this).row=t.row+1,v+=0===t.row?w-1:w):PN($N,this).row=t.row;let C=u,S=v;u+m+p>=g?C=g-m-p:u+p<f&&(C=f+Math.abs(p)),v>=g-1&&(S=g-1),PN(FN,this).setPosition(C),PN(WN,this).setPosition(S)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>ON(YN,this,qN).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>ON(YN,this,ZN).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){PN(FN,this).build(),PN(WN,this).build()}destroy(){PN(FN,this).destroy(),PN(WN,this).destroy(),super.destroy()}}function KN(t,e,n,o){const{wtTable:i,wtViewport:r}=this.hot.view._wt,s=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeActive();if(!a||!s||PN(jN,this)||0!==t.button)return AN(jN,this,!1),PN(zN,this).length=0,void ge(this.hot.rootElement,[VN,LN]);const l=PN(WN,this).isBuilt()&&!PN(WN,this).isAppended(),h=PN(FN,this).isBuilt()&&!PN(FN,this).isAppended();l&&h&&(PN(WN,this).appendTo(i.hider),PN(FN,this).appendTo(i.hider));const{from:c,to:d}=a,u=Math.min(c.row,d.row),g=Math.max(c.row,d.row);if(e.col<0&&e.row>=u&&e.row<=g){o.row=!0,AN(jN,this,!0),PN($N,this).eventPageY=t.pageY,PN($N,this).coords=e,PN($N,this).TD=n,AN(zN,this,this.prepareRowsToMoving());const s=i.holder.scrollLeft+r.getRowHeaderWidth(),a=this.getRowsHeight(u,e.row-1)+(t.clientY-n.getBoundingClientRect().top);PN(FN,this).setPosition(null,s),PN(FN,this).setSize(i.hider.offsetWidth-s,this.getRowsHeight(u,g)),PN(FN,this).setOffset(-a,null),ue(this.hot.rootElement,VN),this.refreshPositions()}else ge(this.hot.rootElement,BN),AN(jN,this,!1),PN(zN,this).length=0}function qN(t){PN(jN,this)&&(PN($N,this).eventPageY=t.pageY,this.refreshPositions())}function XN(t,e,n,o){this.hot.getSelectedRangeActive()&&PN(jN,this)&&(PN(zN,this).indexOf(e.row)>-1?ge(this.hot.rootElement,LN):ue(this.hot.rootElement,LN),o.row=!0,o.column=!0,o.cell=!0,PN($N,this).coords=e,PN($N,this).TD=n)}function ZN(){const t=PN($N,this).row,e=PN(zN,this).length;if(AN(jN,this,!1),ge(this.hot.rootElement,[VN,LN,BN]),this.hot.selection.isSelectedByRowHeader()&&ue(this.hot.rootElement,BN),e<1||void 0===t)return;const n=PN(zN,this)[0],o=this.hot.toPhysicalRow(n),i=this.dragRows(PN(zN,this),t);if(PN(zN,this).length=0,!0===i){this.hot.view.adjustElementsSize(),this.hot.render();const t=this.hot.toVisualRow(o),n=t+e-1;this.hot.selectRows(t,n)}}function JN(){const t=this.hot.view._wt.wtTable,e=this.hot.view._wt.wtViewport.getRowHeaderWidth()+t.holder.scrollLeft;PN(FN,this).setPosition(null,e),PN(FN,this).setSize(t.hider.offsetWidth-e)}function QN(){this.moveBySettingsOrLoad()}function tD(t,e,n){eD(t,e),e.set(t,n)}function eD(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nD(t,e,n){return t.set(iD(t,e),n),n}function oD(t,e){return t.get(iD(t,e))}function iD(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const rD="manualRowResize";var sD=new WeakMap,aD=new WeakMap,lD=new WeakMap,hD=new WeakMap,cD=new WeakMap,dD=new WeakMap,uD=new WeakMap,gD=new WeakMap,fD=new WeakMap,pD=new WeakMap,mD=new WeakMap,bD=new WeakMap,wD=new WeakMap,vD=new WeakMap,yD=new WeakMap,CD=new WeakMap,SD=new WeakSet;class RD extends DC{static get PLUGIN_KEY(){return rD}static get PLUGIN_PRIORITY(){return 30}constructor(t){var e,n;super(t),eD(e=this,n=SD),n.add(e),tD(this,sD,null),tD(this,aD,null),tD(this,lD,[]),tD(this,hD,null),tD(this,cD,null),tD(this,dD,null),tD(this,uD,null),tD(this,gD,null),tD(this,fD,this.hot.rootDocument.createElement("DIV")),tD(this,pD,this.hot.rootDocument.createElement("DIV")),tD(this,mD,!1),tD(this,bD,!1),tD(this,wD,0),tD(this,vD,null),tD(this,yD,void 0),tD(this,CD,void 0),ue(oD(fD,this),"manualRowResizer"),ue(oD(pD,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[rD]}enablePlugin(){this.enabled||(nD(yD,this,new Fa),oD(yD,this).addLocalHook("init",()=>iD(SD,this,HD).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,oD(yD,this)),this.addHook("modifyRowHeight",(t,e)=>iD(SD,this,_D).call(this,t,e)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){nD(CD,this,oD(yD,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}setManualSize(t,e){const n=this.hot.toPhysicalRow(t),o=Math.max(e,this.hot.stylesHandler.getDefaultRowHeight());return oD(yD,this).setValueAtIndex(n,o),o}getLastDesiredRowHeight(){return oD(hD,this)}setupHandlePosition(t){if(oD(wD,this)>1)return;nD(sD,this,t);const{view:e}=this.hot,{_wt:n}=e,o=n.wtTable.getCoords(oD(sD,this)),i=o.row;if(i<0)return;const r=Ae(oD(sD,this)),s=oD(sD,this).getBoundingClientRect(),a=i<n.getSetting("fixedRowsTop"),l=i>=e.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let h;a?h=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(oD(sD,this),o.row,o.col):l&&(h=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(oD(sD,this),o.row,o.col)),h||(h=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(oD(sD,this),o.row,o.col)),nD(aD,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(i)),nD(lD,this,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&c){x(this.hot.getSelectedRange(),t=>{ao(t.getTopStartCorner().row,t.getBottomStartCorner().row,t=>{oD(lD,this).includes(t)||oD(lD,this).push(t)})})}oD(lD,this).includes(oD(aD,this))||nD(lD,this,[oD(aD,this)]),nD(gD,this,h.top-6),nD(uD,this,parseInt(s.height,10)),oD(fD,this).style.top=`${oD(gD,this)+oD(uD,this)}px`,oD(fD,this).style[this.inlineDir]=`${h.start}px`,oD(fD,this).style.width=`${r}px`,this.hot.rootElement.appendChild(oD(fD,this))}refreshHandlePosition(){oD(fD,this).style.top=`${oD(gD,this)+oD(hD,this)}px`}setupGuidePosition(){const t=parseInt(Ae(oD(fD,this)),10),e=parseInt(oD(fD,this).style[this.inlineDir],10)+t,n=this.hot.view.getTableWidth();ue(oD(fD,this),"active"),ue(oD(pD,this),"active"),oD(pD,this).style.top=oD(fD,this).style.top,oD(pD,this).style[this.inlineDir]=`${e}px`,oD(pD,this).style.width=n-t+"px",this.hot.rootElement.appendChild(oD(pD,this))}refreshGuidePosition(){oD(pD,this).style.top=oD(fD,this).style.top}hideHandleAndGuide(){ge(oD(fD,this),"active"),ge(oD(pD,this),"active")}checkIfRowHeader(t){const e=re(t,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,o.clone.wtTable.TBODY,i.clone.wtTable.TBODY].includes(e)}getClosestTHParent(t){return"TABLE"!==t.tagName?"TH"===t.tagName?t:this.getClosestTHParent(t.parentNode):null}getActualRowHeight(t){const e=this.hot.view._wt.wtTable.getRowHeight(t);return void 0!==e&&oD(cD,this)<e?e:oD(cD,this)}afterMouseDownTimeout(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,n)=>{const o=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(e),e,!0);void 0!==o&&nD(cD,this,o),this.setManualSize(e,oD(cD,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!0),n&&t()};if(oD(wD,this)>=2){oD(lD,this).length>1?(x(oD(lD,this),t=>{e(t)}),t()):x(oD(lD,this),t=>{e(t,!0)})}nD(wD,this,0),nD(vD,this,null)}bindEvents(){const{rootElement:t,rootWindow:e}=this.hot;this.eventManager.addEventListener(t,"mouseover",t=>iD(SD,this,kD).call(this,t)),this.eventManager.addEventListener(t,"mousedown",t=>iD(SD,this,xD).call(this,t)),this.eventManager.addEventListener(e,"mousemove",t=>iD(SD,this,ED).call(this,t)),this.eventManager.addEventListener(e,"mouseup",()=>iD(SD,this,MD).call(this)),this.eventManager.addEventListener(oD(fD,this),"contextmenu",()=>iD(SD,this,TD).call(this))}destroy(){super.destroy()}}function kD(t){if(!Ge(t.target)&&!0!==oD(bD,this)&&this.checkIfRowHeader(t.target)){const e=this.getClosestTHParent(t.target);e&&(oD(mD,this)||this.setupHandlePosition(e))}}function xD(t){de(t.target,"manualRowResizer")&&(this.setupHandlePosition(oD(sD,this)),this.setupGuidePosition(),nD(mD,this,!0),null===oD(vD,this)&&(nD(vD,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(oD(vD,this))),nD(wD,this,oD(wD,this)+1),nD(dD,this,t.pageY),nD(cD,this,oD(uD,this)))}function ED(t){oD(mD,this)&&(nD(hD,this,oD(uD,this)+(t.pageY-oD(dD,this))),x(oD(lD,this),t=>{nD(cD,this,this.setManualSize(t,oD(hD,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition())}function MD(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,n)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(e),e,!1),n&&t(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!1)};if(oD(mD,this)){if(this.hideHandleAndGuide(),nD(mD,this,!1),oD(cD,this)!==oD(uD,this)){oD(lD,this).length>1?(x(oD(lD,this),t=>{e(t)}),t()):x(oD(lD,this),t=>{e(t,!0)})}this.setupHandlePosition(oD(sD,this))}}function TD(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(oD(fD,this)),this.hot.rootElement.removeChild(oD(pD,this)),nD(mD,this,!1),nD(bD,this,!0),this.hot._registerMicrotask(()=>{nD(bD,this,!1)})}function _D(t,e){let n=t;if(this.enabled){const t=this.hot.toPhysicalRow(e),i=oD(yD,this).getValueAtIndex(t);var o;if(this.hot.getSettings()[rD]&&i)n=null!==(o=this.hot.getPlugin("autoRowSize"))&&void 0!==o&&o.isEnabled()?Math.max(i,null!=n?n:0):i}return n}function HD(){const t=this.hot.getSettings()[rD];this.hot.batchExecution(()=>{Array.isArray(t)?(t.forEach((t,e)=>{oD(yD,this).setValueAtIndex(e,t)}),nD(CD,this,t)):!0===t&&Array.isArray(oD(CD,this))&&oD(CD,this).forEach((t,e)=>{oD(yD,this).setValueAtIndex(e,t)})},!0)}function ID(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function AD(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function PD(t,e){return t.get(ND(t,e))}function OD(t,e,n){return t.set(ND(t,e),n),n}function ND(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var DD=new WeakMap;class LD{constructor(t,e,n,o,i,r){AD(this,"row",void 0),AD(this,"col",void 0),AD(this,"rowspan",void 0),AD(this,"colspan",void 0),AD(this,"removed",!1),AD(this,"cellCoordsFactory",void 0),AD(this,"cellRangeFactory",void 0),ID(this,DD,null),this.row=t,this.col=e,this.rowspan=n,this.colspan=o,this.cellCoordsFactory=i,this.cellRangeFactory=r}static NEGATIVE_VALUES_WARNING(t){let{row:e,col:n,rowspan:o,colspan:i}=t;return T`The merged cell declared with {row: ${e}, col: ${n},\x20
258
+ rowspan: ${o}, colspan: ${i}} contains negative values, which is\x20
259
+ not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(t){let{row:e,col:n}=t;return T`The merged cell declared at [${e}, ${n}] is positioned\x20
260
+ (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(t){let{row:e,col:n}=t;return T`The merged cell declared at [${e}, ${n}] has both "rowspan"\x20
261
+ and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(t){let{row:e,col:n}=t;return T`The merged cell declared at [${e}, ${n}] has "rowspan"\x20
262
+ or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(t){let{row:e,col:n,rowspan:o,colspan:i}=t;return e<0||n<0||o<0||i<0}static isSingleCell(t){let{rowspan:e,colspan:n}=t;return 1===n&&1===e}static containsZeroSpan(t){let{rowspan:e,colspan:n}=t;return 0===n||0===e}static isOutOfBounds(t,e,n){return t.row<0||t.col<0||t.row>=e||t.row+t.rowspan-1>=e||t.col>=n||t.col+t.colspan-1>=n}normalize(t){const e=t.countRows(),n=t.countCols();this.row<0?this.row=0:this.row>e-1&&(this.row=e-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>e-1&&(this.rowspan=e-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col),OD(DD,this,null)}includes(t,e){return this.row<=t&&this.col<=e&&this.row+this.rowspan-1>=t&&this.col+this.colspan-1>=e}includesHorizontally(t){return this.col<=t&&this.col+this.colspan-1>=t}includesVertically(t){return this.row<=t&&this.row+this.rowspan-1>=t}shift(t,e){const n=t[0]||t[1],o=e+Math.abs(t[0]||t[1])-1,i=t[0]?"colspan":"rowspan",r=t[0]?"col":"row",s=Math.min(e,o),a=Math.max(e,o),l=this[r],h=this[r]+this[i]-1;if(l>=e&&(this[r]+=n),n>0)e<=h&&e>l&&(this[i]+=n);else if(n<0){if(s<=l&&a>=h)return this.removed=!0,OD(DD,this,null),!1;if(l>=s&&l<=a){const t=a-l+1,e=Math.abs(n)-t;this[r]-=e+n,this[i]-=t}else if(l<=s&&h>=a)this[i]+=n;else if(l<=s&&h>=s&&h<a){const t=h-s+1;this[i]-=t}}return OD(DD,this,null),!0}isFarther(t,e){return!t||("down"===e?t.row+t.rowspan-1<this.row+this.rowspan-1:"up"===e?t.row>this.row:"right"===e?t.col+t.colspan-1<this.col+this.colspan-1:"left"===e?t.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return PD(DD,this)||OD(DD,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),PD(DD,this)}}function VD(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function BD(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function FD(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var WD=new WeakSet;class zD{constructor(t){VD(this,WD),BD(this,"plugin",void 0),BD(this,"mergedCells",[]),BD(this,"mergedCellsMatrix",new Map),BD(this,"hot",void 0),this.plugin=t,this.hot=t.hot}static IS_OVERLAPPING_WARNING(t){let{row:e,col:n}=t;return T`The merged cell declared at [${e}, ${n}], overlaps\x20
263
+ with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
264
+ fix your setup.`}get(t,e){var n;return!!this.mergedCellsMatrix.has(t)&&(null!==(n=this.mergedCellsMatrix.get(t).get(e))&&void 0!==n&&n)}getByRange(t){const{row:e,col:n}=t.getTopStartCorner(),{row:o,col:i}=t.getBottomEndCorner(),r=this.mergedCells.length;let s=!1;for(let t=0;t<r;t++){const r=this.mergedCells[t],{row:a,col:l,rowspan:h,colspan:c}=r;if(a>=e&&a+h-1<=o&&l>=n&&l+c-1<=i){s=r;break}}return s}filterOverlappingMergeCells(t){const e=new Set;this.mergedCells.forEach(t=>{const{row:n,col:o,colspan:i,rowspan:r}=t;for(let t=n;t<n+r;t++)for(let n=o;n<o+i;n++)e.add(`r${t},c${n}`)});return t.filter(t=>{const{row:n,col:o,colspan:i,rowspan:r}=t,s=new Set;let a=!1;for(let l=n;l<n+r;l++){for(let n=o;n<o+i;n++){const o=`r${l},c${n}`;if(e.has(o)){Qt(zD.IS_OVERLAPPING_WARNING(t)),a=!0;break}s.add(o)}if(a)break}return a||e.add(...s),!a})}getWithinRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:o}=t.getTopStartCorner(),{row:i,col:r}=t.getBottomEndCorner(),s=[];for(let t=n;t<=i;t++)for(let n=o;n<=r;n++){const o=this.get(t,n);o&&(e||!e&&o.row===t&&o.col===n)&&s.push(o)}return s}add(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=t.row,o=t.col,i=t.rowspan,r=t.colspan,s=new LD(n,o,i,r,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,o),l=!e&&this.isOverlapping(s);return a||l?(l&&Qt(zD.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),this.mergedCells.push(s),FD(WD,this,$D).call(this,s),s)}remove(t,e){const n=this.get(t,e),o=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===o)&&(this.mergedCells.splice(o,1),FD(WD,this,UD).call(this,n),n)}clear(){x(this.mergedCells,t=>{let{row:e,col:n,rowspan:o,colspan:i}=t;ao(e,e+o,t=>{ao(n,n+i,e=>{const n=this.hot.getCell(t,e);n&&(n.removeAttribute("rowspan"),n.removeAttribute("colspan"),n.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(t){const e=t.getRange();for(let t=0;t<this.mergedCells.length;t++){if(this.mergedCells[t].getRange().overlaps(e))return!0}return!1}isFirstRenderableMergedCell(t,e){const n=this.get(t,e);if(!n)return!1;const{row:o,col:i,rowspan:r,colspan:s}=n,a=this.hot.view.getActiveOverlayName(),l=["top","top_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleRow(),h=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleColumn(),c=co(l,o,o+r-1),d=co(h,i,i+s-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(c,1)===t&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(d,1)===e}getFirstRenderableCoords(t,e){const n=this.get(t,e);if(!n||this.isFirstRenderableMergedCell(t,e))return this.hot._createCellCoords(t,e);const o=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(o,i)}getStartMostColumnIndex(t,e){const n=FD(WD,this,jD).call(this,t,"col",-1);let o=e;for(let t=0;t<n.length;t++)if(n[t]<=e){o=n[t];break}return o}getEndMostColumnIndex(t,e){const n=FD(WD,this,jD).call(this,t,"col",1);let o=e;for(let t=0;t<n.length;t++)if(n[t]>=e){o=n[t];break}return o}getTopMostRowIndex(t,e){const n=FD(WD,this,jD).call(this,t,"row",-1);let o=e;for(let t=0;t<n.length;t++)if(n[t]<=e){o=n[t];break}return o}getBottomMostRowIndex(t,e){const n=FD(WD,this,jD).call(this,t,"row",1);let o=e;for(let t=0;t<n.length;t++)if(n[t]>=e){o=n[t];break}return o}shiftCollections(t,e,n){const o=[0,0];switch(t){case"right":o[0]+=n;break;case"left":o[0]-=n;break;case"down":o[1]+=n;break;case"up":o[1]-=n}const i=[];this.mergedCells.forEach(t=>{t.shift(o,e),t.removed&&i.push(t)}),i.forEach(t=>{this.mergedCells.splice(this.mergedCells.indexOf(t),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(t=>{FD(WD,this,$D).call(this,t)})}}function jD(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=new Map,i=1===n?t.getTopStartCorner():t.getBottomEndCorner(),r=1===n?t.getBottomEndCorner():t.getTopStartCorner();for(let t=i.row;1===n?t<=r.row:t>=r.row;t+=n)for(let s=i.col;1===n?s<=r.col:s>=r.col;s+=n){const i="row"===e?t:s,r=this.get(t,s);let a=i;r&&(a=1===n?r[e]+r[`${e}span`]-1:r[e]),o.has(i)||o.set(i,new Set),o.get(i).add(a)}return Array.from(new Set(Array.from(o.entries()).filter(t=>{let[,e]=t;return 1===e.size}).flatMap(t=>{let[,e]=t;return Array.from(e)})))}function $D(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let n=t.col;n<t.col+t.colspan;n++)this.mergedCellsMatrix.has(e)||this.mergedCellsMatrix.set(e,new Map),this.mergedCellsMatrix.get(e).set(n,t)}function UD(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let n=t.col;n<t.col+t.colspan;n++)this.mergedCellsMatrix.get(e).delete(n)}function YD(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class GD{constructor(t){YD(this,"plugin",void 0),YD(this,"mergedCellsCollection",void 0),YD(this,"currentFillData",null),this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection}getDirection(t,e){let n=null;return n=e[0]===t[0]&&e[1]===t[1]&&e[3]===t[3]?"down":e[2]===t[2]&&e[1]===t[1]&&e[3]===t[3]?"up":e[1]===t[1]&&e[2]===t[2]?"right":"left",n}snapDragArea(t,e,n,o){const i=e.slice(0),r=this.getAutofillSize(t,e,n),[s,a,l,h]=t,c=["up","down"].indexOf(n)>-1?l-s+1:h-a+1,d=r-Math.floor(r/c)*c,u=this.getFarthestCollection(t,e,n,o);if(u)if("down"===n){const t=u.row+u.rowspan-s-d;i[2]+t>=this.plugin.hot.countRows()?i[2]-=d:i[2]+=d?t:0}else if("right"===n){const t=u.col+u.colspan-a-d;i[3]+t>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?t:0}else if("up"===n){const t=l-d-u.row+1;i[0]+t<0?i[0]+=d:i[0]-=d?t:0}else if("left"===n){const t=h-d-u.col+1;i[1]+t<0?i[1]+=d:i[1]-=d?t:0}return this.updateCurrentFillCache({baseArea:t,dragDirection:n,foundMergedCells:o,fillSize:r,dragArea:i,cycleLength:c}),i}updateCurrentFillCache(t){this.currentFillData||(this.currentFillData={}),yt(this.currentFillData,t)}getAutofillSize(t,e,n){const[o,i,r,s]=t,[a,l,h,c]=e;switch(n){case"up":return o-a;case"down":return h-r;case"left":return i-l;case"right":return c-s;default:return null}}getDragArea(t,e,n){const[o,i,r,s]=t,[a,l,h,c]=e;switch(n){case"up":return[a,l,o-1,s];case"down":{const t=this.mergedCellsCollection.get(h,s);return[r+1,i,h+(t?t.rowspan-1:0),s]}case"left":return[a,l,r,i-1];case"right":{const t=this.mergedCellsCollection.get(h,s);return[o,s+(t?t.colspan-1:0),h,c]}default:return null}}getFarthestCollection(t,e,n,o){const[i,r,s,a]=t,l=["up","down"].indexOf(n)>-1,h=l?s:a,c=l?i:r,d=this.getAutofillSize(t,e,n),u=l?s-i+1:a-r+1,g=d-Math.floor(d/u)*u;let f=null,p=null,m=null;switch(n){case"up":f="includesVertically",m=h-g+1;break;case"left":f="includesHorizontally",m=h-g+1;break;case"down":f="includesVertically",m=c+g-1;break;case"right":f="includesHorizontally",m=c+g-1}return x(o,t=>{t[f](m)&&t.isFarther(p,n)&&(p=t)}),p}recreateAfterDataPopulation(t){if(!this.currentFillData)return;const e=this.getRangeFromChanges(t),n=this.currentFillData.foundMergedCells,o=this.currentFillData.dragDirection,i=(t,n)=>{switch(o){case"up":return t.row-n>=e.from.row;case"down":return t.row+t.rowspan-1+n<=e.to.row;case"left":return t.col-n>=e.from.column;case"right":return t.col+t.colspan-1+n<=e.to.column;default:return null}};let r=0,s=null,a=1;do{for(let t=0;t<n.length;t+=1){if(s=n[t],r=a*this.currentFillData.cycleLength,i(s,r))switch(o){case"up":this.plugin.mergedCellsCollection.add({row:s.row-r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+r,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-r,colspan:s.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+r,colspan:s.colspan},!0)}t===n.length-1&&(a+=1)}}while(i(s,r));this.currentFillData=null,this.plugin.hot.render(),n.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(t){const e={min:null,max:null},n={min:null,max:null};return x(t,t=>{const o=t[0],i=this.plugin.hot.propToCol(t[1]);(null===e.min||o<e.min)&&(e.min=o),(null===e.max||o>e.max)&&(e.max=o),(null===n.min||i<n.min)&&(n.min=i),(null===n.max||i>n.max)&&(n.max=i)}),{from:{row:e.min,column:n.min},to:{row:e.max,column:n.max}}}dragAreaOverlapsCollections(t,e,n){const o=this.getDragArea(t,e,n),[i,r,s,a]=o,l=this.plugin.hot._createCellCoords(i,r),h=this.plugin.hot._createCellCoords(s,a),c=this.plugin.hot._createCellRange(l,l,h);if(0===this.mergedCellsCollection.getWithinRange(c,!0).length)return!1;const d=this.mergedCellsCollection.getWithinRange(c,!1);return 0===d.length||("up"===n||"down"===n?!d.every(t=>{let{colspan:e}=t;return e===c.getWidth()}):!d.every(t=>{let{rowspan:e}=t;return e===c.getHeight()}))}}function KD(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qD{constructor(t){KD(this,"plugin",void 0),KD(this,"hot",void 0),KD(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=t,this.hot=t.hot}getSelectedMergedCellClassName(t,e,n,o){const i=Math.min(n[0],n[2]),r=Math.min(n[1],n[3]),s=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===o)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(t,e))return;const l=this.plugin.mergedCellsCollection.get(t,e);if(!l)return;const h=l.getLastRow(),c=l.getLastColumn();return i<=l.row&&r<=l.col&&s>=h&&a>=c?`${this.fullySelectedMergedCellClassName}-${o}`:this.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(t,e){const n=[];if(!e||!t)return!1;for(let e=0;e<t.rowspan;e+=1)for(let o=0;o<t.colspan;o+=1)n.push(this.hot._createCellCoords(t.row+e,t.col+o));for(let t=0;t<n.length;t+=1){const o=[];for(let i=0;i<e.length;i+=1)o[i]=e[i].includes(n[t]);if(!o.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const t=[];for(let e=0;e<=7;e+=1)t.push(`${this.fullySelectedMergedCellClassName}-${e}`);return t.push(`${this.fullySelectedMergedCellClassName}-multiple`),t}}function XD(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ZD{constructor(t){XD(this,"data",void 0),XD(this,"next",null),XD(this,"prev",null),this.data=t}}class JD{constructor(){XD(this,"first",null),XD(this,"last",null)}push(t){const e=new ZD(t);if(null===this.first)this.first=e,this.last=e;else{const t=this.last;this.last=e,e.prev=t,t.next=e}return e}unshift(t){const e=new ZD(t);if(null===this.first)this.first=e,this.last=e;else{const t=this.first;this.first=e,e.next=t,t.prev=e}}inorder(t){let e=this.first;for(;e;){const n=t(e);if(e===this.last||!0===n)break;e=e.next}}remove(t){if(null===this.first)return!1;let e,n,o=this.first;for(;o;){if(o.data===t)return e=o.next,n=o.prev,e&&(e.prev=n),n&&(n.next=e),o===this.first&&(this.first=e),o===this.last&&(this.last=n),!0;o=o.next}return!1}hasCycle(){let t=this.first,e=this.first;for(;;){if(null===t)return!1;if(t=t.next,null===t)return!1;if(t=t.next,e=e.next,t===e)return!0}}pop(){if(null===this.last)return null;const t=this.last;return this.last=this.last.prev,t}shift(){if(null===this.first)return null;const t=this.first;return this.first=this.first.next,t}recursiveReverse(){if(!this.first)return;!function t(e,n){n&&(t(n,n.next),n.next=e)}(this.first,this.first.next),this.first.next=null;const t=this.first;this.first=this.last,this.last=t}reverse(){if(!this.first||!this.first.next)return;let t,e=this.first.next,n=this.first;for(;e;)t=e.next,e.next=n,n.prev=e,n=e,e=t;this.first.next=null,this.last.prev=null,t=this.first,this.first=n,this.last=t}}function QD(t,e,n){tL(t,e),e.set(t,n)}function tL(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function eL(t,e){return t.get(oL(t,e))}function nL(t,e,n){return t.set(oL(t,e),n),n}function oL(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var iL=new WeakMap,rL=new WeakMap,sL=new WeakMap,aL=new WeakMap,lL=new WeakMap,hL=new WeakMap,cL=new WeakMap,dL=new WeakSet;class uL{constructor(t){let{mergedCellsGetter:e,rowIndexMapper:n,columnIndexMapper:o}=t;var i,r;tL(i=this,r=dL),r.add(i),QD(this,iL,new JD),QD(this,rL,new JD),QD(this,sL,null),QD(this,aL,null),QD(this,lL,null),QD(this,hL,null),QD(this,cL,null),nL(lL,this,e),nL(hL,this,n),nL(cL,this,o)}getCurrentVerticalNode(){return eL(aL,this).data}getFirstVerticalNode(){return eL(rL,this).first.data}getNextVerticalNode(){return eL(aL,this).next.data}getPrevVerticalNode(){return eL(aL,this).prev.data}getCurrentHorizontalNode(){return eL(sL,this).data}getFirstHorizontalNode(){return eL(iL,this).first.data}getNextHorizontalNode(){return eL(sL,this).next.data}getPrevHorizontalNode(){return eL(sL,this).prev.data}setPrevNodeAsActive(){nL(aL,this,eL(aL,this).prev),nL(sL,this,eL(sL,this).prev)}setNextNodeAsActive(){nL(aL,this,eL(aL,this).next),nL(sL,this,eL(sL,this).next)}buildFocusOrder(t){nL(iL,this,new JD),t.forEach((t,e)=>{const n=new WeakSet,o=t.getTopStartCorner(),i=t.getBottomEndCorner();for(let r=o.row;r<=i.row;r++)if(!eL(hL,this).isHidden(r))for(let s=o.col;s<=i.col;s++){if(eL(cL,this).isHidden(s))continue;const o=oL(dL,this,gL).call(this,{selectedRange:t,selectionLayer:e,listOrder:eL(iL,this),mergeCellsVisitor:n,row:r,column:s});o&&nL(sL,this,o)}}),eL(iL,this).first&&(eL(iL,this).first.prev=eL(iL,this).last,eL(iL,this).last.next=eL(iL,this).first),nL(rL,this,new JD),t.forEach((t,e)=>{const n=new WeakSet,o=t.getTopStartCorner(),i=t.getBottomEndCorner();for(let r=o.col;r<=i.col;r++)if(!eL(cL,this).isHidden(r))for(let s=o.row;s<=i.row;s++){if(eL(hL,this).isHidden(s))continue;const o=oL(dL,this,gL).call(this,{selectedRange:t,selectionLayer:e,listOrder:eL(rL,this),mergeCellsVisitor:n,row:s,column:r});o&&nL(aL,this,o)}}),eL(rL,this).first&&(eL(rL,this).first.prev=eL(rL,this).last,eL(rL,this).last.next=eL(rL,this).first)}setActiveNode(t,e,n){return eL(iL,this).inorder(o=>{const{selectionLayer:i,rowStart:r,rowEnd:s,colStart:a,colEnd:l}=o.data;if(i===n&&t>=r&&t<=s&&e>=a&&e<=l)return nL(sL,this,o),!0}),eL(rL,this).inorder(o=>{const{selectionLayer:i,rowStart:r,rowEnd:s,colStart:a,colEnd:l}=o.data;if(i===n&&t>=r&&t<=s&&e>=a&&e<=l)return nL(aL,this,o),!0}),this}}function gL(t){let{selectedRange:e,selectionLayer:n,listOrder:o,mergeCellsVisitor:i,row:r,column:s}=t;const a=e.getTopStartCorner(),l=e.getBottomEndCorner(),h=e.highlight.clone().normalize(),c=eL(lL,this).call(this,r,s);if(c&&i.has(c))return null;const d={selectionLayer:n,colStart:s,colEnd:s,rowStart:r,rowEnd:r};if(c){if(i.add(c),c.row<a.row||c.row+c.rowspan-1>l.row||c.col<a.col||c.col+c.colspan-1>l.col)return null;d.colStart=c.col,d.colEnd=c.col+c.colspan-1,d.rowStart=c.row,d.rowEnd=c.row+c.rowspan-1}const u=o.push(d);return r===h.row&&s===h.col||c&&h.row>=c.row&&h.row<=c.row+c.rowspan-1&&h.col>=c.col&&h.col<=c.col+c.colspan-1?u:null}function fL(t,e,n){const{rowIndexMapper:o,stylesHandler:i}=t;let r=0;for(let a=e;a<e+n;a++){var s;if(!o.isHidden(a))r+=null!==(s=t.getRowHeight(a))&&void 0!==s?s:i.getDefaultRowHeight(a)}return r}function pL(t,e,n){mL(t,e),e.set(t,n)}function mL(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bL(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wL(t,e,n){return t.set(yL(t,e),n),n}function vL(t,e){return t.get(yL(t,e))}function yL(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}Mn.getSingleton().register("beforeMergeCells"),Mn.getSingleton().register("afterMergeCells"),Mn.getSingleton().register("beforeUnmergeCells"),Mn.getSingleton().register("afterUnmergeCells");const CL="mergeCells",SL=CL;var RL=new WeakMap,kL=new WeakMap,xL=new WeakMap,EL=new WeakMap,ML=new WeakSet;class TL extends DC{constructor(){var t,e;super(...arguments),mL(t=this,e=ML),e.add(t),bL(this,"mergedCellsCollection",null),bL(this,"autofillCalculations",null),bL(this,"selectionCalculations",null),pL(this,RL,null),pL(this,kL,{row:0,col:0}),pL(this,xL,new uL({mergedCellsGetter:(t,e)=>this.mergedCellsCollection.get(t,e),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),pL(this,EL,function(t){const{hot:e}=t,{rowIndexMapper:n,columnIndexMapper:o}=e,i=new Map;return{before:function(){},after:function(r,s,a){const l=t.mergedCellsCollection.get(s,a);if(!Et(l))return r.removeAttribute("rowspan"),r.removeAttribute("colspan"),i.has(s)&&!e.getSettings().rowHeaders&&(r.style.height=`${i.get(s)}px`,i.delete(s)),void(r.style.display="");const{row:h,col:c,colspan:d,rowspan:u}=l,[g,f]=t.translateMergedCellToRenderable(h,u,c,d),p=t.getSetting("virtualized");if(0===c&&!e.getSettings().rowHeaders){const t=e._getRowHeightFromSettings(s);if(void 0!==t){const n=e.stylesHandler.areCellsBorderBox()?0:1;i.set(s,t-n)}else if(Yt()){const t=fL(e,h,u);i.set(s,t/u)}}const m=g-n.getRenderableFromVisualIndex(s)+1,b=f-o.getRenderableFromVisualIndex(a)+1;let w=n.getNearestNotHiddenIndex(h,1),v=o.getNearestNotHiddenIndex(c,1);if(p){const t=e.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(t)||(w=Math.max(w,e.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)||(v=Math.max(v,e.getFirstRenderedVisibleColumn()))}const y=Math.min(u,m),C=Math.min(d,b);w===s&&v===a?(r.setAttribute("rowspan",y),r.setAttribute("colspan",C)):(r.removeAttribute("rowspan"),r.removeAttribute("colspan"),r.style.display="none")}}}(this))}static get PLUGIN_KEY(){return CL}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[HC]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[CL]}enablePlugin(){var t=this;this.enabled||(this.mergedCellsCollection=new zD(this),this.autofillCalculations=new GD(this),this.selectionCalculations=new qD(this),this.addHook("afterInit",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,_L).call(t,...n)}),this.addHook("modifyTransformFocus",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,IL).call(t,...n)}),this.addHook("modifyTransformStart",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,AL).call(t,...n)}),this.addHook("modifyTransformEnd",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,PL).call(t,...n)}),this.addHook("beforeSelectionHighlightSet",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,OL).call(t,...n)}),this.addHook("beforeSetRangeStart",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,LL).call(t,...n)}),this.addHook("beforeSetRangeStartOnly",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,LL).call(t,...n)}),this.addHook("beforeSelectionFocusSet",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,VL).call(t,...n)}),this.addHook("afterSelectionFocusSet",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,BL).call(t,...n)}),this.addHook("afterSelectionEnd",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,FL).call(t,...n)}),this.addHook("modifyGetCellCoords",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,NL).call(t,...n)}),this.addHook("modifyGetCoordsElement",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,NL).call(t,...n)}),this.addHook("afterIsMultipleSelection",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,HL).call(t,...n)}),this.addHook("afterRenderer",function(){return vL(EL,t).after(...arguments)}),this.addHook("afterContextMenuDefaultOptions",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,DL).call(t,...n)}),this.addHook("afterGetCellMeta",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,WL).call(t,...n)}),this.addHook("afterViewportRowCalculatorOverride",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,zL).call(t,...n)}),this.addHook("afterViewportColumnCalculatorOverride",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,jL).call(t,...n)}),this.addHook("modifyAutofillRange",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,$L).call(t,...n)}),this.addHook("afterCreateCol",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,UL).call(t,...n)}),this.addHook("afterRemoveCol",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,YL).call(t,...n)}),this.addHook("afterCreateRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,GL).call(t,...n)}),this.addHook("afterRemoveRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,KL).call(t,...n)}),this.addHook("afterChange",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,qL).call(t,...n)}),this.addHook("beforeDrawBorders",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,XL).call(t,...n)}),this.addHook("afterDrawSelection",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,ZL).call(t,...n)}),this.addHook("beforeRemoveCellClassNames",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,JL).call(t,...n)}),this.addHook("beforeBeginEditing",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,QL).call(t,...n)}),this.addHook("modifyRowHeightByOverlayName",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return yL(ML,t,tV).call(t,...n)}),this.addHook("beforeUndoStackChange",(t,e)=>{if("MergeCells"===e)return!1}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),super.updatePlugin()}ifChromeForceRepaint(){if(!$t())return;const t=[];let e=[];this.mergedCellsCollection.mergedCells.forEach(t=>{const{row:n,rowspan:o}=t;for(let t=n+1;t<n+o;t++)e.push(t)}),e=[...new Set(e)],e.forEach(e=>{const n=this.hot.rowIndexMapper.getRenderableFromVisualIndex(e);this.hot.view._wt.wtOverlays.getOverlays(!0).map(t=>"master"===(null==t?void 0:t.name)?t:t.clone.wtTable).forEach(e=>{const o=e.getRow(n);o&&(o.style.background=Ie(o,"backgroundColor").replace(")",", 0.99)"),t.push(o))})}),this.hot._registerTimeout(()=>{t.forEach(t=>{var e;t.style.background=null===(e=Ie(t,"backgroundColor"))||void 0===e?void 0:e.replace(", 0.99)",")")})},1)}validateSetting(t){return!!t&&(LD.containsNegativeValues(t)?(Qt(LD.NEGATIVE_VALUES_WARNING(t)),!1):LD.isOutOfBounds(t,this.hot.countRows(),this.hot.countCols())?(Qt(LD.IS_OUT_OF_BOUNDS_WARNING(t)),!1):LD.isSingleCell(t)?(Qt(LD.IS_SINGLE_CELL(t)),!1):!LD.containsZeroSpan(t)||(Qt(LD.ZERO_SPAN_WARNING(t)),!1))}generateFromSettings(){const t=this.getSetting("cells").filter(t=>this.validateSetting(t)),e=this.mergedCellsCollection.filterOverlappingMergeCells(t),n=[];e.forEach(t=>{const{row:e,col:o,rowspan:i,colspan:r}=t,s=this.hot._createCellCoords(e,o),a=this.hot._createCellCoords(e+i-1,o+r-1),l=this.hot._createCellRange(s,s,a);this.mergeRange(l,!0,!0);for(let t=e;t<e+i;t++)for(let i=o;i<o+r;i++)t===e&&i===o||n.push([t,i,null])}),0!==n.length&&this.hot.setDataAtCell(n,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(t){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(t)}mergeSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeActive();if(!t)return;t.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:e,to:n}=t;this.unmergeRange(t,!0),this.mergeRange(t),this.hot.selectCell(e.row,e.col,n.row,n.col,!1)}unmergeSelection(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeActive();if(!t)return;const{from:e,to:n}=t;this.unmergeRange(t,!0),this.hot.selectCell(e.row,e.col,n.row,n.col,!1)}mergeRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=t.getTopStartCorner(),i=t.getBottomEndCorner(),r={row:o.row,col:o.col,rowspan:i.row-o.row+1,colspan:i.col-o.col+1},s=[];let a=null;if(!this.canMergeRange(r,e))return!1;this.hot.runHooks("beforeMergeCells",t,e),ao(0,r.rowspan-1,t=>{ao(0,r.colspan-1,e=>{let n=null;s[t]||(s[t]=[]),0===t&&0===e?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+t,r.col+e,"hidden",!0),s[t][e]=n})}),this.hot.setCellMeta(r.row,r.col,"spanned",!0);return!this.mergedCellsCollection.add(r,e)||(n?a=[r.row,r.col,s]:this.hot.populateFromArray(r.row,r.col,s,void 0,void 0,this.pluginName),e||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",t,r,e),a)}unmergeRange(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCellsCollection.getWithinRange(t);0!==n.length&&(this.hot.runHooks("beforeUnmergeCells",t,e),x(n,t=>{this.mergedCellsCollection.remove(t.row,t.col),ao(0,t.rowspan-1,e=>{ao(0,t.colspan-1,n=>{this.hot.removeCellMeta(t.row+e,t.col+n,"hidden"),this.hot.removeCellMeta(t.row+e,t.col+n,"copyable")})}),this.hot.removeCellMeta(t.row,t.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",t,e),this.hot.render())}toggleMerge(t){const{from:e,to:n}=t.clone().normalize(),o=this.mergedCellsCollection.get(e.row,e.col);o.row===e.row&&o.col===e.col&&o.row+o.rowspan-1===n.row&&o.col+o.colspan-1===n.col?this.unmergeRange(t):this.mergeSelection(t)}merge(t,e,n,o){const i=this.hot._createCellCoords(t,e),r=this.hot._createCellCoords(n,o);this.mergeRange(this.hot._createCellRange(i,i,r))}unmerge(t,e,n,o){const i=this.hot._createCellCoords(t,e),r=this.hot._createCellCoords(n,o);this.unmergeRange(this.hot._createCellRange(i,i,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const t=this.hot.getSelectedRangeActive();t&&!t.isSingleHeader()&&(this.toggleMerge(t),this.hot.render())},runOnlyIf:t=>!t.altKey,group:SL})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(SL)}modifyViewportRowStart(t,e){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(t.startRow);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(o,i);if(Et(r)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r.row,1));if(o<t.startRow)return t.startRow=o,void this.modifyViewportRowStart(t,e)}}}modifyViewportRowEnd(t,e){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(t.endRow);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(o,i);if(Et(r)){const o=r.row+r.rowspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(i>t.endRow)return t.endRow=i,void this.modifyViewportRowEnd(t,e)}}}modifyViewportColumnStart(t,e){const n=this.hot.columnIndexMapper,o=n.getVisualFromRenderableIndex(t.startColumn);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(i,o);if(Et(r)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r.col,1));if(o<t.startColumn)return t.startColumn=o,void this.modifyViewportColumnStart(t,e)}}}modifyViewportColumnEnd(t,e){const n=this.hot.columnIndexMapper,o=n.getVisualFromRenderableIndex(t.endColumn);for(let i=0;i<e;i+=1){const r=this.mergedCellsCollection.get(i,o);if(Et(r)){const o=r.col+r.colspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(o,-1));if(i>t.endColumn)return t.endColumn=i,void this.modifyViewportColumnEnd(t,e)}}}translateMergedCellToRenderable(t,e,n,o){const{rowIndexMapper:i,columnIndexMapper:r}=this.hot;let s,a;s=0===e?i.getNearestNotHiddenIndex(t,1):i.getNearestNotHiddenIndex(t+e-1,-1),a=0===o?r.getNearestNotHiddenIndex(n,1):r.getNearestNotHiddenIndex(n+o-1,-1);return[t>=0?i.getRenderableFromVisualIndex(s):t,n>=0?r.getRenderableFromVisualIndex(a):n]}}function _L(){this.generateFromSettings(),this.hot.render()}function HL(t){if(t){const t=this.mergedCellsCollection.mergedCells,e=this.hot.getSelectedRangeActive(),n=e.getTopStartCorner(),o=e.getBottomEndCorner();for(let e=0;e<t.length;e+=1)if(n.row===t[e].row&&n.col===t[e].col&&o.row===t[e].row+t[e].rowspan-1&&o.col===t[e].col+t[e].colspan-1)return!1}return t}function IL(t){vL(kL,this).row=t.row,vL(kL,this).col=t.col}function AL(t){const e=this.hot.getSelectedRangeActive(),{highlight:n}=e,{columnIndexMapper:o,rowIndexMapper:i}=this.hot;vL(RL,this)&&(null!==i.getRenderableFromVisualIndex(vL(RL,this).row)&&(n.row=vL(RL,this).row),null!==o.getRenderableFromVisualIndex(vL(RL,this).col)&&(n.col=vL(RL,this).col),wL(RL,this,null));const r=this.mergedCellsCollection.get(n.row,n.col);if(!r)return;const s=r.col,a=r.col+r.colspan-1;if(t.col<0){const e=n.col>=s&&n.col<=a?s-1:a,i=o.getNearestNotHiddenIndex(e,-1);t.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,n.col)-1,1)}else if(t.col>0){const e=n.col>=s&&n.col<=a?a+1:s,i=o.getNearestNotHiddenIndex(e,1);t.col=null===i?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,i)-1,1)}const l=r.row,h=r.row+r.rowspan-1;if(t.row<0){const e=n.row>=l&&n.row<=h?l-1:h,o=i.getNearestNotHiddenIndex(e,-1);t.row=null===o?-this.hot.view.countRenderableRowsInRange(0,n.row):-Math.max(this.hot.view.countRenderableRowsInRange(o,n.row)-1,1)}else if(t.row>0){const e=n.row>=l&&n.row<=h?h+1:l,o=i.getNearestNotHiddenIndex(e,1);t.row=null===o?this.hot.view.countRenderableRowsInRange(n.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(n.row,o)-1,1)}}function PL(t){const e=this.hot.getSelectedRangeActive(),n=e.clone(),{to:o}=e,{columnIndexMapper:i,rowIndexMapper:r}=this.hot,s=(t,e)=>{n.expand(this.hot._createCellCoords(t,e));for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange())};if(t.col<0){let r=this.mergedCellsCollection.getStartMostColumnIndex(e,o.col)+t.col;s(o.row,r),"E-W"===e.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(r=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(r,1);null!==a&&(t.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,o.col)-1,1))}else if(t.col>0){let r=this.mergedCellsCollection.getEndMostColumnIndex(e,o.col)+t.col;s(o.row,r),"W-E"===e.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(r=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(r,-1);null!==a&&(t.col=Math.max(this.hot.view.countRenderableColumnsInRange(o.col,a)-1,1))}if(t.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(e,o.row)+t.row;s(i,o.col),"S-N"===e.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=r.getNearestNotHiddenIndex(i,1);null!==a&&(t.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,o.row)-1,1))}else if(t.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(e,o.row)+t.row;s(i,o.col),"N-S"===e.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=r.getNearestNotHiddenIndex(i,-1);null!==a&&(t.row=Math.max(this.hot.view.countRenderableRowsInRange(o.row,a)-1,1))}}function OL(){const t=this.hot.getSelectedRangeLast(),{highlight:e}=t;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void wL(RL,this,e.clone());for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)t.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange(),!1);for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)t.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange(),!1);const n=this.mergedCellsCollection.get(e.row,e.col);wL(RL,this,e.clone()),n&&e.assign(n)}function NL(t,e,n,o){if(t<0||e<0)return;const i=this.mergedCellsCollection.get(t,e);if(!i)return;const{row:r,col:s,colspan:a,rowspan:l}=i,h=r,c=s,d=r+l-1,u=s+a-1;if("render"===o&&this.getSetting("virtualized")){const t=this.hot.view.getActiveOverlayName(),e=["top","top_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleRow(),n=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleColumn();return[co(e,h,d),co(n,c,u),co(this.hot.getLastRenderedVisibleRow(),h,d),co(this.hot.getLastRenderedVisibleColumn(),c,u)]}return[h,c,d,u]}function DL(t){var e;t.items.push({name:"---------"},(e=this,{key:"mergeCells",name(){const t=this.getSelectedActive();if(t){const n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(Kl)}return this.getTranslatedPhrase(Gl)},callback(){const t=this.getSelectedRangeActive();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:o}=t;e.toggleMerge(t),this.selectCell(n.row,n.col,o.row,o.col,!1)},disabled(){const t=this.getSelectedActive();return!t||LD.isSingleCell({row:t[0],col:t[1],rowspan:t[2]-t[0]+1,colspan:t[3]-t[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}))}function LL(){wL(RL,this,null)}function VL(){if(vL(RL,this).isCell())return;const t=this.hot.getSelectedRangeActive(),e=t.getVerticalDirection(),n=t.getHorizontalDirection(),o=vL(RL,this).clone().normalize();vL(xL,this).setActiveNode(o.row,o.col),vL(kL,this).row>0||vL(kL,this).col>0?vL(xL,this).setPrevNodeAsActive():("E-W"===n&&vL(kL,this).col<0||"S-N"===e&&vL(kL,this).row<0)&&vL(xL,this).setNextNodeAsActive()}function BL(t,e){const{columnIndexMapper:n,rowIndexMapper:o}=this.hot;let i=this.hot.getActiveSelectionLayerIndex(),r=null,s=null;if(vL(kL,this).col<0){const{rowEnd:t,colEnd:e,selectionLayer:a}=vL(xL,this).getPrevHorizontalNode();s=n.getNearestNotHiddenIndex(e,-1),r=o.getNearestNotHiddenIndex(t,-1),i=a}else if(vL(kL,this).col>0){const{rowStart:t,colStart:e,selectionLayer:a}=vL(xL,this).getNextHorizontalNode();s=n.getNearestNotHiddenIndex(e,1),r=o.getNearestNotHiddenIndex(t,1),i=a}else if(vL(kL,this).row<0){const{rowEnd:t,colEnd:e,selectionLayer:a}=vL(xL,this).getPrevVerticalNode();s=n.getNearestNotHiddenIndex(e,-1),r=o.getNearestNotHiddenIndex(t,-1),i=a}else if(vL(kL,this).row>0){const{rowStart:t,colStart:e,selectionLayer:a}=vL(xL,this).getNextVerticalNode();s=n.getNearestNotHiddenIndex(e,1),r=o.getNearestNotHiddenIndex(t,1),i=a}if(null!==r||null!==s){this.hot.selection.setActiveSelectionLayerIndex(i);const n=this.hot.getSelectedRangeActive(),o=this.hot._createCellCoords(r,s),a=this.mergedCellsCollection.get(o.row,o.col),l=this.hot.selection.highlight.getFocus();t=o.row,e=o.col,a?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(a.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(a.col,1)}):n.highlight.assign(o),l.clear(),l.add(o).commit()}vL(xL,this).setActiveNode(t,e,i),wL(kL,this,{row:0,col:0})}function FL(){vL(xL,this).buildFocusOrder(this.hot.getSelectedRange())}function WL(t,e,n){const o=this.mergedCellsCollection.get(t,e);o&&(o.row!==t||o.col!==e?n.copyable=!1:(n.rowspan=o.rowspan,n.colspan=o.colspan))}function zL(t){if(this.getSetting("virtualized"))return;const e=this.hot.countCols();this.modifyViewportRowStart(t,e),this.modifyViewportRowEnd(t,e)}function jL(t){if(this.getSetting("virtualized"))return;const e=this.hot.countRows();this.modifyViewportColumnStart(t,e),this.modifyViewportColumnEnd(t,e)}function $L(t,e){const n=this.autofillCalculations.getDirection(e,t);if(this.autofillCalculations.dragAreaOverlapsCollections(e,t,n))return e;const o=this.hot._createCellCoords(e[0],e[1]),i=this.hot._createCellCoords(e[2],e[3]),r=this.hot._createCellRange(o,o,i),s=this.mergedCellsCollection.getWithinRange(r);return 0===s.length?t:this.autofillCalculations.snapDragArea(e,t,n,s)}function UL(t,e){this.mergedCellsCollection.shiftCollections("right",t,e)}function YL(t,e){this.mergedCellsCollection.shiftCollections("left",t,e)}function GL(t,e,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",t,e)}function KL(t,e){this.mergedCellsCollection.shiftCollections("up",t,e)}function qL(t,e){"Autofill.fill"===e&&this.autofillCalculations.recreateAfterDataPopulation(t)}function XL(t,e){if(e&&"area"===e){const e=this.hot.getSelectedRangeActive();x(this.mergedCellsCollection.getWithinRange(e),n=>{e.getBottomEndCorner().row===n.getLastRow()&&e.getBottomEndCorner().col===n.getLastColumn()&&(t[2]=n.row,t[3]=n.col)})}}function ZL(t,e,n,o){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(t,e,n,o)}function JL(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function QL(t,e,n,o){if(!(o instanceof MouseEvent))return;const i=this.hot.getSelectedRangeActive(),r=this.mergedCellsCollection.getByRange(i);if(!r)return;const s=this.hot._createCellCoords(r.row,r.col),a=this.hot._createCellCoords(r.row+r.rowspan-1,r.col+r.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(s,s,a))}function tV(t,e,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return t;let o,i;if("master"===n)o=this.hot.getFirstRenderedVisibleColumn(),i=this.hot.getLastRenderedVisibleColumn();else{const t=this.hot.view.getOverlayByName(n);o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(e,o))return t;const r=this.hot._createCellCoords(e,o),s=this.hot._createCellCoords(e,i),a=this.hot._createCellRange(r,r,s),l=this.mergedCellsCollection.getWithinRange(a,!0),h=l.reduce((t,e)=>{let{rowspan:n}=e;return Math.max(t,n)},1);let c=0;return l.length>1&&l[0].rowspan<h&&(c=h-l[0].rowspan),l.forEach(o=>{let{rowspan:i}=o,r=0;r="top"===n||"top_inline_start_corner"===n?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-e):i-c,t=Math.max(null!=t?t:0,fL(this.hot,e,r))}),t}const eV="sort";function nV(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const oV="multiColumnSorting",iV=oV;MR(oV,function(t,e){return function(n,o){const[,...i]=n,[,...r]=o;return function n(o){const s=t[o],a=e[o],l=i[o],h=r[o],c=a.multiColumnSorting,d=(c.compareFunctionFactory?c.compareFunctionFactory:_R(a.type))(s,a,c)(l,h);if(d===HR){const t=o+1;if(void 0!==e[t])return n(t)}return d}(0)}});class rV extends tk{constructor(){super(...arguments),nV(this,"pluginKey",oV)}static get PLUGIN_KEY(){return oV}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeActive();return-1===t.row&&t.col>=0&&this.sort(this.getNextSortConfig(t.col,XR)),!1},runOnlyIf:()=>{var t,e;const n=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return n&&(null===(e=this.hot.getSelectedRangeActive())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(n)&&n.isHeader()},relativeToGroup:mg,position:"before",group:iV})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(iV)}sort(t){super.sort(t)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(t){return super.getSortConfig(t)}setSortConfig(t){super.setSortConfig(t)}getNormalizedSortConfigs(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(t)?t:[t]}updateHeaderClasses(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),o=1;o<e;o++)n[o-1]=arguments[o];super.updateHeaderClasses(t,...n),ge(t,function(t){const e=t.className.split(" "),n=new RegExp(`^${eV}-[0-9]{1,2}$`);return e.filter(t=>n.test(t))}(t)),!1!==this.enabled&&ue(t,function(t,e,n){const o=[];return!1===n||t.isColumnSorted(e)&&t.getNumberOfSortedColumns()>1&&o.push(`${eV}-${t.getIndexOfColumnInSortQueue(e)+1}`),o}(...n))}onAfterOnCellMouseDown(t,e){!1!==FR(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(e.col),this.sort(this.getNextSortConfig(e.col,XR))):this.sort(this.getColumnNextConfig(e.col)))}}function sV(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class aV extends DC{constructor(){super(...arguments),sV(this,"dragged",[]),sV(this,"lastSetCell",null)}static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return Gt()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const t=this,{rootElement:e}=this.hot;function n(e){if(1===t.dragged.length)return t.dragged.splice(0,t.dragged.length),!0;const n=t.dragged.indexOf(e);if(-1===n)return!1;0===n?t.dragged=t.dragged.slice(0,1):1===n&&(t.dragged=t.dragged.slice(-1))}this.eventManager.addEventListener(e,"touchstart",e=>{let n;return de(e.target,"topSelectionHandle-HitArea")?(n=t.hot.getSelectedRangeActive(),t.dragged.push("top"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):de(e.target,"bottomSelectionHandle-HitArea")?(n=t.hot.getSelectedRangeActive(),t.dragged.push("bottom"),t.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},e.preventDefault(),!1):void 0}),this.eventManager.addEventListener(e,"touchend",e=>de(e.target,"topSelectionHandle-HitArea")?(n.call(t,"top"),t.touchStartRange=void 0,e.preventDefault(),!1):de(e.target,"bottomSelectionHandle-HitArea")?(n.call(t,"bottom"),t.touchStartRange=void 0,e.preventDefault(),!1):void 0),this.eventManager.addEventListener(e,"touchmove",e=>{const{rootDocument:n}=this.hot;let o,i,r,s,a,l;if(0===t.dragged.length)return;const h=n.elementFromPoint(e.touches[0].clientX,e.touches[0].clientY);h&&h!==t.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(o=t.hot.getCoords(h),-1===o.col&&(o.col=0),i=t.hot.getSelectedRangeActive(),r=i.getWidth(),s=i.getHeight(),a=i.getDirection(),1===r&&1===s&&t.hot.selection.setRangeEnd(o),l=t.getCurrentRangeCoords(i,o,t.touchStartRange.direction,a,t.dragged[0]),null!==l.start&&t.hot.selection.setRangeStart(l.start),t.hot.selection.setRangeEnd(l.end),t.lastSetCell=h),e.preventDefault())})}getCurrentRangeCoords(t,e,n,o,i){const r=t.getTopStartCorner(),s=t.getBottomEndCorner(),a=t.getBottomStartCorner(),l=t.getTopEndCorner();let h={start:null,end:null};switch(n){case"NE-SW":switch(o){case"NE-SW":case"NW-SE":h="top"===i?{start:this.hot._createCellCoords(e.row,t.highlight.col),end:this.hot._createCellCoords(a.row,e.col)}:{start:this.hot._createCellCoords(t.highlight.row,e.col),end:this.hot._createCellCoords(e.row,r.col)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(s.row,e.col),end:this.hot._createCellCoords(e.row,r.col)})}break;case"NW-SE":switch(o){case"NE-SW":"top"===i?h={start:e,end:a}:h.end=e;break;case"NW-SE":"top"===i?h={start:e,end:s}:h.end=e;break;case"SE-NW":"top"===i?h={start:e,end:r}:h.end=e;break;case"SW-NE":"top"===i?h={start:e,end:l}:h.end=e}break;case"SW-NE":switch(o){case"NW-SE":h="bottom"===i?{start:this.hot._createCellCoords(e.row,r.col),end:this.hot._createCellCoords(a.row,e.col)}:{start:this.hot._createCellCoords(r.row,e.col),end:this.hot._createCellCoords(e.row,s.col)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(t.highlight.row,e.col),end:this.hot._createCellCoords(e.row,s.col)}:{start:this.hot._createCellCoords(e.row,r.col),end:this.hot._createCellCoords(r.row,e.col)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(e.row,l.col),end:this.hot._createCellCoords(r.row,e.col)}:"top"===i&&(h={start:a,end:e})}break;case"SE-NW":switch(o){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(h.end=e);break;case"SE-NW":"top"===i?h.end=e:h={start:e,end:r}}}return h}isDragged(){return this.dragged.length>0}}function lV(){let{label:t="",colspan:e=1,origColspan:n=1,collapsible:o=!1,crossHiddenColumns:i=[],isCollapsed:r=!1,isHidden:s=!1,isRoot:a=!1,isPlaceholder:l=!1,headerClassNames:h=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:t,colspan:e,origColspan:n,collapsible:o,isCollapsed:r,crossHiddenColumns:i,isHidden:s,isRoot:a,isPlaceholder:l,headerClassNames:h}}function hV(){return{label:"",isPlaceholder:!0}}function cV(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function dV(t,e){return t.get(gV(t,e))}function uV(t,e,n){return t.set(gV(t,e),n),n}function gV(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const fV=["label","collapsible"];var pV=new WeakMap,mV=new WeakMap,bV=new WeakMap;class wV{constructor(){cV(this,pV,[]),cV(this,mV,0),cV(this,bV,1/0)}setColumnsLimit(t){uV(bV,this,t)}setData(){uV(pV,this,function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===e)return n;x(t,t=>{const o=[];let i=0;n.push(o),x(t,t=>{const n=lV();if(Et(t)){const{label:e,colspan:o,headerClassName:i}=t;n.label=H(e),"number"==typeof o&&o>1&&(n.colspan=o,n.origColspan=o),"string"==typeof i&&(n.headerClassNames=[...i.split(" ")])}else n.label=H(t);i+=n.origColspan;let r=!1;if(i>=e&&(n.colspan=n.origColspan-(i-e),n.origColspan=n.colspan,r=!0),o.push(n),n.colspan>1)for(let t=0;t<n.colspan-1;t++)o.push(hV());return!r})});const o=Math.max(...k(n,t=>t.length));return x(n,t=>{if(t.length<o){const e=k(new Array(o-t.length),()=>lV());t.splice(t.length,0,...e)}}),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],dV(bV,this))),uV(mV,this,dV(pV,this).length)}getData(){return dV(pV,this)}mergeWith(t){x(t,t=>{let{row:e,col:n,...o}=t;const i=this.getHeaderSettings(e,n);null!==i&&yt(i,o,fV)})}map(t){x(dV(pV,this),e=>{x(e,e=>{const n=t({...e});Et(n)&&yt(e,n,fV)})})}getHeaderSettings(t,e){var n;if(t>=dV(mV,this)||t<0)return null;const o=dV(pV,this)[t];return!1===Array.isArray(o)||e>=o.length?null:null!==(n=o[e])&&void 0!==n?n:null}getHeadersSettings(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const o=[];if(t>=dV(mV,this)||t<0)return o;const i=dV(pV,this)[t];let r=0;for(let t=e;t<i.length;t++){const e=i[t];if(e.isPlaceholder&&wt("The first column settings cannot overlap the other header layers"),r+=e.colspan,o.push(e),e.colspan>1&&(t+=e.colspan-1),r===n)break;r>n&&wt("The last column settings cannot overlap the other header layers")}return o}getLayersCount(){return dV(mV,this)}getColumnsCount(){return dV(mV,this)>0?dV(pV,this)[0].length:0}clear(){uV(pV,this,[]),uV(mV,this,0)}}function vV(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const yV="DF-pre-order";const CV=new Map([[yV,function t(e,n){let o=e.call(n,this);for(let i=0;i<this.childs.length;i++){if(!1===o)return!1;o=t.call(this.childs[i],e,n)}return o}],["DF-post-order",function t(e,n){for(let o=0;o<this.childs.length;o++){if(!1===t.call(this.childs[o],e,n))return!1}return e.call(n,this)}],["BF",function(t,e){const n=[this];!function o(){if(0===n.length)return;const i=n.shift();n.push(...i.childs),!1!==t.call(e,i)&&o()}()}]]);class SV{constructor(t){vV(this,"data",{}),vV(this,"parent",null),vV(this,"childs",[]),this.data=t}addChild(t){t.parent=this,this.childs.push(t)}cloneTree(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const e=new SV({...t.data});for(let n=0;n<t.childs.length;n++)e.addChild(this.cloneTree(t.childs[n]));return e}replaceTreeWith(t){this.data={...t.data},this.childs=[];for(let e=0;e<t.childs.length;e++)this.addChild(t.childs[e])}walkDown(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"BF";CV.has(e)||wt(`Traversal strategy "${e}" does not exist`),CV.get(e).call(this,t,this)}walkUp(t){const e=this,n=o=>{!1!==t.call(e,o)&&null!==o.parent&&n(o.parent)};n(this)}}function RV(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function kV(t,e){return t.get(xV(t,e))}function xV(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var EV=new WeakMap,MV=new WeakMap,TV=new WeakMap;class _V{constructor(t){var e,n,o;RV(this,EV,new Map),RV(this,MV,new Map),RV(this,TV,null),n=this,o=t,(e=TV).set(xV(e,n),o)}getRoots(){return Array.from(kV(EV,this).values())}getRootByColumn(t){let e;return kV(MV,this).has(t)&&(e=kV(EV,this).get(kV(MV,this).get(t))),e}getNode(t,e){const n=this.getRootByColumn(e);if(!n)return;const o=e-kV(MV,this).get(e);let i,r=0;return n.walkDown(n=>{const{data:{origColspan:s,headerLevel:a}}=n;if(t===a){if(o>=r&&o<=r+s-1)return i=n,i.data.isRoot=e===i.data.columnIndex,!1;r+=s}}),i}rebuildTreeIndex(){let t=0;kV(MV,this).clear(),x(kV(EV,this),e=>{let[,{data:{colspan:n}}]=e;for(let e=t;e<t+n;e++)kV(MV,this).set(e,t);t+=n})}buildTree(){this.clear();const t=kV(TV,this).getColumnsCount();let e=0;for(;e<t;){const t=kV(TV,this).getHeaderSettings(0,e),n=new SV;kV(EV,this).set(e,n),this.buildLeaves(n,e,0,t.origColspan),e+=t.origColspan}this.rebuildTreeIndex()}buildLeaves(t,e,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=kV(TV,this).getHeadersSettings(n,e,o);n+=1,x(i,o=>{const i={...o,headerLevel:n-1,columnIndex:e};let r;1===n?(t.data=i,r=t):(r=new SV(i),t.addChild(r)),n<kV(TV,this).getLayersCount()&&this.buildLeaves(r,e,n,o.origColspan),e+=o.origColspan})}clear(){kV(EV,this).clear(),kV(MV,this).clear()}}function HV(t,e){t.walkDown(t=>{let{data:n,childs:o}=t;if(!n.isHidden&&(e(n.columnIndex),0===o.length))for(let t=1;t<n.colspan;t++)e(n.columnIndex+t)})}function IV(t,e){let{childs:n}=t;if(0!==n.length)return n[0].data[e]}function AV(t){return IV(t,"origColspan")===t.data.origColspan}function PV(t){const{data:e,childs:n}=t;if(!e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(AV(t))return PV(n[0]);e.isCollapsed=!1;const o=n.slice(1),i=new Set;let r=0;if(o.length>0)x(o,t=>{t.replaceTreeWith(t.data.clonedTree),t.data.clonedTree=null;const e=t.data;r+=e.colspan,HV(t,t=>{i.add(t)})});else{const{colspan:t,origColspan:n,columnIndex:o}=e;r=n-t;for(let t=1;t<n;t++)i.add(o+t)}return t.walkUp(t=>{const{data:e}=t;e.colspan+=r,e.colspan>=e.origColspan?(e.colspan=e.origColspan,e.isCollapsed=!1):AV(t)&&(e.isCollapsed=IV(t,"isCollapsed"))}),{rollbackModification:()=>OV(t),affectedColumns:Array.from(i),colspanCompensation:r}}function OV(t){var e;const{data:n,childs:o}=t;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(AV(t))return OV(o[0]);n.isCollapsed=!0;const i=o.slice(1),r=new Set;if(i.length>0)x(i,t=>{HV(t,t=>{r.add(t)}),t.data.clonedTree=t.cloneTree(),t.walkDown(t=>{let{data:e}=t;e.isHidden=!0})});else{const{origColspan:t,columnIndex:e}=n;for(let n=1;n<t;n++){const t=e+n;r.add(t)}}const s=n.colspan-(null!==(e=IV(t,"colspan"))&&void 0!==e?e:1);return t.walkUp(t=>{const{data:e}=t;e.colspan-=s,e.colspan<=1?(e.colspan=1,e.isCollapsed=!0):AV(t)&&(e.isCollapsed=IV(t,"isCollapsed"))}),{rollbackModification:()=>PV(t),affectedColumns:Array.from(r),colspanCompensation:s}}const NV=new Map([["collapse",OV],["expand",PV],["hide-column",function(t,e){Number.isInteger(e)||wt("The passed gridColumnIndex argument has invalid type."),t.childs.length>0&&wt(T`The passed node is not the last node on the tree. Only for\x20
265
+ the last node, the hide column modification can be applied.`);const{crossHiddenColumns:n}=t.data;if(n.includes(e))return;let o=!1;t.walkUp(t=>{const{data:{collapsible:e}}=t;if(e)return o=!0,!1}),o||t.walkUp(t=>{const{data:n}=t;n.crossHiddenColumns.push(e),n.colspan>1?n.colspan-=1:n.isHidden=!0})}],["show-column",function(t,e){Number.isInteger(e)||wt("The passed gridColumnIndex argument has invalid type."),t.childs.length>0&&wt(T`The passed node is not the last node on the tree. Only for\x20
266
+ the last node, the show column modification can be applied.`);const{crossHiddenColumns:n}=t.data;if(!n.includes(e))return;let o=!1;t.walkUp(t=>{const{data:{collapsible:e}}=t;if(e)return o=!0,!1}),o||t.walkUp(t=>{const{data:n}=t;n.crossHiddenColumns.splice(n.crossHiddenColumns.indexOf(e),1),!n.isHidden&&n.colspan<n.origColspan&&(n.colspan+=1),n.isHidden=!1})}]]);function DV(t){const e=[];return x(t,t=>{t.walkDown(t=>{const n=t.data,{origColspan:o,columnIndex:i,headerLevel:r,crossHiddenColumns:s}=n,a=function(t,e){let n;Array.isArray(t[e])?n=t[e]:(n=[],t[e]=n);return n}(e,r);let l=!1;for(let t=i;t<i+o;t++){if(s.includes(t)||l)a.push(hV());else{const t=LV(n);t.isRoot=!0,a.push(t),l=!0}}})}),e}function LV(t){const{crossHiddenColumns:e,...n}=lV(t);return n}function VV(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function BV(t,e,n){return t.set(WV(t,e),n),n}function FV(t,e){return t.get(WV(t,e))}function WV(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var zV=new WeakMap,jV=new WeakMap,$V=new WeakMap;class UV{constructor(){VV(this,zV,new wV),VV(this,jV,new _V(FV(zV,this))),VV(this,$V,[[]])}setState(t){FV(zV,this).setData(t);let e=!1;try{FV(jV,this).buildTree()}catch(t){FV(jV,this).clear(),FV(zV,this).clear(),e=!0}return BV($V,this,DV(FV(jV,this).getRoots())),e}setColumnsLimit(t){FV(zV,this).setColumnsLimit(t)}mergeStateWith(t){const e=k(t,t=>{let{row:e,...n}=t;return{row:e<0?this.rowCoordsToLevel(e):e,...n}});FV(zV,this).mergeWith(e),FV(jV,this).buildTree(),BV($V,this,DV(FV(jV,this).getRoots()))}mapState(t){FV(zV,this).map(t),FV(jV,this).buildTree(),BV($V,this,DV(FV(jV,this).getRoots()))}mapNodes(t){return S(FV(jV,this).getRoots(),(e,n)=>(n.walkDown(n=>{const o=t(n.data);void 0!==o&&e.push(o)}),e),[])}triggerNodeModification(t,e,n){e<0&&(e=this.rowCoordsToLevel(e));const o=FV(jV,this).getNode(e,n);let i;return o&&(i=function(t,e,n){return NV.has(t)||wt(`The node modifier action ("${t}") does not exist.`),NV.get(t)(e,n)}(t,o,n),BV($V,this,DV(FV(jV,this).getRoots()))),i}triggerColumnModification(t,e){return this.triggerNodeModification(t,-1,e)}rowCoordsToLevel(t){if(t>=0)return null;const e=t+Math.max(this.getLayersCount(),1);return e<0?null:e}levelToRowCoords(t){if(t<0)return null;const e=t-Math.max(this.getLayersCount(),1);return e>=0?null:e}getHeaderSettings(t,e){var n,o;return t<0&&(t=this.rowCoordsToLevel(t)),null===t||t>=this.getLayersCount()?null:null!==(n=null===(o=FV($V,this)[t])||void 0===o?void 0:o[e])&&void 0!==n?n:null}getHeaderTreeNodeData(t,e){const n=this.getHeaderTreeNode(t,e);return n?{...n.data}:null}getHeaderTreeNode(t,e){if(t<0&&(t=this.rowCoordsToLevel(t)),null===t||t>=this.getLayersCount())return null;const n=FV(jV,this).getNode(t,e);return n||null}findTopMostEntireHeaderLevel(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;const n=e-t+1;let o=!1,i=null;for(let r=t;r<=e;r++){const s=FV(jV,this).getRootByColumn(r);if(!s)break;o=!0,s.walkDown(o=>{const{columnIndex:r,headerLevel:s,origColspan:a,isHidden:l}=o.data;l||a<=n&&r>=t&&r+a-1<=e&&(null===i||s<i)&&(i=s)},yV)}return o&&null===i?-1:this.levelToRowCoords(null!=i?i:0)}findLeftMostColumnIndex(t,e){var n;const{isRoot:o}=null!==(n=this.getHeaderSettings(t,e))&&void 0!==n?n:{isRoot:!0};if(o)return e;let i=e-1;for(;i>=0;){var r;const{isRoot:e}=null!==(r=this.getHeaderSettings(t,i))&&void 0!==r?r:{isRoot:!0};if(e)break;i-=1}return i}findRightMostColumnIndex(t,e){var n;const{isRoot:o,origColspan:i}=null!==(n=this.getHeaderSettings(t,e))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(o)return e+i-1;let r=e+1;for(;r<this.getColumnsCount();){var s;const{isRoot:e}=null!==(s=this.getHeaderSettings(t,r))&&void 0!==s?s:{isRoot:!0};if(e)break;r+=1}return r-1}getLayersCount(){return FV(zV,this).getLayersCount()}getColumnsCount(){return FV(zV,this).getColumnsCount()}clear(){BV($V,this,[]),FV(zV,this).clear(),FV(jV,this).clear()}}function YV(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function GV(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function KV(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var qV=new WeakSet;class XV{constructor(t){let{hot:e,headersStateManager:n}=t;YV(this,qV),GV(this,"hot",void 0),GV(this,"headersStateManager",void 0),GV(this,"layersCount",0),GV(this,"container",void 0),GV(this,"widthsMap",void 0),this.hot=e,this.headersStateManager=n,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(t){return this.layersCount=t,this}getWidth(t){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t))}buildWidthsMap(){const t=KV(qV,this,JV).call(this),e=t.size>0,n=this.hot.getCurrentThemeName();this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize","htNestedHeaders"),n&&this.container.classList.add(n),KV(qV,this,QV).call(this,this.container,e),this.hot.rootDocument.body.appendChild(this.container);const o=e?KV(qV,this,ZV).call(this):null,i=this.container.querySelector('[data-ghost-table="rendered"]').querySelectorAll("tr:last-of-type th");this.widthsMap.clear();for(let n=0;n<i.length;n++){const r=Number.parseInt(i[n].dataset.column,10),s=this.hot.toPhysicalColumn(r);if(this.hot.columnIndexMapper.isHidden(s))continue;let a;if(e&&t.has(s)){const t=o.get(s);void 0!==t&&(a=t)}void 0===a&&(a=i[n].getBoundingClientRect().width),this.widthsMap.setValueAtIndex(s,a)}this.container.remove(),this.container=null}clear(){this.widthsMap.clear(),this.container=null}}function ZV(){const t=this.container.querySelector('[data-ghost-table="full"]').querySelectorAll("tr:last-of-type th"),e=new Map;for(let n=0;n<t.length;n++){const o=Number.parseInt(t[n].dataset.column,10),i=this.hot.toPhysicalColumn(o);e.set(i,t[n].getBoundingClientRect().width)}return e}function JV(){const t=new Set,e=this.hot.countCols();for(let n=0;n<e;n++){const e=this.headersStateManager.getHeaderTreeNode(-1,n);if(!e)continue;let o=!1;e.walkUp(t=>{if(!0===t.data.isCollapsed)return o=!0,!1}),o&&t.add(this.hot.toPhysicalColumn(n))}return t}function QV(t,e){const n=!!this.hot.getSettings().dropdownMenu,o=this.hot.countCols(),i=this.hot.getSettings().sanitizer;t.innerHTML=e?KV(qV,this,tB).call(this,o,n,i)+KV(qV,this,eB).call(this,o,n,i):KV(qV,this,eB).call(this,o,n,i)}function tB(t,e,n){let o="";for(let i=0;i<this.layersCount;i++){let r="";for(let o=0;o<t;o++){const t=this.headersStateManager.getHeaderTreeNodeData(i,o);t&&t.isRoot&&(r+=`<th data-column="${o}" colspan="${t.origColspan}">${KV(qV,this,nB).call(this,t,e,n)}</th>`)}o+=`<tr>${r}</tr>`}return`<table data-ghost-table="full"><thead>${o}</thead></table>`}function eB(t,e,n){let o="";for(let i=0;i<this.layersCount;i++){let r="";for(let o=0;o<t;o++){const t=this.headersStateManager.getHeaderSettings(i,o);!t||t.isPlaceholder||t.isHidden||(r+=`<th data-column="${o}" colspan="${t.colspan}">${KV(qV,this,nB).call(this,t,e,n)}</th>`)}o+=`<tr>${r}</tr>`}return`<table data-ghost-table="rendered"><thead>${o}</thead></table>`}function nB(t,e,n){return`<div class="relative"><span class="colHeader">${"function"==typeof n?n(t.label,"innerHTML"):t.label}</span>${e?'<button class="changeType"></button>':""}${t.collapsible?'<div class="collapsibleIndicator expanded">-</div>':""}</div>`}function oB(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function iB(t,e,n){rB(t,e),e.set(t,n)}function rB(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sB(t,e,n){return t.set(lB(t,e),n),n}function aB(t,e){return t.get(lB(t,e))}function lB(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const hB="nestedHeaders";var cB=new WeakMap,dB=new WeakMap,uB=new WeakMap,gB=new WeakMap,fB=new WeakMap,pB=new WeakMap,mB=new WeakMap,bB=new WeakSet;class wB extends DC{constructor(){var t,e;super(...arguments),rB(t=this,e=bB),e.add(t),iB(this,cB,new UV),iB(this,dB,null),iB(this,uB,null),iB(this,gB,!1),iB(this,fB,null),iB(this,pB,!1),oB(this,"ghostTable",new XV({hot:this.hot,headersStateManager:aB(cB,this)})),oB(this,"detectedOverlappedHeaders",!1),iB(this,mB,()=>{var t;const e=null===(t=this.hot)||void 0===t?void 0:t.getSelectedRangeActive();if(!e)return;const{highlight:n}=e;if(n.isHeader()&&n.col>=0){const t=aB(cB,this).findLeftMostColumnIndex(n.row,n.col),e=this.hot.selection.highlight.getFocus();e.visualCellRange.highlight.col=t,e.visualCellRange.from.col=t,e.visualCellRange.to.col=t,e.commit()}})}static get PLUGIN_KEY(){return hB}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[hB]}enablePlugin(){var t=this;if(this.enabled)return;const{nestedHeaders:e}=this.hot.getSettings();Array.isArray(e)&&Array.isArray(e[0])||Qt(T`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
267
+ passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>lB(bB,this,OB).call(this)),this.addHook("afterLoadData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,NB).call(t,...n)}),this.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,SB).call(t,...n)}),this.addHook("afterOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,RB).call(t,...n)}),this.addHook("beforeOnCellMouseOver",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,kB).call(t,...n)}),this.addHook("beforeOnCellMouseUp",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,xB).call(t,...n)}),this.addHook("beforeSelectionHighlightSet",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,EB).call(t,...n)}),this.addHook("modifyTransformStart",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,MB).call(t,...n)}),this.addHook("afterSelection",()=>aB(mB,this).call(this)),this.addHook("afterSelectionFocusSet",()=>aB(mB,this).call(this)),this.addHook("beforeViewportScrollHorizontally",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,vB).call(t,...n)}),this.addHook("afterGetColumnHeaderRenderers",t=>lB(bB,this,_B).call(this,t)),this.addHook("modifyColWidth",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,IB).call(t,...n)}),this.addHook("modifyColumnHeaderValue",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,AB).call(t,...n)}),this.addHook("beforeHighlightingColumnHeader",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,yB).call(t,...n)}),this.addHook("beforeCopy",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,CB).call(t,...n)}),this.addHook("beforeSelectColumns",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,TB).call(t,...n)}),this.addHook("beforeViewRender",()=>lB(bB,this,DB).call(this)),this.addHook("afterViewportColumnCalculatorOverride",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,HB).call(t,...n)}),this.addHook("modifyFocusedElement",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return lB(bB,t,PB).call(t,...n)}),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",aB(mB,this)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",aB(mB,this)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:t}=this.hot.getSettings();aB(cB,this).setColumnsLimit(this.hot.countCols()),Array.isArray(t)&&(this.detectedOverlappedHeaders=aB(cB,this).setState(t)),this.detectedOverlappedHeaders&&Qt(T`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
268
+ is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((t,e)=>{const n=!0===t?"hide-column":"show-column";aB(cB,this).triggerColumnModification(n,e)}),!aB(dB,this)&&this.enabled&&sB(dB,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(t=>{t.forEach(t=>{let{op:e,index:n,newValue:o}=t;if("replace"===e){const t=!0===o?"hide-column":"show-column";aB(cB,this).triggerColumnModification(t,n)}}),this.ghostTable.buildWidthsMap()})),sB(pB,this,!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",aB(mB,this)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",aB(mB,this)),this.clearColspans(),aB(cB,this).clear(),aB(dB,this).unsubscribe(),sB(dB,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return aB(cB,this)}getLayersCount(){return aB(cB,this).getLayersCount()}getHeaderSettings(t,e){return aB(cB,this).getHeaderSettings(t,e)}clearColspans(){if(!this.hot.view)return;const{_wt:t}=this.hot.view,e=t.getSetting("columnHeaders").length,n=t.wtTable.THEAD,o=t.wtOverlays.topOverlay.clone.wtTable.THEAD,i=t.wtOverlays.topInlineStartCornerOverlay?t.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let t=0;t<e;t++){const e=n.childNodes[t];if(!e)break;const r=o.childNodes[t],s=i?i.childNodes[t]:null;for(let t=0,n=e.childNodes.length;t<n;t++)e.childNodes[t].removeAttribute("colspan"),ge(e.childNodes[t],"hiddenHeader"),r&&r.childNodes[t]&&(r.childNodes[t].removeAttribute("colspan"),ge(r.childNodes[t],"hiddenHeader")),i&&s&&s.childNodes[t]&&(s.childNodes[t].removeAttribute("colspan"),ge(s.childNodes[t],"hiddenHeader"))}}headerRendererFactory(t){var e=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(o,i)=>{var r;const{columnIndexMapper:s,view:a}=this.hot;let l=s.getVisualFromRenderableIndex(o);null===l&&(l=o),i.removeAttribute("colspan"),ge(i,"hiddenHeader"),ge(i,"hiddenHeaderText");const{colspan:h,isHidden:c,isPlaceholder:d,headerClassNames:u}=null!==(r=aB(cB,this).getHeaderSettings(t,l))&&void 0!==r?r:{};if(d||c)ue(i,"hiddenHeader");else if(h>1){var g,f,p;const{wtOverlays:t}=a._wt,e=null===(g=t.topInlineStartCornerOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(i),r=null===(f=t.inlineStartOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(i);(null===(p=t.topOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(i))&&l<n&&ue(i,"hiddenHeaderText");const s=e||r?Math.min(h,n-o):h;s>1&&i.setAttribute("colspan",s)}if(this.hot.view.appendColHeader(l,i,function(){return e.getColumnHeaderValue(...arguments)},t),!d&&!c){const t=i.querySelector("div.relative");t&&u&&u.length>0&&(ge(t,this.hot.getColumnMeta(l).headerClassName),ue(t,u))}}}getColumnHeaderValue(t,e){var n;const{isHidden:o,isPlaceholder:i}=null!==(n=aB(cB,this).getHeaderSettings(e,t))&&void 0!==n?n:{};return i||o?"":this.hot.getColHeader(t,e)}destroy(){sB(cB,this,null),null!==aB(dB,this)&&(aB(dB,this).unsubscribe(),sB(dB,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(t){if(!(t.row>=0||t.col<0))return aB(cB,this).getHeaderTreeNodeData(t.row,t.col)}}function vB(t,e){var n;const o=this.hot.getSelectedRangeActive();if(!o)return t;const{highlight:i}=o,{navigableHeaders:r}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),a=r?i.row:null===(n=aB(fB,this))||void 0===n?void 0:n.row,l=s?t:i.col,h=a<0&&l>=0;if(sB(fB,this,null),!h)return t;const c=this.hot.getFirstFullyVisibleColumn(),d=this.hot.getLastFullyVisibleColumn(),u=d-c+1,g=aB(cB,this).findLeftMostColumnIndex(a,l),f=aB(cB,this).findRightMostColumnIndex(a,l),p=f-g+1;if(g<c&&f>d)return g;if(s){let t=null;return g>=c&&f>d?p>u?(e.value="start",t=g):(e.value="end",t=f):g<c&&f<=d&&(p>u?(e.value="end",t=f):(e.value="start",t=g)),t}return g<=c?g:f}function yB(t,e,n){const o=aB(cB,this).getHeaderTreeNodeData(e,t);if(!o)return t;const{columnCursor:i,selectionType:r,selectionWidth:s}=n,{isRoot:a,colspan:l}=aB(cB,this).getHeaderSettings(e,t);if(r===ss){if(!a)return o.columnIndex}else if(r===rs&&(l>s-i||!a))return null;return t}function CB(t,e,n){let{columnHeadersCount:o}=n;if(0!==o)for(let n=0;n<e.length;n++){const{startRow:o,startCol:r,endRow:s,endCol:a}=e[n],l=s-o+1;if(o>=0||1===r-a+1)break;for(let e=r;e<=a;e++)for(let n=o;n<=s;n++){var i;const o=l+n,s=e-r;if(0===s)continue;!1===(null===(i=aB(cB,this).getHeaderTreeNodeData(n,e))||void 0===i?void 0:i.isRoot)&&(t[o][s]="")}}}function SB(t,e,n,o){this._getHeaderTreeNodeDataByCoords(e)&&(o.column=!0)}function RB(t,e){const n=this._getHeaderTreeNodeDataByCoords(e);if(!n)return;sB(uB,this,e.clone()),sB(gB,this,!0);const{selection:o}=this.hot,i=o.isSelected()?o.getSelectedRange().current():null,r=[],{columnIndex:s,origColspan:a}=n,l=!o.inInSelection(e);t.shiftKey&&i?e.col<i.from.col?r.push(i.getTopEndCorner().col,s,e.row):e.col>i.from.col?r.push(i.getTopStartCorner().col,s+a-1,e.row):r.push(s,s+a-1,e.row):(cn(t)||hn(t)&&l||function(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}(t))&&r.push(s,s+a-1,e.row),o.selectColumns(...r)}function kB(t,e,n,o){if(!this.hot.view.isMouseDown()||o.column)return;const i=this._getHeaderTreeNodeDataByCoords(e);if(!i)return;const{columnIndex:r,origColspan:s}=i,a=this.hot.getSelectedRangeActive(),l=a.getTopStartCorner(),h=a.getBottomEndCorner(),{from:c}=a;o.column=!0,o.cell=!0;const d=[],u=co(e.row,-1/0,-1);e.col<c.col?d.push(h.col,r,u):e.col>c.col?d.push(l.col,r+s-1,u):d.push(r,r+s-1,u),this.hot.selection.selectColumns(...d)}function xB(){sB(gB,this,!1)}function EB(){const{navigableHeaders:t}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!aB(gB,this)||!t)return;const e=this.hot.getSelectedRangeLast(),n=e.getTopStartCorner().col,o=e.getBottomEndCorner().col,{columnIndex:i,origColspan:r}=aB(cB,this).getHeaderTreeNodeData(aB(uB,this).row,aB(uB,this).col);if(e.setHighlight(aB(uB,this)),r>e.getWidth()||i<n||i+r-1>o){const t=aB(cB,this).findTopMostEntireHeaderLevel(co(n,i,i+r-1),co(o,i,i+r-1));e.highlight.row=t,e.highlight.col=e.from.col}}function MB(t){const{highlight:e}=this.hot.getSelectedRangeActive(),n=this.hot._createCellCoords(e.row+t.row,e.col+t.col);if(!(n.isHeader()&&n.col>=0))return;const o=aB(cB,this).findLeftMostColumnIndex(n.row,n.col),i=aB(cB,this).findRightMostColumnIndex(n.row,n.col);if(t.col<0){const n=e.col>=o&&e.col<=i?o-1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);t.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,e.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,e.col)-1,1)}else if(t.col>0){const n=e.col>=o&&e.col<=i?i+1:o,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);t.col=null===r?this.hot.view.countRenderableColumnsInRange(e.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(e.col,r)-1,1)}}function TB(t,e,n){const o=t.row,i=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col}),r=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col});sB(fB,this,n.clone()),e.col<t.col?(i&&(t.col=i.columnIndex+i.origColspan-1),r&&(e.col=r.columnIndex)):e.col>=t.col&&(i&&(t.col=i.columnIndex),r&&(e.col=r.columnIndex+r.origColspan-1))}function _B(t){if(aB(cB,this).getLayersCount()>0){t.length=0;for(let e=0;e<aB(cB,this).getLayersCount();e++)t.push(this.headerRendererFactory(e))}}function HB(t){const e=aB(cB,this).getLayersCount();let n=t.startColumn,o=!!e;for(let i=0;i<e;i++){const e=aB(cB,this).findLeftMostColumnIndex(i,t.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(e);if(e>=0&&(o=!1),so(r)&&r<t.startColumn){n=r;break}}t.startColumn=o?aB(cB,this).getHeaderTreeNodeData(0,n).columnIndex:n}function IB(t,e){const n=this.ghostTable.getWidth(e);return t>n?t:n}function AB(t,e,n){var o;const{label:i}=null!==(o=aB(cB,this).getHeaderTreeNodeData(n,e))&&void 0!==o?o:{label:""};return i}function PB(t,e){if(t<0)return this.hot.getCell(t,aB(cB,this).findLeftMostColumnIndex(t,e),!0)}function OB(){this.updatePlugin()}function NB(t,e){e||this.updatePlugin()}function DB(){aB(pB,this)&&(this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),sB(pB,this,!1))}function LB(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class VB{constructor(t,e){LB(this,"hot",void 0),LB(this,"data",null),LB(this,"plugin",void 0),LB(this,"parentReference",new WeakMap),LB(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=e,this.plugin=t}setData(t){this.data=t}getData(){return this.data}getRawSourceData(){let t=null;return this.plugin.disableCoreAPIModifiers(),t=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),t}updateWithData(t){this.setData(t),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},ao(0,this.data.length-1,t=>{this.cacheNode(this.data[t],0,null)})}cacheNode(t,e,n){this.cache.levels[e]||(this.cache.levels[e]=[],this.cache.levelCount+=1),this.cache.levels[e].push(t),this.cache.rows.push(t),this.cache.nodeInfo.set(t,{parent:n,row:this.cache.rows.length-1,level:e}),this.hasChildren(t)&&x(t.__children,n=>{this.cacheNode(n,e+1,t)})}getDataObject(t){return null==t?null:this.cache.rows[t]}readTreeNodes(t,e,n,o){let i=!1,r=e;if(isNaN(r)&&r.end)return r;let s=t;return s||(s={__children:this.data},i=!0,r-=1),null!=n&&r===n?{result:s,end:!0}:null!=o&&s===o?{result:r,end:!0}:(r+=1,s.__children&&x(s.__children,t=>{if(this.parentReference.set(t,i?null:s),r=this.readTreeNodes(t,r,n,o),isNaN(r)&&r.end)return!1}),r)}mockParent(){const t=this.mockNode();return t.__children=this.data,t}mockNode(){const t={};return Tt(this.data[0],(e,n)=>{t[n]=null}),t}getRowIndex(t){return null==t?null:this.cache.nodeInfo.get(t).row}getRowIndexWithinParent(t){let e=null;e=isNaN(t)?t:this.getDataObject(t);const n=this.getRowParent(t);return null==n?this.data.indexOf(e):n.__children.indexOf(e)}countAllRows(){const t={__children:this.data};return this.countChildren(t)}countChildren(t){let e=0,n=t;return isNaN(n)||(n=this.getDataObject(n)),n&&n.__children?(x(n.__children,t=>{e+=1,t.__children&&(e+=this.countChildren(t))}),e):0}getRowParent(t){let e;return e=isNaN(t)?t:this.getDataObject(t),this.getRowObjectParent(e)}getRowObjectParent(t){return t&&"object"==typeof t?this.cache.nodeInfo.get(t).parent:null}getRowLevel(t){let e=null;return e=isNaN(t)?t:this.getDataObject(t),e?this.getRowObjectLevel(e):null}getRowObjectLevel(t){return null==t?null:this.cache.nodeInfo.get(t).level}hasChildren(t){let e=t;return isNaN(e)||(e=this.getDataObject(e)),!(!e.__children||!e.__children.length)}isChild(t){return null!==this.getRowParent(t)}getChild(t,e){var n;return(null===(n=t.__children)||void 0===n?void 0:n[e])||null}isRowHighestLevel(t){return!this.isChild(t)}isParent(t){var e;let n=t;return isNaN(n)||(n=this.getDataObject(n)),n&&!!n.__children&&0!==(null===(e=n.__children)||void 0===e?void 0:e.length)}addChild(t,e){let n=e;this.hot.runHooks("beforeAddChild",t,n);let o=null;t&&(o=this.getRowIndex(t)),this.hot.runHooks("beforeCreateRow",o+this.countChildren(t)+1,1);let i=t;t||(i=this.mockParent()),i.__children||(i.__children=[]),n||(n=this.mockNode()),i.__children.push(n),this.rewriteCache();const r=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",t,n)}addChildAtIndex(t,e,n){let o,i=n;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",t,i,e),t){const n=this.getRowIndex(t)+e+1;this.hot.runHooks("beforeCreateRow",n,1),t.__children.splice(e,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(t),"__children",t.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(n,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",n,1),o=n}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",e,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),o=this.getRowIndex(this.data[e]);i=this.getDataObject(o),this.hot.runHooks("afterAddChild",t,i,e)}addSibling(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(t),o=this.getRowParent(n),i=this.getRowIndexWithinParent(n);switch(e){case"below":this.addChildAtIndex(o,i+1,null);break;case"above":this.addChildAtIndex(o,i,null)}}detachFromParent(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const o=[];Array.isArray(t)?(ao(t[0],t[2],t=>{const e=this.translateTrimmedRow(t);o.push(this.getDataObject(e))}),ao(0,o.length-2,t=>{this.detachFromParent(o[t],!1)}),n=o[o.length-1]):n=t;const i=this.getRowIndex(n),r=this.countChildren(n),s=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),h=this.getRowIndex(l);let c=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!=s){const t=Array.from(new Array(i+r+1).keys()).splice(-1*(r+1));if(this.hot.runHooks("beforeRemoveRow",i,r+1,t,this.plugin.pluginName),a.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,r+1,t,this.plugin.pluginName),l){c=h+this.countChildren(l);const t=this.getChild(l,this.countChildren(l)-1),e=this.getRowIndex(t);this.hot.runHooks("beforeCreateRow",e+1,r+1,this.plugin.pluginName),l.__children.push(n)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,r+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,r+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),e&&this.hot.render()}filterData(t,e,n){const o=[];x(n,t=>{o.push(this.getDataObject(t))}),x(o,t=>{const e=this.getRowIndexWithinParent(t),n=this.getRowParent(t);null===n?this.data.splice(e,1):n.__children.splice(e,1)}),this.rewriteCache()}spliceData(t,e,n){const o=this.getDataObject(t-1);let i=null,r=t;o&&o.__children&&0===o.__children.length?(i=o,r=0):t<this.countAllRows()&&(i=this.getRowParent(t),r=this.getRowIndexWithinParent(t)),i?n?i.__children.splice(r,e,...n):i.__children.splice(r,e):n?this.data.splice(r,e,...n):this.data.splice(r,e),this.rewriteCache()}syncRowWithRawSource(t){let e=t,n=e;do{n=this.getRowParent(n),null!==n&&(e=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(t,e,n,o){const i=e===this.hot.countRows(),r=this.getRowParent(t),s=this.getRowIndexWithinParent(t),a=r.__children.slice(s,s+1),l=t>e;let h=i?this.getRowParent(e-1):this.getRowParent(e);null==h&&(h=this.getRowParent(e-1)),null==h&&(h=this.getDataObject(e-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(e),h.__children=[]);const c=i||n||o?h.__children.length:this.getRowIndexWithinParent(e),d=r===h;h.__children.splice(c,0,a[0]),r.__children.splice(s+(l&&d?1:0),1),this.syncRowWithRawSource(r),d||this.syncRowWithRawSource(h)}translateTrimmedRow(t){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(t):t}untranslateTrimmedRow(t){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(t):t}}function BB(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class FB{constructor(t,e){BB(this,"hot",void 0),BB(this,"plugin",void 0),this.hot=e,this.plugin=t}}class WB extends FB{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(t,e){super(t,e),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(t,e){const n=this.hot.toPhysicalRow(t),o=this.dataManager.getDataObject(n);if(!o)return;const i=this.dataManager.getRowLevel(n),r=e.getElementsByTagName("DIV")[0],s=r.querySelector("span.rowHeader"),a=r.querySelectorAll('[class^="ht_nesting"]'),l=this.hot.getSettings().ariaTags;if(x(a,t=>{t&&r.removeChild(t)}),ue(e,WB.CSS_CLASSES.indicatorContainer),i){const{rootDocument:t}=this.hot,e=s.cloneNode(!0);r.innerHTML="",ao(0,i-1,()=>{const e=t.createElement("SPAN");ue(e,WB.CSS_CLASSES.emptyIndicator),r.appendChild(e)}),r.appendChild(e)}if(this.dataManager.hasChildren(o)){const t=this.hot.rootDocument.createElement("DIV");l&&fe(t,[["aria-hidden","true"]]),ue(e,WB.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(ue(t,`${WB.CSS_CLASSES.button} ${WB.CSS_CLASSES.expandButton}`),l&&fe(e,[ft(!1)])):(ue(t,`${WB.CSS_CLASSES.button} ${WB.CSS_CLASSES.collapseButton}`),l&&fe(e,[ft(!0)])),r.appendChild(t)}}updateRowHeaderWidth(t){let e=t;e||(e=this.dataManager.cache.levelCount);let n=11;n=2*this.hot.stylesHandler.getCSSVariableValue("cell-horizontal-padding"),this.rowHeaderWidthCache=Math.max(50,n+10*e+25),this.hot.render()}}class zB extends FB{constructor(t,e){var n;super(t,e),n=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.lastCollapsedRows=n.collapsedRows.slice(0),n.expandMultipleChildren(n.lastCollapsedRows,t)},shiftStash:function(t,e){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==e&&(e=1/0),x(n.lastCollapsedRows,(i,r)=>{i>=t&&i<e&&(n.lastCollapsedRows[r]=i+o)})},applyStash:function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.collapseMultipleChildren(n.lastCollapsedRows,t),n.lastCollapsedRows=void 0},trimStash:(t,e)=>{ao(t,t+e-1,t=>{const e=this.lastCollapsedRows.indexOf(t);e>-1&&this.lastCollapsedRows.splice(e,1)})}}}collapseChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];let i=null,r=null,s=null;return isNaN(t)?(i=t,r=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(t),r=t),this.dataManager.hasChildren(i)&&x(i.__children,t=>{o.push(this.dataManager.getRowIndex(t))}),s=this.collapseRows(o,!0,!1),n&&this.trimRows(s),e&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(r)&&this.collapsedRows.push(r),s}collapseMultipleChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];x(t,t=>{o.push(...this.collapseChildren(t,!1,!1))}),n&&this.trimRows(o),e&&this.renderAndAdjust()}collapseRow(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([t],e)}collapseRows(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return x(t,t=>{o.push(t),e&&this.collapseChildRows(t,o)}),n&&this.trimRows(o),o}collapseChildRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(t)){x(this.dataManager.getDataObject(t).__children,t=>{const n=this.dataManager.getRowIndex(t);e.push(n),this.collapseChildRows(n,e)})}n&&this.trimRows(e)}expandRow(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([t],e)}expandRows(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const o=[];return x(t,t=>{o.push(t),e&&this.expandChildRows(t,o)}),n&&this.untrimRows(o),o}expandChildRows(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(t)){x(this.dataManager.getDataObject(t).__children,t=>{if(!this.isAnyParentCollapsed(t)){const n=this.dataManager.getRowIndex(t);e.push(n),this.expandChildRows(n,e)}})}n&&this.untrimRows(e)}expandChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];let i=null,r=null,s=null;return isNaN(t)?(i=t,r=this.dataManager.getRowIndex(t)):(i=this.dataManager.getDataObject(t),r=t),this.collapsedRows.splice(this.collapsedRows.indexOf(r),1),this.dataManager.hasChildren(i)&&x(i.__children,t=>{const e=this.dataManager.getRowIndex(t);o.push(e)}),s=this.expandRows(o,!0,!1),n&&this.untrimRows(s),e&&this.renderAndAdjust(),s}expandMultipleChildren(t){let e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const o=[];x(t,t=>{o.push(...this.expandChildren(t,!1,!1))}),n&&this.untrimRows(o),e&&this.renderAndAdjust()}collapseAll(){const t=this.dataManager.getData(),e=[];x(t,t=>{this.dataManager.hasChildren(t)&&e.push(t)}),this.collapseMultipleChildren(e),this.renderAndAdjust()}expandAll(){const t=this.dataManager.getData(),e=[];x(t,t=>{this.dataManager.hasChildren(t)&&e.push(t)}),this.expandMultipleChildren(e),this.renderAndAdjust()}trimRows(t){this.hot.batchExecution(()=>{x(t,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!0)})},!0)}untrimRows(t){this.hot.batchExecution(()=>{x(t,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!1)})},!0)}areChildrenCollapsed(t){let e=isNaN(t)?t:this.dataManager.getDataObject(t),n=!0;return null===e&&(e={__children:this.dataManager.data}),this.dataManager.hasChildren(e)&&x(e.__children,t=>{const e=this.dataManager.getRowIndex(t);if(!this.plugin.collapsedRowsMap.getValueAtIndex(e))return n=!1,!1}),n}isAnyParentCollapsed(t){let e=t;for(;null!==e;){e=this.dataManager.getRowParent(e);const t=this.dataManager.getRowIndex(e);if(this.collapsedRows.indexOf(t)>-1)return!0}return!1}toggleState(t,e){if(e.col>=0)return;const n=this.translateTrimmedRow(e.row);de(t.target,WB.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),an(t))}translateTrimmedRow(t){return this.hot.toPhysicalRow(t)}untranslateTrimmedRow(t){return this.hot.toVisualRow(t)}renderAndAdjust(){this.hot.view.adjustElementsSize(),this.hot.render()}}function jB(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function $B(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function UB(t,e){return t.get(function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(t,e))}var YB=new WeakMap;class GB extends FB{constructor(){super(...arguments),$B(this,"dataManager",this.plugin.dataManager),jB(this,YB,{row_above:(t,e)=>{const n=e[e.length-1];this.dataManager.addSibling(n.start.row,"above")},row_below:(t,e)=>{const n=e[e.length-1];this.dataManager.addSibling(n.start.row,"below")}})}appendOptions(t){const e=[{key:"add_child",name(){return this.getTranslatedPhrase(gh)},callback:()=>{const t=this.dataManager.translateTrimmedRow(this.hot.getSelectedActive()[0]),e=this.dataManager.getDataObject(t);this.dataManager.addChild(e)},disabled:()=>{const t=this.hot.getSelectedActive();return!t||t[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(fh)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedActive())},disabled:()=>{const t=this.hot.getSelectedActive(),e=this.dataManager.translateTrimmedRow(t[0]);return!this.dataManager.getRowParent(e)||!t||t[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return ao(0,t.items.length-1,n=>{if(0===n)return x(e,(e,o)=>{t.items.splice(n+o,0,e)}),!1}),this.modifyRowInsertingOptions(t)}modifyRowInsertingOptions(t){return ao(0,t.items.length-1,e=>{const n=UB(YB,this)[t.items[e].key];null!=n&&(t.items[e].callback=n)}),t}}function KB(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qB{constructor(t){KB(this,"plugin",void 0),KB(this,"hot",void 0),KB(this,"dataManager",void 0),KB(this,"collapsingUI",void 0),this.plugin=t,this.hot=t.hot,this.dataManager=t.dataManager,this.collapsingUI=t.collapsingUI}onBeforeRowMove(t,e,n,o){if(this.displayAPICompatibilityWarning({rows:t,finalIndex:e,dropIndex:n,movePossible:o}))return!1;this.movedToCollapsed=!1;const i=n===this.hot.countRows(),r=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let s=!0;const a=t.map(t=>{if(!s)return!1;const e=this.dataManager.translateTrimmedRow(t);return s=this.shouldAllowMoving(e,r),e}),l=-1===a.indexOf(r);if(!s||!l)return!1;const h=this.getBaseParent(a),c=this.getTargetParent(i,r),d=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,r,d),this.moveRows(a,r,c),this.dataManager.rewriteCache(),this.moveCellsMeta(a,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",t,e,n,o,o&&this.isRowOrderChanged(t,e)),this.hot.render(),this.selectCells(t,n),!1}displayAPICompatibilityWarning(t){const{rows:e,finalIndex:n,dropIndex:o,movePossible:i}=t;let r=!1;return A(o)&&(Qt(T`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
269
+ when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",e,n,o,i,!1),r=!0),r}shouldAllowMoving(t,e){return!(this.dataManager.isParent(t)||this.dataManager.isRowHighestLevel(t)||t===e||0===e)}getBaseParent(t){return this.dataManager.getRowParent(t[0])}getTargetParent(t,e){let n=this.dataManager.getRowParent(t?e-1:e);return null==n&&(n=this.dataManager.getRowParent(e-1)),n}shiftCollapsibleParentsLocations(t,e,n){n||(Math.max(...t)<=e?this.collapsingUI.collapsedRowsStash.shiftStash(t[0],e,-1*t.length):this.collapsingUI.collapsedRowsStash.shiftStash(e,t[0],t.length))}moveRows(t,e,n){const o=e===this.dataManager.getRowIndex(n)+this.dataManager.countChildren(n)+1;this.hot.batchRender(()=>{t.forEach(t=>{this.dataManager.moveRow(t,e,this.movedToCollapsed,o)})})}moveCellsMeta(t,e){const n=[],o=Math.max(...t)<e;t.forEach(t=>{n.push(this.hot.getCellMetaAtRow(t))}),this.hot.spliceCellsMeta(t[0],t.length),this.hot.spliceCellsMeta(e-(o?n.length:0),0,...n)}selectCells(t,e){const n=t.length;let o=0,i=0;if(this.movedToCollapsed){let r=null;r=t[n-1]<e?this.dataManager.translateTrimmedRow(e-n):this.dataManager.translateTrimmedRow(e);const s=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),a=this.dataManager.getRowIndex(s);o=this.dataManager.untranslateTrimmedRow(a),i=o}else t[n-1]<e?(i=e-1,o=i-n+1):(o=e,i=o+n-1);this.hot.selectCells([[o,0,i,this.hot.countCols()-1]],!1)}isRowOrderChanged(t,e){return t.some((t,n)=>t-n!==e)}}function XB(t,e,n){ZB(t,e),e.set(t,n)}function ZB(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function JB(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function QB(t,e){return t.get(eF(t,e))}function tF(t,e,n){return t.set(eF(t,e),n),n}function eF(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const nF="nestedRows",oF=nF;var iF=new WeakMap,rF=new WeakMap,sF=new WeakMap,aF=new WeakSet;class lF extends DC{constructor(){var t,e;super(...arguments),ZB(t=this,e=aF),e.add(t),JB(this,"dataManager",null),JB(this,"headersUI",null),JB(this,"collapsedRowsMap",null),XB(this,iF,!1),XB(this,rF,!1),XB(this,sF,!0)}static get PLUGIN_KEY(){return nF}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[nF]}enablePlugin(){var t=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Ka),tF(sF,this,!0),this.dataManager=new VB(this,this.hot),this.collapsingUI=new zB(this,this.hot),this.headersUI=new WB(this,this.hot),this.contextMenuUI=new GB(this,this.hot),this.rowMoveController=new qB(this),this.addHook("afterInit",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,SF).call(t,...n)}),this.addHook("afterRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,RF).call(t,...n)}),this.addHook("beforeViewRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,kF).call(t,...n)}),this.addHook("modifyRowData",function(){return t.onModifyRowData(...arguments)}),this.addHook("modifySourceLength",function(){return t.onModifySourceLength(...arguments)}),this.addHook("beforeDataSplice",function(){return t.onBeforeDataSplice(...arguments)}),this.addHook("filterData",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,dF).call(t,...n)}),this.addHook("afterContextMenuDefaultOptions",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,uF).call(t,...n)}),this.addHook("afterGetRowHeader",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,gF).call(t,...n)}),this.addHook("beforeOnCellMouseDown",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,cF).call(t,...n)}),this.addHook("beforeRemoveRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,mF).call(t,...n)}),this.addHook("afterRemoveRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,pF).call(t,...n)}),this.addHook("beforeAddChild",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,bF).call(t,...n)}),this.addHook("afterAddChild",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,wF).call(t,...n)}),this.addHook("beforeDetachChild",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,vF).call(t,...n)}),this.addHook("afterDetachChild",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,yF).call(t,...n)}),this.addHook("modifyRowHeaderWidth",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,fF).call(t,...n)}),this.addHook("afterCreateRow",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,CF).call(t,...n)}),this.addHook("beforeRowMove",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return eF(aF,t,hF).call(t,...n)}),this.addHook("beforeLoadData",t=>eF(aF,this,xF).call(this,t)),this.addHook("beforeUpdateData",t=>eF(aF,this,xF).call(this,t)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const t=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(t),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:t}=this.hot.getSelectedRangeActive(),e=this.collapsingUI.translateTrimmedRow(t.row);return this.collapsingUI.areChildrenCollapsed(e)?this.collapsingUI.expandChildren(e):this.collapsingUI.collapseChildren(e),!1},runOnlyIf:()=>{var t,e;const n=null===(t=this.hot.getSelectedRangeActive())||void 0===t?void 0:t.highlight;return n&&(null===(e=this.hot.getSelectedRangeActive())||void 0===e?void 0:e.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.col&&n.row>=0},group:oF,relativeToGroup:mg,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(oF)}disableCoreAPIModifiers(){tF(rF,this,!0)}enableCoreAPIModifiers(){tF(rF,this,!1)}onModifyRowData(t){if(!QB(rF,this))return this.dataManager.getDataObject(t)}onModifySourceLength(){if(!QB(rF,this))return this.dataManager.countAllRows()}onBeforeDataSplice(t,e,n){return!(!QB(rF,this)&&!this.dataManager.isRowHighestLevel(t))||(this.dataManager.spliceData(t,e,n),!1)}destroy(){super.destroy()}}function hF(t,e,n,o){return this.rowMoveController.onBeforeRowMove(t,e,n,o)}function cF(t,e,n){this.collapsingUI.toggleState(t,e,n)}function dF(t,e,n){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(n[0],e),this.collapsingUI.collapsedRowsStash.shiftStash(n[0],null,-1*e),this.dataManager.filterData(t,e,n),tF(iF,this,!0),this.dataManager.getData().slice()}function uF(t){return this.contextMenuUI.appendOptions(t)}function gF(t,e){this.headersUI.appendLevelIndicators(t,e)}function fF(t){return Math.max(this.headersUI.rowHeaderWidthCache,t)}function pF(t,e,n,o){o!==this.pluginName&&this.hot._registerTimeout(()=>{tF(iF,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function mF(t,e,n){const o=Array.from(n.reduce((t,e)=>{if(this.dataManager.isParent(e)){const n=this.dataManager.getDataObject(e).__children;return t.add(e),Array.isArray(n)&&n.forEach(e=>t.add(this.dataManager.getRowIndex(e))),t}return t.add(e)},new Set));n.length=0,n.push(...o)}function bF(){this.collapsingUI.collapsedRowsStash.stash()}function wF(t,e){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(e)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function vF(){this.collapsingUI.collapsedRowsStash.stash()}function yF(t,e,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function CF(){this.dataManager.rewriteCache()}function SF(){this.headersUI.updateRowHeaderWidth()}function RF(){QB(sF,this)&&this.hot.view&&(tF(sF,this,!1),this.hot.rootWindow.requestAnimationFrame(()=>{this.hot&&this.hot.view&&!this.hot.isDestroyed&&this.hot.view.adjustElementsSize(!0)}))}function kF(t,e){QB(iF,this)&&(e.skipRender=!0)}function xF(t){if(!function(t){return!!(Array.isArray(t)&&t.length&&t.every(t=>"object"==typeof t&&!Array.isArray(t)&&null!==t))}(t))return ee("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[nF]=!1,void this.disablePlugin();this.dataManager.setData(t),this.dataManager.rewriteCache()}function EF(t,e,n){MF(t,e),e.set(t,n)}function MF(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function TF(t,e){return t.get(HF(t,e))}function _F(t,e,n){return t.set(HF(t,e),n),n}function HF(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var IF=new WeakMap,AF=new WeakMap,PF=new WeakMap,OF=new WeakMap,NF=new WeakMap,DF=new WeakMap,LF=new WeakMap,VF=new WeakMap,BF=new WeakSet;class FF{constructor(t){let{rootElement:e,uiContainer:n,isRtl:o,themeName:i,phraseTranslator:r,shouldHaveBorder:s,a11yAnnouncer:a}=t;var l,h;MF(l=this,h=BF),h.add(l),EF(this,IF,void 0),EF(this,AF,void 0),EF(this,PF,!1),EF(this,OF,void 0),EF(this,NF,void 0),EF(this,DF,void 0),EF(this,LF,void 0),EF(this,VF,void 0),_F(IF,this,e),_F(AF,this,n),_F(PF,this,o),_F(NF,this,i),_F(DF,this,r),_F(LF,this,s),_F(VF,this,a),this.install()}install(){var t;if(null!==(t=TF(OF,this))&&void 0!==t&&t.container)return;const e=_`${'\n<div data-ref="container" class="ht-pagination handsontable">\n <div class="ht-pagination__inner">\n <div data-ref="pageSizeSection" class="ht-page-size-section">\n <span data-ref="pageSizeLabel" class="ht-page-size-section__label"></span>\n <div class="ht-page-size-section__select-wrapper">\n <select data-ref="pageSizeSelect" name="pageSize" data-hot-input></select>\n </div>\n </div>\n <div data-ref="pageCounterSection" class="ht-page-counter-section"></div>\n <nav data-ref="pageNavSection" class="ht-page-navigation-section">\n <button data-ref="first" class="ht-page-navigation-section__button ht-page-first"></button>\n <button data-ref="prev" class="ht-page-navigation-section__button ht-page-prev"></button>\n <span data-ref="pageNavLabel" class="ht-page-navigation-section__label"></span>\n <button data-ref="next" class="ht-page-navigation-section__button ht-page-next"></button>\n <button data-ref="last" class="ht-page-navigation-section__button ht-page-last"></button>\n </nav>\n </div>\n</div>\n'}`,{container:n,first:o,prev:i,next:r,last:s,pageSizeSelect:a}=e.refs;_F(OF,this,e.refs),n.setAttribute("dir",TF(PF,this)?"rtl":"ltr"),n.tabIndex=-1;const l=(t,e,n)=>{e.addEventListener(t,t=>{(t=>t.currentTarget.disabled)(t)||n()})};l("click",o,()=>this.runLocalHooks("firstPageClick")),l("click",i,()=>this.runLocalHooks("prevPageClick")),l("click",r,()=>this.runLocalHooks("nextPageClick")),l("click",s,()=>this.runLocalHooks("lastPageClick")),a.addEventListener("change",()=>{const t="auto"===a.value?"auto":Number.parseInt(a.value,10);this.runLocalHooks("pageSizeChange",t)}),this.setCounterSectionVisibility(!1),this.setNavigationSectionVisibility(!1),this.setPageSizeSectionVisibility(!1),TF(AF,this)?(TF(AF,this).appendChild(e.fragment),ue(n,[TF(NF,this),"handsontable"])):TF(IF,this).after(e.fragment)}getContainer(){return TF(OF,this).container}getFocusableElements(){const{first:t,prev:e,next:n,last:o,pageSizeSelect:i}=TF(OF,this);return[i,t,e,n,o].filter(t=>!t.disabled)}updateWidth(t){return TF(OF,this).container.style.width=`${t}px`,this}updateTheme(t){if(_F(NF,this,t),TF(AF,this)){const{container:t}=TF(OF,this);ge(t,/ht-theme-.*/g),TF(NF,this)&&ue(t,TF(NF,this))}return this}getHeight(){return TF(OF,this).container.offsetHeight}refreshBorderState(){const{container:t}=TF(OF,this);return TF(AF,this)||TF(LF,this).call(this)?ue(t,"ht-pagination--bordered"):ge(t,"ht-pagination--bordered"),this}updateState(t){let{currentPage:e,totalPages:n,firstVisibleRowIndex:o,lastVisibleRowIndex:i,totalRenderedRows:r,pageSizeList:s,pageSize:a,autoPageSize:l}=t;const{first:h,prev:c,next:d,last:u,pageCounterSection:g,pageNavSection:f,pageNavLabel:p,pageSizeSelect:m,pageSizeLabel:b}=TF(OF,this),w=TF(DF,this).call(this,ic,{start:o+1,end:i+1,total:r}),v=TF(DF,this).call(this,rc,{currentPage:e,totalPages:n}),y=TF(DF,this).call(this,oc);g.textContent=w,p.textContent=v,m.textContent="",b.textContent=`${y}:`,fe(f,[st(TF(DF,this).call(this,ec))]),fe(m,[st(TF(DF,this).call(this,oc))]),TF(VF,this).call(this,v),this.refreshBorderState(),s.forEach(t=>{const e="auto"===t?TF(DF,this).call(this,nc):t,n=new Option(e,t);(l&&"auto"===t||!l&&t===a)&&(n.selected=!0),m.add(n)});const C=1===e,S=e===n;if("none"!==f.style.display){const t=TF(IF,this).ownerDocument.activeElement;C?(ue(h,"ht-page-navigation-section__button--disabled"),ue(c,"ht-page-navigation-section__button--disabled"),h.disabled=!0,c.disabled=!0):(ge(h,"ht-page-navigation-section__button--disabled"),ge(c,"ht-page-navigation-section__button--disabled"),h.disabled=!1,c.disabled=!1),S?(ue(d,"ht-page-navigation-section__button--disabled"),ue(u,"ht-page-navigation-section__button--disabled"),d.disabled=!0,u.disabled=!0):(ge(d,"ht-page-navigation-section__button--disabled"),ge(u,"ht-page-navigation-section__button--disabled"),d.disabled=!1,u.disabled=!1),[h,c,d,u].includes(t)&&(c.disabled?d.focus():d.disabled&&c.focus())}return fe(h,[st(TF(DF,this).call(this,sc)),lt(C)]),fe(c,[st(TF(DF,this).call(this,ac)),lt(C)]),fe(d,[st(TF(DF,this).call(this,lc)),lt(S)]),fe(u,[st(TF(DF,this).call(this,hc)),lt(S)]),this}setPageSizeSectionVisibility(t){const{pageSizeSection:e,pageSizeSelect:n}=TF(OF,this);return e.style.display=t?"":"none",n.disabled=!t,HF(BF,this,WF).call(this),this}setCounterSectionVisibility(t){return TF(OF,this).pageCounterSection.style.display=t?"":"none",HF(BF,this,WF).call(this),this}setNavigationSectionVisibility(t){const{pageNavSection:e,first:n,prev:o,next:i,last:r}=TF(OF,this);return e.style.display=t?"":"none",n.disabled=!t,o.disabled=!t,i.disabled=!t,r.disabled=!t,HF(BF,this,WF).call(this),this}destroy(){var t;null===(t=TF(OF,this))||void 0===t||t.container.remove(),_F(OF,this,null)}}function WF(){const{container:t,pageSizeSection:e,pageCounterSection:n,pageNavSection:o}=TF(OF,this),i="none"!==e.style.display||"none"!==n.style.display||"none"!==o.style.display;TF(AF,this)||(i?ue(TF(IF,this).querySelector(".ht-wrapper"),"htPagination"):ge(TF(IF,this).querySelector(".ht-wrapper"),"htPagination")),t.style.display=i?"":"none"}kt(FF,os);const zF=["nestedRows","mergeCells","fixedRowsTop","fixedRowsBottom"];function jF(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $F(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const UF=new Map([["fixed",class{constructor(){jF(this,"pageSize",1),jF(this,"totalItems",0),jF(this,"totalPages",0)}calculate(t){let{pageSize:e,totalItems:n}=t;this.pageSize=Math.max(e,1),this.totalItems=n,this.totalPages=Math.max(1,Math.ceil(this.totalItems/this.pageSize))}getTotalPages(){return this.totalPages}getState(t){if((t-=1)<0||t>=this.getTotalPages())return;const e=t*this.pageSize;return{startIndex:e,endIndex:Math.max(0,Math.min(e+this.pageSize-1,this.totalItems-1)),pageSize:this.pageSize}}}],["auto",class{constructor(){$F(this,"pages",[])}calculate(t){let{itemsSizeProvider:e,viewportSizeProvider:n}=t;const o=e(),i=n(),r=[];let s=0,a=0,l=0;for(let t=0;t<o.length;t++){const e=o[t];l>0&&a+e>=i&&(r.push({startIndex:s,endIndex:t-1,pageSize:l}),s=t,a=0,l=0),a+=e,l+=1}r.push({startIndex:s,endIndex:Math.max(0,o.length-1),pageSize:l}),this.pages=r}getTotalPages(){return this.pages.length}getState(t){if(!((t-=1)<0||t>=this.getTotalPages()))return this.pages[t]}}]]);function YF(t){UF.has(t)||wt(`Unknown pagination strategy type: ${t}`);return new(UF.get(t))}function GF(t,e,n){KF(t,e),e.set(t,n)}function KF(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qF(t,e){return t.get(ZF(t,e))}function XF(t,e,n){return t.set(ZF(t,e),n),n}function ZF(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const JF="pagination",QF=`plugin:${JF}`,tW=T`The \`auto\` page size setting requires the \`autoRowSize\`\x20
270
+ plugin to be enabled. Set the \`autoRowSize: true\` in the configuration to ensure correct behavior.`;var eW=new WeakMap,nW=new WeakMap,oW=new WeakMap,iW=new WeakMap,rW=new WeakMap,sW=new WeakMap,aW=new WeakMap,lW=new WeakSet,hW=new WeakMap;class cW extends DC{constructor(){var t,e;super(...arguments),KF(t=this,e=lW),e.add(t),GF(this,eW,null),GF(this,nW,1),GF(this,oW,10),GF(this,iW,null),GF(this,rW,null),GF(this,sW,!1),GF(this,aW,!1),GF(this,hW,()=>{var t;!qF(sW,this)&&null!==(t=this.hot)&&void 0!==t&&t.view&&ZF(lW,this,uW).call(this)})}static get PLUGIN_KEY(){return JF}static get PLUGIN_PRIORITY(){return 900}static get DEFAULT_SETTINGS(){return{pageSize:10,pageSizeList:["auto",5,10,20,50,100],initialPage:1,showPageSize:!0,showCounter:!0,showNavigation:!0,uiContainer:null}}isEnabled(){return!!this.hot.getSettings()[JF]}enablePlugin(){var t,e=this;if(function(t){return zF.some(e=>{const n=!!t[e];return n&&Qt(T`The \`pagination\` plugin cannot be used with the \`${e}\` option.\x20
271
+ This combination is not supported. The plugin will remain disabled.`),n})}(this.hot.getSettings()))return void(this.hot.getSettings()[JF]=!1);if(this.enabled)return;const n=this.hot.getSettings()[JF];void 0!==(null==n?void 0:n.initialPage)&&XF(nW,this,this.getSetting("initialPage")),void 0!==(null==n?void 0:n.pageSize)&&XF(oW,this,this.getSetting("pageSize")),XF(eW,this,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding",!1)),"auto"!==qF(oW,this)||null!==(t=this.hot.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||Qt(tW),XF(rW,this,YF("auto"===qF(oW,this)?"auto":"fixed")),qF(iW,this)||(XF(iW,this,new FF({rootElement:this.hot.rootGridElement,uiContainer:this.getSetting("uiContainer"),isRtl:this.hot.isRtl(),themeName:this.hot.getCurrentThemeName(),phraseTranslator:function(){return e.hot.getTranslatedPhrase(...arguments)},shouldHaveBorder:()=>ZF(lW,this,gW).call(this),a11yAnnouncer:t=>function(t){hf&&(hf.textContent="",setTimeout(()=>{hf&&(hf.textContent=t)},100))}(t)})),ZF(lW,this,dW).call(this),qF(iW,this).addLocalHook("firstPageClick",()=>this.firstPage()).addLocalHook("prevPageClick",()=>this.prevPage()).addLocalHook("nextPageClick",()=>this.nextPage()).addLocalHook("lastPageClick",()=>this.lastPage()).addLocalHook("pageSizeChange",t=>this.setPageSize(t))),this.addHook("init",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,RW).call(e,...n)},-1),this.addHook("beforeSelectAll",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,mW).call(e,...n)}),this.addHook("beforeSelectColumns",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,mW).call(e,...n)}),this.addHook("beforeSetRangeEnd",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,bW).call(e,...n)}),this.addHook("beforeSelectionHighlightSet",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,wW).call(e,...n)}),this.addHook("beforePaste",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,vW).call(e,...n)}),this.addHook("afterViewRender",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,yW).call(e,...n)}),this.addHook("afterRender",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,CW).call(e,...n)}),this.addHook("afterScrollVertically",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,kW).call(e,...n)}),this.addHook("afterLanguageChange",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,xW).call(e,...n)}),this.addHook("beforeHeightChange",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,SW).call(e,...n)}),this.addHook("afterSetTheme",function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return ZF(lW,e,EW).call(e,...n)}),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",qF(hW,this)),ZF(lW,this,fW).call(this),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),ZF(lW,this,uW).call(this),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",qF(hW,this)).unregisterMap(this.pluginName),ZF(lW,this,pW).call(this),qF(iW,this).destroy(),XF(iW,this,null),super.disablePlugin()}getPaginationData(){const t=qF(rW,this).getTotalPages();let e=-1,n=-1;const{pageSize:o,startIndex:i}=qF(rW,this).getState(qF(nW,this)),r=this.hot.countRows();let s=0;for(let t=i;s<o&&!(t>=r);t++)this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(t))||(-1===e&&(e=t),n=t,s+=1);return{currentPage:qF(nW,this),totalPages:t,pageSize:o,pageSizeList:[...this.getSetting("pageSizeList")],autoPageSize:"auto"===qF(oW,this),numberOfRenderedRows:this.hot.rowIndexMapper.getRenderableIndexesLength(),firstVisibleRowIndex:e,lastVisibleRowIndex:n}}setPage(t){const e=qF(nW,this);!1!==this.hot.runHooks("beforePageChange",e,t)&&(XF(nW,this,t),ZF(lW,this,uW).call(this),this.hot.scrollViewportTo({row:0}),this.hot.runHooks("afterPageChange",e,qF(nW,this)),this.hot.view.adjustElementsSize(),this.hot.render())}resetPage(){this.setPage(this.getSetting("initialPage"))}setPageSize(t){var e;const n=qF(oW,this);!1!==this.hot.runHooks("beforePageSizeChange",n,t)&&("auto"!==t||null!==(e=this.hot.getPlugin("autoRowSize"))&&void 0!==e&&e.enabled||Qt(tW),XF(rW,this,YF("auto"===t?"auto":"fixed")),XF(oW,this,t),ZF(lW,this,uW).call(this),this.hot.runHooks("afterPageSizeChange",n,qF(oW,this)),this.hot.view.adjustElementsSize(),this.hot.render())}resetPageSize(){this.setPageSize(this.getSetting("pageSize"))}resetPagination(){this.resetPage(),this.resetPageSize(),ZF(lW,this,dW).call(this)}nextPage(){this.setPage(qF(nW,this)+1)}prevPage(){this.setPage(qF(nW,this)-1)}firstPage(){this.setPage(1)}lastPage(){this.setPage(qF(rW,this).getTotalPages())}hasPreviousPage(){return qF(nW,this)>1}hasNextPage(){return qF(nW,this)<qF(rW,this).getTotalPages()}getCurrentPageData(){const{firstVisibleRowIndex:t,lastVisibleRowIndex:e}=this.getPaginationData();return-1===t||-1===e?[]:this.hot.getData(t,0,e,this.hot.countCols()-1)}showPageSizeSection(){qF(iW,this).setPageSizeSectionVisibility(!0),this.hot.runHooks("afterPageSizeVisibilityChange",!0)}hidePageSizeSection(){qF(iW,this).setPageSizeSectionVisibility(!1),this.hot.runHooks("afterPageSizeVisibilityChange",!1)}showPageCounterSection(){qF(iW,this).setCounterSectionVisibility(!0),this.hot.runHooks("afterPageCounterVisibilityChange",!0)}hidePageCounterSection(){qF(iW,this).setCounterSectionVisibility(!1),this.hot.runHooks("afterPageCounterVisibilityChange",!1)}showPageNavigationSection(){qF(iW,this).setNavigationSectionVisibility(!0),this.hot.runHooks("afterPageNavigationVisibilityChange",!0)}hidePageNavigationSection(){qF(iW,this).setNavigationSectionVisibility(!1),this.hot.runHooks("afterPageNavigationVisibilityChange",!1)}destroy(){var t;XF(eW,this,null),XF(rW,this,null),null===(t=qF(iW,this))||void 0===t||t.destroy(),XF(iW,this,null),super.destroy()}}function dW(){this.getSetting("showPageSize")?this.showPageSizeSection():this.hidePageSizeSection(),this.getSetting("showCounter")?this.showPageCounterSection():this.hidePageCounterSection(),this.getSetting("showNavigation")?this.showPageNavigationSection():this.hidePageNavigationSection()}function uW(){XF(sW,this,!0),qF(eW,this).clear();const t=this.hot.rowIndexMapper.getRenderableIndexes(),e=t.length,{stylesHandler:n}=this.hot;qF(rW,this).calculate({pageSize:qF(oW,this),totalItems:e,viewportSizeProvider:()=>{const{view:t}=this.hot;if(t.isVerticallyScrollableByWindow()){const e=getComputedStyle(this.hot.rootDocument.body),n=Number.parseInt(e.marginTop,10)+Number.parseInt(e.marginBottom,10),o=this.hot.hasColHeaders()?t._wt.wtTable.getColumnHeaderHeight():0,i=qF(iW,this).getHeight();return t.getWorkspaceHeight()-i-o-n}const e=t.hasHorizontalScroll()?Fe():0;return t.getViewportHeight()-e},itemsSizeProvider:()=>this.hot.rowIndexMapper.getRenderableIndexes().map(t=>{var e;const o=this.hot.toVisualRow(t);return null!==(e=this.hot.getRowHeight(o))&&void 0!==e?e:n.getDefaultRowHeight(o)})});const o=qF(rW,this).getTotalPages();if(XF(nW,this,co(qF(nW,this),1,o)),t.length>0){const{startIndex:e,pageSize:n}=qF(rW,this).getState(qF(nW,this));t.splice(e,n)}t.length>0?this.hot.batchExecution(()=>{t.forEach(t=>qF(eW,this).setValueAtIndex(t,!0))},!0):this.hot.rowIndexMapper.updateCache(!0),XF(sW,this,!1);const i=this.getPaginationData();qF(iW,this).updateState({...i,totalRenderedRows:e})}function gW(){if(!this.hot.view)return!0;const{view:t}=this.hot;if(t.isVerticallyScrollableByWindow())return!1;if(t.hasHorizontalScroll()||t.getTableHeight()<t.getWorkspaceHeight())return!0;const{lastVisibleRowIndex:e}=this.getPaginationData();return t.getLastFullyVisibleRow()!==e}function fW(){this.hot.getFocusScopeManager().registerScope(JF,qF(iW,this).getContainer(),{shortcutsContextName:QF,runOnlyIf:()=>this.getSetting("showPageSize")||this.getSetting("showNavigation"),onActivate:t=>{const e=qF(iW,this).getFocusableElements();e.length>0&&("tab_from_above"===t?e.at(0).focus():"tab_from_below"===t&&e.at(-1).focus())}})}function pW(){this.hot.getFocusScopeManager().unregisterScope(JF)}function mW(t,e){const{firstVisibleRowIndex:n,lastVisibleRowIndex:o}=this.getPaginationData();(qF(nW,this)>1||t.row>=0)&&(t.row=n),e.row=o}function bW(t){if(this.hot.selection.isSelectedByColumnHeader()){const{lastVisibleRowIndex:e}=this.getPaginationData();t.row=e}}function wW(){if(!this.hot.getSettings().navigableHeaders)return;const t=this.hot.getSelectedRangeLast();if(!t.isSingle()){const{highlight:e}=t;e.row=co(e.row,t.getTopStartCorner().row,t.getBottomEndCorner().row)}}function vW(t,e){const{firstVisibleRowIndex:n,lastVisibleRowIndex:o}=this.getPaginationData();if(-1===n||-1===o)return!1;e.forEach(e=>{let{startRow:n}=e;if(0===t.length)return;const i=Math.min(t.length-(o-n+1),t.length);t.splice(0,i)})}function yW(){"auto"!==qF(oW,this)||qF(aW,this)?XF(aW,this,!1):(ZF(lW,this,uW).call(this),XF(aW,this,!0),this.hot.view.adjustElementsSize(),this.hot.render())}function CW(){const{view:t}=this.hot,e=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();qF(iW,this).updateWidth(e).refreshBorderState()}function SW(t){if(this.getSetting("uiContainer"))return t;if(!("number"==typeof t||"string"==typeof t&&/^\d+$/.test(t)||"string"==typeof t&&t.endsWith("px")))return t;return`calc(${"string"==typeof t&&t.endsWith("px")?t:`${t}px`} - ${qF(iW,this).getHeight()}px)`}function RW(){"auto"!==qF(oW,this)&&ZF(lW,this,uW).call(this)}function kW(){qF(iW,this).refreshBorderState()}function xW(){ZF(lW,this,uW).call(this)}function EW(t){qF(iW,this).updateTheme(t)}function MW(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function TW(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function _W(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const HW="search",IW=function(t,e,n,o,i){t.getCellMeta(e,n).isSearchResult=i},AW=function(t,e,n){return!(A(t)||null===t||!t.toLocaleLowerCase||0===t.length)&&(!A(e)&&null!==e&&-1!==e.toString().toLocaleLowerCase(n.locale).indexOf(t.toLocaleLowerCase(n.locale)))};var PW=new WeakSet;class OW extends DC{constructor(){super(...arguments),MW(this,PW),TW(this,"callback",IW),TW(this,"queryMethod",AW),TW(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return HW}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[HW]}enablePlugin(){var t=this;if(this.enabled)return;const e=this.hot.getSettings()[HW];this.updatePluginSettings(e),this.addHook("beforeRenderer",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return _W(PW,t,NW).call(t,...n)}),super.enablePlugin()}disablePlugin(){var t=this;const e=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return _W(PW,t,NW).call(t,...n)};this.hot.addHook("beforeRenderer",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",e)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const o=this.hot.countRows(),i=this.hot.countCols(),r=[],s=this.hot;return ao(0,o-1,o=>{ao(0,i-1,i=>{const a=this.hot.getDataAtCell(o,i),l=this.hot.getCellMeta(o,i),h=l.search.callback||e,c=(l.search.queryMethod||n)(t,a,l);if(c){const t={row:o,col:i,data:a};r.push(t)}h&&h(s,o,i,a,c)})}),r}getCallback(){return this.callback}setCallback(t){this.callback=t}getQueryMethod(){return this.queryMethod}setQueryMethod(t){this.queryMethod=t}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(t){this.searchResultClass=t}updatePluginSettings(t){Et(t)&&(t.searchResultClass&&this.setSearchResultClass(t.searchResultClass),t.queryMethod&&this.setQueryMethod(t.queryMethod),t.callback&&this.setCallback(t.callback))}destroy(){super.destroy()}}function NW(t,e,n,o,i,r){const s=r.className||[];let a=[];"string"==typeof s?a=s.split(" "):a.push(...s),this.isEnabled()&&r.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),r.className=a.join(" ")}function DW(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class LW{constructor(t){DW(this,"viewportWidth",void 0),DW(this,"overwriteColumnWidthFn",void 0),DW(this,"baseWidths",new Map),DW(this,"stretchedWidths",new Map),this.overwriteColumnWidthFn=t}prepare(t){let{viewportWidth:e}=t;this.viewportWidth=e,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(t,e){this.baseWidths.set(t,e)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}}class VW extends LW{calculate(){const t=Array.from(this.baseWidths).reduce((t,e)=>{let[,n]=e;return t+n},0);if(this.viewportWidth-t<0)return void this.stretchedWidths.clear();const e=this.viewportWidth/t,n=[],o=[];let i=this.viewportWidth,r=0;if(this.baseWidths.forEach((t,s)=>{const a=Math.round(t*e),l=this.overwriteColumnWidthFn(a,s);a===l&&a>=ri?(n.push([s,l]),r+=l):a!==l&&(n.push([s,l]),o.push(s),i-=l)}),i<=ri)return void this.stretchedWidths.clear();const s=i/r;let a=-1,l=0;n.forEach((t,e)=>{let[i,r]=t,h=r;o.includes(i)||(h=Math.round(r*s)),this.stretchedWidths.set(i,h),a=i,e<n.length-1&&(l+=h)}),this.stretchedWidths.size>1&&this.stretchedWidths.set(a,Math.round(this.viewportWidth-l))}}function BW(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function FW(t,e){return t.get(zW(t,e))}function WW(t,e,n){return t.set(zW(t,e),n),n}function zW(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var jW=new WeakMap,$W=new WeakMap;class UW extends LW{constructor(){super(...arguments),BW(this,jW,0),BW(this,$W,-1)}prepare(t){super.prepare(t),WW(jW,this,0),WW($W,this,-1)}setColumnBaseWidth(t,e){super.setColumnBaseWidth(t,e),WW($W,this,t),WW(jW,this,e)}calculate(){if(-1===FW($W,this))return;const t=Array.from(this.baseWidths).reduce((t,e)=>{let[,n]=e;return t+n},0),e=Math.max(this.viewportWidth-t+FW(jW,this),0);this.stretchedWidths.set(FW($W,this),e)}}function YW(t,e,n){GW(t,e),e.set(t,n)}function GW(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KW(t,e){return t.get(XW(t,e))}function qW(t,e,n){return t.set(XW(t,e),n),n}function XW(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var ZW=new WeakMap,JW=new WeakMap,QW=new WeakMap,tz=new WeakMap,ez=new WeakSet;class nz{constructor(t){var e,n;GW(e=this,n=ez),n.add(e),YW(this,ZW,void 0),YW(this,JW,void 0),YW(this,QW,new Map([["all",new VW(XW(ez,this,rz).bind(this))],["last",new UW(XW(ez,this,rz).bind(this))]])),YW(this,tz,"none"),qW(ZW,this,t),qW(JW,this,KW(ZW,this).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}useStrategy(t){qW(tz,this,KW(QW,this).has(t)?t:"none")}refreshStretching(){"none"!==KW(tz,this)?KW(ZW,this).batchExecution(()=>{KW(JW,this).clear();const t=KW(QW,this).get(KW(tz,this));let e=KW(ZW,this).view.getViewportWidth();XW(ez,this,oz).call(this)&&(e-=Fe(KW(ZW,this).rootDocument)),t.prepare({viewportWidth:e});for(let e=0;e<KW(ZW,this).countCols();e++)KW(ZW,this).columnIndexMapper.isHidden(KW(ZW,this).toPhysicalColumn(e))||t.setColumnBaseWidth(e,XW(ez,this,iz).call(this,e));t.calculate(),t.getWidths().forEach(t=>{let[e,n]=t;KW(JW,this).setValueAtIndex(KW(ZW,this).toPhysicalColumn(e),n)})},!0):KW(JW,this).clear()}getStretchedWidth(t){return KW(JW,this).getValueAtIndex(KW(ZW,this).toPhysicalColumn(t))}}function oz(){const{view:t,stylesHandler:e}=KW(ZW,this);if(t.isVerticallyScrollableByWindow())return!1;const n=t.getViewportHeight(),o=KW(ZW,this).countRows(),i=e.getDefaultRowHeight();let r=0,s=!1;for(let t=0;t<o;t++){var a;if(!KW(ZW,this).rowIndexMapper.isHidden(KW(ZW,this).toPhysicalRow(t))&&(r+=null!==(a=KW(ZW,this).getRowHeight(t))&&void 0!==a?a:i,r>n)){s=!0;break}}return s}function iz(t){var e;return null!==(e=KW(ZW,this).getColWidth(t,"StretchColumns"))&&void 0!==e?e:ri}function rz(t,e){return KW(ZW,this).runHooks("beforeStretchingColumnWidth",t,e)}function sz(t,e,n){az(t,e),e.set(t,n)}function az(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lz(t,e,n){return t.set(cz(t,e),n),n}function hz(t,e){return t.get(cz(t,e))}function cz(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var dz=new WeakMap,uz=new WeakMap,gz=new WeakMap,fz=new WeakSet;class pz extends DC{constructor(){var t,e;super(...arguments),az(t=this,e=fz),e.add(t),sz(this,dz,new nz(this.hot)),sz(this,uz,null),sz(this,gz,new ResizeObserver(t=>{requestAnimationFrame(()=>{var e;null!==(e=this.hot)&&void 0!==e&&e.view.isHorizontallyScrollableByWindow()&&t.forEach(t=>{let{contentRect:e}=t;null!==hz(uz,this)&&hz(uz,this)!==e.width&&(this.hot.view.adjustElementsSize(),this.hot.refreshDimensions()),lz(uz,this,e.width)})})}))}static get PLUGIN_KEY(){return"stretchColumns"}static get PLUGIN_PRIORITY(){return 155}static get SETTING_KEYS(){return!0}isEnabled(){return["all","last"].includes(this.hot.getSettings().stretchH)}enablePlugin(){var t=this;this.enabled||(hz(dz,this).useStrategy(this.hot.getSettings().stretchH),hz(gz,this).observe(this.hot.rootElement),this.addHook("beforeRender",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return cz(fz,t,bz).call(t,...n)}),this.addHook("modifyColWidth",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return cz(fz,t,mz).call(t,...n)},10),super.enablePlugin())}updatePlugin(){hz(dz,this).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),hz(gz,this).unobserve(this.hot.rootElement)}getColumnWidth(t){return hz(dz,this).getStretchedWidth(t)}destroy(){hz(gz,this).disconnect(),lz(gz,this,null),lz(dz,this,null),super.destroy()}}function mz(t,e,n){if(n===this.pluginName)return;const o=this.getColumnWidth(e);return"number"==typeof o?o:t}function bz(t){t&&hz(dz,this).refreshStretching()}function wz(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function vz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function yz(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}var Cz=new WeakSet;class Sz extends DC{constructor(){super(...arguments),wz(this,Cz),vz(this,"scrollbars",[]),vz(this,"clones",[]),vz(this,"lockedCollection",!1),vz(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return"touchScroll"}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return Bt()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>yz(Cz,this,Rz).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>yz(Cz,this,kz).call(this)),this.addHook("afterMomentumScroll",()=>yz(Cz,this,xz).call(this))}}function Rz(){if(this.lockedCollection)return;const{topOverlay:t,bottomOverlay:e,inlineStartOverlay:n,topInlineStartCornerOverlay:o,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(t),e.clone&&this.scrollbars.push(e),this.scrollbars.push(n),o&&this.scrollbars.push(o),i&&i.clone&&this.scrollbars.push(i),this.clones=[],t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),o&&this.clones.push(o.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function kz(){this.freezeOverlays=!0,x(this.clones,t=>{ue(t,"hide-tween")})}function xz(){this.freezeOverlays=!1,x(this.clones,t=>{ge(t,"hide-tween"),ue(t,"show-tween")}),this.hot._registerTimeout(()=>{x(this.clones,t=>{ge(t,"show-tween")})},400),x(this.scrollbars,t=>{t.refresh(),t.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function Ez(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function Mz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const Tz="trimRows";var _z=new WeakSet;class Hz extends DC{constructor(){super(...arguments),Ez(this,_z),Mz(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return Tz}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[Tz]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Ka),this.trimmedRowsMap.addLocalHook("init",()=>function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(_z,this,Iz).call(this)),super.enablePlugin())}updatePlugin(){const t=this.hot.getSettings()[Tz];Array.isArray(t)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),x(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(t){const e=this.getTrimmedRows(),n=this.isValidConfig(t);let o=e;n&&(o=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeTrimRow",e,o,n)&&(n&&this.hot.batchExecution(()=>{x(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0),this.hot.runHooks("afterTrimRow",e,o,n,n&&o.length>e.length))}trimRow(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.trimRows(e)}untrimRows(t){const e=this.getTrimmedRows(),n=this.isValidConfig(t);let o=e;const i=this.trimmedRowsMap.getValues().slice(),r=t.length>0;n&&r&&(x(t,t=>{i[t]=!1}),o=S(i,(t,e,n)=>(e&&t.push(n),t),[]));!1!==this.hot.runHooks("beforeUntrimRow",e,o,n&&r)&&(n&&r&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",e,o,n&&r,n&&o.length<e.length))}untrimRow(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.untrimRows(e)}isTrimmed(t){return this.trimmedRowsMap.getValueAtIndex(t)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(t){const e=this.hot.countSourceRows();return t.every(t=>Number.isInteger(t)&&t>=0&&t<e)}destroy(){super.destroy()}}function Iz(){const t=this.hot.getSettings()[Tz];Array.isArray(t)&&this.hot.batchExecution(()=>{x(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0)}function Az(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Pz{constructor(t){Az(this,"actionType",""),this.actionType=t}undo(){wt("Not implemented")}redo(){wt("Not implemented")}}function Oz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Nz extends Pz{constructor(t){let{stateBefore:e,range:n,type:o,alignment:i}=t;super("cell_alignment"),Oz(this,"stateBefore",void 0),Oz(this,"range",void 0),Oz(this,"type",void 0),Oz(this,"alignment",void 0),this.stateBefore=e,this.range=n,this.type=o,this.alignment=i}static startRegisteringEvents(t,e){t.addHook("beforeCellAlignment",(t,n,o,i)=>{e.done(()=>new Nz({stateBefore:t,range:n,type:o,alignment:i}))})}undo(t,e){x(this.range,e=>{e.forAll((e,n)=>{e>=0&&n>=0&&t.setCellMeta(e,n,"className",this.stateBefore[e][n]||" htLeft")})}),t.addHookOnce("afterViewRender",e),t.render()}redo(t,e){Gk(this.range,this.type,this.alignment,(e,n)=>t.getCellMeta(e,n),(e,n,o,i)=>t.setCellMeta(e,n,o,i)),t.addHookOnce("afterViewRender",e),t.render()}}function Dz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Lz extends Pz{constructor(t){let{columns:e,finalIndex:n}=t;super("col_move"),Dz(this,"columns",void 0),Dz(this,"finalColumnIndex",void 0),this.columns=e.slice(),this.finalColumnIndex=n}static startRegisteringEvents(t,e){t.addHook("beforeColumnMove",(t,n)=>{!1!==t&&e.done(()=>new Lz({columns:t,finalIndex:n}))})}undo(t,e){const n=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e);mA(this.columns,this.finalColumnIndex,t.columnIndexMapper.getNumberOfIndexes()).reverse().forEach(t=>{let{from:e,to:o}=t;e<o&&(o-=1),n.moveColumn(o,e)}),t.render(),t.deselectCell(),t.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)}redo(t,e){const n=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e),n.moveColumns(this.columns.slice(),this.finalColumnIndex),t.render(),t.deselectCell(),t.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)}}function Vz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Bz extends Pz{constructor(t){let{currentSortState:e,newSortState:n}=t;super("col_sort"),Vz(this,"previousSortState",void 0),Vz(this,"nextSortState",void 0),this.previousSortState=e,this.nextSortState=n}static startRegisteringEvents(t,e){t.addHook("beforeColumnSort",(t,n,o)=>{o&&e.done(()=>new Bz({currentSortState:t,newSortState:n}))})}undo(t,e){const n=t.getPlugin("columnSorting"),o=t.getPlugin("multiColumnSorting"),i=o.isEnabled()?o:n;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),e()}redo(t,e){const n=t.getPlugin("columnSorting"),o=t.getPlugin("multiColumnSorting");(o.isEnabled()?o:n).sort(this.nextSortState),e()}}function Fz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Wz extends Pz{constructor(t){let{index:e,amount:n}=t;super("insert_col"),Fz(this,"index",void 0),Fz(this,"amount",void 0),this.index=e,this.amount=n}static startRegisteringEvents(t,e){t.addHook("afterCreateCol",(t,n,o)=>{e.done(()=>new Wz({index:t,amount:n}),o)})}undo(t,e){t.addHookOnce("afterRemoveCol",e),t.alter("remove_col",this.index,this.amount,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterCreateCol",e),t.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")}}function zz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class jz extends Pz{constructor(t){let{index:e,amount:n}=t;super("insert_row"),zz(this,"index",void 0),zz(this,"amount",void 0),this.index=e,this.amount=n}static startRegisteringEvents(t,e){t.addHook("afterCreateRow",(t,n,o)=>{e.done(()=>new jz({index:t,amount:n}),o)})}undo(t,e){const n=t.countRows(),o=t.getSettings().minSpareRows;this.index>=n&&this.index-o<n&&(this.index-=o),t.addHookOnce("afterRemoveRow",e),t.alter("remove_row",this.index,this.amount,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterCreateRow",e),t.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")}}function $z(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Uz extends Pz{constructor(t){let{changes:e,selected:n,countCols:o,countRows:i}=t;super("change"),$z(this,"changes",void 0),$z(this,"selected",void 0),$z(this,"countCols",void 0),$z(this,"countRows",void 0),this.changes=e,this.selected=n,this.countCols=o,this.countRows=i}static startRegisteringEvents(t,e){t.addHook("beforeChange",function(n,o){const i=n&&n.length;if(!i)return;n.find(t=>{if(null===t)return!1;const[,,e,n]=t;return e!==n});e.done(()=>{const e=n.reduce((t,e)=>(null!==e&&t.push([...e]),t),[]);if(0===e.length)return null;e.forEach(e=>{e[1]=t.propToCol(e[1])});const o=i>1?this.getSelected():[[e[0][0],e[0][1]]];return new Uz({changes:e,selected:o,countCols:t.countCols(),countRows:t.countRows()})},o)},e.constructor.PLUGIN_PRIORITY)}undo(t,e){const n=St(this.changes);for(let t=0,e=n.length;t<e;t++)n[t].splice(3,1);t.addHookOnce("afterChange",()=>{const n=t.countRows()-this.countRows;n>0&&t.alter("remove_row",null,n,"UndoRedo.undo");const o=t.countCols()-this.countCols;o>0&&t.isColumnModificationAllowed()&&t.alter("remove_col",null,o,"UndoRedo.undo"),t.scrollToFocusedCell(),t.selectCells(this.selected,!1,!1),e()}),t.setDataAtCell(n,null,null,"UndoRedo.undo")}redo(t,e){const n=St(this.changes);for(let t=0,e=n.length;t<e;t++)n[t].splice(2,1);t.addHookOnce("afterChange",()=>{t.selectCells(this.selected,!1,!1),e()}),t.setDataAtCell(n,null,null,"UndoRedo.redo")}}function Yz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Gz extends Pz{constructor(t){let{conditionsStack:e,previousConditionsStack:n}=t;super("filter"),Yz(this,"conditionsStack",void 0),Yz(this,"previousConditionsStack",void 0),this.conditionsStack=e,this.previousConditionsStack=n}static startRegisteringEvents(t,e){t.addHook("beforeFilter",(t,n)=>{e.done(()=>new Gz({conditionsStack:t,previousConditionsStack:n}))})}undo(t,e){const n=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),n.importConditions(this.previousConditionsStack),n.filter()}redo(t,e){const n=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),n.importConditions(this.conditionsStack),n.filter()}}function Kz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class qz extends Pz{constructor(t){let{data:e,cellRange:n}=t;super("merge_cells"),Kz(this,"cellRange",void 0),this.cellRange=n,this.data=e}static startRegisteringEvents(t,e){t.addHook("beforeMergeCells",(n,o)=>{if(o)return;const i=n.getTopStartCorner(),r=n.getBottomEndCorner(),s=t.getData(i.row,i.col,r.row,r.col);e.done(()=>new qz({data:s,cellRange:n}))})}undo(t,e){const n=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),n.unmergeRange(this.cellRange,!0);const o=this.cellRange.getTopStartCorner();t.populateFromArray(o.row,o.col,this.data,void 0,void 0,"MergeCells")}redo(t,e){const n=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),n.mergeRange(this.cellRange)}}function Xz(t,e,n,o,i){const r=[];return ao(o,i,o=>{ao(e,n,e=>{const n=t.getCellMeta(e,o);r.push([n.visualRow,n.visualCol,n])})}),r}function Zz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Jz extends Pz{constructor(t){let{index:e,indexes:n,data:o,amount:i,headers:r,columnPositions:s,rowPositions:a,fixedColumnsStart:l,removedCellMetas:h}=t;super("remove_col"),Zz(this,"index",void 0),Zz(this,"indexes",void 0),Zz(this,"data",void 0),Zz(this,"amount",void 0),Zz(this,"headers",void 0),Zz(this,"columnPositions",void 0),Zz(this,"rowPositions",void 0),Zz(this,"fixedColumnsStart",void 0),Zz(this,"removedCellMetas",void 0),this.index=e,this.indexes=n,this.data=o,this.amount=i,this.headers=r,this.columnPositions=s.slice(0),this.rowPositions=a.slice(0),this.fixedColumnsStart=l,this.removedCellMetas=h}static startRegisteringEvents(t,e){t.addHook("beforeRemoveCol",(n,o,i,r)=>{e.done(()=>{const e=t.getSourceDataArray(),i=(t.countCols()+n)%t.countCols(),r=i+o-1,s=[],a=[],l=[];return ao(e.length-1,n=>{const o=[],a=e[n];ao(i,r,e=>{o.push(a[t.toPhysicalColumn(e)])}),s.push(o)}),ao(o-1,e=>{l.push(t.toPhysicalColumn(i+e))}),Array.isArray(t.getSettings().colHeaders)&&ao(o-1,e=>{a.push(t.getSettings().colHeaders[t.toPhysicalColumn(i+e)]||null)}),new Jz({index:i,indexes:l,data:s,amount:o,headers:a,columnPositions:t.columnIndexMapper.getIndexesSequence(),rowPositions:t.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:t.getSettings().fixedColumnsStart,removedCellMetas:Xz(t,0,t.countRows(),i,r)})},r)})}undo(t,e){t.getSettings().fixedColumnsStart=this.fixedColumnsStart;const n=this.indexes.slice(0).sort(),o=(t,e,o)=>o[this.indexes.indexOf(n[e])],i=this.data.length,r=[];for(let t=0;t<i;t++)r.push(k(this.data[t],o));const s=k(this.headers,o),a=[];t.columnIndexMapper.setIndexesSequence(this.columnPositions),t.alter("insert_col_start",t.toVisualColumn(this.indexes[0]),this.indexes.length,"UndoRedo.undo"),t.batchExecution(()=>{t.rowIndexMapper.setIndexesSequence(this.rowPositions),t.columnIndexMapper.setIndexesSequence(this.columnPositions)},!0),x(t.getSourceDataArray(),(t,e)=>{x(n,(n,o)=>{t[n]=r[e][o],a.push([e,n,t[n]])})}),void 0!==this.headers&&x(s,(e,o)=>{t.getSettings().colHeaders[n[o]]=e}),this.removedCellMetas.forEach(e=>{let[n,o,i]=e;t.setCellMetaObject(n,o,i)}),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(a,null,null,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterRemoveCol",e),t.alter("remove_col",this.index,this.amount,"UndoRedo.redo")}}function Qz(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class tj extends Pz{constructor(t){let{index:e,data:n,fixedRowsBottom:o,fixedRowsTop:i,rowIndexesSequence:r,removedCellMetas:s}=t;super("remove_row"),Qz(this,"index",void 0),Qz(this,"data",void 0),Qz(this,"fixedRowsBottom",void 0),Qz(this,"fixedRowsTop",void 0),Qz(this,"rowIndexesSequence",void 0),Qz(this,"removedCellMetas",void 0),this.index=e,this.data=n,this.fixedRowsBottom=o,this.fixedRowsTop=i,this.rowIndexesSequence=r,this.removedCellMetas=s}static startRegisteringEvents(t,e){t.addHook("beforeRemoveRow",(n,o,i,r)=>{e.done(()=>{const e=t.toPhysicalRow(n),i=e+o-1,r=St(t.getSourceData(e,0,e+o-1,t.countSourceCols()-1));return new tj({index:e,data:r,fixedRowsBottom:t.getSettings().fixedRowsBottom,fixedRowsTop:t.getSettings().fixedRowsTop,rowIndexesSequence:t.rowIndexMapper.getIndexesSequence(),removedCellMetas:Xz(t,e,i,0,t.countCols()-1)})},r)})}undo(t,e){const n=t.getSettings(),o=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach((t,e)=>{Object.keys(t).forEach(n=>{const i=parseInt(n,10);o.push([this.index+e,isNaN(i)?n:i,t[n]])})}),t.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),t.alter("insert_row_above",t.toVisualRow(this.index),this.data.length,"UndoRedo.undo"),t.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),this.removedCellMetas.forEach(e=>{let[n,o,i]=e;t.setCellMetaObject(n,o,i)}),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(o,null,null,"UndoRedo.undo")}redo(t,e){t.addHookOnce("afterRemoveRow",e),t.alter("remove_row",t.toVisualRow(this.index),this.data.length,"UndoRedo.redo")}}function ej(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class nj extends Pz{constructor(t){let{rows:e,finalIndex:n}=t;super("row_move"),ej(this,"rows",void 0),ej(this,"finalRowIndex",void 0),this.rows=e.slice(),this.finalRowIndex=n}static startRegisteringEvents(t,e){t.addHook("beforeRowMove",(t,n)=>{!1!==t&&e.done(()=>new nj({rows:t,finalIndex:n}))})}undo(t,e){const n=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e);mA(this.rows,this.finalRowIndex,t.rowIndexMapper.getNumberOfIndexes()).reverse().forEach(t=>{let{from:e,to:o}=t;e<o&&(o-=1),n.moveRow(o,e)}),t.render(),t.deselectCell(),t.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)}redo(t,e){const n=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e),n.moveRows(this.rows.slice(),this.finalRowIndex),t.render(),t.deselectCell(),t.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)}}function oj(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ij extends Pz{constructor(t){let{cellRange:e}=t;super("unmerge_cells"),oj(this,"cellRange",void 0),this.cellRange=e}static startRegisteringEvents(t,e){t.addHook("afterUnmergeCells",(t,n)=>{n||e.done(()=>new ij({cellRange:t}))})}undo(t,e){const n=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),n.mergeRange(this.cellRange,!0)}redo(t,e){const n=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),n.unmergeRange(this.cellRange,!0),t.render()}}function rj(t,e){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}function sj(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e);if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const aj="undoRedo";Mn.getSingleton().register("beforeUndo"),Mn.getSingleton().register("afterUndo"),Mn.getSingleton().register("beforeRedo"),Mn.getSingleton().register("afterRedo");var lj=new WeakSet;class hj extends DC{static get PLUGIN_KEY(){return"undoRedo"}static get PLUGIN_PRIORITY(){return 1e3}static get SETTING_KEYS(){return!0}constructor(t){var e,n;super(t),rj(this,lj),sj(this,"doneActions",[]),sj(this,"undoneActions",[]),sj(this,"ignoreNewActions",!1),e=t,n=this,[Nz,Lz,Bz,Wz,jz,Uz,Gz,qz,Jz,tj,nj,ij].forEach(t=>t.startRegisteringEvents(e,n))}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){var t=this;this.enabled||(this.addHook("afterChange",function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return function(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}(lj,t,cj).call(t,...n)}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("grid"),e={runOnlyIf:t=>!t.altKey,group:aj};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(aj)}done(t,e){if(this.ignoreNewActions)return;if("UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e)return;const n=this.doneActions.slice();if(!1===this.hot.runHooks("beforeUndoStackChange",n,e))return;const o=t(),i=this.undoneActions.slice();null!==o&&this.doneActions.push(o),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",i),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",i,this.undoneActions.slice())}undo(){if(!this.isUndoAvailable())return;const t=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",t);const e=this.doneActions.pop();this.hot.runHooks("afterUndoStackChange",t,this.doneActions.slice());const n=St(e);if(!1===this.hot.runHooks("beforeUndo",n))return;this.ignoreNewActions=!0;const o=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",o),e.undo(this.hot,()=>{this.ignoreNewActions=!1,this.undoneActions.push(e)}),this.hot.runHooks("afterRedoStackChange",o,this.undoneActions.slice()),this.hot.runHooks("afterUndo",n)}redo(){if(!this.isRedoAvailable())return;const t=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",t);const e=this.undoneActions.pop();this.hot.runHooks("afterRedoStackChange",t,this.undoneActions.slice());const n=St(e);if(!1===this.hot.runHooks("beforeRedo",n))return;this.ignoreNewActions=!0;const o=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",o),e.redo(this.hot,()=>{this.ignoreNewActions=!1,this.doneActions.push(e)}),this.hot.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.hot.runHooks("afterRedo",n)}isUndoAvailable(){return this.doneActions.length>0}isRedoAvailable(){return this.undoneActions.length>0}clear(){this.doneActions.length=0,this.undoneActions.length=0}destroy(){this.clear(),this.doneActions=null,this.undoneActions=null,super.destroy()}}function cj(t,e){"loadData"===e&&this.clear()}const dj="ht-dialog";const uj=new Map([["base",function(){let t=null;const e={};return{TEMPLATE_NAME:"base",dialogA11YOptions:()=>({role:"dialog"}),compile:function(){const n=_`${`\n <div data-ref="contentElement" class="${dj}__content"></div>\n `}`;return Object.assign(e,n.refs),t=n.fragment,n},focusableElements:function(){return null===t&&wt("Compile the template first."),[]}}}],["confirm",function(t){let{id:e="",title:n="",description:o="",buttons:i=[]}=t,r=null;const s={};return{TEMPLATE_NAME:"confirm",dialogA11YOptions:()=>({role:"alertdialog",ariaLabelledby:`${e}-dialog-confirm-title`,ariaDescribedby:o?`${e}-dialog-confirm-description`:void 0}),compile:function(){const t=_`${`\n <div tabindex="-1" data-ref="contentElement" class="${dj}__content-wrapper-inner">\n <div class="${dj}__content">\n <h2\n id="${e}-dialog-confirm-title"\n class="${dj}__title">${q(n)}</h2>\n <p\n id="${e}-dialog-confirm-description"\n class="${dj}__description">${q(o)}</p>\n </div>\n ${i.length>0?`\n <div data-ref="buttonsContainer" class="${dj}__buttons">\n ${i.map(t=>`\n <button class="ht-button ht-button--${t.type}">${q(t.text)}</button>\n `).join("")}\n </div>\n `:""}\n </div>\n `}`;return Object.assign(s,t.refs),r=t.fragment,t},focusableElements:function(){null===r&&wt("Compile the template first.");const{contentElement:t,buttonsContainer:e}=s,n=[];return e?n.push(...Array.from(e.children)):n.push(t),n}}}]]);function gj(t,e,n){fj(t,e),e.set(t,n)}function fj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pj(t,e){return t.get(bj(t,e))}function mj(t,e,n){return t.set(bj(t,e),n),n}function bj(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const wj=`\n<div data-ref="dialogElement" class="${dj}">\n <div data-ref="dialogWrapperElement" class="${dj}__content-wrapper">\n</div>\n`;var vj=new WeakMap,yj=new WeakMap,Cj=new WeakMap,Sj=new WeakMap,Rj=new WeakMap,kj=new WeakMap,xj=new WeakMap,Ej=new WeakSet;class Mj{constructor(t){let{rootElement:e,isRtl:n,sanitizer:o}=t;var i,r;fj(i=this,r=Ej),r.add(i),gj(this,vj,void 0),gj(this,yj,void 0),gj(this,Cj,!1),gj(this,Sj,!1),gj(this,Rj,uj.get("base")),gj(this,kj,[]),gj(this,xj,void 0),mj(vj,this,e),mj(Cj,this,n),mj(xj,this,o),this.install()}useTemplate(t){var e;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!uj.has(t)||"base"===t){wt(T`Invalid template: ${t}.\x20
272
+ Valid templates are: ${Array.from(uj.keys()).filter(t=>"base"!==t).join(", ")}.`)}mj(Rj,this,uj.get(t)(n)),mj(kj,this,(null!==(e=n.buttons)&&void 0!==e?e:[]).map(t=>t.callback))}useDefaultTemplate(){mj(Rj,this,uj.get("base")()),mj(kj,this,[])}install(){var t;if(null!==(t=pj(yj,this))&&void 0!==t&&t.dialogElement)return;const e=_`${wj}`;mj(yj,this,e.refs);const{dialogElement:n}=pj(yj,this);fe(n,[["aria-modal","true"],["dir",pj(Cj,this)?"rtl":"ltr"]]),n.addEventListener("transitionstart",()=>bj(Ej,this,_j).call(this)),n.addEventListener("transitionend",()=>bj(Ej,this,Tj).call(this)),pj(vj,this).after(e.fragment)}getContainer(){return pj(yj,this).dialogElement}getFocusableElements(){return pj(Rj,this).focusableElements()}updateDialog(t){let{isVisible:e,content:n,customClassName:o,background:i,contentBackground:r,animation:s,a11y:a}=t;const l=pj(Rj,this).compile(),{dialogElement:h,dialogWrapperElement:c}=pj(yj,this);c.innerHTML="",c.appendChild(l.fragment),Object.assign(pj(yj,this),l.refs);const{contentElement:d,buttonsContainer:u}=pj(yj,this);"base"!==pj(Rj,this).TEMPLATE_NAME&&Object.assign(a,pj(Rj,this).dialogA11YOptions());const g=o?` ${o}`:"",f=i?` ${dj}--background-${i}`:"",p=s?` ${dj}--animation`:"",m=e?` ${dj}--show`:"";var b;h.className=[dj,`${dj}--${pj(Rj,this).TEMPLATE_NAME}`,"handsontable",g,f,p,m].join(" "),fe(h,["base"===pj(Rj,this).TEMPLATE_NAME?J(-1):void 0]),fe(h,["alertdialog"===a.role?["role","alertdialog"]:["role","dialog"]]),a.ariaLabel&&!a.ariaLabelledby?fe(h,[a.ariaLabel?st(a.ariaLabel):void 0]):pe(h,"aria-label"),a.ariaLabelledby?fe(h,[(b=a.ariaLabelledby,["aria-labelledby",b])]):pe(h,"aria-labelledby"),a.ariaDescribedby?fe(h,[at(a.ariaDescribedby)]):pe(h,"aria-describedby");return ue(d,`${dj}__content${r?` ${dj}__content--background`:""}`),"base"===pj(Rj,this).TEMPLATE_NAME?(d.innerHTML="","string"==typeof n?Ce(d,n,pj(xj,this)):(n instanceof HTMLElement||n instanceof DocumentFragment)&&d.appendChild(n)):u&&Array.from(u.children).forEach((t,e)=>{const n=pj(kj,this)[e];n&&t.addEventListener("click",n)}),this}showDialog(t){const{dialogElement:e}=pj(yj,this);return e.style.display="block",t&&e.offsetHeight,ue(e,`${dj}--show`),mj(Sj,this,!1),this}hideDialog(t){const{dialogElement:e}=pj(yj,this);return ge(e,`${dj}--show`),(t&&!pj(Sj,this)||!t)&&(e.style.display="none"),mj(Sj,this,!1),this}focusDialog(){pj(yj,this).dialogElement.focus()}updateWidth(t){return pj(yj,this).dialogElement.style.width=`${t}px`,this}updateHeight(t){return pj(yj,this).dialogElement.style.height=`calc(100% - ${t}px)`,this}destroyDialog(){var t;null===(t=pj(yj,this))||void 0===t||t.dialogElement.remove(),mj(yj,this,null)}}function Tj(){const{dialogElement:t}=pj(yj,this);de(t,`${dj}--show`)||(t.style.display="none")}function _j(){mj(Sj,this,!0)}function Hj(t,e,n){Ij(t,e),e.set(t,n)}function Ij(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Aj(t,e,n){return t.set(Oj(t,e),n),n}function Pj(t,e){return t.get(Oj(t,e))}function Oj(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}kt(Mj,os);const Nj="dialog",Dj=Nj,Lj=`plugin:${Nj}`;var Vj=new WeakMap,Bj=new WeakMap,Fj=new WeakMap,Wj=new WeakSet;class zj extends DC{constructor(){var t,e;super(...arguments),Ij(t=this,e=Wj),e.add(t),Hj(this,Vj,null),Hj(this,Bj,!1),Hj(this,Fj,null)}static get PLUGIN_KEY(){return Nj}static get PLUGIN_PRIORITY(){return 360}static get DEFAULT_SETTINGS(){return{template:null,content:"",customClassName:"",background:"solid",contentBackground:!1,animation:!0,closable:!1,a11y:{role:"dialog",ariaLabel:"Dialog",ariaLabelledby:"",ariaDescribedby:""}}}static get SETTINGS_VALIDATORS(){return{template:t=>Et(t)&&typeof["alert","confirm"].includes(t.type)&&"string"==typeof t.title&&(void 0===(null==t?void 0:t.description)||"string"==typeof(null==t?void 0:t.description))&&(void 0===(null==t?void 0:t.buttons)||Array.isArray(null==t?void 0:t.buttons)&&t.buttons.every(t=>"object"==typeof t&&"string"==typeof t.text&&["primary","secondary"].includes(t.type)&&(void 0===t.callback||"function"==typeof t.callback))),content:t=>"string"==typeof t||"undefined"!=typeof HTMLElement&&t instanceof HTMLElement||"undefined"!=typeof DocumentFragment&&t instanceof DocumentFragment,customClassName:t=>"string"==typeof t,background:t=>["solid","semi-transparent"].includes(t),contentBackground:t=>"boolean"==typeof t,animation:t=>"boolean"==typeof t,closable:t=>"boolean"==typeof t,a11y:t=>Et(t)&&(void 0===(null==t?void 0:t.role)||["dialog","alertdialog"].includes(null==t?void 0:t.role))&&(void 0===(null==t?void 0:t.ariaLabel)||"string"==typeof(null==t?void 0:t.ariaLabel))&&(void 0===(null==t?void 0:t.ariaLabelledby)||"string"==typeof(null==t?void 0:t.ariaLabelledby))&&(void 0===(null==t?void 0:t.ariaDescribedby)||"string"==typeof(null==t?void 0:t.ariaDescribedby))}}isEnabled(){return!!this.hot.getSettings()[Nj]}enablePlugin(){this.enabled||(Pj(Vj,this)||Aj(Vj,this,new Mj({rootElement:this.hot.rootGridElement,sanitizer:this.hot.getSettings().sanitizer,isRtl:this.hot.isRtl()})),Oj(Wj,this,jj).call(this),Oj(Wj,this,Uj).call(this),this.addHook("afterViewRender",()=>Oj(Wj,this,Gj).call(this)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),Oj(Wj,this,$j).call(this),Oj(Wj,this,Yj).call(this),super.disablePlugin()}isVisible(){return Pj(Bj,this)}show(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.enabled&&(this.isVisible()?this.update(t):(this.hot.runHooks("beforeDialogShow"),this.update(t),Pj(Vj,this).showDialog(this.getSetting("animation")),Aj(Bj,this,!0),this.hot.getFocusScopeManager().activateScope(Nj),Aj(Fj,this,this.hot.selection.exportSelection()),this.hot.deselectCell(),this.hot.runHooks("afterDialogShow")))}hide(){var t;this.isVisible()&&(this.hot.runHooks("beforeDialogHide"),Pj(Vj,this).hideDialog(this.getSetting("animation")),Aj(Bj,this,!1),this.hot.getFocusScopeManager().deactivateScope(Nj),(null===(t=Pj(Fj,this))||void 0===t?void 0:t.ranges.length)>0?(this.hot.selection.importSelection(Pj(Fj,this)),this.hot.view.render(),Aj(Fj,this,null)):this.hot.selectCell(0,0),this.hot.runHooks("afterDialogHide"))}update(t){if(!this.enabled)return;this.updatePluginSettings(t);const e=this.getSetting("template");e!==zj.DEFAULT_SETTINGS.template&&this.getSetting("content")!==zj.DEFAULT_SETTINGS.content&&wt("The `template` option cannot be used together with the `content` option."),e?Pj(Vj,this).useTemplate(e.type,{id:this.hot.guid,...e}):Pj(Vj,this).useDefaultTemplate(),Pj(Vj,this).updateDialog({isVisible:this.isVisible(),content:this.getSetting("content"),customClassName:this.getSetting("customClassName"),background:this.getSetting("background"),contentBackground:this.getSetting("contentBackground"),animation:this.getSetting("animation"),a11y:this.getSetting("a11y")})}showAlert(t,e){const{title:n="Alert",description:o}=Et(t)?t:{title:t};this.show({template:{type:"confirm",title:n,description:o,buttons:[{text:this.hot.getTranslatedPhrase(El),type:"primary",callback:function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null==e?void 0:e(...n)}}]},contentBackground:!1,background:"solid",animation:!0,closable:!1})}showConfirm(t,e,n){const{title:o="Confirm",description:i}=Et(t)?t:{title:t};this.show({template:{type:"confirm",title:o,description:i,buttons:[{text:this.hot.getTranslatedPhrase(Ml),type:"secondary",callback:function(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];return null==n?void 0:n(...e)}},{text:this.hot.getTranslatedPhrase(El),type:"primary",callback:function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return null==e?void 0:e(...n)}}]},contentBackground:!0,background:"semi-transparent",animation:!0,closable:!1})}focus(){Pj(Vj,this).focusDialog()}destroy(){var t;null===(t=Pj(Vj,this))||void 0===t||t.destroyDialog(),Aj(Vj,this,null),Aj(Bj,this,!1),Aj(Fj,this,null),super.destroy()}}function jj(){var t;const e=this.hot.getShortcutManager(),n=null!==(t=e.getContext(Lj))&&void 0!==t?t:e.addContext(Lj);n.addShortcut({keys:[["Escape"]],callback:()=>{this.hide()},runOnlyIf:()=>Pj(Bj,this)&&this.getSetting("closable"),group:Dj}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],preventDefault:!1,callback:t=>{this.hot._registerTimeout(()=>{t.shiftKey?this.hot.runHooks("dialogFocusPreviousElement"):this.hot.runHooks("dialogFocusNextElement")})},group:Dj})}function $j(){this.hot.getShortcutManager().getContext(Lj).removeShortcutsByGroup(Dj)}function Uj(){this.hot.getFocusScopeManager().registerScope(Nj,Pj(Vj,this).getContainer(),{shortcutsContextName:Lj,type:"modal",runOnlyIf:()=>this.isVisible(),onActivate:t=>{const e=this.hot.isListening(),n=Pj(Vj,this).getFocusableElements();n.length>0?"tab_from_above"===t?n.at(0).focus():"tab_from_below"===t&&n.at(-1).focus():"tab_from_above"!==t&&"tab_from_below"!==t&&e&&!Pj(Vj,this).getContainer().contains(this.hot.rootDocument.activeElement)&&Pj(Vj,this).getContainer().focus(),e&&this.hot.runHooks("afterDialogFocus","unknown"===t?"show":t)}})}function Yj(){this.hot.getFocusScopeManager().unregisterScope(Nj)}function Gj(){const{view:t,rootWrapperElement:e,rootWindow:n}=this.hot,o=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();Pj(Vj,this).updateWidth(o);const i=e.querySelector(".hot-display-license-info");if(i){const t=i.offsetHeight,e=Number.parseFloat(n.getComputedStyle(i).marginTop);Pj(Vj,this).updateHeight(t+e)}}function Kj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qj(t,e,n){return t.set(Zj(t,e),n),n}function Xj(t,e){return t.get(Zj(t,e))}function Zj(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const Jj="loading",Qj=`ht-${Jj}`;var t$=new WeakMap,e$=new WeakSet;class n$ extends DC{constructor(){var t,e;super(...arguments),Kj(t=this,e=e$),e.add(t),function(t,e,n){Kj(t,e),e.set(t,n)}(this,t$,null)}static get PLUGIN_KEY(){return Jj}static get PLUGIN_PRIORITY(){return 350}static get DEFAULT_SETTINGS(){return{icon:`<svg class="${Qj}__icon-svg" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="currentColor" stroke-width="2" d="M15 8a7 7 0 1 1-3.5-6.062"></path></svg>`,title:void 0,description:""}}static get SETTINGS_VALIDATORS(){return{icon:t=>"string"==typeof t,title:t=>"string"==typeof t,description:t=>"string"==typeof t}}isEnabled(){return!!this.hot.getSettings()[Jj]}enablePlugin(){if(!this.enabled){var t;if(null===Xj(t$,this))qj(t$,this,this.hot.getPlugin("dialog")),null!==(t=Xj(t$,this))&&void 0!==t&&t.isEnabled()||(this.hot.getSettings().dialog=!0),this.hot.addHook("afterDialogFocus",()=>Zj(e$,this,o$).call(this));super.enablePlugin()}}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),super.disablePlugin()}isVisible(){var t,e;return null!==(t=null===(e=Xj(t$,this))||void 0===e?void 0:e.isVisible())&&void 0!==t&&t}show(){var t;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isEnabled()||!Xj(t$,this)||null===(t=Xj(t$,this))||void 0===t||!t.isEnabled())return;if(this.isVisible())return void this.update(e);!1!==this.hot.runHooks("beforeLoadingShow")&&(this.update(e),Xj(t$,this).show(),this.hot.runHooks("afterLoadingShow"))}hide(){var t;if(!Xj(t$,this)||null===(t=Xj(t$,this))||void 0===t||!t.isEnabled()||!this.isVisible())return;!1!==this.hot.runHooks("beforeLoadingHide")&&(Xj(t$,this).hide(),this.hot.runHooks("afterLoadingHide"))}update(t){var e,n;if(!this.isEnabled()||!Xj(t$,this)||null===(e=Xj(t$,this))||void 0===e||!e.isEnabled())return;this.updatePluginSettings(t);const o=this.hot.guid,i=this.getSetting("icon"),r=null!==(n=this.getSetting("title"))&&void 0!==n?n:this.hot.getTranslatedPhrase(fc),s=this.getSetting("description"),a=function(t){let{id:e,icon:n,title:o,description:i}=t;return`\n <div class="${Qj}__content">\n <i class="${Qj}__icon">${n}</i>\n <div class="${Qj}__text">\n <h2 id="${e}-${Jj}-title" class="${Qj}__title">${o}</h2>\n ${i?`<p id="${e}-${Jj}-description" class="${Qj}__description">${i}</p>`:""}\n </div>\n </div>\n `}({id:o,icon:i,title:r,description:s});Xj(t$,this).update({content:a,customClassName:Qj,background:0===this.hot.countSourceRows()?"solid":"semi-transparent",a11y:{role:"alertdialog",ariaLabelledby:`${o}-${Jj}-title`,ariaDescribedby:s?`${o}-${Jj}-description`:void 0}})}destroy(){qj(t$,this,null),super.destroy()}}function o$(){Xj(t$,this).focus()}function i$(t,e,n){(function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.set(t,n)}function r$(t,e){return t.get(a$(t,e))}function s$(t,e,n){return t.set(a$(t,e),n),n}function a$(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const l$="ht-empty-data-state",h$=`<div data-ref="emptyDataStateElement" class="${l$} handsontable">\n <div class="${l$}__content-wrapper">\n <div data-ref="emptyDataStateInner" class="${l$}__content-wrapper-inner"></div>\n </div>\n</div>`;var c$=new WeakMap,d$=new WeakMap,u$=new WeakMap,g$=new WeakMap;class f${constructor(t){let{rootElement:e,rootDocument:n}=t;i$(this,c$,void 0),i$(this,d$,void 0),i$(this,u$,void 0),i$(this,g$,void 0),s$(c$,this,e),s$(d$,this,n),this.install()}install(){var t;if(null!==(t=r$(u$,this))&&void 0!==t&&t.emptyDataStateElement)return;const e=_`${h$}`;s$(u$,this,e.refs);const{emptyDataStateInner:n,emptyDataStateElement:o}=r$(u$,this);fe(n,[J(-1)]),fe(o,[J(-1)]),r$(c$,this).after(e.fragment)}getElement(){var t;return null===(t=r$(u$,this))||void 0===t?void 0:t.emptyDataStateElement}getFocusableElements(){const{emptyDataStateButtons:t,emptyDataStateInner:e}=r$(u$,this),n=Array.from(null==t?void 0:t.children);return 0===n.length?[e]:n}show(){var t;null!==(t=r$(u$,this))&&void 0!==t&&t.emptyDataStateElement&&(r$(u$,this).emptyDataStateElement.style.display="block")}hide(){var t,e;null!==(t=r$(u$,this))&&void 0!==t&&t.emptyDataStateElement&&(null===(e=r$(g$,this))||void 0===e||e.remove(),s$(g$,this,null),r$(u$,this).emptyDataStateElement.style.display="none")}updateContent(t){var e;const{emptyDataStateInner:n}=r$(u$,this);let o="";o="string"==typeof t?{title:t}:{title:null==t?void 0:t.title,description:null==t?void 0:t.description,buttons:null==t?void 0:t.buttons};const i=_`${(t=>{let{title:e,description:n,buttons:o}=t;return`\n <div class="${l$}__content">\n ${e?`<h2 class="${l$}__title">${q(e)}</h2>`:""}\n ${n?`<p class="${l$}__description">${q(n)}</p>`:""}\n </div>\n <div\n data-ref="emptyDataStateButtons"\n class="${l$}__buttons${(null==o?void 0:o.length)>0?` ${l$}__buttons--has-buttons`:""}"\n >${(null==o?void 0:o.length)>0?o.map(t=>`<button class="ht-button ht-button--${t.type}">${q(t.text)}</button>`).join(""):""}</div>`})(o)}`;s$(u$,this,{...r$(u$,this),...i.refs}),n.innerHTML="",n.appendChild(i.fragment),(null===(e=o.buttons)||void 0===e?void 0:e.length)>0&&Array.from(r$(u$,this).emptyDataStateButtons.children).forEach((t,e)=>{t.addEventListener("click",o.buttons[e].callback)})}updateClassNames(t){const{emptyDataStateElement:e}=r$(u$,this);t.countRenderableColumns()>0&&t.getColumnHeadersCount()>0?ue(e,`${l$}--disable-top-border`):ge(e,`${l$}--disable-top-border`),t.countRenderableRows()>0&&t.getRowHeadersCount()>0?ue(e,`${l$}--disable-inline-border`):ge(e,`${l$}--disable-inline-border`),t.hasHorizontalScroll()&&!t.isHorizontallyScrollableByWindow()?ue(e,`${l$}--disable-bottom-border`):ge(e,`${l$}--disable-bottom-border`)}updateSize(t){const{emptyDataStateElement:e}=r$(u$,this),n=t.hasHorizontalScroll()?Fe(t.hot.rootDocument):0,o=t.countRenderableRows(),i=t.countRenderableColumns(),r=t.getColumnHeadersCount();var s;(e.style.top=i>0?`${t.getColumnHeaderHeight()}px`:"0px",e.style.insetInlineStart=o>0?`${t.getRowHeaderWidth()}px`:"0px",0===o)?(r$(g$,this)||(s$(g$,this,r$(d$,this).createElement("div")),r$(g$,this).classList.add(`${l$}-placeholder`),t._wt.wtTable.holder.appendChild(r$(g$,this))),r$(g$,this).style.width="100%",r$(g$,this).style.height="150px"):(null===(s=r$(g$,this))||void 0===s||s.remove(),s$(g$,this,null));let a=t.getWorkspaceWidth(),l=t.getTableHeight();t.isHorizontallyScrollableByWindow()?i>0?a=t.getTotalTableWidth():o>0&&(a=t.getViewportWidth()):o>0?a=t.getViewportWidth():t.getTableWidth()-t.getRowHeaderWidth()<t.getViewportWidth()&&i>0&&(a=t.getTableWidth()),t.isVerticallyScrollableByWindow()||t.hasVerticalScroll()?l=i>0?t.hot.getTableHeight()-t.getColumnHeaderHeight():t.hot.getTableHeight():r>0&&i>0?l=t.getViewportHeight()-n:r>0&&0===i&&(l=t.getWorkspaceHeight()-n),e.style.width=`${a}px`,e.style.height=`${l}px`}destroy(){var t,e;null===(t=r$(u$,this))||void 0===t||null===(t=t.emptyDataStateElement)||void 0===t||t.remove(),null===(e=r$(g$,this))||void 0===e||e.remove(),s$(g$,this,null),s$(u$,this,null)}}function p$(t,e,n){m$(t,e),e.set(t,n)}function m$(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b$(t,e,n){return t.set(v$(t,e),n),n}function w$(t,e){return t.get(v$(t,e))}function v$(t,e,n){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}const y$="emptyDataState",C$=Object.freeze({UNKNOWN:"unknown",FILTERS:"filters"}),S$=`plugin:${y$}`;var R$=new WeakMap,k$=new WeakMap,x$=new WeakMap,E$=new WeakMap,M$=new WeakMap,T$=new WeakSet;class _$ extends DC{constructor(){var t,e;super(...arguments),m$(t=this,e=T$),e.add(t),p$(this,R$,!1),p$(this,k$,null),p$(this,x$,null),p$(this,E$,!1),p$(this,M$,null)}static get PLUGIN_KEY(){return y$}static get PLUGIN_PRIORITY(){return 370}static get DEFAULT_SETTINGS(){return{message:void 0}}static get SETTINGS_VALIDATORS(){return{message:t=>"string"==typeof t||"function"==typeof t||Et(t)&&(void 0===(null==t?void 0:t.title)||"string"==typeof(null==t?void 0:t.title))&&(void 0===(null==t?void 0:t.description)||"string"==typeof(null==t?void 0:t.description))&&(void 0===(null==t?void 0:t.buttons)||Array.isArray(null==t?void 0:t.buttons)&&(null==t?void 0:t.buttons.every(t=>"object"==typeof t&&"string"==typeof t.text&&"string"==typeof t.type&&["primary","secondary"].includes(t.type)&&"function"==typeof t.callback)))||void 0===t}}isEnabled(){return!!this.hot.getSettings()[y$]}enablePlugin(){this.enabled||(w$(k$,this)||(b$(k$,this,new f$({rootElement:this.hot.rootGridElement,rootDocument:this.hot.rootDocument})),v$(T$,this,P$).call(this),v$(T$,this,H$).call(this),v$(T$,this,I$).call(this)),this.addHook("afterInit",()=>v$(T$,this,W$).call(this)),this.addHook("afterRender",()=>v$(T$,this,z$).call(this)),this.addHook("afterRowSequenceCacheUpdate",()=>v$(T$,this,D$).call(this)),this.addHook("afterColumnSequenceCacheUpdate",()=>v$(T$,this,D$).call(this)),this.addHook("beforeFilter",t=>v$(T$,this,j$).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),v$(T$,this,V$).call(this),this.isVisible()&&w$(k$,this).show(),super.updatePlugin()}disablePlugin(){v$(T$,this,O$).call(this),v$(T$,this,A$).call(this),w$(k$,this).destroy(),b$(k$,this,null),super.disablePlugin()}isVisible(){return w$(R$,this)}destroy(){var t;b$(R$,this,!1),null===(t=w$(k$,this))||void 0===t||t.destroy(),b$(k$,this,null),b$(x$,this,null),b$(E$,this,!1),b$(M$,this,null),super.destroy()}}function H$(){this.eventManager.addEventListener(w$(k$,this).getElement(),"wheel",t=>v$(T$,this,F$).call(this,t))}function I$(){b$(x$,this,new MutationObserver(()=>{if(!this.hot)return;const t=w$(k$,this).getElement();this.hot.rootGridElement.nextElementSibling!==t&&this.hot.rootGridElement.after(t)})),w$(x$,this).observe(this.hot.rootWrapperElement,{childList:!0})}function A$(){w$(x$,this).disconnect(),b$(x$,this,null)}function P$(){this.hot.getFocusScopeManager().registerScope(y$,w$(k$,this).getElement(),{shortcutsContextName:S$,runOnlyIf:()=>this.isVisible(),onActivate:t=>{var e;const n=null===(e=w$(k$,this))||void 0===e?void 0:e.getFocusableElements();n.length>0&&("tab_from_above"===t?n.at(0).focus():"tab_from_below"===t&&n.at(-1).focus())}})}function O$(){this.hot.getFocusScopeManager().unregisterScope(y$)}function N$(t){var e,n,o;let i;return i="function"==typeof this.getSetting("message")?this.getSetting("message")(t):this.getSetting("message"),"string"==typeof i&&(i={title:i}),null!==(e=i)&&void 0!==e&&e.title||null!==(n=i)&&void 0!==n&&n.description||null!==(o=i)&&void 0!==o&&o.buttons||(i={},t===C$.FILTERS?(i.title=this.hot.getTranslatedPhrase(wc),i.description=this.hot.getTranslatedPhrase(vc),i.buttons=[{text:this.hot.getTranslatedPhrase(yc),type:"secondary",callback:()=>{const t=this.hot.getPlugin("filters");t&&(t.clearConditions(),t.filter())}}]):(i.title=this.hot.getTranslatedPhrase(mc),i.description=this.hot.getTranslatedPhrase(bc))),i}function D$(){this.hot.view&&(0===this.hot.view.countRenderableColumns()||0===this.hot.view.countRenderableRows()?v$(T$,this,L$).call(this):v$(T$,this,B$).call(this))}function L$(){w$(R$,this)||(this.hot.runHooks("beforeEmptyDataStateShow"),v$(T$,this,V$).call(this),w$(k$,this).show(),b$(R$,this,!0),b$(M$,this,this.hot.selection.exportSelection()),this.hot.getFocusScopeManager().activateScope(y$),this.hot.runHooks("afterEmptyDataStateShow"))}function V$(){w$(E$,this)?w$(k$,this).updateContent(v$(T$,this,N$).call(this,C$.FILTERS)):w$(k$,this).updateContent(v$(T$,this,N$).call(this,C$.UNKNOWN))}function B$(){var t;w$(R$,this)&&(this.hot.runHooks("beforeEmptyDataStateHide"),w$(k$,this).hide(),b$(R$,this,!1),this.hot.getFocusScopeManager().deactivateScope(y$),(null===(t=w$(M$,this))||void 0===t?void 0:t.ranges.length)>0?(this.hot.selection.importSelection(w$(M$,this)),this.hot.view.render(),b$(M$,this,null)):this.hot.selectCell(0,0),this.hot.runHooks("afterEmptyDataStateHide"))}function F$(t){const e=Number.isNaN(t.deltaX)?-1*t.wheelDeltaX:t.deltaX;0!==e&&this.hot.view.hasHorizontalScroll()&&!this.hot.view.isHorizontallyScrollableByWindow()&&(this.hot.view.setTableScrollPosition({left:this.hot.view.getTableScrollPosition().left+e}),t.preventDefault())}function W$(){v$(T$,this,D$).call(this),this.hot.render()}function z$(){var t;null!==(t=w$(k$,this))&&void 0!==t&&t.getElement()&&this.isVisible()&&(w$(k$,this).updateSize(this.hot.view),w$(k$,this).updateClassNames(this.hot.view))}function j$(t){b$(E$,this,(null==t?void 0:t.length)>0),this.isVisible()&&v$(T$,this,V$).call(this)}Fn(Cg),Fn(Ym),Fn(Km),Fn(Ob),Fn(Db),Fn(Lm),Fn(jb),Fn($b),Fn(Ub),Fn(Gb),Fn(Xb),Fn(Cp),Fn(Zb),Fn(ev),Po(wv),Po(up),Po(Mv),Po(vv),Po(_v),Po(bv),Po(Av),Po(Ov),Po(Iy),Po(Ay),Po(Py),Po(Sp),Po(Ny),Bo(Dy),Bo(By),Bo(Vy),Bo(Fy),Bo(Wy),Bo(zy),Bo($y),Bo(Yy),Zd(qy),Zd(Xy),Zd(Qy),Zd(tC),Zd(eC),Zd(nC),Zd(oC),Zd(wC),Zd(vC),Zd(yC),Zd(CC),Zd(Rp),Zd(SC),Eo(QC),Eo(mS),Eo(NS),Eo(tR),Eo(fR),Eo(tk),Eo(gk),Eo(Ox),Eo(PE),Eo(SM),Eo(ZM),Eo(sT),Eo(bT),Eo(YT),Eo($I),Eo(tP),Eo(NP),Eo(qP),Eo(hO),Eo(BO),Eo(pN),Eo(GN),Eo(RD),Eo(TL),Eo(rV),Eo(aV),Eo(wB),Eo(lF),Eo(cW),Eo(OW),Eo(pz),Eo(Sz),Eo(Hz),Eo(hj),Eo(zj),Eo(n$),Eo(_$);const $$={hleft:"htLeft",hcenter:"htCenter",hright:"htRight",hjustify:"htJustify",vtop:"htTop",vmiddle:"htMiddle",vbottom:"htBottom"};const U$=f(function({rows:e,cols:n,freeze:o,styles:i,autofilter:r,firstRowAsHeaders:s}){const a=[],l=[],h=[],c=!s||[];Object.entries(e).forEach(([t,e])=>{let n=+t;if(s){if(0===n)return void c.push(...Object.entries(e.cells).map(([,t])=>t.text));n-=1}a[n]=[],Object.entries(e.cells).forEach(([t,e])=>{const o=+t;a[n][o]=e.text,"number"==typeof e.style&&i?.[e.style]&&(l[n]||(l[n]=[]),l[n][o]=i[e.style],h.push({row:n,col:o,renderer:"customStylesRenderer",className:v($$[`h${i[e.style].align}`],$$[`v${i[e.style].valign}`])}))})});const d=[];Object.entries(n||{}).forEach(([t,e])=>{"number"==typeof e.width&&(d[+t]=e.width)});const u=w.decode_cell(o||""),g=w.decode_range(r?.ref||"");return s&&-1!==u.r&&(u.r-=1),Po("customStylesRenderer",(t,e,n,o,i,r,s)=>{Sp(0,e,0,0,0,r,s),s.style?.font?.bold&&(e.style.fontWeight="bold"),s.style?.color&&(e.style.color=s.style?.color),s.style?.bgcolor&&(e.style.background=s.style?.bgcolor)}),t(Om,{data:a,rowHeaders:!0,colHeaders:c,licenseKey:"non-commercial-and-evaluation",fixedColumnsStart:-1!==u.c?u.c:void 0,fixedRowsTop:-1!==u.r?u.r:void 0,filters:!0,dropdownMenu:!0,height:"100%",width:"100%",style:{width:"100%",height:"100%"},afterGetColHeader:(t,e)=>{if(!(g.s.c<=t&&t<=g.e.c)){const t=e.querySelector(".changeType");if(!t)return;t.parentElement?.removeChild(t)}},cell:h,cells:function(t,e){const n={style:{}};return l?.[t]?.[e]&&(n.style=l[t][e]),n},colWidths:d.length?d:void 0})});export{U$ as default};