@juki-team/base-ui 1.4.121 → 1.4.127
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.
- package/dist/esm/ArrowForwardIcon-C60hznwq.js +1 -0
- package/dist/esm/BarChart-Y665GO2I.js +1 -0
- package/dist/esm/{CartesianChart-tXHM9yHp.js → CartesianChart-BSvx15yS.js} +5 -5
- package/dist/esm/ChangePasswordModal-k-lMf3KZ.js +1 -0
- package/dist/esm/CodeEditor-Dzi2v961.js +1 -0
- package/dist/esm/CodeViewer-BdmCvDHi.js +1 -0
- package/dist/esm/Collapse-DT9m5JSq.js +1 -0
- package/dist/esm/DataGrid-BMin2rBG.js +277 -0
- package/dist/esm/DataViewer-DFjt8Z2T.js +1 -0
- package/dist/esm/DrawerView-DnA_hA_o.js +1 -0
- package/dist/esm/ExcalidrawButton-BIpwsxPt.js +1 -0
- package/dist/esm/GraphvizViewer-BcJ7nToT.js +1 -0
- package/dist/esm/ImageLoaderCropper-05YcRQBj.js +1 -0
- package/dist/esm/InputCellPhoneNumber-BMf06bCT.js +1 -0
- package/dist/esm/{InputColor-D_uAIBKY.js → InputColor-D4iKI1yK.js} +3 -3
- package/dist/esm/LineChart-BIIgUvoc.js +1 -0
- package/dist/esm/MdMath-DQTMZaLV.js +1 -0
- package/dist/esm/MdMathEditor-BNc7OJyC.js +28 -0
- package/dist/esm/{Popover-myjbsRtv.js → Popover-3_hEGjKj.js} +1 -1
- package/dist/esm/ReplyIcon-DHT60m5d.js +1 -0
- package/dist/esm/SettingsIcon-CwPMEnlj.js +1 -0
- package/dist/esm/SlideDeck-CeJiattp.js +1 -0
- package/dist/esm/{ProblemStatus-C5CR0Z8d.js → SubmissionDateField-BrmGyMm3.js} +1 -1
- package/dist/esm/TableOfContents-CuG8yYpo.js +1 -0
- package/dist/esm/TextHeadCell-SVbfF_eL.js +1 -0
- package/dist/esm/Tooltip-DDKwIA6e.js +7 -0
- package/dist/esm/{UserCodeEditor-BwNoHEIy.js → UserCodeEditor-B03D6M_j.js} +9 -9
- package/dist/esm/VirtualizedRowsFixed-CmXcLfyc.js +1 -0
- package/dist/esm/WorksheetAsSlides-DAW1vFDM.js +1 -0
- package/dist/esm/WorksheetBodies-CoKyyPAM.js +1 -0
- package/dist/esm/WorksheetContents-3MJ6QvVj.js +1 -0
- package/dist/esm/WorksheetEditor-MJcu6NAp.js +1 -0
- package/dist/esm/WorksheetNode-CNdvC8qa.js +1 -0
- package/dist/esm/WorksheetViewer-Csl3IhGA.js +1 -0
- package/dist/esm/arc-BNZ5pIhU.js +1 -0
- package/dist/esm/architectureDiagram-3BPJPVTR-EGo92Js8.js +1 -0
- package/dist/esm/{band-D2afako6.js → band-DVHgMxOa.js} +1 -1
- package/dist/esm/basic-setup-Uxna1ORW.js +1 -0
- package/dist/esm/blockDiagram-GPEHLZMM-YEwStt0q.js +1 -0
- package/dist/esm/c4Diagram-AAUBKEIU-6qLMKLHQ.js +1 -0
- package/dist/esm/channel-DuJyewAO.js +1 -0
- package/dist/esm/chunk-2J33WTMH-CSNy6D0K.js +1 -0
- package/dist/esm/{chunk-4BX2VUAB-COJYrArq.js → chunk-4BX2VUAB-BG00Pq3P.js} +1 -1
- package/dist/esm/chunk-55IACEB6-_KG92tYv.js +1 -0
- package/dist/esm/chunk-727SXJPM-1yPcPicj.js +1 -0
- package/dist/esm/chunk-AQP2D5EJ-B6rE4s-L.js +1 -0
- package/dist/esm/{chunk-FMBD7UC4-PcmGZaXU.js → chunk-FMBD7UC4-B30SBvYv.js} +1 -1
- package/dist/esm/chunk-ND2GUHAM-Dew5vqZ7.js +1 -0
- package/dist/esm/{chunk-QZHKN3VN-D5wczz_U.js → chunk-QZHKN3VN-DBZ0ofQY.js} +1 -1
- package/dist/esm/classDiagram-4FO5ZUOK-D95DEj2F.js +1 -0
- package/dist/esm/classDiagram-v2-Q7XG4LA2-D95DEj2F.js +1 -0
- package/dist/esm/constants.js +1 -1
- package/dist/esm/cose-bilkent-S5V4N54A-DvdEsdgg.js +1 -0
- package/dist/esm/dagre-BM42HDAG-CAK4m8n4.js +1 -0
- package/dist/esm/{date-DabTuCYQ.js → date-CmFU6v8V.js} +1 -1
- package/dist/esm/{defaultLocale-HOdfsG1x.js → defaultLocale-BAKTrQtR.js} +1 -1
- package/dist/esm/diagram-2AECGRRQ-CSqNVFb4.js +1 -0
- package/dist/esm/diagram-5GNKFQAL-BWzWwjF5.js +1 -0
- package/dist/esm/diagram-KO2AKTUF-D2-JeanM.js +1 -0
- package/dist/esm/diagram-LMA3HP47-DS2R1tWs.js +1 -0
- package/dist/esm/diagram-OG6HWLK6-DTxKf0Qv.js +1 -0
- package/dist/esm/erDiagram-TEJ5UH35-WtYIPbRt.js +1 -0
- package/dist/esm/{floating-ui.dom-BBZn3WzR.js → floating-ui.dom-D1Wb0QDy.js} +1 -1
- package/dist/esm/flowDiagram-I6XJVG4X-Dy8OXjRp.js +1 -0
- package/dist/esm/ganttDiagram-6RSMTGT7-EDpgQ3lf.js +1 -0
- package/dist/esm/gitGraphDiagram-PVQCEYII-B46XqY2u.js +1 -0
- package/dist/esm/graph-CBbILnwM.js +1 -0
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/index-6wuMZC45.js +1 -0
- package/dist/esm/index-7ZeiemAy.js +1 -0
- package/dist/esm/index-93zckEk3.js +1 -0
- package/dist/esm/{index-BD_n8l03.js → index-9FCB1eYq.js} +1 -1
- package/dist/esm/index-B62yhWOD.js +1 -0
- package/dist/esm/index-BGOJy6XN.js +1 -0
- package/dist/esm/index-BLeJ2vIS.js +1 -0
- package/dist/esm/index-BNfTE7vw.js +1 -0
- package/dist/esm/index-BP3Q2zrN.js +1 -0
- package/dist/esm/index-BP3zM0tT.js +1 -0
- package/dist/esm/index-BRtSnjHY.js +1 -0
- package/dist/esm/index-BqzjQnaK.js +1 -0
- package/dist/esm/{index-BWbfbDmw.js → index-BwuVfyt_.js} +1 -1
- package/dist/esm/index-C5ILZmlq.js +1 -0
- package/dist/esm/index-C78By0NM.js +1 -0
- package/dist/esm/index-CR8iXDSF.js +1 -0
- package/dist/esm/index-CiR06WNd.js +1 -0
- package/dist/esm/index-CjLxDzml.js +1 -0
- package/dist/esm/index-Cp9n6f_0.js +2 -0
- package/dist/esm/index-CscbTRs5.js +1 -0
- package/dist/esm/index-Cub1smTw.js +1 -0
- package/dist/esm/index-DazVIYP8.js +1 -0
- package/dist/esm/index-De9_SWGB.js +1 -0
- package/dist/esm/index-Dg7y6UO5.js +1 -0
- package/dist/esm/index-DntVU4z9.js +1 -0
- package/dist/esm/index-DpJxGesA.js +1 -0
- package/dist/esm/index-FHXK2zWb.js +1 -0
- package/dist/esm/index-LpQq9PxO.js +1 -0
- package/dist/esm/index-QDPpqsGj.js +1 -0
- package/dist/esm/{index-DDs-O4vd.js → index-_4A5sEHw.js} +1 -1
- package/dist/esm/index-cKVkCxcy.js +1 -0
- package/dist/esm/index-uJKDC6Vv.js +1 -0
- package/dist/esm/infoDiagram-5YYISTIA-CY7j_JnA.js +1 -0
- package/dist/esm/{init-DLRA0X12.js → init-DWDD0M30.js} +1 -1
- package/dist/esm/isSymbol-BuOnvf7n.js +1 -0
- package/dist/esm/isUndefined-CFeFfF_Q.js +1 -0
- package/dist/esm/ishikawaDiagram-YF4QCWOH-D6o2nQHa.js +1 -0
- package/dist/esm/journeyDiagram-JHISSGLW-DdFME4_e.js +1 -0
- package/dist/esm/kanban-definition-UN3LZRKU-DVq4JZWr.js +1 -0
- package/dist/esm/layout-B7iAeCjH.js +1 -0
- package/dist/esm/{linear-BRlKh6eb.js → linear-BqR6NtXG.js} +1 -1
- package/dist/esm/{lua-8DXOpKDz.js → lua-BvgfYBhq.js} +1 -1
- package/dist/esm/main.js +1 -1
- package/dist/esm/map-CUEN-iGA.js +1 -0
- package/dist/esm/mermaid.core-BJ63Ijjp.js +1 -0
- package/dist/esm/mindmap-definition-RKZ34NQL-jgbgERyG.js +1 -0
- package/dist/esm/{ordinal-zwWoQKz9.js → ordinal-UuA5o140.js} +1 -1
- package/dist/esm/pieDiagram-4H26LBE5-Kk7ovyMv.js +1 -0
- package/dist/esm/quadrantDiagram-W4KKPZXB-DiMCYk-T.js +1 -0
- package/dist/esm/requirementDiagram-4Y6WPE33-DZBXo7zD.js +1 -0
- package/dist/esm/sankeyDiagram-5OEKKPKP-CJp9Tkkm.js +1 -0
- package/dist/esm/sequenceDiagram-3UESZ5HK-D76l6Rd4.js +1 -0
- package/dist/esm/server.js +1 -1
- package/dist/esm/settings.js +1 -1
- package/dist/esm/stateDiagram-AJRCARHV-CesXVS_W.js +1 -0
- package/dist/esm/stateDiagram-v2-BHNVJYJU-DqWSoWM6.js +1 -0
- package/dist/esm/{string-LeDn2fkG.js → string-CQk_HvWX.js} +1 -1
- package/dist/esm/throttle-omWozCTR.js +1 -0
- package/dist/esm/{time-BPMFfIa-.js → time-BgcLBBP-.js} +1 -1
- package/dist/esm/time-BhHpEZFB.js +1 -0
- package/dist/esm/timeline-definition-PNZ67QCA-CDn8cvlq.js +1 -0
- package/dist/esm/toNumber-DDd3oWg0.js +1 -0
- package/dist/esm/types-Bp4jYQko.js +1 -0
- package/dist/esm/vennDiagram-CIIHVFJN-DlZtAp7y.js +1 -0
- package/dist/esm/viz-BjPw9uNj.js +9 -0
- package/dist/esm/wardley-L42UT6IY-Bn2xZ99U.js +15 -0
- package/dist/esm/wardleyDiagram-YWT4CUSO-DG4_85tj.js +1 -0
- package/dist/esm/{websocket-Nx7WdiK7.js → websocket-BXbChnc8.js} +1 -1
- package/dist/esm/{worksheet-BxUIsAEo.js → worksheet-BfayCMey.js} +1 -1
- package/dist/esm/{worksheet-D1AAXRU9.js → worksheet-JNPwhsnI.js} +1 -1
- package/dist/esm/{worksheet-ClM0CaBH.js → worksheet-KMCQx4-g.js} +1 -1
- package/dist/esm/xychartDiagram-2RQKCTM6-BYf7oiMn.js +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- 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 +1 -0
- package/dist/module-types/src/components/templates/columns/contest-columns/index.d.ts +2 -2
- package/dist/module-types/src/components/templates/index.d.ts +0 -2
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestContestantsHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/{columns → server/columns}/contest-columns/getContestDateHeader.d.ts +1 -1
- package/dist/module-types/src/components/templates/server/index.d.ts +4 -0
- package/dist/module-types/src/components/templates/{problem → server/problem}/TagsField.d.ts +1 -1
- package/dist/module-types/src/components/templates/{submission → server/submission}/SubmissionDateField.d.ts +1 -1
- package/package.json +55 -60
- package/src/styles/components/atoms/_button.scss +7 -7
- package/src/styles/components/atoms/_data-viewer.scss +3 -3
- package/src/vendor/@milkdown/crepe/lib/theme/common/ai.css +446 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/code-mirror.css +14 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/diff.css +177 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/style.css +2 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/ai.css +430 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/code-mirror.css +14 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/diff.css +196 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/style.css +2 -0
- package/src/vendor/fumadocs-ui/css/generated/docs.css +0 -2
- package/src/vendor/fumadocs-ui/css/generated/flux.css +0 -2
- package/src/vendor/fumadocs-ui/css/generated/home.css +0 -8
- package/src/vendor/fumadocs-ui/css/generated/notebook.css +0 -2
- package/src/vendor/fumadocs-ui/css/generated/shared.css +81 -16
- package/src/vendor/fumadocs-ui/dist/style.css +56 -34
- package/src/vendor/handsontable/styles/handsontable.css +335 -82
- package/src/vendor/handsontable/styles/handsontable.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-icons-horizon.css +11 -3
- package/src/vendor/handsontable/styles/ht-icons-horizon.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-icons-main.css +11 -3
- package/src/vendor/handsontable/styles/ht-icons-main.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.css +21 -2
- package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-classic.css +32 -5
- package/src/vendor/handsontable/styles/ht-theme-classic.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.css +20 -1
- package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-horizon.css +31 -4
- package/src/vendor/handsontable/styles/ht-theme-horizon.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-main-no-icons.css +21 -2
- package/src/vendor/handsontable/styles/ht-theme-main-no-icons.min.css +4 -3
- package/src/vendor/handsontable/styles/ht-theme-main.css +32 -5
- package/src/vendor/handsontable/styles/ht-theme-main.min.css +4 -3
- package/src/vendor/katex/dist/katex-swap.css +5 -2
- package/src/vendor/katex/dist/katex-swap.min.css +1 -1
- package/src/vendor/katex/dist/katex.css +5 -2
- package/src/vendor/katex/dist/katex.min.css +1 -1
- package/src/vendor/katex/src/styles/katex.scss +3 -1
- package/dist/esm/ArrowForwardIcon-CVIKnzmu.js +0 -1
- package/dist/esm/BarChart-C4j466sV.js +0 -1
- package/dist/esm/ChangePasswordModal-DAn7XeyD.js +0 -1
- package/dist/esm/CodeEditor-CFWIRByc.js +0 -1
- package/dist/esm/CodeViewer-C6XCe0GT.js +0 -1
- package/dist/esm/Collapse-DpriDerh.js +0 -1
- package/dist/esm/DataGrid-CD44fkam.js +0 -272
- package/dist/esm/DataViewer-B1l0B0-d.js +0 -1
- package/dist/esm/DrawerView-hvnlPQq6.js +0 -1
- package/dist/esm/ExcalidrawButton-COXAKOpn.js +0 -1
- package/dist/esm/GraphvizViewer-BK4ypl3L.js +0 -1
- package/dist/esm/ImageLoaderCropper-DEt5ge51.js +0 -1
- package/dist/esm/InputCellPhoneNumber-CbFB6H2i.js +0 -1
- package/dist/esm/LineChart-B3nrTHaA.js +0 -1
- package/dist/esm/MdMath-Mf8WxhKy.js +0 -1
- package/dist/esm/MdMathEditor-BUf36EaT.js +0 -28
- package/dist/esm/ReplyIcon-DJFT1Tjl.js +0 -1
- package/dist/esm/SettingsIcon-CaFHSleq.js +0 -1
- package/dist/esm/SlideDeck-DvVHz3uy.js +0 -1
- package/dist/esm/TableOfContents-I1zUQZlM.js +0 -1
- package/dist/esm/TextHeadCell-CDT516Nd.js +0 -1
- package/dist/esm/Tooltip-CHc2LM3e.js +0 -7
- package/dist/esm/VirtualizedRowsFixed-SmGRufd0.js +0 -1
- package/dist/esm/WorksheetAsSlides-BQVnbTDc.js +0 -1
- package/dist/esm/WorksheetBodies-kphWX0g5.js +0 -1
- package/dist/esm/WorksheetContents-CI8UrxIy.js +0 -1
- package/dist/esm/WorksheetEditor-CHC4ormG.js +0 -1
- package/dist/esm/WorksheetNode-C9ioDzE-.js +0 -1
- package/dist/esm/WorksheetViewer-Drg2e9_6.js +0 -1
- package/dist/esm/_baseIteratee-DJNkOVK7.js +0 -1
- package/dist/esm/_baseUniq-BJKKUJ6e.js +0 -1
- package/dist/esm/arc-CpSlG_nw.js +0 -1
- package/dist/esm/architecture-YZFGNWBL-DHLZLvJj.js +0 -1
- package/dist/esm/architectureDiagram-Q4EWVU46-DO8F0qz7.js +0 -1
- package/dist/esm/basic-setup-Cz3rV4Fo.js +0 -1
- package/dist/esm/blockDiagram-DXYQGD6D-DNKe0cgR.js +0 -1
- package/dist/esm/c4Diagram-AHTNJAMY-DN5fuFmb.js +0 -1
- package/dist/esm/channel-4mHTJV-N.js +0 -1
- package/dist/esm/chunk-4TB4RGXK-BgOhjp4u.js +0 -1
- package/dist/esm/chunk-55IACEB6-BlGeNxvg.js +0 -1
- package/dist/esm/chunk-EDXVE4YY-CrsJ2Hnl.js +0 -1
- package/dist/esm/chunk-OYMX7WX6-Dd_OySsr.js +0 -1
- package/dist/esm/chunk-YZCP3GAM-J0il8D93.js +0 -1
- package/dist/esm/classDiagram-6PBFFD2Q-BudcHsyy.js +0 -1
- package/dist/esm/classDiagram-v2-HSJHXN6E-BudcHsyy.js +0 -1
- package/dist/esm/clone-Bdky4iBO.js +0 -1
- package/dist/esm/cose-bilkent-S5V4N54A-ZsIi3T0h.js +0 -1
- package/dist/esm/dagre-KV5264BT-Ps6KiA13.js +0 -1
- package/dist/esm/diagram-5BDNPKRD-CmcDSDfS.js +0 -1
- package/dist/esm/diagram-G4DWMVQ6-MRapKKyA.js +0 -1
- package/dist/esm/diagram-MMDJMWI5--Lf_QB5P.js +0 -1
- package/dist/esm/diagram-TYMM5635-CfbzkptG.js +0 -1
- package/dist/esm/erDiagram-SMLLAGMA-DmAtzyw1.js +0 -1
- package/dist/esm/flowDiagram-DWJPFMVM-Cd5g_eEq.js +0 -1
- package/dist/esm/ganttDiagram-T4ZO3ILL-O3kXJMuu.js +0 -1
- package/dist/esm/gitGraph-7Q5UKJZL-w9fSBFuS.js +0 -1
- package/dist/esm/gitGraphDiagram-UUTBAWPF-XLFtNk0y.js +0 -1
- package/dist/esm/graph-Bh_6Hxf_.js +0 -1
- package/dist/esm/index-B8o5x2RR.js +0 -1
- package/dist/esm/index-BXwIVJ1i.js +0 -1
- package/dist/esm/index-B_SR88hF.js +0 -1
- package/dist/esm/index-BdEuQrE0.js +0 -1
- package/dist/esm/index-Bp7rYslS.js +0 -1
- package/dist/esm/index-Buo8u5Rd.js +0 -1
- package/dist/esm/index-Bx0ktss6.js +0 -1
- package/dist/esm/index-BypZQ30J.js +0 -1
- package/dist/esm/index-CG-nC_T_.js +0 -1
- package/dist/esm/index-CG5i3mPd.js +0 -1
- package/dist/esm/index-CLMLLwc9.js +0 -1
- package/dist/esm/index-CUjyY2a3.js +0 -1
- package/dist/esm/index-C__8JPAk.js +0 -1
- package/dist/esm/index-CoedJ1ql.js +0 -1
- package/dist/esm/index-CueeU9Hx.js +0 -1
- package/dist/esm/index-D1ky-z91.js +0 -1
- package/dist/esm/index-DEH449Hc.js +0 -1
- package/dist/esm/index-DFMzt8xL.js +0 -1
- package/dist/esm/index-DI-7QOUe.js +0 -1
- package/dist/esm/index-DUtxMiYq.js +0 -1
- package/dist/esm/index-DdRpaNiN.js +0 -1
- package/dist/esm/index-DquUMjcv.js +0 -1
- package/dist/esm/index-MkWt_kX0.js +0 -1
- package/dist/esm/index-USryHMlL.js +0 -1
- package/dist/esm/index-_eiBoCQ6.js +0 -1
- package/dist/esm/index-a79hibwg.js +0 -1
- package/dist/esm/index-iowlALIm.js +0 -1
- package/dist/esm/index-tDMZSRa9.js +0 -2
- package/dist/esm/index-tGGDvGCv.js +0 -1
- package/dist/esm/info-OMHHGYJF-6icJTSRL.js +0 -1
- package/dist/esm/infoDiagram-42DDH7IO-DiPK6iLZ.js +0 -1
- package/dist/esm/isSymbol-CATEdeai.js +0 -1
- package/dist/esm/isUndefined-DgmxjSXK.js +0 -1
- package/dist/esm/ishikawaDiagram-UXIWVN3A-DNCSSMvk.js +0 -1
- package/dist/esm/journeyDiagram-VCZTEJTY-BxyeAOhI.js +0 -1
- package/dist/esm/kanban-definition-6JOO6SKY-BR8Xd4RY.js +0 -1
- package/dist/esm/layout-BsYGzjO0.js +0 -1
- package/dist/esm/map-BvlAjF4J.js +0 -1
- package/dist/esm/memoize-CPUrcYQl.js +0 -1
- package/dist/esm/mermaid-parser.core-DxB6tfwM.js +0 -2
- package/dist/esm/mermaid.core-DmkzFmrK.js +0 -1
- package/dist/esm/min-Dc9VrJ6M.js +0 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-BUmIu9eO.js +0 -1
- package/dist/esm/packet-4T2RLAQJ-jB8585_W.js +0 -1
- package/dist/esm/pie-ZZUOXDRM-BKLoVTcY.js +0 -1
- package/dist/esm/pieDiagram-DEJITSTG-CJQonP9T.js +0 -1
- package/dist/esm/quadrantDiagram-34T5L4WZ-o3IEMDUC.js +0 -1
- package/dist/esm/radar-PYXPWWZC-BBal7TH8.js +0 -1
- package/dist/esm/requirementDiagram-MS252O5E-CSBSz0_J.js +0 -1
- package/dist/esm/sankeyDiagram-XADWPNL6-Dd0d-7E4.js +0 -1
- package/dist/esm/sequenceDiagram-FGHM5R23-DEPMVZxI.js +0 -1
- package/dist/esm/stateDiagram-FHFEXIEX-B_eljgWF.js +0 -1
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-D9FCD1lO.js +0 -1
- package/dist/esm/throttle-BsCMUG1-.js +0 -1
- package/dist/esm/time-CyaZFqIA.js +0 -1
- package/dist/esm/timeline-definition-GMOUNBTQ-Cg4NUF_H.js +0 -1
- package/dist/esm/toNumber-Bh_HTlSx.js +0 -1
- package/dist/esm/treeView-SZITEDCU-S-ba_Q_y.js +0 -1
- package/dist/esm/treemap-W4RFUUIX-CnmNi6qL.js +0 -1
- package/dist/esm/types-NAGOQCyQ.js +0 -1
- package/dist/esm/vennDiagram-DHZGUBPP-B0vBQEXk.js +0 -1
- package/dist/esm/viz-CFEjElvl.js +0 -9
- package/dist/esm/wardley-RL74JXVD-CQrog0ka.js +0 -1
- package/dist/esm/wardleyDiagram-NUSXRM2D-BxnrOeU9.js +0 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-B6KmAHYz.js +0 -1
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/code-block.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/image-block.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/image-inline.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/index.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/link-tooltip.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/list-item-block.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/table-block.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/core.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/ctx.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/block.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/clipboard.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/cursor.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/history.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/indent.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/listener.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/slash.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/tooltip.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/trailing.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/upload.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/preset/commonmark.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/preset/gfm.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/history.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/index.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/inputrules.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/keymap.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/model.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/state.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/prose/view.d.ts +0 -0
- /package/dist/module-types/node_modules/.pnpm/{@milkdown+kit@7.20.0_@codemirror+language@6.12.3_@codemirror+state@6.6.0_@codemirror+view@6.41.1_typescript@6.0.3 → @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/utils.d.ts +0 -0
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import e,{forwardRef as n,useId as o,useRef as i,useCallback as s,useMemo as r,useEffect as a,useImperativeHandle as l,Children as h,Fragment as c,createContext as d,useContext as u,useState as g,memo as p}from"react";import f from"react-dom";import{p as m}from"./purify.es-BkjUCQC6.js";import{bS as w}from"./index-Cp9n6f_0.js";import{utils as b}from"./xlsx-XBWnafwQ.js";import{d as v}from"./index-BwuVfyt_.js";import"./settings-DgLs6IK_.js";import"./SubmissionDateField-BrmGyMm3.js";import"./date-CmFU6v8V.js";import"./time-BgcLBBP-.js";import"./enums.js";import"./websocket-BXbChnc8.js";import"./worksheet-KMCQx4-g.js";import"motion/react";import"./index-9FCB1eYq.js";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";function C(t,e){const n=e.length;let o=0;for(;o<n;)t.push(e[o]),o+=1}function y(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,s=t,r=n;Array.isArray(t)||(s=Array.from(t));const a=s.length;for(i+=1;i<a;)r=e(r,s[i],i,s),i+=1;return r}function k(t,e){let n=0,o=t;Array.isArray(t)||(o=Array.from(t));const i=o.length,s=[];let r=-1;for(;n<i;){const t=o[n];e(t,n,o)&&(r+=1,s[r]=t),n+=1}return s}function R(t,e){let n=0,o=t;Array.isArray(t)||(o=Array.from(t));const i=o.length,s=[];let r=-1;for(;n<i;){const t=o[n];r+=1,s[r]=e(t,n,o),n+=1}return s}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(...t){const[e,...n]=[...t];let o=e;return x(n,t=>{o=o.filter(e=>!t.includes(e))}),o}function M(t,e=" "){return t.split(e)}function T(t,...e){const n=S(t,(t,n,o)=>t+n.replace(/\r?\n\s*/g,"")+(e[o]?e[o]:""),"");return n.trim()}function _(t,...e){const n=document.createElement("template");n.innerHTML=t.reduce((t,n,o)=>t+n+(e[o]??""),"");const o=n.content.cloneNode(!0),i={};return o.querySelectorAll("[data-ref]").forEach(t=>{const e=t.getAttribute("data-ref");t.removeAttribute("data-ref"),i[e]=t}),{fragment:o,refs:i}}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 O(t){return null===t||""===t||A(t)}const D="length",N=t=>parseInt(t,16),P=t=>parseInt(t,10),W=(t,e,n)=>t.substr(e,n),L=t=>t.codePointAt(0)-65,B=t=>`${t}`.replace(/\-/g,"");let V=!1;const F={invalid:()=>T`
|
|
2
|
+
The license key for Handsontable is invalid.\x20
|
|
3
|
+
If you need any help, contact us at support@handsontable.com.`,expired:({keyValidityDate:t,hotVersion:e})=>T`
|
|
4
|
+
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
|
5
|
+
version ${e}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
|
|
6
|
+
to ${t}. 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:({keyValidityDate:t,hotVersion:e})=>T`
|
|
14
|
+
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
|
15
|
+
version ${e}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
|
|
16
|
+
license key or downgrade to a version released prior to ${t}. 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 $(t,e,n){const o=!O(t),i="string"==typeof t&&("non-commercial-and-evaluation"===t.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===t.toLowerCase()),s="17.1.0";let r,a="invalid",l="invalid";const h=function(t){let e=[][D],n=e;if(t[D]!==L("Z"))return!1;for(let e="",o="B<H4P+".split(""),i=L(o.shift());i;i=L(o.shift()||"A"))--i<""[D]?n|=(P(`${P(N(e)+(N(W(t,Math.abs(i),2))+[]).padStart(2,"0"))}`)%97||2)>>1:e=W(t,i,i?1===o[D]?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),s=Math.floor(Date.UTC(i,o-1,e)/864e5),h=N(W(B(c=t),N("12"),L("F")))/(N(W(B(c),L("B"),~~![][D]))||9);r=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format(864e5*(h+1)),s>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"),!V&&"valid"!==a){F[a]({keyValidityDate:r,hotVersion:s})&&console["non_commercial"===a?"info":"warn"](F[a]({keyValidityDate:r,hotVersion:s})),V=!0}if("valid"!==l&&e){if(z[l]({keyValidityDate:r,hotVersion:s})){const t=document.createElement("div");t.className="handsontable hot-display-license-info",t.innerHTML=z[l]({keyValidityDate:r,hotVersion:s}),e.appendChild(t)}}}function U(t){return t[0].toUpperCase()+t.substr(1)}function j(){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 q(t,e={}){return`${t}`.replace(/(?:\\)?\[([^[\]]+)]/g,(t,n)=>"\\"===t.charAt(0)?t.substr(1,t.length-1):void 0===e[n]?"":e[n])}function K(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 Q=t=>["tabindex",t],J=()=>["role","gridcell"],tt=()=>["role","gridcell button"],et=()=>["role","rowheader"],nt=()=>["role","columnheader"],ot=()=>["role","row"],it=()=>["scope","col"],st=()=>["scope","row"],rt=t=>["aria-label",t],at=t=>["aria-describedby",t],lt=(t=!0)=>["aria-disabled",t],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],pt=t=>["aria-expanded",t],ft=t=>["aria-checked",t],mt=t=>["aria-relevant",t],wt=t=>["aria-posinset",t];function bt(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 Ct(t,e,n){const o=Array.isArray(n);return Tt(e,(e,i)=>{(!1===o||n.includes(i))&&(t[i]=e)}),t}function yt(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]={}),yt(t[o],e[o])):t[o]=e[o]})}function St(t){return"object"==typeof t?JSON.parse(JSON.stringify(t)):t}function kt(t){const e={};return Tt(t,(t,n)=>{e[n]=t}),e}function Rt(t,...e){return t.MIXINS||(t.MIXINS=[]),x(e,e=>{t.MIXINS.push(e.MIXIN_NAME),Tt(e,(e,n)=>{if(void 0!==t.prototype[n]&&bt(`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?(Ot(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,e="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 Ot(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Dt(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]=Ot(t,o)&&void 0!==t[o]?t[o]:e[o]:n[o]=Dt(t[o],e[o])}),Object.keys(t).forEach(e=>{Ot(n,e)||(n[e]=t[e])}),n}function Nt(t={},e={}){const n={...t};return Object.keys(e).forEach(t=>{if("__proto__"===t||"constructor"===t||"prototype"===t)return;const o=e[t],i=n[t];Et(o)&&Et(i)?n[t]=Nt(i,o):n[t]=o}),n}function Pt(t){return Et(t)&&I(t.key)&&I(t.value)}function Wt(t){return window.requestAnimationFrame(t)}function Lt(t){window.cancelAnimationFrame(t)}function Bt(){return"ontouchstart"in window}let Vt;const Ft=t=>{const e={value:!1,test:(n,o)=>{e.value=t(n,o)}};return e},zt={chrome:Ft((t,e)=>/Chrome/.test(t)&&/Google/.test(e)),chromeWebKit:Ft(t=>/CriOS/.test(t)),edge:Ft(t=>/Edge/.test(t)),edgeWebKit:Ft(t=>/EdgiOS/.test(t)),firefox:Ft(t=>/Firefox/.test(t)),firefoxWebKit:Ft(t=>/FxiOS/.test(t)),mobile:Ft(t=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)),safari:Ft((t,e)=>/Safari/.test(t)&&/Apple Computer/.test(e)),safariBefore261:Ft((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})},$t={mac:Ft(t=>/^Mac/.test(t)),win:Ft(t=>/^Win/.test(t)),linux:Ft(t=>/^Linux/.test(t)),ios:Ft(t=>/iPhone|iPad|iPod/i.test(t))};function Ut(){return zt.firefox.value}function jt(){return zt.safari.value}function Yt(){return zt.mobile.value}function Gt(){return $t.ios.value}function qt({maxTouchPoints:t}=navigator){return t>2&&$t.mac.value}function Kt(){return $t.win.value}function Xt(){return $t.mac.value}function Zt(...t){I(console)&&console.log(...t)}function Qt(...t){I(console)&&console.warn(...t)}function Jt(t){I(console)&&console.warn(`Deprecated: ${t}`)}function te(...t){I(console)&&console.error(...t)}function ee(t,e=0){let 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 ne(t,e){const n=t.closest(".handsontable");return!!n&&(n.parentNode===e||n===e)}function oe(t){return function(t){return Object.getPrototypeOf(t.parent)&&t.frameElement}(t)&&t.parent}function ie(t,e=[],n){const{ELEMENT_NODE:o,DOCUMENT_FRAGMENT_NODE:i}=Node;let s=t;for(;null!=s&&s!==n;){const{nodeType:t,nodeName:n}=s;if(t===o&&(e.includes(n)||e.includes(s)))return s;const{host:r}=s;s=r&&t===i?r:s.parentNode}return null}function se(t,e,n){const o=[];let i=t;for(;i&&(i=ie(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 s=o.length;return s?o[s-1]:null}function re(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 ae(t,e,n){const o=n.parentElement.querySelector(`.ht_clone_${t}`);return o?o.contains(e):null}function le(t){if(!(t&&t.classList&&t.parentNode&&t.parentNode.parentNode))return!1;if(t.classList.contains("hiddenHeader")||"none"===t.style.display)return!1;const e=t.parentNode,n=Array.from(e.parentNode.childNodes);return n.indexOf(e)+(Number.parseInt(t.getAttribute("rowspan"),10)||1)>=n.length}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 pe(t,e=[],n){Array.isArray(e)||(e=[[e,n]]),e.forEach(e=>{Array.isArray(e)&&""!==e[0]&&t.setAttribute(...e)})}function fe(t,e=[]){"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 we(t){let e;for(;e=t.lastChild;)t.removeChild(e)}"undefined"!=typeof window&&(function({userAgent:t=navigator.userAgent,vendor:e=navigator.vendor}={}){Tt(zt,({test:n})=>{n(t,e)})}(),function({platform:t=navigator.platform}={}){Tt($t,({test:e})=>{e(t)})}());const be=/(<(.*)>|&(.*);)/;let ve,Ce=!1;function ye(t,e,n=X){be.test(e)?(Ce||n!==X||(Ce=!0,Jt("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:(we(t),t.appendChild(t.ownerDocument.createTextNode(e)))}function ke(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 ke(o.host.impl);if(o.host)return ke(o.host);bt("Lost in Web Components world")}else if("none"===n.getComputedStyle(o).display)return!1;o=o.parentNode}return!0}function Re(t){const e=t.ownerDocument,n=e.defaultView,o=e.documentElement;let i,s,r,a=t;for(i=a.offsetLeft,s=a.offsetTop,r=a;(a=a.offsetParent)&&a!==e.body&&"offsetLeft"in a;)i+=a.offsetLeft,s+=a.offsetTop,r=a;return r&&"fixed"===r.style.position&&(i+=n.pageXOffset||o.scrollLeft,s+=n.pageYOffset||o.scrollTop),{left:i,top:s}}function xe(t=window){return t.scrollY}function Ee(t=window){return t.scrollX}function Me(t,e=window){return t===e?xe(e):t.scrollTop}function Te(t,e=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:s}=i.style;if([t,e,s].includes("scroll"))return i;if(({overflow:t,overflowX:e,overflowY:s}=n.getComputedStyle(i)),o.includes(t)||o.includes(e)||o.includes(s))return i;if(i.clientHeight<=i.scrollHeight+1&&(o.includes(s)||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"),s=t.getPropertyValue("overflow-y"),r=t.getPropertyValue("overflow-x");if(e.includes(i)||e.includes(s)||e.includes(r))return o;o=o.parentNode}return n}function Ie(t,e,n=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 Oe(t){return t.offsetHeight}function De(t){return t.clientHeight||t.innerHeight}function Ne(t){return t.clientWidth||t.innerWidth}function Pe(t){return t.selectionStart?t.selectionStart:0}function We(t=window){t.getSelection&&(t.getSelection().empty?t.getSelection().empty():t.getSelection().removeAllRanges&&t.getSelection().removeAllRanges())}function Le(t,e,n){if(void 0===n&&(n=e),t.setSelectionRange){t.focus();try{t.setSelectionRange(e,n)}catch(o){const i=t.parentNode,s=i.style.display;i.style.display="block",t.setSelectionRange(e,n),i.style.display=s}}}function Be(t=document){const e=(e=!1)=>{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 s=n.offsetWidth;return i===s&&(s=o.clientWidth),t.body.removeChild(o),i-s},n=e();return 0!==n||!zt.safariBefore261.value||Yt()||qt()?n:e(!0)}function Ve(t=document){return void 0===ve&&(ve=Be(t)),ve}function Fe(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 $e(t,e,n){t.style.transform=`translate3d(${e},${n},0)`}function Ue(t){t.style.transform&&""!==t.style.transform&&(t.style.transform="")}function je(t){return t&&(["INPUT","SELECT","TEXTAREA"].indexOf(t.nodeName)>-1||"true"===t.contentEditable)}function Ye(t){return je(t)&&!1===t.hasAttribute("data-hot-input")}function Ge(t){return!t.parentNode}function qe(t,e=!0,n=!0){const o=t.ownerDocument,i=o.createRange(),s=o.defaultView.getSelection();pe(t,"contenteditable",!0),n&&pe(t,"aria-hidden","true"),e&&ue(t,"invisibleSelection"),i.selectNodeContents(t),s.removeAllRanges(),s.addRange(i)}function Ke(t,e=!0){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){const e=t?.ownerDocument?.defaultView.Element;return!!(e&&null!==e&&t instanceof e)}function Ze(t){return"function"==typeof t}function Qe(t,e=200){let n,o=null;function i(...i){return o&&clearTimeout(o),o=setTimeout(()=>{o=null,n=t.apply(this,i)},e),n}return i.cancel=function(){null!==o&&(clearTimeout(o),o=null)},i}function Je(t,...e){return function(...n){return t.apply(this,e.concat(n))}}function tn(t,e,n,o,i,s,r,a){return I(a)?t.call(e,n,o,i,s,r,a):I(r)?t.call(e,n,o,i,s,r):I(s)?t.call(e,n,o,i,s):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 sn(t){return nn.includes(t)}function rn(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","beforeAlter","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterDataProviderFetch","afterDataProviderFetchError","afterDataProviderFetchAbort","hasExternalDataSource","beforeRowsMutation","afterRowsMutation","afterRowsMutationError","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","beforeDataProviderFetch","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","beforeNotificationShow","afterNotificationShow","beforeNotificationHide","afterNotificationHide","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 pn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fn(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function mn(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,fn(t,e,"get"))}function wn(t,e,n){pn(t,e),e.set(t,n)}function bn(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,fn(t,e,"set"),n),n}function vn(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var Cn=new WeakMap,yn=new WeakMap,Sn=new WeakMap,kn=new WeakSet;class Rn{getHooks(t){return mn(this,Cn).get(t)??[]}add(t,e,n={}){mn(this,Cn).has(t)||(vn(this,kn,xn).call(this,t),dn.push(t));const o=mn(this,Cn).get(t),i=o.find(t=>t.callback===e);if(i)return void(!0===i.skip&&(i.skip=!1));const s=Number.isInteger(n.orderIndex)?n.orderIndex:0,r=!!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:s,runOnce:r,initialHook:a,skip:!1});let n=mn(this,Sn).has(t);n||0===s||(n=!0,mn(this,Sn).add(t)),n&&o.length>1&&mn(this,Cn).set(t,o.toSorted((t,e)=>t.orderIndex-e.orderIndex))}}has(t){return mn(this,Cn).has(t)&&mn(this,Cn).get(t).length>0}remove(t,e){if(!mn(this,Cn).has(t))return!1;const n=mn(this,Cn).get(t),o=n.find(t=>t.callback===e);if(o){let e=mn(this,yn).get(t);return o.skip=!0,e+=1,e>100&&(mn(this,Cn).set(t,n.filter(t=>!t.skip)),e=0),mn(this,yn).set(t,e),!0}return!1}destroy(){mn(this,Cn).clear(),mn(this,yn).clear(),bn(this,Cn,null),bn(this,yn,null)}constructor(){var t,e;pn(t=this,e=kn),e.add(t),wn(this,Cn,{writable:!0,value:void 0}),wn(this,yn,{writable:!0,value:void 0}),wn(this,Sn,{writable:!0,value:void 0}),bn(this,Cn,new Map),bn(this,yn,new Map),bn(this,Sn,new Set),dn.forEach(t=>vn(this,kn,xn).call(this,t))}}function xn(t){mn(this,Cn).set(t,[]),mn(this,yn).set(t,0)}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{static getSingleton(){return Tn}getBucket(t=null){return t?(t.pluginHookBucket||(t.pluginHookBucket=new Rn),t.pluginHookBucket):this.globalBucket}add(t,e,n=null,o){return Array.isArray(e)?x(e,e=>this.add(t,e,n)):(un.has(t)&&Qt(q(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,n=null,o){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,n=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,n=null){return this.getBucket(n).remove(t,e)}has(t,e=null){return this.getBucket(e).has(t)}run(t,e,n,o,i,s,r,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,s,r,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,s,r,a);void 0!==h&&(n=h),l[c]&&l[c].runOnce&&this.remove(e,l[c].callback,t),c+=1}}return n}destroy(t=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}constructor(){this.globalBucket=new Rn}}const Tn=new Mn;const _n=new Map;function Hn(t="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:On,hasItem:Dn,getNames:Nn,getValues:Pn}=Hn("editors");function Wn(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 Ln(t,e){let n;return"function"==typeof t?(In.get(t)||Vn(null,t),n=In.get(t)):"string"==typeof t?n=On(t):bt('Only strings and functions can be passed as "editor" parameter'),n||bt(`No editor registered under name "${t}"`),n.getInstance(e)}function Bn(t){return"function"==typeof t?t:(Dn(t)||bt(`No registered editor found under "${t}" name`),On(t).getConstructor())}function Vn(t,e){t&&"string"!=typeof t&&(t=(e=t).EDITOR_TYPE);const n=new Wn(e);"string"==typeof t&&An(t,n),In.set(e,n)}class Fn{addEventListener(t,e,n,o=!1){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,o=!1){let i,s=this.context.eventListeners.length;for(;s;)if(s-=1,i=this.context.eventListeners[s],i.event===e&&i.element===t){if(n&&n!==i.callback)continue;if(o&&i.eventManager!==this)continue;this.context.eventListeners.splice(s,1),i.element.removeEventListener(i.event,i.callbackProxy,i.options)}}clearEvents(t=!1){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 s;n.createEvent?(s=n.createEvent("MouseEvents"),s.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)):s=n.createEventObject(),t.dispatchEvent?t.dispatchEvent(s):t.fireEvent(`on${e}`,s)}constructor(t=null){this.context=t||this,this.context.eventListeners||(this.context.eventListeners=[])}}function zn(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function $n(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 Un=new WeakSet,jn=new WeakSet;class Yn{getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,t=>{t&&this.prepareEditor()});const t=this.hot.getSelectedRangeActive()?.highlight;if(!t||t.isHeader())return;const{row:e,col:n}=t,o=this.hot.runHooks("modifyGetCellCoords",e,n,!1,"meta");let i=e,s=n;if(Array.isArray(o)&&([i,s]=o),this.cellProperties=this.hot.getCellMeta(i,s),!this.isCellEditable())return void this.clearActiveEditor();const r=this.hot.getCell(e,n,!0);if(r){const t=this.hot.getCellEditor(this.cellProperties),o=this.hot.colToProp(s),a=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),s);this.activeEditor=Ln(t,this.hot),this.activeEditor.prepare(e,n,o,r,a,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(t,e,n=!1){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:s}=this.hot,r=i.isHidden(this.hot.toPhysicalRow(n))||s.isHidden(this.hot.toPhysicalColumn(o));return!(this.cellProperties.readOnly||!e||r)}moveSelectionAfterEnter(t){if(!this.hot.getSelected())return;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()}constructor(t,e,n){$n(this,Un),$n(this,jn),this.destroyed=!1,this.hot=t,this.tableMeta=e,this.selection=n,this.eventManager=new Fn(t),this.hot.addHook("afterDocumentKeyDown",t=>zn(this,Un,Gn).call(this,t)),this.hot.addHook("beforeCompositionStart",t=>zn(this,Un,Gn).call(this,t)),this.hot.view._wt.update("onCellDblClick",(t,e,n)=>zn(this,jn,qn).call(this,t,e,n))}}function Gn(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())&&(sn(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 Kn=new WeakMap;Yn.getInstance=function(t,e,n){let o=Kn.get(t);return o||(o=new Yn(t,e,n),Kn.set(t,o)),o};const Xn={" ":" ","&":"&","<":"<",">":">"},Zn=new RegExp(Object.keys(Xn).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),s=i.length,r=s>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<s;o+=1){const s=e&&0===o,a=[];for(let e=0;e<r;e+=1){const r=!s&&n&&0===e;let l="";if(s)l=`<th>${t.getColHeader(e-c)}</th>`;else if(r)l=`<th>${t.getRowHeader(o-d)}</th>`;else{const n=i[o][e],{hidden:s,rowspan:r,colspan:a}=t.getCellMeta(o-d,e-c);if(!s){const t=[];if(r&&t.push(`rowspan="${r}"`),a&&t.push(`colspan="${a}"`),O(n))l=`<td ${t.join(" ")}></td>`;else{const e=n.toString().replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");l=`<td ${t.join(" ")}>${e}</td>`}}}a.push(l)}const u=["<tr>",...a,"</tr>"].join("");s?l.splice(1,0,u):h.splice(-1,0,u)}return a.splice(1,0,l.join(""),h.join("")),a.join("")}function Jn(t){const e=t.length,n=["<table>"];for(let o=0;o<e;o+=1){const i=t[o],s=i.length,r=[];0===o&&n.push("<tbody>");for(let t=0;t<s;t+=1){const e=i[t],n=O(e)?"":e.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,t=>`<span style="mso-spacerun: yes">${" ".repeat(t.length-1)} </span>`).replace(/\t/gi,"	");r.push(`<td>${n}</td>`)}n.push("<tr>",...r,"</tr>"),o+1===e&&n.push("</tbody>")}return n.push("</table>"),n.join("")}const to=/<td\b[^>]*>/i,eo=/<\/\s*td\s*>/i,no=/<p.*?>/g;function oo(t,e){let n=1,o=e;for(;n>0;){const e=t.substring(o),i=e.match(to),s=e.match(eo);if(!s)return null;const r=o+s.index,a=s[0].length,l=i?o+i.index:t.length;if(l<r)n+=1,o=l+i[0].length;else{if(n-=1,0===n)return{start:r,length:a};o=r+a}}return null}function io(t,e=document){const n={},o=e.createDocumentFragment(),i=e.createElement("div");o.appendChild(i);let s=t;if("string"==typeof s){const t=function(t){const e=[];let n=0;for(;n<t.length;){const o=t.substring(n).match(to);if(!o){e.push(t.substring(n));break}const i=n+o.index,s=o[0],r=i+s.length;e.push(t.substring(n,i));const a=oo(t,r);if(!a){e.push(t.substring(i));break}const l=t.substring(i,a.start+a.length),h=a.start-i,c=l.substring(s.length,h).trim().replaceAll(/\n\s+/g," ").replaceAll(no,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/gm,"");e.push(`${s}${c}</td>`),n=a.start+a.length}return e.join("")}(s);i.insertAdjacentHTML("afterbegin",`${t}`),s=i.querySelector("table")}if(!s||!function(t){return"TABLE"===(t&&t.nodeName||"")}(s))return;const r=i.querySelector('meta[name$="enerator"]'),a=null!==s.querySelector("tbody th"),l=s.querySelector("tr"),h=l?Array.from(l.cells).reduce((t,e)=>t+e.colSpan,0)-(a?1:0):0,c=s.tFoot&&Array.from(s.tFoot.rows)||[],d=[];let u=!1,g=0,p=0;if(s.tHead){const t=Array.from(s.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,s=o>1?{label:i,colspan:o}:i;return t.push(s),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 f=[...d,...Array.from(s.tBodies).reduce((t,e)=>(Array.from(e.rows).forEach(e=>{t.push(e)}),t),[]),...c];p=f.length;const m=new Array(p);for(let t=0;t<p;t++)m[t]=new Array(h);const w=[],b=[];for(let t=0;t<p;t++){const e=f[t],n=Array.from(e.cells),o=n.length;for(let e=0;e<o;e++){const o=n[e],{nodeName:i,innerHTML:s,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<p)for(let t=h;t<h+l;t++)m[e][t]=null;const e=o.getAttribute("style");e&&e.includes("mso-ignore:colspan")||w.push({col:h,row:t,rowspan:a,colspan:l})}let e="";e=r&&/excel/gi.test(r.content)?s.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):s.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),m[t][h]=e.replace(Zn,t=>Xn[t])}else b.push(s)}}return w.length&&(n.mergeCells=w),b.length&&(n.rowHeaders=b),m.length&&(n.data=m),n}function so(t,e=[]){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 ro(t,e){return"."===e&&"string"==typeof t&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(t.trim())}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",po=new Map([[go,[-1,1]],["desc",[1,-1]]]),fo=t=>`The priority '${t}' is already declared in a map.`,mo=t=>`The priority '${t}' is not a number.`;const wo=t=>`The id '${t}' is already declared in a map.`;function bo({errorIdExists:t}={}){const e=new Map;function n(){return[...e]}function o(t){return e.has(t)}return t=Ze(t)?t:wo,{addItem:function(n,i){o(n)&&bt(t(n)),e.set(n,i)},clear:function(){e.clear()},getId:function(t){const[e]=n().find(([e,n])=>t===n&&e)||[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 Co=t=>`There is already registered "${t}" plugin.`,yo=function({errorPriorityExists:t,errorPriorityNaN:e}={}){const n=new Map;return t=Ze(t)?t:fo,e=Ze(e)?e:mo,{addItem:function(o,i){so(o)||bt(e(o)),n.has(o)&&bt(t(o)),n.set(o,i)},getItems:function(t=go){const[e,o]=po.get(t)||po.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({errorItemExists:t}={}){const e=new Set;return t=Ze(t)?t:vo,{addItem:function(n){e.has(n)&&bt(t(n)),e.add(n)},clear:function(){e.clear()},getItems:function(){return[...e]}}}({errorItemExists:Co}),ko=bo({errorIdExists:Co});function Ro(){return[...yo.getItems(),...So.getItems()]}function xo(t){const e=U(t);return ko.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=U(t);ko.hasItem(o)&&bt(Co(o));void 0===n?So.addItem(o):yo.addItem(n,o);ko.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)||bt(`No registered renderer found under "${t}" name`),To(t))}function Oo(t,e){"string"!=typeof t&&(t=(e=t).RENDERER_TYPE),Mo(t,e)}const{register:Do,getItem:No,hasItem:Po,getNames:Wo,getValues:Lo}=Hn("validators");function Bo(t,e){"string"!=typeof t&&(t=(e=t).VALIDATOR_TYPE),Do(t,e)}class Vo{initialize(){}process(t,e){const{totalCalculatedWidth:n,zeroBasedScrollOffset:o,viewportWidth:i,columnWidth:s}=e;n>=o&&n+s<=o+(o>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t),this.endColumn=t)}finalize(t){const{scrollOffset:e,viewportWidth:n,inlineStartOffset:o,zeroBasedScrollOffset:i,totalColumns:s,needReverse:r,positionCache:a,columnWidth:l}=t;if(this.endColumn===s-1&&r)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=a.getOffset(this.endColumn)+l-a.getOffset(this.startColumn-1);if(t<=n&&(this.startColumn-=1),t>=n)break}this.startPosition=null!==this.startColumn?a.getOffset(this.startColumn):null;const h=e+n-(i>0?n+1:n),c=null===this.startColumn?0:t.getColumnWidth(this.startColumn);h<-1*o||e>a.getOffset(t.lastProcessedIndex)||-1*e-n>-1*c?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class Fo{initialize(){}process(t,e){const{totalCalculatedHeight:n,zeroBasedScrollOffset:o,innerViewportHeight:i,rowHeight:s}=e;n>=o&&n+s<=i&&(null===this.startRow&&(this.startRow=t),this.endRow=t)}finalize(t){const{scrollOffset:e,viewportHeight:n,horizontalScrollbarHeight:o,totalRows:i,needReverse:s,positionCache:r,rowHeight:a}=t;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=r.getOffset(this.endRow)+a-r.getOffset(this.startRow-1);if(t<=n-o&&(this.startRow-=1),t>=n-o)break}this.startPosition=null!==this.startRow?r.getOffset(this.startRow):null;e+n-o<(null===this.startRow?0:t.getRowHeight(this.startRow))||e>r.getOffset(t.lastProcessedIndex)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class zo{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){const{scrollOffset:e,viewportWidth:n,inlineStartOffset:o,zeroBasedScrollOffset:i,totalColumns:s,needReverse:r,positionCache:a,columnWidth:l}=t;if(this.endColumn===s-1&&r)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=a.getOffset(this.endColumn)+l-a.getOffset(this.startColumn-1);if(this.startColumn-=1,t>n)break}this.startPosition=null!==this.startColumn?a.getOffset(this.startColumn):null;e+n-(i>0?n+1:n)<-1*o||e>a.getOffset(t.lastProcessedIndex)+l||-1*e-n>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class $o{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){const{scrollOffset:e,viewportHeight:n,horizontalScrollbarHeight:o,totalRows:i,needReverse:s,positionCache:r,rowHeight:a}=t;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=r.getOffset(this.endRow)+a-r.getOffset(this.startRow-1);if(this.startRow-=1,t>=n-o)break}this.startPosition=null!==this.startRow?r.getOffset(this.startRow):null;e+n-o<0||e>r.getOffset(t.lastProcessedIndex)+a?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class Uo{initialize({totalColumns:t}){this.count=t,this.endColumn=this.count-1}process(){}finalize(){}constructor(){this.count=0,this.startColumn=0,this.endColumn=0,this.startPosition=0,this.isVisibleInTrimmingContainer=!0}}class jo{initialize({totalRows:t}){this.count=t,this.endRow=this.count-1}process(){}finalize(){}constructor(){this.count=0,this.startRow=0,this.endRow=0,this.startPosition=0,this.isVisibleInTrimmingContainer=!0}}class Yo extends zo{finalize(t){super.finalize(t);const{overrideFn:e,totalColumns:n,positionCache:o}=t;if(null!==this.startColumn&&"function"==typeof e){const t=this.startColumn,n=this.endColumn;e(this),this.columnStartOffset=t-this.startColumn,this.columnEndOffset=this.endColumn-n}this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==this.startColumn?o.getOffset(this.startColumn):null,n<this.endColumn&&(this.endColumn=n-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(...t){super(...t),this.columnStartOffset=0,this.columnEndOffset=0}}class Go extends $o{finalize(t){super.finalize(t);const{overrideFn:e,totalRows:n,positionCache:o}=t;if(null!==this.startRow&&"function"==typeof e){const t=this.startRow,n=this.endRow;e(this),this.rowStartOffset=t-this.startRow,this.rowEndOffset=this.endRow-n}this.startRow<0&&(this.startRow=0),this.startPosition=null!==this.startRow?o.getOffset(this.startRow):null,n<this.endRow&&(this.endRow=n-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}constructor(...t){super(...t),this.rowStartOffset=0,this.rowEndOffset=0}}function qo(t,{totalCount:e,zeroBasedScrollOffset:n,scrollEnd:o,positionCache:i,setSizeField:s,setTotalCalculated:r,getTotalCalculated:a}){t._initialize(t);let l=0;if(n>0&&e>0){l=i.findIndexAtOffset(n),r(t,i.getOffset(l))}let h=-1;for(let n=l;n<e;n++){const e=i.getSizeAt(n);if(s(t,e),t._process(n,t),h=n,r(t,a(t)+e),a(t)>=o){t.needReverse=!1;break}}t.lastProcessedIndex=h,t._finalize(t)}class Ko{_initialize(t){this.calculationTypes.forEach(([e,n])=>{this.calculationResults.set(e,n),n.initialize(t)})}_process(t,e){this.calculationTypes.forEach(([,n])=>n.process(t,e))}_finalize(t){this.calculationTypes.forEach(([,e])=>e.finalize(t))}getResultsFor(t){return this.calculationResults.get(t)}constructor(t){this.calculationTypes=[],this.calculationResults=new Map,this.calculationTypes=t}}class Xo extends Ko{calculate(){qo(this,{totalCount:this.totalColumns,zeroBasedScrollOffset:this.zeroBasedScrollOffset,scrollEnd:this.zeroBasedScrollOffset+this.viewportWidth,positionCache:this.positionCache,setSizeField:(t,e)=>{t.columnWidth=e},setTotalCalculated:(t,e)=>{t.totalCalculatedWidth=e},getTotalCalculated:t=>t.totalCalculatedWidth})}getColumnWidth(t){return this.positionCache.getSizeAt(t)}constructor({calculationTypes:t,viewportWidth:e,scrollOffset:n,totalColumns:o,overrideFn:i,inlineStartOffset:s,columnWidthCache:r}){super(t),this.viewportWidth=0,this.scrollOffset=0,this.zeroBasedScrollOffset=0,this.totalColumns=0,this.columnWidth=0,this.overrideFn=null,this.inlineStartOffset=0,this.totalCalculatedWidth=0,this.needReverse=!0,this.viewportWidth=e,this.scrollOffset=n,this.zeroBasedScrollOffset=Math.max(n,0),this.totalColumns=o,this.overrideFn=i,this.inlineStartOffset=s,this.positionCache=r,this.calculate()}}class Zo extends Ko{calculate(){qo(this,{totalCount:this.totalRows,zeroBasedScrollOffset:this.zeroBasedScrollOffset,scrollEnd:this.innerViewportHeight,positionCache:this.positionCache,setSizeField:(t,e)=>{t.rowHeight=e},setTotalCalculated:(t,e)=>{t.totalCalculatedHeight=e},getTotalCalculated:t=>t.totalCalculatedHeight})}getRowHeight(t){return this.positionCache.getSizeAt(t)}constructor({calculationTypes:t,viewportHeight:e,scrollOffset:n,totalRows:o,overrideFn:i,horizontalScrollbarHeight:s,rowHeightCache:r}){super(t),this.viewportHeight=0,this.scrollOffset=0,this.zeroBasedScrollOffset=0,this.totalRows=0,this.rowHeight=0,this.overrideFn=null,this.horizontalScrollbarHeight=0,this.innerViewportHeight=0,this.totalCalculatedHeight=0,this.needReverse=!0,this.viewportHeight=e,this.scrollOffset=n,this.zeroBasedScrollOffset=Math.max(n,0),this.totalRows=o,this.overrideFn=i,this.horizontalScrollbarHeight=s??0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.positionCache=r,this.calculate()}}const Qo=50;function Jo(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function ti(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Jo(t,e,"get"))}function ei(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 ni(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Jo(t,e,"set"),n),n}var oi=new WeakMap;class ii{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 ti(this,oi)}isSouthEastOf(t){return this.row>=t.row&&(ti(this,oi)?this.col<=t.col:this.col>=t.col)}isNorthWestOf(t){return this.row<=t.row&&(ti(this,oi)?this.col>=t.col:this.col<=t.col)}isSouthWestOf(t){return this.row>=t.row&&(ti(this,oi)?this.col>=t.col:this.col<=t.col)}isNorthEastOf(t){return this.row<=t.row&&(ti(this,oi)?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(t?.row)&&(this.row=t.row),Number.isInteger(t?.col)&&(this.col=t.col),t instanceof ii&&ni(this,oi,t.isRtl()),this}clone(){return new ii(this.row,this.col,ti(this,oi))}toObject(){return{row:this.row,col:this.col}}constructor(t,e,n=!1){ei(this,oi,{writable:!0,value:void 0}),this.row=null,this.col=null,ni(this,oi,!1),ni(this,oi,n),void 0!==t&&void 0!==e&&(this.row=t,this.col=e)}}function si(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function ri(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,si(t,e,"get"))}function ai(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 li(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,si(t,e,"set"),n),n}var hi=new WeakMap;class ci{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,e=!0){if(this.includesRange(t)||!this.overlaps(t))return!1;const n=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),i=this.getDirection(),s=t.getOuterTopStartCorner(),r=t.getOuterBottomEndCorner(),a=Math.min(n.row,s.row),l=Math.min(n.col,s.col),h=Math.max(o.row,r.row),c=Math.max(o.col,r.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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ri(this,hi)?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 ii&&(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),s=Math.min(t.from.row,t.to.row),r=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===s&&h.push("top"),i===l&&h.push(ri(this,hi)?"left":"right"),n===r&&h.push("bottom"),o===a&&h.push(ri(this,hi)?"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,ri(this,hi))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(t,e){return new ii(t,e,ri(this,hi))}constructor(t,e=t,n=t,o=!1){ai(this,hi,{writable:!0,value:void 0}),this.highlight=null,this.from=null,this.to=null,li(this,hi,!1),this.highlight=t.clone(),this.from=e.clone(),this.to=n.clone(),li(this,hi,o)}}function di(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ui(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function gi(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ui(t,e,"get"))}function pi(t,e,n){di(t,e),e.set(t,n)}function fi(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ui(t,e,"set"),n),n}function mi(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function wi(t,e){di(t,e),e.add(t)}var bi=new WeakMap,vi=new WeakMap,Ci=new WeakMap,yi=new WeakMap,Si=new WeakMap,ki=new WeakMap,Ri=new WeakMap,xi=new WeakMap,Ei=new WeakMap,Mi=new WeakMap,Ti=new WeakMap,_i=new WeakMap,Hi=new WeakSet,Ii=new WeakSet,Ai=new WeakSet;let Oi=class{registerEvents(){gi(this,ki).addEventListener(gi(this,Ci).holder,"contextmenu",t=>this.onContextMenu(t)),gi(this,ki).addEventListener(gi(this,Ci).TABLE,"mouseover",t=>this.onMouseOver(t)),gi(this,ki).addEventListener(gi(this,Ci).TABLE,"mouseout",t=>this.onMouseOut(t));const t=()=>{gi(this,ki).addEventListener(gi(this,Ci).holder,"touchstart",t=>this.onTouchStart(t)),gi(this,ki).addEventListener(gi(this,Ci).holder,"touchend",t=>this.onTouchEnd(t)),gi(this,ki).addEventListener(gi(this,Ci).holder,"touchmove",t=>mi(this,Ai,Pi).call(this,t)),this.momentumScrolling||(this.momentumScrolling={}),gi(this,ki).addEventListener(gi(this,Ci).holder,"scroll",()=>{mi(this,Ii,Ni).call(this),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||gi(this,bi).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,gi(this,bi).getSetting("onAfterMomentumScroll"))},200)})},e=()=>{gi(this,ki).addEventListener(gi(this,Ci).holder,"mouseup",t=>this.onMouseUp(t)),gi(this,ki).addEventListener(gi(this,Ci).holder,"mousedown",t=>this.onMouseDown(t))};Yt()?t():(Bt()&&t(),e())}selectedCellWasTouched(t){const e=this.parentCell(t).coords;if(gi(this,xi)&&e){const[t,n]=[e.row,gi(this,xi).from.row],[o,i]=[e.col,gi(this,xi).from.col];return t===n&&o===i}return!1}parentCell(t){const e={},n=se(t,["TD","TH"],gi(this,Ci).TABLE);return n?(e.coords=gi(this,Ci).getCoords(n),e.TD=n):de(t,"wtBorder")&&de(t,"current")?(e.coords=gi(this,yi).getFocusSelection().cellRange.highlight,e.TD=gi(this,Ci).getCell(e.coords)):de(t,"wtBorder")&&de(t,"area")&&gi(this,yi).getAreaSelection().cellRange&&(e.coords=gi(this,yi).getAreaSelection().cellRange.to,e.TD=gi(this,Ci).getCell(e.coords)),e}onMouseDown(t){const e=gi(this,vi).rootDocument.activeElement,n=Je(ee,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")?gi(this,bi).getSetting("onCellCornerMouseDown",t,o):i.TD&&gi(this,bi).has("onCellMouseDown")&&this.callListener("onCellMouseDown",t,i.coords,i.TD),(0===t.button||this.touchApplied)&&i.TD&&(gi(this,Mi)[0]=i.TD,clearTimeout(gi(this,Ei)[0]),gi(this,Ei)[0]=setTimeout(()=>{gi(this,Mi)[0]=null},1e3))}onContextMenu(t){if(mi(this,Ii,Ni).call(this),gi(this,bi).has("onCellContextMenu")){const e=this.parentCell(t.target);e.TD&&this.callListener("onCellContextMenu",t,e.coords,e.TD)}}onMouseOver(t){if(!gi(this,bi).has("onCellMouseOver"))return;const e=gi(this,Ci).TABLE,n=se(t.target,["TD","TH"],e),o=gi(this,Si)||this;n&&n!==o.lastMouseOver&&re(n,e)&&(o.lastMouseOver=n,this.callListener("onCellMouseOver",t,gi(this,Ci).getCoords(n),n))}onMouseOut(t){if(!gi(this,bi).has("onCellMouseOut"))return;const e=gi(this,Ci).TABLE,n=se(t.target,["TD","TH"],e),o=se(t.relatedTarget,["TD","TH"],e),i=gi(this,Si)||this;n&&n!==o&&re(n,e)&&(this.callListener("onCellMouseOut",t,gi(this,Ci).getCoords(n),n),null===o&&(i.lastMouseOver=null))}onMouseUp(t){const e=this.parentCell(t.target);e.TD&&gi(this,bi).has("onCellMouseUp")&&this.callListener("onCellMouseUp",t,e.coords,e.TD),(0===t.button||this.touchApplied)&&(e.TD===gi(this,Mi)[0]&&e.TD===gi(this,Mi)[1]?(de(t.target,"corner")?this.callListener("onCellCornerDblClick",t,e.coords,e.TD):this.callListener("onCellDblClick",t,e.coords,e.TD),gi(this,Mi)[0]=null,gi(this,Mi)[1]=null):e.TD===gi(this,Mi)[0]&&(gi(this,Mi)[1]=e.TD,clearTimeout(gi(this,Ei)[1]),gi(this,Ei)[1]=setTimeout(()=>{gi(this,Mi)[1]=null},500)))}onTouchStart(t){fi(this,xi,gi(this,yi).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(t),mi(this,Hi,Di).call(this,t)}onTouchEnd(t){mi(this,Ii,Ni).call(this);const e=t.target,n=this.parentCell(e)?.coords,o=I(n)&&n.row>=0&&n.col>=0;if(t.cancelable&&o&&gi(this,bi).getSetting("isDataViewInstance")){const n=["A","BUTTON","INPUT"];Gt()&&(zt.chromeWebKit.value||zt.firefoxWebKit.value)&&this.selectedCellWasTouched(e)&&!n.includes(e.tagName)?t.preventDefault():this.selectedCellWasTouched(e)||t.preventDefault()}this.onMouseUp(t),this.touchApplied=!1}callListener(t,e,n,o){const i=gi(this,bi).getSettingPure(t);i&&i(e,n,o,gi(this,Ri).call(this))}destroy(){clearTimeout(gi(this,Ei)[0]),clearTimeout(gi(this,Ei)[1]),mi(this,Ii,Ni).call(this),gi(this,ki).destroy()}constructor(t,e,n,o,i,s,r=null){wi(this,Hi),wi(this,Ii),wi(this,Ai),pi(this,bi,{writable:!0,value:void 0}),pi(this,vi,{writable:!0,value:void 0}),pi(this,Ci,{writable:!0,value:void 0}),pi(this,yi,{writable:!0,value:void 0}),pi(this,Si,{writable:!0,value:void 0}),pi(this,ki,{writable:!0,value:void 0}),pi(this,Ri,{writable:!0,value:void 0}),pi(this,xi,{writable:!0,value:void 0}),pi(this,Ei,{writable:!0,value:void 0}),pi(this,Mi,{writable:!0,value:void 0}),pi(this,Ti,{writable:!0,value:void 0}),pi(this,_i,{writable:!0,value:void 0}),fi(this,Ei,[null,null]),fi(this,Mi,[null,null]),fi(this,Ti,null),fi(this,_i,null),fi(this,bi,n),fi(this,vi,e),fi(this,Ci,i),fi(this,yi,s),fi(this,Si,r),fi(this,ki,o),fi(this,Ri,t),this.registerEvents()}};function Di(t){mi(this,Ii,Ni).call(this);const e=t.touches[0];e&&(fi(this,_i,{x:e.clientX,y:e.clientY}),fi(this,Ti,setTimeout(()=>{fi(this,Ti,null),fi(this,_i,null),gi(this,Mi)[0]=null,gi(this,Mi)[1]=null,clearTimeout(gi(this,Ei)[0]),clearTimeout(gi(this,Ei)[1]);const n=t.target,o=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY});n.dispatchEvent(o)},500)))}function Ni(){null!==gi(this,Ti)&&(clearTimeout(gi(this,Ti)),fi(this,Ti,null)),fi(this,_i,null)}function Pi(t){if(null===gi(this,Ti)||null===gi(this,_i))return;const e=t.touches[0];if(!e)return void mi(this,Ii,Ni).call(this);const n=Math.abs(e.clientX-gi(this,_i).x),o=Math.abs(e.clientY-gi(this,_i).y);(n>10||o>10)&&mi(this,Ii,Ni).call(this)}class Wi{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))}constructor(t,e,n){this.offset=t,this.total=e,this.countTH=n}}class Li{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))}constructor(t,e,n){this.offset=t,this.total=e,this.countTH=n}}class Bi{setSize(t){this.currentSize=this.nextSize,this.nextSize=t}setOffset(t){this.currentOffset=this.nextOffset,this.nextOffset=t}constructor(){this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}}class Vi{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()}constructor(){this.size=new Bi,this.workingSpace=0,this.sharedSize=null}}function Fi(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function zi(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Fi(t,e,"get"))}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 Ui(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Fi(t,e,"set"),n),n}var ji=new WeakMap;class Yi{get length(){return this.order.length}has(t){return zi(this,ji).has(t)}get(t){return t<this.order.length?this.order[t]:-1}remove(t){const e=this.order.indexOf(t);e>-1&&(this.order.splice(e,1),zi(this,ji).delete(t))}prepend(t){this.order.unshift(t),zi(this,ji).add(t);const e=this.order.pop();return zi(this,ji).delete(e),e}constructor(t,e){$i(this,ji,{writable:!0,value:void 0}),this.order=[],Ui(this,ji,new Set);const n=new Array(e),o=zi(this,ji);for(let i=0;i<e;i++){const e=t+i;n[i]=e,o.add(e)}this.order=n}}class Gi{diff(){const{sizeSet:t}=this,{currentSize:e,nextSize:n,currentOffset:o,nextOffset:i}=t.getViewSize();let s=Math.max(n,e);if(0===s)return[];const r=new Yi(o,e),a=!t.isShared()||t.isPlaceOn(2),l=[];for(let t=0;t<s;t++){const e=r.get(t),o=t<n?i+t:-1;if(-1===o)l.push([1,e]);else if(-1===e)a?l.push([2,o]):l.push([3,o]);else if(o>e)r.has(o)&&(r.remove(o),n<=r.length&&(s-=1)),l.push([5,o,e]);else if(o<e){const t=r.prepend(o);l.push([4,o,e,t])}else l.push([0,o])}return l}constructor(t){this.sizeSet=t}}class qi{applyCommand(t){const{rootNode:e}=this.orderView,[n,o,i,s]=t,r=this.orderView.nodesPool(o);switch(this.orderView.collectedNodes.push(r),n){case 3:e.insertBefore(r,e.firstChild);break;case 2:e.appendChild(r);break;case 4:e.insertBefore(r,this.orderView.nodesPool(i)),e.removeChild(this.orderView.nodesPool(s));break;case 5:e.replaceChild(r,this.orderView.nodesPool(i));break;case 1:e.removeChild(r)}}start(){this.orderView.collectedNodes.length=0,this.leads=this.orderView.viewDiffer.diff(),this.leadIndex=0}render(){this.leadIndex<this.leads.length&&(this.applyCommand(this.leads[this.leadIndex]),this.leadIndex+=1)}end(){const{leads:t}=this;for(;this.leadIndex<t.length;)this.applyCommand(t[this.leadIndex]),this.leadIndex+=1}constructor(t){this.leads=[],this.leadIndex=0,this.orderView=t}}class Ki{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 s=n&&e.isPlaceOn(1);for(;i>o;)t.removeChild(s?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(){}constructor(t){this.visualIndex=0,this.orderView=t}}class Xi{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()}constructor(t,e,n){var o;this.sizeSet=new Vi,this.collectedNodes=[],this.viewDiffer=new Gi(this.sizeSet),this.rootNode=t,this.nodesPool=e,this.childNodeType=n,this.rendererAdapter=(o=this,Ut()?new Ki(o):new qi(o))}}class Zi extends Xi{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}}class Qi{setRootDocument(t){this.rootDocument=t}obtain(t,e){if(Ut())return this.rootDocument.createElement(this.nodeType);const n="number"==typeof e?1048576*t+e:t;let o=this.pool.get(n);return void 0!==o||(o=this.rootDocument.createElement(this.nodeType),this.pool.set(n,o)),o}constructor(t){this.pool=new Map,this.nodeType=t.toUpperCase()}}class Ji{setTable(t){this.nodesPool&&this.nodesPool.setRootDocument(t.rootDocument),this.table=t}render(){}constructor(t,e){this.nodesPool=null,this.table=null,this.renderedNodes=0,this.nodesPool="string"==typeof t?new Qi(t):null,this.nodeType=t,this.rootNode=e}}class ts extends Ji{obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new Zi(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 s=0;s<t;s++){const t=this.table.renderedRowToSource(s),r=o.getRenderedNode(s);this.sourceRowIndex=t;const a=this.obtainOrderView(r),l=i.obtainOrderView(r);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"),fe(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&pe(n,[et(),st(),gt(o+1),Q(-1)]),e[o](t,n,o)}a.end()}}constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}class es extends Ji{getRenderedNode(t){return this.orderView.getNode(t)}render(){const{columnHeadersCount:t}=this.table;this.table.isAriaEnabled()&&pe(this.rootNode,[["role","rowgroup"]]),this.orderView.setSize(t).setOffset(0).start();for(let e=0;e<t;e++){this.orderView.render();const t=this.orderView.getCurrentNode();this.table.isAriaEnabled()&&pe(t,[ot(),ut(e+1)])}this.orderView.end()}constructor(t){super("TR",t),this.orderView=new Xi(t,t=>this.nodesPool.obtain(t),this.nodeType)}}class ns extends Ji{obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new Xi(t,t=>this.nodesPool.obtain(this.sourceRowIndex,t),this.nodeType),this.orderViews.set(t,e)),e}render(){const{columnHeadersCount:t,columnHeaderFunctions:e,columnsToRender:n,rowHeadersCount:o,columnHeaderRows:i}=this.table,s=n+o;for(let n=0;n<t;n++){const t=i.getRenderedNode(n);this.sourceRowIndex=n;const r=this.obtainOrderView(t);r.setSize(s).setOffset(0).start();for(let t=0;t<s;t++){r.render();const i=t-o,s=this.table.renderedColumnToSource(i),a=r.getCurrentNode();a.className="",a.removeAttribute("style"),fe(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&pe(a,[gt(t+1),Q(-1),nt(),...i>=0?[it()]:[tt(),rt("Select whole grid")]]),e[n](s,a,n)}r.end()}}constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}let os=!1;class is extends Ji{render(){const{columnsToRender:t,rowHeadersCount:e}=this.table,n=t+e;!os&&t>1e3&&(os=!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.`)),this.orderView.setSize(n).setOffset(0).start();for(let t=0;t<n;t++){this.orderView.render();const n=this.orderView.getCurrentNode();if(t<e){const e=this.table.renderedColumnToSource(t);n.style.width=`${this.table.columnUtils.getHeaderWidth(e)}px`}else{const o=this.table.renderedColumnToSource(t-e);n.style.width=`${this.table.columnUtils.getWidth(o)}px`}}this.orderView.end();const o=this.rootNode.firstChild;o&&ue(o,"rowHeader")}constructor(t){super("COL",t),this.orderView=new Xi(t,t=>this.nodesPool.obtain(t),this.nodeType)}}const ss="ht__row_even",rs="ht__row_odd";let as=!1;class ls extends Ji{getRenderedNode(t){return this.orderView.getNode(t)}render(){const{rowsToRender:t}=this.table;!as&&t>1e3&&(as=!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()&&pe(this.rootNode,[["role","rowgroup"]]),this.orderView.setSize(t).setOffset(this.table.renderedRowToSource(0)).start();for(let e=0;e<t;e++){this.orderView.render();const t=this.orderView.getCurrentNode(),n=this.table.renderedRowToSource(e);this.table.isAriaEnabled()&&pe(t,[ot(),ut(n+(this.table.rowUtils?.dataAccessObject?.columnHeaders.length??0)+1)]),(n+1)%2==0?de(t,ss)||(ge(t,rs),ue(t,ss)):de(t,rs)||(ge(t,ss),ue(t,rs))}this.orderView.end()}constructor(t){super("TR",t),this.orderView=new Xi(t,t=>this.nodesPool.obtain(t),this.nodeType)}}class hs extends Ji{obtainOrderView(t){let e;return this.orderViews.has(t)?e=this.orderViews.get(t):(e=new Zi(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 i=0;i<t;i++){const t=this.table.renderedRowToSource(i),s=n.getRenderedNode(i);this.sourceRowIndex=t;const r=this.obtainOrderView(s),a=o.obtainOrderView(s);r.prependView(a).setSize(e).setOffset(0).start();for(let n=0;n<e;n++){r.render();const e=this.table.renderedColumnToSource(n),o=r.getCurrentNode();de(o,"hide")||(o.className=""),o.removeAttribute("style"),o.removeAttribute("dir"),fe(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(t,e,o),this.table.isAriaEnabled()&&pe(o,[...o.hasAttribute("role")?[]:[J()],Q(-1),gt(e+(this.table.rowUtils?.dataAccessObject?.rowHeaders.length??0)+1)])}r.end()}}constructor(){super("TD"),this.orderViews=new WeakMap,this.sourceRowIndex=0}}class cs{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({rowHeaders:t,columnHeaderRows:e,columnHeaders:n,colGroup:o,rows:i,cells:s}={}){t.setTable(this),e.setTable(this),n.setTable(this),o.setTable(this),i.setTable(this),s.setTable(this),this.rowHeaders=t,this.columnHeaderRows=e,this.columnHeaders=n,this.colGroup=o,this.rows=i,this.cells=s}renderedRowToSource(t){return this.rowFilter.renderedToSource(t)}renderedColumnToSource(t){return this.columnFilter.renderedToSource(t)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.columnHeaderRows.render(),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),s=this.stylesHandler.areCellsBorderBox()?0:1;t.firstChild.style.height=i?i-s+"px":""}}}constructor(t,{cellRenderer:e,stylesHandler:n}={}){this.rowHeaders=null,this.columnHeaderRows=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=e,this.stylesHandler=n}}class ds{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}render(){this.renderer.render()}constructor({TABLE:t,THEAD:e,COLGROUP:n,TBODY:o,rowUtils:i,columnUtils:s,cellRenderer:r,stylesHandler:a}={}){this.renderer=new cs(t,{cellRenderer:r,stylesHandler:a}),this.renderer.setRenderers({rowHeaders:new ts,columnHeaderRows:new es(e),columnHeaders:new ns,colGroup:new is(n),rows:new ls(o),cells:new hs}),this.renderer.setAxisUtils(i,s)}}class us{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)}}}constructor(t,e){this.headerWidths=new Map,this.dataAccessObject=t,this.wtSettings=e}}class gs{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}constructor(t,e){this.dataAccessObject=t,this.wtSettings=e}}class ps{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")&&pe(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")&&pe(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&&pe(n,[Q(-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")&&pe(n.parentNode,[["role","presentation"]])),n.appendChild(t)),this.wtSettings.getSetting("ariaTags")&&pe(n,[["role","presentation"]]),n}draw(t=!1){const{wtSettings:e}=this,{wtOverlays:n,wtViewport:o}=this.dataAccessObject,i=e.getSetting("totalRows"),s=e.getSetting("totalColumns"),r=e.getSetting("rowHeaders"),a=r.length,l=e.getSetting("columnHeaders"),h=l.length;let c=t;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=Re(this.holder),o.rowHeightCache.ensureBuilt(),o.columnWidthCache.ensureBuilt(),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=Re(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const t=Math.max(this.getFirstRenderedRow(),0),e=Math.max(this.getFirstRenderedColumn(),0);this.rowFilter=new Li(t,i,h),this.columnFilter=new Wi(e,s,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(r,l),(this.is(vs)||this.is(Ss))&&this.tableRenderer.setHeaderContentRenderers(r,[]),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.syncOversizedColumnHeadersWithDOM(),(this.isMaster||this.is(vs))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||(o.rowHeightCache.ensureBuilt(),o.columnWidthCache.ensureBuilt(),o.createVisibleCalculators()),n.refresh(!1),n.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(vs)&&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,s,r;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;n;)n-=1,i=this.getColumnHeaderHeight(n),s=this.getColumnHeader(e,n),s&&(r=De(s),(!i&&o<r||i<r)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=r),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`}}syncOversizedColumnHeadersWithDOM(){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(!e[o]||!n[o])continue;const t=De(e[o]);t>n[o]+1&&(n[o]=t)}}resetOversizedRows(){const{wtSettings:t}=this,{wtViewport:e}=this.dataAccessObject;if((this.isMaster||this.is(vs))&&!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&&bt("TR was expected to be rendered but is not");const s=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];return!s&&n>=0&&bt("TD or TH was expected to be rendered but is not"),s}getRow(t){let e=null,n=null;return t<0?(e=this.rowFilter?.sourceRowToVisibleColHeadedRow(t),n=this.THEAD):(e=this.rowFilter?.sourceToRendered(t),n=this.TBODY),void 0!==e&&void 0!==n&&(!(n.childNodes.length<e+1)&&n.childNodes[e])}getColumnHeader(t,e=0){const n=this.THEAD.childNodes[e];return 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,e=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 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=n?.childNodes[o];i&&e.push(i)}return e}getCoords(t){let e=t;if("TD"!==e.nodeName&&"TH"!==e.nodeName&&(e=ie(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),s=e.cellIndex;if(ae(ys,e,this.wtRootElement)||ae(bs,e,this.wtRootElement))"THEAD"===o.nodeName&&(i-=o.childNodes.length);else if(ae(Ss,e,this.wtRootElement)||ae(vs,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));ae(ys,e,this.wtRootElement)||ae(Cs,e,this.wtRootElement)||ae(Ss,e,this.wtRootElement)?s=this.columnFilter.offsettedTH(s):this.columnFilter&&(s=this.columnFilter.visibleRowHeadedColumnToSourceColumn(s));const r=this.wtSettings.getSetting("onModifyGetCoordsElement",i,s);return r&&Array.isArray(r)&&([i,s]=r),this.wot.createCellCoords(i,s)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let t=this.TBODY.childNodes.length;const e=this.wtSettings.getSetting("stylesHandler"),n=t*e.getDefaultRowHeight(),o=De(this.TBODY)-1,i=e.areCellsBorderBox(),s=i?Oe:De,r=i?0:1,a=i?1:0;let l,h,c,d,u;if(n===o&&!this.wtSettings.getSetting("fixedRowsBottom"))return;const{wtViewport:g}=this.dataAccessObject;let p=!1;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?s(u):s(d)-r,(!l&&e.getDefaultRowHeight()<h-n||l<h)&&(i||(h+=1),g.oversizedRows[c]=h,p=!0)}p&&g.rowHeightCache.invalidate()}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 Oe(this.TABLE)}getTotalWidth(){const t=Ae(this.hider);return 0!==t?t:this.getWidth()}getTotalHeight(){const t=Oe(this.hider);return 0!==t?t:this.getHeight()}isVisible(){return ke(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}constructor(t,e,n,o,i){this.wtSettings=null,this.TBODY=null,this.THEAD=null,this.COLGROUP=null,this.hasTableHeight=!0,this.hasTableWidth=!0,this.isTableVisible=!1,this.tableOffset=0,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 s=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(s)),this.rowUtils=new gs(this.dataAccessObject,this.wtSettings),this.columnUtils=new us(this.dataAccessObject,this.wtSettings),this.tableRenderer=new ds({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")})}}const fs={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(fs,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const ms={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(ms,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});class ws extends ps{constructor(t,e,n,o){super(t,e,n,o,Ss)}}Rt(ws,fs),Rt(ws,ms);const bs="top",vs="bottom",Cs="inline_start",ys="top_inline_start_corner",Ss="bottom_inline_start_corner",ks=[bs,vs,Cs,ys,Ss],Rs=new Map([[bs,`ht_clone_${bs}`],[vs,`ht_clone_${vs}`],[Cs,`ht_clone_${Cs} ht_clone_left`],[ys,`ht_clone_${ys} ht_clone_top_left_corner`],[Ss,`ht_clone_${Ss} ht_clone_bottom_left_corner`]]);function xs(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Es(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 Ms=new WeakSet,Ts=new WeakSet;class _s{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,e="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:s,inlineStartOverlay:r}=this.dataAccessObject,a="auto"===e;if(a&&t<s)return!1;const l=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(a&&(t<l||t>h)||!a)&&(c=r.scrollTo(t,a?t>=this.getLastPartiallyVisibleColumn():"end"===e)),c}scrollViewportVertically(t,e="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:s,fixedRowsTop:r,topOverlay:a}=this.dataAccessObject,l="auto"===e;if(l&&(t<r||t>o-s-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 xs(this,Ts,Is).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return xs(this,Ts,Is).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return xs(this,Ms,Hs).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return xs(this,Ms,Hs).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}constructor(t){Es(this,Ms),Es(this,Ts),this.dataAccessObject=t}}function Hs(t){const{wtSettings:e,inlineStartOverlay:n,wtTable:o,wtViewport:i,totalColumns:s,rootWindow:r}=this.dataAccessObject;if(n.mainTableScrollableElement===r){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=Re(o.wtRootElement).left}const l=Math.abs(Te(r,r));if(a>l){const e=Ne(r);let o=i.getRowHeaderWidth();for(let i=1;i<=s;i++)if(o+=n.sumCellSizes(i-1,i),a+o-l>=e){t=i-2;break}}}return t}function Is(t){const{topOverlay:e,wtTable:n,wtViewport:o,totalRows:i,rootWindow:s}=this.dataAccessObject;if(e.mainTableScrollableElement===s){const r=Re(n.wtRootElement),a=Me(s,s);if(r.top>a){const n=De(s);let l=o.getColumnHeaderHeight();for(let o=1;o<=i;o++)if(l+=e.sumCellSizes(o-1,o),r.top+l-a>=n){t=o-2;break}}}return t}class As{get eventManager(){return new Fn(this)}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 ii(t,e,this.wtSettings.getSetting("rtlMode"))}createCellRange(t,e,n){return new ci(t,e,n,this.wtSettings.getSetting("rtlMode"))}draw(t=!1){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,e=!1){if(!e)return this.wtTable.getCell(t);const n=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),i=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");if(t.row<o&&t.col<s)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(t);if(t.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(t);if(t.col<s&&t.row>=n-i){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(t)}else{if(t.col<s)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(t);if(t.row<n&&t.row>=n-i&&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")}}}constructor(t,e){this.guid=`wt_${j()}`,this.drawInterrupted=!1,this.drawn=!1,this.activeOverlayName="master",this.domBindings={rootTable:t,rootDocument:t.ownerDocument,rootWindow:t.ownerDocument.defaultView},this.wtSettings=e,this.wtScroll=new _s(this.createScrollDao())}}class Os extends As{constructor(t,e,n){super(t,e);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 Oi(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}class Ds{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"),s=e<this.wtSettings.getSetting("fixedRowsTop"),r=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(s,i,h,l):this.getRelativeCellPositionWithinHolder(s,r,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 s=0,r=0;if(e){let t=i.left;this.isRtl()&&(t=this.domBindings.rootWindow.innerWidth-(i.left+i.width+Ve())),s=t<=0?-1*t:0}else s=o.start;if(t){r=this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top}else r=o.top;return{start:n.start+s,top:n.top+r}}getRelativeCellPositionWithinHolder(t,e,n,o,i){const s=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),r=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(n||(a=s-i.start),e){const t=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+t.top}else t||(l=r-i.top);return{start:o.start-a,top:o.top-l}}makeClone(){-1===ks.indexOf(this.type)&&bt(`Clone type "${this.type}" is not supported.`);const{wtTable:t,wtSettings:e}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=n.createElement("div"),s=n.createElement("table"),r=t.wtRootElement.parentNode;i.className=`${Rs.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")&&pe(i,[["role","presentation"]]),s.className=t.TABLE.className;t.TABLE.getAttribute("role")&&s.setAttribute("role",t.TABLE.getAttribute("role")),i.appendChild(s),r.appendChild(i);const a=this.wtSettings.getSetting("preventOverflow"),l=o.getComputedStyle(r).getPropertyValue("overflow");return!0===a||"horizontal"===a&&this.type===bs||"vertical"===a&&this.type===Cs?this.mainTableScrollableElement=o:this.mainTableScrollableElement="hidden"===l||"clip"===l?t.holder:_e(t.TABLE),new Os(s,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(t=!1){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()}constructor(t,e,n,o,i){this.wtSettings=null,Mt(this,"wot",t,{writable:!1}),this.domBindings=i,this.facadeGetter=e,this.wtSettings=o;const{TABLE:s,hider:r,spreader:a,holder:l,wtRootElement:h}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=s,this.hider=r,this.spreader=a,this.holder=l,this.wtRootElement=h,this.trimmingContainer=He(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}}class Ns extends Ds{createTable(...t){return new ws(...t)}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 Ue(e),this.repositionOverlay();let n=Oe(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+=Ve(n)),o.style.bottom=`${i}px`}constructor(t,e,n,o,i,s){super(t,e,Ss,n,o),this.bottomOverlay=i,this.inlineStartOverlay=s}}const Ps={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(Ps,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});class Ws extends ps{constructor(t,e,n,o){super(t,e,n,o,vs)}}Rt(Ws,fs),Rt(Ws,Ps);class Ls extends Ds{createTable(...t){return new Ws(...t)}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+=Ve(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 s=t,r=0;for(;s<e;){const t=n.getRowHeight(s);r+=void 0===t?i:t,s+=1}return r}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,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===s){let o=e.getWorkspaceWidth();e.hasVerticalScroll()&&(o-=Ve(n)),o=Math.min(o,t.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let r=Oe(this.clone.wtTable.TABLE);t.hasDefinedSize()||(r=0),i.height=`${r}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":bt("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=Ve(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}constructor(t,e,n,o){super(t,e,vs,n,o),this.cachedFixedRowsBottom=-1,this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}}const Bs={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(Bs,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});class Vs extends ps{constructor(t,e,n,o){super(t,e,n,o,Cs)}}Rt(Vs,Bs),Rt(Vs,ms);const Fs={_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,s,r){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,s,r)}},clearLocalHooks(){return this._localHooks={},this}};Mt(Fs,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});let zs=class{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")}constructor(t,e){this.settings=t,this.cellRange=e||null}};Rt(zs,Fs);const $s="active-header",Us="header",js="area",Ys="focus",Gs=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 qs(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ks(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Xs(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Ks(t,e,"get"))}function Zs(t,e,n){qs(t,e),e.set(t,n)}function Qs(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Ks(t,e,"set"),n),n}function Js(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function tr(t,e){qs(t,e),e.add(t)}var er=new WeakMap,nr=new WeakMap,or=new WeakSet,ir=new WeakSet;class sr{setActiveOverlay(t){return Qs(this,nr,t),this}setActiveSelection(t){return Qs(this,er,t),this}scan(){const t=Xs(this,er).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]=Xs(this,er).getCorners(),{wtTable:s}=Xs(this,nr),r=s.getRenderedColumnsCount(),a=s.getColumnHeadersCount();let l=0;for(let h=-s.getRowHeadersCount();h<r;h++){const r=s.columnFilter.renderedToSource(h);if(!(r<n||r>i)){for(let h=-a;h<0;h++){if(h<e||h>o)continue;const c=h+a;let d=s.getColumnHeader(r,c);const u=Xs(this,nr).getSetting("onBeforeHighlightingColumnHeader",r,c,{selectionType:Xs(this,er).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==u&&(u!==r&&(d=s.getColumnHeader(u,c)),t(d))}l+=1}}}scanRowsInHeadersRange(t){const[e,n,o,i]=Xs(this,er).getCorners(),{wtTable:s}=Xs(this,nr),r=s.getRenderedRowsCount(),a=s.getRowHeadersCount();let l=0;for(let h=-s.getColumnHeadersCount();h<r;h++){const r=s.rowFilter.renderedToSource(h);if(!(r<e||r>o)){for(let h=-a;h<0;h++){if(h<n||h>i)continue;const c=h+a;let d=s.getRowHeader(r,c);const u=Xs(this,nr).getSetting("onBeforeHighlightingRowHeader",r,c,{selectionType:Xs(this,er).settings.selectionType,rowCursor:l,selectionHeight:o-e+1});null!==u&&(u!==r&&(d=s.getRowHeader(u,c)),t(d))}l+=1}}}scanCellsRange(t){const{wtTable:e}=Xs(this,nr);Js(this,or,rr).call(this,(n,o)=>{const i=e.getCell(Xs(this,nr).createCellCoords(n,o)),s=Xs(this,nr).getSetting("onAfterDrawSelection",n,o,Xs(this,er).settings.layerLevel);"string"==typeof s&&ue(i,s),t(i)})}scanRowsInCellsRange(t){const[e,,n]=Xs(this,er).getCorners(),{wtTable:o}=Xs(this,nr);Js(this,ir,ar).call(this,(i,s)=>{if(i>=e&&i<=n){const e=o.getCell(Xs(this,nr).createCellCoords(i,s));t(e)}})}scanColumnsInCellsRange(t){const[,e,,n]=Xs(this,er).getCorners(),{wtTable:o}=Xs(this,nr);Js(this,ir,ar).call(this,(i,s)=>{if(s>=e&&s<=n){const e=o.getCell(Xs(this,nr).createCellCoords(i,s));t(e)}})}constructor(){tr(this,or),tr(this,ir),Zs(this,er,{writable:!0,value:void 0}),Zs(this,nr,{writable:!0,value:void 0})}}function rr(t){let[e,n,o,i]=Xs(this,er).getCorners();if(e<0&&o<0||n<0&&i<0)return;const{wtTable:s}=Xs(this,nr),r=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),r){if(n=Math.max(n,s.getFirstRenderedColumn()),i=Math.min(i,s.getLastRenderedColumn()),e=Math.max(e,s.getFirstRenderedRow()),o=Math.min(o,s.getLastRenderedRow()),i<n||o<e)return}else{if(!Xe(s.getCell(Xs(this,nr).createCellCoords(e,n))))return}for(let s=e;s<=o;s+=1)for(let e=n;e<=i;e+=1)t(s,e)}function ar(t){const{wtTable:e}=Xs(this,nr),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 lr="ht-border-style-";class hr{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(s){var r;((r=s).clientY<Math.floor(i.top)||r.clientY>Math.ceil(i.top+i.height)||r.clientX<Math.floor(i.left)||r.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 s=n[i],r=e.createElement("div"),a=e=>this.settings[s]&&this.settings[s][e]?this.settings[s][e]:t.border[e];r.className=`wtBorder ${this.settings.className||""}`,this.settings[s]&&this.settings[s].hide&&(r.className+=" hidden"),o=r.style;const l=a("style");l?(["start","end"].includes(s)?r.className+=` ${lr}${l}-vertical`:r.className+=` ${lr}${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(r)}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(" "),Yt()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let s=i.bordersHolder;s||(s=e.createElement("div"),s.className="htBorders",i.bordersHolder=s,i.spreader.appendChild(s)),s.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,s){const r=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),p=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();a.top=`${parseInt(n-u-1,10)}px`,a[r]=`${parseInt(o-u-1,10)}px`,l.top=`${parseInt(n-g/4*3,10)}px`,l[r]=`${parseInt(o-g/4*3,10)}px`;const m=Math.min(parseInt(o+i,10),p-u-2*d),w=Math.min(parseInt(o+i-g/4,10),p-g-2*d);h[r]=`${m}px`,c[r]=`${w}px`;const b=Math.min(parseInt(n+s,10),f-u-2*d),v=Math.min(parseInt(n+s-g/4,10),f-g-2*d);h.top=`${b}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:s,rootDocument:r,rootWindow:a}=this.wot,l=e!==o||n!==i,h=s.getFirstRenderedRow(),c=s.getLastRenderedRow(),d=s.getFirstRenderedColumn(),u=s.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=s.getCell(this.wot.createCellCoords(e,n))}else if(g=s.getCell(this.wot.createCellCoords(e,n)),!Xe(g))return void this.disappear();const p=l?s.getCell(this.wot.createCellCoords(o,i)):g,f=Re(g),m=l?Re(p):f,w=Re(s.TABLE),b=f.top,v=f.left,C=this.wot.wtSettings.getSetting("rtlMode");let y=0,S=0;if(C){const t=Ae(s.TABLE),e=Ae(g),n=a.innerWidth-w.left-t;S=v+e-m.left,y=a.innerWidth-v-e-n-1}else S=m.left+Ae(p)-v,y=v-w.left-1;if(this.isEntireColumnSelected(e,o)){const t=e,o=this.getDimensionsFromHeader("columns",n,i,t,w);let s=null;o&&([s,y,S]=o),s&&(g=s)}let k=b-w.top-1,R=m.top+Oe(p)-b;if(this.isEntireRowSelected(n,i)){const t=n,i=this.getDimensionsFromHeader("rows",e,o,t,w);let s=null;i&&([s,k,R]=i),s&&(g=s)}const x=a.getComputedStyle(g);parseInt(x.borderTopWidth,10)>0&&(k+=1,R=R>0?R-1:0),parseInt(x[C?"borderRightWidth":"borderLeftWidth"],10)>0&&(y+=1,S=S>0?S-1:0);const E=C?"right":"left",M=Math.ceil(this.settings.border.width/2);this.topStyle.top=`${k}px`,this.topStyle[E]=`${y}px`,this.topStyle.width=`${S+M}px`,this.topStyle.display="block",this.startStyle.top=`${k}px`,this.startStyle[E]=`${y}px`,this.startStyle.height=`${R+M}px`,this.startStyle.display="block",this.bottomStyle.top=`${k+R-parseInt(this.bottomStyle.height,10)+M}px`,this.bottomStyle[E]=`${y}px`,this.bottomStyle.width=`${S+M}px`,this.bottomStyle.display="block",this.endStyle.top=`${k}px`,this.endStyle[E]=`${y+S-parseInt(this.endStyle.width,10)+M}px`,this.endStyle.height=`${R+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]=_),Yt()||!T||this.isPartRange(H,I))this.cornerStyle.display="none";else{this.cornerStyle.top=k+R+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[E]=y+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(s.TABLE);const e=t===a;e&&(t=r.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?p.getBoundingClientRect().left:p.offsetLeft;let i=!1,s=0;if(C?(s=o-parseInt(this.cornerDefaultStyle.width,10)/2,i=s<0):(s=o+Ae(p)+parseInt(this.cornerDefaultStyle.width,10)/2,i=s>=Ne(t)),i){const t=Math.floor(y+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?p.getBoundingClientRect().top:p.offsetTop)+Oe(p)+parseInt(this.cornerDefaultStyle.height,10)/2>=De(t)){const t=Math.floor(k+R+this.cornerCenterPointOffset-h-n);ue(this.corner,"wtCornerBlockEndEdge"),this.cornerStyle.top=t-1+"px"}}else ge(this.corner,"wtCornerBlockEndEdge");this.cornerStyle.display="block"}Yt()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(o,i,k,y,S,R)}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:s}=this.wot,r=s.wtRootElement.parentNode;let a=null,l=null,h=null,c=null,d=null,u=null,g=null,p=null;switch(t){case"rows":a=(...t)=>s.getRowHeader(...t),l=(...t)=>Oe(...t),h="ht__selection--rows",u="top";break;case"columns":a=(...t)=>s.getColumnHeader(...t),l=(...t)=>Ae(...t),h="ht__selection--columns",u="left"}if(r.classList.contains(h)){const t=this.wot.getSetting("columnHeaders").length;if(g=a(e,t-o),p=a(n,t-o),!g||!p)return!1;const s=Re(g),r=Re(p);return g&&p&&(c=s[u]-i[u]-1,d=r[u]+l(p)-s[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",Yt()&&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)}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=Gs(this.instance),this.cornerCenterPointOffset=-Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(e),this.registerListeners())}}function cr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dr(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function ur(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dr(t,e,"get"))}function gr(t,e,n){cr(t,e),e.set(t,n)}function pr(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,dr(t,e,"set"),n),n}var fr=new WeakMap,mr=new WeakMap,wr=new WeakMap,br=new WeakMap,vr=new WeakMap,Cr=new WeakMap,yr=new WeakSet;class Sr{setActiveOverlay(t){return pr(this,fr,t),ur(this,wr).setActiveOverlay(ur(this,fr)),ur(this,br).has(ur(this,fr))||ur(this,br).set(ur(this,fr),new Set),this}getFocusSelection(){return null!==ur(this,mr)?ur(this,mr).getFocus():null}getAreaSelection(){return null!==ur(this,mr)?ur(this,mr).createLayeredArea():null}getBorderInstance(t){if(!t.settings.border)return null;if(ur(this,Cr).has(t)){const e=ur(this,Cr).get(t);if(e.has(ur(this,fr)))return e.get(ur(this,fr));const n=new hr(ur(this,fr),t.settings);return e.set(ur(this,fr),n),n}const e=new hr(ur(this,fr),t.settings);return ur(this,Cr).set(t,new Map([[ur(this,fr),e]])),e}getBorderInstances(t){return Array.from(ur(this,Cr).get(t)?.values()??[])}destroyBorders(t){ur(this,Cr).get(t).forEach(t=>t.destroy()),ur(this,Cr).delete(t)}refreshAllBorderHandleStyles(){ur(this,Cr).forEach(t=>{t.forEach(t=>{t.updateMultipleSelectorHandlesStyles?.()})})}render(t){if(null===ur(this,mr))return;t&&function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,yr,kr).call(this);const e=Array.from(ur(this,mr)),n=new Map,o=new Map;for(let t=0;t<e.length;t++){const i=e[t],{className:s,headerAttributes:r,createLayers:a,selectionType:l}=i.settings;ur(this,vr).has(i)||(ur(this,vr).add(i),i.addLocalHook("destroy",()=>this.destroyBorders(i)));const h=this.getBorderInstance(i);if(i.isEmpty()){h?.disappear();continue}if(s){ur(this,wr).setActiveSelection(i).scan().forEach(t=>{if(n.has(t)){const e=n.get(t);e.has(s)&&!0===a?e.set(s,e.get(s)+1):e.set(s,1)}else n.set(t,new Map([[s,1]]));r&&(o.has(t)||o.set(t,[]),"TH"===t.nodeName&&o.get(t).push(...r))})}const c=i.getCorners();ur(this,fr).getSetting("onBeforeDrawBorders",c,l),h?.appear(c)}n.forEach((t,e)=>{const n=Array.from(t).map(([t,e])=>1===e?t:[t,...Array.from({length:e-1},(e,n)=>`${t}-${n+1}`)]).flat();n.forEach(t=>ur(this,br).get(ur(this,fr)).add(t)),ue(e,n),"TD"===e.nodeName&&Array.isArray(ur(this,mr).options?.cellAttributes)&&pe(e,ur(this,mr).options.cellAttributes)}),Array.from(o.keys()).forEach(t=>{pe(t,[...o.get(t)])})}constructor(t){var e,n;cr(e=this,n=yr),n.add(e),gr(this,fr,{writable:!0,value:void 0}),gr(this,mr,{writable:!0,value:void 0}),gr(this,wr,{writable:!0,value:void 0}),gr(this,br,{writable:!0,value:void 0}),gr(this,vr,{writable:!0,value:void 0}),gr(this,Cr,{writable:!0,value:void 0}),pr(this,wr,new sr),pr(this,br,new WeakMap),pr(this,vr,new WeakSet),pr(this,Cr,new Map),pr(this,mr,t)}}function kr(){const t=ur(this,br).get(ur(this,fr)),e=ur(this,fr).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(e))for(let n=0;n<e.length;n++)t.add(e[n]);t.forEach(t=>{const e=ur(this,fr).wtTable.TABLE.querySelectorAll(`.${t}`);let n=[];Array.isArray(ur(this,mr).options?.cellAttributes)&&(n=ur(this,mr).options.cellAttributes.map(t=>t[0])),Array.isArray(ur(this,mr).options?.headerAttributes)&&(n=[...n,...ur(this,mr).options.headerAttributes.map(t=>t[0])]);for(let o=0,i=e.length;o<i;o++)ge(e[o],t),fe(e[o],n)}),t.clear()}class Rr extends Ds{createTable(...t){return new Vs(...t)}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(),Ue(n)):(i=this.getOverlayOffset()*(this.isRtl()?-1:1),$e(n,`${i}px`,"0px"));const s=this.adjustHeaderBordersPosition(i);return this.adjustElementsSize(),s}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,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===s){let o=e.getWorkspaceHeight();e.hasHorizontalScroll()&&(o-=Ve(n)),o=Math.min(o,t.wtRootElement.scrollHeight),i.height=`${o}px`}else i.height="";this.clone.wtTable.holder.style.height=i.height;const r=Ae(this.clone.wtTable.TABLE);i.width=`${r}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=Gs(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":bt("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"),s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,r=0===i&&o.length>0&&!de(s.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&&s.offsetWidth!==s.clientWidth&&(l=Ve(this.domBindings.rootDocument)),e?(a+=this.sumCellSizes(0,t+1),a-=this.wot.wtViewport.getViewportWidth(),a+=r):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),t),a+=l,(h=this.mainTableScrollableElement).scrollWidth-h.clientWidth===a-r&&r>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(r),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"),s=e.getSetting("totalRows"),r="vertical"===e.getSetting("preventOverflow");s?ge(n,"emptyRows"):ue(n,"emptyRows");let a=!1;if(!r)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}constructor(t,e,n,o){super(t,e,Cs,n,o)}}const xr={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(xr,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});class Er extends ps{constructor(t,e,n,o){super(t,e,n,o,ys)}}Rt(Er,xr),Rt(Er,ms);class Mr extends Ds{createTable(...t){return new Er(...t)}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){$e(t,`${this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1)}px`,`${this.topOverlay.getOverlayOffset()}px`)}else Ue(t);let e=Oe(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}constructor(t,e,n,o,i,s){super(t,e,ys,n,o),this.topOverlay=i,this.inlineStartOverlay=s}}class Tr extends ps{constructor(t,e,n,o){super(t,e,n,o,bs)}}Rt(Tr,xr),Rt(Tr,Ps);class _r extends Ds{createTable(...t){return new Tr(...t)}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(),Ue(t);else{const{wtTable:e}=this.wot,n=e.hider.getBoundingClientRect();i=Math.ceil(n.bottom)===t.offsetHeight,o=this.getOverlayOffset(),$e(t,"0px",`${o}px`)}const s=this.adjustHeaderBordersPosition(o,i);return this.adjustElementsSize(),s}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,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===s){let o=e.getWorkspaceWidth();e.hasVerticalScroll()&&(o-=Ve(n)),o=Math.min(o,t.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let r=Oe(this.clone.wtTable.TABLE);t.hasDefinedSize()||(r=0),i.height=`${r}px`}adjustRootChildrenSize(){const{holder:t}=this.clone.wtTable,e=Gs(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":bt("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,s=o.getSetting("columnHeaders"),r=0===o.getSetting("fixedRowsTop")&&s.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=Ve(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+=r}else a+=this.sumCellSizes(o.getSetting("fixedRowsTop"),t);var h;return a+=l,(h=this.mainTableScrollableElement).scrollHeight-h.clientHeight===a-r&&r>0&&this.wot.wtOverlays.expandHiderVerticallyBy(r),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,e=!1){const{wtSettings:n}=this,o=this.wot.wtTable.holder.parentNode,i=n.getSetting("totalColumns"),s="horizontal"===n.getSetting("preventOverflow");i?ge(o,"emptyColumns"):ue(o,"emptyColumns");let r=!1;if(!e&&!s){const e=n.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==e,s=n.getSetting("columnHeaders");if((i||0===e)&&s.length>0){const e=de(o,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),t||0===n.getSetting("totalRows")?(ue(o,"innerBorderTop"),r=!e):(ge(o,"innerBorderTop"),r=e)}}return r}constructor(t,e,n,o){super(t,e,bs,n,o),this.cachedFixedRowsTop=-1,this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}}function Hr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ir(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Ar(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Ir(t,e,"get"))}function Or(t,e,n){Hr(t,e),e.set(t,n)}function Dr(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Ir(t,e,"set"),n),n}function Nr(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Pr(t,e){Hr(t,e),e.add(t)}var Wr=new WeakMap,Lr=new WeakMap,Br=new WeakMap,Vr=new WeakSet,Fr=new WeakSet,zr=new WeakSet,$r=new WeakSet,Ur=new WeakSet,jr=new WeakSet,Yr=new WeakSet,Gr=new WeakSet,qr=new WeakSet;class Kr{registerListeners(){const{eventManager:t,domBindings:{rootDocument:e}}=Ar(this,Wr);Ar(this,Lr)&&(Dr(this,Lr,!1),Nr(this,jr,ea).call(this,"relative",0,0)),Dr(this,Br,!1),t.addEventListener(e,"mousedown",t=>{Dr(this,Br,Nr(this,Yr,na).call(this,t))}),t.addEventListener(e,"mouseup",()=>{Dr(this,Br,!1),Ar(this,Lr)&&this.deactivate()})}tryActivate(t,e){!Ar(this,Br)||Ar(this,Lr)||jt()||!t&&!e||Nr(this,Vr,Xr).call(this)}syncOffsets(){if(!Ar(this,Lr))return;const t=Ar(this,Wr),{wtViewport:e}=t.wot,n=e.rowsRenderCalculator.startPosition,o=e.columnsRenderCalculator.startPosition;if("number"!=typeof n||"number"!=typeof o)return;const i=n-Nr(this,Fr,Zr).call(this),s=o-Nr(this,zr,Qr).call(this);Nr(this,jr,ea).call(this,"sticky",i,s)}destroy(){Ar(this,Lr)&&Nr(this,jr,ea).call(this,"relative",0,0),Dr(this,Lr,!1),Dr(this,Br,!1)}deactivate(){const t=Ar(this,Wr),e=t.wtTable.spreader,{wtViewport:n}=t.wot,o=t.wtSettings.getSetting("rtlMode")?"right":"left";t.refreshAll();const i=parseInt(e.style.top,10)||0,s=parseInt(e.style[o],10)||0,r=n.rowsRenderCalculator.startPosition,a=n.columnsRenderCalculator.startPosition,l="number"==typeof r?r-i:Nr(this,Fr,Zr).call(this),h="number"==typeof a?a-s:Nr(this,zr,Qr).call(this);Nr(this,$r,Jr).call(this,l,h),Dr(this,Lr,!1),Nr(this,jr,ea).call(this,"relative",0,0),t.refreshAll(),t.applyToDOM()}constructor(t){Pr(this,Vr),Pr(this,Fr),Pr(this,zr),Pr(this,$r),Pr(this,Ur),Pr(this,jr),Pr(this,Yr),Pr(this,Gr),Pr(this,qr),Or(this,Wr,{writable:!0,value:void 0}),Or(this,Lr,{writable:!0,value:void 0}),Or(this,Br,{writable:!0,value:void 0}),Dr(this,Lr,!1),Dr(this,Br,!1),Dr(this,Wr,t)}}function Xr(){const t=Ar(this,Wr),e=t.wtTable.spreader,n=t.wtSettings.getSetting("rtlMode")?"right":"left",o=(parseInt(e.style.top,10)||0)-Nr(this,Fr,Zr).call(this),i=(parseInt(e.style[n],10)||0)-Nr(this,zr,Qr).call(this);Dr(this,Lr,!0),Nr(this,jr,ea).call(this,"sticky",o,i)}function Zr(){const{topOverlay:t}=Ar(this,Wr);return t.getScrollPosition()-t.getTableParentOffset()}function Qr(){const{inlineStartOverlay:t}=Ar(this,Wr);return Nr(this,qr,ia).call(this)&&Nr(this,Gr,oa).call(this)?Math.abs(t.getScrollPosition()):Math.abs(t.getScrollPosition())-t.getTableParentOffset()}function Jr(t,e){const n=Ar(this,Wr);if(Nr(this,Gr,oa).call(this)){const{rootWindow:o}=n.domBindings,i=Nr(this,qr,ia).call(this)?e:e+n.inlineStartOverlay.getTableParentOffset();o.scrollTo(i,t+n.topOverlay.getTableParentOffset())}else n.wtTable.holder.scrollTop=t,n.wtTable.holder.scrollLeft=Nr(this,qr,ia).call(this)?-e:e}function ta(t){t.style.top="",t.style.bottom="",t.style.left="",t.style.right=""}function ea(t,e,n){const o=Ar(this,Wr),i=o.wtTable.spreader,s=Nr(this,qr,ia).call(this),r=s?"right":"left",a="sticky"===t;if(i.style.position=t,a?(i.style.top=`${e}px`,i.style.bottom="",i.style[r]=`${n}px`,i.style[s?"left":"right"]=""):Nr(this,Ur,ta).call(this,i),!Nr(this,Gr,oa).call(this)){if(o.inlineStartOverlay.needFullRender){const n=o.inlineStartOverlay.clone.wtTable.spreader;n.style.position=t,a?n.style.top=`${e}px`:Nr(this,Ur,ta).call(this,n)}if(o.topOverlay.needFullRender){const e=o.topOverlay.clone.wtTable.spreader;e.style.position=t,a?(e.style[r]=`${n}px`,e.style[s?"left":"right"]=""):Nr(this,Ur,ta).call(this,e)}if(o.bottomOverlay.needFullRender&&o.bottomOverlay.clone){const e=o.bottomOverlay.clone.wtTable.spreader;e.style.position=t,a?(e.style[r]=`${n}px`,e.style[s?"left":"right"]=""):Nr(this,Ur,ta).call(this,e)}}}function na(t){return Nr(this,Gr,oa).call(this)?t.target===Ar(this,Wr).domBindings.rootDocument.documentElement:t.target===Ar(this,Wr).scrollableElement}function oa(){return Ar(this,Wr).scrollableElement===Ar(this,Wr).domBindings.rootWindow}function ia(){return Ar(this,Wr).wtSettings.getSetting("rtlMode")}function sa(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ra(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function aa(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ra(t,e,"get"))}function la(t,e,n){sa(t,e),e.set(t,n)}function ha(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ra(t,e,"set"),n),n}function ca(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function da(t,e){sa(t,e),e.add(t)}var ua=new WeakMap,ga=new WeakMap,pa=new WeakMap,fa=new WeakMap,ma=new WeakMap,wa=new WeakMap,ba=new WeakMap,va=new WeakMap,Ca=new WeakSet,ya=new WeakSet,Sa=new WeakSet,ka=new WeakSet;class Ra{getOverlays(t=!1){const e=[...aa(this,ua)];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 _r(...t),this.bottomOverlay=new Ls(...t),this.inlineStartOverlay=new Rr(...t),this.topInlineStartCornerOverlay=new Mr(...t,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new Ns(...t,this.bottomOverlay,this.inlineStartOverlay),ha(this,ua,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){ha(this,ga,aa(this,ua).reduce((t,e)=>e.hasRenderingStateChanged()||t,!1)),aa(this,ua).forEach(t=>t.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),aa(this,ua).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&&ca(this,ya,Ea).call(this)&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&ca(this,Sa,Ma).call(this)&&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()),aa(this,va).registerListeners(),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=this.scrollableElement===e,s=this.wtSettings.getSetting("preventWheel"),r={passive:i};this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",t=>this.onCloneWheel(t,s),r);let a;[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),r)}),this.eventManager.addEventListener(e,"resize",()=>{Wt(()=>{clearTimeout(a),this.wtSettings.getSetting("onWindowResize"),a=setTimeout(()=>{ha(this,ma,0)},200)})}),i||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,s=t.target,r=i!==n&&s!==n&&!s.contains(i),a=o!==n&&s!==n&&!s.contains(o);if(this.keyPressed&&(r||a)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(t);(e||this.scrollableElement!==n&&l)&&t.preventDefault()}onKeyDown(t){this.keyPressed=rn(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,aa(this,va).tryActivate(this.verticalScrolling,this.horizontalScrolling),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(),aa(this,va).syncOffsets()}syncScrollWithMaster(){if(!aa(this,ga))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),ha(this,ga,!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(){aa(this,ba).cancel(),null!==aa(this,wa)&&(clearTimeout(aa(this,wa)),ha(this,wa,null)),this.resizeObserver.disconnect(),aa(this,va).destroy(),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(t=!1){this.verticalScrolling||this.horizontalScrolling?aa(this,ba).call(this):ca(this,ka,Ta).call(this),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"),s=this.wtSettings.getSetting("totalRows"),r=t.getRowHeaderWidth(),a=t.getColumnHeaderHeight(),l=this.wtSettings.getSetting("externalRowCalculator")?0:1,h=a+this.topOverlay.sumCellSizes(0,s)+l,c=r+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(),aa(this,va).syncOffsets())}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)})}constructor(t,e,n,o,i,s){da(this,Ca),da(this,ya),da(this,Sa),da(this,ka),la(this,ua,{writable:!0,value:void 0}),la(this,ga,{writable:!0,value:void 0}),la(this,pa,{writable:!0,value:void 0}),la(this,fa,{writable:!0,value:void 0}),la(this,ma,{writable:!0,value:void 0}),la(this,wa,{writable:!0,value:void 0}),la(this,ba,{writable:!0,value:void 0}),la(this,va,{writable:!0,value:void 0}),this.wot=null,ha(this,ua,[]),this.topOverlay=null,this.bottomOverlay=null,this.inlineStartOverlay=null,this.topInlineStartCornerOverlay=null,this.bottomInlineStartCornerOverlay=null,this.browserLineHeight=void 0,this.wtSettings=null,ha(this,ga,!1),ha(this,pa,null),ha(this,fa,null),ha(this,ma,0),ha(this,wa,null),ha(this,ba,Qe(ca(this,ka,Ta).bind(this),200)),ha(this,va,new Kr(this)),this.resizeObserver=new ResizeObserver(t=>{Wt(()=>{Array.isArray(t)&&t.length&&(ha(this,ma,aa(this,ma)+1),300===aa(this,ma)&&(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!==aa(this,wa)&&clearTimeout(aa(this,wa)),ha(this,wa,setTimeout(()=>{ha(this,ma,0)},100)),this.wtSettings.getSetting("onContainerElementResize"))})}),this.wot=t,this.wtSettings=o,this.domBindings=n,this.facadeGetter=e,this.wtTable=s;const{rootDocument:r,rootWindow:a}=this.domBindings;this.instance=this.wot,this.eventManager=i,this.scrollbarSize=Ve(r);const l=a.getComputedStyle(s.wtRootElement.parentNode).getPropertyValue("overflow"),h="hidden"===l||"clip"===l;this.scrollableElement=h?s.holder:_e(s.TABLE),this.initOverlays(),ca(this,Ca,xa).call(this),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}}function xa(){ha(this,pa,this.topOverlay.getScrollPosition()),ha(this,fa,this.inlineStartOverlay.getScrollPosition())}function Ea(){const t=this.topOverlay.getScrollPosition();return aa(this,pa)!==t&&(ha(this,pa,t),!0)}function Ma(){const t=this.inlineStartOverlay.getScrollPosition();return aa(this,fa)!==t&&(ha(this,fa,t),!0)}function Ta(){if(this.destroyed)return;this.updateLastSpreaderSize()&&this.adjustElementsSize()}class _a{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]}constructor(t){this.settings={},this.defaults=Object.freeze(this.getDefaults()),Tt(this.defaults,(e,n)=>{void 0!==t[n]?this.settings[n]=t[n]:void 0===e?bt(`A required setting "${n}" was not provided`):this.settings[n]=e})}}class Ha extends ps{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),s=this.holder.style,{scrollWidth:r,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),s.height="auto"===o?"auto":`${h}px`,l=Math.min(l,r),s.width=`${l}px`,s.overflow="",this.hasTableHeight="auto"===s.height||h>0,this.hasTableWidth=l>0}this.isTableVisible=ke(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,s=this.getRenderedColumnsCount();for(let t=0;t<o;t++)for(let t=-1*i;t<s;t++)this.markIfOversizedColumnHeader(t);e.hasOversizedColumnHeadersMarked[n]=!0}}constructor(t,e,n,o){super(t,e,n,o,"master")}}function Ia(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Aa(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Ia(t,e,"get"))}function Oa(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 Da(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Ia(t,e,"set"),n),n}Rt(Ha,Bs),Rt(Ha,Ps);var Na=new WeakMap,Pa=new WeakMap,Wa=new WeakMap;class La{build(){const t=Aa(this,Na).call(this),e=Aa(this,Pa),n=Aa(this,Wa).call(this);this.totalItems=t,this.prefixSum=new Float64Array(t+1),this.prefixSum[0]=0;for(let o=0;o<t;o++){const t=e(o);this.prefixSum[o+1]=this.prefixSum[o]+(isNaN(t)?n:t)}}getOffset(t){return!this.prefixSum||t<=0?0:t>=this.totalItems?this.prefixSum[this.totalItems]:this.prefixSum[t]}findIndexAtOffset(t){if(!this.isBuilt()||t<=0||0===this.totalItems)return 0;let e=0,n=this.totalItems;for(;e<n;){const o=e+n>>>1;this.prefixSum[o+1]<=t?e=o+1:n=o}return Math.min(e,this.totalItems-1)}getSizeAt(t){return!this.prefixSum||t<0||t>=this.totalItems?0:this.prefixSum[t+1]-this.prefixSum[t]}ensureBuilt(){this.isBuilt()&&this.totalItems===Aa(this,Na).call(this)||this.build()}getTotalSize(){return this.prefixSum?this.prefixSum[this.totalItems]:0}invalidate(){this.prefixSum=null,this.totalItems=0}isBuilt(){return null!==this.prefixSum}constructor({totalItemsFn:t,sizeFn:e,defaultSizeFn:n}){Oa(this,Na,{writable:!0,value:void 0}),Oa(this,Pa,{writable:!0,value:void 0}),Oa(this,Wa,{writable:!0,value:void 0}),this.prefixSum=null,this.totalItems=0,Da(this,Na,t),Da(this,Pa,e),Da(this,Wa,n)}}class Ba{getWorkspaceHeight(){const t=this.domBindings.rootDocument,e=this.dataAccessObject.topOverlayTrimmingContainer;let n=0;if(e===this.domBindings.rootWindow)n=t.documentElement.clientHeight;else{n=Oe(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()?Ve():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 Re(this.wtTable.holder)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Oe(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(t=["rendered","fullyVisible","partiallyVisible"]){const{wtSettings:e,wtTable:n}=this,o=e.getSetting("totalRows");let i,s,r=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=e.getSetting("fixedRowsTop"),h=e.getSetting("fixedRowsBottom");return l&&a>=0&&(s=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=s,r-=s),h&&this.dataAccessObject.bottomOverlay.clone&&(s=this.dataAccessObject.bottomOverlay.sumCellSizes(o-h,o),r-=s),i=n.holder.clientHeight===n.holder.offsetHeight?0:Ve(this.domBindings.rootDocument),new Zo({calculationTypes:t.map(t=>[t,this.rowsCalculatorTypes.get(t)()]),viewportHeight:r,scrollOffset:a,totalRows:o,overrideFn:e.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:i,rowHeightCache:this.rowHeightCache})}createColumnsCalculator(t=["rendered","fullyVisible","partiallyVisible"]){const{wtSettings:e,wtTable:n}=this,o=e.getSetting("totalColumns");let i=this.getViewportWidth(),s=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const r=e.getSetting("fixedColumnsStart");if(r&&s>=0){const t=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,r);s+=t,i-=t}return n.holder.clientWidth!==n.holder.offsetWidth&&(i-=Ve(this.domBindings.rootDocument)),new Xo({calculationTypes:t.map(t=>[t,this.columnsCalculatorTypes.get(t)()]),viewportWidth:i,scrollOffset:s,totalColumns:o,overrideFn:e.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset,columnWidthCache:this.columnWidthCache})}createCalculators(t=!1){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:s}=e;if(null===n&&null===o){if(!t.isVisibleInTrimmingContainer&&!this.wtTable.isRowBeforeRenderedRows(i)&&!this.wtTable.isRowAfterRenderedRows(s))return!0;n=i,o=s}const{startRow:r,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<r||n===r&&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:s}=e;if(null===n&&null===o){if(!t.isVisibleInTrimmingContainer&&!this.wtTable.isColumnBeforeRenderedColumns(i)&&!this.wtTable.isColumnAfterRenderedColumns(s))return!0;n=i,o=s}const{startColumn:r,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<r||n===r&&n>0)&&!(o>a||o===a&&o<c)}invalidateRowHeightCache(){this.rowHeightCache.invalidate()}invalidateColumnWidthCache(){this.columnWidthCache.invalidate()}invalidateAllCaches(){this.rowHeightCache.invalidate(),this.columnWidthCache.invalidate()}resetHasOversizedColumnHeadersMarked(){Tt(this.hasOversizedColumnHeadersMarked,(t,e,n)=>{n[e]=void 0})}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 jo:new Go],["fullyVisible",()=>new Fo],["partiallyVisible",()=>new $o]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new Uo:new Yo],["fullyVisible",()=>new Vo],["partiallyVisible",()=>new zo]]),this.rowHeightCache=new La({totalItemsFn:()=>n.getSetting("totalRows"),sizeFn:t=>i.getRowHeight(t),defaultSizeFn:()=>n.getSetting("stylesHandler").getDefaultRowHeight()}),this.columnWidthCache=new La({totalItemsFn:()=>n.getSetting("totalColumns"),sizeFn:t=>i.getColumnWidth(t),defaultSizeFn:()=>Qo}),this.eventManager=o,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}}class Va extends As{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){if(!ks.includes(t))return null;const e=t.replace(/_([a-z])/g,t=>t[1].toUpperCase());return this.wtOverlays[`${e}Overlay`]??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}}}constructor(t,e){super(t,new _a(e));const n=this.wtSettings.getSetting("facade",this);this.wtTable=new Ha(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new Ba(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Sr(this.wtSettings.getSetting("selections")),this.wtEvent=new Oi(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new Ra(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}}class Fa{_initFromSettings(t){t.facade=t=>{const e=new Fa(t);return()=>e},this._wot=new Va(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(t=!1){return this._wot.draw(t),this}getCell(t,e=!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()}constructor(t){t instanceof As?this._wot=t:this._initFromSettings(t)}}function za({isShiftKey:t,isLeftClick:e,isRightClick:n,coords:o,selection:i,controller:s,cellCoordsFactory:r}){const a=i.isSelected()?i.getSelectedRange().current():null,l=i.isSelectedByCorner(),h=i.isSelectedByRowHeader();if(i.markSource("mouse"),t&&a)o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(o):(l||h)&&o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(r(o.row,o.col)):l&&o.row<0&&!s.column?i.setRangeEnd(r(a.to.row,o.col)):h&&o.col<0&&!s.row?i.setRangeEnd(r(o.row,a.to.col)):(!l&&!h&&o.col<0||l&&o.col<0)&&!s.row?i.selectRows(Math.max(a.from.row,0),o.row,o.col):(!l&&!h&&o.row<0||h&&o.row<0)&&!s.column&&i.selectColumns(Math.max(a.from.col,0),o.col,o.row);else{const t=!i.inInSelection(o),r=e||n&&t;o.row<0&&o.col>=0&&!s.column?r&&i.selectColumns(o.col,o.col,o.row):o.col<0&&o.row>=0&&!s.row?r&&i.selectRows(o.row,o.row,o.col):o.col>=0&&o.row>=0&&!s.cell?r&&i.setRangeStart(o):o.col<0&&o.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}function $a({isLeftClick:t,selection:e,cellRangeMapper:n}){if(!t||"multiple"!==e.settings.selectionMode)return;const o=e.getSelectedRange(),i=o.clone().map(t=>n.toRenderable(t)),s=i.current();if(i.size()>1&&!s.isHeader()&&!e.isMultiple(s)){const t=i.findAll(s);t.length===i.size()?(e.markSource("deselect"),o.pop(),e.refresh(),e.markEndSource()):t.length>1&&(e.markSource("deselect"),o.removeLayers(t.map(({layer:t})=>t)),e.refresh(),e.markEndSource())}}const Ua=new Map([["touchstart",za],["touchend",$a],["mousedown",za],["mouseover",function({isLeftClick:t,coords:e,selection:n,controller:o,cellCoordsFactory:i}){if(!t)return;const s=n.isSelectedByRowHeader(),r=n.isSelectedByColumnHeader(),a=n.tableProps.countCols(),l=n.tableProps.countRows();n.markSource("mouse"),r&&!o.column?n.setRangeEnd(i(l-1,e.col)):s&&!o.row?n.setRangeEnd(i(e.row,a-1)):o.cell||n.setRangeEnd(e),n.markEndSource()}],["mouseup",$a]]);function ja(t,e){Ua.get(t.type)({isShiftKey:t.shiftKey,isLeftClick:cn(t)||"touchstart"===t.type,isRightClick:hn(t),...e})}const Ya=new WeakMap,Ga=Symbol("rootInstance");function qa(t){return t===Ga}function Ka(t){return Ya.has(t)}function Xa(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Za(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Qa(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Za(t,e,"get"))}function Ja(t,e,n){Xa(t,e),e.set(t,n)}function tl(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Za(t,e,"set"),n),n}function el(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function nl(t,e){Xa(t,e),e.add(t)}var ol=new WeakMap,il=new WeakMap,sl=new WeakMap,rl=new WeakMap,al=new WeakMap,ll=new WeakMap,hl=new WeakMap,cl=new WeakMap,dl=new WeakMap,ul=new WeakMap,gl=new WeakSet,pl=new WeakSet,fl=new WeakSet,ml=new WeakSet;class wl{render(){if(!this.hot.isRenderSuspended()){const t=this.hot.forceFullRender;this.hot.runHooks("beforeRender",t),this._wt.draw(!t),el(this,ml,yl).call(this),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this.hot.runHooks("afterRender",t),this.hot.forceFullRender=!1}}adjustElementsSize(t=!1){t?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"),tl(this,al,e.createElement("TABLE")),ue(Qa(this,al),"htCore"),this.hot.getSettings().tableClassName&&ue(Qa(this,al),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(pe(Qa(this,al),[["role","presentation"]]),pe(t,[["role","treegrid"],ct(-1),dt(this.hot.countCols()),["aria-multiselectable","true"]])),this.THEAD=e.createElement("THEAD"),Qa(this,al).appendChild(this.THEAD),this.TBODY=e.createElement("TBODY"),Qa(this,al).appendChild(this.TBODY),this.hot.table=Qa(this,al),this.hot.container.insertBefore(Qa(this,al),this.hot.container.firstChild)}registerEvents(){const{rootWrapperElement:t,rootElement:e,rootDocument:n,selection:o,rootWindow:i}=this.hot,s=n.documentElement;this.eventManager.addEventListener(e,"mousedown",t=>{el(this,gl,bl).call(this,t)||(tl(this,sl,!0),this.isTextSelectionAllowed(t.target)||(We(i),t.preventDefault(),i.focus()))}),this.eventManager.addEventListener(e,"mouseup",t=>{el(this,gl,bl).call(this,t)||tl(this,sl,!1)}),this.eventManager.addEventListener(e,"mousemove",t=>{Qa(this,sl)&&!this.isTextSelectionAllowed(t.target)&&(this.settings.fragmentSelection&&We(i),t.preventDefault())}),this.eventManager.addEventListener(s,"keyup",t=>{o.isInProgress()&&!t.shiftKey&&o.finish()}),this.eventManager.addEventListener(s,"mouseup",i=>{if(o.isInProgress()&&cn(i)&&o.finish(),tl(this,rl,!1),el(this,gl,bl).call(this,i))return;const s=Ye(n.activeElement);je(n.activeElement)&&!s||!s&&(o.isSelected()||o.isSelectedByAnyHeader()||(t??e).contains(i.target)||hn(i))||this.hot.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",t=>{o.isInProgress()&&hn(t)&&(o.finish(),tl(this,rl,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{o.isInProgress()&&o.finish(),tl(this,rl,!1),tl(this,dl,!0),null!==Qa(this,ul)&&clearTimeout(Qa(this,ul)),tl(this,ul,this.hot._registerTimeout(()=>{tl(this,dl,!1),tl(this,ul,null)},400))}),this.eventManager.addEventListener(s,"mousedown",t=>{const o=t.target,i=t.x||t.clientX,r=t.y||t.clientY;let a=t.target;if(Qa(this,rl)||!e||!this.hot.view)return;if(el(this,gl,bl).call(this,t))return;const{holder:l}=this._wt.wtTable;if(a===l){const t=Ve(n);if(n.elementFromPoint(i+t,r)!==l||n.elementFromPoint(i,r+t)!==l)return}else for(;a!==s;){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 r=oe(i);for(;null!==r;)this.eventManager.addEventListener(r.document.documentElement,"click",()=>{this.hot.unlisten()}),r=oe(r);this.eventManager.addEventListener(Qa(this,al),"selectstart",t=>{this.settings.fragmentSelection||je(t.target)||t.preventDefault()})}invalidateIndexSizesCache(){this._wt.wtViewport.invalidateRowHeightCache(),this._wt.wtViewport.invalidateColumnWidthCache()}invalidateColumnWidthCache(){this._wt.wtViewport.invalidateColumnWidthCache()}invalidateRowHeightCache(){this._wt.wtViewport.invalidateRowHeightCache()}translateFromRenderableToVisualCoords({row:t,col:e}){return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,e))}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),s=n.getRenderableFromVisualIndex(i);if(!Number.isInteger(s))return 0;let r=0;return e<0?r=s+1:e>0&&(r=o-s),r}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){const e=this.hot.rootElement.parentNode?.querySelector(".hot-display-license-info");e&&ue(e,t)}removeClassNameFromLicenseElement(t){const e=this.hot.rootElement.parentNode?.querySelector(".hot-display-license-info");e&&ge(e,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:Qa(this,al),isDataViewInstance:()=>Ka(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),tl(this,il,t.length),this.hot.getSettings().ariaTags&&el(this,pl,vl).call(this)===this.hot.countCols()&&el(this,fl,Cl).call(this,Qa(this,il)),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),tl(this,ol,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),s=this.hot.runHooks("modifyGetCellCoords",o,i,!1,"meta");let r=o,a=i;Array.isArray(s)&&([r,a]=s);const l=this.hot.getCellMeta(r,a),h=this.hot.colToProp(a);let c=this.hot.getDataAtRowProp(r,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&&ke(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e),s={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=o,tl(this,rl,!0),tl(this,cl,{x:t.clientX,y:t.clientY}),this.hot.runHooks("beforeOnCellMouseDown",t,i,n,s),ln(t)||(ja(t,{coords:i,selection:this.hot.selection,controller:s,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,tl(this,rl,!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),s={row:!1,column:!1,cell:!1};this.activeWt=o,this.hot.runHooks("beforeOnCellMouseOver",t,i,n,s),ln(t)||(!Qa(this,rl)||Qa(this,cl)&&Qa(this,cl).x===t.clientX&&Qa(this,cl).y===t.clientY||ja(t,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseOver",t,i,n),this.activeWt=this._wt,tl(this,cl,null))},onCellMouseUp:(t,e,n,o)=>{const i=this.translateFromRenderableToVisualCoords(e);var s,r;(this.activeWt=o,this.hot.runHooks("beforeOnCellMouseUp",t,i,n),ln(t)||this.hot.isDestroyed)||(ja(t,{coords:i,selection:this.hot.selection,cellRangeMapper:(s=this.hot,r="cellRangeMapper",_n?.get(s.guid)?.get(r))}),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 s=t;i||(s=o.getVisualFromRenderableIndex(t));const r=this.hot.runHooks("beforeHighlightingRowHeader",s,e,n);return i?r:o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r,1))},onBeforeHighlightingColumnHeader:(t,e,n)=>{const o=this.hot.columnIndexMapper,i=t<0;let s=t;i||(s=o.getVisualFromRenderableIndex(t));const r=this.hot.runHooks("beforeHighlightingColumnHeader",s,e,n);return i?r:o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r,1))},onAfterDrawSelection:(t,e,n)=>{let o;const[i,s]=this.translateFromRenderableToVisualIndex(t,e),r=this.hot.selection.getSelectedRange();if(r.size()>0){const t=r.peekByIndex(n??0);o=[t.from.row,t.from.col,t.to.row,t.to.col]}return this.hot.runHooks("afterDrawSelection",i,s,o,n)},onBeforeDrawBorders:(t,e)=>{const[n,o,i,s]=t,r=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)];return this.hot.runHooks("beforeDrawBorders",r,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,s=this.hot.columnIndexMapper,r=e>=0?s.getVisualFromRenderableIndex(e):e,a=t>=0?i.getVisualFromRenderableIndex(t):t,l=this.hot.runHooks("modifyGetCellCoords",a,r,n,o);if(Array.isArray(l)){const[t,e,n,o]=l;return[t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,n>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(n,-1)):n,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o]}},onModifyGetCoordsElement:(t,e)=>{const n=this.hot.rowIndexMapper,o=this.hot.columnIndexMapper,i=e>=0?o.getVisualFromRenderableIndex(e):e,s=t>=0?n.getVisualFromRenderableIndex(t):t,r=this.hot.runHooks("modifyGetCoordsElement",s,i);if(Array.isArray(r)){const[t,e]=r;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&&(e=1),e>0){const n=this.countRenderableRows(),o=t.startRow,i=t.endRow;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&&(e=1),e>0){const n=this.countRenderableColumns(),o=t.startColumn,i=t.endColumn;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 Fa(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){if(je(t))return!0;const e=re(t,this._wt.wtTable.spreader);if(!0===this.settings.fragmentSelection&&e)return!0;const n=this.hot.getSelectedRangeActive()?.isSingleCell()??!1;return!("cell"!==this.settings.fragmentSelection||!n||!e)||!(this.settings.fragmentSelection||!this.isCellEdited()||!n)}isMouseDown(){return Qa(this,rl)}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 we(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"),s=n.createElement("span");i.className="relative",s.className="rowHeader",this.updateCellHeader(s,t,o),i.appendChild(s),e.appendChild(i)}this.hot.runHooks("afterGetRowHeader",t,e)}appendColHeader(t,e,n=this.hot.getColHeader,o=0){const i=()=>{const e=t>=0?this.hot.getColumnMeta(t).headerClassName:null;return e?e.split(" "):[]};if(e.firstChild){const s=e.firstChild;de(s,"relative")?(this.updateCellHeader(s.querySelector(".colHeader"),t,n,o),s.className="",ue(s,["relative",...i()])):(we(e),this.appendColHeader(t,e,n,o))}else{const{rootDocument:s}=this.hot,r=s.createElement("div"),a=s.createElement("span"),l=i();r.classList.add("relative",...l),a.className="colHeader",this.settings.ariaTags&&(pe(r,"role","presentation"),pe(a,"role","presentation")),this.updateCellHeader(a,t,n,o),r.appendChild(a),e.appendChild(r)}this.hot.runHooks("afterGetColHeader",t,e,o)}updateCellHeader(t,e,n,o=0){let i=e;const s=this._wt.wtOverlays.getParentOverlay(t)||this._wt;t.parentNode&&(de(t,"colHeader")?i=s.wtTable.columnFilter.sourceToRendered(e):de(t,"rowHeader")&&(i=s.wtTable.rowFilter.sourceToRendered(e))),i>-1?ye(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){tl(this,ll,t),tl(this,hl,e)}getLastSize(){return{width:Qa(this,ll),height:Qa(this,hl)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const t=this.hot.rowIndexMapper,e=t.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return t.getNearestNotHiddenIndex(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(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(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(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 Qa(this,ol)}getRowHeadersCount(){return Qa(this,il)}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){return(this._wt.wtOverlays.getParentOverlay(t)??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()}constructor(t){nl(this,gl),nl(this,pl),nl(this,fl),nl(this,ml),Ja(this,ol,{writable:!0,value:void 0}),Ja(this,il,{writable:!0,value:void 0}),Ja(this,sl,{writable:!0,value:void 0}),Ja(this,rl,{writable:!0,value:void 0}),Ja(this,al,{writable:!0,value:void 0}),Ja(this,ll,{writable:!0,value:void 0}),Ja(this,hl,{writable:!0,value:void 0}),Ja(this,cl,{writable:!0,value:void 0}),Ja(this,dl,{writable:!0,value:void 0}),Ja(this,ul,{writable:!0,value:void 0}),tl(this,ol,0),tl(this,il,0),this.postponedAdjustElementsSize=!1,tl(this,sl,!1),tl(this,ll,0),tl(this,hl,0),tl(this,cl,null),tl(this,dl,!1),tl(this,ul,null),this.hot=t,this.eventManager=new Fn(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}}function bl(t){return t.sourceCapabilities?!0===t.sourceCapabilities.firesTouchEvents:Qa(this,dl)}function vl(){return parseInt(this.hot.rootElement.getAttribute(dt()[0]),10)}function Cl(t){const e=el(this,pl,vl).call(this)+t;pe(this.hot.rootElement,...dt(e))}function yl(){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===Ve()?ue(t,"htScrollbarHidden"):ge(t,"htScrollbarHidden")}function Sl(t,e=0){let 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 kl(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}class Rl{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(t=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}constructor(t=null){this.indexedValues=[],this.initValueOrFn=t}}function xl(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 El(t,e){return k(t,(t,n)=>!1===e.includes(n))}Rt(Rl,Fs);class Ml extends Rl{insert(t,e){this.indexedValues=xl(this.indexedValues,0,e,this.initValueOrFn),super.insert(t,e)}remove(t){this.indexedValues=El(this.indexedValues,t),super.remove(t)}}class Tl extends Ml{getHiddenIndexes(){return S(this.getValues(),(t,e,n)=>(e&&t.push(n),t),[])}constructor(t=!1){super(t)}}function _l(t,e,n){return[...t.slice(0,e),...n,...t.slice(e)]}function Hl(t,e){return k(t,t=>!1===e.includes(t))}function Il(t,e){return R(t,t=>t-e.filter(e=>e<t).length)}function Al(t,e){const n=e[0],o=e.length;return R(t,t=>t>=n?t+o:t)}class Ol extends Rl{getValues(){return this.orderOfIndexes.map(t=>this.indexedValues[t])}setValues(t){this.orderOfIndexes=[...Array(t.length).keys()],super.setValues(t)}setValueAtIndex(t,e,n=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=Hl(this.orderOfIndexes,[t]),Ze(this.initValueOrFn)?super.setValueAtIndex(t,this.initValueOrFn(t)):super.setValueAtIndex(t,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(t=this.indexedValues.length){this.orderOfIndexes.length=0,super.setDefaultValues(t)}insert(t,e){this.indexedValues=xl(this.indexedValues,0,e,this.initValueOrFn),this.orderOfIndexes=Al(this.orderOfIndexes,e),super.insert(t,e)}remove(t){this.indexedValues=El(this.indexedValues,t),this.orderOfIndexes=Hl(this.orderOfIndexes,t),this.orderOfIndexes=Il(this.orderOfIndexes,t),super.remove(t)}getEntries(){return this.orderOfIndexes.map(t=>[t,this.getValueAtIndex(t)])}constructor(...t){super(...t),this.orderOfIndexes=[]}}class Dl extends Ml{getTrimmedIndexes(){return S(this.getValues(),(t,e,n)=>(e&&t.push(n),t),[])}constructor(t=!1){super(t)}}const Nl=new Map([["indexesSequence",{getListWithInsertedItems:_l,getListWithRemovedItems:Hl}],["physicallyIndexed",{getListWithInsertedItems:xl,getListWithRemovedItems:El}]]),Pl=t=>(!1===Nl.has(t)&&bt(`Alter strategy with ID '${t}' does not exist.`),Nl.get(t));class Wl extends Rl{insert(t,e){const n=Al(this.indexedValues,e);this.indexedValues=_l(n,t,e),super.insert(t,e)}remove(t){const e=Hl(this.indexedValues,t);this.indexedValues=Il(e,t),super.remove(t)}constructor(){super(t=>t)}}const Ll=new Map([["hiding",Tl],["index",Rl],["linkedPhysicalIndexToValue",Ol],["physicalIndexToValue",Ml],["trimming",Dl]]);class Bl{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)})}constructor(){this.collection=new Map}}Rt(Bl,Fs);class Vl extends Bl{getMergedValues(t=!0){if(!0===t)return this.mergedValuesCache;if(0===this.getLength())return[];const e=R(this.get(),t=>t.getValues()),n=[],o=I(e[0])&&e[0].length||0;for(let t=0;t<o;t+=1){const o=[];for(let n=0;n<this.getLength();n+=1)o.push(e[n][t]);n.push(o)}return R(n,this.aggregationFunction)}getMergedValueAtIndex(t,e){const n=this.getMergedValues(e)[t];return I(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}constructor(t,e){super(),this.mergedValuesCache=[],this.aggregationFunction=t,this.fallbackValue=e}}function Fl(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function zl(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 $l(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Fl(t,e,"set"),n),n}var Ul=new WeakMap;class jl{subscribe(t){var e;return this.addLocalHook("change",t),this._write(function(t,e){return e.get?e.get.call(t):e.value}(e=this,Fl(e,Ul,"get"))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(t){return t.length>0&&this.runLocalHooks("change",t),this}_writeInitialChanges(t){$l(this,Ul,t)}constructor(){zl(this,Ul,{writable:!0,value:void 0}),$l(this,Ul,[])}}function Yl(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 Gl(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function ql(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Gl(t,e,"get"))}function Kl(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 Xl(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Gl(t,e,"set"),n),n}Rt(jl,Fs);var Zl=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,th=new WeakMap,eh=new WeakMap;class nh{createObserver(){const t=new jl;return ql(this,Zl).add(t),t.addLocalHook("unsubscribe",()=>{ql(this,Zl).delete(t)}),t._writeInitialChanges(Yl(ql(this,Ql),ql(this,Jl))),t}emit(t){let e=ql(this,Jl);ql(this,th)&&ql(this,Ql).length===t.length||(0===t.length?t=new Array(e.length).fill(ql(this,eh)):Xl(this,Ql,new Array(t.length).fill(ql(this,eh))),ql(this,th)||(Xl(this,th,!0),e=ql(this,Ql)));const n=Yl(e,t);ql(this,Zl).forEach(t=>t._write(n)),Xl(this,Jl,t)}constructor({initialIndexValue:t}={}){Kl(this,Zl,{writable:!0,value:void 0}),Kl(this,Ql,{writable:!0,value:void 0}),Kl(this,Jl,{writable:!0,value:void 0}),Kl(this,th,{writable:!0,value:void 0}),Kl(this,eh,{writable:!0,value:void 0}),Xl(this,Zl,new Set),Xl(this,Ql,[]),Xl(this,Jl,[]),Xl(this,th,!1),Xl(this,eh,!1),Xl(this,eh,t??!1)}}function oh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ih(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function sh(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ih(t,e,"get"))}function rh(t,e,n){oh(t,e),e.set(t,n)}function ah(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ih(t,e,"set"),n),n}function lh(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function hh(t,e){oh(t,e),e.add(t)}var ch=new WeakMap,dh=new WeakMap,uh=new WeakSet,gh=new WeakSet,ph=new WeakSet;class fh{suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache(),lh(this,ph,bh).call(this)}createChangesObserver(t){return"hiding"!==t&&bt(`Unsupported index map type "${t}".`),this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(t,e,n){return this.registerMap(t,function(t,e=null){return Ll.has(t)||bt(`The provided map type ("${t}") does not exist.`),new(Ll.get(t))(e)}(e,n))}registerMap(t,e){(this.trimmingMapsCollection.get(t)||this.hidingMapsCollection.get(t)||this.variousMapsCollection.get(t))&&bt(`Map with name "${t}" has been already registered.`),e instanceof Dl?this.trimmingMapsCollection.register(t,e):e instanceof Tl?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,n=!1){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(t=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(t=!0){if(!0===t)return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter(t=>!1===this.isTrimmed(t))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(t=!0){if(!0===t)return this.notHiddenIndexesCache;return this.getIndexesSequence().filter(t=>!1===this.isHidden(t))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(t=!0){if(!0===t)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=R(t,t=>this.getPhysicalFromVisualIndex(t)),o=this.getNotTrimmedIndexesLength(),i=t.length,s=Hl(this.getIndexesSequence(),n),r=s.filter(t=>!1===this.isTrimmed(t));let a=s.indexOf(r[r.length-1])+1;if(e+i<o){const t=r[e];a=s.indexOf(t)}this.indexesChangeSource="move",this.setIndexesSequence(_l(s,a,n)),this.indexesChangeSource=void 0}isTrimmed(t){return this.trimmingMapsCollection.getMergedValueAtIndex(t)}isHidden(t){return this.hidingMapsCollection.getMergedValueAtIndex(t)}insertIndexes(t,e,n="start"){const o=this.getNotTrimmedIndexes()[t],i=I(o)?o:this.getNumberOfIndexes(),s=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),r=R(new Array(e).fill(i),(t,e)=>t+e);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(s,r),this.indexesChangeSource=void 0;const a="end"===n?r.map(t=>t+1):r;this.trimmingMapsCollection.insertToEvery(s,a),this.hidingMapsCollection.insertToEvery(s,a),this.variousMapsCollection.insertToEvery(s,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()}observeMapChange(t,e){return(t instanceof Dl||t instanceof Tl)&&bt('The "observeMapChange" method does not support trimming or hiding maps.'),sh(this,ch).has(t)||sh(this,ch).set(t,new Set),sh(this,ch).get(t).add(e),()=>{const n=sh(this,ch).get(t);n&&(n.delete(e),0===n.size&&sh(this,ch).delete(t))}}updateCache(t=!1){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)}}destroy(){ah(this,ch,new WeakMap),sh(this,dh).clear(),this.unregisterAll()}constructor(){hh(this,uh),hh(this,gh),hh(this,ph),rh(this,ch,{writable:!0,value:void 0}),rh(this,dh,{writable:!0,value:void 0}),this.indexesSequence=new Wl,this.trimmingMapsCollection=new Vl(t=>t.some(t=>!0===t),!1),this.hidingMapsCollection=new Vl(t=>t.some(t=>!0===t),!1),this.variousMapsCollection=new Bl,this.hidingChangesObservable=new nh({initialIndexValue:!1}),this.notTrimmedIndexesCache=[],this.notHiddenIndexesCache=[],this.isBatched=!1,this.indexesSequenceChanged=!1,this.indexesChangeSource=void 0,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1,this.renderablePhysicalIndexesCache=[],this.fromPhysicalToVisualIndexesCache=new Map,this.fromVisualToRenderableIndexesCache=new Map,ah(this,ch,new WeakMap),ah(this,dh,new Set),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=>{lh(this,uh,mh).call(this,t),this.runLocalHooks("change",t,this.variousMapsCollection)})}}function mh(t){sh(this,ch).has(t)&&(this.isBatched?sh(this,dh).add(t):lh(this,gh,wh).call(this,t))}function wh(t){const e=sh(this,ch).get(t);e&&e.forEach(e=>e(t))}function bh(){sh(this,dh).size>0&&(sh(this,dh).forEach(t=>lh(this,gh,wh).call(this,t)),sh(this,dh).clear())}function vh(t){const e=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(t);return e?`${e[1].toLowerCase()}-${e[2].toUpperCase()}`:t}function Ch(t){I(t)&&te(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.`)}Rt(fh,Fs);const{register:yh,getValues:Sh}=Hn("phraseFormatters");function kh(t,e){yh(t,e)}kh("pluralize",function(t,e){return Array.isArray(t)&&Number.isInteger(e)?t[e]:t}),kh("substitute",function t(e,n){return Array.isArray(e)?e.map(e=>t(e,n)):q(e,n)});const Rh="Common:",xh=`${Rh}ok`,Eh=`${Rh}cancel`,Mh="ContextMenu:items",Th=`${Mh}.noItems`,_h=`${Mh}.insertRowAbove`,Hh=`${Mh}.insertRowBelow`,Ih=`${Mh}.insertColumnOnTheLeft`,Ah=`${Mh}.insertColumnOnTheRight`,Oh=`${Mh}.removeRow`,Dh=`${Mh}.removeColumn`,Nh=`${Mh}.undo`,Ph=`${Mh}.redo`,Wh=`${Mh}.readOnly`,Lh=`${Mh}.clearColumn`,Bh=`${Mh}.copy`,Vh=`${Mh}.copyWithHeaders`,Fh=`${Mh}.copyWithGroupHeaders`,zh=`${Mh}.copyHeadersOnly`,$h=`${Mh}.cut`,Uh=`${Mh}.export`,jh=`${Mh}.exportFileCsv`,Yh=`${Mh}.exportFileXlsx`,Gh=`${Mh}.freezeColumn`,qh=`${Mh}.unfreezeColumn`,Kh=`${Mh}.mergeCells`,Xh=`${Mh}.unmergeCells`,Zh=`${Mh}.addComment`,Qh=`${Mh}.editComment`,Jh=`${Mh}.removeComment`,tc=`${Mh}.readOnlyComment`,ec=`${Mh}.align`,nc=`${Mh}.align.left`,oc=`${Mh}.align.center`,ic=`${Mh}.align.right`,sc=`${Mh}.align.justify`,rc=`${Mh}.align.top`,ac=`${Mh}.align.middle`,lc=`${Mh}.align.bottom`,hc=`${Mh}.borders`,cc=`${Mh}.borders.top`,dc=`${Mh}.borders.right`,uc=`${Mh}.borders.bottom`,gc=`${Mh}.borders.left`,pc=`${Mh}.borders.remove`,fc=`${Mh}.nestedHeaders.insertChildRow`,mc=`${Mh}.nestedHeaders.detachFromParent`,wc=`${Mh}.hideColumn`,bc=`${Mh}.showColumn`,vc=`${Mh}.hideRow`,Cc=`${Mh}.showRow`,yc="Filters:",Sc=`${yc}conditions`,kc=`${Sc}.none`,Rc=`${Sc}.isEmpty`,xc=`${Sc}.isNotEmpty`,Ec=`${Sc}.isEqualTo`,Mc=`${Sc}.isNotEqualTo`,Tc=`${Sc}.beginsWith`,_c=`${Sc}.endsWith`,Hc=`${Sc}.contains`,Ic=`${Sc}.doesNotContain`,Ac=`${Sc}.byValue`,Oc=`${Sc}.greaterThan`,Dc=`${Sc}.greaterThanOrEqualTo`,Nc=`${Sc}.lessThan`,Pc=`${Sc}.lessThanOrEqualTo`,Wc=`${Sc}.isBetween`,Lc=`${Sc}.isNotBetween`,Bc=`${Sc}.after`,Vc=`${Sc}.before`,Fc=`${Sc}.today`,zc=`${Sc}.tomorrow`,$c=`${Sc}.yesterday`,Uc=`${yc}labels.filterByCondition`,jc=`${yc}labels.filterByValue`,Yc=`${yc}labels.conjunction`,Gc=`${yc}labels.disjunction`,qc=`${yc}values.blankCells`,Kc=`${yc}buttons.selectAll`,Xc=`${yc}buttons.clear`,Zc=`${yc}buttons.ok`,Qc=`${yc}buttons.cancel`,Jc=`${yc}buttons.placeholder.search`,td=`${yc}buttons.placeholder.value`,ed=`${yc}buttons.placeholder.secondValue`,nd="Pagination:",od=`${nd}section.pagination`,id=`${nd}.pageSize.auto`,sd=`${nd}section.pageSize`,rd=`${nd}section.counter`,ad=`${nd}section.navigation`,ld=`${nd}firstPage`,hd=`${nd}prevPage`,cd=`${nd}nextPage`,dd=`${nd}lastPage`,ud="CheckboxRenderer:",gd=`${ud}checked`,pd=`${ud}unchecked`,fd="Loading:",md=`${fd}title`,wd="Notification:",bd=`${wd}buttons.close`,vd="ExportFile:",Cd=`${vd}dialog.title`,yd="EmptyDataState:",Sd=`${yd}title`,kd=`${yd}description`,Rd=`${yd}title.filters`,xd=`${yd}description.filters`,Ed=`${yd}buttons.filters.reset`,Md=`${yd}title.loading`,Td=`${yd}description.loading`,_d="DataProvider:",Hd=`${_d}errors.fetch`,Id=`${_d}errors.create`,Ad=`${_d}errors.update`,Od=`${_d}errors.remove`,Dd=`${_d}errors.requestFailed`,Nd=`${_d}buttons.refetch`;var Pd=Object.freeze({__proto__:null,CANCEL:Eh,CHECKBOX_CHECKED:gd,CHECKBOX_RENDERER_NAMESPACE:ud,CHECKBOX_UNCHECKED:pd,COMMON_NAMESPACE:Rh,CONTEXTMENU_ITEMS_ADD_COMMENT:Zh,CONTEXTMENU_ITEMS_ALIGNMENT:ec,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:lc,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:oc,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:sc,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:nc,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:ac,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:ic,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:rc,CONTEXTMENU_ITEMS_BORDERS:hc,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:uc,CONTEXTMENU_ITEMS_BORDERS_LEFT:gc,CONTEXTMENU_ITEMS_BORDERS_RIGHT:dc,CONTEXTMENU_ITEMS_BORDERS_TOP:cc,CONTEXTMENU_ITEMS_CLEAR_COLUMN:Lh,CONTEXTMENU_ITEMS_COPY:Bh,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:zh,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:Fh,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:Vh,CONTEXTMENU_ITEMS_CUT:$h,CONTEXTMENU_ITEMS_EDIT_COMMENT:Qh,CONTEXTMENU_ITEMS_EXPORT:Uh,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:jh,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:Yh,CONTEXTMENU_ITEMS_FREEZE_COLUMN:Gh,CONTEXTMENU_ITEMS_HIDE_COLUMN:wc,CONTEXTMENU_ITEMS_HIDE_ROW:vc,CONTEXTMENU_ITEMS_INSERT_LEFT:Ih,CONTEXTMENU_ITEMS_INSERT_RIGHT:Ah,CONTEXTMENU_ITEMS_MERGE_CELLS:Kh,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:mc,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:fc,CONTEXTMENU_ITEMS_NO_ITEMS:Th,CONTEXTMENU_ITEMS_READ_ONLY:Wh,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:tc,CONTEXTMENU_ITEMS_REDO:Ph,CONTEXTMENU_ITEMS_REMOVE_BORDERS:pc,CONTEXTMENU_ITEMS_REMOVE_COLUMN:Dh,CONTEXTMENU_ITEMS_REMOVE_COMMENT:Jh,CONTEXTMENU_ITEMS_REMOVE_ROW:Oh,CONTEXTMENU_ITEMS_ROW_ABOVE:_h,CONTEXTMENU_ITEMS_ROW_BELOW:Hh,CONTEXTMENU_ITEMS_SHOW_COLUMN:bc,CONTEXTMENU_ITEMS_SHOW_ROW:Cc,CONTEXTMENU_ITEMS_UNDO:Nh,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:qh,CONTEXTMENU_ITEMS_UNMERGE_CELLS:Xh,CONTEXT_MENU_ITEMS_NAMESPACE:Mh,DATA_PROVIDER_BUTTONS_REFETCH:Nd,DATA_PROVIDER_ERRORS_CREATE:Id,DATA_PROVIDER_ERRORS_FETCH:Hd,DATA_PROVIDER_ERRORS_REMOVE:Od,DATA_PROVIDER_ERRORS_REQUEST_FAILED:Dd,DATA_PROVIDER_ERRORS_UPDATE:Ad,DATA_PROVIDER_NAMESPACE:_d,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:Ed,EMPTY_DATA_STATE_DESCRIPTION:kd,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:xd,EMPTY_DATA_STATE_DESCRIPTION_LOADING:Td,EMPTY_DATA_STATE_NAMESPACE:yd,EMPTY_DATA_STATE_TITLE:Sd,EMPTY_DATA_STATE_TITLE_FILTERS:Rd,EMPTY_DATA_STATE_TITLE_LOADING:Md,EXPORT_FILE_DIALOG_TITLE:Cd,EXPORT_FILE_NAMESPACE:vd,FILTERS_BUTTONS_CANCEL:Qc,FILTERS_BUTTONS_CLEAR:Xc,FILTERS_BUTTONS_OK:Zc,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:Jc,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:ed,FILTERS_BUTTONS_PLACEHOLDER_VALUE:td,FILTERS_BUTTONS_SELECT_ALL:Kc,FILTERS_CONDITIONS_AFTER:Bc,FILTERS_CONDITIONS_BEFORE:Vc,FILTERS_CONDITIONS_BEGINS_WITH:Tc,FILTERS_CONDITIONS_BETWEEN:Wc,FILTERS_CONDITIONS_BY_VALUE:Ac,FILTERS_CONDITIONS_CONTAINS:Hc,FILTERS_CONDITIONS_EMPTY:Rc,FILTERS_CONDITIONS_ENDS_WITH:_c,FILTERS_CONDITIONS_EQUAL:Ec,FILTERS_CONDITIONS_GREATER_THAN:Oc,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:Dc,FILTERS_CONDITIONS_LESS_THAN:Nc,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:Pc,FILTERS_CONDITIONS_NAMESPACE:Sc,FILTERS_CONDITIONS_NONE:kc,FILTERS_CONDITIONS_NOT_BETWEEN:Lc,FILTERS_CONDITIONS_NOT_CONTAIN:Ic,FILTERS_CONDITIONS_NOT_EMPTY:xc,FILTERS_CONDITIONS_NOT_EQUAL:Mc,FILTERS_CONDITIONS_TODAY:Fc,FILTERS_CONDITIONS_TOMORROW:zc,FILTERS_CONDITIONS_YESTERDAY:$c,FILTERS_DIVS_FILTER_BY_CONDITION:Uc,FILTERS_DIVS_FILTER_BY_VALUE:jc,FILTERS_LABELS_CONJUNCTION:Yc,FILTERS_LABELS_DISJUNCTION:Gc,FILTERS_NAMESPACE:yc,FILTERS_VALUES_BLANK_CELLS:qc,LOADING_NAMESPACE:fd,LOADING_TITLE:md,NOTIFICATION_BUTTONS_CLOSE:bd,NOTIFICATION_NAMESPACE:wd,OK:xh,PAGINATION_COUNTER_SECTION:rd,PAGINATION_FIRST_PAGE:ld,PAGINATION_LAST_PAGE:dd,PAGINATION_NAMESPACE:nd,PAGINATION_NAV_SECTION:ad,PAGINATION_NEXT_PAGE:cd,PAGINATION_PAGE_SIZE_AUTO:id,PAGINATION_PAGE_SIZE_SECTION:sd,PAGINATION_PREV_PAGE:hd,PAGINATION_SECTION:od});const Wd={languageCode:"en-US",[xh]:"OK",[Eh]:"Cancel",[Th]:"No available options",[_h]:"Insert row above",[Hh]:"Insert row below",[Ih]:"Insert column left",[Ah]:"Insert column right",[Oh]:["Remove row","Remove rows"],[Dh]:["Remove column","Remove columns"],[Nh]:"Undo",[Ph]:"Redo",[Wh]:"Read only",[Lh]:"Clear column",[ec]:"Alignment",[nc]:"Left",[oc]:"Center",[ic]:"Right",[sc]:"Justify",[rc]:"Top",[ac]:"Middle",[lc]:"Bottom",[Gh]:"Freeze column",[qh]:"Unfreeze column",[hc]:"Borders",[cc]:"Top",[dc]:"Right",[uc]:"Bottom",[gc]:"Left",[pc]:"Remove border(s)",[Zh]:"Add comment",[Qh]:"Edit comment",[Jh]:"Delete comment",[tc]:"Read-only comment",[Kh]:"Merge cells",[Xh]:"Unmerge cells",[Bh]:"Copy",[Vh]:["Copy with header","Copy with headers"],[Fh]:["Copy with group header","Copy with group headers"],[zh]:["Copy header only","Copy headers only"],[$h]:"Cut",[Uh]:"Export",[jh]:"To CSV",[Yh]:"To Excel",[Cd]:"Exporting…",[fc]:"Insert child row",[mc]:"Detach from parent",[wc]:["Hide column","Hide columns"],[bc]:["Show column","Show columns"],[vc]:["Hide row","Hide rows"],[Cc]:["Show row","Show rows"],[kc]:"None",[Rc]:"Is empty",[xc]:"Is not empty",[Ec]:"Is equal to",[Mc]:"Is not equal to",[Tc]:"Begins with",[_c]:"Ends with",[Hc]:"Contains",[Ic]:"Does not contain",[Oc]:"Greater than",[Dc]:"Greater than or equal to",[Nc]:"Less than",[Pc]:"Less than or equal to",[Wc]:"Is between",[Lc]:"Is not between",[Bc]:"After",[Vc]:"Before",[Fc]:"Today",[zc]:"Tomorrow",[$c]:"Yesterday",[qc]:"Blank cells",[Uc]:"Filter by condition",[jc]:"Filter by value",[Yc]:"And",[Gc]:"Or",[Kc]:"Select all",[Xc]:"Clear",[Zc]:"OK",[Qc]:"Cancel",[Jc]:"Search",[td]:"Value",[ed]:"Second value",[od]:"Pagination",[sd]:"Page size",[id]:"Auto",[rd]:"[start] - [end] of [total]",[ad]:"Page [currentPage] of [totalPages]",[ld]:"Go to first page",[hd]:"Go to previous page",[cd]:"Go to next page",[dd]:"Go to last page",[gd]:"Checked",[pd]:"Unchecked",[md]:"Loading...",[bd]:"Close",[Sd]:"No data available",[kd]:"There’s nothing to display yet.",[Rd]:"No results found",[xd]:"It looks like your current filters are hiding all results.",[Ed]:"Reset filters",[Md]:"Loading data",[Td]:"Please wait.",[Hd]:"Could not load data",[Id]:"Could not create rows",[Ad]:"Could not update rows",[Od]:"Could not remove rows",[Dd]:"Request failed",[Nd]:"Refetch"},Ld=Pd,Bd=Wd.languageCode,{register:Vd,getItem:Fd,hasItem:zd,getValues:$d}=Hn("languagesDictionaries");function Ud(t,e){let n=t,o=e;return Et(t)&&(o=t,n=o.languageCode),function(t,e){t!==Bd&&(n=e,Tt(Fd(Bd),(t,e)=>{A(n[e])&&(n[e]=t)}));var n}(n,o),Vd(n,St(o)),St(o)}function jd(t){return Yd(t)?St(Fd(t)):null}function Yd(t){return zd(t)}function Gd(t,e,n){const o=jd(t);if(null===o)return null;const i=o[e];if(A(i))return null;const s=function(t,e){return Sh().reduce((t,n)=>n(t,e),t)}(i,n);return Array.isArray(s)?s[0]:s}Ud(Wd);class qd extends zs{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({from:t,to:e}){let n=this.getNearestNotHiddenCoords(t,1),o=this.getNearestNotHiddenCoords(e,-1);return null===n||null===o?null:((n.row>o.row||n.col>o.col)&&(n=t,o=e),this.settings.createCellRange(n,n,o))}getNearestNotHiddenCoords(t,e,n=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 s=null;if(null!==i&&null!==i.col&&null!==i.row||(s=this.getNearestNotHiddenCoords(e,n,o)),null!==s&&t.overlaps(s)){const e=t.highlight.clone();if(e.row>=0&&(e.row=s.row),e.col>=0&&(e.col=s.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===s&&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)}constructor(t,e){super(t,null),this.visualCellRange=null,this.visualCellRange=e||null,this.commit()}}function Kd({activeHeaderClassName:t,...e}){return new qd({className:t,...e,selectionType:$s})}function Xd({areaCornerVisible:t,...e}){return new qd({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...e,selectionType:js})}function Zd({...t}){return new qd({className:"highlight",...t,selectionType:js})}function Qd({columnClassName:t,...e}){return new qd({className:t,...e,selectionType:"column"})}function Jd({headerClassName:t,...e}){return new qd({className:t,...e,selectionType:Us})}function tu({rowClassName:t,...e}){return new qd({className:t,...e,selectionType:"row"})}function eu(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function nu(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 ou=new WeakSet;class iu{isEnabledFor(t,e){let n=t;t===Ys&&(n="current");let o=this.options.disabledCellSelection(e.row,e.col);return"string"==typeof o&&(o=[o]),!o||Array.isArray(o)&&!o.includes(n)}useLayerLevel(t=0){return this.layerLevel=t,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return eu(this,ou,su).call(this,this.layeredAreas,Xd)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return eu(this,ou,su).call(this,this.areas,Zd)}getAreas(){return[...this.areas.values()]}createRowHeader(){return eu(this,ou,su).call(this,this.rowHeaders,Jd)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return eu(this,ou,su).call(this,this.columnHeaders,Jd)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return eu(this,ou,su).call(this,this.activeRowHeaders,Kd)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return eu(this,ou,su).call(this,this.activeColumnHeaders,Kd)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return eu(this,ou,su).call(this,this.activeCornerHeaders,Kd)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return eu(this,ou,su).call(this,this.rowHighlights,tu)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return eu(this,ou,su).call(this,this.columnHighlights,Qd)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(t){this.customSelections.push(function({border:t,visualCellRange:e,...n}){return new qd({...t,...n,selectionType:"custom-selection"},e)}({...this.options,...t}))}updateHighlightClassNames(t){"rowClassName"in t&&(this.options.rowClassName=t.rowClassName,x(this.rowHighlights.values(),e=>{e.settings.className=t.rowClassName})),"columnClassName"in t&&(this.options.columnClassName=t.columnClassName,x(this.columnHighlights.values(),e=>{e.settings.className=t.columnClassName})),"headerClassName"in t&&(this.options.headerClassName=t.headerClassName,x(this.rowHeaders.values(),e=>{e.settings.className=t.headerClassName}),x(this.columnHeaders.values(),e=>{e.settings.className=t.headerClassName})),"activeHeaderClassName"in t&&(this.options.activeHeaderClassName=t.activeHeaderClassName,x(this.activeRowHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}),x(this.activeColumnHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}),x(this.activeCornerHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}))}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]()}constructor(t){nu(this,ou),this.layerLevel=0,this.layeredAreas=new Map,this.areas=new Map,this.rowHeaders=new Map,this.columnHeaders=new Map,this.activeRowHeaders=new Map,this.activeColumnHeaders=new Map,this.activeCornerHeaders=new Map,this.rowHighlights=new Map,this.columnHighlights=new Map,this.customSelections=[],this.options=t,this.focus=function({cellCornerVisible:t,...e}){return new qd({className:"current",headerAttributes:[["aria-selected","true"]],border:{width:2,color:"#4b89ff",cornerVisible:t},...e,selectionType:Ys})}(t),this.fill=function({...t}){return new qd({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:"fill"})}(t)}}function su(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}class ru{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,e=()=>!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 ru(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(t=0){let e;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}constructor(t){this.ranges=[],this.createCellRange=t}}function au(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lu(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function hu(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,lu(t,e,"get"))}function cu(t,e,n){au(t,e),e.set(t,n)}function du(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,lu(t,e,"set"),n),n}function uu(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function gu(t,e){au(t,e),e.add(t)}var pu=new WeakMap,fu=new WeakMap,mu=new WeakMap,wu=new WeakSet,bu=new WeakSet,vu=new WeakSet,Cu=new WeakSet,yu=new WeakSet,Su=new WeakSet,ku=new WeakSet,Ru=new WeakSet,xu=new WeakSet;class Eu{setActiveLayerIndex(t){du(this,fu,t)}getCurrentSelection(){return hu(this,pu).peekByIndex(hu(this,fu))}transformStart(t,e,n=!1){du(this,mu,this.calculateOffset());const o=this.tableApi.createCellCoords(t,e);let i=this.getCurrentSelection().highlight;const s=this.tableApi.visualToRenderableCoords(i);let r=0,a=0;if(this.runLocalHooks("beforeTransformStart",o),null!==s.row&&null!==s.col){let{width:t,height:e}=uu(this,Cu,Hu).call(this);const{row:s,col:l}=uu(this,Ru,Du).call(this,i),h=this.tableApi.fixedRowsBottom(),c=this.tableApi.minSpareRows(),d=this.tableApi.minSpareCols(),u=this.tableApi.autoWrapRow(),g=this.tableApi.autoWrapCol(),p=this.tableApi.createCellCoords(s+o.row,l+o.col);if(p.row>=e){const o=At(n&&c>0&&0===h),i=p.col+1,s=i>=t,r=this.tableApi.createCellCoords(p.row-e,s?i-t:i);if(this.runLocalHooks("beforeColumnWrap",o,uu(this,xu,Nu).call(this,r),s),o.value)this.runLocalHooks("insertRowRequire",this.countRenderableRows());else if(g){if(this.shouldSwitchSelectionLayer()&&s&&hu(this,pu).size()>1){uu(this,wu,Mu).call(this);const t=uu(this,yu,Iu).call(this,"forward");null!==t&&r.assign(t)}p.assign(r)}}else if(p.row<0){const n=At(g),o=p.col-1,i=o<0,s=this.tableApi.createCellCoords(e+p.row,i?t+o:o);if(this.runLocalHooks("beforeColumnWrap",n,uu(this,xu,Nu).call(this,s),i),g){if(this.shouldSwitchSelectionLayer()&&i&&hu(this,pu).size()>1){uu(this,bu,Tu).call(this);const t=uu(this,yu,Iu).call(this,"backward");null!==t&&s.assign(t)}p.assign(s)}}if(({width:t,height:e}=uu(this,Cu,Hu).call(this)),p.col>=t){const o=At(n&&d>0),i=p.row+1,s=i>=e,r=this.tableApi.createCellCoords(s?i-e:i,p.col-t);if(this.runLocalHooks("beforeRowWrap",o,uu(this,xu,Nu).call(this,r),s),o.value)this.runLocalHooks("insertColRequire",this.countRenderableColumns());else if(u){if(this.shouldSwitchSelectionLayer()&&s&&hu(this,pu).size()>1){uu(this,wu,Mu).call(this);const t=uu(this,yu,Iu).call(this,"forward");null!==t&&r.assign(t)}p.assign(r)}}else if(p.col<0){const n=At(u),o=p.row-1,i=o<0,s=this.tableApi.createCellCoords(i?e+o:o,t+p.col);if(this.runLocalHooks("beforeRowWrap",n,uu(this,xu,Nu).call(this,s),i),u){if(this.shouldSwitchSelectionLayer()&&i&&hu(this,pu).size()>1){uu(this,bu,Tu).call(this);const t=uu(this,yu,Iu).call(this,"backward");null!==t&&s.assign(t)}p.assign(s)}}const{rowDir:f,colDir:m}=uu(this,vu,_u).call(this,p);r=f,a=m,i=uu(this,xu,Nu).call(this,p)}return this.runLocalHooks("afterTransformStart",i,r,a),{selectionLayer:hu(this,fu),visualCoords:i}}transformEnd(t,e){du(this,mu,this.calculateOffset());const n=this.tableApi.createCellCoords(t,e),o=this.getCurrentSelection(),i=this.tableApi.visualToRenderableCoords(o.highlight),s=uu(this,Su,Au).call(this,o.to.row,o.from.row),r=uu(this,ku,Ou).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!==s&&null!==r){const{row:t,col:e}=uu(this,Ru,Du).call(this,o.highlight),i=this.tableApi.createCellCoords(s+n.row,r+n.col),c=o.getTopStartCorner(),d=o.getTopEndCorner(),u=o.getBottomEndCorner();if(n.col<0&&r>=e&&i.col<e){const t=i.col-e;i.col=uu(this,ku,Ou).call(this,c.col,d.col)+t}else if(n.col>0&&r<=e&&i.col>e){const t=uu(this,ku,Ou).call(this,d.col,c.col),e=Math.max(i.col-t,1);i.col=t+e}if(n.row<0&&s>=t&&i.row<t){const e=i.row-t;i.row=uu(this,Su,Au).call(this,c.row,u.row)+e}else if(n.row>0&&s<=t&&i.row>t){const t=uu(this,Su,Au).call(this,u.row,c.row),e=Math.max(i.row-t,1);i.row=t+e}const{rowDir:g,colDir:p}=uu(this,vu,_u).call(this,i);l=g,h=p;const f=uu(this,xu,Nu).call(this,i);0===n.row&&0!==n.col?a.col=f.col:0!==n.row&&0===n.col?a.row=f.row:(a.row=f.row,a.col=f.col)}return this.runLocalHooks("afterTransformEnd",a,l,h),{selectionLayer:hu(this,fu),visualCoords:a}}calculateOffset(){bt("`calculateOffset` is not implemented")}countRenderableRows(){bt("`countRenderableRows` is not implemented")}countRenderableColumns(){bt("`countRenderableColumns` is not implemented")}shouldSwitchSelectionLayer(){bt("`shouldSwitchSelectionLayer` is not implemented")}constructor(t,e){gu(this,wu),gu(this,bu),gu(this,vu),gu(this,Cu),gu(this,yu),gu(this,Su),gu(this,ku),gu(this,Ru),gu(this,xu),cu(this,pu,{writable:!0,value:void 0}),cu(this,fu,{writable:!0,value:void 0}),cu(this,mu,{writable:!0,value:void 0}),du(this,fu,0),du(this,mu,{x:0,y:0}),du(this,pu,t),this.tableApi=e}}function Mu(){const t=hu(this,fu)+1;this.setActiveLayerIndex(t>=hu(this,pu).size()?0:t),du(this,mu,this.calculateOffset())}function Tu(){const t=hu(this,fu)-1;this.setActiveLayerIndex(t<0?hu(this,pu).size()-1:t),du(this,mu,this.calculateOffset())}function _u(t){const{width:e,height:n}=uu(this,Cu,Hu).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 Hu(){return{width:hu(this,mu).x+this.countRenderableColumns(),height:hu(this,mu).y+this.countRenderableRows()}}function Iu(t){if(!["forward","backward"].includes(t))return null;const e=this.getCurrentSelection().getTopStartCorner(),n=this.getCurrentSelection().getBottomEndCorner(),[o,i,s,r]="forward"===t?[e.row,n.row,e.col,n.col]:[n.row,e.row,n.col,e.col],a=uu(this,Su,Au).call(this,o,i),l=uu(this,ku,Ou).call(this,s,r);return null===a||null===l?null:this.tableApi.createCellCoords(a,l)}function Au(t,e){const n=this.tableApi.findFirstNonHiddenRenderableRow(t,e);return null===n?null:hu(this,mu).y+n}function Ou(t,e){const n=this.tableApi.findFirstNonHiddenRenderableColumn(t,e);return null===n?null:hu(this,mu).x+n}function Du(t){const{row:e,col:n}=this.tableApi.visualToRenderableCoords(t);return null!==e&&null!==n||bt("Renderable coords are not visible."),this.tableApi.createCellCoords(hu(this,mu).y+e,hu(this,mu).x+n)}function Nu(t){const e=t.clone();return e.col=t.col-hu(this,mu).x,e.row=t.row-hu(this,mu).y,this.tableApi.renderableToVisualCoords(e)}Rt(Eu,Fs);class Pu extends Eu{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 Wu extends Eu{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),s=t.highlight.isHeader(),r=s?Math.abs(n):0,a=s?Math.abs(e):0;return{x:n<0?r:-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(){bt("`transformEnd` is not valid for focus selection use `transformStart` instead")}shouldSwitchSelectionLayer(){return!0}}const Lu=[3,2],Bu=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],Vu=Symbol("root"),Fu=Symbol("child");function zu(t,e=Vu){e!==Vu&&e!==Fu&&bt("The second argument is used internally only and cannot be overwritten.");const n=Array.isArray(t),o=e===Vu;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=zu(e,Fu);else if(t.length>=2&&t.length<=4){const e=!t.some((t,e)=>!Bu[e].includes(typeof t));e&&(i=2)}}return i}function $u(t,{createCellCoords:e,createCellRange:n,keepDirection:o=!1,propToCol:i}={}){return Lu.includes(t)||bt("Unsupported selection ranges schema type was provided."),function(s){const r=3===t;let a=r?s.from.row:s[0],l=r?s.from.col:s[1],h=r?s.to.row:s[2],c=r?s.to.col:s[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=r?s.highlight.clone():e(a,l),u=e(a,l),g=e(h,c);return n(d,u,g)}}function Uu(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function ju(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Uu(t,e,"get"))}function Yu(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 Gu(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Uu(t,e,"set"),n),n}var qu=new WeakMap,Ku=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,Qu=new WeakMap,Ju=new WeakMap,tg=new WeakMap;class eg{updateHighlightClassNames(){this.highlight.updateHighlightClassNames({rowClassName:this.settings.currentRowClassName,columnClassName:this.settings.currentColClassName,headerClassName:this.settings.currentHeaderClassName,activeHeaderClassName:this.settings.activeHeaderClassName})}getSelectedRange(){return this.selectedRange}getActiveSelectedRange(){return this.selectedRange.peekByIndex(ju(this,tg))}getActiveSelectionLayerIndex(){return ju(this,tg)}setActiveSelectionLayerIndex(t){Gu(this,tg,t)}markSource(t){Gu(this,Qu,t)}markEndSource(){Gu(this,Qu,"unknown")}getSelectionSource(){return ju(this,Qu)}setExpectedLayers(t){Gu(this,Ju,t)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,Gu(this,Ju,-1)}isInProgress(){return this.inProgress}setRangeStart(t,e,n=!1,o=t){const i="multiple"===this.settings.selectionMode,s=A(e)?this.tableProps.getShortcutManager().isCtrlPressed():e,r=t.clone();Gu(this,Zu,!1),Gu(this,Xu,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),r),(!i||i&&!s&&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(r).current().setHighlight(o.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),n||this.setRangeEnd(t)}setRangeStartOnly(t,e,n=t){this.setRangeStart(t,e,!0,n)}setRangeEnd(t,e=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e);const n=t.clone(),o=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.getActiveSelectedRange().clone().setTo(t).isSingleHeader();if((o>0||i>0)&&(0===o&&n.col<0&&!s||0===i&&n.row<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",n),this.begin();const r=this.getActiveSelectedRange();if(this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode)r.setFrom(r.highlight),r.setTo(r.highlight);else{const t=r.getHorizontalDirection(),e=r.getVerticalDirection(),o=this.isMultiple();r.setTo(n),o&&(t!==r.getHorizontalDirection()||1===r.getWidth()&&!r.includes(r.highlight))&&r.from.assign({col:r.highlight.col}),o&&(e!==r.getVerticalDirection()||1===r.getHeight()&&!r.includes(r.highlight))&&r.from.assign({row:r.highlight.row})}o>0&&i>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.getActiveSelectedRange().highlight,e),this.applyAndCommit(this.getActiveSelectedRange(),e);const a=-1===ju(this,Ju)||this.selectedRange.size()===ju(this,Ju);this.runLocalHooks("afterSetRangeEnd",t,a)}applyAndCommit(t=this.getActiveSelectedRange(),e=this.getLayerLevel()){const n=this.tableProps.countRows(),o=this.tableProps.countCols();this.highlight.useLayerLevel(e);const i=this.highlight.createArea(),s=this.highlight.createLayeredArea(),r=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(),s.clear(),r.clear(),a.clear(),l.clear(),h.clear(),c.clear(),d.clear(),u.clear(),this.highlight.isEnabledFor(js,t.highlight)&&(this.isMultiple()||e>=1)&&(i.add(t.from).add(t.to).commit(),s.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(Us,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?(r.add(e).commit(),a.add(o).commit(),d.add(e).commit(),u.add(o).commit()):(r.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=!ju(this,Zu)&&this.isEntireRowSelected()&&(o>0&&o===t.getWidth()||0===o&&this.isSelectedByRowHeader()),i=!ju(this,Zu)&&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,e=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e),ju(this,qu).setActiveLayerIndex(e),ju(this,Ku).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(Ys,n.highlight)&&o.add(n.highlight).commit().syncWith(n),this.inProgress||(Gu(this,Xu,!0),this.runLocalHooks("afterSetFocus",n.highlight))}transformStart(t,e,n=!1){if(!this.isSelected())return;const{visualCoords:o}=ju(this,qu).transformStart(t,e,n);this.setRangeStart(o)}transformEnd(t,e){if(!this.isSelected())return;const{visualCoords:n,selectionLayer:o}=ju(this,qu).transformEnd(t,e);this.setRangeEnd(n,o)}transformFocus(t,e){if(!this.isSelected())return;const{selectionLayer:n,visualCoords:o}=ju(this,Ku).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:s}=n,r=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,r-1),o.col),u=this.tableProps.createCellCoords(co(i.row+e,h,r-1),i.col);this.markSource("shift"),s.row>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(co(s.row+e,0,r-1),s.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:s}=n,r=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,r-1)),u=this.tableProps.createCellCoords(i.row,co(i.col+e,h,r-1));this.markSource("shift"),s.col>=t?this.setRangeStartOnly(d,!0,this.tableProps.createCellCoords(s.row,co(s.col+e,0,r-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(t=this.getActiveSelectedRange()){if(!this.isSelected())return!1;const e=At(!t.isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&ju(this,Xu)}isSelectedByRowHeader(t=this.getLayerLevel()){return!this.isSelectedByCorner(t)&&(-1===t?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(t))}isEntireRowSelected(t=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(t=this.getLayerLevel()){return!this.isSelectedByCorner()&&(-1===t?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(t))}isEntireColumnSelected(t=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(t=!1,e=!1,n={focusPosition:!1,disableHeadersHighlight:!1}){const o=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),r=this.tableProps.countColHeaders(),a=e?-r:0,l=t?-s:0;if(0===a&&0===l&&(0===o||0===i))return;let h=this.getActiveSelectedRange()?.highlight;const{focusPosition:c,disableHeadersHighlight:d}=n;c&&Number.isInteger(c?.row)&&Number.isInteger(c?.col)&&(h=this.tableProps.createCellCoords(co(c.row,a,o-1),co(c.col,l,i-1)));const u=this.tableProps.createCellCoords(a,l),g=this.tableProps.createCellCoords(o-1,i-1);this.clear(),this.runLocalHooks("beforeSelectAll",u,g,h),this.setRangeStartOnly(u,void 0,h),Gu(this,Zu,d),l<0&&this.selectedByRowHeader.add(this.getLayerLevel()),a<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.runLocalHooks("afterSelectAll",u,g,h),this.finish()}selectCells(t){const e=zu(t);if(1===e)return!1;0===e&&bt(T`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
|
30
|
+
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
|
|
31
|
+
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const n=$u(e,{createCellCoords:(...t)=>this.tableProps.createCellCoords(...t),createCellRange:(...t)=>this.tableProps.createCellRange(...t),propToCol:t=>this.tableProps.propToCol(t),keepDirection:!0}),o=this.settings.navigableHeaders,i={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:o?this.tableProps.countRowHeaders():0,countColHeaders:o?this.tableProps.countColHeaders():0},s=!t.some(t=>{const e=n(t),o=e.isValid(i);return!(o&&!e.containsHeaders()||o&&e.containsHeaders()&&e.isSingleHeader())});return s&&(this.clear(),this.setExpectedLayers(t.length),x(t,t=>{const{from:e,to:o}=n(t);this.setRangeStartOnly(e.clone(),!1),this.setRangeEnd(o.clone())}),this.finish()),s}selectColumns(t,e=t,n=0){const o="string"==typeof t?this.tableProps.propToCol(t):t,i="string"==typeof e?this.tableProps.propToCol(e):e,s=this.tableProps.countRows(),r=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,h=this.tableProps.createCellCoords(l,o),c=this.tableProps.createCellCoords(s-1,i),d=this.tableProps.createCellRange(h,h,c).isValid({countRows:s,countCols:r,countRowHeaders:0,countColHeaders:a});if(d){let t=0,e=0;Number.isInteger(n?.row)&&Number.isInteger(n?.col)?(t=co(n.row,l,s-1),e=co(n.col,Math.min(o,i),Math.max(o,i))):(t=co(n,l,s-1),e=o);const r=this.tableProps.createCellCoords(t,e),h=0===a?0:co(r.row,l,-1),c=s-1,d=this.tableProps.createCellCoords(h,o),u=this.tableProps.createCellCoords(c,i);this.runLocalHooks("beforeSelectColumns",d,u,r),this.setRangeStartOnly(d,void 0,r),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectColumns",d,u,r),this.finish()}return d}selectRows(t,e=t,n=0){const o=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),r=0===s?0:-s,a=this.tableProps.createCellCoords(t,r),l=this.tableProps.createCellCoords(e,i-1),h=this.tableProps.createCellRange(a,a,l).isValid({countRows:o,countCols:i,countRowHeaders:s,countColHeaders:0});if(h){let o=0,a=0;Number.isInteger(n?.row)&&Number.isInteger(n?.col)?(o=co(n.row,Math.min(t,e),Math.max(t,e)),a=co(n.col,r,i-1)):(o=t,a=co(n,r,i-1));const l=this.tableProps.createCellCoords(o,a),h=0===s?0:co(l.col,r,-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({ranges:t,activeRange:e,activeSelectionLayer:n,selectedByRowHeader:o,selectedByColumnHeader:i,disableHeadersHighlight:s}){0!==t.length&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,Gu(this,Zu,s),this.selectedByRowHeader=new Set(o),this.selectedByColumnHeader=new Set(i),this.setActiveSelectionLayerIndex(0),t.forEach((t,e)=>{this.selectedRange.push(t),this.applyAndCommit(t,e)}),this.setRangeFocus(e.highlight,n),Gu(this,Zu,!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:ju(this,Zu)}}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:s}=n,r=t-1,a=e-1;s.assign({row:co(s.row,this.settings.navigableHeaders?-1/0:0,r),col:co(s.col,this.settings.navigableHeaders?-1/0:0,a)}),o.assign({row:co(o.row,-1/0,r),col:co(o.col,-1/0,a)}),i.assign({row:co(i.row,-1/0,r),col:co(i.col,-1/0,a)}),this.setRangeStartOnly(o,!0,s),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(Ys,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(),s=this.highlight.createActiveRowHeader(),r=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();e.commit(),n.commit(),o.commit(),i.commit(),s.commit(),r.commit(),a.commit(),l.commit(),h.commit()}this.highlight.useLayerLevel(t)}constructor(t,e){Yu(this,qu,{writable:!0,value:void 0}),Yu(this,Ku,{writable:!0,value:void 0}),Yu(this,Xu,{writable:!0,value:void 0}),Yu(this,Zu,{writable:!0,value:void 0}),Yu(this,Qu,{writable:!0,value:void 0}),Yu(this,Ju,{writable:!0,value:void 0}),Yu(this,tg,{writable:!0,value:void 0}),this.inProgress=!1,this.selectedRange=new ru((t,e,n)=>this.tableProps.createCellRange(t,e,n)),this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,Gu(this,Xu,!1),Gu(this,Zu,!1),Gu(this,Qu,"unknown"),Gu(this,Ju,-1),Gu(this,tg,0),this.settings=t,this.tableProps=e,this.highlight=new iu({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:(...t)=>this.isCellCornerVisible(...t),areaCornerVisible:(...t)=>this.isAreaCornerVisible(...t),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)}),Gu(this,qu,new Pu(this.selectedRange,{...this.tableProps,navigableHeaders:()=>t.navigableHeaders,fixedRowsBottom:()=>t.fixedRowsBottom,minSpareRows:()=>t.minSpareRows,minSpareCols:()=>t.minSpareCols,autoWrapRow:()=>t.autoWrapRow,autoWrapCol:()=>t.autoWrapCol})),Gu(this,Ku,new Wu(this.selectedRange,{...this.tableProps,navigableHeaders:()=>t.navigableHeaders,fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),ju(this,qu).addLocalHook("beforeTransformStart",(...t)=>this.runLocalHooks("beforeModifyTransformStart",...t)),ju(this,qu).addLocalHook("afterTransformStart",(...t)=>this.runLocalHooks("afterModifyTransformStart",...t)),ju(this,qu).addLocalHook("beforeTransformEnd",(...t)=>this.runLocalHooks("beforeModifyTransformEnd",...t)),ju(this,qu).addLocalHook("afterTransformEnd",(...t)=>this.runLocalHooks("afterModifyTransformEnd",...t)),ju(this,qu).addLocalHook("insertRowRequire",(...t)=>this.runLocalHooks("insertRowRequire",...t)),ju(this,qu).addLocalHook("insertColRequire",(...t)=>this.runLocalHooks("insertColRequire",...t)),ju(this,qu).addLocalHook("beforeRowWrap",(...t)=>this.runLocalHooks("beforeRowWrap",...t)),ju(this,qu).addLocalHook("beforeColumnWrap",(...t)=>this.runLocalHooks("beforeColumnWrap",...t)),ju(this,Ku).addLocalHook("beforeTransformStart",(...t)=>this.runLocalHooks("beforeModifyTransformFocus",...t)),ju(this,Ku).addLocalHook("afterTransformStart",(...t)=>this.runLocalHooks("afterModifyTransformFocus",...t))}}Rt(eg,Fs);const ng=/^(\r\n|\n\r|\r|\n)/,og=/^[^\t\r\n]+/,ig=/^\t/;function sg(t){let e,n,o,i,s,r="";for(e=0,n=t.length;e<n;e+=1){for(i=t[e].length,o=0;o<i;o+=1)o>0&&(r+="\t"),s=t[e][o],"string"==typeof s?s.indexOf("\n")>-1?r+=`"${s.replace(/"/g,'""')}"`:r+=s:r+=null==s?"":s;e!==n-1&&(r+="\n")}return r}function rg(t,e){const{instance:n,visualRow:o,visualCol:i,valueSetter:s}=e;return Ze(s)?s.call(n,t,o,i,e):t}function ag(t,e){const{instance:n,visualRow:o,visualCol:i,valueGetter:s}=e;return Ze(s)?s.call(n,t,o,i,e):t}class lg{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}createMap(){const t=this.getSchema();void 0===t&&bt("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,s=!1;if("function"==typeof e){const e=It(t);o=e>0?e:this.countFirstRowKeys(),s=!0}else{const t=this.tableMeta.maxCols;o=Math.min(t,e.length)}for(n=0;n<o;n++){const t=s?e(n):e[n];if(Et(t)){if(void 0!==t.data){const e=s?i:n;this.colToPropCache[e]=t.data,this.propToColCache.set(t.data,e)}i+=1}}}else this.recursiveDuckColumns(t)}countFirstRowKeys(){return kl(this.dataSource)}recursiveDuckColumns(t,e,n){let o,i=e,s=n;return void 0===i&&(i=0,s=""),"object"!=typeof t||Array.isArray(t)||Tt(t,(t,e)=>{null===t?(o=s+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,e=1,{source:n,mode:o="above"}={}){const i=this.hot.countSourceRows();let s=i,r=0,a=t;("number"!=typeof a||a>=i)&&(a=i),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a));if(!1===this.hot.runHooks("beforeCreateRow",a,e,n)||null===s)return{delta:0};const l=this.tableMeta.maxRows,h=this.getSchema().length,c=[];for(;r<e&&i+r<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+r):(t={},yt(t,this.getSchema())),c.push(t),r+=1}this.hot.rowIndexMapper.insertIndexes(a,r),"below"===o&&(s=Math.min(s+1,i)),this.spliceData(s,0,c);const d=this.hot.toVisualRow(s);return this.hot.countSourceRows()===c.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),r>0&&(null==t?this.metaManager.createRow(null,r):"auto"!==n&&this.metaManager.createRow(s,e)),this.hot.runHooks("afterCreateRow",d,r,n),{delta:r,startPhysicalIndex:s}}createCol(t,e=1,{source:n,mode:o="start"}={}){this.hot.isColumnModificationAllowed()||bt("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,s=this.tableMeta.maxCols,r=this.hot.countSourceCols(),a=this.hot.countCols(),l=this.hot.countSourceRows(),h="number"==typeof t&&t<=r?t:a;if(!1===this.hot.runHooks("beforeCreateCol",h,e,n))return{delta:0};const c=h<a?this.hot.toPhysicalColumn(h):r,d="end"===o?Math.min(c+1,r):c;let u=0;for(let t=d;u<e&&a+u<s;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,e=1,n){let o=Number.isInteger(t)?t:-e;const i=this.visualRowsToPhysical(o,e),s=this.hot.countSourceRows();o=(s+o)%s;if(!1===this.hot.runHooks("beforeRemoveRow",o,i.length,i,n))return!1;const r=i.length;if(this.filterData(o,r,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,r,i,n),!0}removeCol(t,e=1,n){("object"===this.hot.dataType||this.tableMeta.columns)&&bt("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),s=i.slice(0).sort((t,e)=>e-t);if(!1===this.hot.runHooks("beforeRemoveCol",o,e,i,n))return!1;let r=!0;const a=s.length,l=this.dataSource;for(let t=0;t<a;t++)r&&i[0]!==i[t]-t&&(r=!1);if(r)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(s[e],1),0===t&&this.metaManager.removeColumn(s[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,...o){const i=this.hot.getDataAtCol(t),s=i.slice(e,e+n);C(o,i.slice(e+n));let r=0;for(;r<n;)o.push(null),r+=1;return function(t){const e=t.length;let n=0;for(;n<e;)t[n]=[t[n]],n+=1}(o),this.hot.populateFromArray(e,t,o,null,null,"spliceCol"),s}spliceRow(t,e,n,...o){const i=this.hot.getSourceDataAtRow(t),s=i.slice(e,e+n);C(o,i.slice(e+n));let r=0;for(;r<n;)o.push(null),r+=1;return this.hot.populateFromArray(t,e,[o],null,null,"spliceRow"),s}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:s}=this.hot.getSettings();let r=null;if(o&&o.hasOwnProperty&&Ot(o,e))r=o[e];else if(s&&"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;r=t}else"function"==typeof e&&(r=e(this.dataSource.slice(n,n+1)[0]));const a=this.propToCol(e),l=this.hot.toPhysicalColumn(a);if(uo(n)&&uo(l)&&(r=ag(r,this.metaManager.getCellMeta(n,l,{visualRow:t,visualColumn:a,skipMetaExtension:!0}))),this.hot.hasHook("modifyData")){const e=At(r);this.hot.runHooks("modifyData",t,a,e,"get"),e.isTouched()&&(r=e.value)}return r}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,s=this.dataSource[o];const r=this.hot.runHooks("modifyRowData",o);if(s=isNaN(r)?r:s,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(s&&s.hasOwnProperty&&Ot(s,e))s[e]=i;else if(a&&"string"==typeof e&&e.indexOf(".")>-1){let t,n=s,o=0;const r=e.split(".");for(o=0,t=r.length-1;o<t;o++){if("__proto__"===r[o]||"constructor"===r[o]||"prototype"===r[o])return;void 0===n[r[o]]&&(n[r[o]]={}),n=n[r[o]]}n[r[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;s[e]=i}}visualRowsToPhysical(t,e){const n=this.hot.countSourceRows(),o=[];let i,s=(n+t)%n,r=e;for(;s<n&&r;)i=this.hot.toPhysicalRow(s),o.push(i),r-=1,s+=1;return o}visualColumnsToPhysical(t,e){const n=this.hot.countCols(),o=[];let i=(n+t)%n,s=e;for(;i<n&&s;){const t=this.hot.toPhysicalColumn(i);o.push(t),s-=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,lg.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(t,e,n){const o=[];let i,s,r;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const h=n===lg.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++){r=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(t.col,e.col);s<=d&&null!==n;s++)r.push(h.call(this,i,this.colToProp(s)));null!==n&&o.push(r)}return o}getText(t,e){return sg(this.getRange(t,e,lg.DESTINATION_RENDERER))}getCopyableText(t,e){return sg(this.getRange(t,e,lg.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}constructor(t,e,n){this.hot=t,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=e,this.refreshDuckSchema(),this.createMap()}}class hg{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(t=!1){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,o=!1){const i=void 0===e&&void 0===n,{dataDotNotation:s}=this.hot.getSettings();let r=null,a=null;if(r=this.modifyRowData(t),Array.isArray(r))a=[],i?r.forEach((e,n)=>{a[n]=this.getAtPhysicalCell(t,n,r)}):ao(e,n,n=>{a[n-e]=this.getAtPhysicalCell(t,n,r)});else if(Et(r)||Ze(r))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,r);o?a.push(e):s?Ht(a,c,e):a[c]=e}})}else Tt(r,(e,n)=>{const o=this.getAtPhysicalCell(t,n,r);s?Ht(a,n,o):a[n]=o});return a}setAtCell(t,e,n){if(t>=this.countRows()||e>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){const o=At(n);this.hot.runHooks("modifySourceData",t,e,o,"set"),o.isTouched()&&(n=o.value)}if(["__proto__","constructor","prototype"].includes(t))return;const o=this.modifyRowData(t);Number.isInteger(e)?o[e]=n:Ht(o,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(t=null,e=null,n=!1){let o=!1,i=null,s=null,r=null,a=null;null===t||null===e?(o=!0,i=0,r=this.countRows()-1):(i=Math.min(t.row,e.row),s=Math.min(t.col,e.col),r=Math.max(t.row,e.row),a=Math.max(t.col,e.col));const l=[];return ao(i,r,t=>{l.push(o?this.getAtRow(t,void 0,void 0,n):this.getAtRow(t,s,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 kl(this.data)}destroy(){this.data=null,this.hot=null}constructor(t,e=[]){this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{},this.hot=t,this.data=e}}const{register:cg,getItem:dg,hasItem:ug,getNames:gg,getValues:pg}=Hn("cellTypes");function fg(t,e){"string"!=typeof t&&(t=(e=t).CELL_TYPE);const{editor:n,renderer:o,validator:i}=e;n&&Vn(t,n),o&&Oo(t,o),i&&Bo(t,i),cg(t,e)}function mg(t,e,n=t){const o="string"==typeof e.type?(i=e.type,ug(i)||bt(`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`),dg(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 s={};Tt(o,(e,o)=>{(function(t,e){return"CELL_TYPE"!==t&&(e._automaticallyAssignedMetaProps?.has(t)||!Ot(e,t))})(o,n)&&(s[o]=e,t._automaticallyAssignedMetaProps?.add(o))}),Ct(t,s)}function wg(t,e){t()||bt(`Assertion failed: ${e}`)}function bg(t){return null==t}var vg=()=>({_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,dataProvider: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},exportFile:void 0,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;const i=!!this.getSettings().dataSchema,s=this.getSchema(),r=this.colToProp(t);for(e=0,n=this.countRows();e<n;e++)if(o=this.getDataAtCell(e,t),!1===O(o)){if("object"==typeof o){if(!1===xt(s[r],o))return!1;continue}if(i&&s[r]===o)continue;return!1}return!0},isEmptyRow(t){let e,n,o;const i=!!this.getSettings().dataSchema,s=this.getSchema();for(e=0,n=this.countCols();e<n;e++)if(o=this.getDataAtCell(t,e),!1===O(o)){const t=this.colToProp(e);if("object"==typeof o){if(!1===xt(s[t],o))return!1;continue}if(i&&s[t]===o)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",loading:!1,notification:!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});class Cg{getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(t){Ct(this.meta,t),mg(this.meta,{...t,type:t.type??this.meta.type},t)}constructor(t){this.metaCtor=class{},this.meta=this.metaCtor.prototype,Ct(this.meta,vg()),this.meta.instance=t}}class yg{getMeta(){return this.meta}updateMeta(t){Ct(this.meta,t),mg(this.meta,t,t)}constructor(t){const e=t.getMetaConstructor();this.meta=new e}}class Sg{obtain(t){wg(()=>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,e=1){wg(()=>uo(t)||bg(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=bg(t)?this.index.length:t;this.index=[...this.index.slice(0,i),...n,...this.index.slice(i)]}remove(t,e=1){wg(()=>uo(t)||bg(t),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice(bg(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()}constructor(t){this.data=[],this.index=[],this.holes=new Set,this.valueFactory=t}}const kg=["data","width"];class Rg{updateMeta(t,e){const n=this.getMeta(t);Ct(n,e),mg(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,e=[]){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(),kg).prototype}constructor(t){this.metas=new Sg(()=>this._createMeta()),this.globalMeta=t,this.metas=new Sg(()=>this._createMeta())}}class xg{updateMeta(t,e,n){const o=this.getMeta(t,e);Ct(o,n),mg(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){const i=this.metas.obtain(t).obtain(e);i._automaticallyAssignedMetaProps?.delete(n),i[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){wg(()=>uo(t),"Expecting an unsigned number.");const e=new Map(this.metas);return e.has(t)?Array.from(e.get(t)).sort(([t],[e])=>t-e).map(([,t])=>t):[]}clearCache(){this.metas.clear()}_createRow(){return new Sg(t=>this._createMeta(t))}_createMeta(t){return new(this.columnMeta.getMetaConstructor(t))}constructor(t){this.metas=new Sg(()=>this._createRow()),this.columnMeta=t}}class Eg{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&&bt("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,e=1){this.cellMeta.createRow(t,e)}removeRow(t,e=1){this.cellMeta.removeRow(t,e)}createColumn(t,e=1){this.cellMeta.createColumn(t,e),this.columnMeta.createColumn(t,e)}removeColumn(t,e=1){this.cellMeta.removeColumn(t,e),this.columnMeta.removeColumn(t,e)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}constructor(t,e={},n=[]){this.hot=t,this.globalMeta=new Cg(t),this.tableMeta=new yg(this.globalMeta),this.columnMeta=new Rg(this.globalMeta),this.cellMeta=new xg(this.columnMeta),n.forEach(t=>new t(this)),this.globalMeta.updateMeta(e)}}function Mg(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),r=t.toVisualColumn(n);if(null===o||null===r)continue;const a=t.getCellMeta(o,r),{sourceDataWarningMessage:l,sourceDataValidator:h,allowInvalid:c}=a;if(!Ze(h))continue;const d=t._getDataSource(),u=d.getAtCell(s,n,null);if(!0!==h(u,a,e)&&(!1===c&&d.setAtCell(s,n,null),l)){const t=l,e=i.get(t)??[];e.push({row:s,col:n,value:u,message:t}),i.set(t,e)}}i.forEach((t,e)=>{Tg(e,t)})}function Tg(t,e){!function({logFunction:t=Zt,message:e,items:n,maxSample:o=5,itemFormatter:i=t=>`${t}`}={}){if(!Array.isArray(n)||0===n.length)return;const s=n.length,r=s>o?` - ...and ${s-o} more`:"";t(q(e,{itemsCount:`${s} cell${s>1?"s":""}`,affectedCells:["Affected cells:",...n.slice(0,o).map(t=>` - ${i(t)}`),...r?[r]:[]].join("\n")}))}({logFunction:Qt,message:t,items:e,itemFormatter:({row:t,col:e,value:n})=>{const o=H(n);return`row ${t}, col ${e}, value: "${o.length>64?`${o.slice(0,64)}...`:o}"`}})}function _g(t,e,n,o){const{hotInstance:i,dataMap:s,dataSource:r,internalSource:a,source:l,metaManager:h,firstRun:c}=o,d=U(a),u=i.getSettings();Array.isArray(u.dataSchema)?i.dataType="array":Ze(u.dataSchema)?i.dataType="function":i.dataType="object",s&&s.destroy(),t=i.runHooks(`before${d}`,t,c,l);const g=new lg(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,s=0;for(o=0,s=u.startRows;o<s;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 bt(`${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,r.data=t,r.dataType=i.dataType,r.colToProp=g.colToProp.bind(g),r.propToCol=g.propToCol.bind(g),r.countCachedColumns=g.countCachedColumns.bind(g),n(g),c||Mg(i,a),i.runHooks(`after${d}`,t,c,l),c||(i.runHooks("afterChange",null,a),i.view.adjustElementsSize(),i.render()),i.getSettings().ariaTags&&pe(i.rootElement,[ct(-1),dt(i.countCols()+(i.view?i.countRowHeaders():0))])}Rt(Eg,Fs);class Hg{extendCellMeta(t){const{row:e,col:n}=t;if(this.metaSyncMemo.get(e)?.has(n))return;const{visualRow:o,visualCol:i}=t,s=this.metaManager.hot,r=s.colToProp(i);t.prop=r,s.runHooks("beforeGetCellMeta",o,i,t);const a=Ot(t,"type")?t.type:null;let l=Ze(t.cells)?t.cells(e,n,r):null;a&&(l?l.type=l.type??a:l={type:a}),l&&this.metaManager.updateCellMeta(e,n,l),s.runHooks("afterGetCellMeta",o,i,t),this.metaSyncMemo.has(e)||this.metaSyncMemo.set(e,new Set),this.metaSyncMemo.get(e).add(n)}constructor(t){this.metaSyncMemo=new Map,this.metaManager=t,t.addLocalHook("afterGetCellMeta",(...t)=>this.extendCellMeta(...t)),Mn.getSingleton().add("beforeRender",t=>{t&&this.metaSyncMemo.clear()},this.metaManager.hot)}}function Ig(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Ag(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 Og(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Ig(t,e,"set"),n),n}const Dg=new WeakSet,Ng=new WeakSet;var Pg=new WeakMap;class Wg{extendMetaProps(){this.propDescriptors.forEach((t,e)=>{const{initOnly:n,target:o,onChange:i}=t,s="string"==typeof o,r=s?o:e,a=`_${r}`;var l;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[r],i?(this.installPropWatcher(e,a,i),s&&this.installPropWatcher(o,a,i)):n&&(this.installPropWatcher(e,a,function(t,e){return e.get?e.get.call(t):e.value}(l=this,Ig(l,Pg,"get"))),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 s=!o.usageTracker.has(t);o.usageTracker.add(t),n.call(o,t,i,s),this[e]=i},enumerable:!0,configurable:!0})}constructor(t){Ag(this,Pg,{writable:!0,value:void 0}),this.usageTracker=new Set,this.propDescriptors=new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(t){this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===t&&bt("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&bt("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["correctFormat",{onChange(){Dg.has(this.metaManager.hot)||(Dg.add(this.metaManager.hot),Jt("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(){Ng.has(this.metaManager.hot)||(Ng.add(this.metaManager.hot),Jt("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}]]),Og(this,Pg,(t,e,n)=>{n||bt(`The \`${t}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=t,this.extendMetaProps()}}function Lg(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bg(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Vg(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Bg(t,e,"get"))}function Fg(t,e,n){Lg(t,e),e.set(t,n)}function zg(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Bg(t,e,"set"),n),n}function $g(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Ug(t,e){Lg(t,e),e.add(t)}var jg=new WeakMap,Yg=new WeakMap,Gg=new WeakSet,qg=new WeakSet;class Kg{toRenderable(t){const e="N-S"===t.getVerticalDirection()?1:-1,n="W-E"===t.getHorizontalDirection()?1:-1,o=$g(this,Gg,Xg).call(this,t.from,e,n);if(null===o)return null;const i=$g(this,Gg,Xg).call(this,t.to,-e,-n);if(null===i)return null;const s=t.clone();return s.from=o,s.to=i,s.includes(t.highlight)||(s.highlight=o),s}constructor({rowIndexMapper:t,columnIndexMapper:e}){Ug(this,Gg),Ug(this,qg),Fg(this,jg,{writable:!0,value:void 0}),Fg(this,Yg,{writable:!0,value:void 0}),zg(this,jg,t),zg(this,Yg,e)}}function Xg(t,e,n=e){const o=$g(this,qg,Zg).call(this,Vg(this,jg),t.row,e);if(null===o)return null;const i=$g(this,qg,Zg).call(this,Vg(this,Yg),t.col,n);return null===i?null:t.clone().assign({row:o,col:i})}function Zg(t,e,n){return e<0?e:t.getNearestNotHiddenIndex(e,n)}function Qg(t){Xe(t)&&t.scrollIntoView({block:"nearest",inline:"nearest"})}function Jg(t){const{selection:e,view:n}=t,o=t.getSelectedRangeActive(),i=e.getSelectionSource(),s=n.getFirstFullyVisibleColumn(),r=n.getLastFullyVisibleColumn(),a=o.getTopStartCorner().col,l=o.getBottomEndCorner().col,h=a<=s,c=l>=r,d=n.getFirstFullyVisibleRow(),u=n.getLastFullyVisibleRow(),g=o.getTopStartCorner().row,p=o.getBottomEndCorner().row,f=g<=d,m=p>=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:f&&m?o.highlight.row:f?g:m?p:t.row}}function tp(t){const{selection:e}=t;let n=!1,o=!1;return{resume(){o=!1},suspend(){o=!0},skipNextScrollCycle(){n=!0},scrollTo(i){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;Qg(t.getCell(n,o,!0))})}}(t):e.isSelectedByCorner()?s=()=>{}:e.isSelectedByRowHeader()?s=function(t){return e=>{const n=Jg(t).getComputedRowTarget(e);t.scrollViewportTo({row:n},()=>{const e=!!t.getSettings().rowHeaders;Qg(t.getCell(n,e?-1:0,!0))})}}(t):e.isSelectedByColumnHeader()?s=function(t){return e=>{const n=Jg(t).getComputedColumnTarget(e);t.scrollViewportTo({col:n},()=>{const e=!!t.getSettings().colHeaders;Qg(t.getCell(e?-1:0,n,!0))})}}(t):1===e.getSelectedRange().size()&&e.isMultiple()?s=function(t){return e=>{const n=Jg(t),o={row:n.getComputedRowTarget(e),col:n.getComputedColumnTarget(e)};t.scrollViewportTo(o,()=>{const{row:e,col:n}=o;Qg(t.getCell(e,n,!0))})}}(t):1!==e.getSelectedRange().size()||e.isMultiple()?e.getSelectedRange().size()>1&&(s=function(t){return e=>{const n=Jg(t),o={row:n.getComputedRowTarget(e),col:n.getComputedColumnTarget(e)};t.scrollViewportTo(o,()=>{const{row:e,col:n}=o;Qg(t.getCell(e,n,!0))})}}(t)):s=function(t){return e=>{const n=t.selection.getSelectionSource(),{row:o,col:i}=e,s=()=>{Qg(t.getCell(o,i,!0))};if(o<0&&i>=0)t.scrollViewportTo({col:i},s);else if(i<0&&o>=0)t.scrollViewportTo({row:o},s);else{if("mouse"===n&&(i===t.view.getLastPartiallyVisibleColumn()||o===t.view.getLastPartiallyVisibleRow()))return;t.scrollViewportTo({row:o,col:i},s)}}}(t),s?.(i)}}}const ep=Object.freeze({INLINE:"inline",MODAL:"modal"}),np=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function op(t,e){const n=t.rootDocument.createElement("div");return n.style.display="none",n.classList.add("htFocusCatcher"),n.dataset.htFocusSource=e,n}function ip(t,e,n={}){const o={shortcutsContextName:"grid",type:ep.INLINE,contains:t=>t===e||e.contains(t),runOnlyIf:()=>!0,enableFocusCatchers:!0,...n},i=!1===o.enableFocusCatchers?null:function(t,e){const n=op(t,np.TAB_FROM_ABOVE),o=op(t,np.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:(t=np.UNKNOWN)=>{o.onActivate?.(t)},deactivate:()=>{o.onDeactivate?.()},activateFocusCatchers:()=>{i?.activate()},deactivateFocusCatchers:()=>{i?.deactivate()},enable:()=>{e.removeAttribute("inert")},disable:()=>{e.setAttribute("inert","true")},destroy:()=>{i?.destroy()}}}function sp(t){const e=bo({errorIdExists:t=>`The "${t}" focus scope is already registered.`}),n=t.getShortcutManager();let o=null;function i(t,e=np.UNKNOWN){o!==t&&(null!==o&&s(o),o=t,o.activate(e),n.setActiveContextName(t.getShortcutsContextName()))}function s(t){r(),o===t&&(o=null,t.deactivate())}function r(){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,r){if(!n.isConnected||!ke(n))return;const a=e.getValues().filter(t=>t.runOnlyIf());let l=!1;a.forEach(e=>{!l&&e.contains(n)&&(l=!0,r!==np.UNKNOWN&&t.listen(),i(e,r))}),!l&&o&&(s(o),t.unlisten())}const l=function(t,e={}){let n=!1;function o(t){n||e.onFocus?.(t)}function i(t){e.onClick?.(t)}function s(t){"Tab"===t.key&&e.onTabKeyDown?.(t)}function r(){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",s),t.addEventListener("mousedown",r),t.addEventListener("mouseup",a),e=oe(e)}},unmount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document;t.removeEventListener("focusin",o),t.removeEventListener("click",i),t.removeEventListener("keydown",s),t.removeEventListener("mousedown",r),t.removeEventListener("mouseup",a),e=oe(e)}}}}(t.rootWindow,{onFocus:t=>{a(t.target,t.target.dataset.htFocusSource??np.UNKNOWN)},onClick:t=>{a(t.target,np.CLICK)},onTabKeyDown:()=>{r()}});return l.mount(),{getActiveScopeId:function(){return o?e.getId(o):null},registerScope:function(o,i,s={}){e.hasItem(o)&&bt(`Scope with id "${o}" already registered`);const r=ip(t,i,s);e.addItem(o,r),n.getOrCreateContext(r.getShortcutsContextName())},unregisterScope:function(t){e.hasItem(t)||bt(`Scope with id "${t}" not found`),e.getItem(t).destroy(),e.removeItem(t)},activateScope:(t,n)=>function(t,n=np.UNKNOWN){e.hasItem(t)||bt(`Scope with id "${t}" not found`);const o=n??np.UNKNOWN;i(e.getItem(t),o)}(t,n),deactivateScope:t=>function(t){e.hasItem(t)||bt(`Scope with id "${t}" not found`),s(e.getItem(t))}(t),destroy:()=>l.unmount()}}function rp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ap(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function lp(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ap(t,e,"get"))}function hp(t,e,n){rp(t,e),e.set(t,n)}function cp(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ap(t,e,"set"),n),n}function dp(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function up(t,e){rp(t,e),e.add(t)}const gp=Object.freeze({CELL:"cell",MIXED:"mixed"});var pp=new WeakMap,fp=new WeakMap,mp=new WeakMap,wp=new WeakMap,bp=new WeakMap,vp=new WeakMap,Cp=new WeakSet,yp=new WeakSet,Sp=new WeakSet,kp=new WeakSet,Rp=new WeakSet,xp=new WeakSet;class Ep{init(){const t=lp(this,pp).getSettings();cp(this,fp,t.imeFastEdit?gp.MIXED:gp.CELL),lp(this,pp).addHook("afterUpdateSettings",(...t)=>dp(this,xp,Ap).call(this,...t)),lp(this,pp).addHook("afterSelection",(...t)=>dp(this,kp,Hp).call(this,...t)),lp(this,pp).addHook("afterSelectionFocusSet",(...t)=>dp(this,kp,Hp).call(this,...t)),lp(this,pp).addHook("afterSelectionEnd",(...t)=>dp(this,Sp,_p).call(this,...t)),lp(this,pp).addHook("afterRender",(...t)=>dp(this,Rp,Ip).call(this,...t))}getFocusMode(){return lp(this,fp)}setFocusMode(t){Object.values(gp).includes(t)?cp(this,fp,t):Qt(`"${t}" is not a valid focus mode.`)}getRefocusDelay(){return lp(this,mp)}setRefocusDelay(t){cp(this,mp,t)}setRefocusElementGetter(t){cp(this,wp,t)}getRefocusElement(){return"function"==typeof lp(this,wp)?lp(this,wp).call(this):lp(this,pp).getActiveEditor()?.TEXTAREA}focusElement(t,e){return!(!Xe(t)||!t.isConnected)&&(t.focus(e),!0)}focusOnHighlightedCell(t){const e=t=>{const e=lp(this,pp).getSelectedRangeActive()?.highlight;if(!e)return;let n=lp(this,pp).runHooks("modifyFocusedElement",e.row,e.col,t);Xe(n)||(n=t),n&&!lp(this,pp).getActiveEditor()?.isOpened()&&this.focusElement(n,{preventScroll:!0})};t?e(t):dp(this,Cp,Mp).call(this,t=>e(t))}refocusToEditorTextarea(t=lp(this,mp)){lp(this,pp).getSettings().imeFastEdit&&!lp(this,pp).getActiveEditor()?.isOpened()&&(lp(this,pp).getActiveEditor()?.refreshValue?.(),lp(this,bp).has(t)||lp(this,bp).set(t,Qe(()=>{lp(this,pp).isDestroyed||this.getRefocusElement()?.select()},t)),lp(this,bp).get(t)())}constructor(t){up(this,Cp),up(this,yp),up(this,Sp),up(this,kp),up(this,Rp),up(this,xp),hp(this,pp,{writable:!0,value:void 0}),hp(this,fp,{writable:!0,value:void 0}),hp(this,mp,{writable:!0,value:void 0}),hp(this,wp,{writable:!0,value:void 0}),hp(this,bp,{writable:!0,value:void 0}),hp(this,vp,{writable:!0,value:void 0}),cp(this,mp,1),cp(this,wp,null),cp(this,bp,new Map),cp(this,vp,!1),cp(this,pp,t)}}function Mp(t){const e=lp(this,pp).getSelectedRangeActive()?.highlight;if(!e||!lp(this,pp).selection.isCellVisible(e))return void t(null);const n=lp(this,pp).getCell(e.row,e.col,!0);null===n?lp(this,pp).addHookOnce("afterScroll",()=>{t(lp(this,pp).getCell(e.row,e.col,!0))}):t(n)}function Tp(){dp(this,Cp,Mp).call(this,t=>{const{activeElement:e}=lp(this,pp).rootDocument;e&&Ye(e)&&e.blur(),this.focusOnHighlightedCell(t)})}function _p(){dp(this,Cp,Mp).call(this,t=>{this.getFocusMode()===gp.MIXED&&"TD"===t?.nodeName&&this.refocusToEditorTextarea()})}function Hp(){cp(this,vp,!0)}function Ip(){lp(this,vp)&&(cp(this,vp,!1),dp(this,yp,Tp).call(this))}function Ap(t){"boolean"==typeof t.imeFastEdit&&this.setFocusMode(t.imeFastEdit?gp.MIXED:gp.CELL)}function Op(t){const{rowIndexMapper:e,columnIndexMapper:n}=t,{navigableHeaders:o}=t.getSettings();let i=o&&t.countColHeaders()>0?-t.countColHeaders():0,s=o&&t.countRowHeaders()>0?-t.countRowHeaders():0;return 0===i&&(i=e.getVisualFromRenderableIndex(i)),0===s&&(s=n.getVisualFromRenderableIndex(s)),null===i||null===s?null:t._createCellCoords(i,s)}function Dp(t){const{rowIndexMapper:e,columnIndexMapper:n}=t,{navigableHeaders:o}=t.getSettings();let i=e.getRenderableIndexesLength()-1,s=n.getRenderableIndexesLength()-1;if(i<0){if(!o||0===t.countColHeaders())return null;i=-1}if(s<0){if(!o||0===t.countColHeaders())return null;s=-1}return t._createCellCoords(e.getVisualFromRenderableIndex(i)??i,n.getVisualFromRenderableIndex(s)??s)}const Np="gridDefault",Pp="grid",Wp="grid.tabNavigation",Lp="editorManager.handlingEditor",Bp={name:"editorCloseAndSave",callback(t){t._getEditorManager().closeEditorAndSaveChanges()}},Vp={_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={}}};Mt(Vp,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const Fp=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class zp{static get EDITOR_TYPE(){return"base"}_fireCallbacks(t){this._closeCallback&&(this._closeCallback(t),this._closeCallback=null)}init(){}getValue(){bt("Editor getValue() method unimplemented")}setValue(){bt("Editor setValue() method unimplemented")}open(){bt("Editor open() method unimplemented")}close(){bt("Editor close() method unimplemented")}prepare(t,e,n,o,i,s){this.TD=o,this.row=t,this.col=e,this.prop=n,this.originalValue=i,this.cellProperties=s,this.state=this.isOpened()?this.state:Fp.VIRGIN}extend(){return class extends this.constructor{}}saveValue(t,e){let n,o,i,s;if(e){const t=this.hot.getSelectedRangeActive(),e=t.getTopStartCorner(),r=t.getBottomEndCorner();n=e.row,o=e.col,i=r.row,s=r.col}else[n,o,i,s]=[this.row,this.col,null,null];const r=this.hot.runHooks("modifyGetCellCoords",n,o,!1,"meta");Array.isArray(r)&&([n,o]=r),this.hot.populateFromArray(n,o,t,i,s,"edit")}beginEditing(t,e){if(this.state!==Fp.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=Fp.EDITING,this.isInFullEditMode()){const e=ag(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!==Fp.VIRGIN){if(this.state===Fp.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=Fp.WAITING,this.saveValue([[n]],e),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",t=>{this.state=Fp.FINISHED,this.discardEditor(t)}):(this.state=Fp.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=Fp.FINISHED,this.discardEditor()}discardEditor(t){if(this.state===Fp.FINISHED)if(!1===t&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=Fp.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=Fp.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===Fp.WAITING}getEditedCellRect(){const t=this.getEditedCell();if(!t)return;const{wtOverlays:e,wtViewport:n}=this.hot.view._wt,o=this.hot.rootWindow,i=Re(t),s=Ae(t),r=Re(this.hot.rootElement),a=Ae(this.hot.rootElement),l=e.topOverlay.holder,h=e.inlineStartOverlay.holder,c=l!==o?l.scrollTop:0,d=h!==o?h.scrollLeft:0,u=o.innerWidth-r.left-a,{wtTable:g}=e.getParentOverlay(t)??this.hot.view._wt,p=g.name,f=["master","inline_start"].includes(p)?c:0,m=["master","top","bottom"].includes(p)?d:0,w=i.top===r.top?0:1;let b=i.top-r.top-w-f,v=0;v=this.hot.isRtl()?o.innerWidth-i.left-s-u-1+m:i.left-r.left-1-m,["top","top_inline_start_corner"].includes(p)&&(b+=e.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(p)&&(v+=Math.abs(e.inlineStartOverlay.getOverlayOffset()));const C=this.hot.hasColHeaders(),y=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),S=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),k=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(C&&y<=0||y===k)&&(b+=1),S<=0&&(v+=1);const R=n.rowsRenderCalculator.startPosition,x=n.columnsRenderCalculator.startPosition,E=Math.abs(e.inlineStartOverlay.getScrollPosition()),M=e.topOverlay.getScrollPosition(),T=Ve(this.hot.rootDocument);let _=t.offsetTop;if(["inline_start","master"].includes(p)&&(_+=R-M),["bottom","bottom_inline_start_corner"].includes(p)){const{wtViewport:t,wtTable:n}=e.bottomOverlay.clone;_+=t.getWorkspaceHeight()-n.getHeight()-T}let H=t.offsetLeft;this.hot.isRtl()?(H=H>=0?g.getWidth()-t.offsetLeft:Math.abs(H),H+=x-E-s):["top","master","bottom"].includes(p)&&(H+=x-E);const I=o.getComputedStyle(this.TD),A=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",O=parseInt(I[A],10)>0?0:1,D=parseInt(I.borderTopWidth,10)>0?0:1,N=Ae(t)+O,P=Oe(t)+D,W=Fe(l)?T:0,L=ze(h)?T:0,B=this.hot.view.maximumVisibleElementWidth(H)-W+O;return{top:b,start:v,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(_)-L+D,this.hot.stylesHandler.getDefaultRowHeight()),width:N,maxWidth:B}}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}constructor(t){this.state=Fp.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this._closeAfterDataChange=!0,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.hot=t,this.init()}}Rt(zp,Vp);const $p=[Bp,{name:"editorCloseAndSaveByArrowKeys",callback(t,e,n){const o=t._getEditorManager(),i=o.getActiveEditor();i.isInFullEditMode()&&i.state===Fp.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(),s=t.getSelectedRange(),r=t.getSelectedRangeActive(),{highlight:a}=r;if((s.some(t=>o.isMultiple(t))||s.length>1)&&!r.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0){const i=t.getSettings(),s="function"==typeof i.enterMoves?i.enterMoves(e):i.enterMoves;return void(n.includes("shift")?o.transformFocus(-s.row,-s.col):o.transformFocus(s.row,s.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),s=n.getNearestNotHiddenIndex(i,-1);if(null!==s){const n=t._createCellCoords(s,o.col),i=o.row-t.getFirstFullyVisibleRow(),r=Math.min(n.row-i,t.countRows()-1);e.markSource("keyboard"),e.setRangeEnd(n,t.getActiveSelectionLayerIndex()),e.markEndSource(),t.scrollViewportTo({row:r,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:s}=t.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||r){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()),r&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(a,s.col)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:s}=t.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const r=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(s.row,r)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:s}=t.getSelectedRangeActive();if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&o.isCell()){const r=parseInt(t.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(r,1),l=i.clone();l.col=o.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),e.setRangeEnd(t._createCellCoords(s.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:s}=t.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||r){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()),r&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(s.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:n}=t,{highlight:o,from:i,to:s}=t.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByColumnHeader();if(o.isCell()||r){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()),r&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(s.row,a)),e.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(t){const{selection:e,rowIndexMapper:n}=t,{highlight:o,from:i,to:s}=t.getSelectedRangeActive(),r=o.isHeader()&&e.isSelectedByRowHeader();if(o.isCell()||r){const a=n.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=o.row,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,o.clone()),r&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(a,s.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),s=n.getNearestNotHiddenIndex(i,1);if(null!==s){const n=t._createCellCoords(s,o.col),i=o.row-t.getFirstFullyVisibleRow(),r=Math.max(n.row-i,0);e.markSource("keyboard"),e.setRangeEnd(n,t.getActiveSelectionLayerIndex()),e.markEndSource(),t.scrollViewportTo({row:r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"moveCellSelectionDown",callback({selection:t}){t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},{name:"moveCellSelectionDownByViewportHeight",callback(t){const{selection:e}=t,{navigableHeaders:n}=t.getSettings(),o=n?t.countColHeaders():0,{row:i}=t.getSelectedRangeActive().highlight;let s=t.countVisibleRows()+o;s=0===s?1:s,i===t.countRows()-1?s=1:i+s>t.countRows()&&(s=t.countRows()-i-1),e.markSource("keyboard"),e.transformStart(s,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(),s=t.getSelectedRangeActive(),r="function"==typeof o.tabMoves?o.tabMoves(e):o.tabMoves;n.markSource("keyboard"),(i.some(t=>n.isMultiple(t))||i.length>1)&&!s.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?n.transformFocus(-r.row,-r.col):n.transformStart(-r.row,-r.col),n.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(t,e){const{selection:n}=t,o=t.getSettings(),i=t.getSelectedRange(),s=t.getSelectedRangeActive(),r="function"==typeof o.tabMoves?o.tabMoves(e):o.tabMoves;n.markSource("keyboard"),(i.some(t=>n.isMultiple(t))||i.length>1)&&!s.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?n.transformFocus(r.row,r.col):n.transformStart(r.row,r.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),s=n.getNearestNotHiddenIndex(t.countRows()-i-1,-1),r=o.getNearestNotHiddenIndex(t.countCols()-1,-1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(s,r)),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,s=n.getNearestNotHiddenIndex(o,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(i,s)),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),s=parseInt(t.getSettings().fixedColumnsStart,10),r=n.getNearestNotHiddenIndex(i,1),a=o.getNearestNotHiddenIndex(s,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(r,a)),e.markEndSource()}},{name:"moveCellSelectionUp",callback({selection:t}){t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},{name:"moveCellSelectionUpByViewportHight",callback(t){const{selection:e}=t,{navigableHeaders:n}=t.getSettings(),o=n?t.countColHeaders():0,{row:i}=t.getSelectedRangeActive().highlight;let s=t.countVisibleRows()+o;s=0===s?-1:-s,i===-o?s=-1:i+s<o&&(s=-(i+o)),e.markSource("keyboard"),e.transformStart(s,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,s=t.getLastFullyVisibleColumn()+1,r=t._createCellCoords(n,o),a=t._createCellCoords(i,s);if(!t._createCellRange(r,r,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({selection:t}){t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},{name:"selectAllCellsAndHeaders",callback({selection:t}){t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},{name:"populateSelectedCellsData",callback(t){const e=t.getSelectedRange(),{row:n,col:o}=e[e.length-1].highlight.normalize(),i=t.getDataAtCell(n,o),s=new Map;for(let r=0;r<e.length;r++)e[r].forAll((e,r)=>{if(e>=0&&r>=0&&(e!==n||r!==o)){const{readOnly:n}=t.getCellMeta(e,r);n||s.set(`${e}x${r}`,[e,r,i])}});t.setDataAtCell(Array.from(s.values()))}},{name:"tabNavigation",callback(t){const e={wrapped:!1,flipped:!1};let n=!1,o=!1;return t.addHook("afterSelection",(t,i,s,r,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:s}=t.getSettings();if(n=!1,!i||!t.selection.isSelected()||s&&e.wrapped&&e.flipped||!s&&e.wrapped)return e.wrapped=!1,e.flipped=!1,t.deselectCell(),!1;o.preventDefault()}}}}];function Up(t){const e={};return $p.forEach(({name:n,callback:o})=>{e[n]=(...e)=>o(t,...e)}),e}function jp(t){const e=t.getShortcutManager().addContext("editor"),n=Up(t),o={group:Lp};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(Pp),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 Yp(t){const e=t.getShortcutManager().addContext(Pp),n=Up(t),o={runOnlyIf:()=>{const{navigableHeaders:e}=t.getSettings();return I(t.getSelected())&&(e||!e&&t.countRenderedRows()>0&&t.countRenderedCols()>0)},group:Np};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:Lp,runOnlyIf:()=>I(t.getSelected())}),e.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>I(t.getSelected())&&!t.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>I(t.getSelected())&&t.getSelectedRangeActive()?.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:Np,group:Wp,position:"before",callback:t=>i.before(t)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Np,group:Wp,callback:t=>i.after(t),position:"after"}])}function Gp(t){const e=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=Op(t),s=Dp(t);return null===i||null===s?null:(e.row=co(e.row,i.row,s.row),e.col=co(e.col,i.col,s.col),e)}}(t),n={wrapped:!1,flipped:!1};let o,i=!0,s=!1;t.addHook("afterSelection",()=>{i&&(o=t.getSelectedRangeActive()?.highlight)}),t.addHook("beforeRowWrap",(t,e,o)=>{n.wrapped=!0,n.flipped=o}),t.addHook("beforeEmptyDataStateShow",()=>{s=!0}),t.addHook("beforeEmptyDataStateHide",()=>{s=!1});t.getShortcutManager().getContext(Pp).addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Np,group:Wp,position:"before",callback(){const{tabNavigation:e}=t.getSettings();t.getSelectedRangeActive()&&!e&&(i=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Np,group:Wp,callback(e){const{tabNavigation:s,autoWrapRow:r}=t.getSettings();i=!0,(!s||!t.selection.isSelected()||r&&n.wrapped&&n.flipped||!r&&n.wrapped)&&(r&&n.wrapped&&n.flipped&&(o=e.shiftKey?Op(t):Dp(t)),n.wrapped=!1,n.flipped=!1)},position:"after"}]);const r=t.rootGridElement??t.rootElement;t.getFocusScopeManager().registerScope("grid",r,{contains:e=>!(r!==e&&!r.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:n=>{if("tab_from_above"===n){const n=e(o)??Op(t);if(n){!1!==t.runHooks("modifyFocusOnTabNavigation","from_above",n)&&(t.selectCell(n.row,n.col),t.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===n){const n=e(o)??Dp(t);if(n){!1!==t.runHooks("modifyFocusOnTabNavigation","from_below",n)&&t.selectCell(n.row,n.col)}}}})}const qp=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"]]),Kp=t=>t.map(t=>{const e=t.toLowerCase();return qp.has(e)?qp.get(e):e}).sort().join("+"),Xp=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"]]),Zp=({which:t,key:e})=>{if(Xp.has(t))return Xp.get(t);const n=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(n)?n:e.toLowerCase()},Qp=["meta","alt","shift","control"],Jp=t=>Qp.includes(t),tf=(t,e=!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},ef=Symbol("shortcut-context");function nf(t){return Et(t)&&t.__kindOf===ef}const of=function(){const t=new Set;return{press(e){t.add(e)},release(e){t.delete(e)},releaseAll(){t.clear()},isPressed:e=>t.has(e)}}(),sf=[];let rf=0;const af=({ownerWindow:t,handleEvent:e,beforeKeyDown:n,afterKeyDown:o})=>{const i=bo({errorIdExists:t=>`The "${t}" context name is already registered.`});let s="grid";const r=(t,e="table")=>{const n=((t,e="table")=>{const n=bo({errorIdExists:e=>`The "${e}" shortcut is already registered in the "${t}" context.`}),o=({keys:t,callback:e,group:o,runOnlyIf:i=()=>!0,captureCtrl:s=!1,preventDefault:r=!0,stopPropagation:a=!1,relativeToGroup:l,position:h,forwardToContext:c}={})=>{A(o)&&bt("You need to define the shortcut's group."),!1===Ze(e)&&bt("The shortcut's callback needs to be a function."),!1===Array.isArray(t)&&bt(T`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
32
|
+
using the KeyboardEvent.key properties:\x20
|
|
33
|
+
https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const d={callback:e,group:o,runOnlyIf:i,captureCtrl:s,preventDefault:r,stopPropagation:a};I(l)&&(d.relativeToGroup=l,d.position=h),nf(c)&&(d.forwardToContext=c),t.forEach(t=>{const e=Kp(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=Kp(t);n.removeItem(e)};return{__kindOf:ef,scope:e,addShortcut:o,addShortcuts:(t,e={})=>{t.forEach(t=>{Tt(e,(n,o)=>{!1===Object.prototype.hasOwnProperty.call(t,o)&&(t[o]=e[o])}),o(t)})},getShortcuts:t=>{const e=Kp(t),o=n.getItem(e);return I(o)?o.slice():[]},hasShortcut:t=>{const e=Kp(t);return n.hasItem(e)},removeShortcutsByKeys:i,removeShortcutsByGroup:t=>{n.getItems().forEach(([e,n])=>{const o=n.filter(e=>e.group!==t);0===o.length?i((t=>t.split("+"))(e)):(n.length=0,n.push(...o))})}}})(t,e);return i.addItem(t,n),n},a=()=>s,l=t=>i.getItem(t);let h=!1;const c=(t,e,n=a())=>{const o=nf(n)?n:l(n);let i=!1;if(!o.hasShortcut(e))return i;const s=o.getShortcuts(e);for(let n=0;n<s.length;n++){const{callback:o,runOnlyIf:r,preventDefault:a,stopPropagation:l,captureCtrl:d,forwardToContext:u}=s[n];if(!0===r(t)){if(h=d,i=!1===o(t,e),h=!1,a&&t.preventDefault(),l&&(an(t),t.stopPropagation()),i)break;u&&c(t,e,u)}}return i},d=function(t,e,n,o,i,s=null){const r=t=>{if(!1!==e(t)){if(!1===n(t)||229===t.keyCode||"string"!=typeof t.key||ln(t))return;const e=Zp(t);let s=[];Jp(e)||(s=tf(t));const r=[e].concat(s);let a=i(t,r);return!a&&(Xt()&&s.includes("meta")||!Xt()&&s.includes("control"))&&(a=i(t,[e].concat(tf(t,!0)))),void o(t)}if(!1===Ze(s))return;if(229===t.keyCode||"string"!=typeof t.key||ln(t))return;const r=Zp(t);let a=[];Jp(r)||(a=tf(t));const l=[r].concat(a);let h=s(t,l);!h&&(Xt()&&a.includes("meta")||!Xt()&&a.includes("control"))&&(h=s(t,[r].concat(tf(t,!0)))),o(t)},a=t=>{if("string"==typeof t.key){const e=Zp(t);Jp(e)&&of.press(e)}},l=t=>{if("string"==typeof t.key){const e=Zp(t);Jp(e)&&of.release(e)}},h=()=>{of.releaseAll()};return{mount:()=>{let e=t;for(rf+=1;e;)1===rf&&(e.document.documentElement.addEventListener("keydown",a),sf.push({event:"keydown",listener:a}),e.document.documentElement.addEventListener("keyup",l),sf.push({event:"keyup",listener:l})),e.document.documentElement.addEventListener("keydown",r),e.document.documentElement.addEventListener("blur",h),e=oe(e)},unmount:()=>{let e=t;for(rf-=1;e;){if(0===rf){for(let t=0;t<sf.length;t++){const{event:n,listener:o}=sf[t];e.document.documentElement.removeEventListener(n,o)}sf.length=0}e.document.documentElement.removeEventListener("keydown",r),e.document.documentElement.removeEventListener("blur",h),e=oe(e)}},isPressed:t=>of.isPressed(t),releasePressedKeys:()=>of.releaseAll()}}(t,t=>{const n=a(),o=l(n);return e(t,o?.scope??"table")},n,o,c,(t,e)=>{const n=i.getItems();for(let o=0;o<n.length;o+=1){const[,i]=n[o];if("global"===i.scope&&c(t,e,i))return!0}return!1});d.mount();return{addContext:r,getActiveContextName:a,getContext:l,getOrCreateContext:(t,e="table")=>l(t)??r(t,e),setActiveContextName:t=>{i.hasItem(t)||bt(T`You've tried to activate the "${t}" shortcut context\x20
|
|
34
|
+
that does not exist. Before activation, register the context using the "addContext" method.`),s=t},hasEventShortcut:(t,e)=>{const n=l(t);if(!n)return!1;const o=((t,e)=>{if("string"!=typeof t.key)return[];const n=Zp(t),o=Jp(n),i=o?[]:tf(t),s=[[n].concat(i)];o||("function"==typeof e&&e()?i.includes("meta"):i.includes("control"))&&s.push([n].concat(tf(t,!0)));return s})(e,Xt);return o.some(t=>n.hasShortcut(t))},isCtrlPressed:()=>!h&&(d.isPressed("control")||d.isPressed("meta")),releasePressedKeys:()=>d.releasePressedKeys(),destroy:()=>d.unmount()}};function lf(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 hf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cf(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function df(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,cf(t,e,"get"))}function uf(t,e,n){hf(t,e),e.set(t,n)}function gf(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,cf(t,e,"set"),n),n}function pf(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function ff(t,e){hf(t,e),e.add(t)}const mf="handsontable-core-styles";var wf=new WeakMap,bf=new WeakMap,vf=new WeakMap,Cf=new WeakMap,yf=new WeakMap,Sf=new WeakMap,kf=new WeakMap,Rf=new WeakMap,xf=new WeakSet,Ef=new WeakSet,Mf=new WeakSet,Tf=new WeakSet,_f=new WeakSet,Hf=new WeakSet,If=new WeakSet;class Af{getCSSVariableValue(t){if(df(this,Sf)[`--ht-${t}`])return df(this,Sf)[`--ht-${t}`];const e=pf(this,_f,Wf).call(this,`--ht-${t}`)??pf(this,Hf,Lf).call(this,`--ht-${t}`);return null!==e?(df(this,Sf)[`--ht-${t}`]=e,e):void 0}getStyleForTD(t){return df(this,kf)?.td?.[t]}getDefaultRowHeight(t){const e=pf(this,Ef,Df).call(this);return void 0!==t&&t===df(this,wf).view.getFirstRenderedVisibleRow()?e+1:e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(t){/ht-theme-.*/.test(t)?(pf(this,If,Bf).call(this),t&&t!==df(this,bf)&&gf(this,bf,t),df(this,Rf).call(this,df(this,bf)),pf(this,Mf,Nf).call(this)):Qt(`${t} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return df(this,bf)}clearCache(){pf(this,If,Bf).call(this),pf(this,Mf,Nf).call(this)}constructor({hot:t,rootElement:e,rootDocument:n,onThemeChange:o=()=>{},injectCoreCss:i=!0}){ff(this,xf),ff(this,Ef),ff(this,Mf),ff(this,Tf),ff(this,_f),ff(this,Hf),ff(this,If),uf(this,wf,{writable:!0,value:void 0}),uf(this,bf,{writable:!0,value:void 0}),uf(this,vf,{writable:!0,value:void 0}),uf(this,Cf,{writable:!0,value:void 0}),uf(this,yf,{writable:!0,value:void 0}),uf(this,Sf,{writable:!0,value:void 0}),uf(this,kf,{writable:!0,value:void 0}),uf(this,Rf,{writable:!0,value:void 0}),gf(this,Sf,{}),gf(this,kf,{}),gf(this,wf,t),gf(this,vf,e),gf(this,yf,n),gf(this,Rf,o),i&&pf(this,xf,Of).call(this)}}function Of(){if(!df(this,wf)||!df(this,yf)||!df(this,yf).head)return;const t=df(this,yf).getElementById(mf);if(t&&t instanceof HTMLStyleElement)return;const e=df(this,yf).createElement("style");e.id=mf,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.1.0\n * Release date: 19/05/2026 (built at 19/05/2026 14:51:40)\n */\n.ht-root-wrapper{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;flex-direction:column;height:100%;display:flex;position:relative}.htFocusCatcher{opacity:0;z-index:-1;border:0;outline:0;width:0;height:0;margin:0;padding:0;position:absolute;display:block!important}.ht-grid{flex:auto;min-height:0}.htScrollbarTest{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.htScrollbarSafariTest::-webkit-scrollbar{width:9px;height:9px}.handsontable{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);letter-spacing:var(--ht-letter-spacing);color:var(--ht-foreground-color);touch-action:manipulation;position:relative}.handsontable .wtHolder{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color)}.handsontable .wtHolder::-webkit-scrollbar{width:9px;height:9px}.handsontable .wtHolder::-webkit-scrollbar-track{background:var(--ht-scrollbar-track-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-thumb{background-color:var(--ht-scrollbar-thumb-color);border-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder::-webkit-scrollbar-corner{background:var(--ht-scrollbar-track-color)}.handsontable .wtHolder:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-right-radius:var(--ht-scrollbar-border-radius)}.handsontable .wtHolder:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))::-webkit-scrollbar-corner{border-bottom-left-radius:var(--ht-scrollbar-border-radius)}.handsontable.ht-wrapper{border-radius:var(--ht-wrapper-border-radius,0);width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) td:first-of-type{border-inline-start-width:1px}.handsontable.ht-wrapper:before{content:"";border:var(--ht-wrapper-border-width)solid var(--ht-wrapper-border-color);border-radius:var(--ht-wrapper-border-radius,0);z-index:999;pointer-events:none;display:block;position:absolute;inset:0;overflow:hidden}.handsontable.htGhostTable.htNestedHeaders table{border-spacing:0;border-collapse:collapse}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr:first-of-type th:first-child,.handsontable.htGhostTable table tbody tr:first-of-type td:first-child{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htGhostTable table tbody tr th,.handsontable.htGhostTable table tbody tr td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);border-top-width:0}.handsontable.htHasScrollX:not(.htHorizontallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder,.handsontable.htHasScrollY:not(.htVerticallyScrollableByWindow):not(.htScrollbarHidden) .ht_master .wtHolder{border-radius:var(--ht-wrapper-border-radius,0)}.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{background-color:var(--ht-background-color)}.handsontable tr.ht__row_even th{background-color:var(--ht-row-header-even-background-color)}.handsontable tr.ht__row_even td{background-color:var(--ht-row-cell-even-background-color)}.handsontable tr.ht__row_odd th{background-color:var(--ht-row-header-odd-background-color)}.handsontable tr.ht__row_odd td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable th,.handsontable td{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px);padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);vertical-align:top;border-top-width:0;border-inline-width:0 1px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);white-space:pre-wrap;empty-cells:show;box-sizing:border-box;color:var(--ht-foreground-color);border-style:solid;border-bottom-width:1px;border-top-color:var(--ht-cell-vertical-border-color);border-bottom-color:var(--ht-cell-vertical-border-color);border-inline-start-color:var(--ht-cell-horizontal-border-color);border-inline-end-color:var(--ht-cell-horizontal-border-color);outline:0;overflow:hidden}.handsontable th.invisibleSelection,.handsontable td.invisibleSelection{outline:none}.handsontable th.invisibleSelection::selection,.handsontable td.invisibleSelection::selection{background:0 0}.handsontable th{text-align:center;font-weight:var(--ht-header-font-weight);white-space:nowrap;color:var(--ht-header-foreground-color);background-color:var(--ht-header-background-color);position:relative;overflow:visible}.handsontable th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable th:first-child,.handsontable th:nth-child(2){border-inline-start-width:1px}.handsontable th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable th.ht__active_highlight{border-color:var(--ht-header-active-border-color);color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable tbody tr.ht__row_odd th.ht__highlight,.handsontable tbody tr.ht__row_even th.ht__highlight{color:var(--ht-header-row-highlighted-foreground-color);background-color:var(--ht-header-row-highlighted-background-color)}.handsontable tbody tr.ht__row_odd th.ht__active_highlight,.handsontable tbody tr.ht__row_even th.ht__active_highlight{color:var(--ht-header-row-active-foreground-color);background-color:var(--ht-header-row-active-background-color)}.handsontable tbody tr:first-of-type th:first-child:empty:after,.handsontable tbody tr:first-of-type td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable tbody tr th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable tbody tr th.ht__active_highlight{box-shadow:0 -1px 0 0 var(--ht-header-active-border-color)}.handsontable tbody tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable tbody tr td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable tbody tr td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable thead tr th{padding:0}.handsontable thead tr th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable thead tr th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);flex-direction:row;align-items:center;gap:2px;display:flex}.handsontable thead tr th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable tr:first-child th,.handsontable tr:first-child td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable tr:first-child th.ht__active_highlight,.handsontable tr:first-child td.ht__active_highlight{border-top-color:var(--ht-header-active-border-color)}.handsontable tr:last-child th,.handsontable tr:last-child td{border-bottom-color:var(--ht-border-color)}.handsontable tr:last-child th.ht__active_highlight,.handsontable tr:last-child td.ht__active_highlight{border-bottom-color:var(--ht-header-active-border-color)}.handsontable div[class^=ht_clone] thead .ht__highlight .relative:after{content:"";height:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;bottom:-1px;left:-1px;right:-1px}.handsontable div[class^=ht_clone] thead tr:only-of-type .ht__highlight .relative:after{bottom:0}.handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{content:"";width:var(--ht-header-highlighted-shadow-size);background-color:var(--ht-accent-color);display:block;position:absolute;top:-1px;bottom:-1px;right:-1px}.handsontable div[class^=ht_clone] td:first-of-type{border-inline-start-width:1px}.handsontable thead tr:not(:last-child) th{overflow:hidden}.handsontable .hide{display:none}.handsontable .relative{box-sizing:border-box;position:relative}.handsontable .wtHider{width:0}.handsontable .wtSpreader{width:0;height:auto;position:relative}.handsontable .htAutoSize{visibility:hidden;position:absolute;top:-99000px;left:-99000px}.handsontable .htTextEllipsis{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.handsontable table,.handsontable tbody,.handsontable thead,.handsontable input,.handsontable textarea,.handsontable div{box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:initial}.handsontable .htCore{border-spacing:0;border-collapse:separate;table-layout:fixed;cursor:default;background-color:var(--ht-background-color);border-width:0;outline-width:0;width:0;margin:0}.handsontable col,.handsontable col.rowHeader{width:64px}.handsontable col.hidden{width:0!important}.handsontable span.colHeader,.handsontable span.rowHeader{font-size:var(--ht-font-size);line-height:var(--ht-line-height);display:inline-block}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.handsontable a{color:var(--ht-link-color)}.handsontable a:hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders thead tr th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-inline-width:1px 0}.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,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop tbody tr:first-child td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start tbody tr:first-child td{border-top-width:0}.handsontable .ht_master table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_clone_inline_start table.htCore>thead{visibility:hidden}.ht_master,.ht_clone_inline_start,.ht_clone_top,.ht_clone_bottom,.ht_master .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder,.ht_clone_bottom .wtHolder{overflow:hidden}.ht_master .wtHolder{overflow:auto}[dir=rtl].handsontable td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable tbody tr td[dir=ltr]:last-child{border-inline-start-color:var(--ht-border-color)}[dir=rtl].handsontable div[class^=ht_clone] tbody .ht__highlight .relative:after{left:-1px;right:auto}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_master .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top_inline_start_corner .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_top .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper:not(.htColumnHeaders) .ht_clone_inline_start .htCore tbody tr:first-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_master .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top_inline_start_corner .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_inline_start .htCore thead tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_inline_start .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:var(--ht-wrapper-border-radius);border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper .ht_clone_bottom .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:var(--ht-wrapper-border-radius);border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:var(--ht-wrapper-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper .ht_clone_bottom .htCore tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:var(--ht-wrapper-border-radius)}.handsontable.ht-wrapper.htHasScrollX .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollX .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollX .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:first-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-top-left-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{box-shadow:inset 0 0 0 2px var(--ht-accent-color);-webkit-appearance:none}.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea,.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea{inset-inline-start:-10000px;inset-inline-end:unset;z-index:9999;top:-10000px}.handsontable.hide-tween{animation:.2s forwards opacity-hide}.handsontable.show-tween{animation:.3s forwards opacity-show}.ht_clone_master{z-index:100}.ht_clone_inline_start{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner{z-index:180}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.area{position:relative}.handsontable td.area:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-1{position:relative}.handsontable td.area-1:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-2{position:relative}.handsontable td.area-2:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-3{position:relative}.handsontable td.area-3:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-4{position:relative}.handsontable td.area-4:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-5{position:relative}.handsontable td.area-5:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-6{position:relative}.handsontable td.area-6:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area-7{position:relative}.handsontable td.area-7:before{content:"";background:var(--ht-cell-selection-background-color,#1a42e8);position:absolute;inset:0}.handsontable td.area:before{opacity:.14}.handsontable td.area-1:before{opacity:.21}.handsontable td.area-2:before{opacity:.28}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.42}.handsontable td.area-5:before{opacity:.49}.handsontable td.area-6:before{opacity:.56}.handsontable td.area-7:before{opacity:.63}.handsontable td.area{border-color:color-mix(in srgb,var(--ht-border-color),var(--ht-foreground-color)10%)}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder:first-child,.handsontable .wtBorder:nth-child(3){z-index:2}.handsontable .wtBorder:nth-child(2),.handsontable .wtBorder:nth-child(4){z-index:1}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.area{z-index:8;background-color:var(--ht-cell-selection-border-color)!important}.handsontable .wtBorder.fill{z-index:6;background-color:var(--ht-cell-autofill-fill-border-color,#68696c)!important}.handsontable .wtBorder.corner{cursor:crosshair;z-index:10;font-size:0;border-radius:var(--ht-cell-autofill-border-radius)!important;background-color:var(--ht-cell-autofill-background-color,#1a42e8)!important;border-color:var(--ht-cell-autofill-border-color)!important}.handsontable .wtBorder.corner:after{content:"";border-radius:var(--ht-cell-autofill-border-radius);inset:min(0px,(var(--ht-cell-autofill-size) - var(--ht-cell-autofill-hit-area-size))/2);background:0 0;position:absolute}.handsontable .wtBorder.corner.wtCornerInlineEndEdge:after{inset-inline-end:0}.handsontable .wtBorder.corner.wtCornerBlockEndEdge:after{inset-block-end:0}.hot-display-license-info{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;padding:var(--ht-license-vertical-padding,16px)var(--ht-license-horizontal-padding,16px);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);color:var(--ht-license-foreground-color);background-color:var(--ht-license-background-color,#f7f7f9);text-align:left;border:1px solid var(--ht-border-color,#f7f7f9);border-radius:var(--ht-wrapper-border-radius);margin-top:10px}.hot-display-license-info a{font-size:var(--ht-license-font-size);color:var(--ht-link-color)}.hot-display-license-info a:hover{color:var(--ht-link-hover-color)}.handsontable .htAutocompleteArrow{cursor:default;width:var(--ht-icon-size);height:var(--ht-icon-size);float:right;top:calc((var(--ht-line-height) - var(--ht-icon-size))/2);margin-inline-start:calc(var(--ht-gap-size)*2);margin-inline-end:1px;font-size:0;position:relative}.handsontable .htAutocompleteArrow:after{content:"";opacity:.6;display:block;position:absolute;top:0;left:0}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable .htCheckboxRendererInput{width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);vertical-align:middle;cursor:pointer;margin:0;outline:none;margin-top:-2px;display:inline-block;position:relative}.handsontable .htCheckboxRendererInput:first-child{margin-inline-end:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:last-child{margin-inline-start:var(--ht-gap-size)}.handsontable .htCheckboxRendererInput:before{content:"";width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background-color:var(--ht-checkbox-background-color);box-sizing:border-box;pointer-events:none;transition:all var(--ht-table-transition)ease-in-out;display:inline-block;position:absolute;top:0;left:0}.handsontable .htCheckboxRendererInput:after{content:"";color:var(--ht-checkbox-icon-color);pointer-events:none;display:block;position:absolute;top:0;left:0;width:var(--ht-checkbox-size)!important;height:var(--ht-checkbox-size)!important}.handsontable .htCheckboxRendererInput:checked:before{border-color:var(--ht-checkbox-checked-border-color);background-color:var(--ht-checkbox-checked-background-color)}.handsontable .htCheckboxRendererInput:checked:after{color:var(--ht-checkbox-checked-icon-color)}.handsontable .htCheckboxRendererInput:checked:disabled:before{border-color:var(--ht-checkbox-checked-disabled-border-color);background-color:var(--ht-checkbox-checked-disabled-background-color)}.handsontable .htCheckboxRendererInput:checked:disabled:after{color:var(--ht-checkbox-checked-disabled-icon-color)}.handsontable .htCheckboxRendererInput:checked:focus:before{border-color:var(--ht-checkbox-checked-focus-border-color);background-color:var(--ht-checkbox-checked-focus-background-color)}.handsontable .htCheckboxRendererInput:checked:focus:after{color:var(--ht-checkbox-checked-focus-icon-color)}.handsontable .htCheckboxRendererInput:focus:before{border-color:var(--ht-checkbox-focus-border-color);background-color:var(--ht-checkbox-focus-background-color);outline:1px solid var(--ht-checkbox-focus-ring-color)}.handsontable .htCheckboxRendererInput:focus:after{color:var(--ht-checkbox-focus-icon-color)}.handsontable .htCheckboxRendererInput:disabled{cursor:initial}.handsontable .htCheckboxRendererInput:disabled:before{border-color:var(--ht-checkbox-disabled-border-color);background-color:var(--ht-checkbox-disabled-background-color)}.handsontable .htCheckboxRendererInput:disabled:after{color:var(--ht-checkbox-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:before{border-color:var(--ht-checkbox-indeterminate-border-color);background-color:var(--ht-checkbox-indeterminate-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:after{color:var(--ht-checkbox-indeterminate-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:before{border-color:var(--ht-checkbox-indeterminate-disabled-border-color);background-color:var(--ht-checkbox-indeterminate-disabled-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:disabled:after{color:var(--ht-checkbox-indeterminate-disabled-icon-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:before{border-color:var(--ht-checkbox-indeterminate-focus-border-color);background-color:var(--ht-checkbox-indeterminate-focus-background-color)}.handsontable .htCheckboxRendererInput:indeterminate:focus:after{color:var(--ht-checkbox-indeterminate-focus-icon-color)}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{font-size:inherit;line-height:inherit;cursor:pointer;color:inherit;margin:0;display:inline-block;position:relative}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .htPlaceholder{color:var(--ht-placeholder-color)}.handsontable .htDimmed{color:var(--ht-read-only-color)!important;background-color:var(--ht-cell-read-only-background-color)!important}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htInvalid{background-color:var(--ht-cell-error-background-color)!important}.handsontable .htNoWrap{white-space:nowrap}.handsontable .htSearchResult{background-color:var(--ht-cell-success-background-color)!important}.handsontable .ht-multi-select-renderer{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);overflow:hidden}.handsontable .ht-multi-select-chips-container{align-items:center;gap:var(--ht-gap-size);flex-wrap:nowrap;max-width:100%;display:flex;overflow:hidden}.handsontable .ht-multi-select-chip{align-items:center;gap:var(--ht-gap-size);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);border-radius:var(--ht-chip-border-radius);background:var(--ht-chip-background);white-space:nowrap;box-sizing:border-box;flex-shrink:0;max-width:100px;display:inline-flex}.handsontable .ht-multi-select-chip-label{text-overflow:ellipsis;color:var(--ht-foreground-color);font-style:normal;font-weight:var(--ht-font-weight);line-height:var(--ht-line-height,40px);letter-spacing:var(--ht-letter-spacing,0);padding:0 var(--ht-chip-gap);overflow:hidden}.handsontable .ht-multi-select-chip-remove{cursor:pointer;color:var(--ht-icon-button-icon-color);background-position:50%;background-repeat:no-repeat;background-size:contain;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex;position:relative;width:var(--ht-icon-size)!important;height:var(--ht-icon-size)!important}.handsontable .ht-multi-select-chip-remove:before{content:"";display:block;position:absolute;top:0;left:0}.handsontable .ht-multi-select-chip-remove:hover{background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht-multi-select-overflow{padding:var(--ht-chip-vertical-padding)var(--ht-chip-horizontal-padding);background:var(--ht-chip-background);border-radius:var(--ht-chip-border-radius);color:var(--ht-foreground-color);white-space:nowrap;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}.handsontableInputHolder{position:absolute;top:0;left:0}.handsontableInputHolder .handsontableInput{padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);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);box-sizing:border-box;border:none;border-radius:0;outline-width:0;margin:0;display:block;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.handsontableInputHolder .handsontableInput:focus{outline:none}.htSelectEditor{position:absolute}.htSelectEditor select{width:100%;height:100%;padding:calc(var(--ht-cell-vertical-padding,4px) + 1px)calc(var(--ht-cell-horizontal-padding,8px) + 1px);white-space:nowrap;text-overflow:ellipsis;color:var(--ht-cell-editor-foreground-color);background-color:var(--ht-cell-editor-background-color,#fff);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);box-sizing:border-box;border:none;border-radius:0;margin:0;padding-inline-end:26px;position:absolute;inset:0;overflow:hidden;font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;-webkit-appearance:none!important}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{z-index:1;pointer-events:none;margin-inline-end:4px;top:50%;transform:translateY(-50%)}.handsontable.listbox{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,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);margin:0}.handsontable.listbox .ht_master{background-color:var(--ht-background-color);overflow:hidden}.handsontable.listbox .wtHolder{overflow:auto;border-radius:0!important}.handsontable.listbox .wtHider,.handsontable.listbox .htCore{border-radius:0!important}.handsontable.listbox table{overflow:hidden}.handsontable.listbox table th,.handsontable.listbox table tr:first-child th,.handsontable.listbox table tr:last-child th,.handsontable.listbox table tr:first-child td,.handsontable.listbox table td{border-color:#0000!important}.handsontable.listbox table th,.handsontable.listbox table td{white-space:nowrap;text-overflow:ellipsis;border-radius:0!important}.handsontable.listbox table .wtBorder{visibility:hidden}.handsontable.listbox table strong{color:inherit;font-weight:700}.handsontable.listbox table tr td:hover td{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important;box-shadow:none!important}.handsontable.listbox table td{transition:var(--ht-table-transition)background ease-in-out}.handsontable.listbox table td:hover{cursor:pointer;background-color:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.handsontable.listbox table td.current:not([aria-expanded=true]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.listbox table td.htDimmed{cursor:default;font-style:inherit;color:inherit!important}.handsontable.listbox table td.htDimmed:not(.handsontable.listbox table td:hover){background-color:inherit!important}.handsontable.listbox table thead th{text-align:left;height:auto!important}.handsontable.listbox table thead th .relative{padding-top:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size));padding-bottom:calc(var(--ht-cell-vertical-padding) + var(--ht-gap-size))}.handsontable.listbox .ht_clone_top .wtHider{overflow:hidden}.handsontable.listbox .ht_clone_top table{border-radius:0}.handsontable.listbox .htBorders div{background:0 0!important}.handsontable.autocompleteEditor tr.ht__row_even th,.handsontable.autocompleteEditor tr.ht__row_even td,.handsontable.autocompleteEditor tr.ht__row_odd th,.handsontable.autocompleteEditor tr.ht__row_odd td{background-color:var(--ht-background-color,#fff)}[dir=rtl].handsontable.listbox table thead th{text-align:right}.pika-single{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;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,#000)var(--ht-menu-shadow-opacity,100%),transparent);font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);color:var(--ht-foreground-color);background:var(--ht-background-color,#fff);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);z-index:9999;padding:10px;display:block;position:relative}.pika-single.is-hidden{display:none}.pika-single .pika-row{background-color:#0000}.pika-single .pika-title{justify-content:center;align-items:center;display:flex}.pika-single .pika-label{color:var(--ht-accent-color);order:2;padding:5px;position:relative}.pika-single .pika-label .pika-select{opacity:0;cursor:pointer;position:absolute;inset:0}.pika-single .pika-prev,.pika-single .pika-next{white-space:nowrap;text-indent:-9999px;cursor:pointer;width:20px;height:20px;color:var(--ht-accent-color);background:0 0;border:none;padding:0}.pika-single .pika-prev{order:1;margin-right:auto}.pika-single .pika-next{order:3;margin-left:auto}.pika-single .pika-table thead{height:50px}.pika-single .pika-table th{vertical-align:middle;padding:1px}.pika-single .pika-table th abbr{cursor:initial;border:none;font-weight:400;text-decoration:none}.pika-single .pika-table td{vertical-align:middle;padding:1px}.pika-single .pika-table td.is-disabled .pika-button{pointer-events:none;opacity:.5}.pika-single .pika-table td.is-today .pika-button{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.pika-single .pika-table td.is-selected .pika-button{background:var(--ht-accent-color,#1a42e8);color:var(--ht-primary-button-foreground-color,#fff)}.pika-single .pika-table td.pika-week{text-align:center;width:12.5%}.pika-single .pika-table .pika-button{aspect-ratio:1;width:100%;color:var(--ht-foreground-color);border-radius:var(--ht-button-border-radius);cursor:pointer;font-size:inherit;background:0 0;border:none;margin:0;padding:10px}.pika-single .pika-table .pika-button:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}[dir=rtl].htDatepickerHolder .pika-single .pika-next{margin-left:0;margin-right:auto;transform:rotate(180deg)}[dir=rtl].htDatepickerHolder .pika-single .pika-prev{margin-left:auto;margin-right:0;transform:rotate(180deg)}.handsontableEditor{position:absolute}.handsontableEditor .ht-multi-select-editor{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,#000)var(--ht-menu-shadow-opacity,100%),transparent);scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);border-radius:0 0 var(--ht-menu-border-radius)var(--ht-menu-border-radius);border:var(--ht-menu-border-width)solid var(--ht-menu-border-color);background:var(--ht-background-color);width:max-content;min-width:120px;padding:var(--ht-menu-vertical-padding)var(--ht-menu-horizontal-padding);overflow-y:auto}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-input-wrapper{padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);align-items:center;gap:var(--ht-gap-size);align-self:stretch;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-search-icon{left:calc(var(--ht-menu-item-horizontal-padding) + 10px);opacity:.5;pointer-events:none;z-index:1;background-position:50%;background-repeat:no-repeat;background-size:contain;width:16px;height:16px;position:absolute;top:50%;transform:translateY(-50%)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input{box-sizing:border-box;border-radius:var(--ht-input-border-radius);width:100%;color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);transition:var(--ht-table-transition)all ease-in-out;line-height:var(--ht-line-height);font-size:var(--ht-font-size);padding:var(--ht-input-vertical-padding)var(--ht-menu-item-horizontal-padding)var(--ht-input-vertical-padding)32px}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);outline-offset:0;box-shadow:none;outline:none}.handsontableEditor .ht-multi-select-editor input.ht-multi-select-editor-search-input::placeholder{color:var(--ht-foreground-color);opacity:.6}.handsontableEditor .ht-multi-select-editor .ht-multi-select-editor-separator{background-color:var(--ht-menu-border-color);width:100%;height:1px;margin:var(--ht-menu-vertical-padding)0 var(--ht-menu-vertical-padding)0;padding:0}.handsontableEditor .ht-multi-select-editor ul{width:100%;padding:var(--ht-gap-size)var(--ht-menu-horizontal-padding);flex-direction:column;align-items:flex-start;margin:0;list-style:none;display:flex}.handsontableEditor .ht-multi-select-editor ul li{background:var(--ht-background-color);padding:var(--ht-menu-item-vertical-padding)var(--ht-menu-item-horizontal-padding);-webkit-user-select:none;user-select:none;cursor:pointer;align-self:stretch;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li *{cursor:pointer}.handsontableEditor .ht-multi-select-editor ul li.ht-multi-select-editor-item-selected{background:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li div{flex:1 0 0;align-items:center;display:flex}.handsontableEditor .ht-multi-select-editor ul li div input{-webkit-appearance:none;appearance:none;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);margin:0;padding:0;display:flex;position:relative}.handsontableEditor .ht-multi-select-editor ul li div input:after{content:"";display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:before{content:"";box-sizing:border-box;width:var(--ht-checkbox-size);height:var(--ht-checkbox-size);border-radius:var(--ht-checkbox-border-radius);border:1px solid var(--ht-checkbox-border-color);background:var(--ht-checkbox-background-color);background-position:50%;background-repeat:no-repeat;display:block;position:absolute;top:0;left:0}.handsontableEditor .ht-multi-select-editor ul li div input:checked:before{border-color:var(--ht-checkbox-checked-border-color);background:var(--ht-checkbox-checked-background-color)}.handsontableEditor .ht-multi-select-editor ul li div input:checked:after{color:var(--ht-checkbox-checked-icon-color);background-color:currentColor}.handsontableEditor .ht-multi-select-editor ul li div input:focus{outline:none}.handsontableEditor .ht-multi-select-editor ul li div label{color:var(--ht-foreground-color);text-overflow:ellipsis;font-size:var(--ht-font-size);font-style:normal;font-weight:400;line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);width:100%;padding:0 0 0 calc(var(--ht-gap-size)*2);overflow:hidden}.handsontableEditor .ht-multi-select-editor ul li:hover{background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontableEditor .ht-multi-select-editor ul li:has(input:focus){background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)}.handsontable .htUISelectCaption{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);text-overflow:ellipsis;white-space:nowrap;transition:var(--ht-table-transition)all ease-in-out;margin:0;padding-inline-end:calc(var(--ht-input-horizontal-padding) + var(--ht-icon-size));overflow:hidden;outline:none!important}.handsontable .htUISelectCaption:after{content:"";right:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4);display:block;position:absolute;top:50%;transform:translateY(-50%)}.handsontable .htUISelectCaption:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htUISelectCaption:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htUISelectCaption:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUISelect{cursor:pointer;position:relative;outline:none!important}.handsontable .htUISelect:focus .htUISelectCaption{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}[dir=rtl].handsontable .htUISelectCaption:after{right:auto;left:calc(var(--ht-input-horizontal-padding) - var(--ht-icon-size)/4)}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{width:100%;padding:var(--ht-input-vertical-padding)var(--ht-input-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-input-border-radius);box-sizing:border-box;cursor:pointer;border:var(--ht-input-border-width)solid var(--ht-input-border-color);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);transition:var(--ht-table-transition)all ease-in-out;outline:none!important}.handsontable .htFiltersMenuCondition .htUIInput input:hover,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:hover{border-color:var(--ht-input-hover-border-color);color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:disabled,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:disabled{border-color:var(--ht-input-disabled-border-color);color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color)}.handsontable .htFiltersMenuCondition .htUIInput input:focus,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input:focus{border-color:var(--ht-input-focus-border-color);color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color)}.handsontable .htUIInput{text-align:center;padding:0;position:relative;outline:none!important}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton input,.handsontable .ht-button{min-width:64px;padding:var(--ht-button-vertical-padding)var(--ht-button-horizontal-padding);font-family:inherit;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);border-radius:var(--ht-button-border-radius);box-sizing:border-box;cursor:pointer;transition:var(--ht-table-transition)all ease-in-out;border-style:solid;border-width:1px;outline:none!important}.handsontable .htUIInput.htUIButtonCancel input,.handsontable .ht-button--secondary{border-color:var(--ht-secondary-button-border-color);background-color:var(--ht-secondary-button-background-color);color:var(--ht-secondary-button-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:hover,.handsontable .ht-button--secondary:hover{border-color:var(--ht-secondary-button-hover-border-color);background-color:var(--ht-secondary-button-hover-background-color);color:var(--ht-secondary-button-hover-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:disabled,.handsontable .ht-button--secondary:disabled{border-color:var(--ht-secondary-button-disabled-border-color);background-color:var(--ht-secondary-button-disabled-background-color);color:var(--ht-secondary-button-disabled-foreground-color)}.handsontable .htUIInput.htUIButtonCancel input:focus,.handsontable .ht-button--secondary:focus{border-color:var(--ht-secondary-button-focus-border-color);background-color:var(--ht-secondary-button-focus-background-color);color:var(--ht-secondary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.htUIInput.htUIButtonOK input,.ht-button--primary{border-color:var(--ht-primary-button-border-color);background-color:var(--ht-primary-button-background-color);color:var(--ht-primary-button-foreground-color)}.htUIInput.htUIButtonOK input:hover,.ht-button--primary:hover{border-color:var(--ht-primary-button-hover-border-color);background-color:var(--ht-primary-button-hover-background-color);color:var(--ht-primary-button-hover-foreground-color)}.htUIInput.htUIButtonOK input:disabled,.ht-button--primary:disabled{border-color:var(--ht-primary-button-disabled-border-color);background-color:var(--ht-primary-button-disabled-background-color);color:var(--ht-primary-button-disabled-foreground-color)}.htUIInput.htUIButtonOK input:focus,.ht-button--primary:focus{border-color:var(--ht-primary-button-focus-border-color);background-color:var(--ht-primary-button-focus-background-color);color:var(--ht-primary-button-focus-foreground-color);box-shadow:0 0 0 1px var(--ht-accent-color)}.handsontable .htUIRadio{padding:var(--ht-gap-size)calc(2*var(--ht-gap-size));align-items:center;gap:var(--ht-gap-size);cursor:pointer;margin:0;padding-bottom:0;display:inline-flex;position:relative}.handsontable .htUIRadio:first-child{padding-inline-start:0}.handsontable .htUIRadio>input[type=radio]{width:var(--ht-radio-size);height:var(--ht-radio-size);-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:calc(.5*var(--ht-radio-size));outline:none;margin:0;position:relative}.handsontable .htUIRadio>input[type=radio]:before{content:"";border-radius:calc(.5*var(--ht-radio-size));border:1px solid var(--ht-radio-border-color);background-color:var(--ht-radio-background-color);display:block;position:absolute;inset:0}.handsontable .htUIRadio>input[type=radio]:after{content:"";color:var(--ht-radio-icon-color);display:block;position:absolute}.handsontable .htUIRadio>input[type=radio]:checked:before{border-color:var(--ht-radio-checked-border-color);background-color:var(--ht-radio-checked-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:after{color:var(--ht-radio-checked-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:checked:disabled:before{border-color:var(--ht-radio-checked-disabled-border-color);background-color:var(--ht-radio-checked-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:disabled:after{color:var(--ht-radio-checked-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:before{border-color:var(--ht-radio-checked-focus-border-color);background-color:var(--ht-radio-checked-focus-background-color)}.handsontable .htUIRadio>input[type=radio]:checked:focus:after{color:var(--ht-radio-checked-focus-icon-color)}.handsontable .htUIRadio>input[type=radio]:disabled{cursor:initial}.handsontable .htUIRadio>input[type=radio]:disabled:before{border-color:var(--ht-radio-disabled-border-color);background-color:var(--ht-radio-disabled-background-color)}.handsontable .htUIRadio>input[type=radio]:disabled:after{color:var(--ht-radio-disabled-icon-color)}.handsontable .htUIRadio>input[type=radio]:focus:before{border-color:var(--ht-radio-focus-border-color);background-color:var(--ht-radio-focus-background-color);outline:1px solid var(--ht-radio-focus-ring-color)}.handsontable .htUIRadio>input[type=radio]:focus:after{color:var(--ht-radio-focus-icon-color)}.handsontable .htUIRadio label{vertical-align:middle;cursor:pointer;color:inherit}.handsontable .htUIRadio label:before{content:"";display:block;position:absolute;inset:0}.handsontable .collapsibleIndicator,.handsontable .ht_nestingButton{width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-sizing:border-box;cursor:pointer;text-indent:-100px;flex-shrink:0;font-size:0;position:relative;overflow:visible}.handsontable .collapsibleIndicator:before,.handsontable .ht_nestingButton:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator:after,.handsontable .ht_nestingButton:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-collapse-button-border-radius);transition:var(--ht-table-transition)all ease-in-out;z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .collapsibleIndicator.expanded:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:before,.handsontable .ht_nestingButton.expanded:before,.handsontable .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-color)}.handsontable .collapsibleIndicator.expanded:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:after,.handsontable .ht_nestingButton.expanded:after,.handsontable .ht_nestingButton.ht_nestingCollapse:after{background-color:var(--ht-collapse-button-open-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-border-color)}.handsontable .collapsibleIndicator.expanded:hover:before,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable .ht_nestingButton.expanded:hover:before,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-color)}.handsontable .collapsibleIndicator.expanded:hover:after,.handsontable .collapsibleIndicator.ht_nestingCollapse:hover:after,.handsontable .ht_nestingButton.expanded:hover:after,.handsontable .ht_nestingButton.ht_nestingCollapse:hover:after{background-color:var(--ht-collapse-button-open-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-open-hover-border-color)}.handsontable .collapsibleIndicator.collapsed:before,.handsontable .collapsibleIndicator.ht_nestingExpand:before,.handsontable .ht_nestingButton.collapsed:before,.handsontable .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-color)}.handsontable .collapsibleIndicator.collapsed:after,.handsontable .collapsibleIndicator.ht_nestingExpand:after,.handsontable .ht_nestingButton.collapsed:after,.handsontable .ht_nestingButton.ht_nestingExpand:after{background-color:var(--ht-collapse-button-close-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-border-color)}.handsontable .collapsibleIndicator.collapsed:hover:before,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable .ht_nestingButton.collapsed:hover:before,.handsontable .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-color)}.handsontable .collapsibleIndicator.collapsed:hover:after,.handsontable .collapsibleIndicator.ht_nestingExpand:hover:after,.handsontable .ht_nestingButton.collapsed:hover:after,.handsontable .ht_nestingButton.ht_nestingExpand:hover:after{background-color:var(--ht-collapse-button-close-hover-background-color);box-shadow:0 0 0 1px var(--ht-collapse-button-close-hover-border-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:before{color:var(--ht-collapse-button-close-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.collapsed:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingExpand:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.collapsed:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingExpand:hover:before{color:var(--ht-collapse-button-close-hover-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:before{color:var(--ht-collapse-button-open-icon-active-color)}.handsontable th.ht__active_highlight .collapsibleIndicator.expanded:hover:before,.handsontable th.ht__active_highlight .collapsibleIndicator.ht_nestingCollapse:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.expanded:hover:before,.handsontable th.ht__active_highlight .ht_nestingButton.ht_nestingCollapse:hover:before{color:var(--ht-collapse-button-open-hover-icon-active-color)}.handsontable thead th.htRowspanHeader+th{border-inline-start-width:0}.handsontable thead th.htRowspanHeader{vertical-align:bottom;height:auto;overflow:visible}.handsontable thead th.htRowspanHeader.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color);z-index:1}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-left-radius:0}.handsontable.htRowHeaders.htHasRowspanHeaders thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0}.handsontable.htHasRowspanHeaders .ht_clone_inline_start .htCore tbody tr:first-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead th.htRowspanBottomLevel,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead th.htRowspanBottomLevel{border-bottom-width:0}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}.handsontable thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels>.relative{align-items:center;gap:5px;display:flex}.handsontable th.ht_nestingLevels span:last-child{padding-left:calc(var(--ht-icon-size) + 5px)}.handsontable th.ht_nestingLevels span.ht_nestingLevel{display:inline-block}.handsontable th.ht_nestingLevels span.ht_nestingLevel_empty{order:-2;width:5px;height:1px;display:inline-block;position:relative}.handsontable th.ht_nestingLevels .ht_nestingButton{cursor:pointer;order:-1;position:relative}.handsontable th.beforeHiddenColumn,.handsontable th.afterHiddenColumn{position:relative}.handsontable th.beforeHiddenColumn:before,.handsontable th.beforeHiddenColumn:after,.handsontable th.afterHiddenColumn:before,.handsontable th.afterHiddenColumn:after{color:var(--ht-hidden-indicator-color);position:absolute;top:50%;transform:translateY(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenColumn:after{content:"";display:block;right:-2px}.handsontable th.afterHiddenColumn:before{content:"";display:block;left:-2px}.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{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}[dir=rtl].handsontable th.beforeHiddenColumn:after{right:initial;left:-2px;transform:translateY(-50%)rotate(180deg)}[dir=rtl].handsontable th.afterHiddenColumn:before{right:-2px;left:initial;transform:translateY(-50%)rotate(180deg)}.handsontable th.beforeHiddenRow,.handsontable th.afterHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before,.handsontable th.beforeHiddenRow:after,.handsontable th.afterHiddenRow:before,.handsontable th.afterHiddenRow:after{color:var(--ht-hidden-indicator-color);position:absolute;left:50%;transform:translate(-50%);width:10px!important;height:10px!important}.handsontable th.beforeHiddenRow:after{content:"";display:block;bottom:-2px}.handsontable th.afterHiddenRow:before{content:"";display:block;top:-2px}.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{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .changeType{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);margin:calc(-1*(var(--ht-icon-button-hit-area-size) - var(--ht-icon-size))/2 + 1px);box-shadow:none;color:inherit;z-index:1;background:0 0;border:none;outline:none;flex-shrink:0;padding:0;position:relative;overflow:visible}.handsontable .changeType:before{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));color:var(--ht-icon-button-icon-color);z-index:1;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:after{content:"";width:var(--ht-icon-size);height:var(--ht-icon-size);margin-top:calc(-.5*var(--ht-icon-size));margin-left:calc(-.5*var(--ht-icon-size));border-radius:var(--ht-icon-button-border-radius);box-shadow:0 0 0 1px var(--ht-icon-button-border-color);background-color:var(--ht-icon-button-background-color);z-index:0;display:block;position:absolute;top:50%;left:50%}.handsontable .changeType:hover{cursor:pointer}.handsontable .changeType:hover:before{color:var(--ht-icon-button-hover-icon-color)}.handsontable .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-hover-border-color);background-color:var(--ht-icon-button-hover-background-color)}.handsontable .ht__active_highlight .changeType:before{color:var(--ht-icon-button-active-icon-color,var(--ht-icon-active-button-icon-color))}.handsontable .ht__active_highlight .changeType:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-border-color,var(--ht-icon-active-button-border-color));background-color:var(--ht-icon-button-active-background-color,var(--ht-icon-active-button-background-color))}.handsontable .ht__active_highlight .changeType:hover:before{color:var(--ht-icon-button-active-hover-icon-color,var(--ht-icon-active-button-hover-icon-color))}.handsontable .ht__active_highlight .changeType:hover:after{box-shadow:0 0 0 1px var(--ht-icon-button-active-hover-border-color,var(--ht-icon-active-button-hover-border-color));background-color:var(--ht-icon-button-active-hover-background-color,var(--ht-icon-active-button-hover-background-color))}.handsontable th.htFiltersActive{background-color:var(--ht-header-filter-background-color)}.handsontable th.htFiltersActive.ht__active_highlight{background-color:color-mix(in srgb,var(--ht-header-active-background-color),var(--ht-header-filter-background-color)20%)}.handsontable.htDropdownMenu>.ht_master,.handsontable.htContextMenu>.ht_master,.handsontable.htFiltersConditionsMenu>.ht_master{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,#000)var(--ht-menu-shadow-opacity,100%),transparent);border:var(--ht-menu-border-width,1px)solid var(--ht-menu-border-color,#e5e5e9);border-radius:var(--ht-menu-border-radius);padding:var(--ht-menu-vertical-padding,8px)var(--ht-menu-horizontal-padding,0);background-color:var(--ht-background-color,#fff);overflow:hidden}.handsontable.htDropdownMenu:not(.htGhostTable),.handsontable.htContextMenu:not(.htGhostTable),.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1060;display:none;position:absolute}.handsontable.htDropdownMenu .ht_clone_top,.handsontable.htDropdownMenu .ht_clone_bottom,.handsontable.htDropdownMenu .ht_clone_inline_start,.handsontable.htDropdownMenu .ht_clone_top_inline_start_corner,.handsontable.htDropdownMenu .ht_clone_bottom_inline_start_corner,.handsontable.htContextMenu .ht_clone_top,.handsontable.htContextMenu .ht_clone_bottom,.handsontable.htContextMenu .ht_clone_inline_start,.handsontable.htContextMenu .ht_clone_top_inline_start_corner,.handsontable.htContextMenu .ht_clone_bottom_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_top,.handsontable.htFiltersConditionsMenu .ht_clone_bottom,.handsontable.htFiltersConditionsMenu .ht_clone_inline_start,.handsontable.htFiltersConditionsMenu .ht_clone_top_inline_start_corner,.handsontable.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner{display:none}.handsontable.htDropdownMenu table.htCore,.handsontable.htContextMenu table.htCore,.handsontable.htFiltersConditionsMenu table.htCore{overflow:hidden}.handsontable.htDropdownMenu .htCustomMenuRenderer .table.htCore,.handsontable.htContextMenu .htCustomMenuRenderer .table.htCore,.handsontable.htFiltersConditionsMenu .htCustomMenuRenderer .table.htCore{box-shadow:none}.handsontable.htDropdownMenu.handsontable:focus,.handsontable.htContextMenu.handsontable:focus,.handsontable.htFiltersConditionsMenu.handsontable:focus{outline:none}.handsontable.htDropdownMenu .wtBorder,.handsontable.htContextMenu .wtBorder,.handsontable.htFiltersConditionsMenu .wtBorder{visibility:hidden}.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{height:calc(var(--ht-cell-vertical-padding)*2 + var(--ht-line-height) + 1px)}.handsontable.htDropdownMenu table tbody tr td,.handsontable.htContextMenu table tbody tr td,.handsontable.htFiltersConditionsMenu table tbody tr td{padding:var(--ht-menu-item-vertical-padding,4px)var(--ht-menu-item-horizontal-padding,8px);white-space:nowrap;text-overflow:ellipsis;background:var(--ht-background-color,#fff);cursor:pointer;transition:var(--ht-table-transition)background ease-in-out;border-width:0;position:relative;overflow:hidden}.handsontable.htDropdownMenu table tbody tr td:first-child,.handsontable.htContextMenu table tbody tr td:first-child,.handsontable.htFiltersConditionsMenu table tbody tr td:first-child{border-top-width:0;border-inline-end-width:0;border-bottom-width:0;border-inline-start-width:0}.handsontable.htDropdownMenu table tbody tr td.htDimmed,.handsontable.htContextMenu table tbody tr td.htDimmed,.handsontable.htFiltersConditionsMenu table tbody tr td.htDimmed{font-style:normal;color:inherit!important;background-color:inherit!important}.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{cursor:pointer;background:color-mix(in srgb,var(--ht-menu-item-hover-color)var(--ht-menu-item-hover-color-opacity,100%),transparent)!important}.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]){box-shadow:inset 0 0 0 1px var(--ht-accent-color)}.handsontable.htDropdownMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htContextMenu table tbody tr td.htSubmenu .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td.htSubmenu .htItemWrapper{margin-inline-end:calc(2*var(--ht-gap-size,4px) + var(--ht-icon-size))}.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{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);display:block;position:absolute;transform:translateY(-50%)}.handsontable.htDropdownMenu table tbody tr td.htSeparator,.handsontable.htContextMenu table tbody tr td.htSeparator,.handsontable.htFiltersConditionsMenu table tbody tr td.htSeparator{border-top:1px solid var(--ht-border-color);cursor:default;height:0;padding:0}.handsontable.htDropdownMenu table tbody tr td.htDisabled,.handsontable.htContextMenu table tbody tr td.htDisabled,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled{color:var(--ht-disabled-color);cursor:default}.handsontable.htDropdownMenu table tbody tr td.htDisabled:hover,.handsontable.htContextMenu table tbody tr td.htDisabled:hover,.handsontable.htFiltersConditionsMenu table tbody tr td.htDisabled:hover{background:var(--ht-background-color);color:var(--ht-disabled-color)}.handsontable.htDropdownMenu table tbody tr td.htHidden,.handsontable.htContextMenu table tbody tr td.htHidden,.handsontable.htFiltersConditionsMenu table tbody tr td.htHidden{display:none}:is(.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)){background-color:color-mix(in srgb,var(--ht-menu-item-active-color)var(--ht-menu-item-active-color-opacity,100%),transparent)}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper,.handsontable.htContextMenu table tbody tr td .htItemWrapper,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper{margin-inline:calc(2*var(--ht-gap-size,4px))}.handsontable.htDropdownMenu table tbody tr td .htItemWrapper:before,.handsontable.htContextMenu table tbody tr td .htItemWrapper:before,.handsontable.htFiltersConditionsMenu table tbody tr td .htItemWrapper:before{vertical-align:text-bottom;margin-right:12px}.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{font-size:0;inset:0}.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{content:"";top:50%;right:calc(var(--ht-menu-item-horizontal-padding) + var(--ht-gap-size)*2);color:var(--ht-accent-color);display:block;position:absolute;transform:translateY(-50%)}.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{position:absolute;inset-inline-end:0}.handsontable.htDropdownMenu table tbody tr td .htUIButton,.handsontable.htContextMenu table tbody tr td .htUIButton,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton{width:calc(50% - var(--ht-gap-size))}.handsontable.htDropdownMenu table tbody tr td .htUIButton input,.handsontable.htContextMenu table tbody tr td .htUIButton input,.handsontable.htFiltersConditionsMenu table tbody tr td .htUIButton input{width:100%}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{padding:var(--ht-gap-size);text-decoration:none;display:inline-block}.handsontable .htUIMultipleSelect .ht_master .wtHolder{background:0 0;border-radius:0!important;overflow-y:scroll!important}.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore{box-shadow:none}[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{left:calc(4*var(--ht-gap-size));right:auto;transform:translateY(-50%)rotate(180deg)}[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{left:calc(4*var(--ht-gap-size));right:auto}.handsontable.htFiltersConditionsMenu:not(.htGhostTable){z-index:1070}.handsontable .ht_master table td.htCustomMenuRenderer{cursor:auto}.handsontable .ht_master table td.htCustomMenuRenderer.htFiltersMenuActionBar{padding-top:calc(var(--ht-menu-item-vertical-padding,4px)*2)}.handsontable .htFiltersMenuLabel{font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin-bottom:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuLabel:empty{display:none}.handsontable .htFiltersMenuCondition{padding-top:calc(var(--ht-gap-size,2px)*3)!important;padding-bottom:0!important}.handsontable .htFiltersMenuCondition .border{border-bottom:1px solid var(--ht-border-color)!important}.handsontable .htFiltersMenuCondition .htUIInput{margin-top:calc(var(--ht-gap-size,2px)*2)}.handsontable .htFiltersMenuValue{padding-top:calc(var(--ht-gap-size,2px)*3)!important;border-bottom:1px solid var(--ht-border-color)!important;padding-bottom:0!important}.handsontable .htFiltersMenuOperators{padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:0!important}.handsontable .htUISelectionControls{margin:0 calc(var(--ht-gap-size,2px)*-1);padding-top:calc(var(--ht-gap-size,2px)*2)!important;padding-bottom:var(--ht-gap-size,2px)!important}.handsontable .htUIMultipleSelectHot{--ht-cell-horizontal-padding:calc(var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2);width:calc(100% + var(--ht-menu-item-horizontal-padding,2px)*2 + var(--ht-gap-size,2px)*4);margin:0 calc((var(--ht-menu-item-horizontal-padding,2px) + var(--ht-gap-size,2px)*2)*-1);overflow:initial!important}.handsontable .htUIMultipleSelectHot:before{content:"";background-color:var(--ht-border-color);width:100%;height:1px;display:block;position:absolute;top:-1px;left:0}.handsontable .htUIMultipleSelectHot .wtHolder{box-sizing:border-box;padding:0;overflow-x:hidden}.handsontable .htUIMultipleSelectHot .wtHolder .wtSpreader{padding:calc(var(--ht-gap-size)*2)0}.handsontable .htUIMultipleSelectHot .wtHolder td{padding:4px var(--ht-cell-horizontal-padding);height:auto!important}.handsontable .htUIClearAll,.handsontable .htUISelectAll{margin-right:var(--ht-gap-size,4px);margin-bottom:var(--ht-gap-size,4px);display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:var(--ht-font-size);line-height:var(--ht-line-height);color:var(--ht-link-color);border-radius:var(--ht-button-border-radius)}.handsontable .htUIClearAll a:hover,.handsontable .htUISelectAll a:hover{color:var(--ht-link-hover-color)}.handsontable .htUIClearAll a:focus,.handsontable .htUISelectAll a:focus{outline:1px solid var(--ht-link-hover-color)}.handsontable .htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htUIMultipleSelect .ht_master .wtHolder .wtHider,.handsontable .htUIMultipleSelect .ht_master .wtHolder .htCore,.handsontable .htUIMultipleSelect .ht_master .wtHolder tr,.handsontable .htUIMultipleSelect .ht_master .wtHolder td{background:0 0}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButtonOK{margin-inline-start:0;margin-inline-end:calc(2*var(--ht-gap-size,2px))}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{content:"";top:0;border-inline-start:var(--ht-comments-indicator-size,4px)solid #0000;border-inline-end:none;border-top:var(--ht-comments-indicator-size,4px)solid var(--ht-comments-indicator-color,#1a42e8);display:block;position:absolute;inset-inline-start:unset;inset-inline-end:0}.htCommentsContainer .htComments{z-index:1059;display:none;position:absolute}.htCommentsContainer .htCommentTextArea{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;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,#000)var(--ht-menu-shadow-opacity,100%),transparent);width:240px;height:88px;font-size:var(--ht-font-size);line-height:var(--ht-line-height);font-weight:var(--ht-font-weight);padding:var(--ht-comments-textarea-vertical-padding)var(--ht-comments-textarea-horizontal-padding);border:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,transparent);border-inline-start:var(--ht-comments-textarea-border-width,1px)solid var(--ht-comments-textarea-border-color,#1a42e8);color:var(--ht-comments-textarea-foreground-color);background-color:var(--ht-comments-textarea-background-color,#fff);box-sizing:border-box;-webkit-appearance:none;margin:0 -1px;outline:0!important}.htCommentsContainer .htCommentTextArea:focus{border:var(--ht-comments-textarea-focus-border-width,1px)solid var(--ht-comments-textarea-focus-border-color,#1a42e8);color:var(--ht-comments-textarea-focus-foreground-color);background-color:var(--ht-comments-textarea-focus-background-color,#fff)}.htBorders .wtBorder.ht-border-style-dashed-vertical{background-image:repeating-linear-gradient(to bottom,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dashed-horizontal{background-image:repeating-linear-gradient(to right,var(--ht-custom-border-color)0 5px,transparent 0 10px)}.htBorders .wtBorder.ht-border-style-dotted-horizontal{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:calc(var(--ht-custom-border-size)*2)var(--ht-custom-border-size);background-repeat:repeat-x}.htBorders .wtBorder.ht-border-style-dotted-vertical{background-image:radial-gradient(circle,var(--ht-custom-border-color)calc(var(--ht-custom-border-size)/2),transparent 0);background-size:var(--ht-custom-border-size)calc(var(--ht-custom-border-size)*2);background-repeat:repeat-y}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.handsontable .columnSorting:not(.indicatorDisabled).sortAction.ascending,.handsontable .columnSorting:not(.indicatorDisabled).sortAction.descending{padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:hover{cursor:pointer;text-decoration:none}.handsontable .columnSorting:not(.indicatorDisabled).sortAction:before{content:"";width:var(--ht-icon-size,16px);text-align:right;display:block;position:absolute;top:50%;right:2px;transform:translateY(-50%)}.handsontable .htRight .columnSorting.sortAction.ascending,.handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}.handsontable .htRight .columnSorting.sortAction:before,[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htRight .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htRight .columnSorting.sortAction.descending{padding-inline-start:0;padding-inline-end:calc(var(--ht-icon-size,16px) + 2px)}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.ascending,[dir=rtl] .handsontable .htLeft .columnSorting.sortAction.descending{padding-inline-start:calc(var(--ht-icon-size,16px) + 2px);padding-inline-end:0}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";padding-inline-end:calc(var(--ht-icon-size,16px) + 2px);display:inline-block;position:relative}.handsontable .colHeader.columnSorting:after{content:"";text-align:right;width:8px;margin-top:4px;font-size:8px;display:block;position:absolute;top:50%;right:0;transform:translateY(-50%)}.handsontable .colHeader.columnSorting[class^=sort-]:after,.handsontable .colHeader.columnSorting[class*=\\ sort-]:after{content:"+"}.handsontable .colHeader.columnSorting.sort-1:after{content:"1"}.handsontable .colHeader.columnSorting.sort-2:after{content:"2"}.handsontable .colHeader.columnSorting.sort-3:after{content:"3"}.handsontable .colHeader.columnSorting.sort-4:after{content:"4"}.handsontable .colHeader.columnSorting.sort-5:after{content:"5"}.handsontable .colHeader.columnSorting.sort-6:after{content:"6"}.handsontable .colHeader.columnSorting.sort-7:after{content:"7"}.handsontable .htRight .colHeader.columnSorting:after,[dir=rtl] .handsontable .colHeader.columnSorting:after{text-align:left;left:0;right:auto}[dir=rtl] .handsontable .htLeft .colHeader.columnSorting:after{text-align:right;left:auto;right:0}.htGhostTable th div:has(.changeType) span.colHeader.columnSorting:not(.indicatorDisabled){padding-inline-end:var(--ht-gap-size)}.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{border-left:0}.handsontable .ht_clone_top_inline_start_corner th.ht__active_highlight{box-shadow:none}.handsontable .manualColumnResizer{cursor:col-resize;opacity:0;z-index:210;background:0 0;width:10px;margin:0;position:absolute;top:0}.handsontable .manualColumnResizer:before,.handsontable .manualColumnResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:2px;height:calc(100% - 12px);max-height:16px;margin-top:.5px;display:block;position:absolute;top:50%;left:1px;transform:translateY(-50%)}.handsontable .manualColumnResizer:after{left:auto;right:0}.handsontable .manualColumnResizer:hover,.handsontable .manualColumnResizer.active{opacity:1}.handsontable .manualColumnResizerGuide{inset-inline-end:unset;width:0;border-inline-end:1px solid var(--ht-accent-color);border-inline-start:none;margin-inline-start:5px;margin-inline-end:unset;display:none;position:absolute;top:0}.handsontable .manualColumnResizerGuide.active{z-index:209;display:block}.handsontable .manualRowResizer{z-index:210;cursor:row-resize;opacity:0;background:0 0;height:10px;margin:0;position:absolute;left:0}.handsontable .manualRowResizer:before,.handsontable .manualRowResizer:after{content:"";background:var(--ht-resize-indicator-color);border-radius:2px;width:calc(100% - 12px);max-width:16px;height:2px;display:block;position:absolute;top:1px;left:50%;transform:translate(-50%)}.handsontable .manualRowResizer:after{top:auto;bottom:0}.handsontable .manualRowResizer:hover,.handsontable .manualRowResizer.active{opacity:1}.handsontable .manualRowResizerGuide{border-bottom:1px solid var(--ht-accent-color);border-top:none;height:0;margin-top:5px;display:none;position:absolute;bottom:0;left:0}.handsontable .manualRowResizerGuide.active{z-index:209;display:block}.handsontable tbody td[rowspan][class*=area][class*=highlight]:not([class*=fullySelectedMergedCell]):before{opacity:0}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-multiple]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before{opacity:.14}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.21}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.28}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-3]:before{opacity:.35}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-4]:before{opacity:.42}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.49}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.56}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.63}.handsontable .ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable .ht__manualColumnMove.on-moving--columns *,.handsontable .ht__manualColumnMove.on-moving--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.on-moving--columns *,.handsontable.ht__manualColumnMove.on-moving--columns thead th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable .ht__manualColumnMove.on-moving--columns .manualColumnResizer,.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--guideline,.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--backlight{height:100%;display:none;position:absolute}.handsontable .ht__manualColumnMove--guideline,.handsontable.ht__manualColumnMove--guideline{z-index:205;background:var(--ht-move-indicator-color,#1a42e8);width:1px;margin-inline:-.5px 0;top:0}.handsontable .ht__manualColumnMove--backlight,.handsontable.ht__manualColumnMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable .on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline,.handsontable.on-moving--columns .ht__manualColumnMove--backlight{display:block}.handsontable .wtHider{position:relative}.handsontable .ht__manualRowMove.after-selection--rows tbody th.ht__highlight,.handsontable.ht__manualRowMove.after-selection--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable .ht__manualRowMove.on-moving--rows *,.handsontable .ht__manualRowMove.on-moving--rows tbody th.ht__highlight,.handsontable.ht__manualRowMove.on-moving--rows *,.handsontable.ht__manualRowMove.on-moving--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable .ht__manualRowMove.on-moving--rows .manualRowResizer,.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--guideline,.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--backlight{width:100%;display:none;position:absolute}.handsontable .ht__manualRowMove--guideline,.handsontable.ht__manualRowMove--guideline{border-top:1px solid var(--ht-move-indicator-color);z-index:205;left:0}.handsontable .ht__manualRowMove--backlight,.handsontable.ht__manualRowMove--backlight{z-index:205;pointer-events:none;background:color-mix(in srgb,var(--ht-move-backlight-color)var(--ht-move-backlight-opacity,100%),transparent);display:none}.handsontable .on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable .on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline,.handsontable.on-moving--rows .ht__manualRowMove--backlight{display:block}.ht-dialog{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);z-index:1060;opacity:0;border-radius:var(--ht-wrapper-border-radius);border:1px solid var(--ht-border-color);width:100%;height:100%;display:none;position:absolute;top:0;left:0;overflow-y:auto;box-sizing:border-box!important}.ht-dialog[dir=rtl]{left:auto;right:0}.ht-dialog:focus{border:1px solid var(--ht-accent-color);outline:none}.ht-dialog:has(.htFocusCatcher:focus){border:1px solid var(--ht-accent-color);outline:none}.ht-dialog *{box-sizing:border-box!important}.ht-dialog--background-solid{background-color:var(--ht-dialog-solid-background-color)}.ht-dialog--background-semi-transparent{background-color:color-mix(in srgb,var(--ht-dialog-semi-transparent-background-color)var(--ht-dialog-semi-transparent-background-opacity,100%),transparent)}.ht-dialog--animation{transition:opacity var(--ht-table-transition)ease-in-out}.ht-dialog--show{opacity:1}.ht-dialog__content-wrapper{width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*4);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-dialog__content{padding:var(--ht-dialog-content-padding-horizontal)var(--ht-dialog-content-padding-vertical);max-width:480px;color:var(--ht-foreground-color);position:relative}.ht-dialog__content--background{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,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper{text-align:center;padding:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-dialog--confirm .ht-dialog__content-wrapper-inner--background{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,#000)var(--ht-shadow-opacity,100%),transparent);border-radius:var(--ht-dialog-content-border-radius);background-color:var(--ht-dialog-content-background-color)}.ht-dialog--confirm .ht-dialog__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-dialog--confirm .ht-dialog__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-dialog--confirm .ht-dialog__content:has(.ht-dialog__buttons){gap:calc(var(--ht-gap-size)*2)}.ht-dialog--confirm .ht-dialog__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-dialog--confirm .ht-dialog__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-dialog--confirm .ht-dialog__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-notification{z-index:1070;pointer-events:none;position:absolute;inset:0;overflow:visible}.ht-notification__stack{overscroll-behavior:contain;pointer-events:auto;-webkit-overflow-scrolling:touch;scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);flex-direction:column;gap:10px;max-width:min(420px,100% - 40px);min-height:0;padding:10px;display:flex;position:absolute;overflow:hidden auto}.ht-notification__stack--top-start{top:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--top-end{top:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__stack--bottom-start{bottom:10px;align-items:flex-start;max-height:calc(100% - 40px);inset-inline-start:10px}.ht-notification__stack--bottom-end{bottom:10px;align-items:flex-end;max-height:calc(100% - 40px);inset-inline-end:10px}.ht-notification__toast{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,#000)var(--ht-shadow-opacity,100%),transparent);pointer-events:auto;max-width:100%;color:var(--ht-notification-foreground-color,var(--ht-foreground-color));background-color:var(--ht-notification-background-color,var(--ht-background-color));border:1px solid var(--ht-notification-border-color,var(--ht-border-color));border-radius:var(--ht-wrapper-border-radius,4px);font-size:var(--ht-font-size);line-height:var(--ht-line-height);letter-spacing:var(--ht-letter-spacing);outline:none;flex-shrink:0;display:flex;position:relative}.ht-notification__toast:focus-visible{box-shadow:0 0 0 1px var(--ht-accent-color)}.ht-notification__toast--animate{opacity:0;transition:opacity var(--ht-table-transition,.15s)ease-out,transform var(--ht-table-transition,.15s)ease-out}.ht-notification__toast--animate.ht-notification__toast--stack-top:not(.ht-notification__toast--visible){transform:translateY(-6px)}.ht-notification__toast--animate.ht-notification__toast--stack-bottom:not(.ht-notification__toast--visible){transform:translateY(6px)}.ht-notification__toast--visible{opacity:1;transform:translateY(0)}.ht-notification__toast--info .ht-notification__accent{display:none}.ht-notification__toast--success .ht-notification__accent{background-color:var(--ht-notification-success-accent,#37bc6c)}.ht-notification__toast--warning .ht-notification__accent{background-color:var(--ht-notification-warning-accent,#fbe952)}.ht-notification__toast--error .ht-notification__accent{background-color:var(--ht-notification-error-accent,#fa4d32)}.ht-notification__toast-inner{width:100%;min-width:0;direction:inherit;flex-direction:row;align-items:stretch;gap:0;padding:10px;display:flex}.ht-notification__accent{box-sizing:border-box;border-radius:4px;flex:0 0 4px;align-self:stretch;margin-inline-end:10px}.ht-notification__body{flex:auto;min-width:0}.ht-notification__title{margin:0 0 var(--ht-gap-size);font-size:var(--ht-font-size);font-weight:var(--ht-font-weight,600)}.ht-notification__message{font-size:var(--ht-font-size-small);word-break:break-word;margin:0}.ht-notification__actions{gap:var(--ht-gap-size);margin-top:var(--ht-gap-size);flex-wrap:wrap;display:flex}.ht-notification__close{box-sizing:border-box;width:var(--ht-icon-button-hit-area-size);height:var(--ht-icon-button-hit-area-size);color:var(--ht-icon-button-icon-color,inherit);cursor:pointer;border-radius:var(--ht-icon-button-border-radius,var(--ht-wrapper-border-radius,4px));background:0 0;border:none;flex:none;align-self:flex-start;margin-inline-start:4px;padding:0;position:relative;overflow:visible}.ht-notification__close:before{content:"";top:50%;margin-top:calc(-.5*var(--ht-icon-size));margin-inline-start:calc(-.5*var(--ht-icon-size));display:block;position:absolute;inset-inline-start:50%}.ht-notification__close:hover{color:var(--ht-icon-button-hover-icon-color,inherit);background-color:var(--ht-icon-button-hover-background-color,color-mix(in srgb,var(--ht-foreground-color)8%,transparent))}.ht-notification__close:focus-visible{outline:2px solid var(--ht-accent-color);outline-offset:2px}.handsontable.ht-pagination{color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);border:1px solid var(--ht-wrapper-border-color);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;border-top-color:#0000;overflow-x:auto}.handsontable.ht-pagination--bordered{border-top-color:var(--ht-wrapper-border-color)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);border-radius:0 0 var(--ht-wrapper-border-radius)var(--ht-wrapper-border-radius);padding-inline:var(--ht-pagination-bar-horizontal-padding);padding-block:var(--ht-pagination-bar-vertical-padding);flex-wrap:wrap;min-width:230px;display:flex}.handsontable.ht-pagination .ht-page-size-section{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.handsontable.ht-pagination .ht-page-size-section__label{white-space:nowrap}.handsontable.ht-pagination .ht-page-size-section__select-wrapper{border-radius:var(--ht-input-border-radius);position:relative}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select{padding-inline-start:var(--ht-gap-size);padding-inline-end:calc(var(--ht-gap-size) + var(--ht-icon-size));padding-top:var(--ht-gap-size);padding-bottom:var(--ht-gap-size);border-radius:var(--ht-input-border-radius);color:var(--ht-input-foreground-color);background-color:var(--ht-input-background-color);border:1px solid var(--ht-input-border-color);line-height:calc(var(--ht-line-height) - 4px);-webkit-appearance:none;font-size:inherit;cursor:pointer}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:disabled{opacity:.4;cursor:default;color:var(--ht-input-disabled-foreground-color);background-color:var(--ht-input-disabled-background-color);border-color:var(--ht-input-disabled-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:hover:not(:disabled){color:var(--ht-input-hover-foreground-color);background-color:var(--ht-input-hover-background-color);border-color:var(--ht-input-hover-border-color)}.handsontable.ht-pagination .ht-page-size-section__select-wrapper select:focus{color:var(--ht-input-focus-foreground-color);background-color:var(--ht-input-focus-background-color);border-color:var(--ht-input-focus-border-color);outline:none}.handsontable.ht-pagination .ht-page-size-section__select-wrapper:after{content:"";background-color:var(--ht-foreground-color);pointer-events:none;display:block;position:absolute;inset-block-end:50%;inset-inline-end:var(--ht-gap-size);transform:translateY(50%)}.handsontable.ht-pagination .ht-page-counter-section{margin-inline-end:auto}.handsontable.ht-pagination .ht-page-navigation-section{align-items:center;gap:1px;display:flex}.handsontable.ht-pagination .ht-page-navigation-section__button{font-size:inherit;border:1px solid var(--ht-pagination-button-border-color);color:var(--ht-pagination-button-foreground-color);background-color:var(--ht-pagination-button-background-color);border-radius:var(--ht-icon-button-large-border-radius);padding:var(--ht-icon-button-large-padding);cursor:pointer}.handsontable.ht-pagination .ht-page-navigation-section__button:before{content:"";display:block}.handsontable.ht-pagination .ht-page-navigation-section__button--disabled{cursor:default;pointer-events:none;color:var(--ht-pagination-button-disabled-foreground-color);background-color:var(--ht-pagination-button-disabled-background-color);border-color:var(--ht-pagination-button-disabled-border-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:hover:not(:disabled){border-color:var(--ht-pagination-button-hover-border-color);color:var(--ht-pagination-button-hover-foreground-color);background-color:var(--ht-pagination-button-hover-background-color)}.handsontable.ht-pagination .ht-page-navigation-section__button:focus{border-color:var(--ht-pagination-button-focus-border-color);color:var(--ht-pagination-button-focus-foreground-color);background-color:var(--ht-pagination-button-focus-background-color);outline:none}.handsontable.ht-pagination .ht-page-navigation-section__label{white-space:nowrap;text-align:center;min-width:100px}.handsontable.ht-wrapper.htPagination:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}.handsontable.ht-wrapper.htPagination .htCore:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:first-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-right-radius:0}:is(.handsontable.ht-wrapper.htPagination .htCore thead tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child td:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.handsontable.ht-wrapper.htPagination .htCore tbody tr:last-child th:last-child:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-bottom-left-radius:0}.ht-loading__icon-svg{width:var(--ht-icon-size);height:var(--ht-icon-size);color:var(--ht-accent-color);transform-origin:50%;animation:1s linear infinite ht-loading-spin;display:block}.ht-loading__content{align-items:center;gap:calc(var(--ht-gap-size)*2);display:flex}.ht-loading__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-loading__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}@keyframes ht-loading-spin{to{transform:rotate(360deg)}}.ht-empty-data-state{scrollbar-width:auto;scrollbar-color:var(--ht-scrollbar-thumb-color)var(--ht-scrollbar-track-color);z-index:999;border:1px solid var(--ht-border-color);border-radius:var(--ht-wrapper-border-radius);box-sizing:border-box;background-color:var(--ht-background-color);width:100%;display:none;position:absolute;left:0;overflow-y:auto}.ht-empty-data-state *{box-sizing:border-box!important}.ht-empty-data-state__content-wrapper{text-align:center;width:100%;min-height:100%;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner{max-width:480px;padding:calc(var(--ht-gap-size)*2);border-radius:var(--ht-wrapper-border-radius);flex-direction:column;justify-content:center;align-items:center;display:flex}.ht-empty-data-state__content-wrapper-inner:focus{box-shadow:0 0 0 1px var(--ht-accent-color);outline:none}.ht-empty-data-state__content{justify-content:center;align-items:center;gap:var(--ht-gap-size);flex-direction:column;display:flex}.ht-empty-data-state__title{font-size:var(--ht-font-size);font-weight:var(--ht-font-weight);line-height:var(--ht-line-height);margin:0}.ht-empty-data-state__description{color:var(--ht-foreground-secondary-color);font-size:var(--ht-font-size-small);line-height:var(--ht-line-height-small);font-weight:var(--ht-font-weight);margin:0}.ht-empty-data-state__buttons{justify-content:center;gap:calc(var(--ht-gap-size)*2);flex-flow:wrap;display:flex}.ht-empty-data-state__buttons--has-buttons{margin-top:calc(var(--ht-gap-size)*2)}.ht-empty-data-state__spinner{width:28px;height:28px;margin-bottom:calc(var(--ht-gap-size)*2);border:2px solid var(--ht-border-color);border-top-color:var(--ht-accent-color);border-radius:50%;flex-shrink:0;animation:.75s linear infinite ht-empty-data-state-spin}@media (prefers-reduced-motion:reduce){.ht-empty-data-state__spinner{border-top-color:var(--ht-border-color);animation:none}}.ht-empty-data-state--loading .ht-empty-data-state__content{gap:calc(var(--ht-gap-size)*.5)}.ht-empty-data-state--disable-top-border{border-top-width:0}.ht-empty-data-state--disable-top-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),.ht-empty-data-state--disable-top-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-top-right-radius:0}.ht-empty-data-state--disable-inline-border{border-inline-start-width:0}.ht-empty-data-state--disable-inline-border:not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-left-radius:0;border-bottom-left-radius:0}.ht-empty-data-state--disable-inline-border:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-top-right-radius:0;border-bottom-right-radius:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)){border-bottom-width:0}:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):not(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),:is(.ht-empty-data-state--disable-bottom-border,.ht-empty-data-state:has(~.ht-pagination)):is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-bottom-right-radius:0;border-bottom-left-radius:0}@keyframes ht-empty-data-state-spin{to{transform:rotate(360deg)}}',df(this,yf).head.appendChild(e)}function Df(){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 Nf(){gf(this,Cf,getComputedStyle(df(this,vf)));const t=pf(this,Tf,Pf).call(this,["box-sizing","border-bottom-width"]);df(this,kf).td={...df(this,kf).td,"box-sizing":t["box-sizing"],"border-bottom-width":t["border-bottom-width"]}}function Pf(t){const e=df(this,yf),n=df(this,vf),o=e.createElement("table"),i=e.createElement("tbody"),s=e.createElement("tr"),r=e.createElement("tr"),a=e.createElement("td");r.appendChild(a),i.appendChild(s),i.appendChild(r),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 Wf(t){const e=Math.ceil(parseFloat(pf(this,Hf,Lf).call(this,t)));return Number.isNaN(e)?null:e}function Lf(t){const e=df(this,Cf)?.getPropertyValue(t);return""===e?null:e}function Bf(){gf(this,kf,{}),gf(this,Sf,{})}let Vf=null,Ff=0;var zf={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"},$f={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 Uf=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),jf=new Set(["light","dark","auto"]),Yf=new Set(["default","compact","comfortable"]),Gf=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),qf=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","iconButtonHitAreaSize","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","notificationForegroundColor","notificationBackgroundColor","notificationBorderColor","notificationSuccessAccent","notificationWarningAccent","notificationErrorAccent","paginationBarForegroundColor","paginationBarBackgroundColor","paginationBarHorizontalPadding","paginationBarVerticalPadding","paginationButtonBorderColor","paginationButtonForegroundColor","paginationButtonBackgroundColor","paginationButtonHoverBorderColor","paginationButtonHoverForegroundColor","paginationButtonHoverBackgroundColor","paginationButtonDisabledForegroundColor","paginationButtonDisabledBackgroundColor","paginationButtonDisabledBorderColor","paginationButtonFocusBorderColor","paginationButtonFocusForegroundColor","paginationButtonFocusBackgroundColor","chipBackground","chipBorderRadius","chipVerticalPadding","chipHorizontalPadding","chipGap"]);function Kf(t){if(!jf.has(t)){bt(`[ThemeBuilder] Invalid color scheme: "${t}". Must be one of: ${[...jf].join(", ")}.`)}return t}function Xf(t){if(!Yf.has(t)){bt(`[ThemeBuilder] Invalid density: "${t}". Must be one of: ${[...Yf].join(", ")}.`)}return t}function Zf(t,e){Et(t)?(t.type&&t.sizes||bt(`[ThemeBuilder] ${e} must be a string or an object with a 'type' and 'sizes' property.`),Xf(t.type),function(t,e){Et(t)||bt(`[ThemeBuilder] ${e}.sizes must be an object.`),Object.keys(t).forEach(t=>{Yf.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&&Xf(t)}function Qf(t,e){Object.entries(t).forEach(([t,n])=>{const o=`${e}.${t}`;"string"!=typeof n&&(Et(n)?Qf(n,o):bt(`[ThemeBuilder] ${o} must be a string or an object.`))})}function Jf(t,e,n,o={}){const{type:i="key",warnMissing:s=!1}=o;if(!t)return void(s&&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.`)}),s){const o=[];e.forEach(e=>{e in t||o.push(e)}),o.length>0&&Qt(`[ThemeBuilder] Missing ${i}(s) in ${n}: ${o.join(", ")}`)}}function tm(t,e,n={}){const{requiredFields:o=[]}=n;"object"==typeof t&&null!==t||bt(`[ThemeBuilder] ${e} must be an object.`);const{name:i,sizing:s,density:r,icons:a,colors:l,tokens:h,colorScheme:c}=t;Jf(t,Uf,e,{type:"param"}),o.forEach(n=>{void 0===t[n]&&bt(`[ThemeBuilder] ${e}.${n} is required.`)}),void 0!==i&&function(t,e){"string"==typeof t&&""!==t.trim()||bt(`[ThemeBuilder] ${e}.name must be a non-empty string.`)}(i,e),void 0!==s&&(Et(s)||bt(`[ThemeBuilder] ${e}.sizing must be an object.`)),void 0!==r&&(Et(r)||"string"==typeof r||bt(`[ThemeBuilder] ${e}.density must be a string or an object.`),Zf(r,`${e}.density`)),void 0!==a&&(Et(a)||bt(`[ThemeBuilder] ${e}.icons must be an object.`),Jf(a,Gf,`${e}.icons`,{type:"icon",warnMissing:o.includes("icons")})),void 0!==l&&(Et(l)||bt(`[ThemeBuilder] ${e}.colors must be an object.`),Qf(l,`${e}.colors`)),void 0!==h&&(Et(h)||bt(`[ThemeBuilder] ${e}.tokens must be an object.`),Jf(h,qf,`${e}.tokens`,{type:"token",warnMissing:o.includes("tokens")})),void 0!==c&&Kf(c)}function em(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nm(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function om(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,nm(t,e,"get"))}function im(t,e,n){em(t,e),e.set(t,n)}function sm(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,nm(t,e,"set"),n),n}function rm(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function am(t,e){em(t,e),e.add(t)}const lm=["sizing","icons","colors","tokens"],hm=["name","icons","colors","tokens"];var cm=new WeakMap,dm=new WeakMap,um=new WeakMap,gm=new WeakMap,pm=new WeakMap,fm=new WeakSet,mm=new WeakSet,wm=new WeakSet;class bm{subscribe(t){return"function"!=typeof t&&bt("[ThemeBuilder] listener must be a function."),om(this,um).add(t),()=>om(this,um).delete(t)}params(t){return tm(t,"params"),rm(this,wm,ym).call(this,t),rm(this,fm,vm).call(this),this}setColorScheme(t){return sm(this,gm,Kf(t)),om(this,dm).colorScheme=om(this,gm),om(this,cm).colorScheme=om(this,gm),rm(this,fm,vm).call(this),this}setDensityType(t){return sm(this,pm,Xf(t)),om(this,dm).density.type=om(this,pm),om(this,cm).density.type=om(this,pm),rm(this,fm,vm).call(this),this}getThemeConfig(){return om(this,dm)}constructor(t){am(this,fm),am(this,mm),am(this,wm),im(this,cm,{writable:!0,value:void 0}),im(this,dm,{writable:!0,value:void 0}),im(this,um,{writable:!0,value:void 0}),im(this,gm,{writable:!0,value:void 0}),im(this,pm,{writable:!0,value:void 0}),sm(this,um,new Set),sm(this,gm,"auto"),sm(this,pm,"default"),tm(t,"themeConfig",{requiredFields:hm}),sm(this,cm,{name:void 0,sizing:zf,density:{type:om(this,pm),sizes:$f},icons:{},colors:{},tokens:{},colorScheme:om(this,gm)}),rm(this,wm,ym).call(this,t),sm(this,cm,om(this,dm))}}function vm(){const t=this.getThemeConfig();om(this,um).forEach(e=>e(t))}function Cm(t,e){Et(e)?(t.density=Nt(t.density,e),sm(this,pm,e.type),om(this,cm)?.density&&(om(this,cm).density.type=e.type)):"string"==typeof e&&(t.density.type=e,sm(this,pm,e),om(this,cm)?.density&&(om(this,cm).density.type=e))}function ym(t){const e=St(om(this,cm));void 0!==t.name&&(void 0!==om(this,cm).name?Qt('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):e.name=t.name),lm.forEach(n=>{void 0!==t[n]&&Et(t[n])&&(e[n]=Nt(e[n],t[n]))}),void 0!==t.density&&rm(this,mm,Cm).call(this,e,t.density),void 0!==t.colorScheme&&(e.colorScheme=t.colorScheme,sm(this,gm,t.colorScheme),om(this,cm)?.colorScheme&&(om(this,cm).colorScheme=t.colorScheme)),sm(this,dm,e)}const Sm=(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;`,km="--ht-",Rm=["font-family"],xm=["tokens.","colors.","sizing.","density."];function Em(t,e){if(function(t){return"string"==typeof t&&xm.some(e=>t.includes(e))}(t))return(n=t).includes("tokens.")?`var(${km}${Z(n.split(".").slice(1).join("-"))})`:`var(${km}${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(${Em(n,e)}, ${Em(o,e)})`:"string"==typeof n?Em(n,e):"string"==typeof o?Em(o,e):""}return Em(t[0],e)}return e&&Rm.includes(e)?String(t):Z(t)}function Mm(t,e,n){return`${function(t,e){return`${km}${t?`${t}-`:""}${Z(e)}`}(t,e)}: ${Em(n,e)};`}function Tm(t,e="",n=""){let o="";return Object.entries(t).forEach(([t,i])=>{const s=Z(t),r=n?`${n}-${s}`:s;Et(i)?o+=Tm(i,e,r):o+=`${Mm(e,r,i)}\n`}),o}function _m(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hm(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Im(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Hm(t,e,"get"))}function Am(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Hm(t,e,"set"),n),n}function Om(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var Dm=new WeakMap,Nm=new WeakSet;class Pm{getClassName(){return this.themeClassName}update(t){var e;this.hot&&(void 0===t.getThemeConfig&&bt('[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&&(null===(e=Im(this,Dm))||void 0===e||e.call(this),Am(this,Dm,t.subscribe(t=>{this.hot?.stylesHandler&&(this.themeConfig=t,Om(this,Nm,Wm).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(){Om(this,Nm,Wm).call(this)}unmount(){this.themeStyles&&this.themeStyles.remove()}destroy(){var t;null===(t=Im(this,Dm))||void 0===t||t.call(this),this.unmount(),this.hot.themeManager=null}constructor({hot:t,themeObject:e}){var n,o;_m(n=this,o=Nm),o.add(n),function(t,e,n){_m(t,e),e.set(t,n)}(this,Dm,{writable:!0,value:void 0}),Am(this,Dm,null),this.hot=t,this.update(e)}}function Wm(){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.themeConfig.sizing&&(this.themeStyles.textContent+=Tm(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+=Tm(this.themeConfig.density.sizes[this.themeConfig.density.type],"density")),this.themeConfig.colors&&(this.themeStyles.textContent+=Tm(this.themeConfig.colors,"colors")),this.themeConfig.tokens&&(this.themeStyles.textContent+=Tm(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 ${Sm(e,"arrowRight")}\n}\n\n.pika-single .pika-prev {\n ${Sm(e,"arrowLeft")}\n}\n\n.ht-page-size-section__select-wrapper::after {\n ${Sm(e,"arrowDown")}\n}\n\n.changeType::before {\n ${Sm(e,"menu")}\n}\n\n.htUISelectCaption::after,\n.htAutocompleteArrow::after {\n ${Sm(e,"selectArrow")}\n}\n\n.columnSorting.sortAction.ascending::before {\n ${Sm(e,"arrowNarrowUp")}\n}\n\n.columnSorting.sortAction.descending::before {\n ${Sm(e,"arrowNarrowDown")}\n}\n\n.ht-page-navigation-section .ht-page-first::before {\n ${Sm(e,"arrowLeftWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-first::before {\n ${Sm(e,"arrowRightWithBar")}\n}\n\n.ht-page-navigation-section .ht-page-prev::before {\n ${Sm(e,"arrowLeft")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-prev::before {\n ${Sm(e,"arrowRight")}\n}\n\n.ht-page-navigation-section .ht-page-next::before {\n ${Sm(e,"arrowRight")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-next::before {\n ${Sm(e,"arrowLeft")}\n}\n\n.ht-page-navigation-section .ht-page-last::before {\n ${Sm(e,"arrowRightWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-last::before {\n ${Sm(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 ${Sm(e,"check")}\n}\n\n.htCheckboxRendererInput {\n appearance: none;\n}\n\n.htCheckboxRendererInput::after {\n ${Sm(e,"checkbox")}\n}\n\nth.beforeHiddenColumn::after {\n ${Sm(e,"caretHiddenLeft")}\n}\n\nth.afterHiddenColumn::before {\n ${Sm(e,"caretHiddenRight")}\n}\n\nth.beforeHiddenRow::after {\n ${Sm(e,"caretHiddenUp")}\n}\n\nth.afterHiddenRow::before {\n ${Sm(e,"caretHiddenDown")}\n}\n\n.collapsibleIndicator::before,\n.ht_nestingButton::before {\n ${Sm(e,"collapseOff")}\n}\n\n.collapsibleIndicator.collapsed::before,\n.ht_nestingButton.ht_nestingExpand::before {\n ${Sm(e,"collapseOn")}\n}\n\n.htUIRadio > input[type="radio"]::after {\n ${Sm(e,"radio")}\n}\n\n.ht-multi-select-chip-remove::before {\n ${Sm(e,"chipClose")}\n}\n\n.ht-notification__close::before {\n ${Sm(e,"chipClose")}\n}\n\n.ht-multi-select-editor-search-icon {\n ${Sm(e,"search")}\n}\n\n.ht-multi-select-editor-item-selected input::after {\n ${Sm(e,"checkbox")}\n}`)),this.themeStyles.textContent+="}\n",this.themeStyles.textContent+=`.${this.themeClassName} {\ncolor-scheme: ${t};\n}`,this.hot.rootWrapperElement&&this.hot.rootWrapperElement.querySelector("style")?this.hot.rootWrapperElement.querySelector("style").textContent=this.themeStyles.textContent:this.hot.rootWrapperElement.prepend(this.themeStyles)}const Lm={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.49268 11.2929L6.19978 8.00001L9.49268 4.70712' 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.headerRowBackgroundColor",rowHeaderEvenBackgroundColor:"tokens.headerRowBackgroundColor",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"],iconButtonHitAreaSize:"sizing.size_6",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",paginationButtonBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonForegroundColor:"tokens.foregroundSecondaryColor",paginationButtonBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonHoverBorderColor:["colors.palette.100","colors.palette.700"],paginationButtonHoverForegroundColor:"tokens.foregroundColor",paginationButtonHoverBackgroundColor:["colors.palette.100","colors.palette.700"],paginationButtonDisabledBorderColor:"tokens.paginationBarBackgroundColor",paginationButtonDisabledForegroundColor:"tokens.disabledColor",paginationButtonDisabledBackgroundColor:"tokens.paginationBarBackgroundColor",paginationButtonFocusBorderColor:"tokens.accentColor",paginationButtonFocusForegroundColor:"tokens.foregroundColor",paginationButtonFocusBackgroundColor:"tokens.paginationBarBackgroundColor",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",notificationForegroundColor:"tokens.foregroundColor",notificationBackgroundColor:"tokens.backgroundColor",notificationBorderColor:"tokens.backgroundColor",notificationSuccessAccent:"#37bc6cff",notificationWarningAccent:"#fbe952ff",notificationErrorAccent:"#fa4d32ff",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:Bm,getItem:Vm,getNames:Fm,getValues:zm,register:$m}=Hn("themes");function Um(t){return Bm(t)}function jm(t){if(Um(t))return Vm(t);Qt(`Theme "${t}" is not registered. Please ensure it is registered before using it.`)}function Ym(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 bm(o);return Um(n)?(Qt(`Theme "${n}" is already registered. Registration skipped.`),jm(n)):($m(n,i),i)}let Gm=null;const qm=new Map;function Km(t,e,n=!1){let o=this;const i=new Fn(o);let s,r,a,l,h,c,d=!0;const u={...e.initialState,...e};var g;qa(n)&&(g=this,Ya.set(g,!0)),this.rootContainer=t,this.rootWrapperElement=void 0,this.rootGridElement=void 0,this.rootPortalElement=void 0,this.rootElement=Ka(this)?t.ownerDocument.createElement("div"):t,this.rootDocument=t.ownerDocument,this.rootWindow=this.rootDocument.defaultView,Ka(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),this.rootWrapperElement.__hotInstance=this,ue(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const p=u?.layoutDirection??"inherit",f=["rtl","ltr"].includes(p)?p:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",f),this.rootWrapperElement?.setAttribute("dir",f),this.isRtl=function(){return"rtl"===f},this.isLtr=function(){return!o.isRtl()},this.getDirectionFactor=function(){return o.isLtr()?1:-1},this.stylesHandler=new Af({hot:o,rootElement:o.rootElement,rootDocument:o.rootDocument,onThemeChange:t=>{Ka(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.`)),this.view?._wt?.selectionManager?.refreshAllBorderHandleStyles())},injectCoreCss:"boolean"!=typeof e?.injectCoreCss||e.injectCoreCss}),this.themeManager=null,u.language=function(t){let e=vh(t);return Yd(e)||(e=Bd,Ch(t)),e}(u.language);const m=Object.fromEntries(Object.entries(u).filter(([t])=>!(Mn.getSingleton().isRegistered(t)||Mn.getSingleton().isDeprecated(t)))),w=new Eg(o,m,[Hg,Wg]),b=w.getTableMeta(),v=w.getGlobalMeta(),C=bo();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${j()}`,qm.set(this.guid,this),this.columnIndexMapper=new fh,this.rowIndexMapper=new fh,this.columnIndexMapper.addLocalHook("indexesSequenceChange",t=>{o.runHooks("afterColumnSequenceChange",t)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",t=>{o.runHooks("afterRowSequenceChange",t)}),i.addEventListener(this.rootDocument.documentElement,"compositionstart",t=>{o.runHooks("beforeCompositionStart",t)}),r=new hg(o);const k=Hn(this.guid);k.register("cellRangeMapper",new Kg({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let T=new eg(b,{rowIndexMapper:o.rowIndexMapper,columnIndexMapper:o.columnIndexMapper,countCols:()=>o.countCols(),countRows:()=>o.countRows(),propToCol:t=>s.propToCol(t),isEditorOpened:()=>!!o.getActiveEditor()&&o.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:(...t)=>this.view.countRenderableRowsInRange(...t),countRenderableColumnsInRange:(...t)=>this.view.countRenderableColumnsInRange(...t),getShortcutManager:()=>o.getShortcutManager(),createCellCoords:(t,e)=>o._createCellCoords(t,e),createCellRange:(t,e,n)=>o._createCellRange(t,e,n),visualToRenderableCoords:t=>{const{row:e,col:n}=t;return o._createCellCoords(e>=0?o.rowIndexMapper.getRenderableFromVisualIndex(e):e,n>=0?o.columnIndexMapper.getRenderableFromVisualIndex(n):n)},renderableToVisualCoords:t=>{const{row:e,col:n}=t;return o._createCellCoords(e>=0?o.rowIndexMapper.getVisualFromRenderableIndex(e):e,n>=0?o.columnIndexMapper.getVisualFromRenderableIndex(n):n)},findFirstNonHiddenRenderableRow:(t,e)=>{const n=e>t?1:-1,i=Math.min(t,e),s=Math.max(t,e),r=o.rowIndexMapper.getNearestNotHiddenIndex(t,n);return null===r||1===n&&r>s||-1===n&&r<i?null:r>=0?o.rowIndexMapper.getRenderableFromVisualIndex(r):r},findFirstNonHiddenRenderableColumn:(t,e)=>{const n=e>t?1:-1,i=Math.min(t,e),s=Math.max(t,e),r=o.columnIndexMapper.getNearestNotHiddenIndex(t,n);return null===r||1===n&&r>s||-1===n&&r<i?null:r>=0?o.columnIndexMapper.getRenderableFromVisualIndex(r):r},isDisabledCellSelection:(t,e)=>t<0||e<0?o.getSettings().disableVisualSelection:o.getCellMeta(t,e).disableVisualSelection});this.selection=T;const _=({hiddenIndexesChanged:t})=>{this.forceFullRender=!0,t&&this.selection.commit()};function H(t,e){const n="className"===t?o.rootElement:o.table;if(d)ue(n,e);else{let o=[],i=[];v[t]&&(o=Array.isArray(v[t])?v[t]:M(v[t])),e&&(i=Array.isArray(e)?e:M(e));const s=E(o,i),r=E(i,o);s.length&&ge(n,s),r.length&&ue(n,r)}v[t]=e}function D(t){let e;void 0===t?(e=Um("main")?jm("main"):Ym(Lm),e=jm("main")):e="function"!=typeof t.getThemeConfig?Ym(t):t,o.themeManager=function({hot:t,themeObject:e}){return new Pm({hot:t,themeObject:e})}({hot:o,themeObject:e})}function N(){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 P(t,e){return!!e?.isOpened()&&function(t,e,n){return t.some(([t,o])=>t===e&&o===n)}(t,e.row,e.prop)}function W(t,e,n){if(!t.length)return void n();const i=o.getActiveEditor(),r=new N;let a=!0;r.onQueueEmpty=()=>{i&&a&&i._closeAfterDataChange&&P(t,i)&&i.cancelChanges(),n()};for(let n=t.length-1;n>=0;n--){const[i,l,,h]=t[n],c=s.propToCol(l);let d;d=Number.isInteger(c)?o.getCellMeta(i,c):{...Object.getPrototypeOf(b),...b},o.getCellValidator(d)&&(r.addValidatorToQueue(),o.validateCell(h,d,function(e,n){return function(o){"boolean"!=typeof o&&bt("Validation error: result is not boolean"),!1===o&&!1===n.allowInvalid&&(a=!1,t.splice(e,1),n.valid=!0),r.removeValidatorFormQueue()}}(n,d),e))}r.checkIfQueueIsEmpty()}function L(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(b.allowInsertRow)for(;t[e][0]>o.countRows()-1;){const{delta:t}=s.createRow(void 0,void 0,{source:"auto"});if(0===t){n=!0;break}}if("array"===o.dataType&&(!b.columns||0===b.columns.length)&&b.allowInsertColumn)for(;s.propToCol(t[e][1])>o.countCols()-1;){const{delta:t}=s.createCol(void 0,void 0,{source:"auto"});if(0===t){n=!0;break}}n||s.set(t[e][0],t[e][1],t[e][3])}}else t.splice(e,1)}const n=t.length>0,i=l.getActiveEditor(),r=i?._closeAfterDataChange,h=P(t,i);n?(a.adjustRowsAndCols(),o.runHooks("beforeChangeRender",t,e),i?.isOpened()&&r&&h&&l.closeEditor(),o.view.adjustElementsSize(),o.render(),(i?.isOpened()&&r&&h||!i?.isOpened())&&l.prepareEditor(),o.runHooks("afterChange",t,e||"edit"),i&&I(i.refreshValue)&&(!i.isOpened()||h)&&i.refreshValue()):o.render()}function B(t,e,n){return Array.isArray(t)?t:[[t,e,n]]}function V(t,e){const n=o.runHooks("beforeChange",t,e||"edit"),i=t.filter(t=>null!==t);if(!1===n||0===i.length)return o.getActiveEditor()?.cancelChanges(),[];for(let t=i.length-1;t>=0;t--){const[e,n,,r]=i[t],a=s.propToCol(n);let l;l=Number.isInteger(a)?o.getCellMeta(e,a):{...Object.getPrototypeOf(b),...b},i[t][3]=rg(r,l)}return i}this.columnIndexMapper.addLocalHook("cacheUpdated",t=>{_(t),this.runHooks("afterColumnSequenceCacheUpdate",t)}),this.rowIndexMapper.addLocalHook("cacheUpdated",t=>{_(t),this.runHooks("afterRowSequenceCacheUpdate",t)}),this.selection.addLocalHook("afterSetRangeEnd",(t,e)=>{const n=At(!1),i=this.selection.getSelectedRange(),{from:s,to:r}=i.current(),a=i.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,n,a),this.runHooks("afterSelectionByProp",s.row,o.colToProp(s.col),r.row,o.colToProp(r.col),n,a);const h=T.getSelectionSource();!e||["loadData","updateData","deselect","shift"].includes(h)||n.isTouched()&&(!n.isTouched()||n.value)||c.scrollTo(t);const d=T.isSelectedByRowHeader(),u=T.isSelectedByColumnHeader();d&&u?ue(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?(ge(this.rootElement,"ht__selection--columns"),ue(this.rootElement,"ht__selection--rows")):u?(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","deselect"].includes(h)||l.closeEditor(null),["refresh","loadData","updateData","deselect"].includes(h)||(o.view.render(),l.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)&&c.scrollTo(t),l.closeEditor(),o.view.render(),l.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",t=>{const e=t.length-1,{from:n,to:i}=t[e];this.runHooks("afterSelectionEnd",n.row,n.col,i.row,i.col,e),this.runHooks("afterSelectionEndByProp",n.row,o.colToProp(n.col),i.row,o.colToProp(i.col),e),["refresh","deselect"].includes(T.getSelectionSource())&&(o.view.render(),l.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",t=>{const e=this.runHooks("afterIsMultipleSelection",t.value);t.value&&(t.value=e)}),this.selection.addLocalHook("afterDeselect",()=>{l.closeEditor(),o.view.render(),ge(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(...t)=>this.runHooks("beforeSetRangeStart",...t)).addLocalHook("beforeSetRangeStartOnly",(...t)=>this.runHooks("beforeSetRangeStartOnly",...t)).addLocalHook("beforeSetRangeEnd",(...t)=>this.runHooks("beforeSetRangeEnd",...t)).addLocalHook("beforeSelectColumns",(...t)=>this.runHooks("beforeSelectColumns",...t)).addLocalHook("afterSelectColumns",(...t)=>this.runHooks("afterSelectColumns",...t)).addLocalHook("beforeSelectRows",(...t)=>this.runHooks("beforeSelectRows",...t)).addLocalHook("afterSelectRows",(...t)=>this.runHooks("afterSelectRows",...t)).addLocalHook("beforeSelectAll",(...t)=>this.runHooks("beforeSelectAll",...t)).addLocalHook("afterSelectAll",(...t)=>this.runHooks("afterSelectAll",...t)).addLocalHook("beforeModifyTransformStart",(...t)=>this.runHooks("modifyTransformStart",...t)).addLocalHook("afterModifyTransformStart",(...t)=>this.runHooks("afterModifyTransformStart",...t)).addLocalHook("beforeModifyTransformFocus",(...t)=>this.runHooks("modifyTransformFocus",...t)).addLocalHook("afterModifyTransformFocus",(...t)=>this.runHooks("afterModifyTransformFocus",...t)).addLocalHook("beforeModifyTransformEnd",(...t)=>this.runHooks("modifyTransformEnd",...t)).addLocalHook("afterModifyTransformEnd",(...t)=>this.runHooks("afterModifyTransformEnd",...t)).addLocalHook("beforeRowWrap",(...t)=>this.runHooks("beforeRowWrap",...t)).addLocalHook("beforeColumnWrap",(...t)=>this.runHooks("beforeColumnWrap",...t)).addLocalHook("insertRowRequire",t=>this.alter("insert_row_above",t,1,"auto")).addLocalHook("insertColRequire",t=>this.alter("insert_col_start",t,1,"auto")),a={alter(t,e,n=1,i,r){if(!1===o.runHooks("beforeAlter",t,e,n,i,r))return;const h=t=>{if(0===t.length)return[];const e=[...t];e.sort(([t],[e])=>t===e?0:t>e?1:-1);return S(e,(t,[e,n])=>{const o=t[t.length-1],[i,s]=o,r=i+s;if(e<=r){const t=Math.max(n-(r-e),0);o[1]+=t}else t.push([e,n]);return t},[e[0]])};switch(t){case"insert_row_below":case"insert_row_above":const r=o.countSourceRows();if(b.maxRows===r)return;const a="insert_row_below"===t?"below":"above";e=e??("below"===a?r:0);const{delta:c,startPhysicalIndex:d}=s.createRow(e,n,{source:i,mode:a});T.shiftRows(o.toVisualRow(d),c);break;case"insert_col_start":case"insert_col_end":const u="insert_col_end"===t?"end":"start";e=e??("end"===u?o.countSourceCols():0);const{delta:g,startPhysicalIndex:p}=s.createCol(e,n,{source:i,mode:u});if(g){if(Array.isArray(b.colHeaders)){const t=[o.toVisualColumn(p),0];t.length+=g,Array.prototype.splice.apply(b.colHeaders,t)}T.shiftColumns(o.toVisualColumn(p),g)}break;case"remove_row":const f=t=>{let e=0;x(t,([t,n])=>{const r=O(t)?o.countRows()-1:Math.max(t-e,0);Number.isInteger(t)&&(t=Math.max(t-e,0));if(!s.removeRow(t,n,i))return;if(T.isSelected()){const{row:e}=o.getSelectedRangeActive().highlight;e>=t&&e<=t+n-1&&l.closeEditor(!0)}const a=o.countRows(),h=b.fixedRowsTop;h>=r+1&&(b.fixedRowsTop-=Math.min(n,h-r));const c=b.fixedRowsBottom;if(c&&r>=a-c&&(b.fixedRowsBottom-=Math.min(n,c)),0===a)T.deselect();else if("ContextMenu.removeRow"===i){const t=T.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),T.refresh()}else T.shiftRows(t,-n);e+=n})};Array.isArray(e)?f(h(e)):f([[e,n]]);break;case"remove_col":const m=t=>{let e=0;x(t,([t,n])=>{const r=O(t)?o.countCols()-1:Math.max(t-e,0);let a=o.toPhysicalColumn(r);Number.isInteger(t)&&(t=Math.max(t-e,0));if(!s.removeCol(t,n,i))return;if(T.isSelected()){const{col:e}=o.getSelectedRangeActive().highlight;e>=t&&e<=t+n-1&&l.closeEditor(!0)}if(0===o.countCols())T.deselect();else if("ContextMenu.removeColumn"===i){const t=T.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),T.refresh()}else T.shiftColumns(t,-n);const h=b.fixedColumnsStart;h>=r+1&&(b.fixedColumnsStart-=Math.min(n,h-r)),Array.isArray(b.colHeaders)&&(void 0===a&&(a=-1),b.colHeaders.splice(a,n)),e+=n})};Array.isArray(e)?m(h(e)):m([[e,n]]);break;default:bt(`There is no such action "${t}"`)}r||a.adjustRowsAndCols(),o.view.adjustElementsSize(),o.view.render()},adjustRowsAndCols(){const t=b.minRows,e=b.minSpareRows,n=b.minCols,i=b.minSpareCols;if(t){const e=o.countRows();e<t&&s.createRow(e,t-e,{source:"auto"})}if(e){const t=o.countEmptyRows(!0);if(t<e){const n=e-t,i=Math.min(n,b.maxRows-o.countSourceRows());s.createRow(o.countRows(),i,{source:"auto"})}}{let t;(n||i)&&(t=o.countEmptyCols(!0));let e=o.countCols();if(n&&!b.columns&&e<n){const o=n-e;t+=o,s.createCol(e,o,{source:"auto"})}if(i&&!b.columns&&"array"===o.dataType&&t<i){e=o.countCols();const n=i-t,r=Math.min(n,b.maxCols-e);s.createCol(e,r,{source:"auto"})}}},populateFromArray(t,e,n,i,s){let r,a,l,h;const c=[],d={},u=[],g=t.row,p=t.col;if(a=e.length,0===a)return!1;let f=0,m=0;switch(Et(n)&&(f=n.col-p+1,m=n.row-g+1),s){case"shift_down":const s=y(e),w=s.length,v=Math.max(w,f),C=o.getData().slice(g),S=y(C).slice(p,p+v);for(l=0;l<v;l+=1)if(l<w){for(r=0,a=s[l].length;r<m-a;r+=1)s[l].push(s[l][r%a]);l<S.length?u.push(s[l].concat(S[l])):u.push(s[l].concat(new Array(C.length).fill(null)))}else u.push(s[l%w].concat(S[l]));o.populateFromArray(g,p,y(u));break;case"shift_right":const k=e.length,R=Math.max(k,m),x=o.getData().slice(g).map(t=>t.slice(p));for(r=0;r<R;r+=1)if(r<k){for(l=0,h=e[r].length;l<f-h;l+=1)e[r].push(e[r][l%h]);if(r<x.length)for(let t=0;t<x[r].length;t+=1)e[r].push(x[r][t]);else e[r].push(...new Array(x[0].length).fill(null))}else e.push(e[r%a].slice(0,R).concat(x[r]));o.populateFromArray(g,p,e);break;default:d.row=t.row,d.col=t.col;let E,M=0,T=0,_=!0;const H="Autofill.fill"===i||"autofill.fill"===i,I=function(t,n=null){const o=e[t%e.length];return null!==n?o[n%o.length]:o},A=e.length,O=n?n.row-t.row+1:0;for(a=n?O:Math.max(A,O),r=0;r<a&&!(n&&d.row>n.row&&O>A||!b.allowInsertRow&&d.row>o.countRows()-1||d.row>=b.maxRows);r++){const e=H?r:r-M,s=I(e).length,u=n?n.col-t.col+1:0;if(h=n?u:Math.max(s,u),d.col=t.col,E=o.getCellMeta(d.row,d.col),"CopyPaste.paste"!==i&&"Autofill.fill"!==i&&"autofill.fill"!==i||!E.skipRowOnPaste){for(T=0,l=0;l<h&&!(n&&d.col>n.col&&u>s||!b.allowInsertColumn&&d.col>o.countCols()-1||d.col>=b.maxCols);l++){if(E=o.getCellMeta(d.row,d.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&E.skipColumnOnPaste){T+=1,d.col+=1,"CopyPaste.paste"===i&&(h+=1);continue}if(E.readOnly&&"UndoRedo.undo"!==i){d.col+=1;continue}const t=H?l:l-T,n=!!E.valueSetter;let s=I(e,t),r=o.getSourceDataAtCell(d.row,d.col)??null;if(null!==s&&"object"==typeof s)if(Array.isArray(s)&&null===r&&(r=[]),n||"object"==typeof r&&null!==r){if(null!==r){const t=vt(Array.isArray(r)?r:r[0]||r),e=vt(Array.isArray(s)?s:s[0]||s);n||xt(t,e)||Array.isArray(t)&&Array.isArray(e)?s=St(s):_=!1}}else _=!1,E.parsePastedValue&&"CopyPaste.paste"===i&&(_=!0);else n||null===r||"object"!=typeof r||(_=!1);_&&c.push([d.row,d.col,s]),_=!0,d.col+=1}d.row+=1}else M+=1,d.row+=1,"CopyPaste.paste"===i&&(a+=1)}o.setDataAtCell(c,null,null,i||"populateFromArray")}}},this.init=function(){var t,e;r.setData(b.data),o.runHooks("beforeInit"),(Yt()||qt())&&ue(o.rootElement,"mobile"),this.updateSettings(u,!0),this.view=new wl(this),l=Yn.getInstance(o,b,T),c=tp(o),h.init(),Ka(this)&&(!function(t){const e=t.ownerDocument;if(!Vf){Vf=e.createElement("div"),Vf.setAttribute("role","status"),Vf.setAttribute("aria-live","assertive"),Vf.setAttribute("aria-atomic","true");const n=Vf.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(Vf)}Ff+=1}(o.rootPortalElement),$(u.licenseKey,this.rootWrapperElement,"19/05/2026")),o.runHooks("init"),this.render(),d&&null===o.rootElement.offsetParent&&(t=o.rootElement,e=()=>{o.view._wt.wtOverlays.updateLastSpreaderSize(),o.view.adjustElementsSize(),o.render()},new IntersectionObserver((t,n)=>{t.forEach(t=>{t.isIntersecting&&(e(),n.disconnect())})}).observe(t)),"object"==typeof d&&(o.runHooks("afterChange",d[0],d[1]),d=!1),o.runHooks("afterInit")},this._createCellCoords=function(t,e){return o.view._wt.createCellCoords(t,e)},this._createCellRange=function(t,e,n){return o.view._wt.createCellRange(t,e,n)},this.validateCell=function(t,e,n,i){let s=o.getCellValidator(e);function r(t,i=!0){if(!i||!0===e.hidden)return void n(t);const s=e.visualCol,r=e.visualRow,a=o.getCell(r,s,!0);if(a&&"TH"!==a.nodeName){const t=o.rowIndexMapper.getRenderableFromVisualIndex(r),e=o.columnIndexMapper.getRenderableFromVisualIndex(s);o.view._wt.getSetting("cellRenderer",t,e,a)}n(t)}var a,l;l=s,"[object RegExp]"===Object.prototype.toString.call(l)&&(a=s,s=function(t,e){e(a.test(t))}),Ze(s)?(t=o.runHooks("beforeValidate",t,e.visualRow,e.prop,i),o._registerMicrotask(()=>{s.call(e,t,n=>{o&&(n=o.runHooks("afterValidate",n,t,e.visualRow,e.prop,i),e.valid=n,r(n),o.runHooks("postAfterValidate",n,t,e.visualRow,e.prop,i))})})):o._registerMicrotask(()=>{e.valid=!0,r(e.valid,!1)})},this.setDataAtCell=function(t,e,n,i){const a=B(t,e,n),l=[];let h,c,d,u=i;for(h=0,c=a.length;h<c;h++){const[t,e,n]=a[h];"object"!=typeof a[h]&&bt("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof a[h][1]&&bt("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:s.colToProp(e),l.push([t,d,r.getAtCell(this.toPhysicalRow(t),e),n])}u||"object"!=typeof t||(u=e);const g=V(l,u);o.runHooks("afterSetDataAtCell",g,u),W(g,u,()=>{L(g,u)})},this.setDataAtRowProp=function(t,e,n,i){const s=B(t,e,n),a=[];let l,h,c=i;for(l=0,h=s.length;l<h;l++){const[t,e,n]=s[l];a.push([t,e,r.getAtCell(this.toPhysicalRow(t),e),n])}c||"object"!=typeof t||(c=e);const d=V(a,c);o.runHooks("afterSetDataAtRowProp",d,c),W(d,c,()=>{L(d,c)})},this.listen=function(){o&&!o.isListening()&&(qm.forEach(t=>{o!==t&&t.unlisten()}),Gm=o.guid,o.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(Gm=null,o.runHooks("afterUnlisten"))},this.isListening=function(){return Gm===o.guid},this.destroyEditor=function(t=!1,e=!0){l.closeEditor(t),o.view.render(),e&&T.isSelected()&&l.prepareEditor()},this.populateFromArray=function(t,e,n,i,s,r,l){"object"==typeof n&&"object"==typeof n[0]||bt("populateFromArray parameter `input` must be an array of arrays");const h="number"==typeof i?o._createCellCoords(i,s):null;return a.populateFromArray(o._createCellCoords(t,e),n,h,r,l)},this.spliceCol=function(t,e,n,...o){return s.spliceCol(t,e,n,...o)},this.spliceRow=function(t,e,n,...o){return s.spliceRow(t,e,n,...o)},this.getSelected=function(){if(T.isSelected())return R(T.getSelectedRange(),({from:t,to:e})=>[t.row,t.col,e.row,e.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(T.isSelected())return Array.from(T.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 T.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return T.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(t){if(!T.isSelected()||0===this.countRows()||0===this.countCols())return;const e=[];x(T.getSelectedRange(),t=>{if(t.isSingleHeader())return;const n=t.getTopStartCorner(),o=t.getBottomEndCorner(),i=Math.max(n.row,0),s=Math.min(o.row,this.countRows()-1),r=Math.max(n.col,0),a=Math.min(o.col,this.countCols()-1);i>s||r>a||ao(i,s,t=>{ao(r,a,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||o.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||o.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(t=!1){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,e=!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(!o.view)return;const t=o.view,{width:e,height:n}=t.getLastSize(),{width:i,height:s}=o.rootElement.getBoundingClientRect(),r=i!==e||s!==n;!1===o.runHooks("beforeRefreshDimensions",{width:e,height:n},{width:i,height:s},r)||((r||t._wt.wtOverlays.scrollableElement===o.rootWindow)&&(t.setLastSize(i,s),t.adjustElementsSize(),o.render()),o.runHooks("afterRefreshDimensions",{width:e,height:n},{width:i,height:s},r))},this.updateData=function(t,e){_g(t,t=>{s=t},t=>{s=t,o.columnIndexMapper.fitToLength(this.getInitialColumnCount()),o.rowIndexMapper.fitToLength(this.countSourceRows()),a.adjustRowsAndCols(),T.markSource("updateData"),T.refresh(),T.markEndSource()},{hotInstance:o,dataMap:s,dataSource:r,internalSource:"updateData",source:e,metaManager:w,firstRun:d})},this.loadData=function(t,e){_g(t,t=>{s=t},()=>{w.clearCellsCache(),o.initIndexMappers(),a.adjustRowsAndCols(),T.markSource("loadData"),T.refresh(),T.markEndSource(),d&&(d=[null,"loadData"])},{hotInstance:o,dataMap:s,dataSource:r,internalSource:"loadData",source:e,metaManager:w,firstRun:d})},this.getInitialColumnCount=function(){const t=b.columns;let e=0;if(Array.isArray(t))e=t.length;else if(Ze(t))if("array"===o.dataType){const n=this.countSourceCols();for(let o=0;o<n;o+=1)t(o)&&(e+=1)}else"object"!==o.dataType&&"function"!==o.dataType||(e=s.colToPropCache.length);else if(I(b.dataSchema)){const t=s.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,i){return A(t)?s.getAll():s.getRange(o._createCellCoords(t,e),o._createCellCoords(n,i),s.DESTINATION_RENDERER)},this.getCopyableText=function(t,e,n,i){return s.getCopyableText(o._createCellCoords(t,e),o._createCellCoords(n,i))},this.getCopyableData=function(t,e){return s.getCopyable(t,s.colToProp(e))},this.getCopyableSourceData=function(t,e){return r.getCopyable(t,s.colToProp(e))},this.getSchema=function(){return s.getSchema()},this.updateSettings=function(t,e=!1){const n=(d?o.loadData:o.updateData).bind(this);let i,r,l=!1;for(i in I(t.rows)&&bt('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),I(t.cols)&&bt('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),I(t.ganttChart)&&bt('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"===i||"language"===i);else if("className"===i)H("className",t.className);else if("tableClassName"===i&&o.table)H("tableClassName",t.tableClassName),o.view._wt.wtOverlays.syncOverlayTableClassNames();else if(Mn.getSingleton().isRegistered(i)||Mn.getSingleton().isDeprecated(i)){const e=t[i];Ze(e)?(Mn.getSingleton().addAsFixed(i,e,o),b[i]=e):Array.isArray(e)&&(Mn.getSingleton().add(i,e,o),b[i]=e)}else!e&&Ot(t,i)&&(v[i]=t[i]);const h=lf(o.rootContainer),c=Ot(t,"themeName"),u=Ot(t,"theme");if(c&&u&&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;u&&"string"==typeof t.theme?e=t.theme:c&&"string"==typeof t.themeName&&t.themeName&&!u?(e=t.themeName,b.theme=t.themeName,b.themeName=void 0):h?e=h:o.themeManager&&(e=o.themeManager.getClassName()),o.useTheme(e)}else{const e=o.getCurrentThemeName();if(u&&"string"==typeof t.theme&&e!==t.theme)o.useTheme(t.theme),o.themeManager?.unmount();else if(c&&!u&&e!==t.themeName)b.theme=t.themeName,b.themeName=void 0,o.useTheme(t.themeName),o.themeManager?.unmount();else if(Ka(o)&&!h&&Et(t.theme))if(null===o.themeManager)D(t.theme),o.useTheme(o.themeManager.getClassName());else{let e;e="function"!=typeof t.theme.getThemeConfig?Ym(t.theme):t.theme,o.themeManager.update(e),o.useTheme(o.themeManager.getClassName())}}if(!0===o.runHooks("hasExternalDataSource")){t.data&&Qt('The "data" setting is ignored when "hasExternalDataSource" returns `true`.');e||Ot(t,"data")||Ot(t,"dataProvider")?n([],"updateSettings"):void 0!==t.columns&&(s.createMap(),o.initIndexMappers())}else void 0===t.data&&void 0===b.data?n(null,"updateSettings"):void 0!==t.data?n(t.data,"updateSettings"):void 0!==t.columns&&(s.createMap(),o.initIndexMappers());!d&&t.language&&function(t){const e=vh(t);Yd(e)?(o.runHooks("beforeLanguageChange",e),v.language=e,o.runHooks("afterLanguageChange",e)):Ch(t)}(t.language);const g=o.countCols(),p=b.columns;if(p&&Ze(p)&&(l=!0),void 0===t.cell&&void 0===t.cells&&void 0===t.columns||w.clearCache(),g>0)for(i=0,r=0;i<g;i++){if(p){const t=l?p(i):p[r];t&&w.updateColumnMeta(r,t)}r+=1}I(t.cell)&&Tt(t.cell,t=>{o.setCellMetaObject(t.row,t.col,t)}),o.runHooks("afterCellMetaReset"),d&&Mg(o,"init");let f=o.rootElement.style.height;if(""!==f&&(f=parseInt(o.rootElement.style.height,10)),e){o.rootElement.getAttribute("style")&&o.rootElement.setAttribute("data-initialstyle",o.rootElement.getAttribute("style"))}let m=t.height;if(void 0!==t.height)if(Ze(m)&&(m=m()),m=o.runHooks("beforeHeightChange",m),null===m){const t=o.rootElement.getAttribute("data-initialstyle");t&&(t.indexOf("height")>-1||t.indexOf("overflow")>-1)?o.rootElement.setAttribute("style",t):(o.rootElement.style.height="",o.rootElement.style.overflow="")}else void 0!==m&&(o.rootElement.style.height=isNaN(m)?`${m}`:`${m}px`,o.rootElement.style.overflow="clip");if(void 0!==t.width){let e=t.width;Ze(e)&&(e=e()),e=o.runHooks("beforeWidthChange",e),o.rootElement.style.width=isNaN(e)?`${e}`:`${e}px`}e||(o.view&&(o.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),o.view._wt.exportSettingsAsClassNames(),o.view.invalidateIndexSizesCache()),T.updateHighlightClassNames(),o.runHooks("afterUpdateSettings",t)),a.adjustRowsAndCols(),o.view&&!d&&(o.render(),o.view._wt.wtOverlays.adjustElementsSize()),e||!o.view||""!==f&&""!==m&&void 0!==m||f===m||o.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const t=o.getSelectedRangeActive();if(b.getValue){if(Ze(b.getValue))return b.getValue.call(o);if(t)return o.getData()[t.highlight.row][b.getValue]}else if(t)return o.getDataAtCell(t.highlight.row,t.highlight.col);return null},this.getSettings=function(){return b},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(t,e,n,o,i){a.alter(t,e,n,o,i)},this.getCell=function(t,e,n=!1){let i=e,s=t;if(e>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(e)))return null;i=this.columnIndexMapper.getRenderableFromVisualIndex(e)}if(t>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(t)))return null;s=this.rowIndexMapper.getRenderableFromVisualIndex(t)}return null===s||null===i||void 0===s||void 0===i?null:o.view.getCellAtCoords(o._createCellCoords(s,i),n)},this.getCoords=function(t){const e=this.view._wt.wtTable.getCoords(t);if(null===e)return null;const{row:n,col:i}=e;let s=n,r=i;return n>=0&&(s=this.rowIndexMapper.getVisualFromRenderableIndex(n)),i>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(i)),o._createCellCoords(s,r)},this.colToProp=function(t){return s.colToProp(t)},this.propToCol=function(t){return s.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 s.get(t,s.colToProp(e))},this.getDataAtRowProp=function(t,e){return s.get(t,e)},this.getDataAtCol=function(t){const e=[],n=s.getRange(o._createCellCoords(0,t),o._createCellCoords(b.data.length-1,t),s.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=s.getRange(o._createCellCoords(0,s.propToCol(t)),o._createCellCoords(b.data.length-1,s.propToCol(t)),s.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,i){let s;return s=void 0===t?r.getData():r.getByRange(o._createCellCoords(t,e),o._createCellCoords(n,i)),s},this.getSourceDataArray=function(t,e,n,i){let s;return s=void 0===t?r.getData(!0):r.getByRange(o._createCellCoords(t,e),o._createCellCoords(n,i),!0),s},this.getSourceDataAtCol=function(t){return r.getAtColumn(t)},this.setSourceDataAtCell=function(t,e,n,i){const s=B(t,e,n),a=this.hasHook("afterSetSourceDataAtCell"),l=[],h=(t,e)=>{const n=this.toVisualRow(t),o=this.toVisualColumn(e);return Number.isInteger(o)?this.getCellMeta(n,o):{...Object.getPrototypeOf(b),...b}};a&&x(s,([t,e,n])=>{const o=rg(n,h(t,e));l.push([t,e,r.getAtCell(t,e),o])}),x(s,([t,e,n])=>{const o=h(t,e),s=rg(n,o);(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:s,sourceDataWarningMessage:r,allowInvalid:a}=e;return r&&Tg(r,[{row:i,col:s,value:t}]),!0===a})(s,o,i??"setSourceDataAtCell")&&r.setAtCell(t,e,s)}),a&&this.runHooks("afterSetSourceDataAtCell",l,i),this.render();const c=o.getActiveEditor();c&&I(c.refreshValue)&&c.refreshValue()},this.getSourceDataAtRow=function(t){return r.getAtRow(t)},this.getSourceDataAtCell=function(t,e){return r.getAtCell(t,e)},this.getDataAtRow=function(t){return s.getRange(o._createCellCoords(t,0),o._createCellCoords(t,this.countCols()-1),s.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],[s,r]=i;let[,,a,l]=i,h=null,c=null;void 0===a&&(a=s),void 0===l&&(l=r);let d="mixed";return ao(Math.max(Math.min(s,a),0),Math.max(s,a),t=>{let e=!0;return ao(Math.max(Math.min(r,l),0),Math.max(r,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[i,s]=[this.toPhysicalRow(t),this.toPhysicalColumn(e)];let r=w.getCellMetaKeyValue(i,s,n);!1!==o.runHooks("beforeRemoveCellMeta",t,e,n,r)&&(w.removeCellMeta(i,s,n),o.runHooks("afterRemoveCellMeta",t,e,n,r)),r=null},this.spliceCellsMeta=function(t,e=0,...n){n.length>0&&!Array.isArray(n[0])&&bt("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),e>0&&w.removeRow(this.toPhysicalRow(t),e),n.length>0&&x(n.reverse(),e=>{w.createRow(this.toPhysicalRow(t)),x(e,(e,n)=>this.setCellMetaObject(t,n,e))}),o.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,i){if(!1===o.runHooks("beforeSetCellMeta",t,e,n,i))return;let s=t,r=e;t<this.countRows()&&(s=this.toPhysicalRow(t)),e<this.countCols()&&(r=this.toPhysicalColumn(e)),w.setCellMeta(s,r,n,i),o.runHooks("afterSetCellMeta",t,e,n,i)},this.getCellsMeta=function(){return w.getCellsMeta()},this.getCellMeta=function(t,e,n={skipMetaExtension:!1}){let o=this.toPhysicalRow(t),i=this.toPhysicalColumn(e);return null===o&&(o=t),null===i&&(i=e),w.getCellMeta(o,i,{visualRow:t,visualColumn:e,...n})},this.getColumnMeta=function(t){return w.getColumnMeta(this.toPhysicalColumn(t))},this.getCellMetaAtRow=function(t){return w.getCellsMetaAtRow(t)},this.isColumnModificationAllowed=function(){return!("object"===o.dataType||b.columns)},this.getCellRenderer=function(t,e){const n="number"==typeof t?o.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?o.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?o.getCellMeta(t,e).validator:t.validator;return"string"==typeof n?"function"==typeof(i=n)?i:(Po(i)||bt(`No registered validator found under "${i}" name`),No(i)):n;var i},this.validateCells=function(t){this._validateCells(t)},this.validateRows=function(t,e){Array.isArray(t)||bt("validateRows parameter `rows` must be an array"),this._validateCells(e,t)},this.validateColumns=function(t,e){Array.isArray(t)||bt("validateColumns parameter `columns` must be an array"),this._validateCells(e,void 0,t)},this._validateCells=function(t,e,n){const i=new N;t&&(i.onQueueEmpty=t);let s=o.countRows()-1;for(;s>=0;){if(void 0!==e&&-1===e.indexOf(s)){s-=1;continue}let t=o.countCols()-1;for(;t>=0;)void 0===n||-1!==n.indexOf(t)?(i.addValidatorToQueue(),o.validateCell(o.getDataAtCell(s,t),o.getCellMeta(s,t),t=>{"boolean"!=typeof t&&bt("Validation error: result is not boolean"),!1===t&&(i.valid=!1),i.removeValidatorFormQueue()},"validateCells"),t-=1):t-=1;s-=1}i.checkIfQueueIsEmpty()},this.getRowHeader=function(t){let e=b.rowHeaders,n=t;return void 0!==n&&(n=o.runHooks("modifyRowHeader",n)),void 0===n?(e=[],ao(o.countRows()-1,t=>{e.push(o.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!!b.rowHeaders},this.hasColHeaders=function(){if(void 0!==b.colHeaders&&null!==b.colHeaders)return!!b.colHeaders;for(let t=0,e=o.countCols();t<e;t++)if(o.getColHeader(t))return!0;return!1},this.getColHeader=function(t,e=-1){const n=o.runHooks("modifyColHeader",t);if(void 0===n){const t=[],e=o.countCols();for(let n=0;n<e;n++)t.push(o.getColHeader(n));return t}let i=b.colHeaders;const s=o.toPhysicalColumn(n),r=function(t){const e=[],n=o.countCols();let i=0;for(;i<n;i++)Ze(b.columns)&&b.columns(i)&&e.push(i);return e[t]}(s);return!1===b.colHeaders?i=null:b.columns&&Ze(b.columns)&&b.columns(r)&&b.columns(r).title?i=b.columns(r).title:b.columns&&b.columns[s]&&b.columns[s].title?i=b.columns[s].title:Array.isArray(b.colHeaders)&&void 0!==b.colHeaders[s]?i=b.colHeaders[s]:Ze(b.colHeaders)?i=b.colHeaders(s):b.colHeaders&&"string"!=typeof b.colHeaders&&"number"!=typeof b.colHeaders&&(i=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)),i=o.runHooks("modifyColumnHeaderValue",i,t,e),i},this._getColWidthFromSettings=function(t){let e;if(t>=0){e=o.getCellMeta(0,t).width}if(void 0!==e&&e!==b.width||(e=b.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=o._getColWidthFromSettings(t);return n=o.runHooks("modifyColWidth",n,t,e),void 0===n&&(n=Qo),n},this._getRowHeightFromSettings=function(t){const e=o.stylesHandler.getDefaultRowHeight(t);let n=b.rowHeights??b.minRowHeights;if(null!=n){switch(typeof n){case"object":n=n[t];break;case"function":n=n(t)}"string"==typeof n&&(n=Number.parseInt(n,10))}return null!=n&&n<e?e:n},this.getRowHeight=function(t,e){let n=o._getRowHeightFromSettings(t);return n=o.runHooks("modifyRowHeight",n,t,e),n},this.countSourceRows=function(){return r.countRows()},this.countSourceCols=function(){return r.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){const t=b.maxCols,e=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(t,e)},this.countRenderedRows=function(){return o.view._wt.drawn?o.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return o.view._wt.drawn?o.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return o.view._wt.drawn?o.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return o.view._wt.drawn?o.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(t=!1){let e=0;return lo(o.countRows()-1,n=>{if(o.isEmptyRow(n))e+=1;else if(!0===t)return!1}),e},this.countEmptyCols=function(t=!1){let e=0;return lo(o.countCols()-1,n=>{if(o.isEmptyCol(n))e+=1;else if(!0===t)return!1}),e},this.isEmptyRow=function(t){return b.isEmptyRow.call(o,t)},this.isEmptyCol=function(t){return b.isEmptyCol.call(o,t)},this.selectCell=function(t,e,n,o,i=!0,s=!0){return!A(t)&&!A(e)&&this.selectCells([[t,e,n,o]],i,s)},this.selectCells=function(t=[[]],e=!0,n=!0){!1===e&&c.suspend();const i=T.selectCells(t);return i&&n&&o.listen(),c.resume(),i},this.selectColumns=function(t,e=t,n){return T.selectColumns(t,e,n)},this.selectRows=function(t,e=t,n){return T.selectRows(t,e,n)},this.deselectCell=function(){T.deselect()},this.selectAll=function(t=!0,e=t,n){c.skipNextScrollCycle(),T.selectAll(t,e,n)};const F=(t,e)=>t.getNearestNotHiddenIndex(e,1,!0);this.scrollViewportTo=function(t,e){"number"==typeof t&&(t={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:arguments[4]??!0});const{row:n,col:i,considerHiddenIndexes:s}=t??{};let r=n,a=i;if(Ze(e)&&this.addHookOnce("afterScroll",e),void 0===s||s){const t=Number.isInteger(n)&&n>=0,e=Number.isInteger(i)&&i>=0,s=t?F(this.rowIndexMapper,n):void 0,l=e?F(this.columnIndexMapper,i):void 0;if(null===s||null===l)return!1;r=t?o.rowIndexMapper.getRenderableFromVisualIndex(s):n,a=e?o.columnIndexMapper.getRenderableFromVisualIndex(l):i}const l=Number.isInteger(r),h=Number.isInteger(a);let c=!1;return l&&r>=0&&h&&a>=0?c=o.view.scrollViewport(o._createCellCoords(r,a),t.horizontalSnap,t.verticalSnap):l&&r>=0&&(h&&a<0||!h)?c=o.view.scrollViewportVertically(r,t.verticalSnap):h&&a>=0&&(l&&r<0||!l)&&(c=o.view.scrollViewportHorizontally(a,t.horizontalSnap)),Ze(e)&&(c?this.view.render():(this.removeHook("afterScroll",e),this._registerMicrotask(()=>e()))),c},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(){o._clearTimeouts(),o._clearMicrotasks(),o.view&&o.view.destroy(),r&&r.destroy(),r=null,Ka(this)&&(0!==Ff&&(1===Ff&&(Vf.remove(),Vf=null),Ff-=1),this.getFocusScopeManager().destroy(),o.themeManager?.destroy()),this.getShortcutManager().destroy(),k.clear(),w.clearCache(),qm.delete(this.guid),i.destroy(),l&&l.destroy(),o.rootContainer&&we(o.rootContainer),o.rootPortalElement&&o.rootPortalElement.remove(),o.batchExecution(()=>{o.rowIndexMapper.destroy(),o.columnIndexMapper.destroy(),C.getItems().forEach(([,t])=>{t.destroy()}),C.clear(),o.runHooks("afterDestroy")},!0),Mn.getSingleton().destroy(o),Tt(o,(t,e,n)=>{var o;Ze(t)?n[e]=(o=e,()=>{bt(`The "${o}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==e&&(n[e]=null)}),o.isDestroyed=!0,s&&s.destroy(),s=null,a=null,T=null,l=null,o=null},this.getActiveEditor=function(){return l.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return o.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return o.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return o.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return o.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return o.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return o.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return o.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return o.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return o.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return o.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return o.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return o.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(t){return C.getItem(U(t))},this.getPluginName=function(t){return C.getId(t)},this.getInstance=function(){return o},this.addHook=function(t,e,n){Mn.getSingleton().add(t,e,o,n)},this.hasHook=function(t){return Mn.getSingleton().has(t,o)||Mn.getSingleton().has(t)},this.addHookOnce=function(t,e,n){Mn.getSingleton().once(t,e,o,n)},this.removeHook=function(t,e){Mn.getSingleton().remove(t,e,o)},this.runHooks=function(t,e,n,i,s,r,a){return Mn.getSingleton().run(o,t,e,n,i,s,r,a)},this.getTranslatedPhrase=function(t,e){return Gd(b.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=!!d;this.stylesHandler.useTheme(t);const n=this.stylesHandler.getThemeName();!e&&n&&(lf(this.rootContainer)&&(ge(this.rootContainer,/ht-theme-.*/g),ue(this.rootContainer,n)),o.render(),o.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,e=0){let n=t;return"function"==typeof n&&(n=setTimeout(n,e)),this.timeouts.push(n),n},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 l},this._getDataSource=function(){return r},this._getMetaManager=function(){return w};const z=af({handleEvent:(t,e)=>"global"===e||o.isListening(),beforeKeyDown:t=>this.runHooks("beforeKeyDown",t),afterKeyDown:t=>{this.isDestroyed||o.runHooks("afterDocumentKeyDown",t)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",t=>{!1===t.ctrlKey&&!1===t.metaKey&&z.releasePressedKeys()}),this.getShortcutManager=function(){return z},h=new Ep(o);const Y=Ka(this)?sp(o):null;this.getFocusManager=function(){return h},this.getFocusScopeManager=function(){return Ka(o)||bt("The FocusScopeManager is only available for the main Handsontable instance."),Y};const G=u.theme,q=u.themeName,K=lf(o.rootContainer);var X;!Ka(o)||K||!Et(G)&&(G||q)||D(G),Ro().forEach(t=>{const e=xo(t);C.addItem(t,new e(this))}),X=o,[Yp,jp].forEach(t=>t(X)),Ka(this)&&function(t){[Gp].forEach(e=>e(t))}(o),z.setActiveContextName("grid"),Mn.getSingleton().run(o,"construct")}function Xm(t,e,n,o,i,s,r){const a=r.ariaTags,l=[],h=[],c=[],d=[];r._isBaseRendererCalled=!0,r.className&&ue(e,r.className),r.readOnly?(l.push(r.readOnlyCellClassName),a&&d.push(["aria-readonly","true"])):a&&c.push("aria-readonly"),!1===r.valid&&r.invalidCellClassName?(l.push(r.invalidCellClassName),a&&d.push(["aria-invalid","true"])):(h.push(r.invalidCellClassName),a&&c.push("aria-invalid")),!1===r.wordWrap&&r.noWordWrapClassName&&l.push(r.noWordWrapClassName),!s&&r.placeholder&&l.push(r.placeholderCellClassName),r.textEllipsis&&l.push("htTextEllipsis"),ge(e,h),ue(e,l),fe(e,c),pe(e,d)}function Zm(t,e,n){t.addEventListener(e,n,!1)}function Qm(t,e,n){t.removeEventListener(e,n,!1)}function Jm(t){return t.ownerDocument.defaultView.getComputedStyle(t)}function tw(t,e={}){const n={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:t=>t.value,...e},o=t.body,i=t.createTextNode(""),s=t.createElement("span");let r;function a(){i.textContent=n.textContent(r),s.style.position="absolute",s.style.fontSize=Jm(r).fontSize,s.style.fontFamily=Jm(r).fontFamily,s.style.whiteSpace="pre",o.appendChild(s);const t=parseInt(Jm(r)?.paddingInlineStart||0,10),e=parseInt(Jm(r)?.paddingInlineEnd||0,10),a=s.clientWidth+t+e+1;o.removeChild(s);const l=r.style;l.height=`${n.minHeight}px`,n.minWidth>a?l.width=`${n.minWidth}px`:a>n.maxWidth?l.width=`${n.maxWidth}px`:l.width=`${a}px`;const h=r.scrollHeight?r.scrollHeight-1:0;n.minHeight>h?l.height=`${n.minHeight}px`:n.maxHeight<h?(l.height=`${n.maxHeight}px`,l.overflowY="visible"):l.height=`${h}px`}function l(){t.defaultView.setTimeout(a,0)}return{init:function(t,e,o=!1){r=t,function(t){if(t&&t.minHeight)if("inherit"===t.minHeight)n.minHeight=r.clientHeight;else{const e=parseInt(t.minHeight,10);isNaN(e)||(n.minHeight=e)}if(t&&t.maxHeight)if("inherit"===t.maxHeight)n.maxHeight=r.clientHeight;else{const e=parseInt(t.maxHeight,10);isNaN(e)||(n.maxHeight=e)}if(t&&t.minWidth)if("inherit"===t.minWidth)n.minWidth=r.clientWidth;else{const e=parseInt(t.minWidth,10);isNaN(e)||(n.minWidth=e)}if(t&&t.maxWidth)if("inherit"===t.maxWidth)n.maxWidth=r.clientWidth;else{const e=parseInt(t.maxWidth,10);isNaN(e)||(n.maxWidth=e)}s.firstChild||(s.className="autoResize",s.style.display="inline-block",s.appendChild(i))}(e),"TEXTAREA"===r.nodeName&&(r.style.resize="none",r.style.height=`${n.minHeight}px`,r.style.minWidth=`${n.minWidth}px`,r.style.maxWidth=`${n.maxWidth}px`,r.style.overflowY="hidden"),o&&(Zm(r,"input",a),Zm(r,"keydown",l)),a()},resize:a,unObserve(){Qm(r,"input",a),Qm(r,"keydown",l)}}}function ew(t,e){const n=Pe(e),o=e.value.split("\n");let i=n,s=0;for(let e=0;e<o.length;e++){const r=o[e];0!==e&&(s+=o[e-1].length+1);const a=s+r.length;if("home"===t?i=s:"end"===t&&(i=a),n<=a)break}Le(e,i)}Xm.RENDERER_TYPE="base";const nw="ht_editor_hidden",ow="textEditor";class iw extends zp{static get EDITOR_TYPE(){return"text"}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(),ne(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(t,e,n,o,i,s){const r=this.state;if(super.prepare(t,e,n,o,i,s),!s.readOnly){this.refreshDimensions(!0);const{allowInvalid:t}=s;t&&!this.isOpened()&&(this.TEXTAREA.value=""),r===Fp.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(t,e){this.state===Fp.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(t,e))}focus(){this.TEXTAREA.select(),Le(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(t="textarea"){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement(t),pe(this.TEXTAREA,[["data-hot-input",""],Q(-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,nw),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,nw)}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,nw)&&ge(this.TEXTAREA_PARENT,nw),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(t=!1){if(this.state!==Fp.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:s,maxHeight:r}=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(s,r),maxWidth:i,maxHeight:r},!0)}bindEvents(){Gt()&&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===Fp.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===Fp.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={runOnlyIf:()=>I(this.hot.getSelected()),group:ow},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])=>{ew(e,this.TEXTAREA)}},{keys:[["End"]],callback:(t,[e])=>{ew(e,this.TEXTAREA)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(ow)}constructor(t){super(t),this.eventManager=new Fn(this),this.autoResize=tw(this.hot.rootDocument),this.eventManager=new Fn(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}}function sw(t,e,n,o,i,s,r){let a=s;!a&&r.placeholder&&(a=r.placeholder),a=H(a),r.trimWhitespace&&(a=a.trim()),Se(e,a)}sw.RENDERER_TYPE="text";const rw={CELL_TYPE:"text",editor:iw,renderer:sw};function aw(t,e){const n=new Km(t,e||{},Ga);return n.init(),n}function lw(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 hw(t,e,n){return e=pw(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,fw()?Reflect.construct(e,n||[],pw(t).constructor):e.apply(t,n))}function cw(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dw(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,vw(o.key),o)}}function uw(t,e,n){return e&&dw(t.prototype,e),n&&dw(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function gw(){return gw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},gw.apply(null,arguments)}function pw(t){return pw=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pw(t)}function fw(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(fw=function(){return!!t})()}function mw(t,e){return mw=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mw(t,e)}function ww(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,s,r,a=[],l=!0,h=!1;try{if(s=(n=n.call(t)).next,0===e);else for(;!(l=(o=s.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&&(r=n.return(),Object(r)!==r))return}finally{if(h)throw i}}return a}}(t,e)||yw(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 bw(t){return function(t){if(Array.isArray(t))return lw(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||yw(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 vw(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 Cw(t){"@babel/helpers - typeof";return Cw="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},Cw(t)}function yw(t,e){if(t){if("string"==typeof t)return lw(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)?lw(t,e):void 0}}fg(rw),Oo(Xm),aw.editors={BaseEditor:zp},aw.Core=function(t,e={}){return new Km(t,e,Ga)},aw.DefaultSettings=vg(),aw.hooks=Mn.getSingleton(),aw.CellCoords=ii,aw.CellRange=ci,aw.packageName="handsontable",aw.buildDate="19/05/2026 14:51:41",aw.version="17.1.0",aw.languages={dictionaryKeys:Ld,getLanguageDictionary:jd,getLanguagesDictionaries:function(){return $d()},registerLanguageDictionary:Ud,getTranslatedPhrase:Gd},aw.themes={hasTheme:Um,getTheme:jm,getThemeNames:function(){return Fm()},getThemes:function(){return zm()},registerTheme:Ym};var Sw=null;function kw(){var t;"undefined"!=typeof console&&(t=console).warn.apply(t,arguments)}function Rw(t){return xw(t,"hot-renderer")?(kw("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):!!xw(t,"hot-editor")&&(kw("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 xw(t,n){return e.Children.toArray(t).some(function(t){return void 0!==t.props[n]})}function Ew(t,n){if(!t||!n||"boolean"==typeof n)return null;var o=e.createElement(n,null),i=Mw({},!1);return i.className="".concat("hot-wrapper-editor-container"," ").concat(i.className),f.createPortal(e.createElement("div",i,o),t.body)}function Mw(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 Tw(t){return"object"===Cw(t)&&null!==t}function _w(t){if(!Tw(t))return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function Hw(t){return Array.isArray(t)}function Iw(t,e){if(t===e)return!0;if(t instanceof RegExp||e instanceof RegExp)return t instanceof RegExp&&e instanceof RegExp&&(t.source===e.source&&t.flags===e.flags);if(Hw(t)&&Hw(e)){if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!Iw(t[n],e[n]))return!1;return!0}if(Hw(t)||Hw(e))return!1;if(!Tw(t)||!Tw(e))return!1;if(!_w(t)||!_w(e))return!1;var o=Object.keys(t),i=Object.keys(e);if(o.length!==i.length)return!1;for(var s=0,r=o;s<r.length;s++){var a=r[s];if(!Object.prototype.hasOwnProperty.call(e,a))return!1;if(!Iw(t[a],e[a]))return!1}return!0}var Aw=["dataSchema","columns"],Ow=function(){return uw(function t(){cw(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,s=void 0!==i&&i,r=e.initOnlySettingKeys,a=void 0===r?[]:r,l=function(e){return!s&&Aw.includes(e)?Iw(o[e],t[e]):!(s||!a.includes(e))},h={};for(var c in t)"children"!==c&&!l(c)&&t.hasOwnProperty(c)&&(h[c]=t[c]);return h}}])}(),Dw=d(void 0),Nw=function(t){var n=t.children,o=i([]),a=s(function(t,e){o.current[e]=t},[]),l=i(new Map),h=i(new Map),c=s(function(){return h.current.clear()},[]),d=i(new Map),u=s(function(){return d.current.clear()},[]),g=i(new Map),p=s(function(t){return function(n,o,i,s,r,a,l){var c="".concat(i,"-").concat(s),u=n.guid,p="".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 w=d.current.get(m),b=g.current.get(p);o.firstChild;)o.removeChild(o.firstChild);if(w&&b)o.appendChild(b);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),Sw||(Sw=e.createDocumentFragment());var i=null!=o?o:e.createElement("DIV");return Sw.appendChild(i),{portal:f.createPortal(t,i,n),portalContainer:i}}(e.createElement(t,{instance:n,TD:o,row:i,col:s,prop:r,value:a,cellProperties:l}),o.ownerDocument,m,b),C=v.portal,y=v.portalContainer;g.current.set(p,y),o.appendChild(y),d.current.set(m,C)}}return h.current.set("".concat(i,"-").concat(s),o),o}},[]),m=i(function(){}),w=s(function(t){m.current=t},[]),b=s(function(){m.current(bw(d.current.values()))},[]),v=r(function(){return{componentRendererColumns:l.current,columnsSettings:o.current,emitColumnSettings:a,getRendererWrapper:p,clearPortalCache:u,clearRenderedCellCache:c,setRenderersPortalManagerRef:w,pushCellPortalsIntoPortalManager:b}},[a,p,c,w,b]);return e.createElement(Dw.Provider,{value:v},n)};function Pw(){return u(Dw)}var Ww=d(void 0),Lw=function(t){var n=t.columnIndex,o=t.getOwnerDocument,i=t.children,s=r(function(){return{columnIndex:n,getOwnerDocument:o}},[n,o]);return e.createElement(Ww.Provider,{value:s},i)},Bw=["close","focus","open"],Vw=["getValue","setValue"],Fw={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function zw(t,e){return function(){function n(o){var i;return cw(this,n),i=hw(this,n,[o]),e.current=i,Object.getOwnPropertyNames(aw.editors.BaseEditor.prototype).forEach(function(e){if("constructor"!==e&&!Vw.includes(e)){var o=aw.editors.BaseEditor.prototype[e];n.prototype[e]=function(){for(var n,i,s,r=arguments.length,a=new Array(r),l=0;l<r;l++)a[l]=arguments[l];(Bw.includes(e)||(i=o.call.apply(o,[this].concat(a))),Fw[e]&&null!==(n=t.current)&&void 0!==n&&n[Fw[e]])&&(i=(s=t.current[Fw[e]]).call.apply(s,[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&&mw(t,e)}(n,aw.editors.BaseEditor),uw(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 $w=d(void 0),Uw=function(t){var n=t.hooksRef,o=t.hotCustomEditorInstanceRef,i=t.children;return e.createElement($w.Provider,{value:{hooksRef:n,hotCustomEditorInstanceRef:o}},i)},jw=function(t){return t.type===Gw},Yw=["_columnIndex","_getOwnerDocument","children"],Gw=function(t){var n=Pw(),o=n.componentRendererColumns,s=n.emitColumnSettings,r=n.getRendererWrapper,l=u(Ww),h=l.columnIndex,c=l.getOwnerDocument,d=i(null),g=i(null);a(function(){var n,i=function(){var e=Ow.getSettings(Object.keys(t).filter(function(t){return!Yw.includes(t)}).reduce(function(e,n){return e[n]=t[n],e},{}));return t.renderer?(e.renderer=r(t.renderer),o.set(h,!0)):t.hotRenderer&&(e.renderer=t.hotRenderer),t.editor?e.editor=zw(d,g):t.hotEditor&&(e.editor=t.hotEditor),e}();s(i,h),Rw(t.children)||(n=t.children,e.Children.toArray(n).length&&kw("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children."))});var p=Ew(c(),t.editor);return e.createElement(Uw,{hooksRef:d,hotCustomEditorInstanceRef:g},p)},qw=n(function(t,n){var o=ww(g([]),2),i=o[0],s=o[1];return l(n,function(){return s}),e.createElement(c,null,i)});function Kw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Xw,Zw={exports:{}},Qw={exports:{}},Jw={};var tb,eb,nb,ob,ib,sb,rb,ab,lb,hb,cb,db,ub,gb,pb={};function fb(){return eb||(eb=1,"production"===process.env.NODE_ENV?Qw.exports=function(){if(Xw)return Jw;Xw=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,s=t?Symbol.for("react.profiler"):60114,r=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,p=t?Symbol.for("react.lazy"):60116,f=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function v(t){if("object"===Cw(t)&&null!==t){var u=t.$$typeof;switch(u){case e:switch(t=t.type){case l:case h:case o:case s:case i:case d:return t;default:switch(t=t&&t.$$typeof){case a:case c:case p:case g:case r:return t;default:return u}}case n:return u}}}function C(t){return v(t)===h}return Jw.AsyncMode=l,Jw.ConcurrentMode=h,Jw.ContextConsumer=a,Jw.ContextProvider=r,Jw.Element=e,Jw.ForwardRef=c,Jw.Fragment=o,Jw.Lazy=p,Jw.Memo=g,Jw.Portal=n,Jw.Profiler=s,Jw.StrictMode=i,Jw.Suspense=d,Jw.isAsyncMode=function(t){return C(t)||v(t)===l},Jw.isConcurrentMode=C,Jw.isContextConsumer=function(t){return v(t)===a},Jw.isContextProvider=function(t){return v(t)===r},Jw.isElement=function(t){return"object"===Cw(t)&&null!==t&&t.$$typeof===e},Jw.isForwardRef=function(t){return v(t)===c},Jw.isFragment=function(t){return v(t)===o},Jw.isLazy=function(t){return v(t)===p},Jw.isMemo=function(t){return v(t)===g},Jw.isPortal=function(t){return v(t)===n},Jw.isProfiler=function(t){return v(t)===s},Jw.isStrictMode=function(t){return v(t)===i},Jw.isSuspense=function(t){return v(t)===d},Jw.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===s||t===i||t===d||t===u||"object"===Cw(t)&&null!==t&&(t.$$typeof===p||t.$$typeof===g||t.$$typeof===r||t.$$typeof===a||t.$$typeof===c||t.$$typeof===m||t.$$typeof===w||t.$$typeof===b||t.$$typeof===f)},Jw.typeOf=v,Jw}():Qw.exports=(tb||(tb=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,s=t?Symbol.for("react.profiler"):60114,r=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,p=t?Symbol.for("react.lazy"):60116,f=t?Symbol.for("react.block"):60121,m=t?Symbol.for("react.fundamental"):60117,w=t?Symbol.for("react.responder"):60118,b=t?Symbol.for("react.scope"):60119;function v(t){if("object"===Cw(t)&&null!==t){var u=t.$$typeof;switch(u){case e:var f=t.type;switch(f){case l:case h:case o:case s:case i:case d:return f;default:var m=f&&f.$$typeof;switch(m){case a:case c:case p:case g:case r:return m;default:return u}}case n:return u}}}var C=l,y=h,S=a,k=r,R=e,x=c,E=o,M=p,T=g,_=n,H=s,I=i,A=d,O=!1;function D(t){return v(t)===h}pb.AsyncMode=C,pb.ConcurrentMode=y,pb.ContextConsumer=S,pb.ContextProvider=k,pb.Element=R,pb.ForwardRef=x,pb.Fragment=E,pb.Lazy=M,pb.Memo=T,pb.Portal=_,pb.Profiler=H,pb.StrictMode=I,pb.Suspense=A,pb.isAsyncMode=function(t){return O||(O=!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.")),D(t)||v(t)===l},pb.isConcurrentMode=D,pb.isContextConsumer=function(t){return v(t)===a},pb.isContextProvider=function(t){return v(t)===r},pb.isElement=function(t){return"object"===Cw(t)&&null!==t&&t.$$typeof===e},pb.isForwardRef=function(t){return v(t)===c},pb.isFragment=function(t){return v(t)===o},pb.isLazy=function(t){return v(t)===p},pb.isMemo=function(t){return v(t)===g},pb.isPortal=function(t){return v(t)===n},pb.isProfiler=function(t){return v(t)===s},pb.isStrictMode=function(t){return v(t)===i},pb.isSuspense=function(t){return v(t)===d},pb.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===o||t===h||t===s||t===i||t===d||t===u||"object"===Cw(t)&&null!==t&&(t.$$typeof===p||t.$$typeof===g||t.$$typeof===r||t.$$typeof===a||t.$$typeof===c||t.$$typeof===m||t.$$typeof===w||t.$$typeof===b||t.$$typeof===f)},pb.typeOf=v}()),pb)),Qw.exports}
|
|
35
|
+
/*
|
|
36
|
+
object-assign
|
|
37
|
+
(c) Sindre Sorhus
|
|
38
|
+
@license MIT
|
|
39
|
+
*/function mb(){if(ob)return nb;ob=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return nb=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 s,r,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 s=Object(arguments[l]))e.call(s,h)&&(a[h]=s[h]);if(t){r=t(s);for(var c=0;c<r.length;c++)n.call(s,r[c])&&(a[r[c]]=s[r[c]])}}return a},nb}function wb(){if(sb)return ib;sb=1;return ib="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function bb(){return ab?rb:(ab=1,rb=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var vb=fb();Zw.exports=function(){if(db)return cb;db=1;var t=fb(),e=mb(),n=wb(),o=bb(),i=function(){if(hb)return lb;hb=1;var t=function(){};if("production"!==process.env.NODE_ENV){var e=wb(),n={},o=bb();t=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}}function i(i,s,r,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")+": "+r+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Cw(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](s,h,a,r,null,e)}catch(t){c=t}if(!c||c instanceof Error||t((a||"React class")+": type specification of "+r+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+Cw(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 "+r+" type: "+c.message+(null!=u?u:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},lb=i}(),s=function(){};function r(){return null}return"production"!==process.env.NODE_ENV&&(s=function(t){var e="Warning: "+t;"undefined"!=typeof console&&console.error(e);try{throw new Error(e)}catch(t){}}),cb=function(a,l){var h="function"==typeof Symbol&&Symbol.iterator,c="<<anonymous>>",d={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(r),arrayOf:function(t){return p(function(e,o,i,s,r){if("function"!=typeof t)return new g("Property `"+r+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var a=e[o];if(!Array.isArray(a))return new g("Invalid "+s+" `"+r+"` of type `"+b(a)+"` supplied to `"+i+"`, expected an array.");for(var l=0;l<a.length;l++){var h=t(a,l,i,s,r+"["+l+"]",n);if(h instanceof Error)return h}return null})},element:p(function(t,e,n,o,i){var s=t[e];return a(s)?null:new g("Invalid "+o+" `"+i+"` of type `"+b(s)+"` supplied to `"+n+"`, expected a single ReactElement.")}),elementType:p(function(e,n,o,i,s){var r=e[n];return t.isValidElementType(r)?null:new g("Invalid "+i+" `"+s+"` of type `"+b(r)+"` supplied to `"+o+"`, expected a single ReactElement type.")}),instanceOf:function(t){return p(function(e,n,o,i,s){if(!(e[n]instanceof t)){var r=t.name||c;return new g("Invalid "+i+" `"+s+"` of type `"+((a=e[n]).constructor&&a.constructor.name?a.constructor.name:c)+"` supplied to `"+o+"`, expected instance of `"+r+"`.")}var a;return null})},node:p(function(t,e,n,o,i){return w(t[e])?null:new g("Invalid "+o+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")}),objectOf:function(t){return p(function(e,i,s,r,a){if("function"!=typeof t)return new g("Property `"+a+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var l=e[i],h=b(l);if("object"!==h)return new g("Invalid "+r+" `"+a+"` of type `"+h+"` supplied to `"+s+"`, expected an object.");for(var c in l)if(o(l,c)){var d=t(l,c,s,r,a+"."+c,n);if(d instanceof Error)return d}return null})},oneOf:function(t){return Array.isArray(t)?p(function(e,n,o,i,s){for(var r=e[n],a=0;a<t.length;a++)if(u(r,t[a]))return null;var l=JSON.stringify(t,function(t,e){return"symbol"===v(e)?String(e):e});return new g("Invalid "+i+" `"+s+"` of value `"+String(r)+"` supplied to `"+o+"`, expected one of "+l+".")}):("production"!==process.env.NODE_ENV&&s(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."),r)},oneOfType:function(t){if(!Array.isArray(t))return"production"!==process.env.NODE_ENV&&s("Invalid argument supplied to oneOfType, expected an instance of array."),r;for(var e=0;e<t.length;e++){var i=t[e];if("function"!=typeof i)return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+C(i)+" at index "+e+"."),r}return p(function(e,i,s,r,a){for(var l=[],h=0;h<t.length;h++){var c=(0,t[h])(e,i,s,r,a,n);if(null==c)return null;c.data&&o(c.data,"expectedType")&&l.push(c.data.expectedType)}return new g("Invalid "+r+" `"+a+"` supplied to `"+s+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")})},shape:function(t){return p(function(e,o,i,s,r){var a=e[o],l=b(a);if("object"!==l)return new g("Invalid "+s+" `"+r+"` of type `"+l+"` supplied to `"+i+"`, expected `object`.");for(var h in t){var c=t[h];if("function"!=typeof c)return m(i,s,r,h,v(c));var d=c(a,h,i,s,r+"."+h,n);if(d)return d}return null})},exact:function(t){return p(function(i,s,r,a,l){var h=i[s],c=b(h);if("object"!==c)return new g("Invalid "+a+" `"+l+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var d=e({},i[s],t);for(var u in d){var p=t[u];if(o(t,u)&&"function"!=typeof p)return m(r,a,l,u,v(p));if(!p)return new g("Invalid "+a+" `"+l+"` key `"+u+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(i[s],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(t),null," "));var f=p(h,u,r,a,l+"."+u,n);if(f)return f}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"===Cw(e)?e:{},this.stack=""}function p(t){if("production"!==process.env.NODE_ENV)var e={},o=0;function i(i,r,a,h,d,u,p){if(h=h||c,u=u||a,p!==n){if(l){var f=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 f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var m=h+":"+a;!e[m]&&o<3&&(s("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==r[a]?i?null===r[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(r,a,h,d,u)}var r=i.bind(null,!1);return r.isRequired=i.bind(null,!0),r}function f(t){return p(function(e,n,o,i,s,r){var a=e[n];return b(a)!==t?new g("Invalid "+i+" `"+s+"` 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 w(t){switch(Cw(t)){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(w);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(!w(n.value))return!1}else for(;!(n=o.next()).done;){var i=n.value;if(i&&!w(i[1]))return!1}return!0;default:return!1}}function b(t){var e=Cw(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=b(t);if("object"===e){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return e}function C(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},cb}()(vb.isElement,!0)}else Zw.exports=function(){if(gb)return ub;gb=1;var t=wb();function e(){}function n(){}return n.resetWarningCache=e,ub=function(){function o(e,n,o,i,s,r){if(r!==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 s={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 s.PropTypes=s,s}}()();var Cb=Kw(Zw.exports),yb=n(function(t,n){var o,r,d,u=i(null),g=i(null),p=i(null),f=i(null),m=i(),w=Pw(),b=s(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=s(function(){return!u.current||u.current.isDestroyed},[u]),C=s(function(){w.clearRenderedCellCache(),w.componentRendererColumns.clear()},[w]),y=s(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=b())||void 0===e||null===(e=e.getSettings())||void 0===e?void 0:e._initOnlySettings)||[],s=Ow.getSettings(t,{prevProps:o,isInit:n,initOnlySettingKeys:i});return w.columnsSettings.length&&(s.columns=w.columnsSettings),t.renderer?(s.renderer=w.getRendererWrapper(t.renderer),w.componentRendererColumns.set("global",!0)):s.renderer=t.hotRenderer||Ao("text"),t.editor?s.editor=zw(p,f):s.editor=t.hotEditor||Bn("text"),s},k=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)&&w.componentRendererColumns.size>0&&kw("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 aw.Core(g.current,i),u.current.addHook("beforeViewRender",function(){w.clearPortalCache(),w.clearRenderedCellCache()}),u.current.addHook("afterViewRender",function(){w.pushCellPortalsIntoPortalManager()}),u.current.init(),k(u.current),Rw(t.children)||(n=t.children,o=Gw,e.Children.toArray(n).some(function(t){return t.type!==o})&&kw("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var t;C(),null===(t=b())||void 0===t||t.destroy()}},[]),o=function(){C();var e=b(),n=S(!1,m.current);m.current=t,null==e||e.updateSettings(n,!1),k(e),Rw(t.children)},d=e.useRef(!1),a(function(){if(d.current)return o();d.current=!0},r),l(n,function(){return{get hotElementRef(){return g.current},get hotInstance(){return b()}}});var R=h.toArray(t.children).filter(jw).map(function(t,n){return e.createElement(Lw,{columnIndex:n,getOwnerDocument:y,key:n},t)}),x=Mw(t),E=Ew(y(),t.editor);return e.createElement(c,null,e.createElement("div",gw({ref:g},x),R),e.createElement(qw,{ref:w.setRenderersPortalManagerRef}),e.createElement(Uw,{hooksRef:p,hotCustomEditorInstanceRef:f},E))});yb.propTypes={style:Cb.object,id:Cb.string,className:Cb.string};var Sb=["children"],kb=n(function(t,n){var i,s=t.children,r=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 s=Object.getOwnPropertySymbols(t);for(o=0;o<s.length;o++)n=s[o],-1===e.indexOf(n)&&{}.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}(t,Sb),a=null!==(i=r.id)&&void 0!==i?i:o();return e.createElement(Nw,null,e.createElement(yb,gw({id:a},r,{ref:n}),s))});kb.version="17.1.0";const Rb="handsontableEditor";class xb extends iw{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(),Le(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,s){super.prepare(t,e,n,o,i,s);const r=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&&r.setValue(n),r.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Ct(a,s.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,s=o>i&&n>i+e.height;return s?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:s,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,s=o>i&&n>i;return s?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:s,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",()=>{this.htEditor?.destroy()}),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const e={group:Rb,relativeToGroup:Lp,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(Rb)}constructor(...t){super(...t),this.isFlippedVertically=!1,this.isFlippedHorizontally=!1}}function Eb(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Mb(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Tb(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Mb(t,e,"get"))}function _b(t,e,n){Eb(t,e),e.set(t,n)}function Hb(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Mb(t,e,"set"),n),n}function Ib(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var Ab=new WeakMap,Ob=new WeakMap,Db=new WeakSet;class Nb extends xb{static get EDITOR_TYPE(){return"autocomplete"}getValue(){const t=this.rawChoices.find(t=>{const e=this.stripValueIfNeeded(t);return(Pt(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&&pe(this.TEXTAREA,[["type","text"],["role","combobox"],ht("listbox"),["aria-autocomplete","list"]])}prepare(t,e,n,o,i,s){var r;super.prepare(t,e,n,o,i,s),this.hot.getSettings().ariaTags&&pe(this.TEXTAREA,[pt("false"),(r=`${Tb(this,Ab)}-listbox-${t}-${e}`,["aria-controls",r])]),this.htOptions={...this.htOptions,valueGetter:t=>Pt(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=n?.length,{row:i,col:s}=this;var r;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",t=>this.onBeforeKeyDown(t)),this.htEditor.addHook("afterScroll",Tb(this,Ob)),this.htEditor.updateSettings({colWidths:t?[Ae(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(t,i,s,r,a,l,h)=>{sw(0,i,0,0,0,l,h);const{filteringCaseSensitive:c,allowHtml:d,locale:u}=this.cellProperties,g=this.query;let p,f,m=H(l);var w;m&&!d&&(p=!0===c?m.indexOf(g):m.toLocaleLowerCase(u).indexOf(g.toLocaleLowerCase(u)),-1!==p&&(f=m.substr(p,g.length),m=m.replace(f,`<strong>${f}</strong>`))),e&&pe(i,[["role","option"],...n?[(w=o,["aria-setsize",w])]:[],...n?[wt(n.indexOf(l)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${r}`]]),i.innerHTML=m},afterSelectionEnd:(t,n)=>{if(e){const e=t=>{var e;pe(t,[["aria-selected","true"]]),pe(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&&(pe(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,"role","presentation"),pe(this.htEditor.rootElement,[["role","listbox"],(r="polite",["aria-live",r]),mt("text"),["id",`${Tb(this,Ab)}-listbox-${i}-${s}`]]),pe(this.TEXTAREA,...pt("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&pe(this.TEXTAREA,[pt("false")])}discardEditor(t){super.discardEditor(t),this.hot.view.render()}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=Pe(this.TEXTAREA),n=(o=this.TEXTAREA).selectionEnd?o.selectionEnd:0;var o;const i=this.cellProperties.sortByRelevance,s=this.cellProperties.filter,r=this.stripValueIfNeeded(this.getValue()),a=Pt(r)?r.value:r;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=Pt(h[t])?K(H(h[t].value)):K(H(h[t]));if(-1!==(u?e:e.toLocaleLowerCase(d)).indexOf(g)&&(c.push(t),!1===s))break}!1===s?r.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(y([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(l)),this.hot.listen(),Le(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(t=document){return Kt()?Number.isInteger(t.defaultView.devicePixelRatio||1)?0:2:0}(),e=this.getTargetEditorWidth()+t,n=this.getTargetEditorHeight()+t;this.htEditor.updateSettings({width:e,height:n}),Ib(this,Db,Pb).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(t){this.htEditor.updateSettings({height:t}),Ib(this,Db,Pb).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:K(t));return t.every(t=>Pt(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)}}constructor(...t){var e,n;super(...t),Eb(e=this,n=Db),n.add(e),_b(this,Ab,{writable:!0,value:void 0}),_b(this,Ob,{writable:!0,value:void 0}),this.query=null,this.strippedChoices=[],this.rawChoices=[],Hb(this,Ab,this.hot.guid.slice(0,9)),Hb(this,Ob,Qe(()=>{this.focus()},100))}}function Pb(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+Ve(this.hot.rootDocument)})}class Wb extends zp{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 Lb(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 Bb,Vb={exports:{}};var Fb,zb=(Bb||(Bb=1,(Fb=Vb).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 s(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function r(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(r(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)r(e,n)&&(t[n]=e[n]);return r(e,"toString")&&(t.toString=e.toString),r(e,"valueOf")&&(t.valueOf=e.valueOf),t}function g(t,e,n,o){return Gn(t,e,n,o,!0).utc()}function p(){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 f(t){return null==t._pf&&(t._pf=p()),t._pf}function m(t){var n=null,o=!1,i=t._d&&!isNaN(t._d.getTime());return i&&(n=f(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 w(t){var e=g(NaN);return null!=t?u(f(e),t):f(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 b=n.momentProperties=[],v=!1;function C(t,e){var n,o,i,s=b.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=f(e)),l(e._locale)||(t._locale=e._locale),s>0)for(n=0;n<s;n++)l(i=e[o=b[n]])||(t[o]=i);return t}function y(t){C(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 y||null!=t&&null!=t._isAMomentObject}function k(t){!1===n.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function R(t,e){var o=!0;return u(function(){if(null!=n.deprecationHandler&&n.deprecationHandler(null,t),o){var i,s,a,l=[],h=arguments.length;for(s=0;s<h;s++){if(i="","object"==typeof arguments[s]){for(a in i+="\n["+s+"] ",arguments[0])r(arguments[0],a)&&(i+=a+": "+arguments[0][a]+", ");i=i.slice(0,-2)}else i=arguments[s];l.push(i)}k(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]||(k(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)r(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)r(e,n)&&(s(t[n])&&s(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)r(t,n)&&!r(e,n)&&s(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)r(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 O(t,e,n){var o=this._calendar[t]||this._calendar.sameElse;return T(o)?o.call(e,n):o}function D(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,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,W={},L={};function B(t,e,n,o){var i=o;"string"==typeof o&&(i=function(){return this[o]()}),t&&(L[t]=i),e&&(L[e[0]]=function(){return D(i.apply(this,arguments),e[1],e[2])}),n&&(L[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function V(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function F(t){var e,n,o=t.match(N);for(e=0,n=o.length;e<n;e++)L[o[e]]?o[e]=L[o[e]]:o[e]=V(o[e]);return function(e){var i,s="";for(i=0;i<n;i++)s+=T(o[i])?o[i].call(e,t):o[i];return s}}function z(t,e){return t.isValid()?(e=$(e,t.localeData()),W[e]=W[e]||F(e),W[e](t)):t.localeData().invalidDate()}function $(t,e){var n=5;function o(t){return e.longDateFormat(t)||t}for(P.lastIndex=0;n>=0&&P.test(t);)t=t.replace(P,o),P.lastIndex=0,n-=1;return t}var U={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 j(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 q="%d",K=/\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 Q(t,e,n,o){var i=this._relativeTime[n];return T(i)?i(t,e,n,o):i.replace(/%d/i,t)}function J(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)r(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)r(t,e)&&n.push({unit:e,priority:ot[e]});return n.sort(function(t,e){return t.priority-e.priority}),n}var st,rt=/\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?/,pt=/\d{1,3}/,ft=/\d{1,4}/,mt=/[+-]?\d{1,6}/,wt=/\d+/,bt=/[+-]?\d+/,vt=/Z|[+-]\d\d:?\d\d/gi,Ct=/Z|[+-]\d\d(?::?\d\d)?/gi,yt=/[+-]?\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,kt=/^[1-9]\d?/,Rt=/^([1-9]\d|\d)/;function xt(t,e,n){st[t]=T(e)?e:function(t,o){return t&&n?n:e}}function Et(t,e){return r(st,t)?st[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}st={};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 Ot(t,e){At(t,function(t,n,o,i){o._w=o._w||{},e(t,o._w,o,i)})}function Dt(t,e,n){null!=e&&r(It,t)&&It[t](e,n._a,n,t)}function Nt(t){return t%4==0&&t%100!=0||t%400==0}var Pt=0,Wt=1,Lt=2,Bt=3,Vt=4,Ft=5,zt=6,$t=7,Ut=8;function jt(t){return Nt(t)?366:365}B("Y",0,0,function(){var t=this.year();return t<=9999?D(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",bt),xt("YY",dt,at),xt("YYYY",ft,ht),xt("YYYYY",mt,ct),xt("YYYYYY",mt,ct),At(["YYYYY","YYYYYY"],Pt),At("YYYY",function(t,e){e[Pt]=2===t.length?n.parseTwoDigitYear(t):Ht(t)}),At("YY",function(t,e){e[Pt]=n.parseTwoDigitYear(t)}),At("Y",function(t,e){e[Pt]=parseInt(t,10)}),n.parseTwoDigitYear=function(t){return Ht(t)+(Ht(t)>68?1900:2e3)};var Yt,Gt=Kt("FullYear",!0);function qt(){return Nt(this.year())}function Kt(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,s,r,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}s=n,r=t.month(),a=29!==(a=t.date())||1!==r||Nt(s)?a:28,i?o.setUTCFullYear(s,r,a):o.setFullYear(s,r,a)}}function Qt(t){return T(this[t=et(t)])?this[t]():this}function Jt(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,kt),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[Wt]=Ht(t)-1}),At(["MMM","MMMM"],function(t,e,n,o){var i=n._locale.monthsParse(t,o,n._strict);null!=i?e[Wt]=i:f(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?/,se=St,re=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,s,r=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],o=0;o<12;++o)s=g([2e3,o]),this._shortMonthsParse[o]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[o]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=Yt.call(this._shortMonthsParse,r))?i:null:-1!==(i=Yt.call(this._longMonthsParse,r))?i:null:"MMM"===e?-1!==(i=Yt.call(this._shortMonthsParse,r))||-1!==(i=Yt.call(this._longMonthsParse,r))?i:null:-1!==(i=Yt.call(this._longMonthsParse,r))||-1!==(i=Yt.call(this._shortMonthsParse,r))?i:null}function ce(t,e,n){var o,i,s;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]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[o]=new RegExp(s.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 pe(t){return this._monthsParseExact?(r(this,"_monthsRegex")||me.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(r(this,"_monthsShortRegex")||(this._monthsShortRegex=se),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function fe(t){return this._monthsParseExact?(r(this,"_monthsRegex")||me.call(this),t?this._monthsStrictRegex:this._monthsRegex):(r(this,"_monthsRegex")||(this._monthsRegex=re),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function me(){function t(t,e){return e.length-t.length}var e,n,o,i,s=[],r=[],a=[];for(e=0;e<12;e++)n=g([2e3,e]),o=Tt(this.monthsShort(n,"")),i=Tt(this.months(n,"")),s.push(o),r.push(i),a.push(i),a.push(o);s.sort(t),r.sort(t),a.sort(t),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function we(t,e,n,o,i,s,r){var a;return t<100&&t>=0?(a=new Date(t+400,e,n,o,i,s,r),isFinite(a.getFullYear())&&a.setFullYear(t)):a=new Date(t,e,n,o,i,s,r),a}function be(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+be(t,0,o).getUTCDay()-e)%7+o-1}function Ce(t,e,n,o,i){var s,r,a=1+7*(e-1)+(7+n-o)%7+ve(t,o,i);return a<=0?r=jt(s=t-1)+a:a>jt(t)?(s=t+1,r=a-jt(t)):(s=t,r=a),{year:s,dayOfYear:r}}function ye(t,e,n){var o,i,s=ve(t.year(),e,n),r=Math.floor((t.dayOfYear()-s-1)/7)+1;return r<1?o=r+Se(i=t.year()-1,e,n):r>Se(t.year(),e,n)?(o=r-Se(t.year(),e,n),i=t.year()+1):(i=t.year(),o=r),{week:o,year:i}}function Se(t,e,n){var o=ve(t,e,n),i=ve(t+1,e,n);return(jt(t)-o+i)/7}function ke(t){return ye(t,this._week.dow,this._week.doy).week}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),xt("w",dt,kt),xt("ww",dt,at),xt("W",dt,kt),xt("WW",dt,at),Ot(["w","ww","W","WW"],function(t,e,n,o){e[o.substr(0,1)]=Ht(t)});var Re={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=ye(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)}),Ot(["dd","ddd","dddd"],function(t,e,n,o){var i=n._locale.weekdaysParse(t,o,n._strict);null!=i?e.d=i:f(n).invalidWeekday=t}),Ot(["d","e","E"],function(t,e,n,o){e[o]=Ht(t)});var Ae="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Oe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),De="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ne=St,Pe=St,We=St;function Le(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 Ve(t){return!0===t?Ie(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Fe(t,e,n){var o,i,s,r=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],o=0;o<7;++o)s=g([2e3,1]).day(o),this._minWeekdaysParse[o]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[o]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[o]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=Yt.call(this._weekdaysParse,r))?i:null:"ddd"===e?-1!==(i=Yt.call(this._shortWeekdaysParse,r))?i:null:-1!==(i=Yt.call(this._minWeekdaysParse,r))?i:null:"dddd"===e?-1!==(i=Yt.call(this._weekdaysParse,r))||-1!==(i=Yt.call(this._shortWeekdaysParse,r))||-1!==(i=Yt.call(this._minWeekdaysParse,r))?i:null:"ddd"===e?-1!==(i=Yt.call(this._shortWeekdaysParse,r))||-1!==(i=Yt.call(this._weekdaysParse,r))||-1!==(i=Yt.call(this._minWeekdaysParse,r))?i:null:-1!==(i=Yt.call(this._minWeekdaysParse,r))||-1!==(i=Yt.call(this._weekdaysParse,r))||-1!==(i=Yt.call(this._shortWeekdaysParse,r))?i:null}function ze(t,e,n){var o,i,s;if(this._weekdaysParseExact)return Fe.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]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[o]=new RegExp(s.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 $e(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 Ue(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 je(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?(r(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(r(this,"_weekdaysRegex")||(this._weekdaysRegex=Ne),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ge(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(r(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Pe),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function qe(t){return this._weekdaysParseExact?(r(this,"_weekdaysRegex")||Ke.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(r(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=We),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ke(){function t(t,e){return e.length-t.length}var e,n,o,i,s,r=[],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,"")),s=Tt(this.weekdays(n,"")),r.push(o),a.push(i),l.push(s),h.push(o),h.push(i),h.push(s);r.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("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ze(){return this.hours()||24}function Qe(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Je(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)+D(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Xe.apply(this)+D(this.minutes(),2)+D(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+D(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+D(this.minutes(),2)+D(this.seconds(),2)}),Qe("a",!0),Qe("A",!1),xt("a",Je),xt("A",Je),xt("H",dt,Rt),xt("h",dt,kt),xt("k",dt,kt),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),f(n).bigHour=!0}),At("hmm",function(t,e,n){var o=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Vt]=Ht(t.substr(o)),f(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[Vt]=Ht(t.substr(o,2)),e[Ft]=Ht(t.substr(i)),f(n).bigHour=!0}),At("Hmm",function(t,e,n){var o=t.length-2;e[Bt]=Ht(t.substr(0,o)),e[Vt]=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[Vt]=Ht(t.substr(o,2)),e[Ft]=Ht(t.substr(i))});var en=/[ap]\.?m?\.?/i,nn=Kt("Hours",!0);function on(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var sn,rn={calendar:A,longDateFormat:U,invalidDate:Y,ordinal:q,dayOfMonthOrdinalParse:K,relativeTime:Z,months:ne,monthsShort:oe,week:Re,weekdays:Ae,weekdaysMin:De,weekdaysShort:Oe,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,s=0;s<t.length;){for(e=(i=cn(t[s]).split("-")).length,n=(n=cn(t[s+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--}s++}return sn}function un(t){return!(!t||!t.match("^[^/\\\\]*$"))}function gn(t){var e=null;if(void 0===an[t]&&Fb&&Fb.exports&&un(t))try{e=sn._abbr,Lb("./locale/"+t),pn(e)}catch(e){an[t]=null}return an[t]}function pn(t,e){var n;return t&&((n=l(e)?wn(t):fn(t,e))?sn=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),sn._abbr}function fn(t,e){if(null!==e){var n,o=rn;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){fn(t.name,t.config)}),pn(t),an[t]}return delete an[t],null}function mn(t,e){if(null!=e){var n,o,i=rn;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),pn(t)}else null!=an[t]&&(null!=an[t].parentLocale?(an[t]=an[t].parentLocale,t===pn()&&pn(t)):null!=an[t]&&delete an[t]);return an[t]}function wn(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return sn;if(!i(t)){if(e=gn(t))return e;t=[t]}return dn(t)}function bn(){return x(an)}function vn(t){var e,n=t._a;return n&&-2===f(t).overflow&&(e=n[Wt]<0||n[Wt]>11?Wt:n[Lt]<1||n[Lt]>ee(n[Pt],n[Wt])?Lt:n[Bt]<0||n[Bt]>24||24===n[Bt]&&(0!==n[Vt]||0!==n[Ft]||0!==n[zt])?Bt:n[Vt]<0||n[Vt]>59?Vt:n[Ft]<0||n[Ft]>59?Ft:n[zt]<0||n[zt]>999?zt:-1,f(t)._overflowDayOfYear&&(e<Pt||e>Lt)&&(e=Lt),f(t)._overflowWeeks&&-1===e&&(e=$t),f(t)._overflowWeekday&&-1===e&&(e=Ut),f(t).overflow=e),t}var 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)?)?$/,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)?)?$/,Sn=/Z|[+-]\d\d(?::?\d\d)?/,kn=[["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]],Rn=[["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,s,r,a=t._i,l=Cn.exec(a)||yn.exec(a),h=kn.length,c=Rn.length;if(l){for(f(t).iso=!0,e=0,n=h;e<n;e++)if(kn[e][1].exec(l[1])){i=kn[e][0],o=!1!==kn[e][2];break}if(null==i)return void(t._isValid=!1);if(l[3]){for(e=0,n=c;e<n;e++)if(Rn[e][1].exec(l[3])){s=(l[2]||" ")+Rn[e][0];break}if(null==s)return void(t._isValid=!1)}if(!o&&null!=s)return void(t._isValid=!1);if(l[4]){if(!Sn.exec(l[4]))return void(t._isValid=!1);r="Z"}t._f=i+(s||"")+(r||""),Vn(t)}else t._isValid=!1}function _n(t,e,n,o,i,s){var r=[Hn(t),oe.indexOf(e),parseInt(n,10),parseInt(o,10),parseInt(i,10)];return s&&r.push(parseInt(s,10)),r}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||Oe.indexOf(t)===new Date(e[0],e[1],e[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}function On(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 Dn(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=On(n[8],n[9],n[10]),t._d=be.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),f(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,Dn(t),!1===t._isValid&&(delete t._isValid,t._strict?t._isValid=!1:n.createFromInputFallback(t)))):t._d=new Date(+e[1])}function Pn(t,e,n){return null!=t?t:null!=e?e:n}function Wn(t){var e=new Date(n.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Ln(t){var e,n,o,i,s,r=[];if(!t._d){for(o=Wn(t),t._w&&null==t._a[Lt]&&null==t._a[Wt]&&Bn(t),null!=t._dayOfYear&&(s=Pn(t._a[Pt],o[Pt]),(t._dayOfYear>jt(s)||0===t._dayOfYear)&&(f(t)._overflowDayOfYear=!0),n=be(s,0,t._dayOfYear),t._a[Wt]=n.getUTCMonth(),t._a[Lt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=r[e]=o[e];for(;e<7;e++)t._a[e]=r[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Bt]&&0===t._a[Vt]&&0===t._a[Ft]&&0===t._a[zt]&&(t._nextDay=!0,t._a[Bt]=0),t._d=(t._useUTC?be:we).apply(null,r),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&&(f(t).weekdayMismatch=!0)}}function Bn(t){var e,n,o,i,s,r,a,l,h;null!=(e=t._w).GG||null!=e.W||null!=e.E?(s=1,r=4,n=Pn(e.GG,t._a[Pt],ye(qn(),1,4).year),o=Pn(e.W,1),((i=Pn(e.E,1))<1||i>7)&&(l=!0)):(s=t._locale._week.dow,r=t._locale._week.doy,h=ye(qn(),s,r),n=Pn(e.gg,t._a[Pt],h.year),o=Pn(e.w,h.week),null!=e.d?((i=e.d)<0||i>6)&&(l=!0):null!=e.e?(i=e.e+s,(e.e<0||e.e>6)&&(l=!0)):i=s),o<1||o>Se(n,s,r)?f(t)._overflowWeeks=!0:null!=l?f(t)._overflowWeekday=!0:(a=Ce(n,o,i,s,r),t._a[Pt]=a.year,t._dayOfYear=a.dayOfYear)}function Vn(t){if(t._f!==n.ISO_8601)if(t._f!==n.RFC_2822){t._a=[],f(t).empty=!0;var e,o,i,s,r,a,l,h=""+t._i,c=h.length,d=0;for(l=(i=$(t._f,t._locale).match(N)||[]).length,e=0;e<l;e++)s=i[e],(o=(h.match(Et(s,t))||[])[0])&&((r=h.substr(0,h.indexOf(o))).length>0&&f(t).unusedInput.push(r),h=h.slice(h.indexOf(o)+o.length),d+=o.length),L[s]?(o?f(t).empty=!1:f(t).unusedTokens.push(s),Dt(s,o,t)):t._strict&&!o&&f(t).unusedTokens.push(s);f(t).charsLeftOver=c-d,h.length>0&&f(t).unusedInput.push(h),t._a[Bt]<=12&&!0===f(t).bigHour&&t._a[Bt]>0&&(f(t).bigHour=void 0),f(t).parsedDateParts=t._a.slice(0),f(t).meridiem=t._meridiem,t._a[Bt]=Fn(t._locale,t._a[Bt],t._meridiem),null!==(a=f(t).era)&&(t._a[Pt]=t._locale.erasConvertYear(a,t._a[Pt])),Ln(t),vn(t)}else Dn(t);else Tn(t)}function Fn(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,s,r,a=!1,l=t._f.length;if(0===l)return f(t).invalidFormat=!0,void(t._d=new Date(NaN));for(i=0;i<l;i++)s=0,r=!1,e=C({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],Vn(e),m(e)&&(r=!0),s+=f(e).charsLeftOver,s+=10*f(e).unusedTokens.length,f(e).score=s,a?s<o&&(o=s,n=e):(null==o||s<o||r)&&(o=s,n=e,r&&(a=!0));u(t,n||e)}function $n(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)}),Ln(t)}}function Un(t){var e=new y(vn(jn(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function jn(t){var e=t._i,n=t._f;return t._locale=t._locale||wn(t._l),null===e||void 0===n&&""===e?w({nullInput:!0}):("string"==typeof e&&(t._i=e=t._locale.preparse(e)),S(e)?new y(vn(e)):(c(e)?t._d=e:i(n)?zn(t):n?Vn(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)}),Ln(t)):s(e)?$n(t):h(e)?t._d=new Date(e):n.createFromInputFallback(t)}function Gn(t,e,n,o,r){var l={};return!0!==e&&!1!==e||(o=e,e=void 0),!0!==n&&!1!==n||(o=n,n=void 0),(s(t)&&a(t)||i(t)&&0===t.length)&&(t=void 0),l._isAMomentObject=!0,l._useUTC=l._isUTC=r,l._l=n,l._i=t,l._f=e,l._strict=o,Un(l)}function qn(t,e,n,o){return Gn(t,e,n,o,!1)}n.createFromInputFallback=R("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 Kn=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qn.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:w()}),Xn=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=qn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:w()});function Zn(t,e){var n,o;if(1===e.length&&i(e[0])&&(e=e[0]),!e.length)return qn();for(n=e[0],o=1;o<e.length;++o)e[o].isValid()&&!e[o][t](n)||(n=e[o]);return n}function Qn(){return Zn("isBefore",[].slice.call(arguments,0))}function Jn(){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(r(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 so(t){var e=nt(t),n=e.year||0,o=e.quarter||0,i=e.month||0,s=e.week||e.isoWeek||0,r=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=+r+7*s,this._months=+i+3*o+12*n,this._data={},this._locale=wn(),this._bubble()}function ro(t){return t instanceof so}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),s=Math.abs(t.length-e.length),r=0;for(o=0;o<i;o++)Ht(t[o])!==Ht(e[o])&&r++;return r+s}function ho(t,e){B(t,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+D(~~(t/60),2)+e+D(~~t%60,2)})}ho("Z",":"),ho("ZZ",""),xt("Z",Ct),xt("ZZ",Ct),At(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=uo(Ct,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():qn(t).valueOf())-o.valueOf(),o._d.setTime(o._d.valueOf()+i),n.updateOffset(o,!1),o):qn(t).local()}function po(t){return-Math.round(t._d.getTimezoneOffset())}function fo(t,e,o){var i,s=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null!=t){if("string"==typeof t){if(null===(t=uo(Ct,t)))return this}else Math.abs(t)<16&&!o&&(t*=60);return!this._isUTC&&e&&(i=po(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),s!==t&&(!e||this._changeInProgress?Oo(this,To(t-s,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?s:po(this)}function mo(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function wo(t){return this.utcOffset(0,t)}function bo(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(po(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 Co(t){return!!this.isValid()&&(t=t?qn(t).utcOffset():0,(this.utcOffset()-t)%60==0)}function yo(){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 C(e,this),(e=jn(e))._a?(t=e._isUTC?g(e._a):qn(e._a),this._isDSTShifted=this.isValid()&&lo(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ko(){return!!this.isValid()&&!this._isUTC}function Ro(){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,s=t,a=null;return ro(t)?s={ms:t._milliseconds,d:t._days,M:t._months}:h(t)||!isNaN(+t)?(s={},e?s[e]=+t:s.milliseconds=+t):(a=Eo.exec(t))?(n="-"===a[1]?-1:1,s={y:0,d:Ht(a[Lt])*n,h:Ht(a[Bt])*n,m:Ht(a[Vt])*n,s:Ht(a[Ft])*n,ms:Ht(ao(1e3*a[zt]))*n}):(a=Mo.exec(t))?(n="-"===a[1]?-1:1,s={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==s?s={}:"object"==typeof s&&("from"in s||"to"in s)&&(i=Io(qn(s.from),qn(s.to)),(s={}).ms=i.milliseconds,s.M=i.months),o=new so(s),ro(t)&&r(t,"_locale")&&(o._locale=t._locale),ro(t)&&r(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),Oo(this,To(n,o),t),this}}function Oo(t,e,o,i){var s=e._milliseconds,r=ao(e._days),a=ao(e._months);t.isValid()&&(i=null==i||i,a&&de(t,Xt(t,"Month")+a*o),r&&Zt(t,"Date",Xt(t,"Date")+r*o),s&&t._d.setTime(t._d.valueOf()+s*o),i&&n.updateOffset(t,r||a))}To.fn=so.prototype,To.invalid=io;var Do=Ao(1,"add"),No=Ao(-1,"subtract");function Po(t){return"string"==typeof t||t instanceof String}function Wo(t){return S(t)||c(t)||Po(t)||h(t)||Bo(t)||Lo(t)||null==t}function Lo(t){var e,n,o=s(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||r(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)&&Po(t)}).length),e&&n}function Vo(t){var e,n,o=s(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||r(t,n);return o&&i}function Fo(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]?Wo(arguments[0])?(t=arguments[0],e=void 0):Vo(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var o=t||qn(),i=go(o,this).startOf("day"),s=n.calendarFormat(this,i)||"sameElse",r=e&&(T(e[s])?e[s].call(this,o):e[s]);return this.format(r||this.localeData().calendar(s,this,qn(o)))}function $o(){return new y(this)}function Uo(t,e){var n=S(t)?t:qn(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=et(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())}function jo(t,e){var n=S(t)?t:qn(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:qn(t),s=S(e)?e:qn(e);return!!(this.isValid()&&i.isValid()&&s.isValid())&&("("===(o=o||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===o[1]?this.isBefore(s,n):!this.isAfter(s,n))}function Go(t,e){var n,o=S(t)?t:qn(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 qo(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function Ko(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function Xo(t,e,n){var o,i,s;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":s=Zo(this,o)/12;break;case"month":s=Zo(this,o);break;case"quarter":s=Zo(this,o)/3;break;case"second":s=(this-o)/1e3;break;case"minute":s=(this-o)/6e4;break;case"hour":s=(this-o)/36e5;break;case"day":s=(this-o-i)/864e5;break;case"week":s=(this-o-i)/6048e5;break;default:s=this-o}return n?s:_t(s)}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 Qo(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Jo(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",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),t="["+i+'("]',e=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",o=s+'[")]',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()||qn(t).isValid())?To({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function oi(t){return this.from(qn(),t)}function ii(t,e){return this.isValid()&&(S(t)&&t.isValid()||qn(t).isValid())?To({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function si(t){return this.to(qn(),t)}function ri(t){var e;return void 0===t?this._locale._abbr:(null!=(e=wn(t))&&(this._locale=e),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ai=R("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 pi(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-ui:new Date(t,e,n).valueOf()}function fi(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?fi:pi,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 wi(t){var e,o;if(void 0===(t=et(t))||"millisecond"===t||!this.isValid())return this;switch(o=this._isUTC?fi:pi,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 bi(){return this._d.valueOf()-6e4*(this._offset||0)}function vi(){return Math.floor(this.valueOf()/1e3)}function Ci(){return new Date(this.valueOf())}function yi(){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 ki(){return this.isValid()?this.toISOString():null}function Ri(){return m(this)}function xi(){return u({},f(this))}function Ei(){return f(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,s,r=this._eras||wn("en")._eras;for(o=0,i=r.length;o<i;++o)switch("string"==typeof r[o].since&&(s=n(r[o].since).startOf("day"),r[o].since=s.valueOf()),typeof r[o].until){case"undefined":r[o].until=1/0;break;case"string":s=n(r[o].until).startOf("day").valueOf(),r[o].until=s.valueOf()}return r}function _i(t,e,n){var o,i,s,r,a,l=this.eras();for(t=t.toUpperCase(),o=0,i=l.length;o<i;++o)if(s=l[o].name.toUpperCase(),r=l[o].abbr.toUpperCase(),a=l[o].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(r===t)return l[o];break;case"NNNN":if(s===t)return l[o];break;case"NNNNN":if(a===t)return l[o]}else if([s,r,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 Oi(){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 Di(){var t,e,o,i,s=this.localeData().eras();for(t=0,e=s.length;t<e;++t)if(o=s[t].since<=s[t].until?1:-1,i=this.clone().startOf("day").valueOf(),s[t].since<=i&&i<=s[t].until||s[t].until<=i&&i<=s[t].since)return(this.year()-n(s[t].since).year())*o+s[t].offset;return this.year()}function Ni(t){return r(this,"_erasNameRegex")||zi.call(this),t?this._erasNameRegex:this._erasRegex}function Pi(t){return r(this,"_erasAbbrRegex")||zi.call(this),t?this._erasAbbrRegex:this._erasRegex}function Wi(t){return r(this,"_erasNarrowRegex")||zi.call(this),t?this._erasNarrowRegex:this._erasRegex}function Li(t,e){return e.erasAbbrRegex(t)}function Bi(t,e){return e.erasNameRegex(t)}function Vi(t,e){return e.erasNarrowRegex(t)}function Fi(t,e){return e._eraYearOrdinalRegex||wt}function zi(){var t,e,n,o,i,s=[],r=[],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),r.push(n),s.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("^("+r.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function $i(t,e){B(0,[t,t.length],0,e)}function Ui(t){return Xi.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ji(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 qi(){var t=this.localeData()._week;return Se(this.year(),t.dow,t.doy)}function Ki(){var t=this.localeData()._week;return Se(this.weekYear(),t.dow,t.doy)}function Xi(t,e,n,o,i){var s;return null==t?ye(this,o,i).year:(e>(s=Se(t,o,i))&&(e=s),Zi.call(this,t,e,n,o,i))}function Zi(t,e,n,o,i){var s=Ce(t,e,n,o,i),r=be(s.year,0,s.dayOfYear);return this.year(r.getUTCFullYear()),this.month(r.getUTCMonth()),this.date(r.getUTCDate()),this}function Qi(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",Li),xt("NN",Li),xt("NNN",Li),xt("NNNN",Bi),xt("NNNNN",Vi),At(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,o){var i=n._locale.erasParse(t,o,n._strict);i?f(n).era=i:f(n).invalidEra=t}),xt("y",wt),xt("yy",wt),xt("yyy",wt),xt("yyyy",wt),xt("yo",Fi),At(["y","yy","yyy","yyyy"],Pt),At(["yo"],function(t,e,n,o){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[Pt]=n._locale.eraYearOrdinalParse(t,i):e[Pt]=parseInt(t,10)}),B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$i("gggg","weekYear"),$i("ggggg","weekYear"),$i("GGGG","isoWeekYear"),$i("GGGGG","isoWeekYear"),xt("G",bt),xt("g",bt),xt("GG",dt,at),xt("gg",dt,at),xt("GGGG",ft,ht),xt("gggg",ft,ht),xt("GGGGG",mt,ct),xt("ggggg",mt,ct),Ot(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,o){e[o.substr(0,2)]=Ht(t)}),Ot(["gg","GG"],function(t,e,o,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,"Qo","quarter"),xt("Q",rt),At("Q",function(t,e){e[Wt]=3*(Ht(t)-1)}),B("D",["DD",2],"Do","date"),xt("D",dt,kt),xt("DD",dt,at),xt("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),At(["D","DD"],Lt),At("Do",function(t,e){e[Lt]=Ht(t.match(dt)[0])});var Ji=Kt("Date",!0);function ts(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",pt),xt("DDDD",lt),At(["DDD","DDDD"],function(t,e,n){n._dayOfYear=Ht(t)}),B("m",["mm",2],0,"minute"),xt("m",dt,Rt),xt("mm",dt,at),At(["m","mm"],Vt);var es=Kt("Minutes",!1);B("s",["ss",2],0,"second"),xt("s",dt,Rt),xt("ss",dt,at),At(["s","ss"],Ft);var ns,os,is=Kt("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",pt,rt),xt("SS",pt,at),xt("SSS",pt,lt),ns="SSSS";ns.length<=9;ns+="S")xt(ns,wt);function ss(t,e){e[zt]=Ht(1e3*("0."+t))}for(ns="S";ns.length<=9;ns+="S")At(ns,ss);function rs(){return this._isUTC?"UTC":""}function as(){return this._isUTC?"Coordinated Universal Time":""}os=Kt("Milliseconds",!1),B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var ls=y.prototype;function hs(t){return qn(1e3*t)}function cs(){return qn.apply(null,arguments).parseZone()}function ds(t){return t}ls.add=Do,ls.calendar=zo,ls.clone=$o,ls.diff=Xo,ls.endOf=wi,ls.format=ei,ls.from=ni,ls.fromNow=oi,ls.to=ii,ls.toNow=si,ls.get=Qt,ls.invalidAt=Ei,ls.isAfter=Uo,ls.isBefore=jo,ls.isBetween=Yo,ls.isSame=Go,ls.isSameOrAfter=qo,ls.isSameOrBefore=Ko,ls.isValid=Ri,ls.lang=ai,ls.locale=ri,ls.localeData=li,ls.max=Xn,ls.min=Kn,ls.parsingFlags=xi,ls.set=Jt,ls.startOf=mi,ls.subtract=No,ls.toArray=yi,ls.toObject=Si,ls.toDate=Ci,ls.toISOString=Jo,ls.inspect=ti,"undefined"!=typeof Symbol&&null!=Symbol.for&&(ls[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ls.toJSON=ki,ls.toString=Qo,ls.unix=vi,ls.valueOf=bi,ls.creationData=Mi,ls.eraName=Ii,ls.eraNarrow=Ai,ls.eraAbbr=Oi,ls.eraYear=Di,ls.year=Gt,ls.isLeapYear=qt,ls.weekYear=Ui,ls.isoWeekYear=ji,ls.quarter=ls.quarters=Qi,ls.month=ue,ls.daysInMonth=ge,ls.week=ls.weeks=Me,ls.isoWeek=ls.isoWeeks=Te,ls.weeksInYear=qi,ls.weeksInWeekYear=Ki,ls.isoWeeksInYear=Yi,ls.isoWeeksInISOWeekYear=Gi,ls.date=Ji,ls.day=ls.days=$e,ls.weekday=Ue,ls.isoWeekday=je,ls.dayOfYear=ts,ls.hour=ls.hours=nn,ls.minute=ls.minutes=es,ls.second=ls.seconds=is,ls.millisecond=ls.milliseconds=os,ls.utcOffset=fo,ls.utc=wo,ls.local=bo,ls.parseZone=vo,ls.hasAlignedHourOffset=Co,ls.isDST=yo,ls.isLocal=ko,ls.isUtcOffset=Ro,ls.isUtc=xo,ls.isUTC=xo,ls.zoneAbbr=rs,ls.zoneName=as,ls.dates=R("dates accessor is deprecated. Use date instead.",Ji),ls.months=R("months accessor is deprecated. Use month instead",ue),ls.years=R("years accessor is deprecated. Use year instead",Gt),ls.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mo),ls.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",So);var us=I.prototype;function gs(t,e,n,o){var i=wn(),s=g().set(o,e);return i[n](s,t)}function ps(t,e,n){if(h(t)&&(e=t,t=void 0),t=t||"",null!=e)return gs(t,e,n,"month");var o,i=[];for(o=0;o<12;o++)i[o]=gs(t,o,n,"month");return i}function fs(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,s=wn(),r=t?s._week.dow:0,a=[];if(null!=n)return gs(e,(n+r)%7,o,"day");for(i=0;i<7;i++)a[i]=gs(e,(i+r)%7,o,"day");return a}function ms(t,e){return ps(t,e,"months")}function ws(t,e){return ps(t,e,"monthsShort")}function bs(t,e,n){return fs(t,e,n,"weekdays")}function vs(t,e,n){return fs(t,e,n,"weekdaysShort")}function Cs(t,e,n){return fs(t,e,n,"weekdaysMin")}us.calendar=O,us.longDateFormat=j,us.invalidDate=G,us.ordinal=X,us.preparse=ds,us.postformat=ds,us.relativeTime=Q,us.pastFuture=J,us.set=_,us.eras=Ti,us.erasParse=_i,us.erasConvertYear=Hi,us.erasAbbrRegex=Pi,us.erasNameRegex=Ni,us.erasNarrowRegex=Wi,us.months=ae,us.monthsShort=le,us.monthsParse=ce,us.monthsRegex=fe,us.monthsShortRegex=pe,us.week=ke,us.firstDayOfYear=Ee,us.firstDayOfWeek=xe,us.weekdays=Le,us.weekdaysMin=Ve,us.weekdaysShort=Be,us.weekdaysParse=ze,us.weekdaysRegex=Ye,us.weekdaysShortRegex=Ge,us.weekdaysMinRegex=qe,us.isPM=tn,us.meridiem=on,pn("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=R("moment.lang is deprecated. Use moment.locale instead.",pn),n.langData=R("moment.langData is deprecated. Use moment.localeData instead.",wn);var ys=Math.abs;function Ss(){var t=this._data;return this._milliseconds=ys(this._milliseconds),this._days=ys(this._days),this._months=ys(this._months),t.milliseconds=ys(t.milliseconds),t.seconds=ys(t.seconds),t.minutes=ys(t.minutes),t.hours=ys(t.hours),t.months=ys(t.months),t.years=ys(t.years),this}function ks(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 Rs(t,e){return ks(this,t,e,1)}function xs(t,e){return ks(this,t,e,-1)}function Es(t){return t<0?Math.floor(t):Math.ceil(t)}function Ms(){var t,e,n,o,i,s=this._milliseconds,r=this._days,a=this._months,l=this._data;return s>=0&&r>=0&&a>=0||s<=0&&r<=0&&a<=0||(s+=864e5*Es(_s(a)+r),r=0,a=0),l.milliseconds=s%1e3,t=_t(s/1e3),l.seconds=t%60,e=_t(t/60),l.minutes=e%60,n=_t(e/60),l.hours=n%24,r+=_t(n/24),a+=i=_t(Ts(r)),r-=Es(_s(i)),o=_t(a/12),a%=12,l.days=r,l.months=a,l.years=o,this}function Ts(t){return 4800*t/146097}function _s(t){return 146097*t/4800}function Hs(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+Ts(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(_s(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 Is(t){return function(){return this.as(t)}}var As=Is("ms"),Os=Is("s"),Ds=Is("m"),Ns=Is("h"),Ps=Is("d"),Ws=Is("w"),Ls=Is("M"),Bs=Is("Q"),Vs=Is("y"),Fs=As;function zs(){return To(this)}function $s(t){return t=et(t),this.isValid()?this[t+"s"]():NaN}function Us(t){return function(){return this.isValid()?this._data[t]:NaN}}var js=Us("milliseconds"),Ys=Us("seconds"),Gs=Us("minutes"),qs=Us("hours"),Ks=Us("days"),Xs=Us("months"),Zs=Us("years");function Qs(){return _t(this.days()/7)}var Js=Math.round,tr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function er(t,e,n,o,i){return i.relativeTime(e||1,!!n,t,o)}function nr(t,e,n,o){var i=To(t).abs(),s=Js(i.as("s")),r=Js(i.as("m")),a=Js(i.as("h")),l=Js(i.as("d")),h=Js(i.as("M")),c=Js(i.as("w")),d=Js(i.as("y")),u=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||r<=1&&["m"]||r<n.m&&["mm",r]||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,er.apply(null,u)}function or(t){return void 0===t?Js:"function"==typeof t&&(Js=t,!0)}function ir(t,e){return void 0!==tr[t]&&(void 0===e?tr[t]:(tr[t]=e,"s"===t&&(tr.ss=e-1),!0))}function sr(t,e){if(!this.isValid())return this.localeData().invalidDate();var n,o,i=!1,s=tr;return"object"==typeof t&&(e=t,t=!1),"boolean"==typeof t&&(i=t),"object"==typeof e&&(s=Object.assign({},tr,e),null!=e.s&&null==e.ss&&(s.ss=e.s-1)),o=nr(this,!i,s,n=this.localeData()),i&&(o=n.pastFuture(+this,o)),n.postformat(o)}var rr=Math.abs;function ar(t){return(t>0)-(t<0)||+t}function lr(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n,o,i,s,r,a,l=rr(this._milliseconds)/1e3,h=rr(this._days),c=rr(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?"-":"",s=ar(this._months)!==ar(d)?"-":"",r=ar(this._days)!==ar(d)?"-":"",a=ar(this._milliseconds)!==ar(d)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(h?r+h+"D":"")+(e||t||l?"T":"")+(e?a+e+"H":"")+(t?a+t+"M":"")+(l?a+o+"S":"")):"P0D"}var hr=so.prototype;return hr.isValid=oo,hr.abs=Ss,hr.add=Rs,hr.subtract=xs,hr.as=Hs,hr.asMilliseconds=As,hr.asSeconds=Os,hr.asMinutes=Ds,hr.asHours=Ns,hr.asDays=Ps,hr.asWeeks=Ws,hr.asMonths=Ls,hr.asQuarters=Bs,hr.asYears=Vs,hr.valueOf=Fs,hr._bubble=Ms,hr.clone=zs,hr.get=$s,hr.milliseconds=js,hr.seconds=Ys,hr.minutes=Gs,hr.hours=qs,hr.days=Ks,hr.weeks=Qs,hr.months=Xs,hr.years=Zs,hr.humanize=sr,hr.toISOString=lr,hr.toString=lr,hr.toJSON=lr,hr.locale=ri,hr.localeData=li,hr.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lr),hr.lang=ai,B("X",0,0,"unix"),B("x",0,0,"valueOf"),xt("x",bt),xt("X",yt),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))}),
|
|
40
|
+
//! moment.js
|
|
41
|
+
n.version="2.30.1",o(qn),n.fn=ls,n.min=Qn,n.max=Jn,n.now=to,n.utc=g,n.unix=hs,n.months=ms,n.isDate=c,n.locale=pn,n.invalid=w,n.duration=To,n.isMoment=S,n.weekdays=bs,n.parseZone=cs,n.localeData=wn,n.isDuration=ro,n.monthsShort=ws,n.weekdaysMin=Cs,n.defineLocale=fn,n.updateLocale=mn,n.locales=bn,n.weekdaysShort=vs,n.normalizeUnits=et,n.relativeTimeRounding=or,n.relativeTimeThreshold=ir,n.calendarFormat=Fo,n.prototype=ls,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}()),Vb.exports),$b=w(zb);
|
|
42
|
+
/*!
|
|
43
|
+
* Pikaday
|
|
44
|
+
*
|
|
45
|
+
* Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
|
|
46
|
+
*/
|
|
47
|
+
const Ub=()=>window,jb=()=>window.document,Yb=(t,e)=>window.setTimeout(t,e),Gb=function(t,e,n,o){t.addEventListener(e,n,!!o)},qb=function(t,e,n,o){t.removeEventListener(e,n,!!o)},Kb=function(t,e){return-1!==(" "+t.className+" ").indexOf(" "+e+" ")},Xb=function(t,e){Kb(t,e)||(t.className=""===t.className?e:t.className+" "+e)},Zb=function(t,e){var n;t.className=(n=(" "+t.className+" ").replace(" "+e+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},Qb=function(t){return/Array/.test(Object.prototype.toString.call(t))},Jb=function(t){return/Date/.test(Object.prototype.toString.call(t))&&!isNaN(t.getTime())},tv=function(t){let e=t.getDay();return 0===e||6===e},ev=function(t){return t%4==0&&t%100!=0||t%400==0},nv=function(t,e){return[31,ev(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},ov=function(t){Jb(t)&&t.setHours(0,0,0,0)},iv=function(t,e){return t.getTime()===e.getTime()},sv=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?Jb(e[o])?n&&(t[o]=new Date(e[o].getTime())):Qb(e[o])?n&&(t[o]=e[o].slice(0)):t[o]=sv({},e[o],n):!n&&i||(t[o]=e[o]);return t},rv=function(t,e,n){let o=jb().createEvent("HTMLEvents");o.initEvent(e,!0,!1),o=sv(o,n),t.dispatchEvent(o)},av=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},lv={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},hv=function(t,e,n){for(e+=t.firstDay;e>=7;)e-=7;return n?t.i18n.weekdaysShort[e]:t.i18n.weekdays[e]},cv=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>"},dv=function(t,e,n,o,i){let s=new Date(o,n,e),r=t.hasMoment?t.moment(s).isoWeek():function(t,e){t.setHours(0,0,0,0);let n=t.getDate(),o=t.getDay(),i=e,s=i-1,r=function(t){return(t+7-1)%7};t.setDate(n+s-r(o));let a=new Date(t.getFullYear(),0,i),l=(t.getTime()-a.getTime())/864e5;return 1+Math.round((l-s+r(a.getDay()))/7)}(s,i);return'<td class="pika-week">'+r+"</td>"},uv=function(t,e,n,o){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(o?" is-selected":"")+'">'+(e?t.reverse():t).join("")+"</tr>"},gv=function(t,e,n,o,i,s){let r,a,l,h,c,d=t._o,u=n===d.minYear,g=n===d.maxYear,p='<div id="'+s+'" class="pika-title" role="heading" aria-live="polite">',f=!0,m=!0;for(l=[],r=0;r<12;r++)l.push('<option value="'+(n===i?r-e:12+r-e)+'"'+(r===o?' selected="selected"':"")+(u&&r<d.minMonth||g&&r>d.maxMonth?' disabled="disabled"':"")+">"+d.i18n.months[r]+"</option>");for(h='<div class="pika-label">'+d.i18n.months[o]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",Qb(d.yearRange)?(r=d.yearRange[0],a=d.yearRange[1]+1):(r=n-d.yearRange,a=1+n+d.yearRange),l=[];r<a&&r<=d.maxYear;r++)r>=d.minYear&&l.push('<option value="'+r+'"'+(r===n?' selected="selected"':"")+">"+r+"</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?p+=c+h:p+=h+c,u&&(0===o||d.minMonth>=o)&&(f=!1),g&&(11===o||d.maxMonth<=o)&&(m=!1),0===e&&(p+='<button class="pika-prev'+(f?"":" is-disabled")+'" type="button">'+d.i18n.previousMonth+"</button>"),e===t._o.numberOfMonths-1&&(p+='<button class="pika-next'+(m?"":" is-disabled")+'" type="button">'+d.i18n.nextMonth+"</button>"),p+"</div>"},pv=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="'+hv(t,e)+'">'+hv(t,e,!0)+"</abbr></th>");return"<thead><tr>"+(t.isRTL?n.reverse():n).join("")+"</tr></thead>"}(t)+("<tbody>"+e.join("")+"</tbody></table>")};function fv(t){let e=this,n=e.config(t);e._onMouseDown=function(t){if(!e._v)return;let o=(t=t||Ub().event).target||t.srcElement;if(o)if(Kb(o,"is-disabled")||(!Kb(o,"pika-button")||Kb(o,"is-empty")||Kb(o.parentNode,"is-disabled")?Kb(o,"pika-prev")?e.prevMonth():Kb(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&&Yb(function(){e.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()},100))),Kb(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||Ub().event).target||t.srcElement;n&&(Kb(n,"pika-select-month")?e.gotoMonth(n.value):Kb(n,"pika-select-year")&&e.gotoYear(n.value))},e._onKeyChange=function(t){if(t=t||Ub().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(),Jb(n)&&e.setDate(n),e._v||e.show())},e._onInputFocus=function(){e.show()},e._onInputClick=function(){e.show()},e._onInputBlur=function(){let t=jb().activeElement;do{if(Kb(t,"pika-single"))return}while(t=t.parentNode);e._c||(e._b=Yb(function(){e.hide()},50)),e._c=!1},e._onClick=function(t){let o=(t=t||Ub().event).target||t.srcElement,i=o;if(o){!hasEventListeners&&Kb(o,"pika-select")&&(o.onchange||(o.setAttribute("onchange","return;"),Gb(o,"change",e._onChange)));do{if(Kb(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);e._v&&o!==n.trigger&&i!==n.trigger&&e.hide()}},e.el=jb().createElement("div"),e.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),Gb(e.el,"mousedown",e._onMouseDown,!0),Gb(e.el,"touchend",e._onMouseDown,!0),Gb(e.el,"change",e._onChange),n.keyboardInput&&Gb(jb(),"keydown",e._onKeyChange),n.field&&(n.container?n.container.appendChild(e.el):n.bound?jb().body.appendChild(e.el):n.field.parentNode.insertBefore(e.el,n.field.nextSibling),Gb(n.field,"change",e._onInputChange),n.defaultDate||(n.defaultDate=e._parseFieldValue(),n.setDefaultDate=!0));let o=n.defaultDate;Jb(o)?n.setDefaultDate?e.setDate(o,!0):e.gotoDate(o):e.gotoDate(new Date),n.bound?(this.hide(),e.el.className+=" is-bound",Gb(n.trigger,"click",e._onInputClick),Gb(n.trigger,"focus",e._onInputFocus),Gb(n.trigger,"blur",e._onInputBlur)):this.show()}function mv(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function wv(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)}fv.prototype={config:function(t){this._o||(this._o=sv({},lv,!0));let e=sv(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,Jb(e.minDate)||(e.minDate=!1),Jb(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),Qb(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))||lv.yearRange,e.yearRange>100&&(e.yearRange=100);return e},toString:function(t){return t=t||this._o.format,Jb(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 Jb(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="",rv(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof t&&(t=new Date(Date.parse(t))),!Jb(t))return;let n=this._o.minDate,o=this._o.maxDate;Jb(n)&&t<n?t=n:Jb(o)&&t>o&&(t=o),this._d=new Date(t.getTime()),ov(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),rv(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(Jb(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]=av(this.calendars[0]);for(let t=1;t<this._o.numberOfMonths;t++)this.calendars[t]=av({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?(ov(t),this._o.minDate=t,this._o.minYear=t.getFullYear(),this._o.minMonth=t.getMonth()):(this._o.minDate=lv.minDate,this._o.minYear=lv.minYear,this._o.minMonth=lv.minMonth,this._o.startRange=lv.startRange),this.draw()},setMaxDate:function(t){t instanceof Date?(ov(t),this._o.maxDate=t,this._o.maxYear=t.getFullYear(),this._o.maxMonth=t.getMonth()):(this._o.maxDate=lv.maxDate,this._o.maxYear=lv.maxYear,this._o.maxMonth=lv.maxMonth,this._o.endRange=lv.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,s=n.minMonth,r=n.maxMonth,a="";this._y<=o&&(this._y=o,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(r)&&this._m>r&&(this._m=r));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">'+gv(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&&Yb(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,s,r,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=Ub().innerWidth||jb().documentElement.clientWidth,i=Ub().innerHeight||jb().documentElement.clientHeight,s=jb().body.scrollTop||jb().documentElement.scrollTop,h=!0,c=!0,l=t.getBoundingClientRect(),r=l.left+Ub().pageXOffset,a=l.bottom+Ub().pageYOffset,(this._o.reposition&&r+e>o||this._o.position.indexOf("right")>-1&&r-e+t.offsetWidth>0)&&(r=r-e+t.offsetWidth,h=!1),(this._o.reposition&&a+n>i+s||this._o.position.indexOf("top")>-1&&a-n-t.offsetHeight>0)&&(a=a-n-t.offsetHeight,c=!1),r<0&&(r=0),a<0&&(a=0),this.el.style.left=r+"px",this.el.style.top=a+"px",Xb(this.el,h?"left-aligned":"right-aligned"),Xb(this.el,c?"bottom-aligned":"top-aligned"),Zb(this.el,h?"right-aligned":"left-aligned"),Zb(this.el,c?"top-aligned":"bottom-aligned"))},render:function(t,e,n){let o=this._o,i=new Date,s=nv(t,e),r=new Date(t,e,1).getDay(),a=[],l=[];ov(i),o.firstDay>0&&(r-=o.firstDay,r<0&&(r+=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=nv(d,h),p=s+r,f=p;for(;f>7;)f-=7;p+=7-f;let m=!1;for(let n=0,f=0;n<p;n++){let p=new Date(t,e,n-r+1),w=!!Jb(this._d)&&iv(p,this._d),b=iv(p,i),v=-1!==o.events.indexOf(p.toDateString()),C=n<r||n>=s+r,y=n-r+1,S=e,k=t,R=o.startRange&&iv(o.startRange,p),x=o.endRange&&iv(o.endRange,p),E=o.startRange&&o.endRange&&o.startRange<p&&p<o.endRange;C&&(n<r?(y=g+y,S=h,k=d):(y-=s,S=c,k=u));let M={day:y,month:S,year:k,hasEvent:v,isSelected:w,isToday:b,isDisabled:o.minDate&&p<o.minDate||o.maxDate&&p>o.maxDate||o.disableWeekends&&tv(p)||o.disableDayFn&&o.disableDayFn(p),isEmpty:C,isStartRange:R,isEndRange:x,isInRange:E,showDaysInNextAndPreviousMonths:o.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:o.enableSelectionDaysInNextAndPreviousMonths};o.pickWholeWeek&&w&&(m=!0),l.push(cv(M)),7===++f&&(o.showWeekNumber&&l.unshift(dv(this,n-r,e,t,o.firstWeekOfYearMinDays)),a.push(uv(l,o.isRTL,o.pickWholeWeek,m)),l=[],f=0,m=!1)}return pv(o,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),Zb(this.el,"is-hidden"),this._o.bound&&(Gb(jb(),"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&&qb(jb(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),Xb(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(),qb(this.el,"mousedown",this._onMouseDown,!0),qb(this.el,"touchend",this._onMouseDown,!0),qb(this.el,"change",this._onChange),t.keyboardInput&&qb(jb(),"keydown",this._onKeyChange),t.field&&(qb(t.field,"change",this._onInputChange),t.bound&&(qb(t.trigger,"click",this._onInputClick),qb(t.trigger,"focus",this._onInputFocus),qb(t.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};const bv="date",vv="dateEditor",Cv=new WeakSet;var yv=new WeakSet;class Sv extends iw{static get EDITOR_TYPE(){return bv}init(){"function"!=typeof $b&&bt("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,s){super.prepare(t,e,n,o,i,s)}open(t=null){Cv.has(this.cellProperties.instance)||(Cv.add(this.cellProperties.instance),Jt("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:vv})}close(){this.$datePicker?.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(vv),super.close()}finishEditing(t=!1,e=!1){super.finishEditing(t,e)}showDatepicker(t){const e=mv(this,yv,kv).call(this),n=this.hot.view.isMouseDown(),o=!!t&&sn(t.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new fv(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment($b),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,$b(i,e,!0).isValid()&&this.$datePicker.setMoment($b(i,e),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),o||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,$b(i,e,!0).isValid()&&this.$datePicker.setMoment($b(i,e),!0),o||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const t=this.TEXTAREA,e={};this.cellProperties&&this.cellProperties.datePickerConfig&&yt(e,this.cellProperties.datePickerConfig);const n=e.onSelect,o=e.onClose;return e.field=t,e.trigger=t,e.container=this.datePicker,e.bound=!1,e.keyboardInput=!1,e.format=e.format??mv(this,yv,kv).call(this),e.reposition=e.reposition||!1,e.isRTL=!1,e.onSelect=t=>{let e=t;isNaN(e.getTime())||(e=$b(e).format(mv(this,yv,kv).call(this))),this.setValue(e),n&&n(),Yt()&&this.hideDatepicker()},e.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),o&&o()},e}refreshDimensions(t){if(super.refreshDimensions(t),this.state!==Fp.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:e,columnIndexMapper:n}=this.hot,{wtOverlays:o}=this.hot.view._wt,{wtTable:i}=o.getParentOverlay(this.TD)??this.hot.view._wt,s=e.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleRow()),r=e.getVisualFromRenderableIndex(i.getLastPartiallyVisibleRow()),a=n.getVisualFromRenderableIndex(i.getFirstPartiallyVisibleColumn()),l=n.getVisualFromRenderableIndex(i.getLastPartiallyVisibleColumn());if(this.row>=s&&this.row<=r&&this.col>=a&&this.col<=l){const t=this.TD.getBoundingClientRect(),e=Ae(this.datePicker),n=Oe(this.datePicker),o=Oe(this.TD),i=this.hot.rootWindow,s=this.hot.rootDocument.documentElement,r=i.pageYOffset,a=i.pageYOffset+s.clientHeight,l=i.pageXOffset,h=i.pageXOffset+s.clientWidth;let c=r+t.top+o;if(c+n>a){const e=r+t.top-n;c=e>=r?Math.max(r,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()}constructor(...t){super(...t),wv(this,yv),this.parentDestroyed=!1,this.$datePicker=null}}function kv(){return this.cellProperties.dateFormat??"DD/MM/YYYY"}class Rv extends Nb{static get EDITOR_TYPE(){return"dropdown"}prepare(t,e,n,o,i,s){s.filter=!1,s.strict=!0,super.prepare(t,e,n,o,i,s)}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)}}const xv=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function Ev(t){if(O(t))return null;if("string"==typeof t&&xv.test(t)){const[e,n,o]=t.split("-").map(Number);return new Date(e,n-1,o)}return null}function Mv(t){if("string"!=typeof t||!xv.test(t))return!1;const e=new Date(t);return!Number.isNaN(e.getTime())&&t===e.toISOString().slice(0,10)}const Tv=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function _v(t){if(O(t))return null;if("string"!=typeof t)return null;const e=Tv.exec(t);if(!e)return null;const n=Number(e[1]),o=Number(e[2]),i=void 0!==e[3]?Number(e[3]):0,s=e[4],r=void 0!==s?Number(s.padEnd(3,"0").slice(0,3)):0;return new Date(1970,0,1,n,o,i,r)}function Hv(t){return"string"==typeof t&&Tv.test(t)}class Iv extends iw{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){O(t)&&(t=this.cellProperties.defaultDate),Mv(t)?super.setValue(t):Qt(T`IntlDateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
48
|
+
required by the native date input. Received:`,t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class Av extends iw{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){Hv(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
|
|
49
|
+
required by the native time input. Received:`,t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class Ov extends iw{static get EDITOR_TYPE(){return"numeric"}}class Dv extends iw{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,we(this.TEXTAREA_PARENT),this.TEXTAREA.setAttribute(...Q(-1)),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}constructor(...t){super(...t),this.autoResize=tw(this.hot.rootDocument,{textContent:t=>"•".repeat(t.value.length)})}}const Nv="ht_editor_visible",Pv="selectEditor";class Wv extends zp{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,Nv)&&ge(this.selectWrapper,Nv),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,s){super.prepare(t,e,n,o,i,s);const r=this.cellProperties.selectOptions;let a;a="function"==typeof r?this.prepareOptions(r(this.row,this.col,this.prop)):this.prepareOptions(r),we(this.select),Tt(a,(t,e)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=e,ye(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!==Fp.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,Nv)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={group:Pv};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(Pv)}}class Lv extends iw{static get EDITOR_TYPE(){return"time"}prepare(t,e,n,o,i,s){super.prepare(t,e,n,o,i,s),this.TEXTAREA.dir="ltr"}}function Bv(t){return t.querySelector('input[type="checkbox"]')}function Vv(t,e){return function(...t){const e=t[t.length-1];let n,o=t;"function"==typeof e&&(n=e,o=o.slice(0,-1));const i=n?(t,e)=>e.some(e=>n(t,e)):(t,e)=>e.includes(t),[s,...r]=o;let a=s;return x(r,t=>{a=a.filter(e=>i(e,t))}),a}(t,e,(t,e)=>JSON.stringify(t)===JSON.stringify(e))}function Fv(t,e){return Pt(e)?Array.isArray(t)&&t.some(t=>Pt(t)?xt(t,e):t===e):t.includes(e)}function zv(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 $v=new WeakSet;class Uv{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(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n})(this,$v,jv).call(this,this.input.value)}constructor({input:t,eventManager:e}){zv(this,$v),this.input=t,this.eventManager=e,this.enabled=!0,this.onInput=this.onInput.bind(this)}}function jv(t){this.runLocalHooks("triggerFilter",t)}Rt(Uv,Fs);const Yv="ht-multi-select-editor",Gv=`${Yv}-search-input-wrapper`,qv=`${Yv}-search-icon`,Kv=`${Yv}-search-input`,Xv=`${Yv}-separator`,Zv=`${Yv}-item-`,Qv=`${Yv}-item-selected`;function Jv(t){const e=Bv(t);ue(t,Qv),e.checked||(e.checked=!0)}function tC(t){const e=Bv(t);ge(t,Qv),e.checked&&(e.checked=!1)}function eC({dropdownListElement:t,index:e}){const n=t.children[e];if(n){const t=Bv(n);t&&t.blur()}}function nC(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oC(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function iC(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,oC(t,e,"get"))}function sC(t,e,n){nC(t,e),e.set(t,n)}function rC(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,oC(t,e,"set"),n),n}function aC(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function lC(t,e){nC(t,e),e.add(t)}var hC=new WeakMap,cC=new WeakMap,dC=new WeakMap,uC=new WeakMap,gC=new WeakMap,pC=new WeakMap,fC=new WeakMap,mC=new WeakMap,wC=new WeakMap,bC=new WeakMap,vC=new WeakSet,CC=new WeakSet,yC=new WeakSet,SC=new WeakSet,kC=new WeakSet,RC=new WeakSet,xC=new WeakSet,EC=new WeakSet,MC=new WeakSet,TC=new WeakSet;class _C{init(){rC(this,dC,function({root:t}){return t.createElement("ul")}({root:iC(this,mC)})),rC(this,uC,function({root:t}){const e=t.createElement("input");return pe(e,[rt("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",Kv]]),ue(e,Kv),e}({root:iC(this,mC)}));const t=function({root:t}){const e=t.createElement("div");return ue(e,qv),pe(e,[["aria-hidden","true"]]),e}({root:iC(this,mC)});rC(this,pC,function({root:t}){const e=t.createElement("div");return e.className=Gv,e}({root:iC(this,mC)})),rC(this,gC,function({root:t}){const e=t.createElement("div");return e.className=Xv,e}({root:iC(this,mC)})),iC(this,pC).appendChild(t),iC(this,pC).appendChild(iC(this,uC)),iC(this,cC).appendChild(iC(this,pC)),iC(this,cC).appendChild(iC(this,gC)),iC(this,cC).appendChild(iC(this,dC)),rC(this,fC,new Uv({input:iC(this,uC),eventManager:iC(this,wC)}))}setVisibleRowsNumberSetting(t){iC(this,bC).visibleRowsNumberSetting=t}setSourceSortFunction(t){iC(this,bC).sourceSortFunction=t??null}setSearchInputVisibility(t=!0){iC(this,pC).style.display=t?"":"none",iC(this,gC).style.display=t?"":"none",iC(this,fC).toggle(t)}fillDropdown(t,e=[]){this.removeAllDropdownItems(),iC(this,bC).currentlySelectedItemIndex=0,Array.isArray(e)||(e=[]),iC(this,bC).sourceSortFunction&&(t=iC(this,bC).sourceSortFunction(t)),t.forEach((t,n)=>{aC(this,xC,PC).call(this,{rootDocument:iC(this,mC),itemKey:t?.key,itemValue:t?.value??t,indexWithinList:n,checked:Fv(e,t),disabled:iC(this,bC).areCheckboxesDisabled})}),iC(this,bC).entriesCount=t.length,this.runLocalHooks("afterDropdownFill")}updateDimensions(t,e=!1){const n=aC(this,SC,OC).call(this),o=aC(this,CC,IC).call(this,t),i=o?t.spaceAbove:t.spaceBelow;if(!e&&o&&(iC(this,bC).flippedVertically=!0),iC(this,bC).entriesCount>0&&i<this.getHeight(!0)){const t=Math.max(Math.floor((i-aC(this,RC,NC).call(this))/n)-1,1);iC(this,bC).actualRenderedItemsCount=iC(this,bC).visibleRowsNumberSetting?Math.min(t,iC(this,bC).visibleRowsNumberSetting):t}else iC(this,bC).actualRenderedItemsCount=Math.min(iC(this,bC).entriesCount,iC(this,bC).visibleRowsNumberSetting);iC(this,bC).actualRenderedItemsCount&&iC(this,bC).entriesCount>iC(this,bC).actualRenderedItemsCount?iC(this,cC).style.height=`${this.getHeight()}px`:iC(this,cC).style.height="",aC(this,yC,AC).call(this,t),iC(this,cC).scrollTop=0}getDropdownWidth(){return function({dropdownListElement:t}){return t.offsetWidth}({dropdownListElement:iC(this,dC)})}deselectAllItems(){!function({dropdownListElement:t}){t.querySelectorAll(`.${Qv}`).forEach(t=>tC(t))}({dropdownListElement:iC(this,dC)})}focusFirstItem(){iC(this,bC).entriesCount>0&&aC(this,vC,HC).call(this,0)}focusItem(t){aC(this,vC,HC).call(this,t)}focusPreviousItem(){0!==iC(this,bC).currentlySelectedItemIndex?(eC({dropdownListElement:iC(this,dC),index:iC(this,bC).currentlySelectedItemIndex}),aC(this,vC,HC).call(this,iC(this,bC).currentlySelectedItemIndex-1)):this.focusSearchInput()}focusNextItem(){iC(this,bC).currentlySelectedItemIndex!==iC(this,bC).entriesCount-1&&(eC({dropdownListElement:iC(this,dC),index:iC(this,bC).currentlySelectedItemIndex}),aC(this,vC,HC).call(this,iC(this,bC).currentlySelectedItemIndex+1))}focusSearchInput(){iC(this,uC)&&iC(this,uC).focus()}reset(){this.removeAllDropdownItems(),aC(this,TC,BC).call(this),iC(this,uC)&&(iC(this,uC).value=""),iC(this,cC).style.position="",iC(this,cC).style.top="",iC(this,cC).style.height="",iC(this,cC).scrollTop=0}isFlippedVertically(){return iC(this,bC).flippedVertically}getHeight(t=!1,e=!1){const n=iC(this,mC).defaultView.getComputedStyle(iC(this,cC));return aC(this,kC,DC).call(this,t)+aC(this,RC,NC).call(this)+(!0===e?2*parseInt(n.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return iC(this,fC)}removeAllDropdownItems(){Array.from(iC(this,dC).children).forEach(t=>aC(this,MC,LC).call(this,t)),iC(this,bC).checkboxChangeListeners.clear(),iC(this,dC).innerHTML=""}disableCheckboxes(){iC(this,bC).areCheckboxesDisabled=!0,function({dropdownListElement:t}){t.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(t=>{t.dataset.disabled=!0})}({dropdownListElement:iC(this,dC)})}enableCheckboxes(){iC(this,bC).areCheckboxesDisabled=!1,function({dropdownListElement:t}){t.querySelectorAll('input[type="checkbox"]').forEach(t=>{t.dataset.disabled=!1})}({dropdownListElement:iC(this,dC)})}constructor(t,e){lC(this,vC),lC(this,CC),lC(this,yC),lC(this,SC),lC(this,kC),lC(this,RC),lC(this,xC),lC(this,EC),lC(this,MC),lC(this,TC),sC(this,hC,{writable:!0,value:void 0}),sC(this,cC,{writable:!0,value:void 0}),sC(this,dC,{writable:!0,value:void 0}),sC(this,uC,{writable:!0,value:void 0}),sC(this,gC,{writable:!0,value:void 0}),sC(this,pC,{writable:!0,value:void 0}),sC(this,fC,{writable:!0,value:void 0}),sC(this,mC,{writable:!0,value:void 0}),sC(this,wC,{writable:!0,value:void 0}),sC(this,bC,{writable:!0,value:void 0}),rC(this,hC,null),rC(this,cC,null),rC(this,dC,null),rC(this,uC,null),rC(this,gC,null),rC(this,pC,null),rC(this,fC,null),rC(this,mC,null),rC(this,wC,new Fn(this)),rC(this,bC,{visibleRowsNumber:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null}),rC(this,cC,t),rC(this,mC,iC(this,cC).ownerDocument),rC(this,hC,e),this.init()}}function HC(t){iC(this,bC).currentlySelectedItemIndex=t,function({dropdownListElement:t,index:e}){const n=t.children[e];if(n){const t=Bv(n);t&&t.focus()}}({dropdownListElement:iC(this,dC),index:t})}function IC(t){const{spaceAbove:e,spaceBelow:n,cellHeight:o}=t;return this.getHeight(!0)>n&&e>n+o}function AC(t){const{cellHeight:e}=t;iC(this,bC).flippedVertically?(iC(this,cC).style.position="absolute",iC(this,cC).style.top=-this.getHeight(!1,!0)-e-2+"px"):(iC(this,cC).style.position="",iC(this,cC).style.top="")}function OC(){const t=iC(this,mC).defaultView.getComputedStyle(iC(this,cC));return 2*parseInt(t.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(t.getPropertyValue("--ht-line-height"),10)}function DC(t=!1){const e=iC(this,bC).entriesCount;return(t?e:iC(this,bC).actualRenderedItemsCount??e)*aC(this,SC,OC).call(this)}function NC(){if(!iC(this,fC).enabled)return 0;const t=iC(this,mC).defaultView.getComputedStyle(iC(this,cC));return iC(this,pC).offsetHeight+(iC(this,gC).offsetHeight+2*parseInt(t.getPropertyValue("--ht-menu-vertical-padding"),10))}function PC({rootDocument:t,itemKey:e,itemValue:n,indexWithinList:o,checked:i=!1,disabled:s=!1}){const r=function({rootDocument:t,instanceId:e,itemKey:n,itemValue:o,indexWithinList:i,checked:s=!1,disabled:r=!1}){const a=t.createElement("li"),l=t.createElement("div"),h=t.createElement("input"),c=t.createElement("label");return h.id=`${e}-${Zv}${i}`,h.type="checkbox",h.dataset.value=o,h.dataset.index=i,h.dataset.disabled=!s&&r,n&&(h.dataset.key=n),c.htmlFor=h.id,c.textContent=o,l.appendChild(h),l.appendChild(c),a.appendChild(l),a}({rootDocument:t,instanceId:iC(this,hC),itemKey:e,itemValue:n,indexWithinList:o,checked:i,disabled:s});i&&Jv(r),aC(this,EC,WC).call(this,r),iC(this,dC).appendChild(r)}function WC(t){const e=Bv(t),n=()=>{"true"===e.dataset.disabled&&e.checked?e.checked=!1:e.checked?(Jv(t),this.runLocalHooks("afterDropdownItemChecked",e.dataset.key,e.dataset.value)):(tC(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")))};iC(this,bC).checkboxChangeListeners.set(e,{change:n,click:o}),iC(this,wC).addEventListener(e,"change",n),iC(this,wC).addEventListener(t,"click",o)}function LC(t){const e=Bv(t),n=iC(this,bC).checkboxChangeListeners.get(e);iC(this,wC).removeEventListener(e,"change",n.change),iC(this,wC).removeEventListener(t,"click",n.click),iC(this,bC).checkboxChangeListeners.delete(e)}function BC(){iC(this,bC).visibleRowsNumberSetting=null,iC(this,bC).entriesCount=0,iC(this,bC).flippedVertically=!1,iC(this,bC).currentlySelectedItemIndex=0,iC(this,bC).checkboxChangeListeners.clear(),iC(this,bC).areCheckboxesDisabled=!1,iC(this,bC).sourceSortFunction=null}Rt(_C,Fs);class VC{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(!Pt(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 Fv(this.getItemsArray(),t)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}constructor(t){this.selectedItems=this.selectedItems??new Set,this.maxSelectionsCount=1/0,Array.isArray(t)?this.selectedItems=new Set(t):this.selectedItems=new Set}}function FC(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zC(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function $C(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,zC(t,e,"get"))}function UC(t,e,n){FC(t,e),e.set(t,n)}function jC(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,zC(t,e,"set"),n),n}function YC(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function GC(t,e){FC(t,e),e.add(t)}const qC="multiselect",KC="multiselectEditor";var XC=new WeakMap,ZC=new WeakMap,QC=new WeakSet,JC=new WeakSet,ty=new WeakSet,ey=new WeakSet,ny=new WeakSet,oy=new WeakSet,iy=new WeakSet,sy=new WeakSet,ry=new WeakSet,ay=new WeakSet,ly=new WeakSet,hy=new WeakSet,cy=new WeakSet,dy=new WeakSet,uy=new WeakSet;class gy extends zp{static get EDITOR_TYPE(){return qC}createElements(){const{rootDocument:t}=this.hot;jC(this,ZC,t.createElement("div")),$C(this,ZC).style.display="none",ue($C(this,ZC),"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),ue(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),pe(this.dropdownContainerElement,[rt("Select options"),["role","group"]]),$C(this,ZC).appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild($C(this,ZC)),this.dropdownController=new _C(this.dropdownContainerElement,this.hot.guid)}prepare(t,e,n,o,i,s){super.prepare(t,e,n,o,i,s);const r=function(t){return Y(t)?JSON.parse(t):t}(i),a=Vv(Array.isArray(r)?r:[r],YC(this,QC,py).call(this));this.dropdownController.reset(),a.length>=YC(this,dy,My).call(this,"maxSelections")&&YC(this,oy,vy).call(this),YC(this,cy,Ey).call(this,a),this.dropdownController.setSourceSortFunction(this.cellProperties.sourceSortFunction),this.dropdownController.fillDropdown(YC(this,QC,py).call(this),a),this.dropdownController.setVisibleRowsNumberSetting(YC(this,dy,My).call(this,"visibleRows")),this.dropdownController.setSearchInputVisibility(YC(this,dy,My).call(this,"searchInput")),void 0!==s.maxSelections&&$C(this,XC).setMaxSelectionCount(s.maxSelections)}finishEditing(t,e,n){super.finishEditing(t,e,n)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(t,e)=>{YC(this,ly,Ry).call(this,t,e),$C(this,XC).getSize()>=this.cellProperties.maxSelections&&YC(this,oy,vy).call(this)}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(t,e)=>{YC(this,hy,xy).call(this,t,e),$C(this,XC).getSize()<this.cellProperties.maxSelections&&YC(this,iy,Cy).call(this)}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterSetSourceDataAtCell",(...t)=>YC(this,uy,Ty).call(this,...t)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",t=>YC(this,sy,yy).call(this,t))}open(t){if(on(t?.keyCode)){const e=1===t.key.length?t.key:String.fromCharCode(t.keyCode);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(e),YC(this,sy,yy).call(this,e)),t.preventDefault(),this.enableFullEditMode()}YC(this,ey,wy).call(this),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),YC(this,JC,fy).call(this),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(YC(this,ry,Sy).call(this))}close(){YC(this,ny,by).call(this),YC(this,ty,my).call(this),this.dropdownController.getInputController().unlisten()}getValue(){return $C(this,XC).getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();const{top:t,start:e,height:n}=this.getEditedCellRect(),o=$C(this,ZC).style;o.top=`${t+n}px`,o[this.hot.isRtl()?"right":"left"]=`${e}px`,ue($C(this,ZC),"ht_editor_visible")}focus(){!1===YC(this,dy,My).call(this,"searchInput")?this.dropdownController.focusFirstItem():this.dropdownController.focusSearchInput()}getInputElement(){return this.dropdownController.getInputController().getInputElement()}destroy(){this.close(),this.dropdownController.reset()}constructor(t){super(t),GC(this,QC),GC(this,JC),GC(this,ty),GC(this,ey),GC(this,ny),GC(this,oy),GC(this,iy),GC(this,sy),GC(this,ry),GC(this,ay),GC(this,ly),GC(this,hy),GC(this,cy),GC(this,dy),GC(this,uy),UC(this,XC,{writable:!0,value:void 0}),UC(this,ZC,{writable:!0,value:void 0}),this._closeAfterDataChange=!1,jC(this,XC,new VC),jC(this,ZC,null),this.dropdownContainerElement=null,this.dropdownController=this.dropdownController??null,this.eventManager=new Fn(this),this.createElements(),this.bindEvents()}}function py(){return this.cellProperties.source??[]}function fy(){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:KC}),t.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!YC(this,dy,My).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:()=>!YC(this,dy,My).call(this,"enterCommits"),callback:t=>{t.preventDefault()}}],{group:KC,relativeToGroup:Lp,position:"before"})}function my(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(KC)}function wy(){$C(this,ZC).style.display=""}function by(){$C(this,ZC).style.display="none"}function vy(){this.dropdownController.disableCheckboxes()}function Cy(){this.dropdownController.enableCheckboxes()}function yy(t,e=YC(this,dy,My).call(this,"filterSelectedItems")??!0){const n=YC(this,QC,py).call(this).filter(n=>{const o=n?.value??n;return!(e||!$C(this,XC).has(n))||(this.cellProperties.filteringCaseSensitive?o.includes(t):o.toLowerCase().includes(t.toLowerCase()))});this.dropdownController.fillDropdown(n,$C(this,XC).getItemsArray()),this.dropdownController.updateDimensions(YC(this,ry,Sy).call(this),!0)}function Sy(){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 ky(){const t=$C(this,XC).getItemsArray();this.saveValue([[t]])}function Ry(t,e){t?$C(this,XC).add({key:t,value:e}):$C(this,XC).add(e),YC(this,ay,ky).call(this),this.refreshDimensions()}function xy(t,e){t?$C(this,XC).remove({key:t,value:e}):$C(this,XC).remove(e),YC(this,ay,ky).call(this),this.refreshDimensions()}function Ey(t){t.length>0?jC(this,XC,new VC(t)):jC(this,XC,new VC)}function My(t){return this.cellProperties[t]}function Ty(t,e){this.isOpened()&&e===`${qC}-renderer`&&parseInt(t[0][0],10)===this.cellProperties.visualRow&&parseInt(t[0][1],10)===this.cellProperties.visualCol&&(YC(this,cy,Ey).call(this,t[0][3]),this.dropdownController.fillDropdown(YC(this,QC,py).call(this),$C(this,XC).getItemsArray()),this.dropdownController.focusItem(0),$C(this,XC).getSize()>=this.cellProperties.maxSelections?YC(this,oy,vy).call(this):YC(this,iy,Cy).call(this))}function _y(t,e,n,o,i,s){ye(e,null==s?"":s,!1)}_y.RENDERER_TYPE="html";function Hy(t,e,n,o,i,s,r){const{rootDocument:a}=t,l=r.allowHtml?_y:sw,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,s,r]),e.firstChild||e.appendChild(a.createTextNode(String.fromCharCode(160))),e.insertBefore(h,e.firstChild),ue(e,"htAutocomplete"),!t.acArrowListener){const i=new Fn(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()})}}Hy.RENDERER_TYPE="autocomplete";function Iy(t,e,n,o,i,s,r){Hy.apply(this,[t,e,n,o,i,s,r])}Iy.RENDERER_TYPE="dropdown";const Ay="#bad-value#",Oy="ht-loading",Dy=new WeakMap,Ny=new WeakMap,Py="data-row",Wy="data-col",Ly="checkboxRenderer",By="checkbox";function Vy(t,e,n,o,i,s,r){const{rootDocument:a}=t,l=t.getSettings().ariaTags;!function(t){let e=Ny.get(t);if(!e){const{rootElement:n}=t;e=new Fn(t),e.addEventListener(n,"click",e=>function(t,e){const{target:n}=t;if(!Fy(n))return;if(!n.hasAttribute(Py)||!n.hasAttribute(Wy))return;const o=parseInt(n.getAttribute(Py),10),i=parseInt(n.getAttribute(Wy),10),s=e.getCellMeta(o,i);s.readOnly&&t.preventDefault()}(e,t)),e.addEventListener(n,"mouseup",e=>function(t,e){const{target:n}=t;if(!Fy(n))return;if(!n.hasAttribute(Py)||!n.hasAttribute(Wy))return;setTimeout(e.listen,10)}(e,t)),e.addEventListener(n,"change",e=>function(t,e){const{target:n}=t;if(!Fy(n))return;if(!n.hasAttribute(Py)||!n.hasAttribute(Wy))return;const o=parseInt(n.getAttribute(Py),10),i=parseInt(n.getAttribute(Wy),10),s=e.getCellMeta(o,i);if(!s.readOnly){let n=null;n=t.target.checked?void 0===s.uncheckedTemplate||s.checkedTemplate:void 0!==s.uncheckedTemplate&&s.uncheckedTemplate,e.setDataAtCell(o,i,n)}}(e,t)),Ny.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=r.label;let d=!1;if(void 0===r.checkedTemplate&&(r.checkedTemplate=!0),void 0===r.uncheckedTemplate&&(r.uncheckedTemplate=!1),we(e),s===r.checkedTemplate||H(s).toLocaleLowerCase(r.locale)===H(r.checkedTemplate).toLocaleLowerCase(r.locale)?h.checked=!0:s===r.uncheckedTemplate||H(s).toLocaleLowerCase(r.locale)===H(r.uncheckedTemplate).toLocaleLowerCase(r.locale)?h.checked=!1:O(s)?ue(h,"noValue"):(h.style.display="none",ue(h,"htBadValue"),d=!0),pe(h,[[Py,n],[Wy,o]]),l&&pe(h,[rt(h.checked?t.getTranslatedPhrase(gd):t.getTranslatedPhrase(pd)),ft(h.checked),["role","checkbox"]]),!d&&c){let r="";if(c.value)r="function"==typeof c.value?c.value.call(this,n,o,i,s):c.value;else if(c.property){const e=t.getDataAtRowProp(n,c.property);r=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,r,!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(e=!1){const n=t.getSelectedRange(),o=[],i=new Map;let s=[],r=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)?s.push([n,a,l.uncheckedTemplate,h]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(c)&&s.push([n,a,l.checkedTemplate,h]):s.push([n,a,l.uncheckedTemplate,h]),r+=1}o.push(r),r=0}if(s=s.every(([,,t])=>t===s[0][2])?s.map(([t,e,n])=>[t,e,n]):s.map(([t,e,,n])=>[t,e,n.checkedTemplate]),s.length>0){const n=[];if(o.forEach((t,e)=>{let o=s.splice(0,t);i.size&&i.has(e)&&(o=[...o,...i.get(e)]),n.push(o)}),e){const e=[];n.forEach(t=>{t.forEach(t=>{e.push(t)})}),e.length>0&&t.setDataAtCell(e)}else n.forEach(e=>{e.length>0&&t.setDataAtCell(e)})}}}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(Ay)),Dy.has(t)||(Dy.set(t,!0),function(){const e=t.getShortcutManager().getContext("grid"),n={group:Ly,relativeToGroup:Lp,position:"before"};e.addShortcuts([{keys:[["space"]],callback:()=>(u(),!g()),runOnlyIf:()=>t.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(u(),!g()),runOnlyIf:()=>{const e=t.getSelectedRangeActive();return t.getSettings().enterBeginsEditing&&e?.highlight.isCell()&&!t.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(u(!0),!g()),runOnlyIf:()=>t.getSelectedRangeActive()?.highlight.isCell()}],n)}())}function Fy(t){return"INPUT"===t.tagName&&"checkbox"===t.getAttribute("type")}Mn.getSingleton().add("modifyAutoColumnSizeSeed",function(t,e,n){const{label:o,type:i,row:s,column:r,prop:a}=e;if(i!==By||!o)return;const{value:l,property:h}=o;let c=n;if(l)c="function"==typeof l?l(s,r,a,n):l;else if(h){const t=this.getDataAtRowProp(s,h);c=null!==t?t:n}return`${H(c).length}`}),Vy.RENDERER_TYPE=By;function zy(t,e,n,o,i,s,r){Hy.apply(this,[t,e,n,o,i,s,r])}zy.RENDERER_TYPE="handsontable";const $y={year:"numeric",month:"2-digit",day:"2-digit"};function Uy(t,e){const{dateFormat:n,locale:o,allowEmpty:i}=e;if(O(t))return i?t:Ay;const s=Ev(t);if(null===s)return Ay;const r=Et(n)?n:$y;return new Intl.DateTimeFormat(o,r).format(s)}function jy(t,e,n,o,i,s,r){sw.apply(this,[t,e,n,o,i,s,r])}jy.valueFormatter=Uy,jy.RENDERER_TYPE="intl-date";const Yy={hour:"numeric",minute:"2-digit"};function Gy(t,e,n,o,i,s,r){sw.apply(this,[t,e,n,o,i,s,r]),e.dir="ltr"}Gy.RENDERER_TYPE="intl-time";var qy,Ky,Xy,Zy,Qy,Jy,tS="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function eS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}
|
|
50
|
+
/*!
|
|
51
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
52
|
+
*
|
|
53
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
54
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
55
|
+
* in the Software without restriction, including without limitation the rights
|
|
56
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
57
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
58
|
+
* furnished to do so, subject to the following conditions:
|
|
59
|
+
*
|
|
60
|
+
* The above copyright notice and this permission notice shall be included in
|
|
61
|
+
* all copies or substantial portions of the Software.
|
|
62
|
+
*
|
|
63
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
64
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
65
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
66
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
67
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
68
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
69
|
+
* SOFTWARE.
|
|
70
|
+
*/function nS(){return Ky?qy:(Ky=1,qy={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}}})}
|
|
71
|
+
/*!
|
|
72
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
73
|
+
*
|
|
74
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
75
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
76
|
+
* in the Software without restriction, including without limitation the rights
|
|
77
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
78
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
79
|
+
* furnished to do so, subject to the following conditions:
|
|
80
|
+
*
|
|
81
|
+
* The above copyright notice and this permission notice shall be included in
|
|
82
|
+
* all copies or substantial portions of the Software.
|
|
83
|
+
*
|
|
84
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
85
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
86
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
87
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
88
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
89
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
90
|
+
* SOFTWARE.
|
|
91
|
+
*/function oS(){if(Zy)return Xy;Zy=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,s,r,a,l,h){if(!isNaN(+o))return+o;let c="",d=o.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(d!==o)return-1*n(d,i,s,r,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,s,r,a,l)*h.factor}if(c=o.replace("%",""),c!==o)return n(c,i,s,r,a,l)/100;let u=parseFloat(o);if(isNaN(u))return;let g=r(u);if(g&&"."!==g&&(c=o.replace(new RegExp(`${e(g)}$`),""),c!==o))return n(c,i,s,r,a,l);let p={};Object.keys(l).forEach(t=>{p[l[t]]=t});let f=Object.keys(p).sort().reverse(),m=f.length;for(let t=0;t<m;t++){let e=f[t],h=p[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,s,r,a,l)*t}}}function o(t,o,i="",s,r,a,l){if(""===t)return;if(t===r)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,s,r,a)}return Xy={unformat:function(t,e){const n=lS();let i,s=n.currentDelimiters(),r=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],s=+n[2];return!isNaN(o)&&!isNaN(i)&&!isNaN(s)}(t,s)?function(t){let e=t.split(":"),n=+e[0],o=+e[1];return+e[2]+60*o+3600*n}(t):o(t,s,r,a,l,h);else{if("number"!=typeof t)return;i=t}if(void 0!==i)return i}},Xy}
|
|
92
|
+
/*!
|
|
93
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
94
|
+
*
|
|
95
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
96
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
97
|
+
* in the Software without restriction, including without limitation the rights
|
|
98
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
99
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
100
|
+
* furnished to do so, subject to the following conditions:
|
|
101
|
+
*
|
|
102
|
+
* The above copyright notice and this permission notice shall be included in
|
|
103
|
+
* all copies or substantial portions of the Software.
|
|
104
|
+
*
|
|
105
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
106
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
107
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
108
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
109
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
110
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
111
|
+
* SOFTWARE.
|
|
112
|
+
*/function iS(){if(Jy)return Qy;Jy=1;let t=oS();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 s(t,e,o,i=!1){let r=Object.keys(t).map(i=>{if(!e[i])return console.error(`${o} Invalid key: ${i}`),!1;let r=t[i],a=e[i];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!s(r,n,`[Validate ${i}]`,!0))return!1}else if(typeof r!==a.type)return console.error(`${o} ${i} type mismatched: "${a.type}" expected, "${typeof r}" provided`),!1;if(a.restrictions&&a.restrictions.length){let e=a.restrictions.length;for(let n=0;n<e;n++){let{restriction:e,message:s}=a.restrictions[n];if(!e(r,t))return console.error(`${o} ${i} invalid value: ${s}`),!1}}if(a.restriction&&!a.restriction(r,t))return console.error(`${o} ${i} invalid value: ${a.message}`),!1;if(a.validValues&&-1===a.validValues.indexOf(r))return console.error(`${o} ${i} invalid value: must be among ${JSON.stringify(a.validValues)}, "${r}" provided`),!1;if(a.children){if(!s(r,a.children,`[Validate ${i}]`))return!1}return!0});return i||r.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})),r.reduce((t,e)=>t&&e,!0)}function r(t){return s(t,n,"[Validate format]")}return Qy={validate:function(t,e){let n=i(t),o=r(e);return n&&o},validateFormat:r,validateInput:i,validateLanguage:function(t){return s(t,o,"[Validate language]")}},Qy}
|
|
113
|
+
/*!
|
|
114
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
115
|
+
*
|
|
116
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
117
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
118
|
+
* in the Software without restriction, including without limitation the rights
|
|
119
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
120
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
121
|
+
* furnished to do so, subject to the following conditions:
|
|
122
|
+
*
|
|
123
|
+
* The above copyright notice and this permission notice shall be included in
|
|
124
|
+
* all copies or substantial portions of the Software.
|
|
125
|
+
*
|
|
126
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
127
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
128
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
129
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
130
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
131
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
132
|
+
* SOFTWARE.
|
|
133
|
+
*/var sS,rS,aS={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)}};
|
|
134
|
+
/*!
|
|
135
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
136
|
+
*
|
|
137
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
138
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
139
|
+
* in the Software without restriction, including without limitation the rights
|
|
140
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
141
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
142
|
+
* furnished to do so, subject to the following conditions:
|
|
143
|
+
*
|
|
144
|
+
* The above copyright notice and this permission notice shall be included in
|
|
145
|
+
* all copies or substantial portions of the Software.
|
|
146
|
+
*
|
|
147
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
148
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
149
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
150
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
151
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
152
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
153
|
+
* SOFTWARE.
|
|
154
|
+
*/function lS(){if(rS)return sS;rS=1;const t=nS(),e=iS(),n=aS;let o,i={},s={},r=null,a={};function l(t){o=t}function h(){return s[o]}return i.languages=()=>Object.assign({},s),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=()=>r,i.setZeroFormat=t=>r="string"==typeof t?t:null,i.hasZeroFormat=()=>null!==r,i.languageData=t=>{if(t){if(s[t])return s[t];throw new Error(`Unknown tag "${t}"`)}return h()},i.registerLanguage=(t,n=!1)=>{if(!e.validateLanguage(t))throw new Error("Invalid language data");s[t.languageTag]=t,n&&l(t.languageTag)},i.setLanguage=(e,n=t.languageTag)=>{if(!s[e]){let t=e.split("-")[0],o=Object.keys(s).find(e=>e.split("-")[0]===t);return s[o]?void l(o):void l(n)}l(e)},i.registerLanguage(t),o=t.languageTag,sS=i}
|
|
155
|
+
/*!
|
|
156
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
157
|
+
*
|
|
158
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
159
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
160
|
+
* in the Software without restriction, including without limitation the rights
|
|
161
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
162
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
163
|
+
* furnished to do so, subject to the following conditions:
|
|
164
|
+
*
|
|
165
|
+
* The above copyright notice and this permission notice shall be included in
|
|
166
|
+
* all copies or substantial portions of the Software.
|
|
167
|
+
*
|
|
168
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
169
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
170
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
171
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
172
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
173
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
174
|
+
* SOFTWARE.
|
|
175
|
+
*/
|
|
176
|
+
function hS(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 cS={exports:{}};!function(t){!function(e){var n,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,r="[BigNumber Error] ",a=r+"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 p(t){var e=0|t;return t>0||t===e?e:e-1}function f(t){for(var e,n,o=1,i=t.length,s=t[0]+"";o<i;){for(e=t[o++]+"",n=h-e.length;n--;e="0"+e);s+=e}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function m(t,e){var n,o,i=t.c,s=e.c,r=t.s,a=e.s,l=t.e,h=e.e;if(!r||!a)return null;if(n=i&&!i[0],o=s&&!s[0],n||o)return n?o?0:-a:r;if(r!=a)return r;if(n=r<0,o=l==h,!i||!s)return o?0:!i^n?1:-1;if(!o)return l>h^n?1:-1;for(a=(l=i.length)<(h=s.length)?l:h,r=0;r<a;r++)if(i[r]!=s[r])return i[r]>s[r]^n?1:-1;return l==h?0:l>h^n?1:-1}function w(t,e,n,o){if(t<e||t>n||t!==s(t))throw Error(r+(o||"Argument")+("number"==typeof t?t<e||t>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function b(t){var e=t.c.length-1;return p(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 C(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,y,S,k,R,x,E,M,T,_,H=U.prototype={constructor:U,toString:null,valueOf:null},I=new U(1),A=20,O=4,D=-7,N=21,P=-1e7,W=1e7,L=!1,B=1,V=0,F={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},z="0123456789abcdefghijklmnopqrstuvwxyz",$=!0;function U(t,e){var n,i,r,l,d,u,g,p,f=this;if(!(f instanceof U))return new U(t,e);if(null==e){if(t&&!0===t._isBigNumber)return f.s=t.s,void(!t.c||t.e>W?f.c=f.e=null:t.e<P?f.c=[f.e=0]:(f.e=t.e,f.c=t.c.slice()));if((u="number"==typeof t)&&0*t==0){if(f.s=1/t<0?(t=-t,-1):1,t===~~t){for(l=0,d=t;d>=10;d/=10,l++);return void(l>W?f.c=f.e=null:(f.e=l,f.c=[t]))}p=String(t)}else{if(!o.test(p=String(t)))return S(f,p,u);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(l=p.indexOf("."))>-1&&(p=p.replace(".","")),(d=p.search(/e/i))>0?(l<0&&(l=d),l+=+p.slice(d+1),p=p.substring(0,d)):l<0&&(l=p.length)}else{if(w(e,2,z.length,"Base"),10==e&&$)return q(f=new U(t),A+f.e+1,O);if(p=String(t),u="number"==typeof t){if(0*t!=0)return S(f,p,u,e);if(f.s=1/t<0?(p=p.slice(1),-1):1,U.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(a+t)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(n=z.slice(0,e),l=d=0,g=p.length;d<g;d++)if(n.indexOf(i=p.charAt(d))<0){if("."==i){if(d>l){l=g;continue}}else if(!r&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){r=!0,d=-1,l=0;continue}return S(f,String(t),u,e)}u=!1,(l=(p=y(p,e,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):l=p.length}for(d=0;48===p.charCodeAt(d);d++);for(g=p.length;48===p.charCodeAt(--g););if(p=p.slice(d,++g)){if(g-=d,u&&U.DEBUG&&g>15&&(t>c||t!==s(t)))throw Error(a+f.s*t);if((l=l-d-1)>W)f.c=f.e=null;else if(l<P)f.c=[f.e=0];else{if(f.e=l,f.c=[],d=(l+1)%h,l<0&&(d+=h),d<g){for(d&&f.c.push(+p.slice(0,d)),g-=h;d<g;)f.c.push(+p.slice(d,d+=h));d=h-(p=p.slice(d)).length}else d-=g;for(;d--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function j(t,e,n,o){var i,s,r,a,l;if(null==n?n=O:w(n,0,8),!t.c)return t.toString();if(i=t.c[0],r=t.e,null==e)l=f(t.c),l=1==o||2==o&&(r<=D||r>=N)?v(l,r):C(l,r,"0");else if(s=(t=q(new U(t),e,n)).e,a=(l=f(t.c)).length,1==o||2==o&&(e<=s||s<=D)){for(;a<e;l+="0",a++);l=v(l,s)}else if(e-=r,l=C(l,s,"0"),s+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=s-a)>0)for(s+1==a&&(l+=".");e--;l+="0");return t.s<0&&i?"-"+l:l}function Y(t,e){for(var n,o,i=1,s=new U(t[0]);i<t.length;i++)(!(o=new U(t[i])).s||(n=m(s,o))===e||0===n&&s.s===e)&&(s=o);return s}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)>W?t.c=t.e=null:n<P?t.c=[t.e=0]:(t.e=n,t.c=e),t}function q(t,e,n,o){var r,a,c,u,g,p,f,m=t.c,w=d;if(m){t:{for(r=1,u=m[0];u>=10;u/=10,r++);if((a=e-r)<0)a+=h,c=e,g=m[p=0],f=s(g/w[r-c-1]%10);else if((p=i((a+1)/h))>=m.length){if(!o)break t;for(;m.length<=p;m.push(0));g=f=0,r=1,c=(a%=h)-h+1}else{for(g=u=m[p],r=1;u>=10;u/=10,r++);f=(c=(a%=h)-h+r)<0?0:s(g/w[r-c-1]%10)}if(o=o||e<0||null!=m[p+1]||(c<0?g:g%w[r-c-1]),o=n<4?(f||o)&&(0==n||n==(t.s<0?3:2)):f>5||5==f&&(4==n||o||6==n&&(a>0?c>0?g/w[r-c]:0:m[p-1])%10&1||n==(t.s<0?8:7)),e<1||!m[0])return m.length=0,o?(e-=t.e+1,m[0]=w[(h-e%h)%h],t.e=-e||0):m[0]=t.e=0,t;if(0==a?(m.length=p,u=1,p--):(m.length=p+1,u=w[h-a],m[p]=c>0?s(g/w[r-c]%w[c])*u:0),o)for(;;){if(0==p){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[p]+=u,m[p]!=l)break;m[p--]=0,u=1}for(a=m.length;0===m[--a];m.pop());}t.e>W?t.c=t.e=null:t.e<P&&(t.c=[t.e=0])}return t}function K(t){var e,n=t.e;return null===n?t.toString():(e=f(t.c),e=n<=D||n>=N?v(e,n):C(e,n,"0"),t.s<0?"-"+e:e)}return U.clone=t,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.EUCLID=9,U.config=U.set=function(t){var e,n;if(null!=t){if("object"!=typeof t)throw Error(r+"Object expected: "+t);if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(w(n=t[e],0,g,e),A=n),t.hasOwnProperty(e="ROUNDING_MODE")&&(w(n=t[e],0,8,e),O=n),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((n=t[e])&&n.pop?(w(n[0],-g,0,e),w(n[1],0,g,e),D=n[0],N=n[1]):(w(n,-g,g,e),D=-(N=n<0?-n:n))),t.hasOwnProperty(e="RANGE"))if((n=t[e])&&n.pop)w(n[0],-g,-1,e),w(n[1],1,g,e),P=n[0],W=n[1];else{if(w(n,-g,g,e),!n)throw Error(r+e+" cannot be zero: "+n);P=-(W=n<0?-n:n)}if(t.hasOwnProperty(e="CRYPTO")){if((n=t[e])!==!!n)throw Error(r+e+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw L=!n,Error(r+"crypto unavailable");L=n}else L=n}if(t.hasOwnProperty(e="MODULO_MODE")&&(w(n=t[e],0,9,e),B=n),t.hasOwnProperty(e="POW_PRECISION")&&(w(n=t[e],0,g,e),V=n),t.hasOwnProperty(e="FORMAT")){if("object"!=typeof(n=t[e]))throw Error(r+e+" not an object: "+n);F=n}if(t.hasOwnProperty(e="ALPHABET")){if("string"!=typeof(n=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(r+e+" invalid: "+n);$="0123456789"==n.slice(0,10),z=n}}return{DECIMAL_PLACES:A,ROUNDING_MODE:O,EXPONENTIAL_AT:[D,N],RANGE:[P,W],CRYPTO:L,MODULO_MODE:B,POW_PRECISION:V,FORMAT:F,ALPHABET:z}},U.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!U.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===s(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!==s(n))break t;if(0!==n)return!0}}}else if(null===o&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(r+"Invalid BigNumber: "+t)},U.maximum=U.max=function(){return Y(arguments,-1)},U.minimum=U.min=function(){return Y(arguments,1)},U.random=(k=9007199254740992,R=Math.random()*k&2097151?function(){return s(Math.random()*k)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(t){var e,n,o,a,l,c=0,u=[],p=new U(I);if(null==t?t=A:w(t,0,g),a=i(t/h),L)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 L=!1,Error(r+"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(!L)for(;c<a;)(l=R())<9e15&&(u[c++]=l%1e14);for(a=u[--c],t%=h,a&&t&&(l=d[h-t],u[c]=s(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 p.e=o,p.c=u,p}),U.sum=function(){for(var t=1,e=arguments,n=new U(e[0]);t<e.length;)n=n.plus(e[t++]);return n},y=function(){var t="0123456789";function e(t,e,n,o){for(var i,s,r=[0],a=0,l=t.length;a<l;){for(s=r.length;s--;r[s]*=e);for(r[0]+=o.indexOf(t.charAt(a++)),i=0;i<r.length;i++)r[i]>n-1&&(null==r[i+1]&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}return function(o,i,s,r,a){var l,h,c,d,u,g,p,m,w=o.indexOf("."),b=A,v=O;for(w>=0&&(d=V,V=0,o=o.replace(".",""),g=(m=new U(i)).pow(o.length-w),V=d,m.c=e(C(f(g.c),g.e,"0"),10,s,t),m.e=m.c.length),c=d=(p=e(o,i,s,a?(l=z,t):(l=t,z))).length;0==p[--d];p.pop());if(!p[0])return l.charAt(0);if(w<0?--c:(g.c=p,g.e=c,g.s=r,p=(g=n(g,m,b,v,s)).c,u=g.r,c=g.e),w=p[h=c+b+1],d=s/2,u=u||h<0||null!=p[h+1],u=v<4?(null!=w||u)&&(0==v||v==(g.s<0?3:2)):w>d||w==d&&(4==v||u||6==v&&1&p[h-1]||v==(g.s<0?8:7)),h<1||!p[0])o=u?C(l.charAt(1),-b,l.charAt(0)):l.charAt(0);else{if(p.length=h,u)for(--s;++p[--h]>s;)p[h]=0,h||(++c,p=[1].concat(p));for(d=p.length;!p[--d];);for(w=0,o="";w<=d;o+=l.charAt(p[w++]));o=C(o,c,l.charAt(0))}return o}}(),n=function(){function t(t,e,n){var o,i,s,r,a=0,l=t.length,h=e%u,c=e/u|0;for(t=t.slice();l--;)a=((i=h*(s=t[l]%u)+(o=c*s+(r=t[l]/u|0)*h)%u*u+a)/n|0)+(o/u|0)+c*r,t[l]=i%n;return a&&(t=[a].concat(t)),t}function e(t,e,n,o){var i,s;if(n!=o)s=n>o?1:-1;else for(i=s=0;i<n;i++)if(t[i]!=e[i]){s=t[i]>e[i]?1:-1;break}return s}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,r,a,c){var d,u,g,f,m,w,b,v,C,y,S,k,R,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 U(o.s&&i.s&&(H?!I||H[0]!=I[0]:I)?H&&0==H[0]||!I?0*_:_/0:NaN);for(C=(v=new U(_)).c=[],_=r+(u=o.e-i.e)+1,c||(c=l,u=p(o.e/h)-p(i.e/h),_=_/h|0),g=0;I[g]==(H[g]||0);g++);if(I[g]>(H[g]||0)&&u--,_<0)C.push(1),f=!0;else{for(x=H.length,M=I.length,g=0,_+=2,(m=s(c/(I[0]+1)))>1&&(I=t(I,m,c),H=t(H,m,c),M=I.length,x=H.length),R=M,S=(y=H.slice(0,M)).length;S<M;y[S++]=0);T=I.slice(),T=[0].concat(T),E=I[0],I[1]>=c/2&&E++;do{if(m=0,(d=e(I,y,M,S))<0){if(k=y[0],M!=S&&(k=k*c+(y[1]||0)),(m=s(k/E))>1)for(m>=c&&(m=c-1),b=(w=t(I,m,c)).length,S=y.length;1==e(w,y,b,S);)m--,n(w,M<b?T:I,b,c),b=w.length,d=1;else 0==m&&(d=m=1),b=(w=I.slice()).length;if(b<S&&(w=[0].concat(w)),n(y,w,S,c),S=y.length,-1==d)for(;e(I,y,M,S)<1;)m++,n(y,M<S?T:I,S,c),S=y.length}else 0===d&&(m++,y=[0]);C[g++]=m,y[0]?y[S++]=H[R]||0:(y=[H[R]],S=1)}while((R++<x||null!=y[0])&&_--);f=null!=y[0],C[0]||C.splice(0,1)}if(c==l){for(g=1,_=C[0];_>=10;_/=10,g++);q(v,r+(v.e=g+u*h-1)+1,a,f)}else v.e=u,v.r=+f;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,s=n?e:e.replace(_,"");if(T.test(s))t.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.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,s=s.replace(E,"$1").replace(M,"0.$1")),e!=s))return new U(s,i);if(U.DEBUG)throw Error(r+"Not a"+(o?" base "+o:"")+" number: "+e);t.s=null}t.c=t.e=null},H.absoluteValue=H.abs=function(){var t=new U(this);return t.s<0&&(t.s=1),t},H.comparedTo=function(t,e){return m(this,new U(t,e))},H.decimalPlaces=H.dp=function(t,e){var n,o,i,s=this;if(null!=t)return w(t,0,g),null==e?e=O:w(e,0,8),q(new U(s),t+s.e+1,e);if(!(n=s.c))return null;if(o=((i=n.length-1)-p(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 U(t,e),A,O)},H.dividedToIntegerBy=H.idiv=function(t,e){return n(this,new U(t,e),0,1)},H.exponentiatedBy=H.pow=function(t,e){var n,o,a,l,c,d,u,g,p=this;if((t=new U(t)).c&&!t.isInteger())throw Error(r+"Exponent not an integer: "+K(t));if(null!=e&&(e=new U(e)),c=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return g=new U(Math.pow(+K(p),c?t.s*(2-b(t)):+K(t))),e?g.mod(e):g;if(d=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new U(NaN);(o=!d&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||c&&p.c[1]>=24e7:p.c[0]<8e13||c&&p.c[0]<=9999975e7)))return l=p.s<0&&b(t)?-0:0,p.e>-1&&(l=1/l),new U(d?1/l:l);V&&(l=i(V/h+2))}for(c?(n=new U(.5),d&&(t.s=1),u=b(t)):u=(a=Math.abs(+K(t)))%2,g=new U(I);;){if(u){if(!(g=g.times(p)).c)break;l?g.c.length>l&&(g.c.length=l):o&&(g=g.mod(e))}if(a){if(0===(a=s(a/2)))break;u=a%2}else if(q(t=t.times(n),t.e+1,1),t.e>14)u=b(t);else{if(0===(a=+K(t)))break;u=a%2}p=p.times(p),l?p.c&&p.c.length>l&&(p.c.length=l):o&&(p=p.mod(e))}return o?g:(d&&(g=I.div(g)),e?g.mod(e):l?q(g,V,O,void 0):g)},H.integerValue=function(t){var e=new U(this);return null==t?t=O:w(t,0,8),q(e,e.e+1,t)},H.isEqualTo=H.eq=function(t,e){return 0===m(this,new U(t,e))},H.isFinite=function(){return!!this.c},H.isGreaterThan=H.gt=function(t,e){return m(this,new U(t,e))>0},H.isGreaterThanOrEqualTo=H.gte=function(t,e){return 1===(e=m(this,new U(t,e)))||0===e},H.isInteger=function(){return!!this.c&&p(this.e/h)>this.c.length-2},H.isLessThan=H.lt=function(t,e){return m(this,new U(t,e))<0},H.isLessThanOrEqualTo=H.lte=function(t,e){return-1===(e=m(this,new U(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,s,r=this,a=r.s;if(e=(t=new U(t,e)).s,!a||!e)return new U(NaN);if(a!=e)return t.s=-e,r.plus(t);var c=r.e/h,d=t.e/h,u=r.c,g=t.c;if(!c||!d){if(!u||!g)return u?(t.s=-e,t):new U(g?r:NaN);if(!u[0]||!g[0])return g[0]?(t.s=-e,t):new U(u[0]?r:3==O?-0:0)}if(c=p(c),d=p(d),u=u.slice(),a=c-d){for((s=a<0)?(a=-a,i=u):(d=c,i=g),i.reverse(),e=a;e--;i.push(0));i.reverse()}else for(o=(s=(a=u.length)<(e=g.length))?a:e,a=e=0;e<o;e++)if(u[e]!=g[e]){s=u[e]<g[e];break}if(s&&(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==O?-1:1,t.c=[t.e=0],t)},H.modulo=H.mod=function(t,e){var o,i,s=this;return t=new U(t,e),!s.c||!t.s||t.c&&!t.c[0]?new U(NaN):!t.c||s.c&&!s.c[0]?new U(s):(9==B?(i=t.s,t.s=1,o=n(s,t,0,3),t.s=i,o.s*=i):o=n(s,t,0,B),(t=s.minus(o.times(t))).c[0]||1!=B||(t.s=s.s),t)},H.multipliedBy=H.times=function(t,e){var n,o,i,s,r,a,c,d,g,f,m,w,b,v,C,y=this,S=y.c,k=(t=new U(t,e)).c;if(!(S&&k&&S[0]&&k[0]))return!y.s||!t.s||S&&!S[0]&&!k||k&&!k[0]&&!S?t.c=t.e=t.s=null:(t.s*=y.s,S&&k?(t.c=[0],t.e=0):t.c=t.e=null),t;for(o=p(y.e/h)+p(t.e/h),t.s*=y.s,(c=S.length)<(f=k.length)&&(b=S,S=k,k=b,i=c,c=f,f=i),i=c+f,b=[];i--;b.push(0));for(v=l,C=u,i=f;--i>=0;){for(n=0,m=k[i]%C,w=k[i]/C|0,s=i+(r=c);s>i;)n=((d=m*(d=S[--r]%C)+(a=w*d+(g=S[r]/C|0)*m)%C*C+b[s]+n)/v|0)+(a/C|0)+w*g,b[s--]=d%v;b[s]=n}return n?++o:b.splice(0,1),G(t,b,o)},H.negated=function(){var t=new U(this);return t.s=-t.s||null,t},H.plus=function(t,e){var n,o=this,i=o.s;if(e=(t=new U(t,e)).s,!i||!e)return new U(NaN);if(i!=e)return t.s=-e,o.minus(t);var s=o.e/h,r=t.e/h,a=o.c,c=t.c;if(!s||!r){if(!a||!c)return new U(i/0);if(!a[0]||!c[0])return c[0]?t:new U(a[0]?o:0*i)}if(s=p(s),r=p(r),a=a.slice(),i=s-r){for(i>0?(r=s,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),++r),G(t,a,r)},H.precision=H.sd=function(t,e){var n,o,i,s=this;if(null!=t&&t!==!!t)return w(t,1,g),null==e?e=O:w(e,0,8),q(new U(s),t,e);if(!(n=s.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&&s.e+1>o&&(o=s.e+1),o},H.shiftedBy=function(t){return w(t,-9007199254740991,c),this.times("1e"+t)},H.squareRoot=H.sqrt=function(){var t,e,o,i,s,r=this,a=r.c,l=r.s,h=r.e,c=A+4,d=new U("0.5");if(1!==l||!a||!a[0])return new U(!l||l<0&&(!a||a[0])?NaN:a?r:1/0);if(0==(l=Math.sqrt(+K(r)))||l==1/0?(((e=f(a)).length+h)%2==0&&(e+="0"),l=Math.sqrt(+e),h=p((h+1)/2)-(h<0||h%2),o=new U(e=l==1/0?"5e"+h:(e=l.toExponential()).slice(0,e.indexOf("e")+1)+h)):o=new U(l+""),o.c[0])for((l=(h=o.e)+c)<3&&(l=0);;)if(s=o,o=d.times(s.plus(n(r,s,c,1))),f(s.c).slice(0,l)===(e=f(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))||(q(o,o.e+A+2,1),t=!o.times(o).eq(r));break}if(!i&&(q(s,s.e+A+2,0),s.times(s).eq(r))){o=s;break}c+=4,l+=4,i=1}return q(o,o.e+A+1,O,t)},H.toExponential=function(t,e){return null!=t&&(w(t,0,g),t++),j(this,t,e,1)},H.toFixed=function(t,e){return null!=t&&(w(t,0,g),t=t+this.e+1),j(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=F;else if("object"!=typeof n)throw Error(r+"Argument not an object: "+n);if(o=i.toFixed(t,e),i.c){var s,a=o.split("."),l=+n.groupSize,h=+n.secondaryGroupSize,c=n.groupSeparator||"",d=a[0],u=a[1],g=i.s<0,p=g?d.slice(1):d,f=p.length;if(h&&(s=l,l=h,h=s,f-=s),l>0&&f>0){for(s=f%l||l,d=p.substr(0,s);s<f;s+=l)d+=c+p.substr(s,l);h>0&&(d+=c+p.slice(s)),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,s,a,l,c,u,g,p,m,w,b=this,v=b.c;if(null!=t&&(!(c=new U(t)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(r+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!v)return new U(b);for(e=new U(I),g=o=new U(I),i=u=new U(I),w=f(v),a=e.e=w.length-b.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=W,W=1/0,c=new U(w),u.c[0]=0;p=n(c,e,0,1),1!=(s=o.plus(p.times(i))).comparedTo(t);)o=i,i=s,g=u.plus(p.times(s=g)),u=s,e=c.minus(p.times(s=e)),c=s;return s=n(t.minus(o),i,0,1),u=u.plus(s.times(g)),o=o.plus(s.times(i)),u.s=g.s=b.s,m=n(g,i,a*=2,O).minus(b).abs().comparedTo(n(u,o,a,O).minus(b).abs())<1?[g,i]:[u,o],W=l,m},H.toNumber=function(){return+K(this)},H.toPrecision=function(t,e){return null!=t&&w(t,1,g),j(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<=D||i>=N?v(f(n.c),i):C(f(n.c),i,"0"):10===t&&$?e=C(f((n=q(new U(n),A+i+1,O)).c),n.e,"0"):(w(t,2,z.length,"Base"),e=y(C(f(n.c),i,"0"),10,t,o,!0)),o<0&&n.c[0]&&(e="-"+e)),e},H.valueOf=H.toJSON=function(){return K(this)},H._isBigNumber=!0,null!=e&&U.set(e),U}(),n.default=n.BigNumber=n,t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(tS)}(cS);var dS=cS.exports;
|
|
177
|
+
/*!
|
|
178
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
179
|
+
*
|
|
180
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
181
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
182
|
+
* in the Software without restriction, including without limitation the rights
|
|
183
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
184
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
185
|
+
* furnished to do so, subject to the following conditions:
|
|
186
|
+
*
|
|
187
|
+
* The above copyright notice and this permission notice shall be included in
|
|
188
|
+
* all copies or substantial portions of the Software.
|
|
189
|
+
*
|
|
190
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
191
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
192
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
193
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
194
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
195
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
196
|
+
* SOFTWARE.
|
|
197
|
+
*/const uS=lS(),gS=iS(),pS=aS,fS=dS,mS={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},wS={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:bS,decimalSuffixes:vS}=uS.currentBytes(),CS={general:{scale:1024,suffixes:vS},binary:{scale:1024,suffixes:bS},decimal:{scale:1e3,suffixes:vS}};function yS(t,e={},n){if("string"==typeof e&&(e=pS.parseFormat(e)),!gS.validateFormat(e))return"ERROR: invalid format";let o=e.prefix||"",i=e.postfix||"",s=function(t,e,n){switch(e.output){case"currency":return function(t,e,n){const o=n.currentCurrency();let i,s=Object.assign({},e),r=Object.assign({},wS,s),a="",l=!!r.totalLength||!!r.forceAverage||r.average,h=s.currencyPosition||o.position,c=s.currencySymbol||o.symbol;const d=void 0!==r.spaceSeparatedCurrency?r.spaceSeparatedCurrency:r.spaceSeparated;void 0===s.lowPrecision&&(s.lowPrecision=!1);d&&(a=" ");"infix"===h&&(i=a+c+a);let u=xS({instance:t,providedFormat:s,state:n,decimalSeparator:i});"prefix"===h&&(u=t._value<0&&"sign"===r.negative?`-${a}${c}${u.slice(1)}`:t._value>0&&r.forceSign?`+${a}${c}${u.slice(1)}`:c+a+u);h&&"postfix"!==h||(a=!r.spaceSeparatedAbbreviation&&l?"":a,u=u+a+c);return u}(t,e=ES(e,uS.currentCurrencyDefaultFormat()),uS);case"percent":return function(t,e,n,o){let i=e.prefixSymbol,s=xS({instance:o(100*t._value),providedFormat:e,state:n}),r=Object.assign({},wS,e);if(i)return`%${r.spaceSeparated?" ":""}${s}`;return`${s}${r.spaceSeparated?" ":""}%`}(t,e=ES(e,uS.currentPercentageDefaultFormat()),uS,n);case"byte":return function(t,e,n,o){let i=e.base||"binary",s=Object.assign({},wS,e);const{binarySuffixes:r,decimalSuffixes:a}=n.currentBytes();let l={general:{scale:1024,suffixes:a||vS,marker:"bd"},binary:{scale:1024,suffixes:r||bS,marker:"b"},decimal:{scale:1e3,suffixes:a||vS,marker:"d"}}[i],{value:h,suffix:c}=SS(t._value,l.suffixes,l.scale),d=xS({instance:o(h),providedFormat:e,state:n,defaults:n.currentByteDefaultFormat()});return`${d}${s.spaceSeparated?" ":""}${c}`}(t,e=ES(e,uS.currentByteDefaultFormat()),uS,n);case"time":return e=ES(e,uS.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({},wS,e),s=xS({instance:t,providedFormat:e,state:n}),r=o(t._value);return`${s}${i.spaceSeparated?" ":""}${r}`}(t,e=ES(e,uS.currentOrdinalDefaultFormat()),uS);default:return xS({instance:t,providedFormat:e})}}(t,e,n);return s=function(t,e){return e+t}(s,o),s=function(t,e){return t+e}(s,i),s}function SS(t,e,n){let o=e[0],i=Math.abs(t);if(i>=n){for(let s=1;s<e.length;++s){let r=Math.pow(n,s),a=Math.pow(n,s+1);if(i>=r&&i<a){o=e[s],t/=r;break}}o===e[0]&&(t/=Math.pow(n,e.length-1),o=e[e.length-1])}return{value:t,suffix:o}}function kS(t){let e="";for(let n=0;n<t;n++)e+="0";return e}function RS(t,e,n=Math.round){if(-1!==t.toString().indexOf("e"))return function(t,e){let n=t.toString(),[o,i]=n.split("e"),[s,r=""]=o.split(".");if(+i>0)n=s+r+kS(i-r.length);else{let t=".";t=+s<0?`-0${t}`:`0${t}`;let o=(kS(-i-1)+Math.abs(s)+r).substr(0,e);o.length<e&&(o+=kS(e-o.length)),n=t+o}return+i>0&&e>0&&(n+=`.${kS(e)}`),n}(t,e);return new fS(n(+`${t}e+${e}`)/Math.pow(10,e)).toFixed(e)}function xS({instance:t,providedFormat:e,state:n=uS,decimalSeparator:o,defaults:i=n.currentDefaults()}){let s=t._value;if(0===s&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(s))return s.toString();let r=Object.assign({},wS,i,e),a=r.totalLength,l=a?0:r.characteristic,h=r.optionalCharacteristic,c=r.forceAverage,d=r.lowPrecision,u=!!a||!!c||r.average,g=a?-1:u&&void 0===e.mantissa?0:r.mantissa,p=!a&&(void 0===e.optionalMantissa?-1===g:r.optionalMantissa),f=r.trimMantissa,m=r.thousandSeparated,w=r.spaceSeparated,b=r.negative,v=r.forceSign,C=r.exponential,y=r.roundingFunction,S="";if(u){let t=function({value:t,forceAverage:e,lowPrecision:n=!0,abbreviations:o,spaceSeparated:i=!1,totalLength:s=0,roundingFunction:r=Math.round}){let a="",l=Math.abs(t),h=-1;if(e&&o[e]&&mS[e]?(a=o[e],t/=mS[e]):l>=mS.trillion||n&&1===r(l/mS.trillion)?(a=o.trillion,t/=mS.trillion):l<mS.trillion&&l>=mS.billion||n&&1===r(l/mS.billion)?(a=o.billion,t/=mS.billion):l<mS.billion&&l>=mS.million||n&&1===r(l/mS.million)?(a=o.million,t/=mS.million):(l<mS.million&&l>=mS.thousand||n&&1===r(l/mS.thousand))&&(a=o.thousand,t/=mS.thousand),a&&(a=(i?" ":"")+a),s){let e=t<0,n=t.toString().split(".")[0],o=e?n.length-1:n.length;h=Math.max(s-o,0)}return{value:t,abbreviation:a,mantissaPrecision:h}}({value:s,forceAverage:c,lowPrecision:d,abbreviations:n.currentAbbreviations(),spaceSeparated:w,roundingFunction:y,totalLength:a});s=t.value,S+=t.abbreviation,a&&(g=t.mantissaPrecision)}if(C){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:s,characteristicPrecision:l});s=t.value,S=t.abbreviation+S}let k=function(t,e,n,o,i,s){if(-1===o)return t;let r=RS(e,o,s),[a,l=""]=r.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)}`:r.toString()}(s.toString(),s,p,g,f,y);return k=function(t,e,n,o){let i=t,[s,r]=i.toString().split(".");if(s.match(/^-?0$/)&&n)return r?`${s.replace("0","")}.${r}`:s.replace("0","");const a=e<0&&0===s.indexOf("-");if(a&&(s=s.slice(1),i=i.slice(1)),s.length<o){let t=o-s.length;for(let e=0;e<t;e++)i=`0${i}`}return a&&(i=`-${i}`),i.toString()}(k,s,h,l),k=function(t,e,n,o,i){let s=o.currentDelimiters(),r=s.thousands;i=i||s.decimal;let a=s.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)+r+h.slice(t+e)}),d&&(h=`-${h}`)}return l=c?h+i+c:h,l}(k,s,m,n,o),(u||C)&&(k=function(t,e){return t+e}(k,S)),(v||s<0)&&(k=function(t,e,n){return 0===e?t:0===+t?t.replace("-",""):e>0?`+${t}`:"sign"===n?t:`(${t.replace("-","")})`}(k,s,b)),k}function ES(t,e){if(!t)return e;let n=Object.keys(t);return 1===n.length&&"output"===n[0]?e:t}
|
|
198
|
+
/*!
|
|
199
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
200
|
+
*
|
|
201
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
202
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
203
|
+
* in the Software without restriction, including without limitation the rights
|
|
204
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
205
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
206
|
+
* furnished to do so, subject to the following conditions:
|
|
207
|
+
*
|
|
208
|
+
* The above copyright notice and this permission notice shall be included in
|
|
209
|
+
* all copies or substantial portions of the Software.
|
|
210
|
+
*
|
|
211
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
212
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
213
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
214
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
215
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
216
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
217
|
+
* SOFTWARE.
|
|
218
|
+
*/
|
|
219
|
+
const MS=dS;function TS(t,e,n){let o=new MS(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new MS(i),t._value=o.minus(i).toNumber(),t}
|
|
220
|
+
/*!
|
|
221
|
+
* Copyright (c) 2017 Benjamin Van Ryseghem<benjamin@vanryseghem.com>
|
|
222
|
+
*
|
|
223
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
224
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
225
|
+
* in the Software without restriction, including without limitation the rights
|
|
226
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
227
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
228
|
+
* furnished to do so, subject to the following conditions:
|
|
229
|
+
*
|
|
230
|
+
* The above copyright notice and this permission notice shall be included in
|
|
231
|
+
* all copies or substantial portions of the Software.
|
|
232
|
+
*
|
|
233
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
234
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
235
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
236
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
237
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
238
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
239
|
+
* SOFTWARE.
|
|
240
|
+
*/
|
|
241
|
+
const _S=lS(),HS=iS(),IS=(t=>({loadLanguagesInNode:e=>hS(e,t)}))(LS),AS=oS();let OS=(t=>({format:(...e)=>yS(...e,t),getByteUnit:(...e)=>function(t){let e=CS.general;return SS(t._value,e.suffixes,e.scale).suffix}(...e,t),getBinaryByteUnit:(...e)=>function(t){let e=CS.binary;return SS(t._value,e.suffixes,e.scale).suffix}(...e,t),getDecimalByteUnit:(...e)=>function(t){let e=CS.decimal;return SS(t._value,e.suffixes,e.scale).suffix}(...e,t),formatOrDefault:ES}))(LS),DS=(t=>({add:(e,n)=>function(t,e,n){let o=new MS(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new MS(i),t._value=o.plus(i).toNumber(),t}(e,n,t),subtract:(e,n)=>TS(e,n,t),multiply:(e,n)=>function(t,e,n){let o=new MS(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new MS(i),t._value=o.times(i).toNumber(),t}(e,n,t),divide:(e,n)=>function(t,e,n){let o=new MS(t._value),i=e;return n.isNumbro(e)&&(i=e._value),i=new MS(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 TS(o,e,n),Math.abs(o._value)}(e,n,t),BigNumber:MS}))(LS);const NS=aS;class PS{constructor(t){this._value=t}clone(){return LS(this._value)}format(t={}){return OS.format(this,t)}formatCurrency(t){return"string"==typeof t&&(t=NS.parseFormat(t)),(t=OS.formatOrDefault(t,_S.currentCurrencyDefaultFormat())).output="currency",OS.format(this,t)}formatTime(t={}){return t.output="time",OS.format(this,t)}binaryByteUnits(){return OS.getBinaryByteUnit(this)}decimalByteUnits(){return OS.getDecimalByteUnit(this)}byteUnits(){return OS.getByteUnit(this)}difference(t){return DS.difference(this,t)}add(t){return DS.add(this,t)}subtract(t){return DS.subtract(this,t)}multiply(t){return DS.multiply(this,t)}divide(t){return DS.divide(this,t)}set(t){return DS.set(this,WS(t))}value(){return this._value}valueOf(){return this._value}}function WS(t){let e=t;return LS.isNumbro(t)?e=t._value:"string"==typeof t?e=LS.unformat(t):isNaN(t)&&(e=NaN),e}function LS(t){return new PS(WS(t))}LS.version="2.5.0",LS.isNumbro=function(t){return t instanceof PS},LS.language=_S.currentLanguage,LS.registerLanguage=_S.registerLanguage,LS.setLanguage=_S.setLanguage,LS.languages=_S.languages,LS.languageData=_S.languageData,LS.zeroFormat=_S.setZeroFormat,LS.defaultFormat=_S.currentDefaults,LS.setDefaults=_S.setDefaults,LS.defaultCurrencyFormat=_S.currentCurrencyDefaultFormat,LS.validate=HS.validate,LS.loadLanguagesInNode=IS.loadLanguagesInNode,LS.unformat=AS.unformat,LS.BigNumber=DS.BigNumber;var BS=eS(LS);const VS={useGrouping:!1,maximumFractionDigits:20};function FS(t){const{numericFormat:e}=t;return void 0!==e?.pattern||void 0!==e?.culture}const zS=new WeakSet;function $S(t,e){return so(t)&&(t=FS(e)?function(t,e){const{numericFormat:n}=e,o=n&&n.culture||"-",i=n&&n.pattern;if(void 0!==o&&!BS.languages()[o]){const t=o.replace("-",""),e=BS.allLanguages?BS.allLanguages[o]:BS[t];e&&BS.registerLanguage(e)}return BS.setLanguage(o),BS(t).format(i||"0")}(t,e):function(t,e){const{numericFormat:n,locale:o}=e;return new Intl.NumberFormat(o,n??VS).format(t)}(t,e)),t}function US(t,e,n,o,i,s,r){if(FS(r)&&!zS.has(r.instance)&&(zS.add(r.instance),Jt("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(r.className))t=r.className;else{const e=r.className??"";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"),r.className=t.join(" "),e.dir="ltr"}sw.apply(this,[t,e,n,o,i,s,r])}US.valueFormatter=$S,US.RENDERER_TYPE="numeric";function jS(t,e,n,o,i,s){ye(e,s,t.getSettings().sanitizer)}jS.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},jS.RENDERER_TYPE="password";function YS(t,e,n,o,i,s,r){sw.apply(this,[t,e,n,o,i,s,r])}YS.RENDERER_TYPE="select";const GS=new WeakSet;function qS(t,e,n,o,i,s,r){GS.has(r.instance)||"string"!=typeof r.timeFormat||(GS.add(r.instance),Jt("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/")),sw.apply(this,[t,e,n,o,i,s,r]),e.dir="ltr"}qS.RENDERER_TYPE="time";function KS(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,XS(o,e)):XS(o,e)(this.source):e(!0)}function XS(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)}}KS.VALIDATOR_TYPE="autocomplete";function ZS(t,e){const n=Ln(bv,this.instance);let o=t,i=!0;null==o&&(o="");let s=$b(o,this.dateFormat||n.defaultDateFormat,!0).isValid(),r=$b(new Date(o)).isValid()||s;if(this.allowEmpty&&""===o&&(r=!0,s=!0),r||(i=!1),!r&&s&&(i=!0),r&&!s)if(!0===this.correctFormat){const t=function(t,e){const n=$b(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=$b(t,e),i=t.search(/[A-Za-z]/g)>-1;let s;s=n.isValid()&&n.format("x")===o.format("x")||!o.isValid()||i?n:o;return s.format(e)}(o,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"dateValidator"),i=!0}else i=!1;e(i)}ZS.VALIDATOR_TYPE="date";function QS(t,e){KS.apply(this,[t,e])}QS.VALIDATOR_TYPE="dropdown";function JS(t,e){this.allowEmpty&&O(t)?e(!0):e(Mv(t))}JS.VALIDATOR_TYPE="intl-date";function tk(t,e){this.allowEmpty&&O(t)?e(!0):e(Hv(t))}tk.VALIDATOR_TYPE="intl-time";function ek(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,nk(n,e)):nk(n,e)(this.source):e(!0):e(!1)}function nk(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,s=t.length;o<s;o++){if(Pt(n[e])&&!Pt(t[o])||!Pt(n[e])&&Pt(t[o])){i=!1;break}(Pt(n[e])&&Pt(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)}}ek.VALIDATOR_TYPE="multiselect";function ok(t,e){let n=t;null==n&&(n=""),this.allowEmpty&&""===n?e(!0):e(""!==n&&so(t))}ok.VALIDATOR_TYPE="numeric";const ik=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function sk(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 s=/^\d{1,2}$/.test(i);s&&(i+=":00");const r=$b(i,ik,!0).isValid()?$b(i):$b(i,n);let a=r.isValid(),l=$b(i,n,!0).isValid()&&!s;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(o=!1),!a&&l&&(o=!0),a&&!l)if(!0===this.correctFormat){const t=r.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,t,"timeValidator"),o=!0}else o=!1;e(o)}function rk(t){return Et(t)&&void 0!==t.value?t.value:t}function ak(t,e,n){return Pt(this.getSourceDataAtCell(this.toPhysicalRow(e),this.toPhysicalColumn(n)))?Pt(t)?t:{key:t,value:t}:t}sk.VALIDATOR_TYPE="time";const lk={CELL_TYPE:"autocomplete",editor:Nb,renderer:Hy,validator:KS,valueGetter:rk,valueSetter:ak,parsePastedValue:!0};const hk={CELL_TYPE:"checkbox",editor:Wb,renderer:Vy,valueSetter:function(t,e,n){const{checkedTemplate:o,uncheckedTemplate:i}=this.getCellMeta(e,n),s=H(t),r=s===H(o),a=s===H(i);return r||a?r?o:i:t}},ck=new WeakSet;function dk(t,e,n,o,i,s,r){ck.has(r.instance)||"string"!=typeof r.dateFormat||(ck.add(r.instance),Jt("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/")),Hy.apply(this,[t,e,n,o,i,s,r])}dk.RENDERER_TYPE="date";const uk={CELL_TYPE:"date",editor:Sv,renderer:dk,validator:ZS};const gk={CELL_TYPE:"dropdown",editor:Rv,renderer:Iy,validator:QS,filter:!1,strict:!0,valueGetter:function(t){return rk.call(this,t)},valueSetter:function(t,e,n,o){return ak.call(this,t,e,n,o)},parsePastedValue:!0},pk={CELL_TYPE:"handsontable",editor:xb,renderer:zy},fk={CELL_TYPE:"intl-date",editor:Iv,renderer:jy,validator:JS,sourceDataValidator:function(t,e){return!(!e.allowEmpty||!O(t))||Mv(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:Uy},mk={CELL_TYPE:"intl-time",editor:Av,renderer:Gy,validator:tk,sourceDataValidator:function(t,e){return!(!e.allowEmpty||!O(t))||Hv(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(O(t))return i?t:Ay;const s=_v(t);if(null===s)return Ay;const r=Et(n)?n:Yy;return new Intl.DateTimeFormat(o,r).format(s)}},wk="ht-multi-select",bk=`${wk}-chip`,vk=`${wk}-chip-remove`,Ck=`${wk}-chip-label`,yk=`${wk}-overflow`,Sk=new WeakSet,kk=new WeakMap,Rk=new WeakMap;function xk(t,e){return Pt(t)?t[e]:t}function Ek(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 Mk(t,e){if(Rk.has(t))return;Rk.set(t,new Fn(t));Rk.get(t).addEventListener(t.rootElement,"click",n=>{if(!de(n.target,vk))return;n.preventDefault(),n.stopPropagation();const o=n.target.closest(`.${bk}`);if(!o)return;const i=o.dataset.row,s=o.dataset.prop,r=t.toPhysicalRow(i),a="string"==typeof s?s:t.toPhysicalColumn(s),l=t.propToCol(s),h=t.getSourceDataAtCell(r,l),c=o.dataset.key,d=function(t,e){return t.filter(t=>xk(t,"key")!==e)}(Ek(h),c);t.setSourceDataAtCell(r,a,d,`${e}-renderer`),t.render()}),t.addHook("beforeOnCellMouseDown",t=>{de(t.target,vk)&&an(t)})}function Tk(t,e,n){const o=t,i=e.querySelectorAll(`.${bk}`);for(let t=0;t<i.length;t++)i[t].style.display="";if(null===o||0===i.length)return;let s=e.querySelector(`.${yk}`);s?(s.style.display="",s.style.visibility="hidden"):(s=function(t,e){const n=t.createElement("span");return ue(n,yk),n.textContent=`+${e}`,n}(n,i.length),s.style.visibility="hidden",e.appendChild(s));const r=n.defaultView.getComputedStyle(e),a=parseFloat(r.gap)||0,l=s.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";s.textContent=`+${d}`,s.style.visibility="visible"}else s.style.display="none"}const _k="multiselect";function Hk(t,e,n,o,i,s,r){Xm.apply(this,[t,e,n,o,i,s,r]);let a=s;if(!a&&r.placeholder)return a=r.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=Ek(t.getSourceDataAtCell(c,d));if(we(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 s=t.createElement("span"),r=xk(e,"value");ue(s,bk),s.dataset.row=o,s.dataset.prop=i,s.title=r;const a=t.createElement("span");ue(a,Ck),a.textContent=r,s.appendChild(a);const l=t.createElement("span");return ue(l,vk),n&&l.setAttribute("aria-hidden","true"),s.dataset.key=xk(e,"key"),s.appendChild(l),s}(l,t,h,n,i);g.appendChild(e)}),e.appendChild(g),Mk(t,_k);const p=function(t,e){const n=t.getColWidth(e);return kk.has(t)?kk.get(t)?.[e]?.width!==n&&kk.set(t,{...kk.get(t),[e]:{width:n}}):kk.set(t,{[e]:{width:n}}),Sk.has(t)||(t.addHook("beforeColumnResize",(e,n)=>{kk.get(t)?.[n]?.width!==e&&kk.set(t,{...kk.get(t),[n]:{width:e}})}),Sk.add(t)),kk.get(t)?.[e]?.width??n}(t,o);!function(t,e,n){Tk(t,e,n)}(p,g,l)}function Ik(t){return Array.isArray(t)?function(t,e=" "){return t.join(e)}(t.map(t=>Pt(t)?t.value:t),", "):t}Hk.RENDERER_TYPE=_k;const Ak={CELL_TYPE:"multiselect",_complexDataFormat:!0,editor:gy,renderer:Hk,validator:ek,valueGetter:Ik,valueSetter:function(t,e,n){if(Array.isArray(t)){const o=this.getSourceDataAtCell(this.toPhysicalRow(e),n);if(Array.isArray(o)&&o.length>0&&Pt(o[0]))return t.map(t=>Pt(t)?t:{key:t,value:t})}return t},parsePastedValue:!0};const Ok={CELL_TYPE:"numeric",editor:Ov,renderer:US,validator:ok,dataType:"number",valueSetter:function(t,e,n,o){if("string"!=typeof t)return t;const i=function(t){const e=t?.numericFormat?.culture??t?.locale;if("string"==typeof e&&e.length>0)try{const t=new Intl.NumberFormat(e).formatToParts(1.1).find(({type:t})=>"decimal"===t);if("."===t?.value||","===t?.value)return t.value}catch{}const n=t?.numericFormat?.pattern;if("string"==typeof n){const t=n.lastIndexOf("."),e=n.lastIndexOf(",");if(t>-1&&e>-1)return t>e?".":",";if(e>-1&&-1===t)return".";if(t>-1&&-1===e)return"."}}(o);if(so(t,[","])||ro(t,i)){const e=function(t,e={}){const{decimalSeparator:n}=e,o=t.trim();if(ro(t,n))return parseFloat(o.replace(/,/g,""));const i=o.replace(",",".");return!1===isNaN(parseFloat(i))?parseFloat(i):null}(t,{decimalSeparator:i});return bg(e)?t:e}return t},valueFormatter:$S},Dk={CELL_TYPE:"password",editor:Dv,renderer:jS,copyable:!1},Nk={CELL_TYPE:"select",editor:Wv,renderer:YS},Pk={CELL_TYPE:"time",editor:Lv,renderer:qS,validator:sk};const Wk=[];function Lk(t,e){return!!t[e]}function Bk(t,e){if(Array.isArray(t)){"string"!=typeof e&&bt("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let n=0;n<t.length;n+=1)Wk.push({blockedKey:t[n],incompatibleSettingKey:e});return}"string"!=typeof t&&bt("registerConflict expects a string blocked target key when the first argument is not an array.");const n=t;if(Array.isArray(e))for(let t=0;t<e.length;t+=1){const o=e[t];"string"!=typeof o&&bt("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),Wk.push({blockedKey:n,incompatibleSettingKey:o})}else"string"!=typeof e?bt("Invalid registerConflict arguments."):Wk.push({blockedKey:n,incompatibleSettingKey:e})}function Vk(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fk(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function zk(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Fk(t,e,"get"))}function $k(t,e,n){Vk(t,e),e.set(t,n)}function Uk(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Fk(t,e,"set"),n),n}const jk=new Map([["plugin",function(t){return!!xo(t)}],["cell-type",ug],["editor",Dn],["renderer",_o],["validator",Po]]),Yk=Symbol("mainSetting"),Gk=[];let qk=null;var Kk=new WeakMap,Xk=new WeakMap,Zk=new WeakSet;class Qk{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}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(":");jk.has(n)||bt(`Unknown plugin dependency type "${n}" was found.`),jk.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("");Gk.push(e)}}qk||(qk=Ro()),qk.indexOf(this.pluginName)>=0&&qk.splice(qk.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{if(this.isEnabled&&this.isEnabled()){if(this.isHardConflictBlocked())return void(this.hot.getSettings()[this.constructor.PLUGIN_KEY]=!1);this.enablePlugin()}});if(0===qk.length){if(Gk.length>0){const t=[`${Gk.join("\n")}\n`,"You have to import and register them manually."].join("");Gk.length=0,bt(t)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}isHardConflictBlocked(){const t=this.constructor.PLUGIN_KEY,e=function(t,e){for(let n=0;n<Wk.length;n+=1){const o=Wk[n];if(o.blockedKey===e&&Lk(t,o.incompatibleSettingKey))return o}return null}(this.hot.getSettings(),t);if(e){const{incompatibleSettingKey:n}=e;return Qt(T`The \`${t}\` plugin cannot be used with the \`${n}\` option.\x20
|
|
242
|
+
This combination is not supported. The plugin will remain disabled.`),!0}return!1}enablePlugin(){this.enabled=!0}disablePlugin(){this.eventManager?.clear(),this.clearHooks(),this.enabled=!1}getSetting(t){const e=this.constructor.DEFAULT_SETTINGS,n=this.constructor.SETTINGS_VALIDATORS;if(void 0===t)return Et(zk(this,Kk))?Dt(zk(this,Kk),e):zk(this,Kk);let o;if((Array.isArray(zk(this,Kk))||Et(zk(this,Kk)))&&e[Yk]===t)o=Array.isArray(zk(this,Kk))?zk(this,Kk):zk(this,Kk)[t]??e[t];else if(t.includes(".")){const n=_t(zk(this,Kk),t),i=_t(e,t);o=Et(n)?Dt(n,i):void 0!==n?n:i}else o=Et(zk(this,Kk))?Dt(zk(this,Kk),e)[t]:e[t];if("function"==typeof o&&n&&"object"==typeof n){const e=n[t];if(e&&"function"==typeof e)return(...n)=>{const i=o(...n);if(!1===e(i)){const e=n.map(t=>"string"==typeof t?`"${t}"`:"").join(", "),o=n.length>0?e:"";return void Qt(`${this.pluginName} Plugin: "${t}" function (${o}) result is not valid and will be ignored.`)}return i}}return o}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.`):(Uk(this,Kk,t),zk(this,Kk))}return e&&"object"==typeof e&&"object"==typeof t?(null!==zk(this,Kk)&&"object"==typeof zk(this,Kk)||Uk(this,Kk,{...this.constructor.DEFAULT_SETTINGS}),Object.keys(e).forEach(n=>{if(!(n in t))return;const o=e[n];!1!==(!o||o(t[n]))?zk(this,Kk)[n]=t[n]:Qt(`${this.pluginName} Plugin: "${n}" option is not valid and it will be ignored.`)}),zk(this,Kk)):(Uk(this,Kk,t),t)}addHook(t,e,n){zk(this,Xk)[t]=zk(this,Xk)[t]||[];const o=zk(this,Xk)[t];this.hot.addHook(t,e,n),o.push(e),zk(this,Xk)[t]=o}removeHooks(t){x(zk(this,Xk)[t]||[],e=>{this.hot.removeHook(t,e)})}clearHooks(){const t=zk(this,Xk);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){if(!this.isEnabled)return;const e=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,Zk,Jk).call(this,t);if(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()){if(this.isHardConflictBlocked())return;this.enablePlugin()}this.enabled&&this.isEnabled()&&this.isHardConflictBlocked()?this.disablePlugin():this.enabled&&this.isEnabled()&&e&&(this.updatePluginSettings(t[this.constructor.PLUGIN_KEY]),this.updatePlugin(t))}updatePlugin(){}destroy(){Uk(this,Kk,null),this.eventManager?.destroy(),this.clearHooks(),Tt(this,(t,e)=>{"hot"!==e&&(this[e]=null)}),delete this.t,delete this.hot}constructor(t){var e,n;Vk(e=this,n=Zk),n.add(e),$k(this,Kk,{writable:!0,value:void 0}),$k(this,Xk,{writable:!0,value:void 0}),Uk(this,Kk,null),this.eventManager=new Fn(this),this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,Uk(this,Xk,{}),Mt(this,"hot",t,{writable:!1}),qk=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",t=>this.onUpdateSettings(t)),this.hot.addHook("beforeInit",()=>this.init())}}function Jk(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}let tR=class{addRow(t,e){this.columns.length&&bt("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&&bt("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,s=this.hot.getCellMeta(t,i),r=this.hot.getCellRenderer(s),a=e.createElement("td");a.setAttribute("ghost-table",1),r(this.hot,a,t,i,this.hot.colToProp(i),o.value,s),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,s=t.createElement("th");n.push([i,s]),e.appendChild(s)})}),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,s=this.hot.getCellMeta(i,t),r=this.hot.getCellRenderer(s),a=e.createElement("td"),l=e.createElement("tr");a.setAttribute("ghost-table",1),r(this.hot,a,i,t,this.hot.colToProp(t),o.value,s),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(t=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(t=""){const{rootDocument:e}=this.hot,n=e.createDocumentFragment(),o=e.createElement("table"),i=e.createElement("thead"),s=e.createElement("tbody"),r=e.createElement("colgroup"),a=e.createElement("tr"),l=e.createElement("th");return this.isVertical()&&o.appendChild(r),this.isHorizontal()&&(a.appendChild(l),i.appendChild(a),o.style.tableLayout="auto",o.style.width="auto"),o.appendChild(i),this.isVertical()&&s.appendChild(a),o.appendChild(s),ue(o,t),n.appendChild(o),{fragment:n,table:o,tHead:i,tBody:s,colGroup:r,tr:a,th:l}}createContainer(t=""){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)}constructor(t){this.hot=null,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0},this.hot=t}};class eR{static get SAMPLE_COUNT(){return 3}getSampleCount(){return this.customSampleCount?this.customSampleCount:eR.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:s}="number"==typeof n?{from:n,to:n}:n;return ao(i,s,n=>{const i=this.generateSample(t,e,n);o.set(n,i)}),o}generateSample(t,e,n){"row"!==t&&"col"!==t&&bt("Unsupported sample type");const o=new Map,i="row"===t?"col":"row",s=[];return ao(e.from,e.to,e=>{const r="row"===t?this.dataFactory(n,e,this):this.dataFactory(e,n,this);if(!1===r)return;const{value:a,bundleSeed:l}=r,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){(!(s.indexOf(a)>-1)||this.allowDuplicates||h)&&(d.strings.push({value:a,[i]:e}),s.push(a),d.needed-=1)}}),o}constructor(t){this.samples=null,this.dataFactory=null,this.customSampleCount=null,this.allowDuplicates=!1,this.includeHidden=!1,this.dataFactory=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){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function iR(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,oR(t,e,"get"))}function sR(t,e,n){nR(t,e),e.set(t,n)}function rR(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,oR(t,e,"set"),n),n}function aR(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function lR(t,e){nR(t,e),e.add(t)}Mn.getSingleton().register("modifyAutoColumnSizeSeed");const hR="autoColumnSize";var cR=new WeakMap,dR=new WeakMap,uR=new WeakMap,gR=new WeakMap,pR=new WeakSet,fR=new WeakSet,mR=new WeakSet,wR=new WeakSet,bR=new WeakSet,vR=new WeakSet,CR=new WeakSet,yR=new WeakSet,SR=new WeakSet;class kR extends Qk{static get PLUGIN_KEY(){return hR}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}isEnabled(){return!1!==this.hot.getSettings()[hR]&&!this.hot.getSettings().colWidths}enablePlugin(){if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(...t)=>aR(this,bR,TR).call(this,...t)),this.addHook("beforeChangeRender",(...t)=>aR(this,vR,_R).call(this,...t)),this.addHook("afterFormulasValuesUpdate",(...t)=>aR(this,SR,AR).call(this,...t)),this.addHook("beforeRender",()=>aR(this,wR,MR).call(this)),this.addHook("modifyColWidth",(t,e)=>this.getColumnWidth(e,t)),this.addHook("init",()=>aR(this,yR,IR).call(this)),rR(this,gR,this.hot.columnIndexMapper.observeMapChange(this.columnWidthsMap,()=>{this.hot.view?.invalidateColumnWidthCache()})),super.enablePlugin()}updatePlugin(){rR(this,uR,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){iR(this,gR)&&(iR(this,gR).call(this),rR(this,gR,null)),super.disablePlugin(),this.addHook("beforeColumnResize",(t,e,n)=>aR(this,CR,HR).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(t={from:0,to:this.hot.countCols()-1},e={from:0,to:this.hot.countRows()-1},n=!1){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))&&aR(this,fR,xR).call(this,t,i)}),this.ghostTable.columns.length&&(aR(this,mR,ER).call(this),this.measuredColumns=o.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(t={from:0,to:this.hot.countRows()-1},e=!1){let n=0;const o=this.hot.countCols()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Lt(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+kR.CALCULATION_STEP,o)},t,e),n=n+kR.CALCULATION_STEP+1,n<o?i=Wt(s):(Lt(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();r>=0&&(this.calculateColumnsWidth({from:0,to:r},t,e),n=r+1),n<o?s():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const t=this.hot.getSettings()[hR];let e=kR.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,n=!0){let o=e;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t)),n&&"number"==typeof o&&(o=Math.max(o,Qo))),o}getFirstVisibleColumn(){return this.hot.getFirstRenderedVisibleColumn()??-1}getLastVisibleColumn(){return this.hot.getLastRenderedVisibleColumn()??-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce((t,e,n)=>{const o=iR(this,dR).length;return(o-1<n||iR(this,dR)[n]!==e)&&t.push(this.hot.toVisualColumn(n)),o-1<n?iR(this,dR).push(e):iR(this,dR)[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()}constructor(t){super(t),lR(this,pR),lR(this,fR),lR(this,mR),lR(this,wR),lR(this,bR),lR(this,vR),lR(this,CR),lR(this,yR),lR(this,SR),sR(this,cR,{writable:!0,value:void 0}),sR(this,dR,{writable:!0,value:void 0}),sR(this,uR,{writable:!0,value:void 0}),sR(this,gR,{writable:!0,value:void 0}),this.ghostTable=new tR(this.hot),this.samplesGenerator=new eR((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 s="";i.spanned||(s=this.hot.getDataAtCell(t,e),"function"==typeof i.valueFormatter&&(s=i.valueFormatter(s,i)));let r="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(r=this.hot.runHooks("modifyAutoColumnSizeSeed",r,i,s)),{value:s,bundleSeed:r}}),this.inProgress=!1,this.measuredColumns=0,this.columnWidthsMap=new Ml,rR(this,cR,!1),rR(this,dR,[]),rR(this,uR,[]),rR(this,gR,null),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",(t,e,n)=>aR(this,CR,HR).call(this,t,e,n))}}function RR(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)||aR(this,fR,xR).call(this,t,e))}),this.ghostTable.columns.length&&(aR(this,mR,ER).call(this),this.ghostTable.clean())}function xR(t,e){this.samplesGenerator.generateColumnSamples(t,e).forEach((t,e)=>this.ghostTable.addColumn(e,t))}function ER(){this.hot.batchExecution(()=>{this.ghostTable.getWidths((t,e)=>{const n=this.hot.toPhysicalColumn(t);this.columnWidthsMap.setValueAtIndex(n,e)})},!0)}function MR(){this.calculateVisibleColumnsWidth(),this.inProgress||(aR(this,pR,RR).call(this,iR(this,uR)),rR(this,uR,[]))}function TR(t,e){e||this.recalculateAllColumnsWidth()}function _R(t){const e=t.reduce((t,[,e])=>{const n=this.hot.propToCol(e);return Number.isInteger(n)&&-1===t.indexOf(n)&&t.push(n),t},[]);iR(this,uR).push(...e)}function HR(t,e,n){let o=t;return n&&(this.calculateColumnsWidth(e,void 0,!0),o=this.getColumnWidth(e,void 0,!1)),o}function IR(){rR(this,dR,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),rR(this,cR,!0)}function AR(t){if(!iR(this,cR))return;const e=this.hot.getPlugin("formulas"),n=e?.sheetId,o=t.reduce((t,e)=>{if(null!=n&&e.address?.sheet!==n)return t;const o=e.address?.col;if(Number.isInteger(o)){const e=this.hot.toVisualColumn(o);-1===t.indexOf(e)&&t.push(e)}return t},[]);iR(this,uR).push(...o)}const OR={horizontal:"horizontal",vertical:"vertical"};function DR(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function NR(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)}Mn.getSingleton().register("modifyAutofillRange"),Mn.getSingleton().register("beforeAutofill"),Mn.getSingleton().register("afterAutofill");const PR="autofill",WR=["fillHandle"];var LR=new WeakSet,BR=new WeakSet,VR=new WeakSet,FR=new WeakSet,zR=new WeakSet,$R=new WeakSet;class UR extends Qk{static get PLUGIN_KEY(){return PR}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[PR,...WR]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",t=>DR(this,VR,GR).call(this,t)),this.addHook("afterOnCellCornerDblClick",t=>DR(this,BR,YR).call(this,t)),this.addHook("beforeOnCellMouseOver",(t,e)=>DR(this,FR,qR).call(this,e)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(t=!1){const e=this.hot.getSelectedRangeLast(),{row:n,col:o}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:n,startCol:o,endRow:i,endCol:s}]),a=[],l=[],h=[];return x(r,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(),s=i.getTopStartCorner(),r=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[s.row,s.col,r.row,r.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(s.row,t),Math.min(s.col,e),Math.max(r.row,n),Math.max(r.col,o)],a),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=function(t,e,n){let o,i,s;return e[0]===t[0]&&e[1]<t[1]?(s="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]?(s="right",o=n(e[0],t[3]+1),i=n(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(s="up",o=n(e[0],e[1]),i=n(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(s="down",o=n(t[2]+1,e[1]),i=n(e[2],e[3])),o&&o.normalize(),i&&i.normalize(),{directionOfDrag:s,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),s=this.hot.runHooks("beforeAutofill",t,n,o,h);if(!1===s)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=s;const a=s;if(["up","left"].indexOf(h)>-1&&(1!==a.length||0!==a[0].length))if(r=[],"up"===h){const t=d.row-c.row+1,e=t%a.length;for(let n=0;n<t;n++)r.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++){r.push([]);for(let o=0;o<t;o++)r[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=DR(this,LR,jR).call(this,r,e,c,d,h);t.length&&(r=t)}this.hot.populateFromArray(c.row,c.col,r,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",r,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(OR.vertical)&&this.directions.includes(OR.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(OR.vertical))o=this.hot._createCellCoords(t.row,n.col);else{if(!this.directions.includes(OR.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(!O(e[i][n]))return-1}const n=e[i][t[1]-1],s=e[i][t[3]+1];O(n)&&O(s)||(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(...R(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=Re(this.hot.table).top-(this.hot.rootWindow.pageYOffset||e.scrollTop)+Oe(this.hot.table),o=Re(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",()=>DR(this,zR,KR).call(this)),this.eventManager.addEventListener(t,"mousemove",t=>DR(this,$R,XR).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(OR),e.autoInsertRow=!0):Et(t)?(I(t.autoInsertRow)?t.direction===OR.horizontal?e.autoInsertRow=!1:e.autoInsertRow=t.autoInsertRow:e.autoInsertRow=!1,I(t.direction)?e.directions=[t.direction]:e.directions=Object.keys(OR)):"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()}constructor(...t){super(...t),NR(this,LR),NR(this,BR),NR(this,VR),NR(this,FR),NR(this,zR),NR(this,$R),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1}}function jR(t,e,n,o){const i=[];for(let s=Math.min(n.row,o.row);s<=Math.max(n.row,o.row);s+=1){i.push([]);for(let r=Math.min(n.col,o.col);r<=Math.max(n.col,o.col);r+=1){const a=this.hot.getSourceDataAtCell(s,r),l=this.hot.getCellMeta(s,r).source,h=this.hot.getCellMeta(s,r)._complexDataFormat||Et(l?.[0])||Array.isArray(l?.[0]),c=s-Math.min(n.row,o.row),d=r-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 YR(){this.selectAdjacent()&&this.fillIn()}function GR(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function qR(t){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(t),this.addNewRowIfNeeded())}function KR(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function XR(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 ZR(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function QR(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function JR(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,QR(t,e,"get"))}function tx(t,e,n){ZR(t,e),e.set(t,n)}function ex(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,QR(t,e,"set"),n),n}function nx(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function ox(t,e){ZR(t,e),e.add(t)}const ix="autoRowSize",sx="htFirstDatasetColumnNotRendered",rx="htAutoRowSize";var ax=new WeakMap,lx=new WeakMap,hx=new WeakMap,cx=new WeakSet,dx=new WeakSet,ux=new WeakSet,gx=new WeakSet,px=new WeakSet,fx=new WeakSet,mx=new WeakSet,wx=new WeakSet,bx=new WeakSet;class vx extends Qk{static get PLUGIN_KEY(){return ix}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}isEnabled(){const t=this.hot.getSettings()[ix];return!0===t||Et(t)}enablePlugin(){if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(...t)=>nx(this,fx,xx).call(this,...t)),this.addHook("beforeChangeRender",(...t)=>nx(this,mx,Ex).call(this,...t)),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",(...t)=>nx(this,bx,Tx).call(this,...t)),this.addHook("beforeViewRender",()=>nx(this,ux,Sx).call(this)),this.addHook("beforeRender",()=>nx(this,gx,kx).call(this)),this.addHook("modifyRowHeight",(t,e)=>this.getRowHeight(e,t)),this.addHook("init",()=>nx(this,wx,Mx).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),ex(this,lx,this.hot.rowIndexMapper.observeMapChange(this.rowHeightsMap,()=>{this.hot.view?.invalidateRowHeightCache()})),ue(this.hot.rootElement,rx),super.enablePlugin()}disablePlugin(){JR(this,lx)&&(JR(this,lx).call(this),ex(this,lx,null)),this.headerHeight=null,ge(this.hot.rootElement,rx),super.disablePlugin(),nx(this,dx,yx).call(this,!1),this.addHook("beforeRowResize",(t,e,n)=>nx(this,px,Rx).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(t={from:0,to:this.hot.countRows()-1},e={from:0,to:this.hot.countCols()-1},n=!1){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(t={from:0,to:this.hot.countCols()-1},e=!1){let n=0;const o=this.hot.countRows()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Lt(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+vx.CALCULATION_STEP,o)},t,e),n=n+vx.CALCULATION_STEP+1,n<o?i=Wt(s):(Lt(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();r>=0&&(this.calculateRowsHeight({from:0,to:r},t,e),n=r+1),n<o?s():(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()[ix];let e=vx.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,e=this.hot.stylesHandler.getDefaultRowHeight(t)){if(t<0)return this.headerHeight??e;const n=this.hot.toPhysicalRow(t);if(this.hot.rowIndexMapper.isHidden(n))return e;const o=this.rowHeightsMap.getValueAtIndex(n);let i=e;return null!==o&&o>e&&(i=o,t===this.hot.view.getFirstRenderedVisibleRow()&&(i+=1)),i}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){return this.hot.getFirstRenderedVisibleRow()??-1}getLastVisibleRow(){return this.hot.getLastRenderedVisibleRow()??-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()}constructor(t){super(t),ox(this,cx),ox(this,dx),ox(this,ux),ox(this,gx),ox(this,px),ox(this,fx),ox(this,mx),ox(this,wx),ox(this,bx),tx(this,ax,{writable:!0,value:void 0}),tx(this,lx,{writable:!0,value:void 0}),tx(this,hx,{writable:!0,value:void 0}),this.headerHeight=null,this.ghostTable=new tR(this.hot),this.samplesGenerator=new eR((t,e)=>{const n=this.hot.toPhysicalColumn(e);if(this.hot.columnIndexMapper.isHidden(n))return!1;let o,i;return!(t>=0&&e>=0&&(o=this.hot.getCellMeta(t,e),o.hidden))&&(t>=0?(i=this.hot.getDataAtCell(t,e),"function"==typeof o?.valueFormatter&&(i=o.valueFormatter(i,o))):-1===t&&(i=this.hot.getColHeader(e)),{value:i})}),this.inProgress=!1,this.measuredRows=0,this.rowHeightsMap=new Ml,ex(this,ax,[]),ex(this,lx,null),ex(this,hx,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",(t,e,n)=>nx(this,px,Rx).call(this,t,e,n))}}function Cx(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 yx(t){const e=this.hot.getFirstRenderedVisibleColumn(),n=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(e);!1===t||n===this.hot.columnIndexMapper.getPhysicalFromRenderableIndex(0)?ge(this.hot.rootElement,sx):ue(this.hot.rootElement,sx)}function Sx(){nx(this,dx,yx).call(this)}function kx(){this.calculateVisibleRowsHeight(),this.inProgress||(nx(this,cx,Cx).call(this,JR(this,ax)),ex(this,ax,[]))}function Rx(t,e,n){let o=t;return n&&(this.calculateRowsHeight(e,void 0,!0),o=this.getRowHeight(e)),o}function xx(t,e){e||this.recalculateAllRowsHeight()}function Ex(t){const e=t.reduce((t,[e])=>(-1===t.indexOf(e)&&t.push(e),t),[]);JR(this,ax).push(...e)}function Mx(){this.recalculateAllRowsHeight(),ex(this,hx,!0)}function Tx(t){if(!JR(this,hx))return;const e=this.hot.getPlugin("formulas"),n=e?.sheetId,o=t.reduce((t,e)=>{if(null!=n&&e.address?.sheet!==n)return t;const o=e.address?.row;if(Number.isInteger(o)){const e=this.hot.toVisualRow(o);-1===t.indexOf(e)&&t.push(e)}return t},[]);JR(this,ax).push(...o)}const{getListWithInsertedItems:_x,getListWithRemovedItems:Hx}=Pl("physicallyIndexed");const{getListWithInsertedItems:Ix,getListWithRemovedItems:Ax}=Pl("physicallyIndexed");function Ox(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)}const Dx="bindRowsWithHeaders",Nx=new Map([["loose",class extends Rl{insert(t,e){const n=Al(this.indexedValues,e);this.indexedValues=_x(n,t,e,this.initValueOrFn),super.insert(t,e)}remove(t){const e=Hx(this.indexedValues,t);this.indexedValues=Il(e,t),super.remove(t)}constructor(){super(t=>t)}}],["strict",class extends Rl{insert(t,e){this.indexedValues=Ix(this.indexedValues,t,e,(t,e)=>this.getNextValue(e)),super.insert(t,e)}remove(t){this.indexedValues=Ax(this.indexedValues,t),super.remove(t)}getNextValue(t){return Math.max(...this.getValues())+1+t}constructor(){super(t=>t)}}]]);var Px=new WeakSet;class Wx extends Qk{static get PLUGIN_KEY(){return Dx}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[Dx]}enablePlugin(){if(this.enabled)return;const t=Nx.get(this.getSetting())??Nx.get("loose");this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",t=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,Px,Lx).call(this,t)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}constructor(...t){super(...t),Ox(this,Px),this.headerIndexes=null}}function Lx(t){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(t))}function Bx(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vx(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Fx(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Vx(t,e,"get"))}function zx(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Vx(t,e,"set"),n),n}function $x(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Ux(t,e){Bx(t,e),e.add(t)}const jx="collapsibleColumns",Yx=["nestedHeaders"],Gx="collapsibleIndicator",qx=jx,Kx=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var Xx=new WeakMap,Zx=new WeakSet,Qx=new WeakSet,Jx=new WeakSet,tE=new WeakSet;class eE extends Qk{static get PLUGIN_KEY(){return jx}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[jx,...Yx]}isEnabled(){return!!this.hot.getSettings()[jx]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Qt("You need to configure the Nested Headers plugin in order to use collapsible headers."),zx(this,Xx,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>$x(this,Jx,iE).call(this)),this.addHook("afterLoadData",(...t)=>$x(this,tE,sE).call(this,...t)),this.addHook("afterGetColHeader",(...t)=>$x(this,Zx,nE).call(this,...t)),this.addHook("beforeOnCellMouseDown",(t,e,n)=>$x(this,Qx,oE).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),zx(this,Xx,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{row:t,col:e}=this.hot.getSelectedRangeActive().highlight,{collapsible:n,isCollapsed:o,columnIndex:i}=this.headerStateManager.getHeaderTreeNodeData(t,e)??{};if(n)return o?this.expandSection({row:t,col:i}):this.collapseSection({row:t,col:i}),!1},runOnlyIf:()=>this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.getSelectedRangeActive()?.highlight.isHeader(),group:qx,relativeToGroup:Lp,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(qx)}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 s=e.childNodes[t],r=n.childNodes[t],a=o?o.childNodes[t]:null;ao(0,s.childNodes.length-1,t=>{let e=s.childNodes[t].querySelector(`.${Gx}`);i(e),r&&r.childNodes[t]&&(e=r.childNodes[t].querySelector(`.${Gx}`),i(e)),o&&a&&a.childNodes[t]&&(e=a.childNodes[t].querySelector(`.${Gx}`),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:s,isCollapsed:r}=e;if(!0===n&&o>1&&(r&&"expand"===t||!r&&"collapse"===t))return{row:this.headerStateManager.levelToRowCoords(i),col:s}});this.toggleCollapsibleSection(e,t)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(t,e){if(Kx.has(e)||bt(`Unsupported action is passed (${e}).`),!Array.isArray(t))return;const n=k(t,({row:t})=>t<0);let o=n.length>0;x(n,({row:t,col:n})=>{const{collapsible:i,isCollapsed:s}=this.headerStateManager.getHeaderSettings(t,n)??{};if(!i||s&&"collapse"===e||!s&&"expand"===e)return o=!1,!1});const i=[],s=[];o&&x(n,({row:t,col:n})=>{const{colspanCompensation:o,affectedColumns:r,rollbackModification:a}=this.headerStateManager.triggerNodeModification(e,t,n);o>0&&(s.push(...r),i.push(a))});const r=this.getCollapsedColumns();let a=[];"collapse"===e?a=function(t){const e=[];return x(t,t=>{-1===e.indexOf(t)&&e.push(t)}),e}([...r,...s]):"expand"===e&&(a=k(r,t=>!s.includes(t)));const l=Kx.get(e);if(!1===this.hot.runHooks(l.beforeHook,r,a,o))return void x(i,t=>{t()});this.hot.batchExecution(()=>{x(s,t=>{Fx(this,Xx).setValueAtIndex(this.hot.toPhysicalColumn(t),l.hideColumn)})},!0);const h=this.getCollapsedColumns().length!==r.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))&&s.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,r,a,o,h),this.hot.view.adjustElementsSize(),this.hot.render()}getCollapsedColumns(){return Fx(this,Xx).getHiddenIndexes()}destroy(){zx(this,Xx,null),super.destroy()}constructor(...t){var e,n,o;super(...t),Ux(this,Zx),Ux(this,Qx),Ux(this,Jx),Ux(this,tE),o={writable:!0,value:void 0},Bx(e=this,n=Xx),n.set(e,o),this.nestedHeadersPlugin=null,this.headerStateManager=null,zx(this,Xx,null)}}function nE(t,e,n){const{collapsible:o,origColspan:i,isCollapsed:s}=this.headerStateManager.getHeaderSettings(n,t)??{},r=o&&i>1&&t>=this.hot.getSettings().fixedColumnsStart,a=this.hot.getSettings().ariaTags;let l=e.querySelector(`.${Gx}`);fe(e,[pt("")[0]]),r?(l||(l=this.hot.rootDocument.createElement("div"),ue(l,Gx),e.querySelector("div:first-child").appendChild(l)),ge(l,["collapsed","expanded"]),s?(ue(l,"collapsed"),Se(l,"+"),a&&pe(e,...pt(!1))):(ue(l,"expanded"),Se(l,"-"),a&&pe(e,...pt(!0))),a&&pe(l,"aria-hidden","true")):l?.remove()}function oE(t,e){de(t.target,Gx)&&(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 iE(){this.updatePlugin()}function sE(t,e){e||this.updatePlugin()}const rE=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class aE{updateAllColumnsProperties(t){Et(t)&&Tt(t,(t,e)=>{rE.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){return this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(t))?.sortOrder}getIndexOfColumnInSortQueue(t){return t=this.hot.toPhysicalColumn(t),this.sortingStates.getEntries().findIndex(([e])=>e===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,e])=>({column:this.hot.toVisualColumn(t),...e}))}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}constructor(t,e){this.sortingStates=new Ol,this.sortEmptyCells=false,this.indicator=true,this.headerAction=true,this.hot=t,this.mapName=e,this.hot.columnIndexMapper.registerMap(e,this.sortingStates)}}function lE(t,e,n){const o=e.locale;return function(e,i){const{sortEmptyCells:s}=n;return"string"==typeof e&&(e=e.toLocaleLowerCase(o)),"string"==typeof i&&(i=i.toLocaleLowerCase(o)),e===i?mE:O(e)?O(i)?mE:s&&"asc"===t?wE:bE:O(i)?s&&"asc"===t?bE:wE:isNaN(e)&&!isNaN(i)?"asc"===t?bE:wE:!isNaN(e)&&isNaN(i)?"asc"===t?wE:bE:(isNaN(e)||isNaN(i)||(e=parseFloat(e),i=parseFloat(i)),e<i?"asc"===t?wE:bE:e>i?"asc"===t?bE:wE:mE)}}const hE="default";const{register:cE,getItem:dE,hasItem:uE}=Hn("sorting.compareFunctionFactory"),{register:gE,getItem:pE}=Hn("sorting.mainSortComparator");function fE(t){return uE(t)?dE(t):dE(hE)}cE("checkbox",function(t,e,n){const o=e.checkedTemplate,i=e.uncheckedTemplate,{sortEmptyCells:s}=n;return function(r,a){const l=O(r),h=O(a),c=l?i:r,d=h?i:a,u=c===i||c===o,g=d===i||d===o;if(!1===s){if(l&&!1===h)return bE;if(!1===l&&h)return wE}return!1===u&&g?"asc"===t?wE:bE:u&&!1===g?"asc"===t?bE:wE:!1===u&&!1===g?lE(t,e,n)(r,a):c===i&&d===o?"asc"===t?wE:bE:c===o&&d===i?"asc"===t?bE:wE:mE}}),cE("date",function(t,e,n){return ME(t,e.dateFormat,n)}),cE("intl-date",function(t,e,n){return function(t,e,n){return function(e,o){const{sortEmptyCells:i}=n;if(e===o)return mE;if(O(e))return O(o)?mE:i&&"asc"===t?wE:bE;if(O(o))return i&&"asc"===t?bE:wE;const s=Ev(e),r=Ev(o);return null===s?bE:null===r?wE:r>s?"asc"===t?wE:bE:r<s?"asc"===t?bE:wE:mE}}(t,e.dateFormat,n)}),cE(hE,lE),cE("numeric",function(t,e,n){return function(e,o){const i=parseFloat(e),s=parseFloat(o),{sortEmptyCells:r}=n;if(i===s||isNaN(i)&&isNaN(s))return mE;if(r){if(O(e))return"asc"===t?wE:bE;if(O(o))return"asc"===t?bE:wE}return isNaN(i)?bE:isNaN(s)?wE:i<s?"asc"===t?wE:bE:i>s?"asc"===t?bE:wE:mE}}),cE("time",function(t,e,n){return ME(t,e.timeFormat,n)}),cE("intl-time",function(t,e,n){return function(t,e,n){return function(e,o){const{sortEmptyCells:i}=n;if(e===o)return mE;if(O(e))return O(o)?mE:i&&"asc"===t?wE:bE;if(O(o))return i&&"asc"===t?bE:wE;const s=_v(e),r=_v(o);return null===s?bE:null===r?wE:r>s?"asc"===t?wE:bE:r<s?"asc"===t?bE:wE:mE}}(t,e.timeFormat,n)});const mE=0,wE=-1,bE=1;const vE="asc",CE="desc",yE="colHeader";function SE(t){if(t.some(t=>!1===function(t){if(!1===Et(t))return!1;const{column:e,sortOrder:n}=t;return Number.isInteger(e)&&[vE,CE].includes(n)}(t)))return!1;const e=t.map(({column:t})=>t);return new Set(e).size===e.length}function kE(t){if(t!==CE)return t===vE?CE:vE}function RE(t){return t.querySelector(`.${yE}`)}function xE(t,e){return!(t<0)&&le(e)}function EE(t,e,n){if(e<0||t>=0||hn(n))return!1;if(-1===t)return!0;return le("function"==typeof n.target.closest?n.target.closest("th"):null)}function ME(t,e,n){return function(o,i){const{sortEmptyCells:s}=n;if(o===i)return mE;if(O(o))return O(i)?mE:s&&"asc"===t?wE:bE;if(O(i))return s&&"asc"===t?bE:wE;const r=$b(o,e),a=$b(i,e);return r.isValid()?a.isValid()?a.isAfter(r)?"asc"===t?wE:bE:a.isBefore(r)?"asc"===t?bE:wE:mE:wE:bE}}const TE="indicatorDisabled",_E="columnSorting",HE="sortAction",IE=new Map([[vE,"ascending"],[CE,"descending"]]);function AE(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function OE(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function DE(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,OE(t,e,"set"),n),n}function NE(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function PE(t,e){AE(t,e),e.add(t)}const WE="columnSorting",LE="append",BE=WE;gE(WE,function(t,e){return function(n,o){const[,...i]=n,[,...s]=o;return function(n){const o=t[n],r=e[n],a=i[n],l=s[n],h=r.columnSorting;return(h.compareFunctionFactory?h.compareFunctionFactory:fE(r.type))(o,r,h)(a,l)}(0)}}),Mn.getSingleton().register("beforeColumnSort"),Mn.getSingleton().register("afterColumnSort");const VE=new WeakMap;var FE=new WeakSet,zE=new WeakSet,$E=new WeakSet,UE=new WeakMap,jE=new WeakSet;class YE extends Qk{static get PLUGIN_KEY(){return WE}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){if(VE.has(this.hot)&&VE.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),t=VE.get(this.hot),e=this.pluginKey,void Qt(T`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
|
|
243
|
+
Only \`${t}\` will work. The \`${e}\` plugin will remain disabled.`);var t,e;this.enabled||(VE.set(this.hot,this.pluginKey),this.columnStatesManager=new aE(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new Ml(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)=>NE(this,zE,qE).call(this,t,e)),this.addHook("beforeOnCellMouseDown",(...t)=>NE(this,jE,XE).call(this,...t)),this.addHook("afterOnCellMouseDown",(t,e)=>this.onAfterOnCellMouseDown(t,e)),this.addHook("afterInit",()=>NE(this,FE,GE).call(this)),this.addHook("afterLoadData",(...t)=>NE(this,$E,KE).call(this,...t)),this.addHook("afterDataProviderFetch",(...t)=>{return(e=this,n=UE,function(t,e){return e.get?e.get.call(t):e.value}(e,OE(e,n,"get"))).call(this,...t);var e,n},-1),this.hot.view&&NE(this,FE,GE).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const t=(t,e)=>{const n=RE(e);!1!==xE(t,e)&&null!==n&&this.updateHeaderClasses(n)};VE.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:()=>{const t=this.hot.getSelectedRangeActive()?.highlight,e=t?this.hot.getCell(t.row,t.col,!0):null;return t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&t.row<0&&t.col>=0&&le(e)},relativeToGroup:Lp,position:"before",group:BE})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(BE)}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 Wl),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(t=[]){return Array.isArray(t)?t.slice(0,1):[t]}areValidSortConfigs(t){const e=this.hot.countCols();return SE(t)&&t.every(({column:t})=>t<=e&&t>=0)}getColumnNextConfig(t){const e=this.columnStatesManager.getSortOrderOfColumn(t);if(I(e)){const n=kE(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:kE()}}getNextSortConfig(t,e=LE){const n=this.columnStatesManager.getIndexOfColumnInSortQueue(t),o=-1!==n,i=this.getSortConfig(),s=this.getColumnNextConfig(t);if(o){if(A(s))return[...i.slice(0,n),...i.slice(n+1)];if(e===LE)return[...i.slice(0,n),...i.slice(n+1),s];if("replace"===e)return[...i.slice(0,n),s,...i.slice(n+1)]}return I(s)?i.concat(s):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=>R(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=R(e,t=>t[0]);!function(t,e,...n){const o=pE(e);t.sort(o(...n))}(e,this.pluginKey,R(t,t=>t.sortOrder),R(t,t=>this.getFirstCellSettings(t.column)));for(let t=e.length;t<n;t+=1)e.push([t].concat(o(t)));const s=R(e,t=>t[0]),r=new Map(R(i,(t,e)=>[t,s[e]])),a=R(this.hot.rowIndexMapper.getIndexesSequence(),t=>r.has(t)?r.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,...e){ge(t,Array.from(IE.values()).concat(HE,TE,_E)),!1!==this.enabled&&ue(t,function(t,e,n,o){const i=[_E];if(o&&i.push(HE),!1===n)return i.push(TE),i;const s=t.getSortOrderOfColumn(e);return I(s)&&i.push(IE.get(s)),i}(...e))}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,yE)}onAfterOnCellMouseDown(t,e){if(!1!==EE(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);t?.isOpened()&&this.hot.getCellValidator(t.row,t.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(n)}):this.sort(n)}}destroy(){this.columnStatesManager?.destroy(),super.destroy()}constructor(...t){var e,n,o;super(...t),PE(this,FE),PE(this,zE),PE(this,$E),PE(this,jE),o={writable:!0,value:void 0},AE(e=this,n=UE),n.set(e,o),this.columnStatesManager=null,this.columnMetaCache=null,this.pluginKey=WE,this.indexesSequenceCache=null,DE(this,UE,t=>{this.setSortConfig(t?.columnSortConfig??[])})}}function GE(){const t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}function qE(t,e){const n=RE(e);if(!1===xE(t,e)||null===n)return;const o=this.getFirstCellSettings(t)[this.pluginKey],i=o.indicator,s=o.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,t,i,s),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(t);pe(e,...(r=n?`${n}ending`:"none",["aria-sort",r]))}var r}function KE(t){!0===t&&this.hot.view&&NE(this,FE,GE).call(this)}function XE(t,e,n,o){!1!==EE(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(o.column=!0)}function ZE(t){return null==t||isNaN(t)}class QE{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,s=!0){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 r=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"===r&&t.destinationRow>=c&&(t.alterRowOffset=a*n),"col"===r&&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)}),s&&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(t=this.getAllEndpoints(),e=!0){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,e=!0){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,n=!1){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!")}constructor(t,e){this.endpoints=[],this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[],this.plugin=t,this.hot=this.plugin.hot,this.settings=e}}function JE(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function tM(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)}const eM="columnSummary";var nM=new WeakSet,oM=new WeakSet,iM=new WeakSet,sM=new WeakSet,rM=new WeakSet,aM=new WeakSet;class lM extends Qk{static get PLUGIN_KEY(){return eM}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[eM]}enablePlugin(){this.enabled||(this.settings=this.hot.getSettings()[eM],this.endpoints=new QE(this,this.settings),this.addHook("afterInit",(...t)=>JE(this,nM,hM).call(this,...t)),this.addHook("afterChange",(...t)=>JE(this,iM,dM).call(this,...t)),this.addHook("afterUpdateSettings",(...t)=>JE(this,oM,cM).call(this,...t)),this.addHook("afterLoadData",(...t)=>JE(this,sM,uM).call(this,...t)),this.addHook("afterUpdateData",(...t)=>JE(this,rM,gM).call(this,...t)),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",(...t)=>this.endpoints.resetSetupBeforeStructureAlteration("remove_row",...t)),this.addHook("beforeRemoveCol",(...t)=>this.endpoints.resetSetupBeforeStructureAlteration("remove_col",...t)),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",(...t)=>this.endpoints.resetSetupAfterStructureAlteration("remove_row",...t)),this.addHook("afterRemoveCol",(...t)=>this.endpoints.resetSetupAfterStructureAlteration("remove_col",...t)),this.addHook("afterRowMove",(...t)=>JE(this,aM,pM).call(this,...t)),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,s=0;do{if(i=this.getCellValue(o,e),i=ZE(i)?null:i,null!==i){const t=(`${i}`.split(".")[1]||[]).length||1;t>s&&(s=t)}n+=i||0,o-=1}while(o>=t[0]);return Math.round(n*10**s)/10**s}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,s=t[1]||t[0];do{if(o=this.getCellValue(s,e),o=ZE(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)}s-=1}while(s>=t[0]);return i}countEmpty(t,e){let n,o=0,i=t[1]||t[0];do{n=this.getCellValue(i,e),n=ZE(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),s="";return null!==n&&null!==o&&(s=this.hot.getCellMeta(n,o).className||""),s.indexOf("columnSummaryResult")>-1?null:(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&(this.endpoints.currentEndpoint.suppressDataTypeErrors||bt(T`ColumnSummary plugin: cell at (${t}, ${e}) is not in a\x20
|
|
244
|
+
numeric format. Cannot do the calculation.`)),i)}constructor(...t){super(...t),tM(this,nM),tM(this,oM),tM(this,iM),tM(this,sM),tM(this,rM),tM(this,aM),this.endpoints=null}}function hM(){this.endpoints.initEndpoints()}function cM(t){void 0!==t.columns&&this.endpoints.refreshCellMetas()}function dM(t,e){t&&"ColumnSummary.reset"!==e&&"ColumnSummary.set"!==e&&"loadData"!==e&&this.endpoints.refreshChangedEndpoints(t)}function uM(t,e){e||this.endpoints.refreshAllEndpoints()}function gM(t,e){e||this.endpoints.refreshAllEndpoints()}function pM(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 fM(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mM(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function wM(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,mM(t,e,"get"))}function bM(t,e,n){fM(t,e),e.set(t,n)}function vM(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,mM(t,e,"set"),n),n}var CM=new WeakMap,yM=new WeakMap,SM=new WeakMap,kM=new WeakSet;class RM{setObservedElement(t){vM(this,yM,t)}unobserve(){wM(this,SM).unobserve(wM(this,yM))}observe(){vM(this,CM,!0),wM(this,SM).observe(wM(this,yM))}destroy(){wM(this,SM).disconnect()}constructor(){var t,e;fM(t=this,e=kM),e.add(t),bM(this,CM,{writable:!0,value:void 0}),bM(this,yM,{writable:!0,value:void 0}),bM(this,SM,{writable:!0,value:void 0}),vM(this,CM,!0),vM(this,yM,null),vM(this,SM,new ResizeObserver(t=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,kM,xM).call(this,t)))}}function xM(t){!wM(this,CM)&&Array.isArray(t)&&t.length?t.forEach(({borderBoxSize:t})=>{const{inlineSize:e,blockSize:n}=t[0];this.runLocalHooks("resize",e,n)}):vM(this,CM,!1)}function EM(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function MM(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,EM(t,e,"get"))}function TM(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 _M(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,EM(t,e,"set"),n),n}Rt(RM,Fs);var HM=new WeakMap,IM=new WeakMap,AM=new WeakMap,OM=new WeakMap,DM=new WeakMap,NM=new WeakMap,PM=new WeakMap,WM=new WeakMap;class LM{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"}setPosition(t,e){MM(this,NM).left=`${t}px`,MM(this,NM).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:Oe(this.getInputElement())}}observeSize(){MM(this,WM).observe()}resetSize(){const t=this.getInputElement();t.style.width="",t.style.height=""}setReadOnlyState(t){this.getInputElement().readOnly=t}show(){MM(this,NM).display="block",_M(this,PM,!1)}hide(){MM(this,WM).unobserve(),MM(this,PM)||(MM(this,NM).display="none"),_M(this,PM,!0)}isVisible(){return"block"===MM(this,NM).display}setValue(t=""){const e=t||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return MM(this,HM).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const t=MM(this,HM).createElement("div"),e=MM(this,HM).createElement("textarea");return t.style.display="none",_M(this,OM,MM(this,HM).createElement("div")),MM(this,OM).setAttribute("dir",MM(this,AM)?"rtl":"ltr"),ue(MM(this,OM),LM.CLASS_EDITOR_CONTAINER),MM(this,IM).appendChild(MM(this,OM)),ue(t,LM.CLASS_EDITOR),ue(e,LM.CLASS_INPUT),e.setAttribute("data-hot-input",!0),t.appendChild(e),MM(this,OM).appendChild(t),t}getInputElement(){return MM(this,DM).querySelector(`.${LM.CLASS_INPUT}`)}getEditorElement(){return MM(this,DM)}destroy(){const t=MM(this,OM)?MM(this,OM).parentNode:null;MM(this,DM).parentNode.removeChild(MM(this,DM)),_M(this,DM,null),_M(this,NM,null),MM(this,WM).destroy(),t&&t.removeChild(MM(this,OM))}constructor(t,e,n){TM(this,HM,{writable:!0,value:void 0}),TM(this,IM,{writable:!0,value:void 0}),TM(this,AM,{writable:!0,value:void 0}),TM(this,OM,{writable:!0,value:void 0}),TM(this,DM,{writable:!0,value:void 0}),TM(this,NM,{writable:!0,value:void 0}),TM(this,PM,{writable:!0,value:void 0}),TM(this,WM,{writable:!0,value:void 0}),_M(this,AM,!1),_M(this,OM,null),_M(this,PM,!0),_M(this,WM,new RM),_M(this,HM,t),_M(this,IM,n),_M(this,AM,e),_M(this,DM,this.createEditor()),_M(this,NM,MM(this,DM).style),MM(this,WM).setObservedElement(this.getInputElement()),MM(this,WM).addLocalHook("resize",(...t)=>this.runLocalHooks("resize",...t)),this.hide()}}Rt(LM,Fs);class BM{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(t=250){this.showDebounced=Qe(t=>{this.wasLastActionShow&&this.runLocalHooks("show",t.from.row,t.from.col)},t)}destroy(){this.clearLocalHooks()}constructor(t){this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}}function VM(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 FM(t,e,n,o,i){x(t,t=>{t.forAll((t,s)=>{t>=0&&s>=0&&function(t,e,n,o,i,s){const r=i(t,e);let a=o;r.className&&(a="vertical"===n?function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${e}`}(r.className,o):function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${e}`}(r.className,o));s(t,e,"className",a)}(t,s,e,n,o,i)})})}function zM(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}function $M(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 UM(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}Rt(BM,Fs);const jM="---------";const YM="alignment";const GM="clear_column";const qM="col_left";const KM="col_right";const XM="make_read_only";const ZM="redo";const QM="remove_col";const JM="remove_row";const tT="row_above";const eT="row_below";const nT="no_items";const oT="undo";const iT=[tT,eT,qM,KM,GM,JM,QM,oT,ZM,XM,YM,jM,nT],sT={[jM]:function(){return{name:jM}},[nT]:function(){return{key:nT,name(){return this.getTranslatedPhrase(Th)},disabled:!0,isCommand:!1}},[tT]:function(){return{key:tT,name(){return this.getTranslatedPhrase(_h)},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}}},[eT]:function(){return{key:eT,name(){return this.getTranslatedPhrase(Hh)},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}}},[qM]:function(){return{key:qM,name(){return this.getTranslatedPhrase(Ih)},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}}},[KM]:function(){return{key:KM,name(){return this.getTranslatedPhrase(Ah)},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}}},[GM]:function(){return{key:GM,name(){return this.getTranslatedPhrase(Lh)},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}}},[JM]:function(){return{key:JM,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(Oh,e)},callback(){this.alter("remove_row",function(t){const e=zu(t.getSelected());if(0===e||1===e)return[];const n=$u(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),s=Math.max(e.row,0),r=i.row-s+1;x(Array.from(new Array(r),(t,e)=>s+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}}},[QM]:function(){return{key:QM,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(Dh,e)},callback(){this.alter("remove_col",function(t){const e=zu(t.getSelected());if(0===e||1===e)return[];const n=$u(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),s=Math.max(e.col,0),r=i.col-s+1;x(Array.from(new Array(r),(t,e)=>s+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}}},[oT]:function(){return{key:oT,name(){return this.getTranslatedPhrase(Nh)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[ZM]:function(){return{key:ZM,name(){return this.getTranslatedPhrase(Ph)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[XM]:function(){return{key:XM,checkable:!0,ariaChecked(){return $M(this.getSelectedRange(),(t,e)=>this.getCellMeta(t,e).readOnly)},ariaLabel(){return this.getTranslatedPhrase(Wh)},name(){let t=this.getTranslatedPhrase(Wh);return $M(this.getSelectedRange(),(t,e)=>this.getCellMeta(t,e).readOnly)&&(t=zM(t)),t},callback(){const t=this.getSelectedRange(),e=$M(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))))}}},[YM]:function(){return{key:YM,name(){return this.getTranslatedPhrase(ec)},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:`${YM}:left`,name(){return this.getTranslatedPhrase(nc)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htLeft";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${YM}:center`,name(){return this.getTranslatedPhrase(oc)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htCenter";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${YM}:right`,name(){return this.getTranslatedPhrase(ic)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htRight";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${YM}:justify`,name(){return this.getTranslatedPhrase(sc)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="horizontal",o="htJustify";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{name:jM},{key:`${YM}:top`,name(){return this.getTranslatedPhrase(rc)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htTop";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${YM}:middle`,name(){return this.getTranslatedPhrase(ac)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htMiddle";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1},{key:`${YM}:bottom`,name(){return this.getTranslatedPhrase(lc)},callback(){const t=this.getSelectedRange(),e=VM(t,(t,e)=>this.getCellMeta(t,e).className),n="vertical",o="htBottom";this.runHooks("beforeCellAlignment",e,t,n,o),FM(t,n,o,(t,e)=>this.getCellMeta(t,e),(t,e,n,o)=>this.setCellMeta(t,e,n,o)),this.render()},disabled:!1}]}}}};function rT(){const t={};return Tt(sT,(e,n)=>{t[n]=e()}),t}function aT(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function lT(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function hT(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,lT(t,e,"get"))}function cT(t,e,n){aT(t,e),e.set(t,n)}function dT(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,lT(t,e,"set"),n),n}function uT(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function gT(t,e){aT(t,e),e.add(t)}const pT="comments",fT="comment",mT="value",wT="style",bT="readOnly",vT=pT,CT=`plugin:${pT}`;var yT=new WeakMap,ST=new WeakMap,kT=new WeakMap,RT=new WeakMap,xT=new WeakMap,ET=new WeakMap,MT=new WeakMap,TT=new WeakSet,_T=new WeakSet,HT=new WeakSet,IT=new WeakSet,AT=new WeakSet,OT=new WeakSet,DT=new WeakSet,NT=new WeakSet,PT=new WeakSet,WT=new WeakSet,LT=new WeakSet,BT=new WeakSet;class VT extends Qk{static get PLUGIN_KEY(){return pT}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[pT]}enablePlugin(){this.enabled||(hT(this,yT)||(dT(this,yT,new LM(this.hot.rootDocument,this.hot.isRtl(),this.hot.rootPortalElement)),hT(this,yT).addLocalHook("resize",(...t)=>uT(this,PT,KT).call(this,...t)),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.hide()})),hT(this,ST)||dT(this,ST,new BM(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",t=>this.addToContextMenu(t)),this.addHook("afterRenderer",(t,e,n,o,i,s)=>uT(this,AT,jT).call(this,t,s)),this.addHook("afterScroll",()=>uT(this,LT,ZT).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",t=>uT(this,WT,XT).call(this,t)),this.addHook("beforeCompositionStart",t=>uT(this,WT,XT).call(this,t)),hT(this,ST).addLocalHook("hide",()=>this.hide()),hT(this,ST).addLocalHook("show",(t,e)=>this.showAtCell(t,e)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){hT(this,ST).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=this.hot.getShortcutManager(),e=t.getContext("grid"),n=t.addContext(CT);e.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const e=this.hot.getSelectedRangeActive();dT(this,RT,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(e),this.show(),this.focusEditor(),t.setActiveContextName(CT),this.hot._registerTimeout(()=>{dT(this,RT,!1)})})},stopPropagation:!0,runOnlyIf:()=>this.hot.getSelectedRangeActive()?.highlight.isCell(),group:vT}),n.addShortcut({keys:[["Escape"]],callback:()=>{hT(this,yT).setValue(hT(this,MT)),this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>hT(this,yT).isVisible()&&hT(this,yT).isFocused(),group:vT}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>hT(this,yT).isVisible()&&hT(this,yT).isFocused(),group:vT}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:t.getContext("grid"),callback:()=>{dT(this,xT,!0),hT(this,yT).setValue(hT(this,yT).getValue()),this.setComment(),this.hide(),t.setActiveContextName("grid")},group:vT})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(vT)}registerListeners(){const{rootDocument:t}=this.hot,e=this.getEditorInputElement();this.eventManager.addEventListener(t,"mouseover",t=>uT(this,HT,$T).call(this,t)),this.eventManager.addEventListener(t,"mousedown",t=>uT(this,TT,FT).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>uT(this,IT,UT).call(this)),this.eventManager.addEventListener(e,"focus",()=>uT(this,DT,GT).call(this)),this.eventManager.addEventListener(e,"blur",()=>uT(this,OT,YT).call(this)),this.eventManager.addEventListener(e,"keydown",t=>uT(this,NT,qT).call(this,t)),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",t=>uT(this,_T,zT).call(this,t))}setRange(t){this.range=t}clearRange(){this.range={}}targetIsCellWithComment(t){const e=ie(t.target,"TD","TBODY");return!!(e&&de(e,"htCommentCell")&&ie(e,[this.hot.rootElement]))}targetIsCommentTextArea(t){return this.getEditorInputElement()===t.target}setComment(t){this.range.from||bt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const e=hT(this,yT).getValue();let n="";null!=t?n=t:null!=e&&(n=e);const{row:o,col:i}=uT(this,BT,QT).call(this);this.updateCommentMeta(o,i,{[mT]:n}),this.hot.render()}setCommentAtCell(t,e,n){this.setRange({from:this.hot._createCellCoords(t,e)}),this.setComment(n)}removeComment(t=!0){this.range.from||bt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:e,col:n}=uT(this,BT,QT).call(this);this.hot.setCellMeta(e,n,fT),t&&this.hot.render(),this.hide()}removeCommentAtCell(t,e,n=!0){this.setRange({from:this.hot._createCellCoords(t,e)}),this.removeComment(n)}getComment(){const{row:t,col:e}=uT(this,BT,QT).call(this);return this.getCommentMeta(t,e,mT)}getCommentAtCell(t,e){return this.getCommentMeta(t,e,mT)}show(){this.range.from||bt('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:t,col:e}=uT(this,BT,QT).call(this);if(t<0||t>this.hot.countSourceRows()-1||e<0||e>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(t,e);return hT(this,ST).cancelHiding(),hT(this,yT).setValue((n[fT]?n[fT][mT]:null)??""),hT(this,yT).show(),this.refreshEditor(!0),!0}showAtCell(t,e){return this.setRange({from:this.hot._createCellCoords(t,e)}),this.show()}hide(){hT(this,yT).hide()}refreshEditor(t=!1){if(!(t||this.range.from&&hT(this,yT).isVisible()))return;const{rowIndexMapper:e,columnIndexMapper:n}=this.hot,{row:o,col:i}=uT(this,BT,QT).call(this);let s=e.getRenderableFromVisualIndex(o),r=n.getRenderableFromVisualIndex(i);const a=null===s;hT(this,yT).setPosition(0,0),null===s&&(s=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(o,-1))),null===r&&(r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,-1)));const l=null===s,h=null===r;s=s??0,r=r??0;const{rootWindow:c,view:{_wt:d}}=this.hot,{wtTable:u}=d,g=d.getCell({row:s,col:r},!0),p=this.hot.getCellMeta(o,i).colspan??1,f=this.getCommentMeta(o,i,wT);f?hT(this,yT).setSize(f.width,f.height):hT(this,yT).resetSize();const m=h?0:function(t,e,n){return t>1?Ae(e):n}(p,g,u.getColumnWidth(r)),w=a&&!l?Oe(g):0,{left:b,top:v,width:C,height:y}=g.getBoundingClientRect(),{width:S,height:k}=hT(this,yT).getSize(),{innerWidth:R,innerHeight:x}=this.hot.rootWindow,E=this.hot.rootDocument.documentElement,M=Ve(this.hot.rootDocument),T=Fe(this.hot.rootWindow)?M:0,_=ze(this.hot.rootWindow)?M:0,H=p>1?1:0;let I=b+c.scrollX+m-H,A=v+c.scrollY+w;this.hot.isRtl()&&(I-=S+m),this.hot.isLtr()&&b+C+S>R-T?I=b+c.scrollX-S-1:this.hot.isRtl()&&I<-(E.scrollWidth-E.clientWidth)&&(I=b+c.scrollX+m+1),v+k>x-_&&(A-=k-y+1),hT(this,yT).setPosition(I,A),hT(this,yT).setReadOnlyState(this.getCommentMeta(o,i,bT)),hT(this,yT).observeSize()}focusEditor(){hT(this,yT).focus()}updateCommentMeta(t,e,n){const o=this.hot.getCellMeta(t,e)[fT];let i;o?(i=St(o),yt(i,n)):i=n,this.hot.setCellMeta(t,e,fT,i)}getCommentMeta(t,e,n){const o=this.hot.getCellMeta(t,e);if(o[fT])return o[fT][n]}addToContextMenu(t){var e;t.items.push({name:jM},(e=this,{key:"commentsAddEdit",name(){const t=this.getSelectedRangeActive()?.highlight;return t?.isCell()&&e.getCommentAtCell(t.row,t.col)?this.getTranslatedPhrase(Qh):this.getTranslatedPhrase(Zh)},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(Jh)},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(tc);return $M(this.getSelectedRange(),(e,n)=>t.getCommentMeta(e,n,bT))?zM(e):e},callback(){this.getSelectedRangeActive().forAll((e,n)=>{if(e>=0&&n>=0){const o=!!t.getCommentMeta(e,n,bT);t.updateCommentMeta(e,n,{[bT]:!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 hT(this,yT).getInputElement()}destroy(){hT(this,yT)?.destroy(),hT(this,ST)?.destroy(),super.destroy()}constructor(...t){super(...t),gT(this,TT),gT(this,_T),gT(this,HT),gT(this,IT),gT(this,AT),gT(this,OT),gT(this,DT),gT(this,NT),gT(this,PT),gT(this,WT),gT(this,LT),gT(this,BT),cT(this,yT,{writable:!0,value:void 0}),cT(this,ST,{writable:!0,value:void 0}),cT(this,kT,{writable:!0,value:void 0}),cT(this,RT,{writable:!0,value:void 0}),cT(this,xT,{writable:!0,value:void 0}),cT(this,ET,{writable:!0,value:void 0}),cT(this,MT,{writable:!0,value:void 0}),this.range={},dT(this,yT,null),dT(this,ST,null),dT(this,kT,!1),dT(this,RT,!1),dT(this,xT,!1),dT(this,ET,null),dT(this,MT,"")}}function FT(t){if(this.hot.view&&this.hot.view._wt&&!hT(this,kT)&&!this.targetIsCommentTextArea(t)){const e=ie(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 zT(t){t.stopPropagation()}function $T(t){const{rootDocument:e}=this.hot;if(!(hT(this,kT)||hT(this,yT).isFocused()||de(t.target,"wtBorder")||hT(this,ET)===t.target)&&hT(this,yT))if(dT(this,ET,e.elementFromPoint(t.clientX,t.clientY)),this.targetIsCellWithComment(t)){const e=this.hot._createCellRange(this.hot.getCoords(t.target));hT(this,ST).show(e)}else re(t.target,e)&&!this.targetIsCommentTextArea(t)&&hT(this,ST).hide()}function UT(){dT(this,kT,!1)}function jT(t,e){e[fT]&&e[fT][mT]&&ue(t,e.commentedCellClassName)}function YT(){hT(this,xT)?dT(this,xT,!1):(dT(this,MT,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment())}function GT(){dT(this,MT,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(CT)}function qT(t){hT(this,yT).isVisible()&&(this.hot.getShortcutManager().hasEventShortcut(CT,t)||t.stopPropagation())}function KT(t,e){const{row:n,col:o}=uT(this,BT,QT).call(this);this.updateCommentMeta(n,o,{[wT]:{width:t,height:e}})}function XT(t){hT(this,yT).isFocused()&&an(t)}function ZT(){hT(this,RT)||this.hide()}function QT(){return this.range instanceof ci?this.range.highlight:this.hot._createCellCoords(this.range.from.row,this.range.from.col)}class JT{registerCommand(t,e){this.commands[t]=e}setCommonCallback(t){this.commonCallback=t}execute(t,...e){const n=t.split(":"),o=n[0],i=2===n.length?n[1]:null;let s=this.commands[o];if(s||bt(`Menu command '${o}' not exists.`),i&&s.submenu&&(s=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}(i,s.submenu.items)),!0===s.disabled)return;if("function"==typeof s.disabled&&!0===s.disabled.call(this.hot))return;if(Ot(s,"submenu"))return;const r=[];"function"==typeof s.callback&&r.push(s.callback),"function"==typeof this.commonCallback&&r.push(this.commonCallback),e.unshift(n.join(":")),x(r,t=>t.apply(this.hot,e))}constructor(t){this.commands={},this.commonCallback=null,this.hot=t}}class t_{setPredefinedItems(t){const e={};this.defaultOrderPattern.length=0,Tt(t,(t,n)=>{let o="";t.name===jM?(e[jM]=t,o=jM):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(t=null){return function(t=null,e=[],n={}){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)?Ct(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&&iT.indexOf(t)>=0||(i||(i={name:t,key:`${e}`}),Et(t)&&Ct(i,t),void 0===i.key&&(i.key=e),o.push(i))});return o}(t,this.defaultOrderPattern,this.predefinedItems)}constructor(t,e=null){this.predefinedItems=rT(),this.hot=t,this.defaultOrderPattern=e}}class e_{getSourceType(t){let e="literal";return t instanceof Event&&(e="event"),e}fitsAbove(t){return this.topRelative>=t.offsetHeight}fitsBelow(t,e=this.rootWindow.innerHeight){return this.topRelative+t.offsetHeight<=e}fitsOnRight(t,e=this.rootWindow.document.documentElement.clientWidth){return this.leftRelative+this.cellWidth+t.offsetWidth<=e}fitsOnLeft(t){return this.leftRelative>=t.offsetWidth}constructor(t,e){const n=e.scrollY,o=e.scrollX;let i,s,r,a,l,h;this.rootWindow=e,this.type=this.getSourceType(t),"literal"===this.type?(i=parseInt(t.top,10),r=parseInt(t.left,10),l=t.height||0,h=t.width||0,s=i,a=r,i+=n,r+=o):"event"===this.type&&(i=parseInt(t.pageY,10),r=parseInt(t.pageX,10),l=t.target.clientHeight,h=t.target.clientWidth,s=i-n,a=r-o),this.top=i,this.topRelative=s,this.left=r,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=o,this.cellHeight=l,this.cellWidth=h}}function n_(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function o_(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,n_(t,e,"get"))}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 s_(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,n_(t,e,"set"),n),n}var r_=new WeakMap,a_=new WeakMap,l_=new WeakMap,h_=new WeakMap,c_=new WeakMap;class d_{setOffset(t,e=0){return o_(this,c_)[t]=e,this}setElement(t){return s_(this,r_,t),this}setParentElement(t){return s_(this,a_,t),this}updatePosition(t){s_(this,l_,new e_(t,o_(this,r_).ownerDocument.defaultView)),o_(this,h_)?(o_(this,l_).fitsBelow(o_(this,r_))?this.setPositionBelowCursor():o_(this,l_).fitsAbove(o_(this,r_))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===o_(this,r_).dir?o_(this,l_).fitsOnLeft(o_(this,r_))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():o_(this,l_).fitsOnRight(o_(this,r_))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let t=o_(this,c_).above+o_(this,l_).top-o_(this,r_).offsetHeight;if(o_(this,a_)){const e=o_(this,a_).ownerDocument.defaultView.getComputedStyle(o_(this,a_).querySelector(".ht_master")),n=Number.parseInt(e.paddingTop,10),o=Number.parseInt(e.borderTop,10);t=o_(this,l_).top+o_(this,l_).cellHeight-o_(this,r_).scrollHeight+n+o}o_(this,r_).style.top=`${t}px`}setPositionBelowCursor(){let t=o_(this,c_).below+o_(this,l_).top+1;if(o_(this,a_)){const e=o_(this,a_).ownerDocument.defaultView.getComputedStyle(o_(this,a_).querySelector(".ht_master")),n=Number.parseInt(e.paddingTop,10),o=Number.parseInt(e.borderTop,10);t=o_(this,l_).top-n-o}o_(this,r_).style.top=`${t}px`}setPositionOnRightOfCursor(){let t=o_(this,l_).left;if(o_(this,a_)){const e=o_(this,a_).ownerDocument.defaultView,n=Number.parseInt(e.getComputedStyle(o_(this,a_).querySelector(".htCore")).borderRightWidth,10);t+=o_(this,l_).cellWidth+n}else t+=o_(this,c_).right;o_(this,r_).style.left=`${t}px`}setPositionOnLeftOfCursor(){let t=o_(this,c_).left+o_(this,l_).left-o_(this,r_).offsetWidth;if(o_(this,a_)){const e=o_(this,a_).ownerDocument.defaultView;t-=Number.parseInt(e.getComputedStyle(o_(this,a_).querySelector(".htCore")).borderLeftWidth,10)}o_(this,r_).style.left=`${t}px`}constructor(t){i_(this,r_,{writable:!0,value:void 0}),i_(this,a_,{writable:!0,value:void 0}),i_(this,l_,{writable:!0,value:void 0}),i_(this,h_,{writable:!0,value:void 0}),i_(this,c_,{writable:!0,value:void 0}),s_(this,h_,!1),s_(this,c_,{above:0,below:0,left:0,right:0}),s_(this,h_,t)}}function u_({initialPage:t=-1,size:e=()=>0,onItemSelect:n=()=>{},onClear:o=()=>{}}){const i=new Set;let s=co(t,-1,a()-1);function r(t,e){const o=a()-1;if(t<0&&(t=o),t>o&&(t=0),i.has(t))return-1;i.add(t);return!1===n(t,!1)&&(t=r(1===e?++t:--t,e)),t}function a(){return Math.max(e(),0)}return{setCurrentPage:function(t){t>-1&&t<a()&&!1!==n(t,!0)&&(s=t)},setPageCursorAt:function(t){t>-1&&t<a()&&(s=t)},getCurrentPage:function(){return s},toFirstItem:function(){a()>0&&(i.clear(),s=r(0,1))},toLastItem:function(){a()>0&&(i.clear(),s=r(a()-1,-1))},toNextItem:function(){a()>0&&(i.clear(),s=r(++s,1))},toPreviousItem:function(){a()>0&&(i.clear(),s=r(--s,-1))},getSize:a,clear:function(){i.clear(),s=t,o()}}}function g_(t){return Ot(t,"submenu")}function p_(t){return new RegExp(jM,"i").test(t.name)}function f_(t,e){return!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(e)}function m_(t){return Ot(t,"disableSelection")}function w_(t,e){const n=t.slice(0);for(let t=0;t<n.length&&n[t].name===e;)n.shift();return n}function b_(t,e=jM){let n=t.slice(0);return n=w_(n,e),n=function(t,e){let n=t.slice(0);return n.reverse(),n=w_(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 v_(t){return u_({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 C_="menu",y_=C_;function S_(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function k_(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,S_(t,e,"get"))}function R_(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 x_(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,S_(t,e,"set"),n),n}var E_=new WeakMap,M_=new WeakMap,T_=new WeakMap;class __{get tableBorderWidth(){return void 0===k_(this,T_)&&this.hotMenu&&x_(this,T_,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),k_(this,T_)}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=oe(t)}setMenuItems(t){this.menuItems=t}getNavigator(){return k_(this,E_)}getKeyboardShortcutsCtrl(){return k_(this,M_)}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=Qe(t=>this.openSubMenu(t),300),e=this.options.minWidth||215;let n=!1,o=k(this.menuItems,t=>(t.key===nT&&(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(rT()[nT]);else if(0===o.length)return;o=b_(o,jM);let i=!1;const s={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:(r=this.hot,(t,e,n,o,i,s,a)=>{const l=t.getSourceDataAtRow(n),h=r.rootDocument.createElement("div"),c="function"==typeof s?s.call(r):s,d="function"==typeof l.ariaLabel?l.ariaLabel.call(r):l.ariaLabel,u="function"==typeof l.ariaChecked?l.ariaChecked.call(r):l.ariaChecked;if(a.readOnlyCellClassName="",we(e),ue(h,"htItemWrapper"),r.getSettings().ariaTags){const t=!f_(l,r)&&!m_(l)&&!p_(l);pe(e,[...(g=l,!0===g.checkable?[["role","menuitemcheckbox"],rt(d),ft(u)]:[["role","menuitem"],rt(c)]),...t?[Q(-1)]:[],...f_(l,r)?[lt()]:[],...g_(l)?[pt(!1)]:[]])}var g;e.className="",e.appendChild(h),p_(l)?ue(e,"htSeparator"):"function"==typeof l.renderer?(ue(e,"htCustomMenuRenderer"),e.appendChild(l.renderer(t,h,n,o,i,c))):ye(h,c,r.getSettings().sanitizer),f_(l,r)?ue(e,"htDisabled"):m_(l)?ue(e,"htSelectionDisabled"):g_(l)&&ue(e,"htSubmenu")})}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),modifyRowHeight:(t,e)=>{const n=this.hotMenu.getSourceDataAtRow(e);return n&&n.name===jM?1:t},beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(t,e)=>{k_(this,E_).setPageCursorAt(e.row)},afterOnCellMouseOver:(e,n)=>{this.isAllSubMenusClosed()?t(n.row):this.openSubMenu(n.row)},afterOnCellContextMenu:t=>{t.preventDefault(),Kt()&&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=>{Kt()&&hn(t)||!i||!this.hasSelectedItem()||(Yt()||qt()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};var r;this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,s),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),x_(this,E_,v_(this.hotMenu)),x_(this,M_,function(t,e=[]){const n=[];function o(t,e){r(e).addShortcuts(t,{group:C_})}function i(t,e){const i=r(e);t.forEach(({keys:t})=>{t.forEach(t=>i.removeShortcutsByKeys(t))}),n.push({shortcuts:t,contextName:e}),o(t,e)}function s(t){return t?`${y_}:${t}`:y_}function r(e){const n=t.hotMenu.getShortcutManager(),o=s(e);return n.getContext(o)??n.addContext(o)}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(),s="function"==typeof i.tabMoves?i.tabMoves(n):i.tabMoves;o.includes("shift")?e.selection.transformStart(-s.row,-s.col):e.selection.transformStart(s.row,s.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(({shortcuts:t,contextName:e})=>{i(t,e)}),{addCustomShortcuts:i,getCustomShortcuts:function(){return[...n]},getContext:r,listen:function(e){t.hotMenu.getShortcutManager().setActiveContextName(s(e))}}}(this)),k_(this,M_).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(t=!1){if(this.isOpened())if(t&&this.isSubMenu())this.parentMenu.close();else if(k_(this,E_).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){pe(this.parentMenu.hotMenu.getCell(t[0],0),[pt(!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 __(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&&pe(e,[pt(!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&&pe(o,[pt(!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 R(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||p_(t)||f_(t,this.hot)||g_(t)}setOffset(t,e=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),s=S(e,(t,e,n)=>{const o=this.hotMenu.getCell(n,0)?Oe(this.hotMenu.getCell(n,0)):0;return t+(e.name===jM?1:o)},0);o.width=`${i}px`,o.height=`${s}px`,n.height=o.height}createContainer(t=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&&pe(this.hotMenu.rootElement,[["role","menu"],Q(-1)])}onDocumentMouseDown(t){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!re(t.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||re(t.target,".htMenu")||this.close(!0))}onDocumentContextMenu(t){this.isOpened()&&de(t.target,"htCore")&&re(t.target,this.hotMenu.rootElement)&&t.preventDefault()}constructor(t,e){R_(this,E_,{writable:!0,value:void 0}),R_(this,M_,{writable:!0,value:void 0}),R_(this,T_,{writable:!0,value:void 0}),this.eventManager=new Fn(this),this.hotMenu=null,this.hotSubMenus={},this.menuItems=null,this.origOutsideClickDeselects=null,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 d_(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(...t)=>this.parentMenu.runLocalHooks("afterSelectionChange",...t)),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()})}}function H_(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function I_(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)}Rt(__,Fs);const A_="contextMenu",O_=A_;Mn.getSingleton().register("afterContextMenuDefaultOptions"),Mn.getSingleton().register("beforeContextMenuShow"),Mn.getSingleton().register("afterContextMenuShow"),Mn.getSingleton().register("afterContextMenuHide"),Mn.getSingleton().register("afterContextMenuExecute");var D_=new WeakSet,N_=new WeakSet,P_=new WeakSet,W_=new WeakSet;class L_ extends Qk{static get PLUGIN_KEY(){return A_}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[tT,eT,jM,qM,KM,jM,JM,QM,jM,oT,ZM,jM,XM,jM,YM]}isEnabled(){return!!this.hot.getSettings()[A_]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[A_];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new __(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootPortalElement}),this.menu.addLocalHook("beforeOpen",()=>H_(this,N_,V_).call(this)),this.menu.addLocalHook("afterOpen",()=>H_(this,P_,F_).call(this)),this.menu.addLocalHook("afterClose",()=>H_(this,W_,z_).call(this)),this.menu.addLocalHook("executeCommand",(...t)=>this.executeCommand.call(this,...t)),this.addHook("afterOnCellContextMenu",t=>H_(this,D_,B_).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=UM(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:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:O_})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(O_)}open(t,e={above:0,below:0,left:0,right:0}){this.menu?.isOpened()||(this.prepareMenuItems(),this.menu.open(),Tt(e,(t,e)=>{this.menu.setOffset(e,t)}),this.menu.setPosition(t))}close(){this.menu?.close(),this.itemsFactory=null}executeCommand(t,...e){null===this.itemsFactory&&this.prepareMenuItems(),this.commandExecutor.execute(t,...e)}prepareMenuItems(){this.itemsFactory=new t_(this.hot,L_.DEFAULT_ITEMS);const t=this.hot.getSettings()[A_],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()}constructor(...t){super(...t),I_(this,D_),I_(this,N_),I_(this,P_),I_(this,W_),this.commandExecutor=new JT(this.hot),this.itemsFactory=null,this.menu=null}}function B_(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 s=UM(this.menu.container,this.hot.rootDocument);this.open({top:t.clientY+s.top,left:t.clientX+s.left})}function V_(){this.hot.runHooks("beforeContextMenuShow",this)}function F_(){this.hot.runHooks("afterContextMenuShow",this)}function z_(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}L_.SEPARATOR={name:jM};class $_{setData(t,e){this.data[t]=e}getData(t){return this.data[t]||void 0}constructor(){this.data={}}}class U_{preventDefault(){}composedPath(){return[]}constructor(){this.clipboardData=new $_}}function j_(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Y_(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function G_(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Y_(t,e,"get"))}function q_(t,e,n){j_(t,e),e.set(t,n)}function K_(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Y_(t,e,"set"),n),n}function X_(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Z_(t,e){j_(t,e),e.add(t)}var Q_=new WeakMap,J_=new WeakMap,tH=new WeakMap,eH=new WeakMap,nH=new WeakMap,oH=new WeakMap,iH=new WeakSet,sH=new WeakSet;class rH{setSelectedRange(t){K_(this,Q_,t)}getCellsRange(){if(0===G_(this,J_).call(this)||0===G_(this,tH).call(this))return null;const{row:t,col:e}=G_(this,Q_).getTopStartCorner(),{row:n,col:o}=G_(this,Q_).getBottomEndCorner(),i=X_(this,sH,lH).call(this,t,n),s=X_(this,iH,aH).call(this,e,o);return{isRangeTrimmed:n!==i||o!==s,startRow:t,startCol:e,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===G_(this,tH).call(this)||0===G_(this,oH).call(this))return null;const{col:t}=G_(this,Q_).getTopStartCorner(),{col:e}=G_(this,Q_).getBottomEndCorner(),n=X_(this,iH,aH).call(this,t,e);return{isRangeTrimmed:e!==n,startRow:-1,startCol:t,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===G_(this,tH).call(this)||0===G_(this,oH).call(this))return null;const{col:t}=G_(this,Q_).getTopStartCorner(),{col:e}=G_(this,Q_).getBottomEndCorner(),n=X_(this,iH,aH).call(this,t,e);return{isRangeTrimmed:e!==n,startRow:-G_(this,oH).call(this),startCol:t,endRow:-1,endCol:n}}constructor({countRows:t,countColumns:e,rowsLimit:n,columnsLimit:o,countColumnHeaders:i}){Z_(this,iH),Z_(this,sH),q_(this,Q_,{writable:!0,value:void 0}),q_(this,J_,{writable:!0,value:void 0}),q_(this,tH,{writable:!0,value:void 0}),q_(this,eH,{writable:!0,value:void 0}),q_(this,nH,{writable:!0,value:void 0}),q_(this,oH,{writable:!0,value:void 0}),K_(this,J_,t),K_(this,tH,e),K_(this,eH,n),K_(this,nH,o),K_(this,oH,i)}}function aH(t,e){return Math.min(e,Math.max(t+G_(this,nH).call(this)-1,t))}function lH(t,e){return Math.min(e,Math.max(t+G_(this,eH).call(this)-1,t))}function hH(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 cH(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dH(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function uH(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dH(t,e,"get"))}function gH(t,e,n){cH(t,e),e.set(t,n)}function pH(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,dH(t,e,"set"),n),n}function fH(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function mH(t,e){cH(t,e),e.add(t)}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 wH="copyPaste",bH=["fragmentSelection"],vH="application/ht-source-data-json-html",CH=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join(""),yH=new WeakSet;var SH=new WeakMap,kH=new WeakMap,RH=new WeakMap,xH=new WeakMap,EH=new WeakMap,MH=new WeakMap,TH=new WeakMap,_H=new WeakMap,HH=new WeakSet,IH=new WeakSet,AH=new WeakSet,OH=new WeakSet,DH=new WeakSet,NH=new WeakSet,PH=new WeakSet,WH=new WeakSet,LH=new WeakSet,BH=new WeakSet,VH=new WeakSet;class FH extends Qk{static get PLUGIN_KEY(){return wH}static get SETTING_KEYS(){return[wH,...bH]}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()[wH]}enablePlugin(){this.enabled||(this.pasteMode=this.getSetting("pasteMode")??this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),pH(this,SH,this.getSetting("copyColumnHeaders")),pH(this,kH,this.getSetting("copyColumnGroupHeaders")),pH(this,RH,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=this.getSetting("uiContainer")??this.uiContainer,this.addHook("afterContextMenuDefaultOptions",t=>fH(this,NH,GH).call(this,t)),this.addHook("afterSelection",(...t)=>fH(this,PH,qH).call(this,...t)),this.addHook("afterSelectionEnd",()=>fH(this,WH,KH).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(...t)=>this.onCopy(...t)),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(...t)=>this.onCut(...t)),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(...t)=>this.onPaste(...t)),jt()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(...t)=>fH(this,LH,XH).call(this,...t)),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(...t)=>fH(this,BH,ZH).call(this,...t)),this.addHook("afterSelection",()=>fH(this,VH,QH).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(t="cells-only"){pH(this,xH,t),pH(this,EH,!0),fH(this,HH,zH).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(){pH(this,MH,!0),fH(this,HH,zH).call(this,"cut")}getRangedCopyableData(t){return sg(this.getRangedData(t))}getRangedData(t,e=!1){const n=[],{rows:o,columns:i}=hH(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(t="",e=t){if(!t&&!e)return;const n=new U_;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=[]);uH(this,TH).setSelectedRange(t);const e=new Map([["headers",null],["cells",null]]);"column-headers-only"===uH(this,xH)?e.set("headers",uH(this,TH).getMostBottomColumnHeadersRange()):("with-column-headers"===uH(this,xH)?e.set("headers",uH(this,TH).getMostBottomColumnHeadersRange()):"with-column-group-headers"===uH(this,xH)&&e.set("headers",uH(this,TH).getAllColumnHeadersRange()),e.set("cells",uH(this,TH).getCellsRange())),this.copyableRanges=Array.from(e.values()).filter(t=>null!==t).map(({startRow:t,startCol:e,endRow:n,endCol:o})=>({startRow:t,startCol:e,endRow:n,endCol:o})),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(){return this.hot.getActiveEditor()?.isOpened()}populateValues({plainData:t,originalPlainData:e,sourceData:n}){if(!t.length)return[null,null,null,null];const o=this.hot.getSelectedRangeActive(),i=t.length,s=t[0].length,r=[],{row:a,col:l}=o.getTopStartCorner(),{row:h,col:c}=o.getBottomEndCorner();let d=a,u=l,g=a,p=l;for(;r.length<i||d<=h;){const{skipRowOnPaste:o,visualRow:a}=this.hot.getCellMeta(d,l);if(d=a+1,!0===o)continue;g=a,u=l;const h=[],f=r.length%i;for(;h.length<s||u<=c;){const{skipColumnOnPaste:o,visualCol:i,parsePastedValue:r}=this.hot.getCellMeta(a,u),l=h.length%s;if(u=i+1,!0===o)continue;p=i;const c=n?.[f]?.[l],d=e?.[f]?.[l];let g=t[f][l];if(r&&n&&Y(c)&&g===d){g=JSON.parse(c)}h.push(g)}r.push(h)}return pH(this,_H,!0),this.hot.populateFromArray(a,l,r,void 0,void 0,"CopyPaste.paste",this.pasteMode),[a,l,g,p]}onCopy(t){const e=t.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=e?.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!uH(this,EH)||this.isEditorOpened()||Xe(e)&&(o&&e!==n||!o&&e!==this.hot.rootDocument.body&&!ne(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),pH(this,EH,!1);const i=this.getRangedData(this.copyableRanges),s=this.getRangedData(this.copyableRanges,!0),r=fH(this,IH,$H).call(this,this.copyableRanges);!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,r)&&(fH(this,DH,YH).call(this,t,i,s),this.hot.runHooks("afterCopy",i,this.copyableRanges,r)),pH(this,xH,"cells-only")}onCut(t){const e=t.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),o=e?.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!uH(this,MH)||this.isEditorOpened()||Xe(e)&&(o&&e!==n||!o&&e!==this.hot.rootDocument.body&&!ne(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),pH(this,MH,!1);const i=this.getRangedData(this.copyableRanges),s=this.getRangedData(this.copyableRanges,!0);!!this.hot.runHooks("beforeCut",i,this.copyableRanges)&&(fH(this,DH,YH).call(this,t,i,s),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=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&&!ne(e,this.hot.rootElement)))return;let i,s;if(t.preventDefault(),t&&void 0!==t.clipboardData){const e=t.clipboardData.getData(vH);if(e){s=io(e,this.hot.rootDocument).data}const n=t.clipboardData.getData("text/html"),{sanitizer:o}=this.hot.getSettings();let r=n;if("function"==typeof o?r=o(n,"CopyPaste.paste"):(yH.has(this.hot)||(yH.add(this.hot),Jt("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")),r=X(n,{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0})),r&&/(<table)|(<TABLE)/g.test(r)){i=io(r,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(ig))t=t.replace(ig,""),o+=1,e[i][o]="";else if(t.match(ng))t=t.replace(ng,""),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(og);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 r=St(i);if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[a,l,h,c]=this.populateValues({plainData:i,sourceData:s,originalPlainData:r});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()}constructor(...t){super(...t),mH(this,HH),mH(this,IH),mH(this,AH),mH(this,OH),mH(this,DH),mH(this,NH),mH(this,PH),mH(this,WH),mH(this,LH),mH(this,BH),mH(this,VH),gH(this,SH,{writable:!0,value:void 0}),gH(this,kH,{writable:!0,value:void 0}),gH(this,RH,{writable:!0,value:void 0}),gH(this,xH,{writable:!0,value:void 0}),gH(this,EH,{writable:!0,value:void 0}),gH(this,MH,{writable:!0,value:void 0}),gH(this,TH,{writable:!0,value:void 0}),gH(this,_H,{writable:!0,value:void 0}),this.columnsLimit=1/0,this.rowsLimit=1/0,this.pasteMode="overwrite",this.uiContainer=this.hot.rootDocument.body,pH(this,SH,!1),pH(this,kH,!1),pH(this,RH,!1),pH(this,xH,"cells-only"),pH(this,EH,!1),pH(this,MH,!1),pH(this,TH,new rH({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),pH(this,_H,!1),this.copyableRanges=[]}}function zH(t){if(jt()){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,n=!0){qe(t,n),e(),Ke(t,n)}(i,()=>{this.hot.rootDocument.execCommand(t)})}}else this.hot.rootDocument.execCommand(t)}function $H(t){const{rows:e}=hH(t);let n=0;for(let t=0;t<e.length&&!(e[t]>=0);t++)n+=1;return{columnHeadersCount:n}}function UH(){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&&qe(o)}}}function jH(){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?.hasAttribute("contenteditable")&&Ke(o)}}}function YH(t,e,n){const o=sg(e);if(t&&t.clipboardData){const i=Jn(e),s=Jn(n);t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",[CH,i].join("")),t.clipboardData.setData(vH,[CH,s].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",o)}function GH(t){var e;t.items.push({name:"---------"},(e=this,{key:"copy",name(){return this.getTranslatedPhrase(Bh)},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})),uH(this,SH)&&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(Vh,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)),uH(this,kH)&&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(Fh,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)),uH(this,RH)&&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(zh,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($h)},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 qH(t,e,n,o,i){uH(this,_H)&&(i.value=!0),pH(this,_H,!1)}function KH(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function XH(){fH(this,OH,jH).call(this)}function ZH(){fH(this,AH,UH).call(this)}function QH(){fH(this,OH,jH).call(this)}function JH(t,e){return`border_row${t}col${e}`}function tI(t){return(I(t.start)||I(t.left))&&(t.start=t.start??t.left),(I(t.end)||I(t.right))&&(t.end=t.end??t.right),delete t.left,delete t.right,t}function eI(t){return I(t.start)&&(t.left=t.start),I(t.end)&&(t.right=t.end),t}function nI(t,e){return{id:JH(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 oI(t,e){let n=!1;return x(t.getSelectedRange(),o=>{o.forAll((o,i)=>{if(o<0||i<0)return;const s=t.getCellMeta(o,i).borders;if(s){if(!e)return n=!0,!1;if(!Ot(s[e],"hide")||!1===s[e].hide)return n=!0,!1}})}),n}function iI(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}const sI=new Map([["left","start"],["right","end"]]);function rI(t){return{key:"borders:bottom",name(){let t=this.getTranslatedPhrase(uc);return oI(this,"bottom")&&(t=iI(t)),t},callback(e,n){const o=oI(this,"bottom");t.prepareBorder(n,"bottom",o)}}}function aI(t){const e=t.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let t=this.getTranslatedPhrase(gc);return oI(this,e)&&(t=iI(t)),t},callback(n,o){const i=oI(this,e);t.prepareBorder(o,e,i)}}}function lI(t){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(pc)},callback(e,n){t.prepareBorder(n,"noBorders")},disabled(){return!oI(this)}}}function hI(t){const e=t.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let t=this.getTranslatedPhrase(dc);return oI(this,e)&&(t=iI(t)),t},callback(n,o){const i=oI(this,e);t.prepareBorder(o,e,i)}}}function cI(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function dI(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)}const uI="customBorders",gI=["dashed","dotted","solid"];var pI=new WeakSet,fI=new WeakSet,mI=new WeakSet;class wI extends Qk{static get PLUGIN_KEY(){return uI}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[uI]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>cI(this,fI,vI).call(this,t)),this.addHook("init",()=>cI(this,mI,CI).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=tI(e));const i=$u(zu(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;this.prepareBorderFromCustomAdded(t,e,o,(i=n,sI.get(i)??i))})})}),this.hot.view.render()}getBorders(t){if(!Array.isArray(t))return this.savedBorders;const e=$u(zu(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(eI(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(),s=this.hot.countCols();if(t>=i||e>=s)return;let r=nI(t,e);var a,l;n&&(a=r,Ot(l=n,"border")&&l.border&&(a.border=l.border),Ot(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)),Ot(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)),Ot(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)),Ot(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)),r=a,x(this.hot.selection.highlight.customSelections,t=>{if(r.id===t.settings.id)return Object.assign(t.settings,n),r.id=t.settings.id,r.top=t.settings.top,r.bottom=t.settings.bottom,r.start=t.settings.start,r.end=t.settings.end,!1})),this.hot.setCellMeta(t,e,"borders",eI(r)),this.insertBorderIntoSettings(r,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=nI(n,o);let s=0;n===t.from.row&&Ot(e,"top")&&(s+=1,i.top=e.top),n===t.to.row&&Ot(e,"bottom")&&(s+=1,i.bottom=e.bottom),o===t.from.col&&Ot(e,"start")&&(s+=1,i.start=e.start),o===t.to.col&&Ot(e,"end")&&(s+=1,i.end=e.end),s>0&&(this.hot.setCellMeta(n,o,"borders",eI(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(t,e){const n=JH(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?tI(i):nI(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",eI(i))}}else{i[n]={width:1,color:"#000"};this.checkCustomSelectionsFromContextMenu(i,n,o)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(t,e,"borders",eI(i))}}prepareBorder(t,e,n){x(t,({start:t,end:o})=>{if(t.row===o.row&&t.col===o.col)"noBorders"===e?this.removeAllBorders(t.row,t.col):this.setBorder(t.row,t.col,e,n);else switch(e){case"noBorders":ao(t.col,o.col,e=>{ao(t.row,o.row,t=>{this.removeAllBorders(t,e)})});break;case"top":ao(t.col,o.col,o=>{this.setBorder(t.row,o,e,n)});break;case"bottom":ao(t.col,o.col,t=>{this.setBorder(o.row,t,e,n)});break;case"start":ao(t.row,o.row,o=>{this.setBorder(o,t.col,e,n)});break;case"end":ao(t.row,o.row,t=>{this.setBorder(t,o.col,e,n)})}})}createCustomBorders(t){x(t,t=>{const e=tI(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=R(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=R(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()[uI];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&&bt('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".'),this.hot.isRtl()&&e&&bt('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".'),cI(this,pI,bI).call(this,t)}destroy(){super.destroy()}constructor(...t){super(...t),dI(this,pI),dI(this,fI),dI(this,mI),this.savedBorders=[]}}function bI(t){t.forEach(t=>{Object.keys(t).forEach(e=>{const n=t[e].style;I(n)&&!gI.includes(n)?(Qt(`The "${n}" border style is not supported. Please use one of the following styles: ${gI.join(", ")}.\nThe border style will be ignored.`),delete t[e].style):I(n)&&"solid"===n&&delete t[e].style})})}function vI(t){var e;this.hot.getSettings()[uI]&&t.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(hc)},disabled(){const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(e=this,{key:"borders:top",name(){let t=this.getTranslatedPhrase(cc);return oI(this,"top")&&(t=iI(t)),t},callback(t,n){const o=oI(this,"top");e.prepareBorder(n,"top",o)}}),hI(this),rI(this),aI(this),lI(this)]}})}function CI(){this.changeBorderSettings()}const yI="dataProvider",SI={rowId:void 0,fetchRows:void 0,onRowsCreate:void 0,onRowsUpdate:void 0,onRowsRemove:void 0},kI={rowId:t=>"string"==typeof t||Ze(t),fetchRows:t=>Ze(t),onRowsCreate:t=>Ze(t),onRowsUpdate:t=>Ze(t),onRowsRemove:t=>Ze(t)},RI=Object.freeze({page:1,pageSize:10,sort:null,filters:null}),xI=new Set(["edit",void 0,"CopyPaste.paste","CopyPaste.cut","Autofill.fill","ContextMenu.clearColumn","DataProvider.revert"]),EI="DataProvider: cannot send row update because `rowId` resolves to null or undefined for that row.";function MI(t){return`DataProvider: cannot remove row at visual index ${t} because \`rowId\` resolves to null or undefined.`}function TI(t,e,n){if(!1===t.runHooks("beforeRowsMutation",e,n))return!1}function _I(t,e,n){t.runHooks("afterRowsMutation",e,n)}function HI(t,e,n,o){t.runHooks("afterRowsMutationError",e,n,o)}function II(t,e,n){return function(t,e){if(null!=e)return Ze(e)?e(t):"string"==typeof e?_t(t,e):void 0}(t.getSourceDataAtRow(t.toPhysicalRow(n)),e)}function AI(t){return null==t}function OI(t,e,n){for(let o=0;o<t.countRows();o+=1)if(II(t,e,o)===n)return o;return-1}function DI(t,e,n){const o=Object.entries(n);return 0===o.length?Promise.resolve(!0):new Promise(n=>{let i=o.length,s=!0;const r=()=>{i-=1,0===i&&n(s)};o.forEach(([n,o])=>{const i=t.propToCol(n);if(void 0===i||i<0)return void r();const a=t.getCellMeta(e,i);t.getCellValidator(a)?t.validateCell(o,a,t=>{!1===t&&!1===a.allowInvalid&&(s=!1),r()},"DataProvider.updateRows"):r()})})}async function NI(t,e,n){const{getRowIdOption:o,commitRowsUpdate:i}=e,s=new Map;n.forEach(t=>{const e=t[0];s.has(e)||s.set(e,[]),s.get(e).push(t)});const r=[...s.keys()].sort((t,e)=>t-e),a=o(),l=r.map(e=>{const{changesObj:n,rowData:o}=function(t,e){const n=e[0][0],o=t.getSourceDataAtRow(t.toPhysicalRow(n)),i=o&&"object"==typeof o&&!Array.isArray(o),s={};let r;return e.forEach(([,e,,n])=>{const o="number"==typeof e?e:t.propToCol(e),r=i?t.colToProp(o):o;s[r]=n}),Array.isArray(o)?(r=[...o],e.forEach(([,e,,n])=>{const o="number"==typeof e?e:t.propToCol(e);r[o]=n})):r=i?{...o,...s}:{...s},{changesObj:s,rowData:r}}(t,s.get(e));return{id:II(t,a,e),changes:n,rowData:o}}),h={rows:l},c=()=>function(t,e){e?.length&&t.batch(()=>{e.forEach(([e,n,o])=>{t.setDataAtRowProp(e,n,o,"DataProvider.revert")})})}(t,n);if(l.some(t=>AI(t.id)))return c(),HI(t,"update",new Error(EI),h),te("Row update failed:",EI),void t.render();if(!1===TI(t,"update",h))return void c();if((await Promise.all(r.map((e,n)=>DI(t,e,l[n].changes)))).some(t=>!t))return c(),HI(t,"update",new Error("Row update validation failed"),h),te("Row update failed: validation failed for one or more cells"),void t.render();await i(l,{revertOptimistic:c})}function PI(t,e,n){const{hot:o,getOnRowsRemove:i,getRowIdOption:s,removeRows:r}=t;if(!Ze(i()))return;const a=function(t,e,n,o){const i=[],s=()=>t.countRows(),r=(n,o)=>{for(let r=0;r<o;r+=1){const o=n+r;if(o>=0&&o<s()){const n=II(t,e,o);AI(n)&&bt(MI(o)),i.push(n)}}};if(Array.isArray(n))n.forEach(([t,e])=>{const n=null==t?Math.max(0,s()-(e??1)):Math.max(0,t);r(n,e??1)});else{const t="number"==typeof o&&o>=1?o:1,e=null==n?Math.max(0,s()-t):Math.max(0,n);r(e,t)}return i}(o,s(),e,n);return 0!==a.length?(r(a),!1):void 0}function WI(t,e,n,o){return"insert_row_above"===e||"insert_row_below"===e?function(t,e,n,o){const{hot:i,getOnRowsCreate:s,getRowId:r,createRows:a}=t;if(!Ze(s()))return;const l=i.countSourceRows();if(i.getSettings().maxRows===l)return;const h="insert_row_below"===e?"below":"above",c=n??("below"===h?l:0);return a({position:h,referenceRowId:c>=0?r(c):void 0,rowsAmount:"number"==typeof o&&o>=1?o:1}),!1}(t,e,n,o):"remove_row"===e?PI(t,n,o):void 0}function LI(t,e){if(!Array.isArray(e)||0===e.length)return null;const n=[];for(let o=0;o<e.length;o++){const i=e[o],s=t.toVisualColumn(i.column),r=t.colToProp(s);null!=r&&n.push({prop:String(r),operation:i.operation,conditions:i.conditions.map(t=>({name:t.name,args:Array.isArray(t.args)?[...t.args]:[]}))})}return 0===n.length?null:n}const BI="pagination";function VI(t,e,n){const{hot:o,getQueryPage:i,getQueryPageSize:s,setPageSize:r}=t,a=o.getPlugin(BI);if(!a?.enabled)return;const l=function(t,e){return"auto"===t||"number"!=typeof t||!Number.isFinite(t)||t<1?e:t}(n,10);l===s()&&1===i()||r(l).catch(()=>{const t=o.getPlugin(BI);t?.enabled&&t.revertPageSizeTo(e)})}const FI="columnSorting";function zI(t,e){!function(t,e,n){if(!t?.enabled||"function"!=typeof n)return;const o=t.getSortConfig(),i=Array.isArray(o)&&o.length>0?o[0]:o;i&&"object"==typeof i&&"number"==typeof i.column?e.sort={prop:n(i.column),order:i.sortOrder}:e.sort=null}(t.getPlugin(FI),e,e=>t.colToProp(e))}function $I(t,e){if("string"==typeof e){const n=e.trim();n&&t.push(n)}}function UI(t,e){t&&"object"==typeof t&&!Array.isArray(t)&&($I(e,t.message),$I(e,t.error),"string"==typeof t.detail&&$I(e,t.detail))}function jI(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function YI(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function GI(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,YI(t,e,"get"))}function qI(t,e,n){jI(t,e),e.set(t,n)}function KI(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,YI(t,e,"set"),n),n}function XI(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function ZI(t,e){jI(t,e),e.add(t)}Bk("dataProvider",["manualRowMove","manualColumnMove","trimRows","multiColumnSorting"]);var QI=new WeakMap,JI=new WeakMap,tA=new WeakMap,eA=new WeakSet,nA=new WeakSet,oA=new WeakSet,iA=new WeakSet,sA=new WeakSet,rA=new WeakSet,aA=new WeakSet,lA=new WeakSet,hA=new WeakSet,cA=new WeakSet,dA=new WeakSet,uA=new WeakSet,gA=new WeakSet,pA=new WeakSet,fA=new WeakSet,mA=new WeakSet,wA=new WeakSet,bA=new WeakMap,vA=new WeakMap,CA=new WeakMap,yA=new WeakMap,SA=new WeakMap,kA=new WeakMap,RA=new WeakMap,xA=new WeakMap,EA=new WeakMap,MA=new WeakMap;let TA=class extends Qk{static get PLUGIN_KEY(){return yI}static get PLUGIN_PRIORITY(){return 950}static get SETTING_KEYS(){return[yI]}static get DEFAULT_SETTINGS(){return SI}static get SETTINGS_VALIDATORS(){return kI}isEnabled(){return!!this.hot.getSettings()[yI]}enablePlugin(){this.enabled||(XI(this,lA,PA).call(this),this.addHook("hasExternalDataSource",GI(this,bA)),this.addHook("afterInit",()=>GI(this,vA).call(this)),this.addHook("modifyRowHeader",(...t)=>GI(this,RA).call(this,...t)),this.addHook("beforeColumnSort",(...t)=>GI(this,kA).call(this,...t)),this.addHook("beforeUndoStackChange",(...t)=>GI(this,xA).call(this,...t)),this.addHook("afterChange",(...t)=>GI(this,EA).call(this,...t)),this.addHook("beforeAlter",(...t)=>GI(this,MA).call(this,...t)),this.addHook("afterPageChange",(...t)=>GI(this,CA).call(this,...t)),this.addHook("afterPageSizeChange",(...t)=>GI(this,yA).call(this,...t)),this.addHook("beforeFilter",(...t)=>GI(this,SA).call(this,...t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.hot.view&&this.fetchData(),super.updatePlugin()}disablePlugin(){XI(this,gA,FA).call(this),KI(this,QI,{...RI}),super.disablePlugin()}getQueryParameters(){return XI(this,aA,NA).call(this,GI(this,QI))}getRowId(t){return II(this.hot,XI(this,nA,HA).call(this),t)}async fetchData(t={}){const e=XI(this,oA,IA).call(this);if(!Ze(e))return this.hot.render(),null;const n=XI(this,cA,LA).call(this,t),o=XI(this,dA,BA).call(this),{signal:i}=o;if(!1===this.hot.runHooks("beforeDataProviderFetch",n))return KI(this,JI,null),this.hot.render(),null;const s=XI(this,aA,NA).call(this,n);try{const o=await e(s,{signal:i});if(i.aborted)return XI(this,uA,VA).call(this,n,void 0),null;const r=Array.isArray(o?.rows)?o.rows:[],a="number"==typeof o?.totalRows&&o.totalRows>=0?o.totalRows:r.length,l=XI(this,aA,NA).call(this,n),h=function(t,e,n){const o="number"==typeof e&&e>=1?e:10,i=Math.max(1,Math.ceil(n/o));return Math.max(1,Math.min(t,i))}(l.page,l.pageSize,a);if(h!==l.page)return this.fetchData({...t,page:h,skipLoading:t.skipLoading});KI(this,QI,l),this.hot.loadData(r,yI);const c=function(t,e){const n=function(t,e){if(null==t||"object"!=typeof t||"string"!=typeof t.prop)return null;const n=t.order??t.sortOrder;if("asc"!==n&&"desc"!==n)return null;if("function"!=typeof e)return null;const o=e(t.prop);return"number"!=typeof o?null:{column:o,sortOrder:n}}(e,e=>t.propToCol(e));return n&&"object"==typeof n&&"column"in n?n:[]}(this.hot,l.sort??null),d=function(t,e){if(null==e)return[];if(!Array.isArray(e)||0===e.length)return[];const n=[];for(let o=0;o<e.length;o++){const i=e[o],s=t.propToCol(i.prop);if(null==s||s<0)continue;const r=t.toPhysicalColumn(s);n.push({column:r,operation:i.operation,conditions:(i.conditions||[]).map(t=>({name:t.name,args:Array.isArray(t.args)?[...t.args]:[]}))})}return n}(this.hot,l.filters??null);return this.hot.runHooks("afterDataProviderFetch",{...o,rows:r,totalRows:a,queryParameters:l,columnSortConfig:c,filtersConditionsStack:d}),this.hot.render(),{rows:r,totalRows:a}}catch(t){if(i.aborted||"AbortError"===t?.name)return XI(this,uA,VA).call(this,n,t),null;throw this.hot.runHooks("afterDataProviderFetchError",t,XI(this,aA,NA).call(this,n)),XI(this,fA,$A).call(this,"fetch",t),t}finally{GI(this,JI)===o&&KI(this,JI,null)}}async createRows(t={}){const e=XI(this,iA,AA).call(this);if(!Ze(e))return Promise.resolve();const n={position:t.position??"below",referenceRowId:t.referenceRowId,rowsAmount:t.rowsAmount??1},o={rowsCreate:n};return XI(this,wA,jA).call(this,"create",o,()=>e(n),()=>this.fetchData({skipLoading:!0}))}async removeRows(t){const e=XI(this,rA,DA).call(this);if(!Ze(e))return Promise.resolve();const n=Array.isArray(t)?t:[t];n.forEach(t=>{AI(t)&&bt("DataProvider: `removeRows` requires every id to be non-null.")});const o={rowsRemove:n};return XI(this,wA,jA).call(this,"remove",o,()=>e(n),async()=>{const t=GI(this,QI).page,e=this.hot.countRows();if(n.length>=e&&e>=1&&t>1)return void await this.fetchData({page:t-1,skipLoading:!0});const o=await this.fetchData({skipLoading:!0});0===o?.rows.length&&t>1&&await this.fetchData({page:t-1,skipLoading:!0})})}async updateRows(t){if(!Ze(XI(this,sA,OA).call(this))||!Array.isArray(t)||0===t.length)return;t.forEach(t=>{AI(t.id)&&bt("DataProvider: `updateRows` requires every entry to include a non-null `id`.")});const e=function(t,e,n){return n.map(n=>{const o=OI(t,e,n.id);let i;return i=o>=0?t.getSourceDataAtRow(t.toPhysicalRow(o)):void 0!==n.rowData?n.rowData:{},{id:n.id,changes:n.changes,rowData:i&&"object"==typeof i?i:{}}})}(this.hot,XI(this,nA,HA).call(this),t);return XI(this,pA,zA).call(this,()=>async function(t,e,n){const{getRowIdOption:o,commitRowsUpdate:i}=e,s={rows:n};if(!1===TI(t,"update",s))return;const r=o();if((await Promise.all(n.map(async e=>{const n=OI(t,r,e.id);return n<0||DI(t,n,e.changes)}))).some(t=>!t))return HI(t,"update",new Error("Row update validation failed"),s),void te("Row update failed: validation failed for one or more cells");await i(n)}(this.hot,{getRowIdOption:()=>XI(this,nA,HA).call(this),commitRowsUpdate:t=>XI(this,mA,UA).call(this,t)},e))}destroy(){XI(this,gA,FA).call(this),super.destroy()}constructor(t){super(t),ZI(this,eA),ZI(this,nA),ZI(this,oA),ZI(this,iA),ZI(this,sA),ZI(this,rA),ZI(this,aA),ZI(this,lA),ZI(this,hA),ZI(this,cA),ZI(this,dA),ZI(this,uA),ZI(this,gA),ZI(this,pA),ZI(this,fA),ZI(this,mA),ZI(this,wA),qI(this,QI,{writable:!0,value:void 0}),qI(this,JI,{writable:!0,value:void 0}),qI(this,tA,{writable:!0,value:void 0}),qI(this,bA,{writable:!0,value:void 0}),qI(this,vA,{writable:!0,value:void 0}),qI(this,CA,{writable:!0,value:void 0}),qI(this,yA,{writable:!0,value:void 0}),qI(this,SA,{writable:!0,value:void 0}),qI(this,kA,{writable:!0,value:void 0}),qI(this,RA,{writable:!0,value:void 0}),qI(this,xA,{writable:!0,value:void 0}),qI(this,EA,{writable:!0,value:void 0}),qI(this,MA,{writable:!0,value:void 0}),KI(this,QI,{...RI}),KI(this,JI,null),KI(this,tA,{tail:Promise.resolve()}),KI(this,bA,()=>{return!(!(t=this.hot.getSettings().dataProvider)||"object"!=typeof t||Array.isArray(t))&&Object.keys(kI).every(e=>kI[e](t[e]));var t}),KI(this,vA,()=>{this.fetchData()}),KI(this,CA,(t,e)=>{!function(t,e,n){const{hot:o,getQueryPage:i,goToPage:s}=t,r=o.getPlugin(BI);r?.enabled&&n!==i()&&s(n).catch(()=>{const t=o.getPlugin(BI);t?.enabled&&t.revertPageTo(e)})}({hot:this.hot,getQueryPage:()=>GI(this,QI).page,goToPage:t=>this.fetchData({page:t})},t,e)}),KI(this,yA,(t,e)=>{VI({hot:this.hot,getQueryPage:()=>GI(this,QI).page,getQueryPageSize:()=>GI(this,QI).pageSize,setPageSize:t=>this.fetchData({pageSize:t,page:1})},t,e)}),KI(this,SA,t=>function(t,e){const{hot:n,hasFetchFn:o,applyFiltersAndRefetch:i}=t;if(!o())return;return i(LI(n,e)),!1}({hot:this.hot,hasFetchFn:()=>Ze(XI(this,oA,IA).call(this)),applyFiltersAndRefetch:t=>{GI(this,QI).filters=t??null,GI(this,QI).page=1,this.fetchData()}},t)),KI(this,kA,(t,e,n)=>function(t,e,n,o){const{hot:i,hasFetchFn:s,applyQueryParametersFromPlugins:r,fetchData:a}=t;if(!s()||!o)return;return i.getPlugin(FI).setSortConfig(n),r(),a({skipLoading:!0}),!1}({hot:this.hot,hasFetchFn:()=>Ze(XI(this,oA,IA).call(this)),applyQueryParametersFromPlugins:()=>XI(this,lA,PA).call(this),fetchData:t=>this.fetchData(t)},0,e,n)),KI(this,RA,t=>function(t,e,n=10){const{page:o,pageSize:i}=t;return(o-1)*("number"==typeof i&&i>=1?i:n)+e}(GI(this,QI),t)),KI(this,xA,(t,e)=>{if(Ze(XI(this,sA,OA).call(this))&&xI.has(e))return!1}),KI(this,EA,(t,e)=>{if(function(t,e,n){return!t||!e?.length||"DataProvider.revert"===n||!xI.has(n)}(Ze(XI(this,sA,OA).call(this)),t,e))return;const n=function(t,e){const n=e.filter(t=>t[2]!==t[3]);return 0===n.length?[]:n.filter(e=>{const n=t.propToCol(e[1]);return!(void 0===n||n<0)&&!1!==t.getCellMeta(e[0],n).valid})}(this.hot,t);0!==n.length&&XI(this,pA,zA).call(this,()=>NI(this.hot,{getRowIdOption:()=>XI(this,nA,HA).call(this),commitRowsUpdate:(t,e)=>XI(this,mA,UA).call(this,t,e)},n))}),KI(this,MA,(t,e,n)=>WI({hot:this.hot,getOnRowsCreate:()=>XI(this,iA,AA).call(this),getOnRowsRemove:()=>XI(this,rA,DA).call(this),getRowIdOption:()=>XI(this,nA,HA).call(this),getRowId:t=>this.getRowId(t),createRows:t=>this.createRows(t),removeRows:t=>this.removeRows(t)},t,e,n)),this.addHook("hasExternalDataSource",GI(this,bA))}};function _A(){const t=this.hot.getSettings()[yI];return t&&"object"==typeof t?t:void 0}function HA(){const t=XI(this,eA,_A).call(this);return t?t.rowId:void 0}function IA(){const t=XI(this,eA,_A).call(this);return t&&Ze(t.fetchRows)?t.fetchRows:void 0}function AA(){const t=XI(this,eA,_A).call(this);return t&&Ze(t.onRowsCreate)?t.onRowsCreate:void 0}function OA(){const t=XI(this,eA,_A).call(this);return t&&Ze(t.onRowsUpdate)?t.onRowsUpdate:void 0}function DA(){const t=XI(this,eA,_A).call(this);return t&&Ze(t.onRowsRemove)?t.onRowsRemove:void 0}function NA(t){return{page:t.page,pageSize:t.pageSize,sort:null===t.sort?null:{...t.sort},filters:(e=t.filters,null===e?null:e.map(t=>({prop:t.prop,operation:t.operation,conditions:(t.conditions||[]).map(t=>({name:t.name,args:Array.isArray(t.args)?[...t.args]:[]}))})))};var e}function PA(){var t,e;t=this.hot,e=GI(this,QI),function(t,e){if(!t?.enabled)return;const n="function"==typeof t.getCurrentPageSize?t.getCurrentPageSize():void 0,o=t.getSetting("pageSize"),i=t.getSetting("initialPage"),s="function"==typeof t.getCurrentPage?t.getCurrentPage():void 0;"number"==typeof n?e.pageSize=n:"number"==typeof o&&(e.pageSize=o),"number"==typeof s&&s>=1?e.page=s:"number"==typeof i&&i>=1&&(e.page=i)}(t.getPlugin(BI),e),zI(this.hot,GI(this,QI)),function(t,e,n){if(!Ze(n()))return;const o=t.getPlugin("filters");if(!o||!o.enabled)return;const i=LI(t,o.exportConditions());e.filters=i??null}(this.hot,GI(this,QI),()=>XI(this,oA,IA).call(this))}function WA(){if(!GI(this,JI))return;const t=new Error("DataProvider fetch superseded by a newer request");t.name="AbortError",GI(this,JI).abort(t)}function LA(t){const e={...GI(this,QI),...t};return function(t,e){t.sort=function(t,e){if(null==t||"object"!=typeof t)return null;if("number"==typeof t.column&&"function"==typeof e)return{prop:e(t.column),order:t.sortOrder};const n=t.order??t.sortOrder;return"string"!=typeof t.prop||"asc"!==n&&"desc"!==n?null:{prop:t.prop,order:n}}(t.sort,t=>e.colToProp(t))}(e,this.hot),"number"!=typeof e.page||Number.isNaN(e.page)||(e.page=Math.max(1,e.page)),e}function BA(){XI(this,hA,WA).call(this);const t=new AbortController;return KI(this,JI,t),t}function VA(t,e){const n=XI(this,aA,NA).call(this,t);this.hot.runHooks("afterDataProviderFetchAbort",n,e)}function FA(){GI(this,JI)?.abort(),KI(this,JI,null)}function zA(t){return function(t,e){const n=t.tail.then(e);return t.tail=n.catch(()=>{}),n}(GI(this,tA),t)}function $A(t,e){const n=this.hot.getPlugin("notification");if(!n?.enabled)return;const o={fetch:Hd,create:Id,update:Ad,remove:Od},i=this.hot.getTranslatedPhrase(o[t]??Dd),s=function(t){const e=[];if(null==t)return"Unknown error";if("string"==typeof t)return t.trim()||"Unknown error";if("object"!=typeof t)return String(t);const n=t.response?.data??t.data??t.body;if(null!=n)if("string"==typeof n)try{UI(JSON.parse(n),e)}catch{$I(e,n)}else UI(n,e);"string"==typeof t.error&&$I(e,t.error),"string"==typeof t.message&&$I(e,t.message);return e.find(t=>{return!("string"==typeof(e=t)&&/^\d{3}$/.test(e.trim()));var e})||(e.length>0?e[0]:String(t))}(e);let r="";const a={variant:"error",title:i,message:s};"fetch"===t&&(a.duration=0,a.actions=[{label:this.hot.getTranslatedPhrase(Nd),type:"primary",callback:()=>{r&&n.hide(r),this.fetchData()}}]),r=n.showMessage(a)}function UA(t,e={}){return async function(t,e,n,o={}){const i=e.getOnRowsUpdate();if(!Ze(i))return;const s={rows:n},{revertOptimistic:r}=o,{onRequestFailed:a}=e;try{await i(n)}catch(n){return HI(t,"update",n,s),e.logError("Row update failed:",n),Ze(r)&&r(),t.render(),void a?.("update",n)}try{_I(t,"update",s),await e.fetchData()}catch(n){HI(t,"update",n,s),e.logError("Data reload failed:",n),Ze(r)&&r(),t.render()}}(this.hot,{getOnRowsUpdate:()=>XI(this,sA,OA).call(this),fetchData:()=>this.fetchData({skipLoading:!0}),logError:te,onRequestFailed:(t,e)=>XI(this,fA,$A).call(this,t,e)},t,e)}function jA(t,e,n,o){return function(t,e,n,o,i){const{enqueueMutation:s,runBeforeRowsMutation:r,runAfterRowsMutation:a,runAfterRowsMutationError:l,logError:h,onRequestFailed:c}=t;return s(async()=>{if(!1===r(e,n))return;const t="create"===e?"Row create":"Row remove";try{await o()}catch(o){return l(e,o,n),h(`${t} failed:`,o),void c?.(e,o)}try{a(e,n),await i()}catch(t){l(e,t,n),h("Data reload failed:",t)}})}({enqueueMutation:t=>XI(this,pA,zA).call(this,t),runBeforeRowsMutation:(t,e)=>TI(this.hot,t,e),runAfterRowsMutation:(t,e)=>_I(this.hot,t,e),runAfterRowsMutationError:(t,e,n)=>HI(this.hot,t,e,n),logError:te,onRequestFailed:(t,e)=>XI(this,fA,$A).call(this,t,e)},t,e,n,o)}function YA(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function GA(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)}const qA="dragToScroll";var KA=new WeakSet;class XA extends Qk{static get PLUGIN_KEY(){return qA}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[qA]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",t=>YA(this,KA,ZA).call(this,t)),this.addHook("afterOnCellCornerMouseDown",t=>YA(this,KA,ZA).call(this,t)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(t={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=oe(e)}unregisterEvents(){this.eventManager.clear()}onMouseMove(t){this.isListening()&&this.check(t.clientX,t.clientY)}destroy(){super.destroy()}constructor(...t){super(...t),GA(this,KA),this.boundaries=null,this.callback=null,this.listening=!1}}function ZA(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)=>{const o=e.scrollLeft??e.scrollX,i=e.scrollTop??e.scrollY;e.scroll(o+50*Math.sign(t),i+20*Math.sign(n))}),this.listen()}function QA(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function JA(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function tO(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,JA(t,e,"set"),n),n}function eO(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function nO(t,e){QA(t,e),e.add(t)}Mn.getSingleton().register("afterDropdownMenuDefaultOptions"),Mn.getSingleton().register("beforeDropdownMenuShow"),Mn.getSingleton().register("afterDropdownMenuShow"),Mn.getSingleton().register("afterDropdownMenuHide"),Mn.getSingleton().register("afterDropdownMenuExecute");const oO="dropdownMenu",iO="changeType",sO=oO;var rO=new WeakMap,aO=new WeakSet,lO=new WeakSet,hO=new WeakSet,cO=new WeakSet,dO=new WeakSet,uO=new WeakSet,gO=new WeakSet,pO=new WeakSet,fO=new WeakSet,mO=new WeakSet;class wO extends Qk{static get PLUGIN_KEY(){return oO}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[qM,KM,jM,QM,jM,GM,jM,XM,jM,YM]}isEnabled(){return this.hot.getSettings()[oO]}enablePlugin(){if(this.enabled)return;this.itemsFactory=new t_(this.hot,wO.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(...t)=>eO(this,mO,MO).call(this,...t)),this.addHook("beforeViewportScrollHorizontally",(...t)=>eO(this,fO,EO).call(this,...t)),this.addHook("beforeDialogShow",()=>this.close());const t=this.hot.getSettings()[oO],e={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",e),this.itemsFactory.setPredefinedItems(e.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new __(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootPortalElement}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",()=>eO(this,dO,SO).call(this)),this.menu.addLocalHook("afterOpen",()=>eO(this,uO,kO).call(this)),this.menu.addLocalHook("afterSubmenuOpen",t=>eO(this,gO,RO).call(this,t)),this.menu.addLocalHook("afterClose",()=>eO(this,pO,xO).call(this)),this.menu.addLocalHook("executeCommand",(...t)=>this.executeCommand.call(this,...t)),x(n,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(),e=t.isHeader()?this.hot.getCell(t.row,t.col,!0):null,n=t.isHeader()&&t.col>=0&&le(e),o=t.isHeader()&&t.col>=0&&e&&de(e,"hiddenHeader");if((n||o||t.isCell())&&t.col>=0){let e=n||o?t.row:-1;this.hot.selectColumns(t.col,t.col,e);const{from:i}=this.hot.getSelectedRangeActive(),s=UM(this.menu.container,this.hot.rootDocument);let r=this.hot.getCell(e,i.col,!0)?.querySelector(`.${iO}`);if(!r)for(let n=-this.hot.view.getColumnHeadersCount();n<=-1;n++){const o=this.hot.getCell(n,i.col,!0)?.querySelector(`.${iO}`);if(o){r=o,e=n,this.hot.selectColumns(t.col,t.col,e);break}}if(!r&&o)for(let t=i.col-1;t>=0;t--){const n=this.hot.getCell(e,t,!0);if(!n||de(n,"hiddenHeader"))continue;const o=n?.querySelector(`.${iO}`);o&&(r=o,this.hot.selectColumns(t,t,e));break}if(!r)return;const a=eO(this,hO,CO).call(this,r);this.open({left:a.left+s.left,top:a.bottom+s.top},{left:a.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:()=>{const t=this.hot.getSelectedRangeActive()?.highlight,e=t?.isHeader()?this.hot.getCell(t.row,t.col,!0):null,n=t?.isHeader()&&t.col>=0&&e&&de(e,"hiddenHeader");return t&&!this.menu.isOpened()&&t.isHeader()&&(this.hot.selection.isCellVisible(t)||n)},captureCtrl:!0,group:sO},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:sO}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(sO)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",t=>eO(this,lO,vO).call(this,t))}open(t,e={above:0,below:0,left:0,right:0}){this.menu?.isOpened()||(this.menu.open(),Tt(e,(t,e)=>{this.menu.setOffset(e,t)}),this.menu.setPosition(t))}close(){this.menu?.close()}executeCommand(t,...e){this.commandExecutor.execute(t,...e)}setListening(t=!0){this.menu.isOpened()&&(t?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}constructor(t){var e,n,o;super(t),nO(this,aO),nO(this,lO),nO(this,hO),nO(this,cO),nO(this,dO),nO(this,uO),nO(this,gO),nO(this,pO),nO(this,fO),nO(this,mO),o={writable:!0,value:void 0},QA(e=this,n=rO),n.set(e,o),this.commandExecutor=new JT(this.hot),this.itemsFactory=null,this.menu=null,tO(this,rO,!1),this.hot.addHook("afterGetColHeader",(t,e)=>eO(this,cO,yO).call(this,t,e))}}function bO(t){t.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function vO(t){if(de(t.target,iO)){const e=UM(this.menu.container,this.hot.rootDocument),n=eO(this,hO,CO).call(this,t.target);t.stopPropagation(),tO(this,rO,!1),this.open({left:n.left+e.left,top:n.bottom+e.top},{left:n.width,right:0,above:0,below:3})}}function CO(t){const e=t.getBoundingClientRect(),n=this.hot.rootWindow.getComputedStyle(t,"::before"),o=Number.parseFloat(n.width);if(Number.isFinite(o)&&e.width>=o&&e.height>=o){const t=e.left+(e.width-o)/2,n=e.top+(e.height-o)/2;return{top:n,left:t,right:t+o,bottom:n+o,width:o,height:o}}return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function yO(t,e){if(t<0||!le(e))return;const n=e.querySelector(`.${iO}`);if(this.enabled&&n)return;if(!this.enabled)return void(n&&n.parentNode.removeChild(n));const o=this.hot.rootDocument.createElement("button");o.className=iO,o.type="button",o.tabIndex=-1,this.hot.getSettings().ariaTags&&(pe(o,[["aria-hidden","true"],rt(" ")]),pe(e,[ht("menu")])),o.onclick=function(){return!1};const i=e.firstChild;if(!i)return;const s=i.querySelector(".colHeader");s?i.insertBefore(o,s.nextSibling):i.appendChild(o)}function SO(){this.hot.runHooks("beforeDropdownMenuShow",this)}function kO(){this.hot.runHooks("afterDropdownMenuShow",this),eO(this,aO,bO).call(this,this.menu)}function RO(t){eO(this,aO,bO).call(this,t)}function xO(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function EO(t){return function(t,e){return e.get?e.get.call(t):e.value}(e=this,JA(e,rO,"get"))?null:t;var e}function MO(t){de(t.target,iO)&&tO(this,rO,!0)}wO.SEPARATOR={name:jM};class TO{setOptions(t){this.options=t&&"columnHeaders"in t&&!("colHeaders"in t)?{...t,colHeaders:t.columnHeaders}:t}_extractDataMatrix(t){const{startRow:e,startCol:n,endRow:o,endCol:i}=this._getDataRange(),s=this.options,r=[];for(let a=e;a<=o;a++){if(!1===s.exportHiddenRows&&this._isHiddenRow(a))continue;const e=[];for(let o=n;o<=i;o++)!1===s.exportHiddenColumns&&this._isHiddenColumn(o)||e.push(t(a,o));r.push(e)}return r}getData(){return this._extractDataMatrix((t,e)=>this.hot.getDataAtCell(t,e))}getRowHeaders(){const t=[];if(this.options.rowHeaders){const{startRow:e,endRow:n}=this._getDataRange(),o=this.hot.getRowHeader();for(let i=e;i<=n;i++)!1===this.options.exportHiddenRows&&this._isHiddenRow(i)||t.push(o[i])}return t}getColumnHeaders(){const t=[];if(this.options.colHeaders){const{startCol:e,endCol:n}=this._getDataRange(),o=this.hot.getColHeader();for(let i=e;i<=n;i++)!1===this.options.exportHiddenColumns&&this._isHiddenColumn(i)||t.push(o[i])}return t}_getDataRange(){const t=this.hot.countCols()-1,e=this.hot.countRows()-1;let[n=0,o=0,i=e,s=t]=this.options.range;return n=Math.max(n,0),o=Math.max(o,0),i=Math.min(i,e),s=Math.min(s,t),{startRow:n,startCol:o,endRow:i,endCol:s}}getSourceData(){return this._extractDataMatrix((t,e)=>this.hot.getSourceDataAtCell(t,e))}getExcludedHiddenRows(){const t=new Set;if(!1!==this.options.exportHiddenRows)return t;const{startRow:e,endRow:n}=this._getDataRange();for(let o=e;o<=n;o++)this._isHiddenRow(o)&&t.add(this.hot.toPhysicalRow(o));return t}getExcludedHiddenColumns(){const t=new Set;if(!1!==this.options.exportHiddenColumns)return t;const{startCol:e,endCol:n}=this._getDataRange();for(let o=e;o<=n;o++)this._isHiddenColumn(o)&&t.add(this.hot.toPhysicalColumn(o));return t}getHiddenRowDataIndices(){if("hide"!==this.options.exportHiddenRows)return[];const{startRow:t,endRow:e}=this._getDataRange(),n=[];let o=0;for(let i=t;i<=e;i++)this._isHiddenRow(i)&&n.push(o),o+=1;return n}getHiddenColumnDataIndices(){if("hide"!==this.options.exportHiddenColumns)return[];const{startCol:t,endCol:e}=this._getDataRange(),n=[];let o=0;for(let i=t;i<=e;i++)this._isHiddenColumn(i)&&n.push(o),o+=1;return n}getFormulasSeparator(){const t=this.hot.getPlugin("formulas");return t&&t.isEnabled()?t.engine?.getConfig()?.functionArgSeparator??",":","}getCellsMeta(){return this._extractDataMatrix((t,e)=>this.hot.getCellMeta(t,e))}getCellElements(){return this._extractDataMatrix((t,e)=>this.hot.getCell(t,e))}getMergeCells(){const{startRow:t,startCol:e,endRow:n,endCol:o}=this._getDataRange(),i=this.hot.getPlugin("mergeCells");if(!i||!i.isEnabled())return[];const s=i.mergedCellsCollection.mergedCells,r=[],a=!1===this.options.exportHiddenRows,l=!1===this.options.exportHiddenColumns,h=t=>!a||!this._isHiddenRow(t),c=t=>!l||!this._isHiddenColumn(t);return s.forEach(i=>{const s=i.row+i.rowspan-1,a=i.col+i.colspan-1;if(i.row<t||s>n||i.col<e||a>o)return;if(!h(i.row)||!c(i.col))return;const l=this._countVisibleBefore(i.row,t,h),d=this._countVisibleBefore(i.col,e,c),u=this._countVisibleBefore(s+1,i.row,h),g=this._countVisibleBefore(a+1,i.col,c);u<=1&&g<=1||r.push({row:l,col:d,rowspan:u,colspan:g})}),r}getColumnsWidths(){const{startCol:t,endCol:e}=this._getDataRange(),n=this.options,o=[];for(let i=t;i<=e;i++){if(!1===n.exportHiddenColumns&&this._isHiddenColumn(i))continue;const t=this._isHiddenColumn(i)?this._getNaturalColWidth(i):this.hot.getColWidth(i);o.push(t)}return o}getRowsHeights(){const{startRow:t,endRow:e}=this._getDataRange(),n=this.options,o=[];for(let i=t;i<=e;i++){if(!1===n.exportHiddenRows&&this._isHiddenRow(i))continue;const t=this._isHiddenRow(i)?this._getNaturalRowHeight(i):this.hot.getRowHeight(i);o.push(t)}return o}getFrozenRows(){return this.hot.getSettings().fixedRowsTop||0}getFrozenColumns(){return this.hot.getSettings().fixedColumnsStart||0}getNestedColumnHeaders(){const t=this.hot.getPlugin("nestedHeaders");if(!t||!t.isEnabled())return null;const e=t.getLayersCount(),{startCol:n,endCol:o}=this._getDataRange(),i=!!this.options.exportHiddenColumns,s=[];for(let r=0;r<e;r++){const e=[];let a=n;for(;a<=o;)if(i||!this._isHiddenColumn(a))if(i){const n=t.getStateManager().getHeaderTreeNodeData(r,a);if(n&&n.columnIndex!==a)e.push({label:"",colspan:1,className:""}),a+=1;else{const t=n?.origColspan??1,i=Math.min(t,o-a+1),s=(n?.headerClassNames??[]).join(" ");e.push({label:n?.label??"",colspan:i,className:s}),a+=t}}else{const n=t.getHeaderSettings(r,a);if(!n||n.isRoot){const t=n?.colspan??1;let i=0;for(let e=a;e<a+t&&e<=o;e++)this._isHiddenColumn(e)||(i+=1);const s=(n?.headerClassNames??[]).join(" ");e.push({label:n?.label??"",colspan:i,className:s}),a+=t}else e.push({label:"",colspan:1,className:""}),a+=1}else a+=1;s.push(e)}return s}getColumnHeadersClassNames(){if(!this.options.colHeaders)return[];const{startCol:t,endCol:e}=this._getDataRange(),n=this.options,o=[];for(let i=t;i<=e;i++)!1===n.exportHiddenColumns&&this._isHiddenColumn(i)||o.push(this.hot.getColumnMeta(i).headerClassName||"");return o}getLayoutDirection(){return"rtl"===this.hot.getSettings().layoutDirection?"rtl":"ltr"}getColumnSummaries(){const t=this.hot.getPlugin("columnSummary");if(!t||!t.isEnabled())return[];const{startRow:e,startCol:n,endRow:o,endCol:i}=this._getDataRange(),s=t.endpoints.getAllEndpoints(),r=new Set;s.forEach(t=>{const n=this._physicalRowToDataIndex(t.destinationRow,e,o);null!==n&&r.add(n)});const a=[];return s.forEach(t=>{const s=this._transformEndpointToSummary(t,e,o,n,i,r);null!==s&&a.push(s)}),a}_transformEndpointToSummary(t,e,n,o,i,s){const r=this._physicalRowToDataIndex(t.destinationRow,e,n),a=this._physicalColToDataIndex(t.destinationColumn,o,i);if(null===r||null===a)return null;const l=t.sourceColumn??t.destinationColumn,h=this._physicalColToDataIndex(l,o,i);if(null===h)return null;const c=t.ranges||[[0,this.hot.countRows()-1]],d=[];return c.forEach(t=>{const o=t[0],i=void 0!==t[1]?t[1]:t[0];for(let t=o;t<=i;t++){const o=this._physicalRowToDataIndex(t,e,n);if(null!==o&&!s.has(o)){if(d.length>0){const t=d[d.length-1];if(t[1]+1===o){t[1]=o;continue}}d.push([o,o])}}}),0===d.length?null:{destRow:r,destCol:a,type:String(t.type||"sum").toLowerCase(),sourceCol:h,sourceRanges:d}}_countVisibleBefore(t,e,n){let o=0;for(let i=e;i<t;i++)n(i)&&(o+=1);return o}_physicalRowToDataIndex(t,e,n){const o=this.hot.toVisualRow(t);return null===o||o<e||o>n||!1===this.options.exportHiddenRows&&this._isHiddenRow(o)?null:this._countVisibleBefore(o,e,t=>!1!==this.options.exportHiddenRows||!this._isHiddenRow(t))}_physicalColToDataIndex(t,e,n){const o=this.hot.toVisualColumn(t);return null===o||o<e||o>n||!1===this.options.exportHiddenColumns&&this._isHiddenColumn(o)?null:this._countVisibleBefore(o,e,t=>!1!==this.options.exportHiddenColumns||!this._isHiddenColumn(t))}_getNaturalColWidth(t){const e=this.hot.getSettings(),n=this.hot.getColumnMeta(t).width;if(null!=n)return n;const{colWidths:o,defaultColumnWidth:i}=e,s=i??50;return Array.isArray(o)?o[t]??s:"function"==typeof o?o(t)??s:"number"==typeof o?o:s}_getNaturalRowHeight(t){const e=this.hot.getSettings(),{rowHeights:n,defaultRowHeight:o}=e,i=o??23;return Array.isArray(n)?n[t]??i:"function"==typeof n?n(t)??i:"number"==typeof n?n:i}_isHiddenRow(t){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(t))}_isHiddenColumn(t){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(t))}constructor(t){this.options={},this.hot=t}}class _O{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,colHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}get binary(){return!1}_mergeOptions(t){let e=kt(this.constructor.DEFAULT_OPTIONS);const n=new Date;return e=Ct(kt(_O.DEFAULT_OPTIONS),e),t&&"columnHeaders"in t&&!("colHeaders"in t)&&(t={...t,colHeaders:t.columnHeaders}),e=Ct(e,t),e.filename=q(e.filename,{YYYY:n.getFullYear(),MM:`${n.getMonth()+1}`.padStart(2,"0"),DD:`${n.getDate()}`.padStart(2,"0")}),e}constructor(t,e){this.dataProvider=t,this.options=this._mergeOptions(e),this.dataProvider.setOptions(this.options)}}function HO(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function IO(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)}const AO=String.fromCharCode(13),OO=String.fromCharCode(34),DO=String.fromCharCode(10),NO=String.fromCharCode(61),PO=String.fromCharCode(43),WO=String.fromCharCode(45),LO=String.fromCharCode(64),BO=String.fromCharCode(9);var VO=new WeakSet,FO=new WeakSet;function zO(t){return t.startsWith(NO)||t.startsWith(PO)||t.startsWith(WO)||t.startsWith(LO)||t.startsWith(BO)||t.startsWith(AO)?`'${t}`:t}function $O(t,e){return e.test(t)?`'${t}`:t}const UO={sum:"SUM",min:"MIN",max:"MAX",count:"COUNT",average:"AVERAGE"};function jO(t){let e="",n=t;for(;n>0;){const t=(n-1)%26;e=String.fromCharCode(65+t)+e,n=Math.floor((n-1)/26)}return e}function YO(t){let e=0;for(let n=0;n<t.length;n++)e=26*e+(t.charCodeAt(n)-64);return e}function GO(t,e){let n=0;return t.forEach(t=>{t<e&&(n+=1)}),n}function qO(t,e,n,o,i,s){let r=t.startsWith("=")?t.slice(1):t;const a=i?.size>0,l=s?.size>0;return(0!==n||0!==o||a||l)&&(r=r.replace(/("(?:[^"]|"")*"|'[^']*')|(?<![0-9])(\$?)([A-Z]{1,3})(\$?)(\d{1,7})(?!\()/g,(t,e,r,h,c,d)=>{if(void 0!==e)return e;const u=YO(h)-1,g=parseInt(d,10)-1,p=l?GO(s,u):0,f=a?GO(i,g):0,m=YO(h)+o-p,w=parseInt(d,10)+n-f;return`${r}${jO(m)}${c}${w}`})),e&&","!==e&&(r=function(t,e,n){let o="",i=!1,s="";for(let r=0;r<t.length;r++){const a=t[r];i?(o+=a,a===s&&(t[r+1]===s?(o+=t[r+1],r+=1):i=!1)):'"'===a||"'"===a?(i=!0,s=a,o+=a):t.startsWith(e,r)?(o+=n,r+=e.length-1):o+=a}return o}(r,e,",")),r}function KO(t){return Array.isArray(t)?t.filter(t=>"string"==typeof t&&t.length>0):"string"==typeof t?t.split(" ").filter(t=>t.length>0):[]}const XO=new WeakMap,ZO=new WeakMap;const QO=new Set(["htLeft","htRight","htCenter","htJustify","htTop","htMiddle","htBottom"]);function JO(t){if(!t)return null;const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!e)return null;if(0===(I(e[4])?parseFloat(e[4]):1))return null;return`#${parseInt(e[1],10).toString(16).padStart(2,"0")}${parseInt(e[2],10).toString(16).padStart(2,"0")}${parseInt(e[3],10).toString(16).padStart(2,"0")}`.toUpperCase()}function tD(t,e,n){const o=e.join(" ");let i=XO.get(t);if(i||(i=new Map,XO.set(t,i)),i.has(o))return i.get(o);const s=t.createElement("div");s.className="handsontable",s.style.cssText="position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;";const r=t.createElement("table"),a=t.createElement("tbody"),l=t.createElement("tr"),h=t.createElement("td");h.className=o;const c=t.createElement("td");c.className=e.filter(t=>QO.has(t)).join(" "),l.appendChild(h),l.appendChild(c),a.appendChild(l),r.appendChild(a),s.appendChild(r),t.body.appendChild(s);const d=n.getComputedStyle(h).backgroundColor,u=n.getComputedStyle(c).backgroundColor;t.body.removeChild(s);const g=d!==u?JO(d):null;return i.set(o,g),g}function eD(t,e,n=null,o=null){if(!t){if(!n||!o)return null;const t=KO(e);return t.some(t=>!QO.has(t))?function(t,e,n){const o=n.join(" ");let i=ZO.get(t);if(i||(i=new Map,ZO.set(t,i)),i.has(o))return i.get(o);const s=t.createElement("div");s.className="handsontable",s.style.cssText="position:absolute;top:-99999px;left:-99999px;visibility:hidden;pointer-events:none;";const r=t.createElement("table"),a=t.createElement("tbody"),l=t.createElement("tr"),h=t.createElement("td");h.className=o;const c=t.createElement("td");c.className=n.filter(t=>QO.has(t)).join(" "),l.appendChild(h),l.appendChild(c),a.appendChild(l),r.appendChild(a),s.appendChild(r),t.body.appendChild(s);const d=e.getComputedStyle(h),u=e.getComputedStyle(c),g=d.backgroundColor,p=u.backgroundColor,f=d.color,m=u.color;t.body.removeChild(s);const w={fontBold:parseInt(d.fontWeight,10)>=700||"bold"===d.fontWeight,fontItalic:"italic"===d.fontStyle,fontUnderline:(d.textDecorationLine||d.textDecoration||"").includes("underline"),fontColor:f!==m?JO(f):null,backgroundColor:g!==p?JO(g):null};return i.set(o,w),w}(n,o,t):null}const i=t.ownerDocument?.defaultView;if(!i)return null;const s=i.getComputedStyle(t),r=KO(e),a=r.some(t=>!QO.has(t));return{fontBold:parseInt(s.fontWeight,10)>=700||"bold"===s.fontWeight,fontItalic:"italic"===s.fontStyle,fontUnderline:(s.textDecorationLine||s.textDecoration||"").includes("underline"),fontColor:a?JO(s.color):null,backgroundColor:a?tD(t.ownerDocument,r,i):null}}function nD(t){if(!t||"string"!=typeof t)return"FF000000";const e=t.startsWith("#")?t.slice(1):t;if(3===e.length){return`FF${e[0]+e[0]}${e[1]+e[1]}${e[2]+e[2]}`.toUpperCase()}return 6===e.length?`FF${e}`.toUpperCase():8===e.length?e.toUpperCase():"FF000000"}function oD(t){return t?iD({className:t}):null}function iD(t){if(!t?.className)return null;const e=KO(t.className),n={};return e.includes("htLeft")?n.horizontal="left":e.includes("htCenter")?n.horizontal="center":e.includes("htRight")?n.horizontal="right":e.includes("htJustify")&&(n.horizontal="justify"),e.includes("htTop")?n.vertical="top":e.includes("htMiddle")?n.vertical="middle":e.includes("htBottom")&&(n.vertical="bottom"),Object.keys(n).length>0?n:null}const sD=Date.UTC(1899,11,30);function rD(t){if(!t)return null;const e=String(t).match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;const n=parseInt(e[1],10),o=parseInt(e[2],10),i=parseInt(e[3],10),s=new Date(n,o-1,i);return Number.isNaN(s.getTime())?null:function(t){const e=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((e-sD)/864e5)}(s)}function aD(t,e){if(!t)return null;if(t.pattern)return(n=t.pattern)&&"string"==typeof n?n.replace(/0,0/g,"#,##0"):null;var n;const{style:o,currency:i,minimumFractionDigits:s=0,maximumFractionDigits:r,useGrouping:a=!0}=t,l=r??s,h=l>0?`.${"0".repeat(l)}`:"",c=!1!==a?"#,##0":"0";if("percent"===o)return`${c}${h}%`;if("currency"===o&&i){const{symbol:t,isPrefix:n}=function(t,e){try{const n=new Intl.NumberFormat(e||"en",{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).formatToParts(0),o=n.find(t=>"currency"===t.type)?.value??t,i=n.findIndex(t=>"currency"===t.type);return{symbol:o,isPrefix:i<n.findIndex(t=>"integer"===t.type)}}catch{return{symbol:t,isPrefix:!0}}}(i,e);return n?`${t}${c}${h}`:`${c}${h}${t}`}return`${c}${h}`}function lD(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function hD(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 cD=new WeakSet,dD=new WeakSet,uD=new WeakSet,gD=new WeakSet,pD=new WeakSet,fD=new WeakSet,mD=new WeakSet,wD=new WeakSet,bD=new WeakSet,vD=new WeakSet,CD=new WeakSet,yD=new WeakSet,SD=new WeakSet,kD=new WeakSet,RD=new WeakSet,xD=new WeakSet,ED=new WeakSet,MD=new WeakSet,TD=new WeakSet,_D=new WeakSet,HD=new WeakSet;function ID(t,e,n,o){const i=n.getData(),s=n.getCellsMeta(),r=lD(this,HD,ZD).call(this,t,s),a=n.getCellElements(),l=n.getColumnHeaders(),h=n.getColumnHeadersClassNames(),c=n.getRowHeaders(),d=n.getColumnsWidths(),u=n.getRowsHeights(),g=n.getMergeCells(),p=n.getFrozenRows(),f=n.getFrozenColumns(),m=n.getNestedColumnHeaders(),w="rtl"===n.getLayoutDirection(),{exportFormulas:b}=o,v=new Map;n.getColumnSummaries().forEach(t=>{v.set(`${t.destRow}:${t.destCol}`,t)});const C=b?n.getSourceData():null,y=b?n.getFormulasSeparator():",",S=l.length>0,k=c.length>0,R=null!==m&&S;let x=0;R?x=m.length:S&&(x=1);const E=x+1,M=k?2:1,T=b?n.getExcludedHiddenRows():null,_=b?n.getExcludedHiddenColumns():null,H=n.getHiddenRowDataIndices(),I=n.getHiddenColumnDataIndices(),{rootDocument:A,rootWindow:O}=n.hot;lD(this,kD,UD).call(this,e,d,k),I.length>0&&lD(this,RD,jD).call(this,e,I,k),lD(this,ED,GD).call(this,e,p,f,x,k,w);const D=lD(this,bD,BD).call(this,o.headerStyle),N=lD(this,vD,VD).call(this,o.headerStyle);R?(lD(this,TD,KD).call(this,e,m,k,M,D,N),lD(this,_D,XD).call(this,e,m,k,M)):S&&lD(this,MD,qD).call(this,e,l,h,k,M,D,N);const P=!(v.size>0)&&s.some(t=>t.some(t=>!0===t.readOnly)),W={exportFormulas:b,formulasSeparator:y,dataRowOffset:E,dataColOffset:M,excludedHiddenRows:T,excludedHiddenCols:_,summaryMap:v,sourceData:C,hasRowHeaders:k,headerFill:D,headerBorder:N,hasReadOnlyCells:P,rootDocument:A,rootWindow:O,validationMap:r,cellsMeta:s,cellElements:a,rowHeaders:c,rowsHeights:u};lD(this,dD,AD).call(this,e,i,W),H.length>0&&lD(this,xD,YD).call(this,e,H,E),P&&e.protect("",{selectLockedCells:!0,selectUnlockedCells:!0,formatColumns:!0,formatRows:!0,sort:!0,autoFilter:!0}),g.forEach(t=>{const n=t.row+E,o=t.col+M,i=n+t.rowspan-1,s=o+t.colspan-1;e.mergeCells(n,o,i,s)});const{conditionalFormatting:L}=o;return L&&L.length>0&&lD(this,yD,zD).call(this,e,L,E,M,i.length,i[0]?.length??0),i.length}function AD(t,e,n){for(let o=0;o<e.length;o++){const i=e[o],s=o+n.dataRowOffset,r=t.getRow(s);if(I(n.rowsHeights[o])&&(r.height=.75*n.rowsHeights[o]),n.hasRowHeaders){const t=r.getCell(1);t.value=n.rowHeaders[o]??null,n.headerFill&&(t.fill=n.headerFill),n.headerBorder&&(t.border=n.headerBorder)}lD(this,uD,OD).call(this,r,i,o,n),r.commit()}}function OD(t,e,n,o){for(let i=0;i<e.length;i++){const s=e[i],r=t.getCell(i+o.dataColOffset),a=o.cellsMeta[n][i],l=o.summaryMap.get(`${n}:${i}`),h=o.sourceData?.[n][i],{value:c,numFmt:d}=lD(this,pD,ND).call(this,s,a,h,l,o);r.value=c,d&&(r.numFmt=d);const u=eD(o.cellElements[n][i],a.className,o.rootDocument,o.rootWindow);lD(this,gD,DD).call(this,r,a,u,o),o.hasReadOnlyCells&&(r.protection={locked:!0===a.readOnly})}}function DD(t,e,n,o){const i=iD(e);i&&(t.alignment=i);const s=function(t){if(!t?.borders)return null;const{borders:e}=t,n={};return["top","bottom","left","right"].forEach(t=>{var o;e[t]&&e[t].width>0&&(n[t]={style:(o=e[t].width,o>=3?"thick":2===o?"medium":"thin"),color:{argb:nD(e[t].color)}})}),Object.keys(n).length>0?n:null}(e);s&&(t.border=s);const r=function(t,e=null){const n=!0===t?.readOnly,o=e?.fontBold||!1,i=e?.fontItalic||!1,s=e?.fontUnderline||!1,r=e?.fontColor??null;if(!(o||i||s||r||n))return null;const a={};return o&&(a.bold=!0),i&&(a.italic=!0),s&&(a.underline=!0),r?a.color={argb:nD(r)}:n&&(a.color={argb:"FF808080"}),Object.keys(a).length>0?a:null}(e,n);r&&(t.font=r);const a=function(t,e=null){let n=null;return e?.backgroundColor?n=nD(e.backgroundColor):!0===t?.readOnly&&(n="FFF0F0F0"),n?{type:"pattern",pattern:"solid",fgColor:{argb:n}}:null}(e,n);a&&(t.fill=a);const l=function(t,e){return t&&e?"dropdown"!==t.type&&"autocomplete"!==t.type||!Array.isArray(t.source)?null:{type:"list",allowBlank:!0,formulae:[e]}:null}(e,Array.isArray(e.source)?o.validationMap.get(JSON.stringify(e.source))??null:null);l&&(t.dataValidation=l),e.comment?.value&&(t.note=String(e.comment.value))}function ND(t,e,n,o,i){const{exportFormulas:s,formulasSeparator:r,dataRowOffset:a,dataColOffset:l,excludedHiddenRows:h,excludedHiddenCols:c}=i;if(o&&s){const n=function(t,e,n){const o=UO[t.type];if(!o)return null;const i=jO(t.sourceCol+n);return{formula:`${o}(${t.sourceRanges.map(([t,n])=>{const o=t+e,s=n+e;return o===s?`${i}${o}`:`${i}${o}:${i}${s}`}).join(",")})`}}(o,a,l),i=lD(this,fD,PD).call(this,t,e);return{value:n?{...n,result:t}:i,numFmt:null}}if(s&&("string"==typeof(d=n)&&d.startsWith("=")))return{value:{formula:qO(n,r,a-1,l-1,h,c)},numFmt:null};var d;if("date"===e.type||"intl-date"===e.type){const e=rD(t);if(null!==e)return{value:e,numFmt:"mm-dd-yy"}}if("time"===e.type||"intl-time"===e.type){const e=function(t){if(!t)return null;const e=String(t).trim(),n=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(n){const t=parseInt(n[1],10),e=parseInt(n[2],10),o=n[3]?parseInt(n[3],10):0;return t>23||e>59||o>59?null:(3600*t+60*e+o)/86400}const o=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(AM|PM)$/i);if(o){let t=parseInt(o[1],10);const e=parseInt(o[2],10),n=o[3]?parseInt(o[3],10):0,i=o[4].toUpperCase();return t>12||e>59||n>59?null:("AM"===i&&12===t?t=0:"PM"===i&&12!==t&&(t+=12),(3600*t+60*e+n)/86400)}return null}(t);if(null!==e)return{value:e,numFmt:"h:mm:ss"}}return"checkbox"===e.type?{value:lD(this,mD,WD).call(this,t,e),numFmt:null}:"multiselect"===e.type?{value:lD(this,wD,LD).call(this,t),numFmt:null}:"numeric"===e.type?{value:lD(this,fD,PD).call(this,t,e),numFmt:aD(e.numericFormat,e.locale)}:{value:lD(this,fD,PD).call(this,t,e),numFmt:null}}function PD(t,e){if(null==t)return null;if("numeric"===e.type){if("number"==typeof t)return t;const e=Number(t);return Number.isNaN(e)?H(t):e}return H(t)}function WD(t,e){return t===(e.checkedTemplate??!0)}function LD(t){return Array.isArray(t)?0===t.length?null:t.map(t=>null!==t&&"object"==typeof t?t.value:t).join(", "):null==t?null:H(t)}function BD(t){return t?.backgroundColor?{type:"pattern",pattern:"solid",fgColor:{argb:nD(t.backgroundColor)}}:null}function VD(t){if(!t?.border)return null;const{style:e="thin",color:n}=t.border,o=n?{style:e,color:{argb:nD(n)}}:{style:e};return{top:o,bottom:o,left:o,right:o}}function FD(){const{compression:t}=this.options;let e=null;return!0===t?e=6:"number"==typeof t&&t>=1&&t<=9&&(e=t),null===e?{}:{zip:{compression:"DEFLATE",compressionOptions:{level:e}}}}function zD(t,e,n,o,i,s){0!==i&&0!==s&&e.forEach(({rows:e,cols:r,rules:a})=>{if(!a||0===a.length)return;const l=(e?e[0]:0)+n,h=(e?e[1]:i-1)+n,c=(r?r[0]:0)+o,d=(r?r[1]:s-1)+o;t.addConditionalFormatting({ref:lD(this,SD,$D).call(this,l,c,h,d),rules:a})})}function $D(t,e,n,o){return`${jO(e)}${t}:${jO(o)}${n}`}function UD(t,e,n){n&&(t.getColumn(1).width=5);const o=n?1:0;for(let n=0;n<e.length;n++)t.getColumn(n+1+o).width=Math.max(e[n]/7,1)}function jD(t,e,n){const o=n?1:0;e.forEach(e=>{t.getColumn(e+1+o).hidden=!0})}function YD(t,e,n){e.forEach(e=>{t.getRow(e+n).hidden=!0})}function GD(t,e,n,o,i,s){const r=e>0||n>0;if(!r&&!s)return;const a={};s&&(a.rightToLeft=!0),r&&(a.state="frozen",a.xSplit=n+(i?1:0),a.ySplit=e+o),t.views=[a]}function qD(t,e,n,o,i,s,r){const a=t.getRow(1);if(o){const t=a.getCell(1);t.value="",s&&(t.fill=s),r&&(t.border=r)}for(let t=0;t<e.length;t++){const o=a.getCell(t+i);o.value=e[t]??null;const l=oD(n[t]);l&&(o.alignment=l),s&&(o.fill=s),r&&(o.border=r)}a.commit()}function KD(t,e,n,o,i,s){for(let r=0;r<e.length;r++){const a=e[r],l=t.getRow(r+1);if(n&&0===r){const t=l.getCell(1);t.value="",i&&(t.fill=i),s&&(t.border=s)}let h=o;a.forEach(t=>{const e=l.getCell(h);e.value=t.label??null;const n=oD(t.className);n&&(e.alignment=n),i&&(e.fill=i),s&&(e.border=s),h+=t.colspan}),l.commit()}}function XD(t,e,n,o){n&&e.length>1&&t.mergeCells(1,1,e.length,1);for(let n=0;n<e.length;n++){const i=e[n],s=n+1;let r=o;i.forEach(e=>{e.colspan>1&&t.mergeCells(s,r,s,r+e.colspan-1),r+=e.colspan})}}function ZD(t,e){const n=new Map;for(let t=0;t<e.length;t++)for(let o=0;o<e[t].length;o++){const i=e[t][o];if(("dropdown"===i.type||"autocomplete"===i.type)&&Array.isArray(i.source)&&i.source.length>0){const t=JSON.stringify(i.source);n.has(t)||n.set(t,i.source)}}if(0===n.size)return new Map;const o=new Set(t.worksheets.map(t=>t.name));let i="_HotValidation",s=1;for(;o.has(i);)i=`_HotValidation${s}`,s+=1;const r=t.addWorksheet(i);r.state="veryHidden";const a=new Map;let l=1;return n.forEach((t,e)=>{for(let e=0;e<t.length;e++){const n=t[e];r.getCell(e+1,l).value=Pt(n)?String(n.value):String(n)}const n=jO(l),o=`'${i.replace(/'/g,"''")}'!$${n}$1:$${n}$${t.length}`;a.set(e,o),l+=1}),a}const QD="csv",JD="xlsx",tN={[QD]:class extends _O{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",sanitizeValues:!1}}_mergeOptions(t){const e=super._mergeOptions(t),n={};return"hide"===e.exportHiddenRows&&(n.exportHiddenRows=!1),"hide"===e.exportHiddenColumns&&(n.exportHiddenColumns=!1),Object.keys(n).length>0?Ct(e,n):e}export(){const t=this.options,e=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const o=n.length>0,i=this.dataProvider.getRowHeaders(),s=i.length>0;let r=t.bom?String.fromCharCode(65279):"";return o&&(n=n.map(e=>this._escapeCell(e,{force:!0,sanitizeValue:t.sanitizeValues})),s&&(r+=t.columnDelimiter),r+=n.join(t.columnDelimiter),r+=t.rowDelimiter),e.forEach((e,n)=>{n>0&&(r+=t.rowDelimiter),s&&(r+=this._escapeCell(i[n],{sanitizeValue:t.sanitizeValues}),r+=t.columnDelimiter);const o=e.map(e=>this._escapeCell(e,{sanitizeValue:t.sanitizeValues})).join(t.columnDelimiter);r+=o}),r}_escapeCell(t,{force:e=!1,sanitizeValue:n=!1}={}){let o=H(t);return""===o||(n&&(e=!0),n instanceof RegExp?o=HO(this,FO,$O).call(this,o,n):"function"==typeof n?o=n(o):n&&(o=HO(this,VO,zO).call(this,o)),(e||o.indexOf(AO)>=0||o.indexOf(OO)>=0||o.indexOf(DO)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`)),o}constructor(...t){super(...t),IO(this,VO),IO(this,FO)}},[JD]:class extends _O{static get BINARY(){return!0}get binary(){return!0}static get DEFAULT_OPTIONS(){return{mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",fileExtension:"xlsx",bom:!1,engine:null,compression:null,conditionalFormatting:[],exportFormulas:!1,headerStyle:{backgroundColor:"#F2F2F2",border:{style:"thin"}}}}async export(){const{engine:t}=this.options;t&&"function"==typeof t.Workbook||bt("Missing or invalid ExcelJS engine. Pass the ExcelJS module via the `engines` option in the exportFile plugin settings: `exportFile: { engines: { xlsx: ExcelJS } }`.");const{sheets:e}=this.options;(e&&e.length>0?new Set(e.map(t=>t.instance.rootDocument)):new Set([this.dataProvider.hot.rootDocument])).forEach(t=>function(t){XO.delete(t),ZO.delete(t)}(t));const n=new t.Workbook;if(e&&e.length>0){const t=new Set;e.forEach(e=>{const o=new TO(e.instance),i="columnHeaders"in e&&!("colHeaders"in e)?{...e,colHeaders:e.columnHeaders}:e,s={...this.options,...i};o.setOptions(s);const r=e.name||"Sheet";let a=r,l=1;for(;t.has(a);)a=`${r}${l}`,l+=1;t.add(a);const h=n.addWorksheet(a);lD(this,cD,ID).call(this,n,h,o,s)})}else{const t=n.addWorksheet("Sheet1");lD(this,cD,ID).call(this,n,t,this.dataProvider,this.options)}return n.xlsx.writeBuffer(lD(this,CD,FD).call(this))}constructor(...t){super(...t),hD(this,cD),hD(this,dD),hD(this,uD),hD(this,gD),hD(this,pD),hD(this,fD),hD(this,mD),hD(this,wD),hD(this,bD),hD(this,vD),hD(this,CD),hD(this,yD),hD(this,SD),hD(this,kD),hD(this,RD),hD(this,xD),hD(this,ED),hD(this,MD),hD(this,TD),hD(this,_D),hD(this,HD)}}};function eN(t){const e=t.getSettings(),n=!(!e.colHeaders&&!e.nestedHeaders),o=!!e.rowHeaders,i=t.getSelectedRangeLast(),s={colHeaders:n,rowHeaders:o};return!i||i.isSingleCell()||i.from.row<0&&i.from.col<0?s:{...s,range:[Math.max(0,Math.min(i.from.row,i.to.row)),Math.max(0,Math.min(i.from.col,i.to.col)),Math.max(i.from.row,i.to.row),Math.max(i.from.col,i.to.col)]}}function nN(t){const{fragment:e}=_`
|
|
245
|
+
<div class="${Oy}__content">
|
|
246
|
+
<i class="${Oy}__icon">
|
|
247
|
+
<svg class="${Oy}__icon-svg"
|
|
248
|
+
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
|
249
|
+
<path stroke="currentColor" stroke-width="2" d="M15 8a7 7 0 1 1-3.5-6.062"></path>
|
|
250
|
+
</svg>
|
|
251
|
+
</i>
|
|
252
|
+
<div class="${Oy}__text">
|
|
253
|
+
<h2 class="${Oy}__title">${t}</h2>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
`;return e}function oN(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function iN(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)}const sN="exportFile";var rN=new WeakSet,aN=new WeakSet;class lN extends Qk{static get PLUGIN_KEY(){return sN}static get PLUGIN_PRIORITY(){return 240}static get SETTING_KEYS(){return[sN]}isEnabled(){return!0}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(...t)=>oN(this,rN,hN).call(this,...t)),super.enablePlugin())}disablePlugin(){super.disablePlugin()}exportAsString(t,e={}){const n=this._createTypeFormatter(t,e);return n.binary&&bt(`Export format type "${t}" cannot be exported as a string (binary format).`),n.export()}exportAsBlob(t,e={}){const n=this._createTypeFormatter(t,e);return n.binary&&bt(`exportAsBlob() does not support binary formats such as "${t}". Use exportAsBlobAsync() instead.`),this._createBlob(n)}async exportAsBlobAsync(t,e={}){return this._createBlob(this._createTypeFormatter(t,e))}downloadFile(t,e={}){const n=this._createTypeFormatter(t,e);n.binary&&bt(`downloadFile() does not support binary formats such as "${t}". Use downloadFileAsync() instead.`);const o=`${n.options.filename}.${n.options.fileExtension}`;oN(this,aN,cN).call(this,this._createBlob(n),o)}async downloadFileAsync(t,e={}){const n=this._createTypeFormatter(t,e),o=this.hot.getPlugin("dialog"),i=o?.isEnabled(),{rootWindow:s}=this.hot,r=`${n.options.filename}.${n.options.fileExtension}`,a=async()=>{const t=await Promise.resolve(this._createBlob(n));oN(this,aN,cN).call(this,t,r)};if(i&&n.binary){o.show({content:nN(this.hot.getTranslatedPhrase(Cd)),customClassName:Oy,background:"semi-transparent",closable:!1,animation:!1}),await new Promise(t=>{s.requestAnimationFrame(()=>{s.requestAnimationFrame(t)})});try{await a()}finally{o.hide()}}else await a()}supportsExportFormat(t){if(!tN[t])return!1;if("xlsx"===t){const t=this.hot.getSettings()[sN];return Et(t)&&Et(t.engines)&&Boolean(t.engines.xlsx)}return!0}_createTypeFormatter(t,e={}){tN[t]||bt(`Export format type "${t}" is not supported.`);const n=this.hot.getSettings()[sN],o=Et(n)&&Et(n.engines)?n.engines:void 0,i=o?.[t],s=void 0!==i?{engine:i,...e}:e;return function(t,e,n){return"function"==typeof tN[t]?new tN[t](e,n):null}(t,new TO(this.hot),s)}_createBlob(t){"undefined"==typeof Blob&&bt("Blob is not available in this environment.");const e=t.export();return"function"==typeof e?.then?e.then(e=>new Blob([e],{type:t.options.mimeType})):new Blob([e],{type:`${t.options.mimeType};charset=${t.options.encoding}`})}constructor(...t){super(...t),iN(this,rN),iN(this,aN)}}function hN(t){var e;t.items.push({name:"---------"},(e=this,{key:"export_file",name(){return this.getTranslatedPhrase(Uh)},hidden(){return void 0===this.getSettings()[sN]},submenu:{items:[{key:"export_file:csv",name(){return this.getTranslatedPhrase(jh)},callback(){e.downloadFile("csv",eN(this))},disabled:!1},{key:"export_file:xlsx",name(){return this.getTranslatedPhrase(Yh)},callback(){e.downloadFileAsync("xlsx",eN(this)).catch(t=>{te("ExportFile: XLSX export failed.",t)})},hidden:()=>!e.supportsExportFormat("xlsx")}]}}))}function cN(t,e){const{rootDocument:n,rootWindow:o}=this.hot,i=o.URL||o.webkitURL,s=i.createObjectURL(t),r=n.createElement("a");r.style.display="none",r.setAttribute("href",s),r.setAttribute("download",e),n.body.appendChild(r),r.dispatchEvent(new MouseEvent("click")),n.body.removeChild(r),this.hot._registerTimeout(()=>{i.revokeObjectURL(s)},100)}class dN{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(){bt("The state setting logic is not implemented")}saveState(t){this.state&&this.state.setValueAtIndex(t,this.getState())}getState(){bt("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}constructor(t,{id:e,stateless:n=!0}){this.elements=[],this.hidden=!1,this.stateId="",this.hot=t,this.id=e,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new Ol)}}Rt(dN,Fs);const uN={};function gN(t,e){uN[t]||bt(`Filter condition "${t}" does not exist.`);const{condition:n,descriptor:o}=uN[t];let i=e;return o.inputValuesDecorator&&(i=o.inputValuesDecorator(i)),function(t){return n.apply(t.meta.instance,[].concat([t],[i]))}}function pN(t){return uN[t]||bt(`Filter condition "${t}" does not exist.`),uN[t].descriptor}function fN(t,e,n){n.key=t,uN[t]={condition:e,descriptor:n}}const mN="none";fN(mN,function(){return!0},{name:kc,inputsCount:0,showOperators:!1});const wN="empty";fN(wN,function(t){return O(t.value)},{name:Rc,inputsCount:0,showOperators:!0});const bN="not_empty";fN(bN,function(t,e){return!gN(wN,e)(t)},{name:xc,inputsCount:0,showOperators:!0});const vN="eq";fN(vN,function(t,[e]){return H(t.value).toLocaleLowerCase(t.meta.locale)===H(e)},{name:Ec,inputsCount:1,showOperators:!0});const CN="neq";fN(CN,function(t,e){return!gN(vN,e)(t)},{name:Mc,inputsCount:1,showOperators:!0});fN("gt",function(t,[e]){let n=e;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value>n},{name:Oc,inputsCount:1,showOperators:!0});fN("gte",function(t,[e]){let n=e;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value>=n},{name:Dc,inputsCount:1,showOperators:!0});fN("lt",function(t,[e]){let n=e;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value<n},{name:Nc,inputsCount:1,showOperators:!0});fN("lte",function(t,[e]){let n=e;return"numeric"===t.meta.type&&(n=parseFloat(n,10)),t.value<=n},{name:Pc,inputsCount:1,showOperators:!0});const yN="date_after";fN(yN,function(t,[e]){const n=$b(t.value,t.meta.dateFormat),o=$b(e,t.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)>=0},{name:Bc,inputsCount:1,showOperators:!0});const SN="date_before";fN(SN,function(t,[e]){const n=$b(t.value,t.meta.dateFormat),o=$b(e,t.meta.dateFormat);return!(!n.isValid()||!o.isValid())&&n.diff(o)<=0},{name:Vc,inputsCount:1,showOperators:!0});const kN="between";fN(kN,function(t,[e,n]){let o=e,i=n;if("numeric"===t.meta.type){const t=parseFloat(o,10),e=parseFloat(i,10);o=Math.min(t,e),i=Math.max(t,e)}else if("date"===t.meta.type){const e=gN(SN,[i]),n=gN(yN,[o]);return e(t)&&n(t)}return t.value>=o&&t.value<=i},{name:Wc,inputsCount:2,showOperators:!0});const RN="not_between";fN(RN,function(t,e){return!gN(kN,e)(t)},{name:Lc,inputsCount:2,showOperators:!0});const xN="begins_with";fN(xN,function(t,[e]){return H(t.value).toLocaleLowerCase(t.meta.locale).startsWith(H(e))},{name:Tc,inputsCount:1,showOperators:!0});const EN="ends_with";fN(EN,function(t,[e]){return H(t.value).toLocaleLowerCase(t.meta.locale).endsWith(H(e))},{name:_c,inputsCount:1,showOperators:!0});const MN="contains";fN(MN,function(t,[e]){return H(t.value).toLocaleLowerCase(t.meta.locale).indexOf(H(e))>=0},{name:Hc,inputsCount:1,showOperators:!0});const TN="not_contains";fN(TN,function(t,e){return!gN(MN,e)(t)},{name:Ic,inputsCount:1,showOperators:!0});const _N="date_tomorrow";fN(_N,function(t){const e=$b(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame($b().subtract(-1,"days").startOf("day"),"d")},{name:zc,inputsCount:0});const HN="date_today";fN(HN,function(t){const e=$b(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame($b().startOf("day"),"d")},{name:Fc,inputsCount:0});const IN="date_yesterday";fN(IN,function(t){const e=$b(t.value,t.meta.dateFormat);return!!e.isValid()&&e.isSame($b().subtract(1,"days").startOf("day"),"d")},{name:$c,inputsCount:0});const AN="intl_date_before";fN(AN,function(t,[e]){const n=Ev(t.value),o=Ev(e);return null!==n&&null!==o&&n<=o},{name:Vc,inputsCount:1,showOperators:!0,inputType:"date"});const ON="intl_date_after";fN(ON,function(t,[e]){const n=Ev(t.value),o=Ev(e);return null!==n&&null!==o&&n>=o},{name:Bc,inputsCount:1,showOperators:!0,inputType:"date"});const DN="intl_date_between";fN(DN,function(t,[e,n]){const o=gN(AN,[n]),i=gN(ON,[e]);return o(t)&&i(t)},{name:Wc,inputsCount:2,showOperators:!0,inputType:"date"});const NN="intl_date_tomorrow";fN(NN,function(t){const e=Ev(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:zc,inputsCount:0,inputType:"date"});const PN="intl_date_today";fN(PN,function(t){const e=Ev(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:Fc,inputsCount:0,inputType:"date"});const WN="intl_date_yesterday";fN(WN,function(t){const e=Ev(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:$c,inputsCount:0,inputType:"date"});const LN="intl_time_before";fN(LN,function(t,[e]){const n=_v(t.value),o=_v(e);return null!==n&&null!==o&&n<=o},{name:Vc,inputsCount:1,showOperators:!0,inputType:"time"});const BN="intl_time_after";fN(BN,function(t,[e]){const n=_v(t.value),o=_v(e);return null!==n&&null!==o&&n>=o},{name:Bc,inputsCount:1,showOperators:!0,inputType:"time"});const VN="intl_time_between";function FN(t,e){let n=t;return""===n&&(n=`(${e})`),n}function zN(t){const e=new Set(t);return function(t){return e.has(t)}}function $N(t){return null==t?"":t}function UN(t){return Array.from(new Set(t)).map(t=>$N(t)).sort((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:t===e?0:t>e?1:-1)}function jN(t,e,n,o){const i=[],s=t===e;let r;return s||(r=zN(e)),t.forEach(t=>{let e=!1;(s||r(t))&&(e=!0);const a={checked:e,value:t,visualValue:FN(t,n)};o&&o(a),i.push(a)}),i}fN(VN,function(t,[e,n]){const o=gN(LN,[n]),i=gN(BN,[e]);return o(t)&&i(t)},{name:Wc,inputsCount:2,showOperators:!0,inputType:"time"}),function(t,e={}){Vt||(Vt="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 YN="by_value";fN(YN,function(t,[e]){return e(t.value)},{name:"By value",inputsCount:0,inputValuesDecorator:([t])=>[zN(t)],showOperators:!1});const GN={};function qN(t,e,n){GN[t]={name:e,func:n}}const KN="conjunction";qN(KN,Yc,function(t,e){return t.every(t=>t.func(e))});const XN="disjunction";qN(XN,Gc,function(t,e){return t.some(t=>t.func(e))});const ZN="disjunctionWithExtraCondition";qN(ZN,Gc,function(t,e){return t.length<3&&bt("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 QN="numeric",JN="text",tP="date",eP="intl-date",nP="intl-time",oP={[QN]:[mN,jM,wN,bN,jM,vN,CN,jM,"gt","gte","lt","lte",kN,RN],[JN]:[mN,jM,wN,bN,jM,vN,CN,jM,xN,EN,jM,MN,TN],[tP]:[mN,jM,wN,bN,jM,vN,CN,jM,SN,yN,kN,jM,_N,HN,IN],[eP]:[mN,jM,wN,bN,jM,vN,CN,jM,AN,ON,DN,jM,NN,PN,WN],[nP]:[mN,jM,wN,bN,jM,vN,CN,jM,jM,xN,EN,jM,MN,TN,jM,LN,BN,VN]};const iP="built",sP="building",rP=["click","input","keydown","keypress","keyup","focus","blur","change"];let aP=class t{static get DEFAULTS(){return kt({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}setValue(t){this.options.value=t,this.update()}getValue(){return this.options.value}get element(){return this.buildState===sP?this._element:this.buildState===iP?(this.update(),this._element):(this.buildState=sP,this.build(),this.buildState=iP,this._element)}isBuilt(){return this.buildState===iP}translateIfPossible(t){return"string"==typeof t&&t.startsWith(yc)?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=sP),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(rP,n=>t(e,n))}else x(rP,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}constructor(e,n){this.eventManager=new Fn(this),this.hot=e,this.options=Ct(t.DEFAULTS,n),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}};function lP(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hP(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function cP(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,hP(t,e,"get"))}function dP(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,hP(t,e,"set"),n),n}function uP(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}Rt(aP,Fs);var gP=new WeakMap,pP=new WeakSet;class fP extends aP{static get DEFAULTS(){return kt({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}registerHooks(){this.addLocalHook("keyup",t=>uP(this,pP,mP).call(this,t)),this.addLocalHook("input",t=>uP(this,pP,mP).call(this,t))}build(){super.build();const t=this.hot.rootDocument.createElement("div");dP(this,gP,this._element.firstChild),ue(this._element,"htUIInput"),ue(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(cP(this,gP).type=this.options.type,cP(this,gP).placeholder=this.translateIfPossible(this.options.placeholder),cP(this,gP).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&cP(this,gP).focus()}constructor(t,e){var n,o;super(t,Ct(fP.DEFAULTS,e)),lP(n=this,o=pP),o.add(n),function(t,e,n){lP(t,e),e.set(t,n)}(this,gP,{writable:!0,value:void 0}),this.registerHooks()}}function mP(t){this.options.value=t.target.value}function wP(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bP(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function vP(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,bP(t,e,"get"))}function CP(t,e,n){wP(t,e),e.set(t,n)}function yP(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,bP(t,e,"set"),n),n}function SP(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function kP(t,e){wP(t,e),e.add(t)}var RP=new WeakMap,xP=new WeakMap,EP=new WeakMap,MP=new WeakMap,TP=new WeakMap,_P=new WeakSet,HP=new WeakSet,IP=new WeakSet;class AP extends aP{static get DEFAULTS(){return kt({className:"htUISelect",wrapIt:!1,tabIndex:-1})}getMenu(){return vP(this,RP)}registerHooks(){this.addLocalHook("click",()=>SP(this,IP,NP).call(this))}setItems(t){yP(this,xP,this.translateNames(t)),vP(this,RP)&&vP(this,RP).setMenuItems(vP(this,xP))}translateNames(t){return x(t,t=>{t.name=this.translateIfPossible(t.name)}),t}build(){super.build(),yP(this,RP,new __(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),vP(this,RP).setMenuItems(vP(this,xP));const t=new aP(this.hot,{className:"htUISelectCaption"}),e=new aP(this.hot,{className:"htUISelectDropdown"});yP(this,EP,t),yP(this,MP,t.element),yP(this,TP,e),this.hot.getSettings().ariaTags&&(pe(e.element,[["aria-hidden","true"]]),pe(this._element,[["role","listbox"]])),x([t,e],t=>this._element.appendChild(t.element)),vP(this,RP).addLocalHook("select",t=>SP(this,_P,OP).call(this,t)),vP(this,RP).addLocalHook("afterClose",()=>SP(this,HP,DP).call(this)),this.update()}update(){if(!this.isBuilt())return;let t;t=this.options.value?this.options.value.name:vP(this,RP).hot.getTranslatedPhrase(kc),vP(this,MP).textContent=t,super.update()}openOptions(){const t=this.element.getBoundingClientRect();vP(this,RP)&&(vP(this,RP).open(),vP(this,RP).setPosition({left:this.hot.isLtr()?t.left-5:t.left-31,top:t.top-1,width:t.width,height:t.height}),vP(this,RP).getNavigator().toFirstItem(),vP(this,RP).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{this.closeOptions(),this.runLocalHooks("tabKeydown",t)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){vP(this,RP)&&vP(this,RP).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){vP(this,RP)&&(vP(this,RP).destroy(),yP(this,RP,null)),vP(this,EP)&&vP(this,EP).destroy(),vP(this,TP)&&vP(this,TP).destroy(),super.destroy()}constructor(t,e){super(t,Ct(AP.DEFAULTS,e)),kP(this,_P),kP(this,HP),kP(this,IP),CP(this,RP,{writable:!0,value:void 0}),CP(this,xP,{writable:!0,value:void 0}),CP(this,EP,{writable:!0,value:void 0}),CP(this,MP,{writable:!0,value:void 0}),CP(this,TP,{writable:!0,value:void 0}),yP(this,RP,null),yP(this,xP,[]),this.registerHooks()}}function OP(t){t.name!==jM&&(this.options.value=t,this.update(),this.runLocalHooks("select",this.options.value))}function DP(){this.runLocalHooks("afterClose")}function NP(){this.openOptions()}function PP(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function WP(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 LP=new WeakSet,BP=new WeakSet;class VP extends dN{registerHooks(){this.getSelectElement().addLocalHook("select",t=>PP(this,LP,FP).call(this,t)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",t=>this.runLocalHooks("selectTabKeydown",t)),x(this.getInputElements(),t=>{t.addLocalHook("keydown",t=>PP(this,BP,zP).call(this,t))})}setState(t){if(this.reset(),!t)return;const e=kt(t.command);e.name.startsWith(Sc)&&(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()||pN(mN),e=[];return x(this.getInputElements(),(n,o)=>{t.inputsCount>o&&e.push(n.getValue())}),{command:t,args:e}}updateState(t,e){const n=pN(t?t.name:mN);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 AP)[0]}getInputElement(t=0){return this.getInputElements()[t]}getInputElements(){return this.elements.filter(t=>t instanceof fP)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,n,o,i,s)=>{ue(e.parentNode,"htFiltersMenuCondition"),this.addSeparator&&ue(e.parentNode,"border");const r=this.hot.rootDocument.createElement("div");return ue(r,"htFiltersMenuLabel"),r.textContent=s,e.appendChild(r),e.parentElement.hasAttribute("ghost-table")||x(this.elements,t=>e.appendChild(t.element)),e}}}reset(){const t=this.hot.getPlugin("filters").getSelectedColumn();let e=[pN(mN)];if(null!==t){const{visualIndex:n}=t;e=function(t){const e=[];let n=t;return oP[n]||(n=JN),x(oP[n],t=>{let n;n=t===jM?{name:jM}:kt(pN(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])}constructor(t,e){super(t,{id:e.id,stateless:!1}),WP(this,LP),WP(this,BP),this.name="",this.addSeparator=!1,this.name=e.name,this.addSeparator=e.addSeparator,this.elements.push(new AP(this.hot,{menuContainer:e.menuContainer})),this.elements.push(new fP(this.hot,{placeholder:td})),this.elements.push(new fP(this.hot,{placeholder:ed})),this.registerHooks()}}function FP(t){x(this.getInputElements(),(e,n)=>{e[t.inputsCount>n?"show":"hide"](),e.options.type=t.inputType??"text",0===n&&this.hot._registerTimeout(()=>e.focus(),10)}),this.runLocalHooks("change",t)}function zP(t){rn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),an(t))}function $P(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function UP(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,$P(t,e,"get"))}function jP(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 YP(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,$P(t,e,"set"),n),n}var GP=new WeakMap,qP=new WeakMap;class KP extends aP{static get DEFAULTS(){return kt({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}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),YP(this,qP,t),YP(this,GP,this._element.firstChild),UP(this,GP).checked=this.options.checked,this._element.appendChild(t),this.update()}update(){this.isBuilt()&&(UP(this,qP).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&UP(this,GP).checked}setChecked(t=!0){this.isBuilt()&&(UP(this,GP).checked=t)}focus(){this.isBuilt()&&UP(this,GP).focus()}constructor(t,e){super(t,Ct(KP.DEFAULTS,e)),jP(this,GP,{writable:!0,value:void 0}),jP(this,qP,{writable:!0,value:void 0})}}function XP(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 ZP=new WeakSet;class QP extends dN{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=[KN,XN];x(t,e=>{const n=new KP(this.hot,{name:"operator",label:{htmlFor:e,textContent:(o=e,GN[o].name)},value:e,checked:e===t[0],id:e});var o;n.addLocalHook("change",t=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,ZP,JP).call(this,t)),this.elements.push(n)})}setChecked(t){this.elements.length<t&&bt(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 KP&&t.isChecked());return t?t.getValue():KN}getState(){return this.getActiveOperationId()}setState(t){this.reset(),t&&this.getActiveOperationId()!==t&&x(this.elements,e=>{e.setChecked(e.getValue()===t)})}updateState(t=KN,e){let n=t;n===ZN&&(n=XN),this.state.setValueAtIndex(e,n)}reset(){this.setChecked(0)}constructor(t,e){super(t,{id:e.id,stateless:!1}),XP(this,ZP),this.name="",this.name=e.name,this.buildOperatorsElement()}}function JP(t){this.setState(t.target.value)}function tW(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function eW(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,tW(t,e,"get"))}function nW(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 oW(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,tW(t,e,"set"),n),n}var iW=new WeakMap;class sW extends aP{static get DEFAULTS(){return kt({href:"#",tagName:"a",tabIndex:-1,role:"button"})}build(){super.build(),oW(this,iW,this._element.firstChild)}update(){this.isBuilt()&&(eW(this,iW).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&eW(this,iW).focus()}activate(){eW(this,iW).click()}constructor(t,e){super(t,Ct(sW.DEFAULTS,e)),nW(this,iW,{writable:!0,value:void 0})}}function rW(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aW(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function lW(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,aW(t,e,"get"))}function hW(t,e,n){rW(t,e),e.set(t,n)}function cW(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,aW(t,e,"set"),n),n}function dW(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function uW(t,e){rW(t,e),e.add(t)}const gW="multipleSelect.itemBox";var pW=new WeakMap,fW=new WeakMap,mW=new WeakMap,wW=new WeakMap,bW=new WeakMap,vW=new WeakMap,CW=new WeakSet,yW=new WeakSet,SW=new WeakSet,kW=new WeakSet;class RW extends aP{static get DEFAULTS(){return kt({className:"htUIMultipleSelect",value:[]})}getItemsBox(){return lW(this,fW)}registerHooks(){lW(this,wW).addLocalHook("keydown",t=>dW(this,yW,EW).call(this,t)),lW(this,wW).addLocalHook("input",t=>dW(this,CW,xW).call(this,t)),lW(this,bW).addLocalHook("click",t=>dW(this,SW,MW).call(this,t)),lW(this,vW).addLocalHook("click",t=>dW(this,kW,TW).call(this,t))}setItems(t){cW(this,pW,t),lW(this,fW)?.loadData(lW(this,pW))}setLocale(t){cW(this,mW,t)}getLocale(){return lW(this,mW)}getItems(){return[...lW(this,pW)]}getValue(){return function(t){const e=[];return t.forEach(t=>{t.checked&&e.push(t.value)}),e}(lW(this,pW))}getSearchInputElement(){return lW(this,wW)}getSelectAllElement(){return lW(this,bW)}getClearAllElement(){return lW(this,vW)}isSelectedAllValues(){return lW(this,pW).length===this.getValue().length}build(){super.build();const{rootDocument:t}=this.hot,e=t.createElement("div"),n=new aP(this.hot,{className:"htUISelectionControls",children:[lW(this,bW),lW(this,vW)]});this._element.appendChild(lW(this,wW).element),this._element.appendChild(n.element),this._element.appendChild(e),lW(this,fW)?.destroy(),ue(e,"htUIMultipleSelectHot"),cW(this,fW,new this.hot.constructor(e,{data:[[]],columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(t,e,n,o,i,s)=>{t.title=s.instance.getDataAtRowProp(e,s.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{lW(this,fW).listen()},modifyColWidth:e=>{const n=lW(this,fW).container.scrollWidth-Ve(t);return void 0!==e&&e<n?n:e},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"})),lW(this,fW).init();const o=lW(this,fW).getShortcutManager().getContext("grid");o.removeShortcutsByKeys(["Tab"]),o.removeShortcutsByKeys(["Shift","Tab"]),o.addShortcut({keys:[["Escape"]],callback:t=>{this.runLocalHooks("keydown",t,this)},group:gW}),o.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{lW(this,fW).deselectCell(),this.runLocalHooks("keydown",t,this),this.runLocalHooks("listTabKeydown",t,this)},group:gW})}focus(){this.isBuilt()&&lW(this,fW).listen()}reset(){lW(this,wW).reset(),lW(this,bW).reset(),lW(this,vW).reset()}update(){this.isBuilt()&&0!==lW(this,fW).rootElement.offsetHeight&&(lW(this,fW).updateSettings({data:_W(lW(this,pW),this.options.value)}),super.update())}destroy(){lW(this,fW)?.destroy(),lW(this,wW).destroy(),lW(this,vW).destroy(),lW(this,bW).destroy(),cW(this,wW,null),cW(this,vW,null),cW(this,bW,null),cW(this,fW,null),cW(this,pW,null),super.destroy()}constructor(t,e){super(t,Ct(RW.DEFAULTS,e)),uW(this,CW),uW(this,yW),uW(this,SW),uW(this,kW),hW(this,pW,{writable:!0,value:void 0}),hW(this,fW,{writable:!0,value:void 0}),hW(this,mW,{writable:!0,value:void 0}),hW(this,wW,{writable:!0,value:void 0}),hW(this,bW,{writable:!0,value:void 0}),hW(this,vW,{writable:!0,value:void 0}),cW(this,pW,[]),cW(this,wW,new fP(this.hot,{placeholder:Jc,className:"htUIMultipleSelectSearch"})),cW(this,bW,new sW(this.hot,{textContent:Kc,className:"htUISelectAll"})),cW(this,vW,new sW(this.hot,{textContent:Xc,className:"htUIClearAll"})),this.registerHooks()}}function xW(t){const e=t.target.value.trim().toLocaleLowerCase(this.getLocale());if("apply"===this.options.searchMode){const t=lW(this,fW).getPlugin("hiddenRows"),n=[];t.showRows(t.getHiddenRows()),lW(this,pW).forEach((t,o)=>{t.checked=`${t.value}`.toLocaleLowerCase(this.getLocale()).indexOf(e)>=0,t.checked||n.push(o)}),t.hideRows(n),lW(this,fW).view.adjustElementsSize(),lW(this,fW).render()}else{let t;t=""===e?[...lW(this,pW)]:lW(this,pW).filter(t=>`${t.value}`.toLocaleLowerCase(this.getLocale()).indexOf(e)>=0),lW(this,fW).loadData(t)}}function EW(t){this.runLocalHooks("keydown",t,this);Je(rn,t.keyCode)("ARROW_DOWN")&&(t.preventDefault(),an(t),lW(this,fW).listen(),lW(this,fW).selectCell(0,0))}function MW(t){const e=[];t.preventDefault(),lW(this,fW).getSourceData().forEach((t,n)=>{t.checked=!0,e.push(Sl(t,n)[0])}),lW(this,fW).setSourceDataAtCell(e)}function TW(t){const e=[];t.preventDefault(),lW(this,fW).getSourceData().forEach((t,n)=>{t.checked=!1,e.push(Sl(t,n)[0])}),lW(this,fW).setSourceDataAtCell(e)}function _W(t,e){const n=zN(e);return t.map(t=>(t.checked=n(t.value),t))}function HW(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function IW(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 AW=new WeakSet,OW=new WeakSet,DW=new WeakSet;class NW extends dN{registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",t=>HW(this,AW,PW).call(this,t)).addLocalHook("listTabKeydown",t=>this.runLocalHooks("listTabKeydown",t)),this.hot.addHook("modifyFiltersMultiSelectValue",(t,e)=>HW(this,DW,LW).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===YN){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?mN:YN},args:[t.getValue()],itemsSnapshot:e}}updateState(t){const e=(e,n,o,i,s)=>{const[r]=k(n,t=>t.name===YN),a={},l=this.hot.getTranslatedPhrase(qc);if(r){const n=i(e,s),h=R(n,t=>t.value),c=new Map(n.map(t=>[t.value,t.meta])),d=UN(h);o&&(r.args[0]=o);const u=[],g=jN(d,r.args[0],l,t=>{t.checked&&u.push(t.value),HW(this,OW,WW).call(this,t,c)}),p=t.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,p).locale,a.args=[u],a.command=pN(YN),a.itemsSnapshot=g}else a.args=[],a.command=pN(mN);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 RW)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden()||"function"==typeof this.hiddenWhen&&this.hiddenWhen(),renderer:(t,e,n,o,i,s)=>{ue(e.parentNode,"htFiltersMenuValue");const r=this.hot.rootDocument.createElement("div");return ue(r,"htFiltersMenuLabel"),r.textContent=s,e.appendChild(r),e.parentElement.hasAttribute("ghost-table")||x(this.elements,t=>e.appendChild(t.element)),e}}}reset(){const t=this.hot.getTranslatedPhrase(qc),e=this._getColumnVisibleValues(),n=e.map(t=>t.value),o=new Map(e.map(t=>[t.value,t.meta])),i=UN(n),s=jN(i,i,t,t=>{HW(this,OW,WW).call(this,t,o)});this.getMultipleSelectElement().setItems(s),super.reset(),this.getMultipleSelectElement().setValue(i);const r=this.hot.getPlugin("filters").getSelectedColumn();null!==r&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,r.visualIndex).locale)}_getColumnVisibleValues(){const t=this.hot.getPlugin("filters").getSelectedColumn();return null===t?[]:R(this.hot.getDataAtCol(t.visualIndex),(e,n)=>({value:$N(e),meta:this.hot.getCellMeta(n,t.visualIndex)}))}constructor(t,e){super(t,{id:e.id,stateless:!1}),IW(this,AW),IW(this,OW),IW(this,DW),this.name="",this.name=e.name,this.searchMode=e.searchMode,this.hiddenWhen=e.hiddenWhen,this.elements.push(new RW(this.hot,{searchMode:this.searchMode})),this.registerHooks()}}function PW(t){rn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),an(t)),rn(t.keyCode,"ENTER")&&("apply"===this.searchMode&&this.runLocalHooks("accept"),an(t))}function WW(t,e){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(t.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",t.visualValue,e.get(t.value)))}function LW(t,e){return e.valueFormatter?e.valueFormatter(t,e):t}function BW(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 VW=new WeakSet;class FW extends dN{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}registerHooks(){x(this.elements,t=>{t.addLocalHook("click",(t,e)=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,VW,zW).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")}constructor(t,e){super(t,{id:e.id,stateless:!0}),BW(this,VW),this.name="",this.name=e.name,this.elements.push(new fP(this.hot,{type:"button",value:Zc,className:"htUIButton htUIButtonOK",identifier:FW.BUTTON_OK})),this.elements.push(new fP(this.hot,{type:"button",value:Qc,className:"htUIButton htUIButtonCancel",identifier:FW.BUTTON_CANCEL})),this.registerHooks()}}function zW(t,e){e.options.identifier===FW.BUTTON_OK?this.accept():this.cancel()}const $W="ConditionCollection.filteringStates";class UW{isEmpty(){return 0===this.getFilteredColumns().length}isMatch(t,e){const n=this.filteringStates.getValueAtIndex(e),o=n?.conditions??[],i=n?.operation;return this.isMatchInConditions(o,t,i)}isMatchInConditions(t,e,n=KN){return!t.length||function(t){GN[t]||bt(`Operation with id "${t}" does not exist.`);const e=GN[t].func;return function(t,n){return e(t,n)}}(n)(t,e)}addCondition(t,e,n=KN,o){const i=this.hot.getCellMeta(0,t).locale,s=e.args.map(t=>"string"==typeof t?t.toLocaleLowerCase(i):t),r=e.name||e.command.key;this.runLocalHooks("beforeAdd",t);const a=this.getOperation(t);a?a!==n&&bt(T`The column of index ${t} has been already applied with a \`${a}\`\x20
|
|
257
|
+
filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
|
|
258
|
+
Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
|
|
259
|
+
use it consequently for a particular column).`):A(GN[n])&&bt(T`Unexpected operation named \`${n}\`. Possible ones are\x20
|
|
260
|
+
\`disjunction\` and \`conjunction\`.`);const l=this.getConditions(t);0===l.length?this.filteringStates.setValueAtIndex(t,{operation:n,conditions:[{name:r,args:s,func:gN(r,s)}]},o):l.push({name:r,args:s,func:gN(r,s)}),this.runLocalHooks("afterAdd",t)}getConditions(t){return this.filteringStates.getValueAtIndex(t)?.conditions??[]}getOperation(t){return this.filteringStates.getValueAtIndex(t)?.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(([t])=>t)}getColumnStackPosition(t){return this.getFilteredColumns().indexOf(t)}exportAllConditions(){return this.filteringStates.getEntries().reduce((t,[e,{operation:n,conditions:o}])=>(t.push({column:e,operation:n,conditions:o.map(({name:t,args:e})=>({name:t,args:[...e]}))}),t),[])}importAllConditions(t){this.clean(),t.forEach(t=>{t.conditions.forEach(e=>this.addCondition(t.column,e,t.operation))})}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($W),this.filteringStates=null,this.clearLocalHooks()}constructor(t,e=!0){this.filteringStates=new Ol,this.hot=t,this.isMapRegistrable=e,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap($W,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}}Rt(UW,Fs);class jW{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,e=[]){const n=[];return x(e,e=>{void 0!==e&&this.conditionCollection.isMatch(e,t)&&n.push(e)}),n}_getIntersectData(t,e){const n=[];return x(e,e=>{const o=e.meta.row;void 0!==t[o]&&(n[o]=t[o])}),n}constructor(t,e=()=>[]){this.conditionCollection=t,this.columnDataFactory=e}}function YW(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function GW(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 qW=new WeakSet,KW=new WeakSet,XW=new WeakSet;class ZW{groupChanges(){this.grouping=!0}flush(){this.grouping=!1,x(this.changes,t=>{this.updateStatesAtColumn(t)}),this.changes.length=0}updateStatesAtColumn(t,e){if(this.grouping)return void(-1===this.changes.indexOf(t)&&this.changes.push(t));const n=this.conditionCollection.exportAllConditions();let o=this.conditionCollection.getColumnStackPosition(t);-1===o&&(o=this.latestEditedColumnPosition);const i=n.slice(0,o),s=n.slice(o);s.length&&s[0].column===t&&s.shift();const r=function(t){const e=t.length;return function n(o){return function(...i){const s=o.concat(i);let r;return r=s.length>=e?t.apply(this,s):n(s),r}}([])}((t,e,n=[])=>{const o=new UW(this.hot,!1),i=[].concat(t,n);o.importAllConditions(i);const s=this.columnDataFactory(e);let r;r=o.isEmpty()?s:new jW(o,t=>this.columnDataFactory(t)).filter();const a=zN(R(r,t=>t.meta.row));return o.destroy(),k(s,t=>a(t.meta.row))})(i),a=[].concat(this.conditionCollection.getConditions(t));this.runLocalHooks("update",{editedConditionStack:{column:t,conditions:a},dependentConditionStacks:s,filteredRowsFactory:r,conditionArgsChange:e})}destroy(){this.clearLocalHooks(),Tt(this,(t,e)=>{this[e]=null})}constructor(t,e,n=()=>[]){GW(this,qW),GW(this,KW),GW(this,XW),this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],this.hot=t,this.conditionCollection=e,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",t=>YW(this,qW,QW).call(this,t)),this.conditionCollection.addLocalHook("afterRemove",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("afterAdd",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("beforeClean",()=>YW(this,KW,JW).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>YW(this,XW,tL).call(this))}}function QW(t){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(t)}function JW(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function tL(){x(this.latestOrderStack,t=>{this.updateStatesAtColumn(t)})}Rt(ZW,Fs);const eL="filters";function nL(t,e){let n,o=-1;const i=(s=e,u_({initialPage:0,size:()=>s.length,onItemSelect:(t,e)=>{const n=s[t];return n instanceof RW?e:!(n.element&&!ke(n.element))&&void n.focus()}}));var s;const r=t=>()=>{n.isOpened()&&n.getKeyboardShortcutsCtrl().listen(eL),i.setCurrentPage(e.indexOf(t))};function a(t){const s=n.getKeyboardShortcutsCtrl(),r=t.getKeyboardShortcutsCtrl();i.clear(),r.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(eL),callback:()=>{t.isSubMenu()&&t.close(),s.listen(eL)}}]),t.isSubMenu()||s.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 AP&&(n.openOptions(),t.preventDefault()),n instanceof sW&&(n.activate(),t.preventDefault()),n instanceof aP||t.preventDefault()}}],eL)}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 aP&&(t.addLocalHook("click",r(t)),t.addLocalHook("focus",r(t)),t.addLocalHook("afterClose",r(t)))}),l(t),{...i,listen:function(){n.focus(),n.getKeyboardShortcutsCtrl().listen(eL)},setMenu:l,getMenu:function(){return n},getLastMenuPage:function(){return o}}}function oL(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iL(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function sL(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,iL(t,e,"get"))}function rL(t,e,n){oL(t,e),e.set(t,n)}function aL(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,iL(t,e,"set"),n),n}function lL(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function hL(t,e){oL(t,e),e.add(t)}const cL="filters",dL=cL;var uL=new WeakMap,gL=new WeakMap,pL=new WeakMap,fL=new WeakMap,mL=new WeakMap,wL=new WeakSet,bL=new WeakSet,vL=new WeakSet,CL=new WeakSet,yL=new WeakSet,SL=new WeakSet,kL=new WeakSet,RL=new WeakSet,xL=new WeakSet,EL=new WeakSet,ML=new WeakSet,TL=new WeakSet;class _L extends Qk{static get PLUGIN_KEY(){return cL}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"]}isEnabled(){return!!this.hot.getSettings()[cL]}enablePlugin(){if(this.enabled)return;aL(this,mL,!0===this.hot.runHooks("hasExternalDataSource")),this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Dl),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const t=this.hot.getSettings().dropdownMenu,e=t&&t.uiContainer||this.hot.rootPortalElement,n=t=>(t.addLocalHook("accept",()=>lL(this,RL,WL).call(this,"accept")),t.addLocalHook("cancel",()=>lL(this,RL,WL).call(this,"cancel")),t.addLocalHook("change",e=>lL(this,xL,LL).call(this,t,e)),t),o=()=>`${this.hot.getTranslatedPhrase(Uc)}:`,i=()=>`${this.hot.getTranslatedPhrase(jc)}:`;if(!this.components.get("filter_by_condition")){const t=new VP(this.hot,{id:"filter_by_condition",name:o,addSeparator:!1,menuContainer:e});t.addLocalHook("afterClose",()=>lL(this,EL,BL).call(this)),this.components.set("filter_by_condition",n(t))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new QP(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const t=new VP(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:e});t.addLocalHook("afterClose",()=>lL(this,EL,BL).call(this)),this.components.set("filter_by_condition2",n(t))}if(!this.components.get("filter_by_value")){const t=this.getSetting("searchMode");this.components.set("filter_by_value",n(new NW(this.hot,{id:"filter_by_value",name:i,searchMode:t,hiddenWhen:()=>sL(this,mL)})))}if(this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new FW(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new UW(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new ZW(this.hot,this.conditionCollection,t=>this.getDataMapAtColumn(t)),this.conditionUpdateObserver.addLocalHook("update",t=>lL(this,TL,FL).call(this,t))),this.components.forEach(t=>t.show()),this.addHook("afterDropdownMenuDefaultOptions",(...t)=>lL(this,kL,PL).call(this,...t)),this.addHook("beforeDropdownMenuShow",()=>lL(this,SL,NL).call(this)),this.addHook("afterDropdownMenuShow",()=>lL(this,CL,OL).call(this)),this.addHook("afterDropdownMenuHide",()=>lL(this,yL,DL).call(this)),this.addHook("afterChange",t=>lL(this,wL,HL).call(this,t)),this.addHook("afterDataProviderFetch",t=>lL(this,bL,IL).call(this,t)),this.addHook("afterDataProviderFetchError",()=>lL(this,vL,AL).call(this)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!sL(this,uL)&&this.dropdownMenuPlugin.enabled){const t=[{focus:()=>{const t=sL(this,uL).getMenu(),e=t.getNavigator(),n=sL(this,uL).getLastMenuPage();t.focus(),n>0?e.setCurrentPage(n):e.toFirstItem()}},...Array.from(this.components).map(([,t])=>t.getElements()).flat()];aL(this,uL,nL(this.dropdownMenuPlugin.menu,t));const e=t=>{sL(this,uL).listen(),t.preventDefault(),rn(t.keyCode,"TAB")&&(t.shiftKey?sL(this,uL).toPreviousItem():sL(this,uL).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(){this.enabled&&(this.dropdownMenuPlugin?.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:dL})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(dL)}addCondition(t,e,n,o=KN){if(e===YN&&sL(this,mL))return;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();sL(this,mL)&&aL(this,fL,St(sL(this,pL)));const o=this.hot.runHooks("beforeFilter",n,sL(this,pL));if(!1!==o&&e){const e=this._createDataFilter(),n=[];let o=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),o=R(e.filter(),t=>t.meta.row);const t=zN(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(),aL(this,pL,this.exportConditions())}else!1===o||e?sL(this,mL)?aL(this,pL,this.exportConditions()):this.importConditions(sL(this,pL)):(aL(this,pL,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(){const t=this.hot.getSelectedRangeActive()?.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.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 s=ag(this.hot.getSourceDataAtCell(i,n),e);if(this.hot.hasHook("modifyData")){const e=At(s);this.hot.runHooks("modifyData",i,t,e,"get"),e.isTouched()&&(s=e.value)}o.push({meta:e,value:$N(s)})}return o}updateValueComponentCondition(t){const e=this.hot.toVisualColumn(t),n=UN(this.hot.getDataAtCol(e));this.conditionUpdateObserver.updateStatesAtColumn(t,n)}restoreComponents(t){const e=this.getSelectedColumn()?.physicalIndex;t.forEach(t=>{t.isHidden()||t.restoreState(e)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(t,e,n,o){let i=t;return i===XN&&e.command.key!==mN&&n.command.key!==mN&&o.command.key!==mN?i=ZN:o.command.key!==mN&&(e.command.key!==mN&&n.command.key!==mN||(i=KN)),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(t=this.conditionCollection){return new jW(t,t=>this.getDataMapAtColumn(t))}getIndexesOfComponents(...t){const e=[];if(!this.dropdownMenuPlugin)return e;const n=this.dropdownMenuPlugin.menu;return x(t,t=>{x(n.menuItems,(n,o)=>{n.key===t.getMenuItemDescriptor().key&&e.push(o)})}),e}changeComponentsVisibility(t=!0,...e){if(!this.dropdownMenuPlugin)return;const n=this.dropdownMenuPlugin.menu.hotMenu,o=n.getPlugin("hiddenRows"),i=this.getIndexesOfComponents(...e);t?o.showRows(i):o.hideRows(i),n.render()}hideComponents(...t){this.changeComponentsVisibility(!1,...t)}showComponents(...t){this.changeComponentsVisibility(!0,...t)}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()}constructor(t){super(t),hL(this,wL),hL(this,bL),hL(this,vL),hL(this,CL),hL(this,yL),hL(this,SL),hL(this,kL),hL(this,RL),hL(this,xL),hL(this,EL),hL(this,ML),hL(this,TL),rL(this,uL,{writable:!0,value:void 0}),rL(this,gL,{writable:!0,value:void 0}),rL(this,pL,{writable:!0,value:void 0}),rL(this,fL,{writable:!0,value:void 0}),rL(this,mL,{writable:!0,value:void 0}),this.dropdownMenuPlugin=null,this.conditionCollection=null,this.conditionUpdateObserver=null,this.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),this.filtersRowsMap=null,aL(this,gL,new WeakSet),aL(this,pL,[]),aL(this,fL,[]),aL(this,mL,!1),this.hot.addHook("afterGetColHeader",(...t)=>lL(this,ML,VL).call(this,...t))}}function HL(t){t&&x(t,t=>{const[,e]=t,n=this.hot.propToCol(e),o=this.hot.toPhysicalColumn(n);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)})}function IL(t){this.importConditions(t?.filtersConditionsStack??[])}function AL(){this.importConditions(sL(this,fL))}function OL(){const t=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),t.updateMenuDimensions()}function DL(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function NL(){const t=this.dropdownMenuPlugin.menu;sL(this,gL).has(t)||sL(this,uL).setMenu(t),sL(this,gL).add(t)}function PL(t){t.items.push({name:jM}),this.components.forEach(e=>{t.items.push(e.getMenuItemDescriptor())})}function WL(t){if("accept"===t){const t=this.getSelectedColumn();if(null===t)return void this.dropdownMenuPlugin?.close();const{physicalIndex:e}=t,n=this.components.get("filter_by_condition").getState(),o=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),n,o,i);this.conditionUpdateObserver.groupChanges();let r=this.conditionCollection.getColumnStackPosition(e);-1===r&&(r=void 0),this.conditionCollection.removeConditions(e),n.command.key!==mN&&(this.conditionCollection.addCondition(e,n,s,r),o.command.key!==mN&&this.conditionCollection.addCondition(e,o,s,r)),i.command.key===mN||sL(this,mL)||this.conditionCollection.addCondition(e,i,s,r),this.conditionUpdateObserver.flush(),this.components.forEach(t=>t.saveState(e)),this.filter()}this.dropdownMenuPlugin?.close()}function LL(t,e){const n=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),t.constructor!==VP||e.inputsCount||this.setListeningDropdownMenu(),n.updateMenuDimensions()}function BL(){this.setListeningDropdownMenu()}function VL(t,e){const n=this.hot.toPhysicalColumn(t);this.enabled&&this.conditionCollection.hasConditions(n)&&le(e)?ue(e,"htFiltersActive"):ge(e,"htFiltersActive")}function FL(t){if(!this.dropdownMenuPlugin?.enabled)return;const{editedConditionStack:{conditions:e,column:n},conditionArgsChange:o}=t;Array.isArray(o)&&aL(this,pL,sL(this,pL).map(t=>(t.column===n&&e.length>0&&t.conditions.forEach(t=>{"by_value"===t.name&&(t.args=[[...o]])}),t)));const i=e.filter(t=>t.name===YN),s=e.filter(t=>t.name!==YN);if(i.length>=2||s.length>=3)Qt(T`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
|
|
261
|
+
The dropdown menu supports at most 2 regular conditions and 1 'filter by value' condition per column,\x20
|
|
262
|
+
but more were provided. For more details see the documentation.`);else{const e=this.conditionCollection.getOperation(n);this.components.get("filter_by_condition").updateState(s[0],n),this.components.get("filter_by_condition2").updateState(s[1],n),this.components.get("filter_operators").updateState(e,n),this.components.get("filter_by_value").updateState(t)}}const zL="internal-use-in-handsontable",$L={licenseKey:zL,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 UL(t){return{maxColumns:t.maxColumns,maxRows:t.maxRows,language:t[PB]?.language?.langCode}}function jL(t){return Object.keys(t).reduce((e,n)=>("hyperformula"!==n&&(e[n]=t[n]),e),{})}function YL(){const t="engine_relationship",e=Hn(PB);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function GL(){const t="shared_engine_usage",e=Hn(PB);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function qL(t){const e=t.getSettings(),n=e[PB],o=n?.engine;if(!0===n)return null;if(A(o))return null;if("function"==typeof o.hyperformula||"function"==typeof o)return function(t,e,n){const o=e[PB],i=function(t){const e=t[PB],n=jL(e?.engine?.hyperformula?e.engine:{}),o=UL(t);return{...$L,...n,...o}}(e),s=YL(),r=GL();(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 s.set(a,[n]),r.set(a,[n.guid]),function(t,e){e&&(t.suspendEvaluation(),e.forEach(e=>{const{name:n,expression:o,scope:i,options:s}=e;try{t.addNamedExpression(n,o,i,s)}catch(t){Qt(t.message)}}),t.resumeEvaluation())}(a,o.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}(o.hyperformula??o,e,t);if("object"==typeof o&&A(o.hyperformula)){const e=YL(),n=GL().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:zL}),o.getConfig().leapYear1900===$L.leapYear1900&&!1!==xt(o.getConfig().nullDate,$L.nullDate)||Qt(T`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
|
263
|
+
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),o}return null}function KL(t){const e=YL(),n=0===e.size?[]:Array.from(e.get(t)??[]);return new Map(n.map(t=>[t.getPlugin("formulas").sheetId,t]))}function XL(t,e){if(t){const n=YL(),o=n.get(t),i=GL(),s=i.get(t);o&&o.includes(e)&&(o.splice(o.indexOf(e),1),0===o.length&&n.delete(t)),s&&s.includes(e.guid)&&(s.splice(s.indexOf(e.guid),1),0===s.length&&(i.delete(t),t.destroy()))}}const ZL="DD/MM/YYYY";function QL(t,e){return"string"==typeof t&&"date"===e}function JL(t,e){return $b(t,e,!0).isValid()}function tB(t,e){return $b(t,e,!0).format(ZL)}function eB(t,e){return $b(t,ZL,!0).format(e)}function nB(t,e){const n=new Date(Date.UTC(0,0,t+-1));return $b(n).format(e)}function oB(t){return Array.isArray(t)?Ik(t):t}function iB(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));return 0===e?o[e]??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 sB(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function rB(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,sB(t,e,"get"))}function aB(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 lB(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,sB(t,e,"set"),n),n}var hB=new WeakMap,cB=new WeakMap,dB=new WeakMap,uB=new WeakMap,gB=new WeakMap,pB=new WeakMap,fB=new WeakMap;class mB{setRemovedHfIndexes(t){return lB(this,fB,t.map(t=>{const e=rB(this,cB).getVisualFromPhysicalIndex(t);return this.getHfIndexFromVisualIndex(e)})),rB(this,fB)}getRemovedHfIndexes(){return rB(this,fB)}getHfIndexFromVisualIndex(t){const e=rB(this,cB).getIndexesSequence(),n=rB(this,cB).getNotTrimmedIndexes();return e.indexOf(n[t],t)}syncMoves(t){const e=`move${U(rB(this,hB))}s`;rB(this,dB).getEngine().batch(()=>{t.forEach(t=>{const n=t.from!==t.to,o=t.from+1!==t.to;n&&o&&rB(this,dB).getEngine()[e](rB(this,dB).getSheetId(),t.from,1,t.to)})})}storeMovesInformation(t,e,n){!1!==n&&(lB(this,gB,t.map(t=>this.getHfIndexFromVisualIndex(t))),lB(this,pB,this.getHfIndexFromVisualIndex(e)))}calculateAndSyncMoves(t,e){if(rB(this,dB).isPerformingUndoRedo())return;if(!1===t||!1===e)return;const n=iB(rB(this,gB),rB(this,pB),rB(this,cB).getNumberOfIndexes());null===rB(this,dB).getSheetId()?rB(this,dB).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const t=`set${U(rB(this,hB))}Order`;return e=>{if(rB(this,dB).isPerformingUndoRedo())return;const n=rB(this,cB).getIndexesSequence();if("update"===e&&n.length>0){const e=rB(this,uB).map(t=>n.indexOf(t)),o=rB(this,dB).getEngine().getSheetDimensions(rB(this,dB).getSheetId());let i;i="row"===rB(this,hB)?o.height:o.width;for(let t=e.length;t<i;t+=1)e.push(t);rB(this,dB).getEngine()[t](rB(this,dB).getSheetId(),e)}lB(this,uB,n)}}init(){lB(this,uB,rB(this,cB).getIndexesSequence())}constructor(t,e,n){aB(this,hB,{writable:!0,value:void 0}),aB(this,cB,{writable:!0,value:void 0}),aB(this,dB,{writable:!0,value:void 0}),aB(this,uB,{writable:!0,value:void 0}),aB(this,gB,{writable:!0,value:void 0}),aB(this,pB,{writable:!0,value:void 0}),aB(this,fB,{writable:!0,value:void 0}),lB(this,uB,[]),lB(this,gB,[]),lB(this,fB,[]),lB(this,hB,t),lB(this,cB,e),lB(this,dB,n)}}function wB(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function bB(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,wB(t,e,"get"))}function vB(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 CB(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,wB(t,e,"set"),n),n}var yB=new WeakMap,SB=new WeakMap,kB=new WeakMap,RB=new WeakMap,xB=new WeakMap,EB=new WeakMap,MB=new WeakMap;class TB{getForAxis(t){return bB(this,"row"===t?yB:SB)}setPerformUndo(t){CB(this,RB,t)}setPerformRedo(t){CB(this,xB,t)}isPerformingUndoRedo(){return bB(this,RB)||bB(this,xB)}getSheetId(){return bB(this,MB)}getEngine(){return bB(this,EB)}getPostponeAction(){return bB(this,kB)}setupSyncEndpoint(t,e){CB(this,EB,t),CB(this,MB,e),bB(this,yB).init(),bB(this,SB).init()}constructor(t,e,n){vB(this,yB,{writable:!0,value:void 0}),vB(this,SB,{writable:!0,value:void 0}),vB(this,kB,{writable:!0,value:void 0}),vB(this,RB,{writable:!0,value:void 0}),vB(this,xB,{writable:!0,value:void 0}),vB(this,EB,{writable:!0,value:void 0}),vB(this,MB,{writable:!0,value:void 0}),CB(this,RB,!1),CB(this,xB,!1),CB(this,EB,null),CB(this,MB,null),CB(this,yB,new mB("row",t,this)),CB(this,SB,new mB("column",e,this)),CB(this,kB,n)}}function _B(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function HB(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function IB(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,HB(t,e,"get"))}function AB(t,e,n){_B(t,e),e.set(t,n)}function OB(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,HB(t,e,"set"),n),n}function DB(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function NB(t,e){_B(t,e),e.add(t)}const PB="formulas",WB=["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 LB=t=>"UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;var BB=new WeakMap,VB=new WeakMap,FB=new WeakMap,zB=new WeakSet,$B=new WeakSet,UB=new WeakSet,jB=new WeakSet,YB=new WeakSet,GB=new WeakSet,qB=new WeakSet,KB=new WeakSet,XB=new WeakSet,ZB=new WeakSet,QB=new WeakSet,JB=new WeakSet,tV=new WeakSet,eV=new WeakSet,nV=new WeakSet,oV=new WeakSet,iV=new WeakSet,sV=new WeakSet,rV=new WeakSet,aV=new WeakSet,lV=new WeakSet,hV=new WeakSet,cV=new WeakSet,dV=new WeakSet,uV=new WeakSet,gV=new WeakSet,pV=new WeakSet;class fV extends Qk{static get PLUGIN_KEY(){return PB}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[PB,...WB]}isEnabled(){return!!this.hot.getSettings()[PB]}enablePlugin(){if(!this.enabled)if(this.engine=qL(this.hot)??this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const t=this.addSheet(this.sheetName,DB(this,UB,bV).call(this));!1!==t&&DB(this,zB,mV).call(this,t)}this.addHook("beforeLoadData",(...t)=>DB(this,GB,yV).call(this,...t)),this.addHook("afterLoadData",(...t)=>DB(this,KB,kV).call(this,...t)),this.addHook("beforeUpdateData",(...t)=>DB(this,GB,yV).call(this,...t)),this.addHook("afterUpdateData",(...t)=>DB(this,KB,kV).call(this,...t)),this.addHook("modifyData",(...t)=>DB(this,XB,RV).call(this,...t)),this.addHook("modifySourceData",(...t)=>DB(this,ZB,xV).call(this,...t)),this.addHook("beforeValidate",(...t)=>DB(this,jB,vV).call(this,...t)),this.addHook("afterSetSourceDataAtCell",(...t)=>DB(this,JB,MV).call(this,...t)),this.addHook("afterSetDataAtCell",(...t)=>DB(this,QB,EV).call(this,...t)),this.addHook("afterSetDataAtRowProp",(...t)=>DB(this,QB,EV).call(this,...t)),this.addHook("beforeCreateRow",(...t)=>DB(this,tV,TV).call(this,...t)),this.addHook("beforeCreateCol",(...t)=>DB(this,eV,_V).call(this,...t)),this.addHook("afterCreateRow",(...t)=>DB(this,iV,AV).call(this,...t)),this.addHook("afterCreateCol",(...t)=>DB(this,sV,OV).call(this,...t)),this.addHook("beforeRemoveRow",(...t)=>DB(this,nV,HV).call(this,...t)),this.addHook("beforeRemoveCol",(...t)=>DB(this,oV,IV).call(this,...t)),this.addHook("afterRemoveRow",(...t)=>DB(this,rV,DV).call(this,...t)),this.addHook("afterRemoveCol",(...t)=>DB(this,aV,NV).call(this,...t)),this.indexSyncer=new TB(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",(...t)=>DB(this,qB,SV).call(this,...t)),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",(...t)=>DB(this,lV,PV).call(this,...t)),this.addHook("beforeAutofill",(...t)=>DB(this,YB,CV).call(this,...t)),IB(this,FB).forEach(([t,e])=>this.engine.on(t,e)),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(){IB(this,FB).forEach(([t,e])=>this.engine.off(t,e)),XL(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(t){const e=function(t){const e=t[PB];return{...jL(e?.engine?.hyperformula?e.engine:{}),...UL(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()[PB];if(I(n)&&I(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!t.data&&null===this.sheetName){const t=this.hot.getSettings()[PB].sheetName;if(t&&this.engine.doesSheetExist(t))this.switchSheet(this.sheetName);else{const e=this.addSheet(t??void 0,DB(this,UB,bV).call(this));DB(this,zB,mV).call(this,e)}}super.updatePlugin(t)}destroy(){IB(this,FB).forEach(([t,e])=>this.engine?.off(t,e)),OB(this,FB,null),XL(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(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 te(`The sheet named \`${t}\` does not exist, switch aborted.`);DB(this,zB,mV).call(this,t);const e=this.engine.getSheetSerialized(this.sheetId);e.length>0&&this.hot.loadData(e,`${U(PB)}.switchSheet`)}getCellType(t,e,n=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,n=this.sheetId){return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)})}renderDependentSheets(t,e=!1){const n=new Set;t.forEach(t=>{const e=t?.address?.sheet;void 0!==e&&(n.has(e)||n.add(e))}),KL(this.engine).forEach((t,o)=>{(e||o!==this.sheetId)&&n.has(o)&&(t.render(),t.view?.adjustElementsSize())})}validateDependentCells(t,e=[]){const n=t=>{const{row:e,col:n,sheet:o}=t?.address??{};return I(o)?`${o}:${e}x${n}`:""},o=new Set(e.map(t=>n(t)));t.forEach(t=>{const{row:e,col:i}=t.address??{};if(!1===I(e)||!1===I(i)||e>=this.hot.countRows()||i>=this.hot.countCols())return;const s=t?.address?.sheet,r=n(t);if(void 0!==s&&!o.has(r)){const t=KL(this.engine).get(s);if(!t)return;t.validateCell(t.getDataAtCell(e,i),t.getCellMeta(e,i),()=>{})}})}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 s;return QL(n,i.type)&&(JL(n,i.dateFormat)?n=tB(n,i.dateFormat):!1===("string"==typeof(s=n)&&s.startsWith("="))&&(n=`'${n}`)),this.engine.setCellContents(o,n)}constructor(...t){super(...t),NB(this,zB),NB(this,$B),NB(this,UB),NB(this,jB),NB(this,YB),NB(this,GB),NB(this,qB),NB(this,KB),NB(this,XB),NB(this,ZB),NB(this,QB),NB(this,JB),NB(this,tV),NB(this,eV),NB(this,nV),NB(this,oV),NB(this,iV),NB(this,sV),NB(this,rV),NB(this,aV),NB(this,lV),NB(this,hV),NB(this,cV),NB(this,dV),NB(this,uV),NB(this,gV),NB(this,pV),AB(this,BB,{writable:!0,value:void 0}),AB(this,VB,{writable:!0,value:void 0}),AB(this,FB,{writable:!0,value:void 0}),OB(this,BB,!1),OB(this,VB,!1),OB(this,FB,[["valuesUpdated",(...t)=>DB(this,hV,WV).call(this,...t)],["namedExpressionAdded",(...t)=>DB(this,cV,LV).call(this,...t)],["namedExpressionRemoved",(...t)=>DB(this,dV,BV).call(this,...t)],["sheetAdded",(...t)=>DB(this,uV,VV).call(this,...t)],["sheetRenamed",(...t)=>DB(this,gV,FV).call(this,...t)],["sheetRemoved",(...t)=>DB(this,pV,zV).call(this,...t)]]),this.staticRegister=Hn("formulas"),this.engine=null,this.sheetId=null,this.sheetName=null,this.indexSyncer=null,this.rowAxisSyncer=null,this.columnAxisSyncer=null}}function mV(t){this.sheetName=t,this.sheetId=this.engine.getSheetId(this.sheetName)}function wV(t,e,n){if(Et(n)&&null!==n){const o=this.hot.toVisualRow(t),i=this.hot.toVisualColumn(e);n=(n=ag(n,this.hot.getCellMeta(o,i))).toString()}return oB(n)}function bV(t,e,n,o){return this.hot.getSourceDataArray(t,e,n,o).map((t,e)=>t.map((t,n)=>DB(this,$B,wV).call(this,e,n,t)))}function vV(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=nB(i,n.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return t}function CV(t,e,n){const{row:o,col:i}=e.getTopStartCorner(),{row:s,col:r}=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(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),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:p,col:f}=d.start,{row:m,col:w}=d.end,b=m-p+1,v=w-f+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=p+t%b,i=f+e%v,s=this.hot.getCellMeta(o,i);QL(n,s.type)&&(n.startsWith("'")?g[t][e]=n.slice(1):!1===this.isFormulaCellType(o,i,this.sheetId)&&(g[t][e]=eB(n,s.dateFormat)))}return g}function yV(t,e,n=""){n.includes(U(PB))||OB(this,VB,A(this.hot.getSettings().data))}function SV(){if(IB(this,VB))return void this.switchSheet(this.sheetName);const t=DB(this,UB,bV).call(this);t.forEach((e,n)=>{e.forEach((e,o)=>{const i=this.hot.getCellMeta(n,o,{skipMetaExtension:!0}),s=i.dateFormat;QL(e,i.type)&&(JL(e,s)?t[n][o]=tB(e,s):e.startsWith("=")||(t[n][o]=`'${e}`))})}),OB(this,BB,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),OB(this,BB,!1)}function kV(t,e,n=""){if(n.includes(U(PB)))return;const o=function(t,e){return!A(e)&&t.doesSheetExist(e)||(e=t.addSheet(e)),e}(this.engine,this.hot.getSettings()[PB].sheetName);if(DB(this,zB,mV).call(this,o),"updateSettings"!==n)if(IB(this,VB))this.switchSheet(this.sheetName);else{const t=DB(this,UB,bV).call(this);if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,t)){OB(this,BB,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),OB(this,BB,!1)}}}function RV(t,e,n,o){if("get"!==o||IB(this,BB)||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=(s=n.value,function(t){return"string"==typeof t&&"'"===t.charAt(0)&&"="===t.charAt(1)}(s)?s.substr(1):s));var s;const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};let a=this.engine.getCellValue(r);const l=this.hot.getCellMeta(t,e,{skipMetaExtension:!0});"date"===l.type&&so(a)&&(a=nB(a,l.dateFormat)),n.value="object"==typeof a&&null!==a?a.value:a}function xV(t,e,n,o){if("get"!==o||IB(this,BB)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(t),s=this.hot.propToCol(e);if(null===i||null===s)return;const r=this.getCellType(i,s);if("VALUE"===r||"EMPTY"===r)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(s),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function EV(t,e){if(LB(e)||0===t.length)return;const n=[],o=[],i=this.engine.batch(()=>{t.forEach(([t,e,,i])=>{const s=this.hot.propToCol(e),r=this.hot.toPhysicalRow(t),a=this.hot.toPhysicalColumn(s),l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};i=DB(this,$B,wV).call(this,r,a,i),null!==r&&null!==a?this.syncChangeWithEngine(t,s,i):n.push([t,s,i]),o.push({address:l})})});n.length&&this.hot.addHookOnce("afterChange",()=>{const t=this.engine.batch(()=>{n.forEach(([t,e,n])=>{this.syncChangeWithEngine(t,e,n)})});this.renderDependentSheets(t,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,o)}function MV(t,e){if(LB(e))return;const n=[],o=[];t.forEach(([t,e,,i])=>{const s=this.hot.propToCol(e);if(!so(s))return;const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(r)?(i=oB(i),o.push({address:r}),n.push(...this.engine.setCellContents(r,i))):Qt(`Not possible to set source cell data at ${JSON.stringify(r)}`)}),this.renderDependentSheets(n),this.validateDependentCells(n,o)}function TV(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 _V(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 HV(t,e,n){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(n).every(t=>this.engine.isItPossibleToRemoveRows(this.sheetId,[t,1]))&&void 0}function IV(t,e,n){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(n).every(t=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[t,1]))&&void 0}function AV(t,e,n){if(LB(n))return;const o=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(o)}function OV(t,e,n){if(LB(n))return;const o=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(o)}function DV(t,e,n,o){if(LB(o))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((t,e)=>e-t),s=this.engine.batch(()=>{i.forEach(t=>{this.engine.removeRows(this.sheetId,[t,1])})});this.renderDependentSheets(s)}function NV(t,e,n,o){if(LB(o))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((t,e)=>e-t),s=this.engine.batch(()=>{i.forEach(t=>{this.engine.removeColumns(this.sheetId,[t,1])})});this.renderDependentSheets(s)}function PV(t,e,n){OB(this,BB,!0);const o=DB(this,UB,bV).call(this,n,0,n+(e.__children?.length||0),this.hot.countSourceCols());OB(this,BB,!1),o.forEach((t,e)=>{t.forEach((t,o)=>{this.engine.setCellContents({col:o,row:n+e,sheet:this.sheetId},[[t]])})})}function WV(t){this.hot.runHooks("afterFormulasValuesUpdate",t)}function LV(t,e){this.hot.runHooks("afterNamedExpressionAdded",t,e)}function BV(t,e){this.hot.runHooks("afterNamedExpressionRemoved",t,e)}function VV(t){this.hot.runHooks("afterSheetAdded",t)}function FV(t,e){DB(this,zB,mV).call(this,e),this.hot.runHooks("afterSheetRenamed",t,e)}function zV(t,e){this.hot.runHooks("afterSheetRemoved",t,e)}function $V(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function UV(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function jV(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,UV(t,e,"get"))}function YV(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,UV(t,e,"set"),n),n}function GV(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function qV(t,e){$V(t,e),e.add(t)}Mn.getSingleton().register("beforeHideColumns"),Mn.getSingleton().register("afterHideColumns"),Mn.getSingleton().register("beforeUnhideColumns"),Mn.getSingleton().register("afterUnhideColumns");const KV="hiddenColumns";var XV=new WeakMap,ZV=new WeakSet,QV=new WeakSet,JV=new WeakSet,tF=new WeakSet,eF=new WeakSet,nF=new WeakSet;class oF extends Qk{static get PLUGIN_KEY(){return KV}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[KV]}enablePlugin(){this.enabled||(YV(this,XV,new Tl),jV(this,XV).addLocalHook("init",()=>GV(this,nF,hF).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,jV(this,XV)),this.addHook("afterContextMenuDefaultOptions",(...t)=>GV(this,eF,lF).call(this,...t)),this.addHook("afterGetCellMeta",(t,e,n)=>GV(this,QV,sF).call(this,t,e,n)),this.addHook("modifyColWidth",(t,e)=>GV(this,ZV,iF).call(this,t,e),2),this.addHook("afterGetColHeader",(...t)=>GV(this,tF,aF).call(this,...t)),this.addHook("modifyCopyableRange",t=>GV(this,JV,rF).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=jV(this,XV).getValues().slice(),s=t.length>0;if(n&&s){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&&s)&&(n&&s&&jV(this,XV).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",e,o,n&&s,n&&o.length<e.length))}showColumn(...t){this.showColumns(t)}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=>{jV(this,XV).setValueAtIndex(this.hot.toPhysicalColumn(t),!0)})},!0),this.hot.runHooks("afterHideColumns",e,o,n,n&&o.length>e.length))}hideColumn(...t){this.hideColumns(t)}getHiddenColumns(){return R(jV(this,XV).getHiddenIndexes(),t=>this.hot.toVisualColumn(t))}isHidden(t){return jV(this,XV).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(){YV(this,XV,null),super.destroy()}constructor(...t){var e,n,o;super(...t),qV(this,ZV),qV(this,QV),qV(this,JV),qV(this,tF),qV(this,eF),qV(this,nF),o={writable:!0,value:void 0},$V(e=this,n=XV),n.set(e,o),YV(this,XV,null)}}function iF(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 sF(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 rF(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 aF(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 lF(t){var e;t.items.push({name:jM},(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(wc,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),s=[];for(let t=o;t<=i;t+=1)s.push(t);e.hideColumns(s);const r=s[s.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(r,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(bc,t)},callback(){if(0===e.length)return;let n=e[0],o=e[e.length-1];n=this.columnIndexMapper.getNearestNotHiddenIndex(n-1,-1)??0,o=this.columnIndexMapper.getNearestNotHiddenIndex(o+1,1)??this.countCols()-1,t.showColumns(e),this.view.adjustElementsSize(),this.render(),o-n+1===this.countCols()||this.selectColumns(n,o)},disabled:!1,hidden(){const n=R(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,s=o.getBottomEndCorner().col,r=this.columnIndexMapper,a=r.getRenderableFromVisualIndex(i),l=r.getRenderableFromVisualIndex(s),h=r.getNotTrimmedIndexes(),c=[];if(i!==s){if(s-i+1>l-a+1){const t=h.slice(i,s+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===r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(t,-1))&&t>s&&c.push(...h.slice(s+1))}return x(c,t=>{e.push(this.toVisualColumn(t))}),0===e.length}}}(this))}function hF(){const t=this.getSetting("columns");Array.isArray(t)&&this.hideColumns(t)}function cF(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dF(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function uF(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dF(t,e,"get"))}function gF(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,dF(t,e,"set"),n),n}function pF(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function fF(t,e){cF(t,e),e.add(t)}Mn.getSingleton().register("beforeHideRows"),Mn.getSingleton().register("afterHideRows"),Mn.getSingleton().register("beforeUnhideRows"),Mn.getSingleton().register("afterUnhideRows");const mF="hiddenRows";var wF=new WeakMap,bF=new WeakSet,vF=new WeakSet,CF=new WeakSet,yF=new WeakSet,SF=new WeakSet,kF=new WeakSet;class RF extends Qk{static get PLUGIN_KEY(){return mF}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[mF]}enablePlugin(){this.enabled||(gF(this,wF,new Tl),uF(this,wF).addLocalHook("init",()=>pF(this,kF,HF).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,uF(this,wF)),this.addHook("afterContextMenuDefaultOptions",(...t)=>pF(this,SF,_F).call(this,...t)),this.addHook("afterGetCellMeta",(t,e,n)=>pF(this,vF,EF).call(this,t,e,n)),this.addHook("modifyRowHeight",(t,e)=>pF(this,bF,xF).call(this,t,e)),this.addHook("afterGetRowHeader",(...t)=>pF(this,yF,TF).call(this,...t)),this.addHook("modifyCopyableRange",t=>pF(this,CF,MF).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=uF(this,wF).getValues().slice(),s=t.length>0;if(n&&s){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&&s)&&(n&&s&&uF(this,wF).setValues(i),this.hot.runHooks("afterUnhideRows",e,o,n&&s,n&&o.length<e.length))}showRow(...t){this.showRows(t)}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=>{uF(this,wF).setValueAtIndex(this.hot.toPhysicalRow(t),!0)})},!0),this.hot.runHooks("afterHideRows",e,o,n,n&&o.length>e.length))}hideRow(...t){this.hideRows(t)}getHiddenRows(){return R(uF(this,wF).getHiddenIndexes(),t=>this.hot.toVisualRow(t))}isHidden(t){return uF(this,wF).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(){gF(this,wF,null),super.destroy()}constructor(...t){var e,n,o;super(...t),fF(this,bF),fF(this,vF),fF(this,CF),fF(this,yF),fF(this,SF),fF(this,kF),o={writable:!0,value:void 0},cF(e=this,n=wF),n.set(e,o),gF(this,wF,null)}}function xF(t,e){return this.isHidden(e)?0:t}function EF(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 MF(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 TF(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 _F(t){var e;t.items.push({name:jM},(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(vc,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),s=[];for(let t=o;t<=i;t+=1)s.push(t);e.hideRows(s);const r=s[s.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(r,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(Cc,t)},callback(){if(0===e.length)return;let n=e[0],o=e[e.length-1];n=this.rowIndexMapper.getNearestNotHiddenIndex(n-1,-1)??0,o=this.rowIndexMapper.getNearestNotHiddenIndex(o+1,1)??this.countRows()-1,t.showRows(e),this.view.adjustElementsSize(),this.render(),o-n+1===this.countRows()||this.selectRows(n,o)},disabled:!1,hidden(){const n=R(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,s=o.getBottomEndCorner().row,r=this.rowIndexMapper,a=r.getRenderableFromVisualIndex(i),l=r.getRenderableFromVisualIndex(s),h=r.getNotTrimmedIndexes(),c=[];if(i!==s){if(s-i+1>l-a+1){const t=h.slice(i,s+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===r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(t,-1))&&t>s&&c.push(...h.slice(s+1))}return x(c,t=>{e.push(this.toVisualRow(t))}),0===e.length}}}(this))}function HF(){const t=this.getSetting("rows");Array.isArray(t)&&this.hideRows(t)}function IF(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function AF(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function OF(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,AF(t,e,"get"))}function DF(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,AF(t,e,"set"),n),n}function NF(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function PF(t,e){IF(t,e),e.add(t)}Mn.getSingleton().register("beforeColumnFreeze"),Mn.getSingleton().register("afterColumnFreeze"),Mn.getSingleton().register("beforeColumnUnfreeze"),Mn.getSingleton().register("afterColumnUnfreeze");const WF="manualColumnFreeze";var LF=new WeakMap,BF=new WeakSet,VF=new WeakSet;class FF extends Qk{static get PLUGIN_KEY(){return WF}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[WF]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>NF(this,BF,zF).call(this,t)),this.addHook("beforeColumnMove",(t,e)=>NF(this,VF,$F).call(this,t,e)),super.enablePlugin())}disablePlugin(){DF(this,LF,!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;OF(this,LF)||DF(this,LF,!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;OF(this,LF)||DF(this,LF,!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))}constructor(...t){var e,n,o;super(...t),PF(this,BF),PF(this,VF),o={writable:!0,value:void 0},IF(e=this,n=LF),n.set(e,o),DF(this,LF,!1)}}function zF(t){var e;t.items.push({name:"---------"},(e=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(Gh)},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(qh)},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 $F(t,e){if(OF(this,LF)){const n=this.hot.getSettings().fixedColumnsStart;if(e<n)return!1;if(t.some(t=>t<n))return!1}}const UF="px";let jF=class{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+UF),so(e)&&(this._element.style[this.inlineProperty]=e+UF)}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+UF),so(e)&&(this._element.style.height=e+UF)}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+UF),so(e)&&(this._element.style[`margin${U(this.inlineProperty)}`]=e+UF)}getOffset(){const t=this._element.style,e=`margin${U(this.inlineProperty)}`;return{top:t.marginTop?parseInt(t.marginTop,10):0,start:t[e]?parseInt(t[e],10):0}}constructor(t){this._element=null,this.state=0,this.hot=t,this.inlineProperty=t.isRtl()?"right":"left"}};let YF=class extends jF{build(){super.build(),ue(this._element,"ht__manualColumnMove--backlight")}};let GF=class extends jF{build(){super.build(),ue(this._element,"ht__manualColumnMove--guideline")}};function qF(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KF(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function XF(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,KF(t,e,"get"))}function ZF(t,e,n){qF(t,e),e.set(t,n)}function QF(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,KF(t,e,"set"),n),n}function JF(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function tz(t,e){qF(t,e),e.add(t)}Mn.getSingleton().register("beforeColumnMove"),Mn.getSingleton().register("afterColumnMove");const ez="manualColumnMove",nz="ht__manualColumnMove",oz="show-ui",iz="on-moving--columns",sz="after-selection--columns";var rz=new WeakMap,az=new WeakMap,lz=new WeakMap,hz=new WeakMap,cz=new WeakMap,dz=new WeakMap,uz=new WeakMap,gz=new WeakMap,pz=new WeakMap,fz=new WeakMap,mz=new WeakMap,wz=new WeakSet,bz=new WeakSet,vz=new WeakSet,Cz=new WeakSet,yz=new WeakSet,Sz=new WeakSet;class kz extends Qk{static get PLUGIN_KEY(){return ez}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[ez]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",(...t)=>JF(this,wz,Rz).call(this,...t)),this.addHook("beforeOnCellMouseOver",(...t)=>JF(this,vz,Ez).call(this,...t)),this.addHook("afterScrollVertically",()=>JF(this,yz,Tz).call(this)),this.addHook("afterLoadData",(...t)=>JF(this,Sz,_z).call(this,...t)),this.buildPluginUI(),this.registerEvents(),ue(this.hot.rootElement,nz),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){ge(this.hot.rootElement,nz),this.unregisterEvents(),XF(this,rz).destroy(),XF(this,az).destroy(),super.disablePlugin()}moveColumn(t,e){return this.moveColumns([t],e)}moveColumns(t,e){const n=XF(this,uz),o=this.isMovePossible(t,e),i=this.hot.runHooks("beforeColumnMove",t,e,n,o);if(QF(this,uz,void 0),!1===i)return;o&&this.hot.columnIndexMapper.moveIndexes(t,e);const s=o&&this.isColumnOrderChanged(t,e);return this.hot.runHooks("afterColumnMove",t,e,n,o,s),s}dragColumn(t,e){return this.dragColumns([t],e)}dragColumns(t,e){const n=this.countFinalIndex(t,e);return QF(this,uz,e),this.moveColumns(t,n)}isMovePossible(t,e){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),o=t.length+e>n,i=e<0,s=t.some(t=>t<0),r=t.some(t=>t>=n);return!(o||i||s||r)}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()[ez];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(XF(this,gz))&&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,XF(this,gz)-1);const s=e.hider.offsetWidth,r=e.TBODY.offsetLeft,a=XF(this,rz).getOffset().start,l=XF(this,rz).getSize().width;let h=0,c=0;if(this.hot.isRtl()){const t=this.hot.rootWindow,e=Ae(this.hot.rootElement),i=t.innerWidth-XF(this,pz)-e;c=t.innerWidth-XF(this,dz).eventPageX-i-(void 0===n.scrollX?o:0)}else c=XF(this,dz).eventPageX-(XF(this,pz)-(void 0===n.scrollX?o:0));if(XF(this,fz)&&(h=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(XF(this,gz))&&(i+=o),i+=h,XF(this,gz)<0)XF(this,mz)>0?XF(this,dz).col=0:XF(this,dz).col=t>0?t-1:t;else if(XF(this,dz).TD.offsetWidth/2+i<=c){const t=XF(this,gz)>=XF(this,hz)?XF(this,hz)-1:XF(this,gz);XF(this,dz).col=t+1,i+=XF(this,dz).TD.offsetWidth}else XF(this,dz).col=XF(this,gz);let d=c,u=i;c+l+a>=s?d=s-l-a:c+a<r+h&&(d=r+h+Math.abs(a)),i>=s-1?u=s-1:0===u?u=1:void 0!==n.scrollX&&XF(this,gz)<XF(this,mz)&&(u-=XF(this,pz)<=n.scrollX?XF(this,pz):0),XF(this,rz).setPosition(null,d),XF(this,az).setPosition(null,u)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>JF(this,bz,xz).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>JF(this,Cz,Mz).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){XF(this,rz).build(),XF(this,az).build()}destroy(){XF(this,rz).destroy(),XF(this,az).destroy(),super.destroy()}constructor(...t){super(...t),tz(this,wz),tz(this,bz),tz(this,vz),tz(this,Cz),tz(this,yz),tz(this,Sz),ZF(this,rz,{writable:!0,value:void 0}),ZF(this,az,{writable:!0,value:void 0}),ZF(this,lz,{writable:!0,value:void 0}),ZF(this,hz,{writable:!0,value:void 0}),ZF(this,cz,{writable:!0,value:void 0}),ZF(this,dz,{writable:!0,value:void 0}),ZF(this,uz,{writable:!0,value:void 0}),ZF(this,gz,{writable:!0,value:void 0}),ZF(this,pz,{writable:!0,value:void 0}),ZF(this,fz,{writable:!0,value:void 0}),ZF(this,mz,{writable:!0,value:void 0}),QF(this,rz,new YF(this.hot)),QF(this,az,new GF(this.hot)),QF(this,lz,[]),QF(this,hz,0),QF(this,cz,!1),QF(this,dz,{})}}function Rz(t,e,n,o){const i=this.hot.view._wt.wtTable,s=this.hot.selection.isSelectedByColumnHeader(),r=this.hot.getSelectedRangeActive(),a=de(t.target,"sortAction");if(!r||!s||XF(this,cz)||0!==t.button||a)return QF(this,cz,!1),XF(this,lz).length=0,void ge(this.hot.rootElement,[iz,oz]);const l=XF(this,az).isBuilt()&&!XF(this,az).isAppended(),h=XF(this,rz).isBuilt()&&!XF(this,rz).isAppended();l&&h&&(XF(this,az).appendTo(i.hider),XF(this,rz).appendTo(i.hider));const{from:c,to:d}=r,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,QF(this,cz,!0);const s=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;XF(this,dz).eventPageX=t.pageX,QF(this,gz,e.col),XF(this,dz).TD=n,XF(this,dz).col=e.col,QF(this,lz,this.prepareColumnsToMoving(u,g)),QF(this,fz,!!this.hot.getSettings().rowHeaders),QF(this,hz,this.hot.countCols()),QF(this,mz,this.hot.getSettings().fixedColumnsStart),QF(this,pz,Re(this.hot.rootElement).left);const r=XF(this,fz)?-1:0,a=i.holder.scrollTop+i.getColumnHeaderHeight(0)+1,l=e.col<XF(this,mz),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),c=Math.abs(s-(this.hot.isRtl()?n.offsetWidth:0)),d=this.getColumnsWidth(u,e.col-1)+c,p=this.getColumnsWidth(r,u-1)+(l?h:0)+d;XF(this,rz).setPosition(a,p),XF(this,rz).setSize(this.getColumnsWidth(u,g),i.hider.offsetHeight-a),XF(this,rz).setOffset(null,-d),ue(this.hot.rootElement,iz)}else ge(this.hot.rootElement,sz),QF(this,cz,!1),XF(this,lz).length=0}function xz(t){XF(this,cz)&&(XF(this,dz).eventPageX=t.pageX,this.refreshPositions())}function Ez(t,e,n,o){this.hot.getSelectedRangeActive()&&XF(this,cz)&&(XF(this,lz).indexOf(e.col)>-1?ge(this.hot.rootElement,oz):ue(this.hot.rootElement,oz),o.row=!0,o.column=!0,o.cell=!0,QF(this,gz,e.col),XF(this,dz).TD=n)}function Mz(){const t=XF(this,dz).col,e=XF(this,lz).length;if(QF(this,gz,void 0),QF(this,cz,!1),ge(this.hot.rootElement,[iz,oz,sz]),this.hot.selection.isSelectedByColumnHeader()&&ue(this.hot.rootElement,sz),e<1||void 0===t)return;const n=XF(this,lz)[0],o=this.hot.toPhysicalColumn(n),i=this.dragColumns(XF(this,lz),t);if(XF(this,lz).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 Tz(){const t=this.hot.view._wt.wtTable,e=t.getColumnHeaderHeight(0)+1+t.holder.scrollTop;XF(this,rz).setPosition(e),XF(this,rz).setSize(null,t.hider.offsetHeight-e)}function _z(){this.moveBySettingsOrLoad()}function Hz(t,e="horizontal"){const n=t.getBoundingClientRect(),o="vertical"===e?n.height:n.width,i="vertical"===e?t.offsetHeight:t.offsetWidth;if(!Number.isFinite(o)||!Number.isFinite(i)||o<=0||i<=0)return 1;if(o>=i&&o-i<=1)return 1;const s=o/i;return Number.isFinite(s)&&s>0?s:1}function Iz(t,e){return!Number.isFinite(e)||e<=0?t:Math.round(t/e)}function Az(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oz(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Dz(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Oz(t,e,"get"))}function Nz(t,e,n){Az(t,e),e.set(t,n)}function Pz(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Oz(t,e,"set"),n),n}function Wz(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Lz(t,e){Az(t,e),e.add(t)}const Bz="manualColumnResize";var Vz=new WeakMap,Fz=new WeakMap,zz=new WeakMap,$z=new WeakMap,Uz=new WeakMap,jz=new WeakMap,Yz=new WeakMap,Gz=new WeakMap,qz=new WeakMap,Kz=new WeakMap,Xz=new WeakMap,Zz=new WeakMap,Qz=new WeakMap,Jz=new WeakMap,t$=new WeakMap,e$=new WeakMap,n$=new WeakMap,o$=new WeakMap,i$=new WeakSet,s$=new WeakSet,r$=new WeakSet,a$=new WeakSet,l$=new WeakSet,h$=new WeakSet,c$=new WeakSet,d$=new WeakSet,u$=new WeakSet;class g$ extends Qk{static get PLUGIN_KEY(){return Bz}static get PLUGIN_PRIORITY(){return 130}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[Bz]}enablePlugin(){this.enabled||(Pz(this,e$,new Ml),Dz(this,e$).addLocalHook("init",()=>Wz(this,i$,p$).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Dz(this,e$)),Pz(this,n$,this.hot.columnIndexMapper.observeMapChange(Dz(this,e$),()=>{this.hot.view?.invalidateColumnWidthCache()})),this.addHook("modifyColWidth",(...t)=>Wz(this,c$,C$).call(this,...t),1),this.addHook("beforeStretchingColumnWidth",(...t)=>Wz(this,d$,y$).call(this,...t),1),this.addHook("beforeColumnResize",(...t)=>Wz(this,u$,S$).call(this,...t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){Dz(this,n$)&&(Dz(this,n$).call(this),Pz(this,n$,null)),Pz(this,o$,Dz(this,e$).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}setManualSize(t,e){const n=Math.max(e,20),o=this.hot.toPhysicalColumn(t);return Dz(this,e$).setValueAtIndex(o,n),n}clearManualSize(t){const e=this.hot.toPhysicalColumn(t);Dz(this,e$).setValueAtIndex(e,null)}setupHandlePosition(t){if(!t.parentNode||Dz(this,Jz)>1)return;Pz(this,Vz,t);const{_wt:e}=this.hot.view,n=e.wtTable.getCoords(Dz(this,Vz)),o=n.col;if(o<0)return;const i=Oe(Dz(this,Vz));let s;o<e.getSetting("fixedColumnsStart")&&(s=e.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(Dz(this,Vz),n.row,n.col)),s||(s=e.wtOverlays.topOverlay.getRelativeCellPosition(Dz(this,Vz),n.row,n.col)),Pz(this,Fz,this.hot.columnIndexMapper.getVisualFromRenderableIndex(o)),Pz(this,zz,[]);const r=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&r){x(this.hot.getSelectedRange(),t=>{ao(t.getTopStartCorner().col,t.getBottomEndCorner().col,t=>{Dz(this,zz).includes(t)||Dz(this,zz).push(t)})})}Dz(this,zz).includes(Dz(this,Fz))||Pz(this,zz,[Dz(this,Fz)]),Pz(this,Gz,s.start-6),Pz(this,Yz,Ae(Dz(this,Vz))),Pz(this,qz,Hz(Dz(this,Vz))),Dz(this,Kz).style.top=`${s.top}px`,Dz(this,Kz).style[this.inlineDir]=`${Dz(this,Gz)+Dz(this,Yz)}px`,Dz(this,Kz).style.height=`${i}px`,this.hot.rootElement.appendChild(Dz(this,Kz))}refreshHandlePosition(){Dz(this,Kz).style[this.inlineDir]=`${Dz(this,Gz)+Dz(this,$z)}px`}setupGuidePosition(){const t=parseInt(Oe(Dz(this,Kz)),10),e=parseInt(Dz(this,Kz).style.top,10)+t,n=this.hot.view.getTableHeight();ue(Dz(this,Kz),"active"),ue(Dz(this,Xz),"active"),Dz(this,Xz).style.top=`${e}px`,this.refreshGuidePosition(),Dz(this,Xz).style.height=n-t+"px",this.hot.rootElement.appendChild(Dz(this,Xz))}refreshGuidePosition(){Dz(this,Xz).style[this.inlineDir]=Dz(this,Kz).style[this.inlineDir]}hideHandleAndGuide(){ge(Dz(this,Kz),"active"),ge(Dz(this,Xz),"active")}checkIfColumnHeader(t){const e=ie(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",Dz(this,Uz),e,!0);void 0!==o&&Pz(this,Uz,o),this.setManualSize(e,Dz(this,Uz)),this.hot.runHooks("afterColumnResize",Dz(this,Uz),e,!0),n&&t()};if(Dz(this,Jz)>=2){Dz(this,zz).length>1?(x(Dz(this,zz),t=>{e(t)}),t()):x(Dz(this,zz),t=>{e(t,!0)})}Pz(this,Jz,0),Pz(this,t$,null)}bindEvents(){const{rootWindow:t,rootElement:e}=this.hot;this.eventManager.addEventListener(e,"mouseover",t=>Wz(this,s$,f$).call(this,t)),this.eventManager.addEventListener(e,"mousedown",t=>Wz(this,r$,m$).call(this,t)),this.eventManager.addEventListener(t,"mousemove",t=>Wz(this,a$,w$).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>Wz(this,l$,b$).call(this)),this.eventManager.addEventListener(Dz(this,Kz),"contextmenu",()=>Wz(this,h$,v$).call(this))}destroy(){super.destroy()}constructor(t){super(t),Lz(this,i$),Lz(this,s$),Lz(this,r$),Lz(this,a$),Lz(this,l$),Lz(this,h$),Lz(this,c$),Lz(this,d$),Lz(this,u$),Nz(this,Vz,{writable:!0,value:void 0}),Nz(this,Fz,{writable:!0,value:void 0}),Nz(this,zz,{writable:!0,value:void 0}),Nz(this,$z,{writable:!0,value:void 0}),Nz(this,Uz,{writable:!0,value:void 0}),Nz(this,jz,{writable:!0,value:void 0}),Nz(this,Yz,{writable:!0,value:void 0}),Nz(this,Gz,{writable:!0,value:void 0}),Nz(this,qz,{writable:!0,value:void 0}),Nz(this,Kz,{writable:!0,value:void 0}),Nz(this,Xz,{writable:!0,value:void 0}),Nz(this,Zz,{writable:!0,value:void 0}),Nz(this,Qz,{writable:!0,value:void 0}),Nz(this,Jz,{writable:!0,value:void 0}),Nz(this,t$,{writable:!0,value:void 0}),Nz(this,e$,{writable:!0,value:void 0}),Nz(this,n$,{writable:!0,value:void 0}),Nz(this,o$,{writable:!0,value:void 0}),Pz(this,Vz,null),Pz(this,Fz,null),Pz(this,zz,[]),Pz(this,$z,null),Pz(this,Uz,null),Pz(this,jz,null),Pz(this,Yz,null),Pz(this,Gz,null),Pz(this,qz,1),Pz(this,Kz,this.hot.rootDocument.createElement("DIV")),Pz(this,Xz,this.hot.rootDocument.createElement("DIV")),Pz(this,Zz,null),Pz(this,Qz,!1),Pz(this,Jz,0),Pz(this,t$,null),Pz(this,n$,null),ue(Dz(this,Kz),"manualColumnResizer"),ue(Dz(this,Xz),"manualColumnResizerGuide")}}function p$(){const t=this.hot.getSettings()[Bz];Array.isArray(t)?(this.hot.batchExecution(()=>{t.forEach((t,e)=>{Dz(this,e$).setValueAtIndex(e,t)})},!0),Pz(this,o$,t)):!0===t&&Array.isArray(Dz(this,o$))&&this.hot.batchExecution(()=>{Dz(this,o$).forEach((t,e)=>{Dz(this,e$).setValueAtIndex(e,t)})},!0)}function f$(t){if(!Ge(t.target)&&!0!==Dz(this,Qz)&&this.checkIfColumnHeader(t.target)){const e=this.getClosestTHParent(t.target);if(!e)return;const n=e.getAttribute("colspan");!e||null!==n&&"1"!==n||Dz(this,Zz)||this.setupHandlePosition(e)}}function m$(t){t.target.parentNode===this.hot.rootElement&&de(t.target,"manualColumnResizer")&&(this.setupHandlePosition(Dz(this,Vz)),this.setupGuidePosition(),Pz(this,Zz,!0),null===Dz(this,t$)&&Pz(this,t$,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),Pz(this,Jz,Dz(this,Jz)+1),this.startX=t.pageX,Pz(this,Uz,Dz(this,Yz)))}function w$(t){if(Dz(this,Zz)){const e=Iz((t.pageX-this.startX)*this.hot.getDirectionFactor(),Dz(this,qz));Pz(this,$z,Dz(this,Yz)+e),x(Dz(this,zz),t=>{Pz(this,Uz,this.setManualSize(t,Dz(this,$z)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function b$(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,n)=>{this.hot.runHooks("beforeColumnResize",Dz(this,Uz),e,!1),n&&t(),this.hot.runHooks("afterColumnResize",Dz(this,Uz),e,!1)};if(Dz(this,Zz)){if(this.hideHandleAndGuide(),Pz(this,Zz,!1),Dz(this,Uz)!==Dz(this,Yz)){Dz(this,zz).length>1?(x(Dz(this,zz),t=>{e(t)}),t()):x(Dz(this,zz),t=>{e(t,!0)})}this.setupHandlePosition(Dz(this,Vz))}}function v$(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(Dz(this,Kz)),this.hot.rootElement.removeChild(Dz(this,Xz)),Pz(this,Zz,!1),Pz(this,Qz,!0),this.hot._registerMicrotask(()=>{Pz(this,Qz,!1)})}function C$(t,e){let n=t;if(this.enabled){const t=this.hot.toPhysicalColumn(e),o=Dz(this,e$).getValueAtIndex(t);this.hot.getSettings()[Bz]&&o&&(n=o)}return n}function y$(t,e){const n=Dz(this,e$).getValueAtIndex(this.hot.toPhysicalColumn(e));return"number"==typeof n?n:t}function S$(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}const k$="px";let R$=class{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+k$),void 0!==e&&(this._element.style.left=e+k$)}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+k$),e&&(this._element.style.height=e+k$)}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+k$),e&&(this._element.style.marginLeft=e+k$)}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}}constructor(t){this._element=null,this.state=0,this.hot=t}};class x$ extends R${build(){super.build(),ue(this._element,"ht__manualRowMove--backlight")}}class E$ extends R${build(){super.build(),ue(this._element,"ht__manualRowMove--guideline")}}function M$(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function T$(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function _$(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,T$(t,e,"get"))}function H$(t,e,n){M$(t,e),e.set(t,n)}function I$(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,T$(t,e,"set"),n),n}function A$(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function O$(t,e){M$(t,e),e.add(t)}Mn.getSingleton().register("beforeRowMove"),Mn.getSingleton().register("afterRowMove");const D$="manualRowMove",N$="ht__manualRowMove",P$="show-ui",W$="on-moving--rows",L$="after-selection--rows";var B$=new WeakMap,V$=new WeakMap,F$=new WeakMap,z$=new WeakMap,$$=new WeakMap,U$=new WeakMap,j$=new WeakSet,Y$=new WeakSet,G$=new WeakSet,q$=new WeakSet,K$=new WeakSet,X$=new WeakSet;class Z$ extends Qk{static get PLUGIN_KEY(){return D$}static get PLUGIN_PRIORITY(){return 140}static get SETTING_KEYS(){return[D$]}isEnabled(){return!!this.hot.getSettings()[D$]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",(...t)=>A$(this,j$,Q$).call(this,...t)),this.addHook("beforeOnCellMouseOver",(...t)=>A$(this,G$,tU).call(this,...t)),this.addHook("afterScrollHorizontally",()=>A$(this,K$,nU).call(this)),this.addHook("afterLoadData",(...t)=>A$(this,X$,oU).call(this,...t)),this.buildPluginUI(),this.registerEvents(),ue(this.hot.rootElement,N$),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){ge(this.hot.rootElement,N$),this.unregisterEvents(),_$(this,B$).destroy(),_$(this,V$).destroy(),super.disablePlugin()}moveRow(t,e){return this.moveRows([t],e)}moveRows(t,e){const n=_$(this,U$),o=this.isMovePossible(t,e),i=this.hot.runHooks("beforeRowMove",t,e,n,o);if(I$(this,U$,void 0),!1===i)return;o&&this.hot.rowIndexMapper.moveIndexes(t,e);const s=o&&this.isRowOrderChanged(t,e);return this.hot.runHooks("afterRowMove",t,e,n,o,s),s}dragRow(t,e){return this.dragRows([t],e)}dragRows(t,e){const n=this.countFinalIndex(t,e);return I$(this,U$,e),this.moveRows(t,n)}isMovePossible(t,e){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),o=t.length+e>n,i=e<0,s=t.some(t=>t<0),r=t.some(t=>t>=n);return!(o||i||s||r)}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()[D$];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=_$(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,s=_$(this,$$).TD,r=this.hot.rootElement,a=Re(r),l=He(r),h=i.holder.scrollTop,c=this.hot.rootWindow!==l?l.scrollTop:0,d=a.top-c,u=_$(this,$$).eventPageY-d+h,g=i.hider.offsetHeight,p=i.TBODY.offsetTop,f=_$(this,B$).getOffset().top,m=_$(this,B$).getSize().height,w=s.offsetHeight/2,b=s.offsetHeight;let v=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,t.row-1);const C=u>=v+w;this.isFixedRowTop(t.row)&&(v+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),t.row<0?_$(this,$$).row=e>0?e-1:e:C?(_$(this,$$).row=t.row+1,v+=0===t.row?b-1:b):_$(this,$$).row=t.row;let y=u,S=v;u+m+f>=g?y=g-m-f:u+f<p&&(y=p+Math.abs(f)),v>=g-1&&(S=g-1),_$(this,B$).setPosition(y),_$(this,V$).setPosition(S)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>A$(this,Y$,J$).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>A$(this,q$,eU).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){_$(this,B$).build(),_$(this,V$).build()}destroy(){_$(this,B$).destroy(),_$(this,V$).destroy(),super.destroy()}constructor(...t){super(...t),O$(this,j$),O$(this,Y$),O$(this,G$),O$(this,q$),O$(this,K$),O$(this,X$),H$(this,B$,{writable:!0,value:void 0}),H$(this,V$,{writable:!0,value:void 0}),H$(this,F$,{writable:!0,value:void 0}),H$(this,z$,{writable:!0,value:void 0}),H$(this,$$,{writable:!0,value:void 0}),H$(this,U$,{writable:!0,value:void 0}),I$(this,B$,new x$(this.hot)),I$(this,V$,new E$(this.hot)),I$(this,F$,[]),I$(this,$$,{})}}function Q$(t,e,n,o){const{wtTable:i,wtViewport:s}=this.hot.view._wt,r=this.hot.selection.isSelectedByRowHeader(),a=this.hot.getSelectedRangeActive();if(!a||!r||_$(this,z$)||0!==t.button)return I$(this,z$,!1),_$(this,F$).length=0,void ge(this.hot.rootElement,[W$,P$]);const l=_$(this,V$).isBuilt()&&!_$(this,V$).isAppended(),h=_$(this,B$).isBuilt()&&!_$(this,B$).isAppended();l&&h&&(_$(this,V$).appendTo(i.hider),_$(this,B$).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,I$(this,z$,!0),_$(this,$$).eventPageY=t.pageY,_$(this,$$).coords=e,_$(this,$$).TD=n,I$(this,F$,this.prepareRowsToMoving());const r=i.holder.scrollLeft+s.getRowHeaderWidth(),a=this.getRowsHeight(u,e.row-1)+(t.clientY-n.getBoundingClientRect().top);_$(this,B$).setPosition(null,r),_$(this,B$).setSize(i.hider.offsetWidth-r,this.getRowsHeight(u,g)),_$(this,B$).setOffset(-a,null),ue(this.hot.rootElement,W$),this.refreshPositions()}else ge(this.hot.rootElement,L$),I$(this,z$,!1),_$(this,F$).length=0}function J$(t){_$(this,z$)&&(_$(this,$$).eventPageY=t.pageY,this.refreshPositions())}function tU(t,e,n,o){this.hot.getSelectedRangeActive()&&_$(this,z$)&&(_$(this,F$).indexOf(e.row)>-1?ge(this.hot.rootElement,P$):ue(this.hot.rootElement,P$),o.row=!0,o.column=!0,o.cell=!0,_$(this,$$).coords=e,_$(this,$$).TD=n)}function eU(){const t=_$(this,$$).row,e=_$(this,F$).length;if(I$(this,z$,!1),ge(this.hot.rootElement,[W$,P$,L$]),this.hot.selection.isSelectedByRowHeader()&&ue(this.hot.rootElement,L$),e<1||void 0===t)return;const n=_$(this,F$)[0],o=this.hot.toPhysicalRow(n),i=this.dragRows(_$(this,F$),t);if(_$(this,F$).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 nU(){const t=this.hot.view._wt.wtTable,e=this.hot.view._wt.wtViewport.getRowHeaderWidth()+t.holder.scrollLeft;_$(this,B$).setPosition(null,e),_$(this,B$).setSize(t.hider.offsetWidth-e)}function oU(){this.moveBySettingsOrLoad()}function iU(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sU(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function rU(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,sU(t,e,"get"))}function aU(t,e,n){iU(t,e),e.set(t,n)}function lU(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,sU(t,e,"set"),n),n}function hU(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function cU(t,e){iU(t,e),e.add(t)}const dU="manualRowResize";var uU=new WeakMap,gU=new WeakMap,pU=new WeakMap,fU=new WeakMap,mU=new WeakMap,wU=new WeakMap,bU=new WeakMap,vU=new WeakMap,CU=new WeakMap,yU=new WeakMap,SU=new WeakMap,kU=new WeakMap,RU=new WeakMap,xU=new WeakMap,EU=new WeakMap,MU=new WeakMap,TU=new WeakMap,_U=new WeakMap,HU=new WeakSet,IU=new WeakSet,AU=new WeakSet,OU=new WeakSet,DU=new WeakSet,NU=new WeakSet,PU=new WeakSet;class WU extends Qk{static get PLUGIN_KEY(){return dU}static get PLUGIN_PRIORITY(){return 30}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[dU]}enablePlugin(){this.enabled||(lU(this,MU,new Ml),rU(this,MU).addLocalHook("init",()=>hU(this,PU,UU).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,rU(this,MU)),lU(this,TU,this.hot.rowIndexMapper.observeMapChange(rU(this,MU),()=>{this.hot.view?.invalidateRowHeightCache()})),this.addHook("modifyRowHeight",(t,e)=>hU(this,NU,$U).call(this,t,e)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){rU(this,TU)&&(rU(this,TU).call(this),lU(this,TU,null)),lU(this,_U,rU(this,MU).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 rU(this,MU).setValueAtIndex(n,o),o}getLastDesiredRowHeight(){return rU(this,fU)}setupHandlePosition(t){if(!t.parentNode||rU(this,xU)>1)return;lU(this,uU,t);const{view:e}=this.hot,{_wt:n}=e,o=n.wtTable.getCoords(rU(this,uU)),i=o.row;if(i<0)return;const s=Ae(rU(this,uU)),r=i<n.getSetting("fixedRowsTop"),a=i>=e.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let l;r?l=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(rU(this,uU),o.row,o.col):a&&(l=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(rU(this,uU),o.row,o.col)),l||(l=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(rU(this,uU),o.row,o.col)),lU(this,gU,this.hot.rowIndexMapper.getVisualFromRenderableIndex(i)),lU(this,pU,[]);const h=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&h){x(this.hot.getSelectedRange(),t=>{ao(t.getTopStartCorner().row,t.getBottomStartCorner().row,t=>{rU(this,pU).includes(t)||rU(this,pU).push(t)})})}rU(this,pU).includes(rU(this,gU))||lU(this,pU,[rU(this,gU)]),lU(this,vU,l.top-6),lU(this,bU,Oe(rU(this,uU))),lU(this,CU,Hz(rU(this,uU),"vertical")),rU(this,yU).style.top=`${rU(this,vU)+rU(this,bU)}px`,rU(this,yU).style[this.inlineDir]=`${l.start}px`,rU(this,yU).style.width=`${s}px`,this.hot.rootElement.appendChild(rU(this,yU))}refreshHandlePosition(){rU(this,yU).style.top=`${rU(this,vU)+rU(this,fU)}px`}setupGuidePosition(){const t=parseInt(Ae(rU(this,yU)),10),e=parseInt(rU(this,yU).style[this.inlineDir],10)+t,n=this.hot.view.getTableWidth();ue(rU(this,yU),"active"),ue(rU(this,SU),"active"),rU(this,SU).style.top=rU(this,yU).style.top,rU(this,SU).style[this.inlineDir]=`${e}px`,rU(this,SU).style.width=n-t+"px",this.hot.rootElement.appendChild(rU(this,SU))}refreshGuidePosition(){rU(this,SU).style.top=rU(this,yU).style.top}hideHandleAndGuide(){ge(rU(this,yU),"active"),ge(rU(this,SU),"active")}checkIfRowHeader(t){const e=ie(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&&rU(this,mU)<e?e:rU(this,mU)}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&&lU(this,mU,o),this.setManualSize(e,rU(this,mU)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!0),n&&t()};if(rU(this,xU)>=2){rU(this,pU).length>1?(x(rU(this,pU),t=>{e(t)}),t()):x(rU(this,pU),t=>{e(t,!0)})}lU(this,xU,0),lU(this,EU,null)}bindEvents(){const{rootElement:t,rootWindow:e}=this.hot;this.eventManager.addEventListener(t,"mouseover",t=>hU(this,HU,LU).call(this,t)),this.eventManager.addEventListener(t,"mousedown",t=>hU(this,IU,BU).call(this,t)),this.eventManager.addEventListener(e,"mousemove",t=>hU(this,AU,VU).call(this,t)),this.eventManager.addEventListener(e,"mouseup",()=>hU(this,OU,FU).call(this)),this.eventManager.addEventListener(rU(this,yU),"contextmenu",()=>hU(this,DU,zU).call(this))}destroy(){super.destroy()}constructor(t){super(t),cU(this,HU),cU(this,IU),cU(this,AU),cU(this,OU),cU(this,DU),cU(this,NU),cU(this,PU),aU(this,uU,{writable:!0,value:void 0}),aU(this,gU,{writable:!0,value:void 0}),aU(this,pU,{writable:!0,value:void 0}),aU(this,fU,{writable:!0,value:void 0}),aU(this,mU,{writable:!0,value:void 0}),aU(this,wU,{writable:!0,value:void 0}),aU(this,bU,{writable:!0,value:void 0}),aU(this,vU,{writable:!0,value:void 0}),aU(this,CU,{writable:!0,value:void 0}),aU(this,yU,{writable:!0,value:void 0}),aU(this,SU,{writable:!0,value:void 0}),aU(this,kU,{writable:!0,value:void 0}),aU(this,RU,{writable:!0,value:void 0}),aU(this,xU,{writable:!0,value:void 0}),aU(this,EU,{writable:!0,value:void 0}),aU(this,MU,{writable:!0,value:void 0}),aU(this,TU,{writable:!0,value:void 0}),aU(this,_U,{writable:!0,value:void 0}),lU(this,uU,null),lU(this,gU,null),lU(this,pU,[]),lU(this,fU,null),lU(this,mU,null),lU(this,wU,null),lU(this,bU,null),lU(this,vU,null),lU(this,CU,1),lU(this,yU,this.hot.rootDocument.createElement("DIV")),lU(this,SU,this.hot.rootDocument.createElement("DIV")),lU(this,kU,!1),lU(this,RU,!1),lU(this,xU,0),lU(this,EU,null),lU(this,TU,null),ue(rU(this,yU),"manualRowResizer"),ue(rU(this,SU),"manualRowResizerGuide")}}function LU(t){if(!Ge(t.target)&&!0!==rU(this,RU)&&this.checkIfRowHeader(t.target)){const e=this.getClosestTHParent(t.target);e&&(rU(this,kU)||this.setupHandlePosition(e))}}function BU(t){t.target.parentNode===this.hot.rootElement&&de(t.target,"manualRowResizer")&&(this.setupHandlePosition(rU(this,uU)),this.setupGuidePosition(),lU(this,kU,!0),null===rU(this,EU)&&lU(this,EU,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),lU(this,xU,rU(this,xU)+1),lU(this,wU,t.pageY),lU(this,mU,rU(this,bU)))}function VU(t){if(rU(this,kU)){const e=Iz(t.pageY-rU(this,wU),rU(this,CU));lU(this,fU,rU(this,bU)+e),x(rU(this,pU),t=>{lU(this,mU,this.setManualSize(t,rU(this,fU)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function FU(){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(rU(this,kU)){if(this.hideHandleAndGuide(),lU(this,kU,!1),rU(this,mU)!==rU(this,bU)){rU(this,pU).length>1?(x(rU(this,pU),t=>{e(t)}),t()):x(rU(this,pU),t=>{e(t,!0)})}this.setupHandlePosition(rU(this,uU))}}function zU(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(rU(this,yU)),this.hot.rootElement.removeChild(rU(this,SU)),lU(this,kU,!1),lU(this,RU,!0),this.hot._registerMicrotask(()=>{lU(this,RU,!1)})}function $U(t,e){let n=t;if(this.enabled){const t=this.hot.toPhysicalRow(e),o=rU(this,MU).getValueAtIndex(t);this.hot.getSettings()[dU]&&o&&(n=this.hot.getPlugin("autoRowSize")?.isEnabled()?Math.max(o,n??0):o)}return n}function UU(){const t=this.hot.getSettings()[dU];this.hot.batchExecution(()=>{Array.isArray(t)?(t.forEach((t,e)=>{rU(this,MU).setValueAtIndex(e,t)}),lU(this,_U,t)):!0===t&&Array.isArray(rU(this,_U))&&rU(this,_U).forEach((t,e)=>{rU(this,MU).setValueAtIndex(e,t)})},!0)}function jU(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function YU(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,jU(t,e,"get"))}function GU(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 qU(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,jU(t,e,"set"),n),n}var KU=new WeakMap;class XU{static NEGATIVE_VALUES_WARNING({row:t,col:e,rowspan:n,colspan:o}){return T`The merged cell declared with {row: ${t}, col: ${e},\x20
|
|
264
|
+
rowspan: ${n}, colspan: ${o}} contains negative values, which is\x20
|
|
265
|
+
not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING({row:t,col:e}){return T`The merged cell declared at [${t}, ${e}] is positioned\x20
|
|
266
|
+
(or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL({row:t,col:e}){return T`The merged cell declared at [${t}, ${e}] has both "rowspan"\x20
|
|
267
|
+
and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING({row:t,col:e}){return T`The merged cell declared at [${t}, ${e}] has "rowspan"\x20
|
|
268
|
+
or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues({row:t,col:e,rowspan:n,colspan:o}){return t<0||e<0||n<0||o<0}static isSingleCell({rowspan:t,colspan:e}){return 1===e&&1===t}static containsZeroSpan({rowspan:t,colspan:e}){return 0===e||0===t}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),qU(this,KU,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",s=t[0]?"col":"row",r=Math.min(e,o),a=Math.max(e,o),l=this[s],h=this[s]+this[i]-1;if(l>=e&&(this[s]+=n),n>0)e<=h&&e>l&&(this[i]+=n);else if(n<0){if(r<=l&&a>=h)return this.removed=!0,qU(this,KU,null),!1;if(l>=r&&l<=a){const t=a-l+1,e=Math.abs(n)-t;this[s]-=e+n,this[i]-=t}else if(l<=r&&h>=a)this[i]+=n;else if(l<=r&&h>=r&&h<a){const t=h-r+1;this[i]-=t}}return qU(this,KU,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 YU(this,KU)||qU(this,KU,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),YU(this,KU)}constructor(t,e,n,o,i,s){GU(this,KU,{writable:!0,value:void 0}),this.removed=!1,qU(this,KU,null),this.row=t,this.col=e,this.rowspan=n,this.colspan=o,this.cellCoordsFactory=i,this.cellRangeFactory=s}}function ZU(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function QU(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 JU=new WeakSet,tj=new WeakSet,ej=new WeakSet;class nj{static IS_OVERLAPPING_WARNING({row:t,col:e}){return T`The merged cell declared at [${t}, ${e}], overlaps\x20
|
|
269
|
+
with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
|
|
270
|
+
fix your setup.`}get(t,e){return!!this.mergedCellsMatrix.has(t)&&(this.mergedCellsMatrix.get(t).get(e)??!1)}getByRange(t){const{row:e,col:n}=t.getTopStartCorner(),{row:o,col:i}=t.getBottomEndCorner(),s=this.mergedCells.length;let r=!1;for(let t=0;t<s;t++){const s=this.mergedCells[t],{row:a,col:l,rowspan:h,colspan:c}=s;if(a>=e&&a+h-1<=o&&l>=n&&l+c-1<=i){r=s;break}}return r}filterOverlappingMergeCells(t){const e=new Set;this.mergedCells.forEach(t=>{const{row:n,col:o,colspan:i,rowspan:s}=t;for(let t=n;t<n+s;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:s}=t,r=new Set;let a=!1;for(let l=n;l<n+s;l++){for(let n=o;n<o+i;n++){const o=`r${l},c${n}`;if(e.has(o)){Qt(nj.IS_OVERLAPPING_WARNING(t)),a=!0;break}r.add(o)}if(a)break}return a||e.add(...r),!a})}getWithinRange(t,e=!1){const{row:n,col:o}=t.getTopStartCorner(),{row:i,col:s}=t.getBottomEndCorner(),r=[];for(let t=n;t<=i;t++)for(let n=o;n<=s;n++){const o=this.get(t,n);o&&(e||!e&&o.row===t&&o.col===n)&&r.push(o)}return r}add(t,e=!1){const n=t.row,o=t.col,i=t.rowspan,s=t.colspan,r=new XU(n,o,i,s,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,o),l=!e&&this.isOverlapping(r);return a||l?(l&&Qt(nj.IS_OVERLAPPING_WARNING(r)),!1):(this.hot&&r.normalize(this.hot),this.mergedCells.push(r),ZU(this,tj,ij).call(this,r),r)}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),ZU(this,ej,sj).call(this,n),n)}clear(){x(this.mergedCells,({row:t,col:e,rowspan:n,colspan:o})=>{ao(t,t+n,t=>{ao(e,e+o,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:s,colspan:r}=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+s-1),d=co(h,i,i+r-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=ZU(this,JU,oj).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=ZU(this,JU,oj).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=ZU(this,JU,oj).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=ZU(this,JU,oj).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=>{ZU(this,tj,ij).call(this,t)})}constructor(t){QU(this,JU),QU(this,tj),QU(this,ej),this.mergedCells=[],this.mergedCellsMatrix=new Map,this.plugin=t,this.hot=t.hot}}function oj(t,e,n=1){const o=new Map,i=1===n?t.getTopStartCorner():t.getBottomEndCorner(),s=1===n?t.getBottomEndCorner():t.getTopStartCorner();for(let t=i.row;1===n?t<=s.row:t>=s.row;t+=n)for(let r=i.col;1===n?r<=s.col:r>=s.col;r+=n){const i="row"===e?t:r,s=this.get(t,r);let a=i;s&&(a=1===n?s[e]+s[`${e}span`]-1:s[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])=>1===t.size).flatMap(([,t])=>Array.from(t))))}function ij(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 sj(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)}class rj{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),s=this.getAutofillSize(t,e,n),[r,a,l,h]=t,c=["up","down"].indexOf(n)>-1?l-r+1:h-a+1,d=s-Math.floor(s/c)*c,u=this.getFarthestCollection(t,e,n,o);if(u)if("down"===n){const t=u.row+u.rowspan-r-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:s,dragArea:i,cycleLength:c}),i}updateCurrentFillCache(t){this.currentFillData||(this.currentFillData={}),Ct(this.currentFillData,t)}getAutofillSize(t,e,n){const[o,i,s,r]=t,[a,l,h,c]=e;switch(n){case"up":return o-a;case"down":return h-s;case"left":return i-l;case"right":return c-r;default:return null}}getDragArea(t,e,n){const[o,i,s,r]=t,[a,l,h,c]=e;switch(n){case"up":return[a,l,o-1,r];case"down":{const t=this.mergedCellsCollection.get(h,r);return[s+1,i,h+(t?t.rowspan-1:0),r]}case"left":return[a,l,s,i-1];case"right":{const t=this.mergedCellsCollection.get(h,r);return[o,r+(t?t.colspan-1:0),h,c]}default:return null}}getFarthestCollection(t,e,n,o){const[i,s,r,a]=t,l=["up","down"].indexOf(n)>-1,h=l?r:a,c=l?i:s,d=this.getAutofillSize(t,e,n),u=l?r-i+1:a-s+1,g=d-Math.floor(d/u)*u;let p=null,f=null,m=null;switch(n){case"up":p="includesVertically",m=h-g+1;break;case"left":p="includesHorizontally",m=h-g+1;break;case"down":p="includesVertically",m=c+g-1;break;case"right":p="includesHorizontally",m=c+g-1}return x(o,t=>{t[p](m)&&t.isFarther(f,n)&&(f=t)}),f}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 s=0,r=null,a=1;do{for(let t=0;t<n.length;t+=1){if(r=n[t],s=a*this.currentFillData.cycleLength,i(r,s))switch(o){case"up":this.plugin.mergedCellsCollection.add({row:r.row-s,rowspan:r.rowspan,col:r.col,colspan:r.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:r.row+s,rowspan:r.rowspan,col:r.col,colspan:r.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col-s,colspan:r.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:r.row,rowspan:r.rowspan,col:r.col+s,colspan:r.colspan},!0)}t===n.length-1&&(a+=1)}}while(i(r,s));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,s,r,a]=o,l=this.plugin.hot._createCellCoords(i,s),h=this.plugin.hot._createCellCoords(r,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(({colspan:t})=>t===c.getWidth()):!d.every(({rowspan:t})=>t===c.getHeight()))}constructor(t){this.currentFillData=null,this.plugin=t,this.mergedCellsCollection=this.plugin.mergedCellsCollection}}class aj{getSelectedMergedCellClassName(t,e,n,o){const i=Math.min(n[0],n[2]),s=Math.min(n[1],n[3]),r=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&&s<=l.col&&r>=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}constructor(t){this.fullySelectedMergedCellClassName="fullySelectedMergedCell",this.plugin=t,this.hot=t.hot}}class lj{constructor(t){this.next=null,this.prev=null,this.data=t}}class hj{push(t){const e=new lj(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 lj(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}constructor(){this.first=null,this.last=null}}function cj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dj(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function uj(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dj(t,e,"get"))}function gj(t,e,n){cj(t,e),e.set(t,n)}function pj(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,dj(t,e,"set"),n),n}function fj(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var mj=new WeakMap,wj=new WeakMap,bj=new WeakMap,vj=new WeakMap,Cj=new WeakMap,yj=new WeakMap,Sj=new WeakMap,kj=new WeakSet;class Rj{getCurrentVerticalNode(){return uj(this,vj).data}getFirstVerticalNode(){return uj(this,wj).first.data}getNextVerticalNode(){return uj(this,vj).next.data}getPrevVerticalNode(){return uj(this,vj).prev.data}getCurrentHorizontalNode(){return uj(this,bj).data}getFirstHorizontalNode(){return uj(this,mj).first.data}getNextHorizontalNode(){return uj(this,bj).next.data}getPrevHorizontalNode(){return uj(this,bj).prev.data}setPrevNodeAsActive(){pj(this,vj,uj(this,vj).prev),pj(this,bj,uj(this,bj).prev)}setNextNodeAsActive(){pj(this,vj,uj(this,vj).next),pj(this,bj,uj(this,bj).next)}buildFocusOrder(t){pj(this,mj,new hj),t.forEach((t,e)=>{const n=new WeakSet,o=t.getTopStartCorner(),i=t.getBottomEndCorner();for(let s=o.row;s<=i.row;s++)if(!uj(this,yj).isHidden(s))for(let r=o.col;r<=i.col;r++){if(uj(this,Sj).isHidden(r))continue;const o=fj(this,kj,xj).call(this,{selectedRange:t,selectionLayer:e,listOrder:uj(this,mj),mergeCellsVisitor:n,row:s,column:r});o&&pj(this,bj,o)}}),uj(this,mj).first&&(uj(this,mj).first.prev=uj(this,mj).last,uj(this,mj).last.next=uj(this,mj).first),pj(this,wj,new hj),t.forEach((t,e)=>{const n=new WeakSet,o=t.getTopStartCorner(),i=t.getBottomEndCorner();for(let s=o.col;s<=i.col;s++)if(!uj(this,Sj).isHidden(s))for(let r=o.row;r<=i.row;r++){if(uj(this,yj).isHidden(r))continue;const o=fj(this,kj,xj).call(this,{selectedRange:t,selectionLayer:e,listOrder:uj(this,wj),mergeCellsVisitor:n,row:r,column:s});o&&pj(this,vj,o)}}),uj(this,wj).first&&(uj(this,wj).first.prev=uj(this,wj).last,uj(this,wj).last.next=uj(this,wj).first)}setActiveNode(t,e,n){return uj(this,mj).inorder(o=>{const{selectionLayer:i,rowStart:s,rowEnd:r,colStart:a,colEnd:l}=o.data;if(i===n&&t>=s&&t<=r&&e>=a&&e<=l)return pj(this,bj,o),!0}),uj(this,wj).inorder(o=>{const{selectionLayer:i,rowStart:s,rowEnd:r,colStart:a,colEnd:l}=o.data;if(i===n&&t>=s&&t<=r&&e>=a&&e<=l)return pj(this,vj,o),!0}),this}constructor({mergedCellsGetter:t,rowIndexMapper:e,columnIndexMapper:n}){var o,i;cj(o=this,i=kj),i.add(o),gj(this,mj,{writable:!0,value:void 0}),gj(this,wj,{writable:!0,value:void 0}),gj(this,bj,{writable:!0,value:void 0}),gj(this,vj,{writable:!0,value:void 0}),gj(this,Cj,{writable:!0,value:void 0}),gj(this,yj,{writable:!0,value:void 0}),gj(this,Sj,{writable:!0,value:void 0}),pj(this,mj,new hj),pj(this,wj,new hj),pj(this,bj,null),pj(this,vj,null),pj(this,Cj,null),pj(this,yj,null),pj(this,Sj,null),pj(this,Cj,t),pj(this,yj,e),pj(this,Sj,n)}}function xj({selectedRange:t,selectionLayer:e,listOrder:n,mergeCellsVisitor:o,row:i,column:s}){const r=t.getTopStartCorner(),a=t.getBottomEndCorner(),l=t.highlight.clone().normalize(),h=uj(this,Cj).call(this,i,s);if(h&&o.has(h))return null;const c={selectionLayer:e,colStart:s,colEnd:s,rowStart:i,rowEnd:i};if(h){if(o.add(h),h.row<r.row||h.row+h.rowspan-1>a.row||h.col<r.col||h.col+h.colspan-1>a.col)return null;c.colStart=h.col,c.colEnd=h.col+h.colspan-1,c.rowStart=h.row,c.rowEnd=h.row+h.rowspan-1}const d=n.push(c);return i===l.row&&s===l.col||h&&l.row>=h.row&&l.row<=h.row+h.rowspan-1&&l.col>=h.col&&l.col<=h.col+h.colspan-1?d:null}function Ej(t,e,n){const{rowIndexMapper:o,stylesHandler:i}=t;let s=0;for(let r=e;r<e+n;r++)o.isHidden(r)||(s+=t.getRowHeight(r)??i.getDefaultRowHeight(r));return s}function Mj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tj(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function _j(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Tj(t,e,"get"))}function Hj(t,e,n){Mj(t,e),e.set(t,n)}function Ij(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,Tj(t,e,"set"),n),n}function Aj(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function Oj(t,e){Mj(t,e),e.add(t)}Mn.getSingleton().register("beforeMergeCells"),Mn.getSingleton().register("afterMergeCells"),Mn.getSingleton().register("beforeUnmergeCells"),Mn.getSingleton().register("afterUnmergeCells");const Dj="mergeCells",Nj=Dj;var Pj=new WeakMap,Wj=new WeakMap,Lj=new WeakMap,Bj=new WeakMap,Vj=new WeakSet,Fj=new WeakSet,zj=new WeakSet,$j=new WeakSet,Uj=new WeakSet,jj=new WeakSet,Yj=new WeakSet,Gj=new WeakSet,qj=new WeakSet,Kj=new WeakSet,Xj=new WeakSet,Zj=new WeakSet,Qj=new WeakSet,Jj=new WeakSet,tY=new WeakSet,eY=new WeakSet,nY=new WeakSet,oY=new WeakSet,iY=new WeakSet,sY=new WeakSet,rY=new WeakSet,aY=new WeakSet,lY=new WeakSet,hY=new WeakSet,cY=new WeakSet,dY=new WeakSet;class uY extends Qk{static get PLUGIN_KEY(){return Dj}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[Yk]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[Dj]}enablePlugin(){this.enabled||(this.mergedCellsCollection=new nj(this),this.autofillCalculations=new rj(this),this.selectionCalculations=new aj(this),this.addHook("afterInit",(...t)=>Aj(this,Vj,gY).call(this,...t)),this.addHook("modifyTransformFocus",(...t)=>Aj(this,zj,fY).call(this,...t)),this.addHook("modifyTransformStart",(...t)=>Aj(this,$j,mY).call(this,...t)),this.addHook("modifyTransformEnd",(...t)=>Aj(this,Uj,wY).call(this,...t)),this.addHook("beforeSelectionHighlightSet",(...t)=>Aj(this,jj,bY).call(this,...t)),this.addHook("beforeSetRangeStart",(...t)=>Aj(this,qj,yY).call(this,...t)),this.addHook("beforeSetRangeStartOnly",(...t)=>Aj(this,qj,yY).call(this,...t)),this.addHook("beforeSelectionFocusSet",(...t)=>Aj(this,Kj,SY).call(this,...t)),this.addHook("afterSelectionFocusSet",(...t)=>Aj(this,Xj,kY).call(this,...t)),this.addHook("afterSelectionEnd",(...t)=>Aj(this,Zj,RY).call(this,...t)),this.addHook("modifyGetCellCoords",(...t)=>Aj(this,Yj,vY).call(this,...t)),this.addHook("modifyGetCoordsElement",(...t)=>Aj(this,Yj,vY).call(this,...t)),this.addHook("afterIsMultipleSelection",(...t)=>Aj(this,Fj,pY).call(this,...t)),this.addHook("afterRenderer",(...t)=>_j(this,Bj).after(...t)),this.addHook("afterContextMenuDefaultOptions",(...t)=>Aj(this,Gj,CY).call(this,...t)),this.addHook("afterGetCellMeta",(...t)=>Aj(this,Qj,xY).call(this,...t)),this.addHook("afterViewportRowCalculatorOverride",(...t)=>Aj(this,Jj,EY).call(this,...t)),this.addHook("afterViewportColumnCalculatorOverride",(...t)=>Aj(this,tY,MY).call(this,...t)),this.addHook("modifyAutofillRange",(...t)=>Aj(this,eY,TY).call(this,...t)),this.addHook("afterCreateCol",(...t)=>Aj(this,nY,_Y).call(this,...t)),this.addHook("afterRemoveCol",(...t)=>Aj(this,oY,HY).call(this,...t)),this.addHook("afterCreateRow",(...t)=>Aj(this,iY,IY).call(this,...t)),this.addHook("afterRemoveRow",(...t)=>Aj(this,sY,AY).call(this,...t)),this.addHook("afterChange",(...t)=>Aj(this,rY,OY).call(this,...t)),this.addHook("beforeDrawBorders",(...t)=>Aj(this,aY,DY).call(this,...t)),this.addHook("afterDrawSelection",(...t)=>Aj(this,lY,NY).call(this,...t)),this.addHook("beforeRemoveCellClassNames",(...t)=>Aj(this,hY,PY).call(this,...t)),this.addHook("beforeBeginEditing",(...t)=>Aj(this,cY,WY).call(this,...t)),this.addHook("modifyRowHeightByOverlayName",(...t)=>Aj(this,dY,LY).call(this,...t)),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(!zt.chrome.value)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"===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=>{t.style.background=Ie(t,"backgroundColor")?.replace(", 0.99)",")")})},1)}validateSetting(t){return!!t&&(XU.containsNegativeValues(t)?(Qt(XU.NEGATIVE_VALUES_WARNING(t)),!1):XU.isOutOfBounds(t,this.hot.countRows(),this.hot.countCols())?(Qt(XU.IS_OUT_OF_BOUNDS_WARNING(t)),!1):XU.isSingleCell(t)?(Qt(XU.IS_SINGLE_CELL(t)),!1):!XU.containsZeroSpan(t)||(Qt(XU.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:s}=t,r=this.hot._createCellCoords(e,o),a=this.hot._createCellCoords(e+i-1,o+s-1),l=this.hot._createCellRange(r,r,a);this.mergeRange(l,!0,!0);for(let t=e;t<e+i;t++)for(let i=o;i<o+s;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,e=!1){return!!e||this.validateSetting(t)}mergeSelection(t=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(t=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,e=!1,n=!1){const o=t.getTopStartCorner(),i=t.getBottomEndCorner(),s={row:o.row,col:o.col,rowspan:i.row-o.row+1,colspan:i.col-o.col+1},r=[];let a=null;if(!this.canMergeRange(s,e))return!1;this.hot.runHooks("beforeMergeCells",t,e),ao(0,s.rowspan-1,t=>{ao(0,s.colspan-1,e=>{let n=null;r[t]||(r[t]=[]),0===t&&0===e?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s.row),this.hot.toPhysicalColumn(s.col)):this.hot.setCellMeta(s.row+t,s.col+e,"hidden",!0),r[t][e]=n})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0);return!this.mergedCellsCollection.add(s,e)||(n?a=[s.row,s.col,r]:this.hot.populateFromArray(s.row,s.col,r,void 0,void 0,this.pluginName),e||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",t,s,e),a)}unmergeRange(t,e=!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),s=this.hot._createCellCoords(n,o);this.mergeRange(this.hot._createCellRange(i,i,s))}unmerge(t,e,n,o){const i=this.hot._createCellCoords(t,e),s=this.hot._createCellCoords(n,o);this.unmergeRange(this.hot._createCellRange(i,i,s))}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:Nj})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Nj)}modifyViewportRowStart(t,e){const n=this.hot.rowIndexMapper,o=n.getVisualFromRenderableIndex(t.startRow);for(let i=0;i<e;i+=1){const s=this.mergedCellsCollection.get(o,i);if(Et(s)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.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 s=this.mergedCellsCollection.get(o,i);if(Et(s)){const o=s.row+s.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 s=this.mergedCellsCollection.get(i,o);if(Et(s)){const o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.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 s=this.mergedCellsCollection.get(i,o);if(Et(s)){const o=s.col+s.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:s}=this.hot;let r,a;r=0===e?i.getNearestNotHiddenIndex(t,1):i.getNearestNotHiddenIndex(t+e-1,-1),a=0===o?s.getNearestNotHiddenIndex(n,1):s.getNearestNotHiddenIndex(n+o-1,-1);return[t>=0?i.getRenderableFromVisualIndex(r):t,n>=0?s.getRenderableFromVisualIndex(a):n]}constructor(...t){super(...t),Oj(this,Vj),Oj(this,Fj),Oj(this,zj),Oj(this,$j),Oj(this,Uj),Oj(this,jj),Oj(this,Yj),Oj(this,Gj),Oj(this,qj),Oj(this,Kj),Oj(this,Xj),Oj(this,Zj),Oj(this,Qj),Oj(this,Jj),Oj(this,tY),Oj(this,eY),Oj(this,nY),Oj(this,oY),Oj(this,iY),Oj(this,sY),Oj(this,rY),Oj(this,aY),Oj(this,lY),Oj(this,hY),Oj(this,cY),Oj(this,dY),Hj(this,Pj,{writable:!0,value:void 0}),Hj(this,Wj,{writable:!0,value:void 0}),Hj(this,Lj,{writable:!0,value:void 0}),Hj(this,Bj,{writable:!0,value:void 0}),this.mergedCellsCollection=null,this.autofillCalculations=null,this.selectionCalculations=null,Ij(this,Pj,null),Ij(this,Wj,{row:0,col:0}),Ij(this,Lj,new Rj({mergedCellsGetter:(t,e)=>this.mergedCellsCollection.get(t,e),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),Ij(this,Bj,function(t){const{hot:e}=t,{rowIndexMapper:n,columnIndexMapper:o}=e,i=new Map;return{before:function(){},after:function(s,r,a){const l=t.mergedCellsCollection.get(r,a);if(!Et(l))return s.removeAttribute("rowspan"),s.removeAttribute("colspan"),i.has(r)&&!e.getSettings().rowHeaders&&(s.style.height=`${i.get(r)}px`,i.delete(r)),void(s.style.display="");const{row:h,col:c,colspan:d,rowspan:u}=l,[g,p]=t.translateMergedCellToRenderable(h,u,c,d),f=t.getSetting("virtualized");if(0===c&&!e.getSettings().rowHeaders){const t=e._getRowHeightFromSettings(r);if(void 0!==t){const n=e.stylesHandler.areCellsBorderBox()?0:1;i.set(r,t-n)}else if(jt()){const t=Ej(e,h,u);i.set(r,t/u)}}const m=g-n.getRenderableFromVisualIndex(r)+1,w=p-o.getRenderableFromVisualIndex(a)+1;let b=n.getNearestNotHiddenIndex(h,1),v=o.getNearestNotHiddenIndex(c,1);if(f){const t=e.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(t)||(b=Math.max(b,e.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)||(v=Math.max(v,e.getFirstRenderedVisibleColumn()))}const C=Math.min(u,m),y=Math.min(d,w);b===r&&v===a?(s.setAttribute("rowspan",C),s.setAttribute("colspan",y)):(s.removeAttribute("rowspan"),s.removeAttribute("colspan"),s.style.display="none")}}}(this))}}function gY(){this.generateFromSettings(),this.hot.render()}function pY(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 fY(t){_j(this,Wj).row=t.row,_j(this,Wj).col=t.col}function mY(t){const e=this.hot.getSelectedRangeActive(),{highlight:n}=e,{columnIndexMapper:o,rowIndexMapper:i}=this.hot;_j(this,Pj)&&(null!==i.getRenderableFromVisualIndex(_j(this,Pj).row)&&(n.row=_j(this,Pj).row),null!==o.getRenderableFromVisualIndex(_j(this,Pj).col)&&(n.col=_j(this,Pj).col),Ij(this,Pj,null));const s=this.mergedCellsCollection.get(n.row,n.col);if(!s)return;const r=s.col,a=s.col+s.colspan-1;if(t.col<0){const e=n.col>=r&&n.col<=a?r-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>=r&&n.col<=a?a+1:r,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=s.row,h=s.row+s.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 wY(t){const e=this.hot.getSelectedRangeActive(),n=e.clone(),{to:o}=e,{columnIndexMapper:i,rowIndexMapper:s}=this.hot,r=(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 s=this.mergedCellsCollection.getStartMostColumnIndex(e,o.col)+t.col;r(o.row,s),"E-W"===e.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(s=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(s,1);null!==a&&(t.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,o.col)-1,1))}else if(t.col>0){let s=this.mergedCellsCollection.getEndMostColumnIndex(e,o.col)+t.col;r(o.row,s),"W-E"===e.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(s=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(s,-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;r(i,o.col),"S-N"===e.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=s.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;r(i,o.col),"N-S"===e.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=s.getNearestNotHiddenIndex(i,-1);null!==a&&(t.row=Math.max(this.hot.view.countRenderableRowsInRange(o.row,a)-1,1))}}function bY(){const t=this.hot.getSelectedRangeLast(),{highlight:e}=t;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void Ij(this,Pj,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);Ij(this,Pj,e.clone()),n&&e.assign(n)}function vY(t,e,n,o){if(t<0||e<0)return;const i=this.mergedCellsCollection.get(t,e);if(!i)return;const{row:s,col:r,colspan:a,rowspan:l}=i,h=s,c=r,d=s+l-1,u=r+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 CY(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(Xh)}return this.getTranslatedPhrase(Kh)},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||XU.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 yY(){Ij(this,Pj,null)}function SY(){if(_j(this,Pj).isCell())return;const t=this.hot.getSelectedRangeActive(),e=t.getVerticalDirection(),n=t.getHorizontalDirection(),o=_j(this,Pj).clone().normalize();_j(this,Lj).setActiveNode(o.row,o.col),_j(this,Wj).row>0||_j(this,Wj).col>0?_j(this,Lj).setPrevNodeAsActive():("E-W"===n&&_j(this,Wj).col<0||"S-N"===e&&_j(this,Wj).row<0)&&_j(this,Lj).setNextNodeAsActive()}function kY(t,e){const{columnIndexMapper:n,rowIndexMapper:o}=this.hot;let i=this.hot.getActiveSelectionLayerIndex(),s=null,r=null;if(_j(this,Wj).col<0){const{rowEnd:t,colEnd:e,selectionLayer:a}=_j(this,Lj).getPrevHorizontalNode();r=n.getNearestNotHiddenIndex(e,-1),s=o.getNearestNotHiddenIndex(t,-1),i=a}else if(_j(this,Wj).col>0){const{rowStart:t,colStart:e,selectionLayer:a}=_j(this,Lj).getNextHorizontalNode();r=n.getNearestNotHiddenIndex(e,1),s=o.getNearestNotHiddenIndex(t,1),i=a}else if(_j(this,Wj).row<0){const{rowEnd:t,colEnd:e,selectionLayer:a}=_j(this,Lj).getPrevVerticalNode();r=n.getNearestNotHiddenIndex(e,-1),s=o.getNearestNotHiddenIndex(t,-1),i=a}else if(_j(this,Wj).row>0){const{rowStart:t,colStart:e,selectionLayer:a}=_j(this,Lj).getNextVerticalNode();r=n.getNearestNotHiddenIndex(e,1),s=o.getNearestNotHiddenIndex(t,1),i=a}if(null!==s||null!==r){this.hot.selection.setActiveSelectionLayerIndex(i);const n=this.hot.getSelectedRangeActive(),o=this.hot._createCellCoords(s,r),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()}_j(this,Lj).setActiveNode(t,e,i),Ij(this,Wj,{row:0,col:0})}function RY(){_j(this,Lj).buildFocusOrder(this.hot.getSelectedRange())}function xY(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 EY(t){if(this.getSetting("virtualized"))return;const e=this.hot.countCols();this.modifyViewportRowStart(t,e),this.modifyViewportRowEnd(t,e)}function MY(t){if(this.getSetting("virtualized"))return;const e=this.hot.countRows();this.modifyViewportColumnStart(t,e),this.modifyViewportColumnEnd(t,e)}function TY(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]),s=this.hot._createCellRange(o,o,i),r=this.mergedCellsCollection.getWithinRange(s);return 0===r.length?t:this.autofillCalculations.snapDragArea(e,t,n,r)}function _Y(t,e){this.mergedCellsCollection.shiftCollections("right",t,e)}function HY(t,e){this.mergedCellsCollection.shiftCollections("left",t,e)}function IY(t,e,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",t,e)}function AY(t,e){this.mergedCellsCollection.shiftCollections("up",t,e)}function OY(t,e){"Autofill.fill"===e&&this.autofillCalculations.recreateAfterDataPopulation(t)}function DY(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 NY(t,e,n,o){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(t,e,n,o)}function PY(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function WY(t,e,n,o){if(!(o instanceof MouseEvent))return;const i=this.hot.getSelectedRangeActive(),s=this.mergedCellsCollection.getByRange(i);if(!s)return;const r=this.hot._createCellCoords(s.row,s.col),a=this.hot._createCellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(r,r,a))}function LY(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 s=this.hot._createCellCoords(e,o),r=this.hot._createCellCoords(e,i),a=this.hot._createCellRange(s,s,r),l=this.mergedCellsCollection.getWithinRange(a,!0),h=l.reduce((t,{rowspan:e})=>Math.max(t,e),1);let c=0;return l.length>1&&l[0].rowspan<h&&(c=h-l[0].rowspan),l.forEach(({rowspan:o})=>{let i=0;i="top"===n||"top_inline_start_corner"===n?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-e):o-c,t=Math.max(t??0,Ej(this.hot,e,i))}),t}const BY="sort";const VY="multiColumnSorting",FY=VY;gE(VY,function(t,e){return function(n,o){const[,...i]=n,[,...s]=o;return function n(o){const r=t[o],a=e[o],l=i[o],h=s[o],c=a.multiColumnSorting,d=(c.compareFunctionFactory?c.compareFunctionFactory:fE(a.type))(r,a,c)(l,h);if(d===mE){const t=o+1;if(void 0!==e[t])return n(t)}return d}(0)}});class zY extends YE{static get PLUGIN_KEY(){return VY}static get PLUGIN_PRIORITY(){return 170}static get SETTING_KEYS(){return[VY]}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){this.enabled||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,LE)),!1},runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&t.isHeader()},relativeToGroup:Lp,position:"before",group:FY})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(FY)}sort(t){super.sort(t)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(t){return super.getSortConfig(t)}setSortConfig(t){super.setSortConfig(t)}getNormalizedSortConfigs(t=[]){return Array.isArray(t)?t:[t]}updateHeaderClasses(t,...e){super.updateHeaderClasses(t,...e),ge(t,function(t){const e=t.className.split(" "),n=new RegExp(`^${BY}-[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(`${BY}-${t.getIndexOfColumnInSortQueue(e)+1}`),o}(...e))}onAfterOnCellMouseDown(t,e){!1!==EE(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,LE))):this.sort(this.getColumnNextConfig(e.col)))}constructor(...t){super(...t),this.pluginKey=VY}}class $Y extends Qk{static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return Yt()}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,s,r,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(),s=i.getWidth(),r=i.getHeight(),a=i.getDirection(),1===s&&1===r&&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 s=t.getTopStartCorner(),r=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,s.col)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(r.row,e.col),end:this.hot._createCellCoords(e.row,s.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:r}:h.end=e;break;case"SE-NW":"top"===i?h={start:e,end:s}: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,s.col),end:this.hot._createCellCoords(a.row,e.col)}:{start:this.hot._createCellCoords(s.row,e.col),end:this.hot._createCellCoords(e.row,r.col)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(t.highlight.row,e.col),end:this.hot._createCellCoords(e.row,r.col)}:{start:this.hot._createCellCoords(e.row,s.col),end:this.hot._createCellCoords(s.row,e.col)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(e.row,l.col),end:this.hot._createCellCoords(s.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:s}}}return h}isDragged(){return this.dragged.length>0}constructor(...t){super(...t),this.dragged=[],this.lastSetCell=null}}function UY({label:t="",colspan:e=1,origColspan:n=1,rowspan:o=1,origRowspan:i=1,collapsible:s=!1,crossHiddenColumns:r=[],isCollapsed:a=!1,isHidden:l=!1,isRoot:h=!1,isPlaceholder:c=!1,isRowspanPlaceholder:d=!1,headerClassNames:u=[]}={}){return{label:t,colspan:e,origColspan:n,rowspan:o,origRowspan:i,collapsible:s,isCollapsed:a,crossHiddenColumns:r,isHidden:l,isRoot:h,isPlaceholder:c,isRowspanPlaceholder:d,headerClassNames:u}}function jY(){return{label:"",isPlaceholder:!0}}function YY(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function GY(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,YY(t,e,"get"))}function qY(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 KY(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,YY(t,e,"set"),n),n}const XY=["label","collapsible"];var ZY=new WeakMap,QY=new WeakMap,JY=new WeakMap;class tG{setColumnsLimit(t){KY(this,JY,t)}setData(t=[]){KY(this,ZY,function(t,e=1/0){const n=[],o=[];if(0===e)return n;const i=t=>{if(""===t)return!0;if(!Et(t))return!1;const{label:e,colspan:n,rowspan:o,headerClassName:i}=t;return!(""!==H(e)||void 0!==n&&1!==n||void 0!==o&&1!==o||void 0!==i)},s=t=>{const e=UY();if(Et(t)){const{label:n,colspan:o,rowspan:i,headerClassName:s}=t;e.label=H(n),"number"==typeof o&&o>1&&(e.colspan=o,e.origColspan=o),"number"==typeof i&&i>1&&(e.rowspan=i,e.origRowspan=i),"string"==typeof s&&(e.headerClassNames=[...s.split(" ")])}else e.label=H(t);return e};x(t,(t=[])=>{const r=[];let a=0,l=0;for(n.push(r);(a<t.length||o[l]>0)&&!(l>=e);){const n=t[a];if(o[l]>0){i(n)&&(a+=1),r.push(UY()),o[l]-=1,l+=1;continue}if(a>=t.length)break;const h=s(n);let c=h.origColspan;if(l+c>=e&&(c-=l+c-e,h.colspan=c,h.origColspan=c),h.origRowspan>1)for(let t=0;t<c;t++)o[l+t]=Math.max(o[l+t]??0,h.origRowspan-1);if(r.push(h),h.colspan>1)for(let t=0;t<h.colspan-1;t++)r.push(jY());l+=c,a+=1}});const r=Math.max(...R(n,t=>t.length));return x(n,t=>{if(t.length<r){const e=R(new Array(r-t.length),()=>UY());t.splice(t.length,0,...e)}}),n}(t,GY(this,JY))),KY(this,QY,GY(this,ZY).length)}getData(){return GY(this,ZY)}mergeWith(t){x(t,({row:t,col:e,...n})=>{const o=this.getHeaderSettings(t,e);null!==o&&Ct(o,n,XY)})}map(t){x(GY(this,ZY),e=>{x(e,e=>{const n=t({...e});Et(n)&&Ct(e,n,XY)})})}getHeaderSettings(t,e){if(t>=GY(this,QY)||t<0)return null;const n=GY(this,ZY)[t];return!1===Array.isArray(n)||e>=n.length?null:n[e]??null}getHeadersSettings(t,e,n=1){const o=[];if(t>=GY(this,QY)||t<0)return o;const i=GY(this,ZY)[t];let s=0;for(let t=e;t<i.length;t++){const e=i[t];if(e.isPlaceholder&&bt("The first column settings cannot overlap the other header layers"),s+=e.colspan,o.push(e),e.colspan>1&&(t+=e.colspan-1),s===n)break;s>n&&bt("The last column settings cannot overlap the other header layers")}return o}getLayersCount(){return GY(this,QY)}getColumnsCount(){return GY(this,QY)>0?GY(this,ZY)[0].length:0}clear(){KY(this,ZY,[]),KY(this,QY,0)}constructor(){qY(this,ZY,{writable:!0,value:void 0}),qY(this,QY,{writable:!0,value:void 0}),qY(this,JY,{writable:!0,value:void 0}),KY(this,ZY,[]),KY(this,QY,0),KY(this,JY,1/0)}}const eG="DF-pre-order";const nG=new Map([[eG,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 oG{addChild(t){t.parent=this,this.childs.push(t)}cloneTree(t=this){const e=new oG({...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,e="BF"){nG.has(e)||bt(`Traversal strategy "${e}" does not exist`),nG.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)}constructor(t){this.data={},this.parent=null,this.childs=[],this.data=t}}function iG(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function sG(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,iG(t,e,"get"))}function rG(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 aG(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,iG(t,e,"set"),n),n}var lG=new WeakMap,hG=new WeakMap,cG=new WeakMap;class dG{getRoots(){return Array.from(sG(this,lG).values())}getRootByColumn(t){let e;return sG(this,hG).has(t)&&(e=sG(this,lG).get(sG(this,hG).get(t))),e}getNode(t,e){const n=this.getRootByColumn(e);if(!n)return;const o=e-sG(this,hG).get(e);let i,s=0;return n.walkDown(n=>{const{data:{origColspan:r,headerLevel:a}}=n;if(t===a){if(o>=s&&o<=s+r-1)return i=n,i.data.isRoot=e===i.data.columnIndex,!1;s+=r}}),i}rebuildTreeIndex(){let t=0;sG(this,hG).clear(),x(sG(this,lG),([,{data:{colspan:e}}])=>{for(let n=t;n<t+e;n++)sG(this,hG).set(n,t);t+=e})}buildTree(){this.clear();const t=sG(this,cG).getColumnsCount();let e=0;for(;e<t;){const t=sG(this,cG).getHeaderSettings(0,e),n=new oG;sG(this,lG).set(e,n),this.buildLeaves(n,e,0,t.origColspan),e+=t.origColspan}this.rebuildTreeIndex()}buildLeaves(t,e,n,o=1){const i=sG(this,cG).getHeadersSettings(n,e,o);n+=1,x(i,o=>{const i={...o,headerLevel:n-1,columnIndex:e};let s;1===n?(t.data=i,s=t):(s=new oG(i),t.addChild(s)),n<sG(this,cG).getLayersCount()&&this.buildLeaves(s,e,n,o.origColspan),e+=o.origColspan})}clear(){sG(this,lG).clear(),sG(this,hG).clear()}constructor(t){rG(this,lG,{writable:!0,value:void 0}),rG(this,hG,{writable:!0,value:void 0}),rG(this,cG,{writable:!0,value:void 0}),aG(this,lG,new Map),aG(this,hG,new Map),aG(this,cG,null),aG(this,cG,t)}}function uG(t,e){t.walkDown(({data:t,childs:n})=>{if(!t.isHidden&&(e(t.columnIndex),0===n.length))for(let n=1;n<t.colspan;n++)e(t.columnIndex+n)})}function gG({childs:t},e){if(0!==t.length)return t[0].data[e]}function pG(t){return gG(t,"origColspan")===t.data.origColspan}function fG(t){const{data:e,childs:n}=t;if(!e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(pG(t))return fG(n[0]);e.isCollapsed=!1;const o=n.slice(1),i=new Set;let s=0;if(o.length>0)x(o,t=>{t.replaceTreeWith(t.data.clonedTree),t.data.clonedTree=null;const e=t.data;s+=e.colspan,uG(t,t=>{i.add(t)})});else{const{colspan:t,origColspan:n,columnIndex:o}=e;s=n-t;for(let t=1;t<n;t++)i.add(o+t)}return t.walkUp(t=>{const{data:e}=t;e.colspan+=s,e.colspan>=e.origColspan?(e.colspan=e.origColspan,e.isCollapsed=!1):pG(t)&&(e.isCollapsed=gG(t,"isCollapsed"))}),{rollbackModification:()=>mG(t),affectedColumns:Array.from(i),colspanCompensation:s}}function mG(t){const{data:e,childs:n}=t;if(e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(pG(t))return mG(n[0]);e.isCollapsed=!0;const o=n.slice(1),i=new Set;if(o.length>0)x(o,t=>{uG(t,t=>{i.add(t)}),t.data.clonedTree=t.cloneTree(),t.walkDown(({data:t})=>{t.isHidden=!0})});else{const{origColspan:t,columnIndex:n}=e;for(let e=1;e<t;e++){const t=n+e;i.add(t)}}const s=e.colspan-(gG(t,"colspan")??1);return t.walkUp(t=>{const{data:e}=t;e.colspan-=s,e.colspan<=1?(e.colspan=1,e.isCollapsed=!0):pG(t)&&(e.isCollapsed=gG(t,"isCollapsed"))}),{rollbackModification:()=>fG(t),affectedColumns:Array.from(i),colspanCompensation:s}}const wG=new Map([["collapse",mG],["expand",fG],["hide-column",function(t,e){Number.isInteger(e)||bt("The passed gridColumnIndex argument has invalid type."),t.childs.length>0&&bt(T`The passed node is not the last node on the tree. Only for\x20
|
|
271
|
+
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)||bt("The passed gridColumnIndex argument has invalid type."),t.childs.length>0&&bt(T`The passed node is not the last node on the tree. Only for\x20
|
|
272
|
+
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 bG(t){const e=[];return x(t,t=>{t.walkDown(t=>{const n=t.data,{origColspan:o,columnIndex:i,headerLevel:s,crossHiddenColumns:r}=n,a=function(t,e){let n;Array.isArray(t[e])?n=t[e]:(n=[],t[e]=n);return n}(e,s);let l=!1;for(let t=i;t<i+o;t++){if(r.includes(t)||l)a.push(jY());else{const t=vG(n);t.isRoot=!0,a.push(t),l=!0}}})}),function(t){for(let e=0;e<t.length;e++){const n=t[e];for(let o=0;o<n.length;o++){const i=n[o];if(!i||!i.isRoot||!i.origRowspan||i.origRowspan<=1)continue;const s=Math.min(i.origRowspan,t.length-e),r=i.origColspan||1;for(let n=1;n<s;n++){const i=e+n;if(t[i])for(let e=o;e<o+r&&e<t[i].length;e++)t[i][e]={label:"",isPlaceholder:!0,isRowspanPlaceholder:!0}}}}}(e),e}function vG(t){const{crossHiddenColumns:e,...n}=UY(t);return n}function CG(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function yG(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,CG(t,e,"get"))}function SG(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 kG(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,CG(t,e,"set"),n),n}var RG=new WeakMap,xG=new WeakMap,EG=new WeakMap;class MG{setState(t){yG(this,RG).setData(t);let e=!1;try{yG(this,xG).buildTree()}catch(t){yG(this,xG).clear(),yG(this,RG).clear(),e=!0}return kG(this,EG,bG(yG(this,xG).getRoots())),e}setColumnsLimit(t){yG(this,RG).setColumnsLimit(t)}mergeStateWith(t){const e=R(t,({row:t,...e})=>({row:t<0?this.rowCoordsToLevel(t):t,...e}));yG(this,RG).mergeWith(e),yG(this,xG).buildTree(),kG(this,EG,bG(yG(this,xG).getRoots()))}mapState(t){yG(this,RG).map(t),yG(this,xG).buildTree(),kG(this,EG,bG(yG(this,xG).getRoots()))}mapNodes(t){return S(yG(this,xG).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=yG(this,xG).getNode(e,n);let i;return o&&(i=function(t,e,n){return wG.has(t)||bt(`The node modifier action ("${t}") does not exist.`),wG.get(t)(e,n)}(t,o,n),kG(this,EG,bG(yG(this,xG).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){return t<0&&(t=this.rowCoordsToLevel(t)),null===t||t>=this.getLayersCount()?null:yG(this,EG)[t]?.[e]??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=yG(this,xG).getNode(t,e);return n||null}findTopMostEntireHeaderLevel(t,e=t){const n=e-t+1;let o=!1,i=null;for(let s=t;s<=e;s++){const r=yG(this,xG).getRootByColumn(s);if(!r)break;o=!0,r.walkDown(o=>{const{columnIndex:s,headerLevel:r,origColspan:a,isHidden:l}=o.data;l||a<=n&&s>=t&&s+a-1<=e&&(null===i||r<i)&&(i=r)},eG)}return o&&null===i?-1:this.levelToRowCoords(i??0)}findLeftMostColumnIndex(t,e){const{isRoot:n}=this.getHeaderSettings(t,e)??{isRoot:!0};if(n)return e;let o=e-1;for(;o>=0;){const{isRoot:e}=this.getHeaderSettings(t,o)??{isRoot:!0};if(e)break;o-=1}return o}findRightMostColumnIndex(t,e){const{isRoot:n,origColspan:o}=this.getHeaderSettings(t,e)??{isRoot:!0,origColspan:1};if(n)return e+o-1;let i=e+1;for(;i<this.getColumnsCount();){const{isRoot:e}=this.getHeaderSettings(t,i)??{isRoot:!0};if(e)break;i+=1}return i-1}getLayersCount(){return yG(this,RG).getLayersCount()}getColumnsCount(){return yG(this,RG).getColumnsCount()}clear(){kG(this,EG,[]),yG(this,RG).clear(),yG(this,xG).clear()}constructor(){SG(this,RG,{writable:!0,value:void 0}),SG(this,xG,{writable:!0,value:void 0}),SG(this,EG,{writable:!0,value:void 0}),kG(this,RG,new tG),kG(this,xG,new dG(yG(this,RG))),kG(this,EG,[[]])}}function TG(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function _G(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 HG=new WeakSet,IG=new WeakSet,AG=new WeakSet,OG=new WeakSet,DG=new WeakSet,NG=new WeakSet;class PG{setLayersCount(t){return this.layersCount=t,this}getWidth(t){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t))}buildWidthsMap(){const t=TG(this,IG,LG).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),TG(this,AG,BG).call(this,this.container,e),this.hot.rootDocument.body.appendChild(this.container);const o=e?TG(this,HG,WG).call(this):null,i=this.container.querySelector('[data-ghost-table="rendered"]').querySelectorAll("th[data-column]"),s=new Map;for(let t=0;t<i.length;t++){const e=i[t];if(e.colSpan>1)continue;const n=Number.parseInt(e.dataset.column,10);s.set(n,e)}this.widthsMap.clear(),s.forEach((n,i)=>{const s=this.hot.toPhysicalColumn(i);if(this.hot.columnIndexMapper.isHidden(s))return;let r;if(e&&t.has(s)){const t=o.get(s);void 0!==t&&(r=t)}void 0===r&&(r=n.getBoundingClientRect().width),this.widthsMap.setValueAtIndex(s,r)}),this.container.remove(),this.container=null}clear(){this.widthsMap.clear(),this.container=null}constructor({hot:t,headersStateManager:e}){_G(this,HG),_G(this,IG),_G(this,AG),_G(this,OG),_G(this,DG),_G(this,NG),this.layersCount=0,this.hot=t,this.headersStateManager=e,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}}function WG(){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 LG(){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 BG(t,e){const n=this.hot.getSettings(),o=!!n.dropdownMenu,i=!!n.collapsibleColumns,s=this.hot.countCols(),r=n.sanitizer;t.innerHTML=e?TG(this,OG,VG).call(this,s,o,i,r)+TG(this,DG,FG).call(this,s,o,i,r):TG(this,DG,FG).call(this,s,o,i,r)}function VG(t,e,n,o){let i="";for(let s=0;s<this.layersCount;s++){let r="";for(let i=0;i<t;i++){const t=this.headersStateManager.getHeaderTreeNodeData(s,i);t&&t.isRoot&&(r+=`<th data-column="${i}" colspan="${t.origColspan}">${TG(this,NG,zG).call(this,t,e,n,o)}</th>`)}i+=`<tr>${r}</tr>`}return`<table data-ghost-table="full"><thead>${i}</thead></table>`}function FG(t,e,n,o){let i="";for(let s=0;s<this.layersCount;s++){let r="";for(let i=0;i<t;i++){const t=this.headersStateManager.getHeaderSettings(s,i);if(t&&!t.isPlaceholder&&!t.isHidden&&!t.isRowspanPlaceholder){const s=t.rowspan>1?` rowspan="${t.rowspan}"`:"";r+=`<th data-column="${i}" colspan="${t.colspan}"${s}>${TG(this,NG,zG).call(this,t,e,n,o)}</th>`}}i+=`<tr>${r}</tr>`}return`<table data-ghost-table="rendered"><thead>${i}</thead></table>`}function zG(t,e,n,o){return`<div class="relative"><span class="colHeader">${"function"==typeof o?o(t.label,"innerHTML"):t.label}</span>${e?'<button class="changeType"></button>':""}${n&&(t.origColspan>1||t.colspan>1)?'<div class="collapsibleIndicator expanded">-</div>':""}</div>`}function $G(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function UG(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function jG(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,UG(t,e,"get"))}function YG(t,e,n){$G(t,e),e.set(t,n)}function GG(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,UG(t,e,"set"),n),n}function qG(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function KG(t,e){$G(t,e),e.add(t)}const XG="nestedHeaders";var ZG=new WeakMap,QG=new WeakMap,JG=new WeakMap,tq=new WeakMap,eq=new WeakMap,nq=new WeakMap,oq=new WeakMap,iq=new WeakMap,sq=new WeakMap,rq=new WeakMap,aq=new WeakSet,lq=new WeakSet,hq=new WeakSet,cq=new WeakSet,dq=new WeakSet,uq=new WeakSet,gq=new WeakSet,pq=new WeakSet,fq=new WeakSet,mq=new WeakSet,wq=new WeakSet,bq=new WeakSet,vq=new WeakSet,Cq=new WeakSet,yq=new WeakSet,Sq=new WeakSet,kq=new WeakSet,Rq=new WeakSet,xq=new WeakSet,Eq=new WeakSet,Mq=new WeakSet,Tq=new WeakSet,_q=new WeakSet;class Hq extends Qk{static get PLUGIN_KEY(){return XG}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[XG]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Qt(T`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
|
|
273
|
+
passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>qG(this,Mq,Zq).call(this)),this.addHook("afterLoadData",(...t)=>qG(this,Tq,Qq).call(this,...t)),this.addHook("beforeOnCellMouseDown",(...t)=>qG(this,pq,Lq).call(this,...t)),this.addHook("afterOnCellMouseDown",(...t)=>qG(this,fq,Bq).call(this,...t)),this.addHook("beforeOnCellMouseOver",(...t)=>qG(this,mq,Vq).call(this,...t)),this.addHook("beforeOnCellMouseUp",(...t)=>qG(this,wq,Fq).call(this,...t)),this.addHook("beforeSelectionHighlightSet",(...t)=>qG(this,bq,zq).call(this,...t)),this.addHook("modifyTransformStart",(...t)=>qG(this,vq,$q).call(this,...t)),this.addHook("afterSelection",()=>jG(this,rq).call(this)),this.addHook("afterSelectionFocusSet",()=>jG(this,rq).call(this)),this.addHook("beforeViewportScrollHorizontally",(...t)=>qG(this,dq,Nq).call(this,...t)),this.addHook("afterGetColumnHeaderRenderers",t=>qG(this,yq,jq).call(this,t)),this.addHook("modifyColWidth",(...t)=>qG(this,kq,Gq).call(this,...t)),this.addHook("modifyColumnHeaderHeight",(...t)=>qG(this,Rq,qq).call(this,...t)),this.addHook("modifyColumnHeaderValue",(...t)=>qG(this,xq,Kq).call(this,...t)),this.addHook("beforeHighlightingColumnHeader",(...t)=>qG(this,uq,Pq).call(this,...t)),this.addHook("beforeCopy",(...t)=>qG(this,gq,Wq).call(this,...t)),this.addHook("beforeSelectColumns",(...t)=>qG(this,Cq,Uq).call(this,...t)),this.addHook("beforeViewRender",()=>qG(this,_q,Jq).call(this)),this.addHook("afterViewportColumnCalculatorOverride",(...t)=>qG(this,Sq,Yq).call(this,...t)),this.addHook("modifyFocusedElement",(...t)=>qG(this,Eq,Xq).call(this,...t)),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",jG(this,rq)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",jG(this,rq)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:t}=this.hot.getSettings();GG(this,nq,null),GG(this,oq,null),jG(this,ZG).setColumnsLimit(this.hot.countCols()),Array.isArray(t)&&(this.detectedOverlappedHeaders=jG(this,ZG).setState(t)),GG(this,sq,jG(this,ZG).mapNodes(({origRowspan:t})=>t>1||void 0).length>0),jG(this,sq)?ue(this.hot.rootElement,"htHasRowspanHeaders"):ge(this.hot.rootElement,"htHasRowspanHeaders"),this.detectedOverlappedHeaders&&Qt(T`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
|
|
274
|
+
is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((t,e)=>{const n=!0===t?"hide-column":"show-column";jG(this,ZG).triggerColumnModification(n,e)}),!jG(this,QG)&&this.enabled&&GG(this,QG,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(t=>{t.forEach(({op:t,index:e,newValue:n})=>{if("replace"===t){const t=!0===n?"hide-column":"show-column";jG(this,ZG).triggerColumnModification(t,e)}}),this.ghostTable.buildWidthsMap()})),GG(this,iq,!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",jG(this,rq)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",jG(this,rq)),this.clearColspans(),jG(this,ZG).clear(),GG(this,nq,null),GG(this,oq,null),ge(this.hot.rootElement,"htHasRowspanHeaders"),jG(this,QG).unsubscribe(),GG(this,QG,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return jG(this,ZG)}getLayersCount(){return jG(this,ZG).getLayersCount()}getHeaderSettings(t,e){return jG(this,ZG).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 s=o.childNodes[t],r=i?i.childNodes[t]:null;for(let t=0,n=e.childNodes.length;t<n;t++)e.childNodes[t].removeAttribute("colspan"),e.childNodes[t].removeAttribute("rowspan"),e.childNodes[t].style.display="",ge(e.childNodes[t],"hiddenHeader"),s&&s.childNodes[t]&&(s.childNodes[t].removeAttribute("colspan"),s.childNodes[t].removeAttribute("rowspan"),s.childNodes[t].style.display="",ge(s.childNodes[t],"hiddenHeader")),i&&r&&r.childNodes[t]&&(r.childNodes[t].removeAttribute("colspan"),r.childNodes[t].removeAttribute("rowspan"),r.childNodes[t].style.display="",ge(r.childNodes[t],"hiddenHeader"))}}headerRendererFactory(t){const e=this.hot.view._wt.getSetting("fixedColumnsStart");return(n,o)=>{const{columnIndexMapper:i,view:s}=this.hot;let r=i.getVisualFromRenderableIndex(n);null===r&&(r=n),o.removeAttribute("colspan"),o.removeAttribute("rowspan"),o.style.display="",ge(o,"hiddenHeader"),ge(o,"hiddenHeaderText"),ge(o,"htRowspanHeader"),ge(o,"htRowspanBottomLevel");const{colspan:a,rowspan:l,isHidden:h,isPlaceholder:c,isRowspanPlaceholder:d,headerClassNames:u}=jG(this,ZG).getHeaderSettings(t,r)??{};if(d)ue(o,"hiddenHeader"),o.style.display="none";else if(c||h)ue(o,"hiddenHeader");else{if(a>1){const{wtOverlays:t}=s._wt,i=t.topInlineStartCornerOverlay?.clone.wtTable.THEAD.contains(o),l=t.inlineStartOverlay?.clone.wtTable.THEAD.contains(o),h=t.topOverlay?.clone.wtTable.THEAD.contains(o);h&&r<e&&ue(o,"hiddenHeaderText");const c=i||l?Math.min(a,e-n):a;c>1&&o.setAttribute("colspan",c)}if(l>1){const e=t+l===this.getLayersCount();ue(o,"htRowspanHeader"),e&&ue(o,"htRowspanBottomLevel"),o.setAttribute("rowspan",l)}}if(this.hot.view.appendColHeader(r,o,(...t)=>this.getColumnHeaderValue(...t),t),!c&&!h&&!d){const t=o.querySelector("div.relative");t&&u&&u.length>0&&(ge(t,this.hot.getColumnMeta(r).headerClassName),ue(t,u))}}}getColumnHeaderValue(t,e){const{isHidden:n,isPlaceholder:o,isRowspanPlaceholder:i}=jG(this,ZG).getHeaderSettings(e,t)??{};return o||n||i?"":this.hot.getColHeader(t,e)}destroy(){GG(this,ZG,null),ge(this.hot.rootElement,"htHasRowspanHeaders"),null!==jG(this,QG)&&(jG(this,QG).unsubscribe(),GG(this,QG,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(t){if(!(t.row>=0||t.col<0))return jG(this,ZG).getHeaderTreeNodeData(t.row,t.col)}constructor(...t){super(...t),KG(this,aq),KG(this,lq),KG(this,hq),KG(this,cq),KG(this,dq),KG(this,uq),KG(this,gq),KG(this,pq),KG(this,fq),KG(this,mq),KG(this,wq),KG(this,bq),KG(this,vq),KG(this,Cq),KG(this,yq),KG(this,Sq),KG(this,kq),KG(this,Rq),KG(this,xq),KG(this,Eq),KG(this,Mq),KG(this,Tq),KG(this,_q),YG(this,ZG,{writable:!0,value:void 0}),YG(this,QG,{writable:!0,value:void 0}),YG(this,JG,{writable:!0,value:void 0}),YG(this,tq,{writable:!0,value:void 0}),YG(this,eq,{writable:!0,value:void 0}),YG(this,nq,{writable:!0,value:void 0}),YG(this,oq,{writable:!0,value:void 0}),YG(this,iq,{writable:!0,value:void 0}),YG(this,sq,{writable:!0,value:void 0}),YG(this,rq,{writable:!0,value:void 0}),GG(this,ZG,new MG),GG(this,QG,null),GG(this,JG,null),GG(this,tq,!1),GG(this,eq,null),GG(this,nq,null),GG(this,oq,null),GG(this,iq,!1),this.ghostTable=new PG({hot:this.hot,headersStateManager:jG(this,ZG)}),this.detectedOverlappedHeaders=!1,GG(this,sq,!1),GG(this,rq,()=>{const t=this.hot?.getSelectedRangeActive();if(!t)return;const{highlight:e}=t;if(e.isHeader()&&e.col>=0){const{isRowspanPlaceholder:t}=jG(this,ZG).getHeaderSettings(e.row,e.col)??{},n=t?qG(this,aq,Iq).call(this,e.row,e.col):e.row,o=jG(this,ZG).findLeftMostColumnIndex(n,e.col),i=this.hot.selection.highlight.getFocus(),s=i.visualCellRange;if(null===s)return;s.highlight.row=n,s.highlight.col=o,s.from.row=n,s.from.col=o,s.to.row=n,s.to.col=o,i.commit()}})}}function Iq(t,e){const n=-this.getLayersCount();for(let o=t;o>=n;o--){const{isRowspanPlaceholder:t}=jG(this,ZG).getHeaderSettings(o,e)??{};if(!t)return o}return t}function Aq(t,e){const n=jG(this,ZG).findLeftMostColumnIndex(t,e),{rowspan:o=1}=jG(this,ZG).getHeaderSettings(t,n)??{};return o}function Oq(t,e){const n=jG(this,ZG).getHeaderSettings(t,e);if(!n)return!1;const{isPlaceholder:o,isRowspanPlaceholder:i,isHidden:s}=n;return i?t<-1:!o&&!i&&!s}function Dq(t,e,n){if(![-1,1].includes(n))return null;for(let o=e;o>=0&&o<this.hot.countCols();o+=n)if(qG(this,hq,Oq).call(this,t,o))return o;return null}function Nq(t,e){const n=this.hot.getSelectedRangeActive();if(!n)return t;const{highlight:o}=n,{navigableHeaders:i}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),r=i?o.row:jG(this,eq)?.row,a=s?t:o.col,l=r<0&&a>=0;if(GG(this,eq,null),!l)return t;const h=this.hot.getFirstFullyVisibleColumn(),c=this.hot.getLastFullyVisibleColumn(),d=c-h+1,u=jG(this,ZG).findLeftMostColumnIndex(r,a),g=jG(this,ZG).findRightMostColumnIndex(r,a),p=g-u+1;if(u<h&&g>c)return u;if(s){let t=null;return u>=h&&g>c?p>d?(e.value="start",t=u):(e.value="end",t=g):u<h&&g<=c&&(p>d?(e.value="end",t=g):(e.value="start",t=u)),t}return u<=h?u:g}function Pq(t,e,n){const o=jG(this,ZG).getHeaderTreeNodeData(e,t);if(!o)return t;const{columnCursor:i,selectionType:s,selectionWidth:r}=n,{isRoot:a,colspan:l}=jG(this,ZG).getHeaderSettings(e,t);if(s===Us){if(!a)return o.columnIndex}else if(s===$s&&(l>r-i||!a))return null;return t}function Wq(t,e,{columnHeadersCount:n}){if(0!==n)for(let n=0;n<e.length;n++){const{startRow:o,startCol:i,endRow:s,endCol:r}=e[n],a=s-o+1;if(o>=0||1===i-r+1)break;for(let e=i;e<=r;e++)for(let n=o;n<=s;n++){const o=a+n,s=e-i;if(0===s)continue;const r=jG(this,ZG).getHeaderTreeNodeData(n,e)?.isRoot;!1===r&&(t[o][s]="")}}}function Lq(t,e,n,o){GG(this,nq,null),GG(this,oq,null);this._getHeaderTreeNodeDataByCoords(e)&&(o.column=!0)}function Bq(t,e){const n=this._getHeaderTreeNodeDataByCoords(e);if(!n)return;GG(this,JG,e.clone()),GG(this,tq,!0);const{selection:o}=this.hot,i=o.isSelected()?o.getSelectedRange().current():null,s=[],{columnIndex:r,origColspan:a}=n,l=!o.inInSelection(e);t.shiftKey&&i?e.col<i.from.col?s.push(i.getTopEndCorner().col,r,e.row):e.col>i.from.col?s.push(i.getTopStartCorner().col,r+a-1,e.row):s.push(r,r+a-1,e.row):(cn(t)||hn(t)&&l||function(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}(t))&&s.push(r,r+a-1,e.row),o.selectColumns(...s)}function Vq(t,e,n,o){if(!this.hot.view.isMouseDown()||o.column)return;const i=this._getHeaderTreeNodeDataByCoords(e);if(!i)return;const{columnIndex:s,origColspan:r}=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,s,u):e.col>c.col?d.push(l.col,s+r-1,u):d.push(s,s+r-1,u),this.hot.selection.selectColumns(...d)}function Fq(){GG(this,tq,!1)}function zq(){const{navigableHeaders:t}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!jG(this,tq)||!t)return;const e=this.hot.getSelectedRangeLast(),n=e.getTopStartCorner().col,o=e.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=jG(this,ZG).getHeaderTreeNodeData(jG(this,JG).row,jG(this,JG).col);if(e.setHighlight(jG(this,JG)),s>e.getWidth()||i<n||i+s-1>o){const t=jG(this,ZG).findTopMostEntireHeaderLevel(co(n,i,i+s-1),co(o,i,i+s-1));e.highlight.row=t,e.highlight.col=e.from.col}}function $q(t){const{highlight:e}=this.hot.getSelectedRangeActive(),{row:n,col:o}=jG(this,oq)??{};Number.isInteger(n)&&Number.isInteger(o)&&(e.row===n&&e.col===o||GG(this,nq,null));const i=t.row,s=t.col;let r=e.col+t.col,a=e.row+t.row;if(0!==t.row&&r>=0){const n=Math.sign(t.row),o=-1,i=-this.getLayersCount();let s=a;for(;s<=o&&s>=i;){const{isRowspanPlaceholder:t}=jG(this,ZG).getHeaderSettings(s,r)??{};if(!t)break;s+=n}t.row=s-e.row,a=s}if(0===i&&0!==s&&e.row<0){if(Number.isInteger(jG(this,nq))){const t=qG(this,cq,Dq).call(this,jG(this,nq),r,Math.sign(s));null!==t&&(r=t,a=jG(this,nq))}r<0&&s<0&&Number.isInteger(jG(this,nq))&&(a=jG(this,nq));const n=jG(this,ZG).findLeftMostColumnIndex(e.row,e.col),o=jG(this,ZG).findRightMostColumnIndex(e.row,e.col),{isRowspanPlaceholder:i}=jG(this,ZG).getHeaderSettings(a,r)??{},l=a===e.row&&r>=n&&r<=o,h=a===e.row&&i&&s>0&&e.row<-1;l||h||(a=qG(this,aq,Iq).call(this,a,r)),t.row=a-e.row;qG(this,lq,Aq).call(this,a,r)>1&&!Number.isInteger(jG(this,nq))&&GG(this,nq,function(t,e,n,o){if(t<=n)return t;for(let n=t+1;n<=-1;n++){const t=o(n,e);if(!t)continue;const{isPlaceholder:i,isRowspanPlaceholder:s,isHidden:r}=t;if(!i&&!s&&!r)return n}return t}(e.row,r,-this.getLayersCount(),(t,e)=>jG(this,ZG).getHeaderSettings(t,e)))}const l=this.hot._createCellCoords(a,r),h=l.isHeader()&&l.col>=0;if(h&&0===i||GG(this,nq,null),h){const{isRowspanPlaceholder:n}=jG(this,ZG).getHeaderSettings(e.row,e.col)??{},{isRowspanPlaceholder:o}=jG(this,ZG).getHeaderSettings(l.row,l.col)??{};let i=jG(this,ZG).findLeftMostColumnIndex(l.row,l.col),r=jG(this,ZG).findRightMostColumnIndex(l.row,l.col);if(o){const t=qG(this,aq,Iq).call(this,l.row,l.col);i=jG(this,ZG).findLeftMostColumnIndex(t,l.col),r=jG(this,ZG).findRightMostColumnIndex(t,l.col)}if(n){const t=qG(this,aq,Iq).call(this,e.row,e.col);i=jG(this,ZG).findLeftMostColumnIndex(t,e.col),r=jG(this,ZG).findRightMostColumnIndex(t,e.col),s<0?i=Math.max(i,Math.min(e.col,l.col)):s>0&&(r=Math.min(r,Math.max(e.col,l.col)))}if(t.col<0){const n=e.col>=i&&e.col<=r?i-1:r,o=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);t.col=null===o?-this.hot.view.countRenderableColumnsInRange(0,e.col):-Math.max(this.hot.view.countRenderableColumnsInRange(o,e.col)-1,1)}else if(t.col>0){const o=e.col>=i&&e.col<=r?r+1:i,s=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);null===s?(t.col=this.hot.view.countRenderableColumnsInRange(e.col,this.hot.countCols()),n&&(t.col+=1,e.row<-1&&(t.row=1,t.col=-(e.col+1)))):t.col=Math.max(this.hot.view.countRenderableColumnsInRange(e.col,s)-1,1)}}GG(this,oq,{row:e.row+t.row,col:e.col+t.col})}function Uq(t,e,n){const o=t.row,i=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col}),s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col});GG(this,eq,n.clone()),e.col<t.col?(i&&(t.col=i.columnIndex+i.origColspan-1),s&&(e.col=s.columnIndex)):e.col>=t.col&&(i&&(t.col=i.columnIndex),s&&(e.col=s.columnIndex+s.origColspan-1))}function jq(t){if(jG(this,ZG).getLayersCount()>0){t.length=0;for(let e=0;e<jG(this,ZG).getLayersCount();e++)t.push(this.headerRendererFactory(e))}}function Yq(t){const e=jG(this,ZG).getLayersCount();let n=t.startColumn,o=!!e;for(let i=0;i<e;i++){const e=jG(this,ZG).findLeftMostColumnIndex(i,t.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(e);if(e>=0&&(o=!1),so(s)&&s<t.startColumn){n=s;break}}t.startColumn=o?jG(this,ZG).getHeaderTreeNodeData(0,n).columnIndex:n}function Gq(t,e){const n=this.ghostTable.getWidth(e);return t>n?t:n}function qq(){if(!jG(this,sq))return;const t=this.hot.rootWindow.getComputedStyle(this.hot.rootElement),e=Number.parseFloat(t.getPropertyValue("--ht-cell-vertical-padding")),n=Number.parseFloat(t.getPropertyValue("--ht-line-height")),o=Math.round(2*e+n+1);return Number.isFinite(o)?new Array(this.getLayersCount()).fill(o):void 0}function Kq(t,e,n){const{label:o}=jG(this,ZG).getHeaderTreeNodeData(n,e)??{label:""};return o}function Xq(t,e){if(t<0)return this.hot.getCell(t,jG(this,ZG).findLeftMostColumnIndex(t,e),!0)}function Zq(){this.updatePlugin()}function Qq(t,e){e||this.updatePlugin()}function Jq(){jG(this,iq)&&(this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),GG(this,iq,!1))}class tK{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,s=e;if(isNaN(s)&&s.end)return s;let r=t;return r||(r={__children:this.data},i=!0,s-=1),null!=n&&s===n?{result:r,end:!0}:null!=o&&r===o?{result:s,end:!0}:(s+=1,r.__children&&x(r.__children,t=>{if(this.parentReference.set(t,i?null:r),s=this.readTreeNodes(t,s,n,o),isNaN(s)&&s.end)return!1}),s)}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){return t.__children?.[e]||null}isRowHighestLevel(t){return!this.isChild(t)}isParent(t){let e=t;return isNaN(e)||(e=this.getDataObject(e)),e&&!!e.__children&&0!==e.__children?.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 s=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(s,1),this.hot.runHooks("afterCreateRow",s,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,e="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,e=!0){let 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),s=this.countChildren(n),r=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!=r){const t=Array.from(new Array(i+s+1).keys()).splice(-1*(s+1));if(this.hot.runHooks("beforeRemoveRow",i,s+1,t,this.plugin.pluginName),a.__children.splice(r,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,s+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,s+1,this.plugin.pluginName),l.__children.push(n)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,s+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,s+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,s=t;o&&o.__children&&0===o.__children.length?(i=o,s=0):t<this.countAllRows()&&(i=this.getRowParent(t),s=this.getRowIndexWithinParent(t)),i?n?i.__children.splice(s,e,...n):i.__children.splice(s,e):n?this.data.splice(s,e,...n):this.data.splice(s,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(),s=this.getRowParent(t),r=this.getRowIndexWithinParent(t),a=s.__children.slice(r,r+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=s===h;h.__children.splice(c,0,a[0]),s.__children.splice(r+(l&&d?1:0),1),this.syncRowWithRawSource(s),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}constructor(t,e){this.data=null,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},this.hot=e,this.plugin=t}}class eK{constructor(t,e){this.hot=e,this.plugin=t}}class nK extends eK{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"}}appendLevelIndicators(t,e){const n=this.hot.toPhysicalRow(t),o=this.dataManager.getDataObject(n);if(!o)return;const i=this.dataManager.getRowLevel(n),s=e.getElementsByTagName("DIV")[0],r=s.querySelector("span.rowHeader"),a=s.querySelectorAll('[class^="ht_nesting"]'),l=this.hot.getSettings().ariaTags;if(x(a,t=>{t&&s.removeChild(t)}),ue(e,nK.CSS_CLASSES.indicatorContainer),i){const{rootDocument:t}=this.hot,e=r.cloneNode(!0);s.innerHTML="",ao(0,i-1,()=>{const e=t.createElement("SPAN");ue(e,nK.CSS_CLASSES.emptyIndicator),s.appendChild(e)}),s.appendChild(e)}if(this.dataManager.hasChildren(o)){const t=this.hot.rootDocument.createElement("DIV");l&&pe(t,[["aria-hidden","true"]]),ue(e,nK.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(ue(t,`${nK.CSS_CLASSES.button} ${nK.CSS_CLASSES.expandButton}`),l&&pe(e,[pt(!1)])):(ue(t,`${nK.CSS_CLASSES.button} ${nK.CSS_CLASSES.collapseButton}`),l&&pe(e,[pt(!0)])),s.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()}constructor(t,e){super(t,e),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}}class oK extends eK{collapseChildren(t,e=!0,n=!0){const o=[];let i=null,s=null,r=null;return isNaN(t)?(i=t,s=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(t),s=t),this.dataManager.hasChildren(i)&&x(i.__children,t=>{o.push(this.dataManager.getRowIndex(t))}),r=this.collapseRows(o,!0,!1),n&&this.trimRows(r),e&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(s)&&this.collapsedRows.push(s),r}collapseMultipleChildren(t,e=!0,n=!0){const o=[];x(t,t=>{o.push(...this.collapseChildren(t,!1,!1))}),n&&this.trimRows(o),e&&this.renderAndAdjust()}collapseRow(t,e=!0){this.collapseRows([t],e)}collapseRows(t,e=!0,n=!1){const o=[];return x(t,t=>{o.push(t),e&&this.collapseChildRows(t,o)}),n&&this.trimRows(o),o}collapseChildRows(t,e=[],n,o=!1){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)})}o&&this.trimRows(e)}expandRow(t,e=!0){this.expandRows([t],e)}expandRows(t,e=!0,n=!1){const o=[];return x(t,t=>{o.push(t),e&&this.expandChildRows(t,o)}),n&&this.untrimRows(o),o}expandChildRows(t,e=[],n,o=!1){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)}})}o&&this.untrimRows(e)}expandChildren(t,e=!0,n=!0){const o=[];let i=null,s=null,r=null;return isNaN(t)?(i=t,s=this.dataManager.getRowIndex(t)):(i=this.dataManager.getDataObject(t),s=t),this.collapsedRows.splice(this.collapsedRows.indexOf(s),1),this.dataManager.hasChildren(i)&&x(i.__children,t=>{const e=this.dataManager.getRowIndex(t);o.push(e)}),r=this.expandRows(o,!0,!1),n&&this.untrimRows(r),e&&this.renderAndAdjust(),r}expandMultipleChildren(t,e=!0,n=!0){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,nK.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()}constructor(t,e){super(t,e),this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:(t=!1)=>{this.lastCollapsedRows=this.collapsedRows.slice(0),this.expandMultipleChildren(this.lastCollapsedRows,t)},shiftStash:(t,e,n=1)=>{null==e&&(e=1/0),x(this.lastCollapsedRows,(o,i)=>{o>=t&&o<e&&(this.lastCollapsedRows[i]=o+n)})},applyStash:(t=!0)=>{this.collapseMultipleChildren(this.lastCollapsedRows,t),this.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)})}}}}function iK(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function sK(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 rK(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,iK(t,e,"set"),n),n}var aK=new WeakMap;class lK extends eK{appendOptions(t){const e=[{key:"add_child",name(){return this.getTranslatedPhrase(fc)},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(mc)},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=(o=this,i=aK,function(t,e){return e.get?e.get.call(t):e.value}(o,iK(o,i,"get")))[t.items[e].key];var o,i;null!=n&&(t.items[e].callback=n)}),t}constructor(...t){super(...t),sK(this,aK,{writable:!0,value:void 0}),this.dataManager=this.plugin.dataManager,rK(this,aK,{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")}})}}function hK(t){return Array.isArray(t)&&(0===t.length||function(t){return!!(Array.isArray(t)&&t.length&&t.every(t=>"object"==typeof t&&!Array.isArray(t)&&null!==t))}(t))}class cK{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(),s=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let r=!0;const a=t.map(t=>{if(!r)return!1;const e=this.dataManager.translateTrimmedRow(t);return r=this.shouldAllowMoving(e,s),e}),l=-1===a.indexOf(s);if(!r||!l)return!1;const h=this.getBaseParent(a),c=this.getTargetParent(i,s),d=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,s,d),this.moveRows(a,s,c),this.dataManager.rewriteCache(),this.moveCellsMeta(a,s),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 s=!1;return A(o)&&(Qt(T`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
|
|
275
|
+
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",e,n,o,i,!1),s=!0),s}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 s=null;s=t[n-1]<e?this.dataManager.translateTrimmedRow(e-n):this.dataManager.translateTrimmedRow(e);const r=this.dataManager.getRowParent(null===s?this.hot.countSourceRows()-1:s-1),a=this.dataManager.getRowIndex(r);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)}constructor(t){this.plugin=t,this.hot=t.hot,this.dataManager=t.dataManager,this.collapsingUI=t.collapsingUI}}function dK(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function uK(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function gK(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,uK(t,e,"get"))}function pK(t,e,n){dK(t,e),e.set(t,n)}function fK(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,uK(t,e,"set"),n),n}function mK(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function wK(t,e){dK(t,e),e.add(t)}const bK="nestedRows",vK=bK;var CK=new WeakMap,yK=new WeakMap,SK=new WeakMap,kK=new WeakSet,RK=new WeakSet,xK=new WeakSet,EK=new WeakSet,MK=new WeakSet,TK=new WeakSet,_K=new WeakSet,HK=new WeakSet,IK=new WeakSet,AK=new WeakSet,OK=new WeakSet,DK=new WeakSet,NK=new WeakSet,PK=new WeakSet,WK=new WeakSet,LK=new WeakSet,BK=new WeakSet;class VK extends Qk{static get PLUGIN_KEY(){return bK}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[bK]}enablePlugin(){this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Dl),fK(this,SK,!0),this.dataManager=new tK(this,this.hot),this.collapsingUI=new oK(this,this.hot),this.headersUI=new nK(this,this.hot),this.contextMenuUI=new lK(this,this.hot),this.rowMoveController=new cK(this),this.addHook("afterInit",(...t)=>mK(this,PK,tX).call(this,...t)),this.addHook("afterRender",(...t)=>mK(this,WK,eX).call(this,...t)),this.addHook("beforeViewRender",(...t)=>mK(this,LK,nX).call(this,...t)),this.addHook("modifyRowData",(...t)=>this.onModifyRowData(...t)),this.addHook("modifySourceLength",(...t)=>this.onModifySourceLength(...t)),this.addHook("beforeDataSplice",(...t)=>this.onBeforeDataSplice(...t)),this.addHook("filterData",(...t)=>mK(this,xK,$K).call(this,...t)),this.addHook("afterContextMenuDefaultOptions",(...t)=>mK(this,EK,UK).call(this,...t)),this.addHook("afterGetRowHeader",(...t)=>mK(this,MK,jK).call(this,...t)),this.addHook("beforeOnCellMouseDown",(...t)=>mK(this,RK,zK).call(this,...t)),this.addHook("beforeRemoveRow",(...t)=>mK(this,HK,qK).call(this,...t)),this.addHook("afterRemoveRow",(...t)=>mK(this,_K,GK).call(this,...t)),this.addHook("beforeAddChild",(...t)=>mK(this,IK,KK).call(this,...t)),this.addHook("afterAddChild",(...t)=>mK(this,AK,XK).call(this,...t)),this.addHook("beforeDetachChild",(...t)=>mK(this,OK,ZK).call(this,...t)),this.addHook("afterDetachChild",(...t)=>mK(this,DK,QK).call(this,...t)),this.addHook("modifyRowHeaderWidth",(...t)=>mK(this,TK,YK).call(this,...t)),this.addHook("afterCreateRow",(...t)=>mK(this,NK,JK).call(this,...t)),this.addHook("beforeRowMove",(...t)=>mK(this,kK,FK).call(this,...t)),this.addHook("beforeLoadData",t=>mK(this,BK,oX).call(this,t)),this.addHook("beforeUpdateData",t=>mK(this,BK,oX).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:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&-1===t.col&&t.row>=0},group:vK,relativeToGroup:Lp,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(vK)}disableCoreAPIModifiers(){fK(this,yK,!0)}enableCoreAPIModifiers(){fK(this,yK,!1)}onModifyRowData(t){if(!gK(this,yK))return this.dataManager.getDataObject(t)}onModifySourceLength(){if(!gK(this,yK))return this.dataManager.countAllRows()}onBeforeDataSplice(t,e,n){return!(!gK(this,yK)&&!this.dataManager.isRowHighestLevel(t))||(this.dataManager.spliceData(t,e,n),!1)}destroy(){super.destroy()}constructor(...t){super(...t),wK(this,kK),wK(this,RK),wK(this,xK),wK(this,EK),wK(this,MK),wK(this,TK),wK(this,_K),wK(this,HK),wK(this,IK),wK(this,AK),wK(this,OK),wK(this,DK),wK(this,NK),wK(this,PK),wK(this,WK),wK(this,LK),wK(this,BK),pK(this,CK,{writable:!0,value:void 0}),pK(this,yK,{writable:!0,value:void 0}),pK(this,SK,{writable:!0,value:void 0}),this.dataManager=null,this.headersUI=null,this.collapsedRowsMap=null,fK(this,CK,!1),fK(this,yK,!1),fK(this,SK,!0)}}function FK(t,e,n,o){return this.rowMoveController.onBeforeRowMove(t,e,n,o)}function zK(t,e,n){this.collapsingUI.toggleState(t,e,n)}function $K(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),fK(this,CK,!0),this.dataManager.getData().slice()}function UK(t){return this.contextMenuUI.appendOptions(t)}function jK(t,e){this.headersUI.appendLevelIndicators(t,e)}function YK(t){return Math.max(this.headersUI.rowHeaderWidthCache,t)}function GK(t,e,n,o){o!==this.pluginName&&this.hot._registerTimeout(()=>{fK(this,CK,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function qK(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 KK(){this.collapsingUI.collapsedRowsStash.stash()}function XK(t,e){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(e)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function ZK(){this.collapsingUI.collapsedRowsStash.stash()}function QK(t,e,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function JK(){this.dataManager.rewriteCache()}function tX(){this.headersUI.updateRowHeaderWidth()}function eX(){gK(this,SK)&&this.hot.view&&(fK(this,SK,!1),this.hot.rootWindow.requestAnimationFrame(()=>{this.hot&&this.hot.view&&!this.hot.isDestroyed&&this.hot.view.adjustElementsSize(!0)}))}function nX(t,e){gK(this,CK)&&(e.skipRender=!0)}function oX(t){if(!hK(t))return te("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[bK]=!1,void this.disablePlugin();this.dataManager.setData(t),this.dataManager.rewriteCache()}function iX(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sX(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function rX(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,sX(t,e,"get"))}function aX(t,e,n){iX(t,e),e.set(t,n)}function lX(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,sX(t,e,"set"),n),n}function hX(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}var cX=new WeakMap,dX=new WeakMap,uX=new WeakMap,gX=new WeakMap,pX=new WeakMap,fX=new WeakMap,mX=new WeakMap,wX=new WeakMap,bX=new WeakSet;class vX{install(){if(rX(this,gX)?.container)return;const t=_`${'\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:e,first:n,prev:o,next:i,last:s,pageSizeSelect:r}=t.refs;lX(this,gX,t.refs),e.setAttribute("dir",rX(this,uX)?"rtl":"ltr"),e.tabIndex=-1;const a=(t,e,n)=>{e.addEventListener(t,t=>{(t=>t.currentTarget.disabled)(t)||n()})};a("click",n,()=>this.runLocalHooks("firstPageClick")),a("click",o,()=>this.runLocalHooks("prevPageClick")),a("click",i,()=>this.runLocalHooks("nextPageClick")),a("click",s,()=>this.runLocalHooks("lastPageClick")),r.addEventListener("change",()=>{const t="auto"===r.value?"auto":Number.parseInt(r.value,10);this.runLocalHooks("pageSizeChange",t)}),this.setCounterSectionVisibility(!1),this.setNavigationSectionVisibility(!1),this.setPageSizeSectionVisibility(!1),rX(this,dX)?(rX(this,dX).appendChild(t.fragment),ue(e,[rX(this,pX),"handsontable"])):rX(this,cX).after(t.fragment)}getContainer(){return rX(this,gX).container}getFocusableElements(){const{first:t,prev:e,next:n,last:o,pageSizeSelect:i}=rX(this,gX);return[i,t,e,n,o].filter(t=>!t.disabled)}updateWidth(t){return rX(this,gX).container.style.width=`${t}px`,this}updateTheme(t){if(lX(this,pX,t),rX(this,dX)){const{container:t}=rX(this,gX);ge(t,/ht-theme-.*/g),rX(this,pX)&&ue(t,rX(this,pX))}return this}getHeight(){return rX(this,gX).container.offsetHeight}refreshBorderState(){const{container:t}=rX(this,gX);return rX(this,dX)||rX(this,mX).call(this)?ue(t,"ht-pagination--bordered"):ge(t,"ht-pagination--bordered"),this}updateState({currentPage:t,totalPages:e,firstVisibleRowIndex:n,lastVisibleRowIndex:o,totalRenderedRows:i,pageSizeList:s,pageSize:r,autoPageSize:a,counterStartRow:l,counterEndRow:h}){const{first:c,prev:d,next:u,last:g,pageCounterSection:p,pageNavSection:f,pageNavLabel:m,pageSizeSelect:w,pageSizeLabel:b}=rX(this,gX),v=l??n+1,C=h??o+1,y=rX(this,fX).call(this,rd,{start:v,end:C,total:i}),S=rX(this,fX).call(this,ad,{currentPage:t,totalPages:e}),k=rX(this,fX).call(this,sd);p.textContent=y,m.textContent=S,w.textContent="",b.textContent=`${k}:`,pe(f,[rt(rX(this,fX).call(this,od))]),pe(w,[rt(rX(this,fX).call(this,sd))]),rX(this,wX).call(this,S),this.refreshBorderState(),s.forEach(t=>{const e="auto"===t?rX(this,fX).call(this,id):t,n=new Option(e,t);(a&&"auto"===t||!a&&t===r)&&(n.selected=!0),w.add(n)});const R=1===t,x=t===e;if("none"!==f.style.display){const t=rX(this,cX).ownerDocument.activeElement;R?(ue(c,"ht-page-navigation-section__button--disabled"),ue(d,"ht-page-navigation-section__button--disabled"),c.disabled=!0,d.disabled=!0):(ge(c,"ht-page-navigation-section__button--disabled"),ge(d,"ht-page-navigation-section__button--disabled"),c.disabled=!1,d.disabled=!1),x?(ue(u,"ht-page-navigation-section__button--disabled"),ue(g,"ht-page-navigation-section__button--disabled"),u.disabled=!0,g.disabled=!0):(ge(u,"ht-page-navigation-section__button--disabled"),ge(g,"ht-page-navigation-section__button--disabled"),u.disabled=!1,g.disabled=!1),[c,d,u,g].includes(t)&&(d.disabled?u.focus():u.disabled&&d.focus())}return pe(c,[rt(rX(this,fX).call(this,ld)),lt(R)]),pe(d,[rt(rX(this,fX).call(this,hd)),lt(R)]),pe(u,[rt(rX(this,fX).call(this,cd)),lt(x)]),pe(g,[rt(rX(this,fX).call(this,dd)),lt(x)]),this}setPageSizeSectionVisibility(t){const{pageSizeSection:e,pageSizeSelect:n}=rX(this,gX);return e.style.display=t?"":"none",n.disabled=!t,hX(this,bX,CX).call(this),this}setCounterSectionVisibility(t){return rX(this,gX).pageCounterSection.style.display=t?"":"none",hX(this,bX,CX).call(this),this}setNavigationSectionVisibility(t){const{pageNavSection:e,first:n,prev:o,next:i,last:s}=rX(this,gX);return e.style.display=t?"":"none",n.disabled=!t,o.disabled=!t,i.disabled=!t,s.disabled=!t,hX(this,bX,CX).call(this),this}destroy(){rX(this,gX)?.container.remove(),lX(this,gX,null)}constructor({rootElement:t,uiContainer:e,isRtl:n,themeName:o,phraseTranslator:i,shouldHaveBorder:s,a11yAnnouncer:r}){var a,l;iX(a=this,l=bX),l.add(a),aX(this,cX,{writable:!0,value:void 0}),aX(this,dX,{writable:!0,value:void 0}),aX(this,uX,{writable:!0,value:void 0}),aX(this,gX,{writable:!0,value:void 0}),aX(this,pX,{writable:!0,value:void 0}),aX(this,fX,{writable:!0,value:void 0}),aX(this,mX,{writable:!0,value:void 0}),aX(this,wX,{writable:!0,value:void 0}),lX(this,uX,!1),lX(this,cX,t),lX(this,dX,e),lX(this,uX,n),lX(this,pX,o),lX(this,fX,i),lX(this,mX,s),lX(this,wX,r),this.install()}}function CX(){const{container:t,pageSizeSection:e,pageCounterSection:n,pageNavSection:o}=rX(this,gX),i="none"!==e.style.display||"none"!==n.style.display||"none"!==o.style.display;rX(this,dX)||(i?ue(rX(this,cX).querySelector(".ht-wrapper"),"htPagination"):ge(rX(this,cX).querySelector(".ht-wrapper"),"htPagination")),t.style.display=i?"":"none"}Rt(vX,Fs);const yX=new Map([["fixed",class{calculate({pageSize:t,totalItems:e}){this.pageSize=Math.max(t,1),this.totalItems=e,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}}constructor(){this.pageSize=1,this.totalItems=0,this.totalPages=0}}],["auto",class{calculate({itemsSizeProvider:t,viewportSizeProvider:e}){const n=t(),o=e(),i=[];let s=0,r=0,a=0;for(let t=0;t<n.length;t++){const e=n[t];a>0&&r+e>=o&&(i.push({startIndex:s,endIndex:t-1,pageSize:a}),s=t,r=0,a=0),r+=e,a+=1}i.push({startIndex:s,endIndex:Math.max(0,n.length-1),pageSize:a}),this.pages=i}getTotalPages(){return this.pages.length}getState(t){if(!((t-=1)<0||t>=this.getTotalPages()))return this.pages[t]}constructor(){this.pages=[]}}]]);function SX(t){yX.has(t)||bt(`Unknown pagination strategy type: ${t}`);return new(yX.get(t))}function kX(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function RX(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function xX(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,RX(t,e,"get"))}function EX(t,e,n){kX(t,e),e.set(t,n)}function MX(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,RX(t,e,"set"),n),n}function TX(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function _X(t,e){kX(t,e),e.add(t)}Bk("pagination",["nestedRows","mergeCells","fixedRowsTop","fixedRowsBottom"]);const HX="pagination",IX=`plugin:${HX}`,AX=T`The \`auto\` page size setting requires the \`autoRowSize\`\x20
|
|
276
|
+
plugin to be enabled. Set the \`autoRowSize: true\` in the configuration to ensure correct behavior.`;var OX=new WeakMap,DX=new WeakMap,NX=new WeakMap,PX=new WeakMap,WX=new WeakMap,LX=new WeakMap,BX=new WeakMap,VX=new WeakMap,FX=new WeakMap,zX=new WeakMap,$X=new WeakSet,UX=new WeakSet,jX=new WeakSet,YX=new WeakSet,GX=new WeakSet,qX=new WeakSet,KX=new WeakSet,XX=new WeakSet,ZX=new WeakSet,QX=new WeakSet,JX=new WeakSet,tZ=new WeakSet,eZ=new WeakSet,nZ=new WeakSet,oZ=new WeakSet,iZ=new WeakSet,sZ=new WeakSet,rZ=new WeakSet,aZ=new WeakSet,lZ=new WeakMap;class hZ extends Qk{static get PLUGIN_KEY(){return HX}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()[HX]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[HX];void 0!==t?.initialPage&&MX(this,DX,this.getSetting("initialPage")),void 0!==t?.pageSize&&MX(this,NX,this.getSetting("pageSize")),MX(this,VX,!0===this.hot.runHooks("hasExternalDataSource")),MX(this,FX,null),MX(this,OX,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding",!1)),"auto"!==xX(this,NX)||this.hot.getPlugin("autoRowSize")?.enabled||Qt(AX),MX(this,WX,SX("auto"===xX(this,NX)?"auto":"fixed")),xX(this,PX)||(MX(this,PX,new vX({rootElement:this.hot.rootGridElement,uiContainer:this.getSetting("uiContainer"),isRtl:this.hot.isRtl(),themeName:this.hot.getCurrentThemeName(),phraseTranslator:(...t)=>this.hot.getTranslatedPhrase(...t),shouldHaveBorder:()=>TX(this,qX,fZ).call(this),a11yAnnouncer:t=>function(t){Vf&&(Vf.textContent="",setTimeout(()=>{Vf&&(Vf.textContent=t)},100))}(t)})),TX(this,YX,gZ).call(this),xX(this,PX).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",(...t)=>TX(this,iZ,xZ).call(this,...t),-1),this.addHook("beforeSelectAll",(...t)=>TX(this,ZX,bZ).call(this,...t)),this.addHook("beforeSelectColumns",(...t)=>TX(this,ZX,bZ).call(this,...t)),this.addHook("beforeSetRangeEnd",(...t)=>TX(this,QX,vZ).call(this,...t)),this.addHook("beforeSelectionHighlightSet",(...t)=>TX(this,JX,CZ).call(this,...t)),this.addHook("beforePaste",(...t)=>TX(this,tZ,yZ).call(this,...t)),this.addHook("afterViewRender",(...t)=>TX(this,eZ,SZ).call(this,...t)),this.addHook("afterRender",(...t)=>TX(this,nZ,kZ).call(this,...t)),this.addHook("afterScrollVertically",(...t)=>TX(this,sZ,EZ).call(this,...t)),this.addHook("afterLanguageChange",(...t)=>TX(this,rZ,MZ).call(this,...t)),this.addHook("beforeHeightChange",(...t)=>TX(this,oZ,RZ).call(this,...t)),this.addHook("afterSetTheme",(...t)=>TX(this,aZ,TZ).call(this,...t)),this.addHook("afterDataProviderFetch",(...t)=>xX(this,zX).call(this,...t),-1),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",xX(this,lZ)),TX(this,KX,mZ).call(this),super.enablePlugin()}revertPageTo(t){const e=xX(this,DX);TX(this,$X,cZ).call(this,t),this.hot.scrollViewportTo({row:0}),TX(this,jX,uZ).call(this),this.hot.runHooks("afterPageChange",e,t)}revertPageSizeTo(t){const e=xX(this,NX);TX(this,UX,dZ).call(this,t),TX(this,jX,uZ).call(this),this.hot.runHooks("afterPageSizeChange",e,t)}updatePlugin(){this.disablePlugin(),this.enablePlugin(),TX(this,jX,uZ).call(this),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",xX(this,lZ)).unregisterMap(this.pluginName),TX(this,XX,wZ).call(this),xX(this,PX).destroy(),MX(this,PX,null),super.disablePlugin()}getPaginationData(){const t=xX(this,WX).getTotalPages();let e=-1,n=-1;if(xX(this,VX)){const t=this.hot.countRows();t>0&&(e=0,n=t-1)}else{const{pageSize:t,startIndex:o}=xX(this,WX).getState(xX(this,DX)),i=this.hot.countRows();let s=0;for(let r=o;s<t&&!(r>=i);r++)this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(r))||(-1===e&&(e=r),n=r,s+=1)}const o=xX(this,WX).getState(xX(this,DX));return{currentPage:xX(this,DX),totalPages:t,pageSize:o?.pageSize??xX(this,NX),pageSizeList:[...this.getSetting("pageSizeList")],autoPageSize:"auto"===xX(this,NX),numberOfRenderedRows:this.hot.rowIndexMapper.getRenderableIndexesLength(),firstVisibleRowIndex:e,lastVisibleRowIndex:n}}getCurrentPage(){return xX(this,DX)}getCurrentPageSize(){return xX(this,NX)}setPage(t){const e=xX(this,DX);!1!==this.hot.runHooks("beforePageChange",e,t)&&(TX(this,$X,cZ).call(this,t),TX(this,jX,uZ).call(this),this.hot.scrollViewportTo({row:0}),this.hot.runHooks("afterPageChange",e,xX(this,DX)))}resetPage(){this.setPage(this.getSetting("initialPage"))}setPageSize(t){const e=xX(this,NX);!1!==this.hot.runHooks("beforePageSizeChange",e,t)&&("auto"!==t||this.hot.getPlugin("autoRowSize")?.enabled||Qt(AX),TX(this,UX,dZ).call(this,t),TX(this,jX,uZ).call(this),this.hot.runHooks("afterPageSizeChange",e,xX(this,NX)))}resetPageSize(){this.setPageSize(this.getSetting("pageSize"))}resetPagination(){this.resetPage(),this.resetPageSize(),TX(this,YX,gZ).call(this)}nextPage(){this.setPage(xX(this,DX)+1)}prevPage(){this.setPage(xX(this,DX)-1)}firstPage(){this.setPage(1)}lastPage(){this.setPage(xX(this,WX).getTotalPages())}hasPreviousPage(){return xX(this,DX)>1}hasNextPage(){return xX(this,DX)<xX(this,WX).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(){xX(this,PX).setPageSizeSectionVisibility(!0),this.hot.runHooks("afterPageSizeVisibilityChange",!0)}hidePageSizeSection(){xX(this,PX).setPageSizeSectionVisibility(!1),this.hot.runHooks("afterPageSizeVisibilityChange",!1)}showPageCounterSection(){xX(this,PX).setCounterSectionVisibility(!0),this.hot.runHooks("afterPageCounterVisibilityChange",!0)}hidePageCounterSection(){xX(this,PX).setCounterSectionVisibility(!1),this.hot.runHooks("afterPageCounterVisibilityChange",!1)}showPageNavigationSection(){xX(this,PX).setNavigationSectionVisibility(!0),this.hot.runHooks("afterPageNavigationVisibilityChange",!0)}hidePageNavigationSection(){xX(this,PX).setNavigationSectionVisibility(!1),this.hot.runHooks("afterPageNavigationVisibilityChange",!1)}destroy(){MX(this,OX,null),MX(this,WX,null),xX(this,PX)?.destroy(),MX(this,PX,null),super.destroy()}constructor(...t){super(...t),_X(this,$X),_X(this,UX),_X(this,jX),_X(this,YX),_X(this,GX),_X(this,qX),_X(this,KX),_X(this,XX),_X(this,ZX),_X(this,QX),_X(this,JX),_X(this,tZ),_X(this,eZ),_X(this,nZ),_X(this,oZ),_X(this,iZ),_X(this,sZ),_X(this,rZ),_X(this,aZ),EX(this,OX,{writable:!0,value:void 0}),EX(this,DX,{writable:!0,value:void 0}),EX(this,NX,{writable:!0,value:void 0}),EX(this,PX,{writable:!0,value:void 0}),EX(this,WX,{writable:!0,value:void 0}),EX(this,LX,{writable:!0,value:void 0}),EX(this,BX,{writable:!0,value:void 0}),EX(this,VX,{writable:!0,value:void 0}),EX(this,FX,{writable:!0,value:void 0}),EX(this,zX,{writable:!0,value:void 0}),EX(this,lZ,{writable:!0,value:void 0}),MX(this,OX,null),MX(this,DX,1),MX(this,NX,10),MX(this,PX,null),MX(this,WX,null),MX(this,LX,!1),MX(this,BX,!1),MX(this,VX,!1),MX(this,FX,null),MX(this,zX,({queryParameters:t,totalRows:e})=>{if(!xX(this,VX))return;const n=xX(this,DX),o=xX(this,NX),{page:i,pageSize:s}=t;"number"==typeof i&&i>=1&&TX(this,$X,cZ).call(this,i),"auto"===s?TX(this,UX,dZ).call(this,"auto"):"number"==typeof s&&s>=1&&TX(this,UX,dZ).call(this,s),xX(this,VX)&&"number"==typeof e&&e>=0&&MX(this,FX,e),TX(this,jX,uZ).call(this),n!==xX(this,DX)&&this.hot.runHooks("afterPageChange",n,xX(this,DX)),o!==xX(this,NX)&&this.hot.runHooks("afterPageSizeChange",o,xX(this,NX))}),MX(this,lZ,()=>{!xX(this,LX)&&this.hot?.view&&TX(this,GX,pZ).call(this)})}}function cZ(t){MX(this,DX,t)}function dZ(t){MX(this,WX,SX("auto"===t?"auto":"fixed")),MX(this,NX,t)}function uZ(){TX(this,GX,pZ).call(this),this.hot.view.adjustElementsSize(),this.hot.render()}function gZ(){this.getSetting("showPageSize")?this.showPageSizeSection():this.hidePageSizeSection(),this.getSetting("showCounter")?this.showPageCounterSection():this.hidePageCounterSection(),this.getSetting("showNavigation")?this.showPageNavigationSection():this.hidePageNavigationSection()}function pZ(){MX(this,LX,!0),xX(this,OX).clear();const t=this.hot.rowIndexMapper.getRenderableIndexes(),e=t.length,{stylesHandler:n}=this.hot,o=xX(this,VX),i=o?xX(this,FX)??e:e;xX(this,WX).calculate({pageSize:xX(this,NX),totalItems:i,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=xX(this,PX).getHeight();return t.getWorkspaceHeight()-i-o-n}const e=t.hasHorizontalScroll()?Ve():0;return t.getViewportHeight()-e},itemsSizeProvider:()=>this.hot.rowIndexMapper.getRenderableIndexes().map(t=>{const e=this.hot.toVisualRow(t);return this.hot.getRowHeight(e)??n.getDefaultRowHeight(e)})});const s=xX(this,WX).getTotalPages();if(MX(this,DX,co(xX(this,DX),1,s)),!o&&t.length>0){const{startIndex:e,pageSize:n}=xX(this,WX).getState(xX(this,DX));t.splice(e,n)}!o&&t.length>0?this.hot.batchExecution(()=>{t.forEach(t=>xX(this,OX).setValueAtIndex(t,!0))},!0):o||this.hot.rowIndexMapper.updateCache(!0),MX(this,LX,!1);const r={...this.getPaginationData(),totalRenderedRows:o?i:e};if(o){const t=i,e=xX(this,WX).getState(xX(this,DX))?.pageSize??xX(this,NX);r.counterStartRow=(xX(this,DX)-1)*e+1,r.counterEndRow=Math.min(xX(this,DX)*e,t)}xX(this,PX).updateState(r)}function fZ(){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 mZ(){this.hot.getFocusScopeManager().registerScope(HX,xX(this,PX).getContainer(),{shortcutsContextName:IX,runOnlyIf:()=>this.getSetting("showPageSize")||this.getSetting("showNavigation"),onActivate:t=>{const e=xX(this,PX).getFocusableElements();e.length>0&&("tab_from_above"===t?e.at(0).focus():"tab_from_below"===t&&e.at(-1).focus())}})}function wZ(){this.hot.getFocusScopeManager().unregisterScope(HX)}function bZ(t,e){const{firstVisibleRowIndex:n,lastVisibleRowIndex:o}=this.getPaginationData();(xX(this,DX)>1||t.row>=0)&&(t.row=n),e.row=o}function vZ(t){if(this.hot.selection.isSelectedByColumnHeader()){const{lastVisibleRowIndex:e}=this.getPaginationData();t.row=e}}function CZ(){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 yZ(t,e){const{firstVisibleRowIndex:n,lastVisibleRowIndex:o}=this.getPaginationData();if(-1===n||-1===o)return!1;e.forEach(({startRow:e})=>{if(0===t.length)return;const n=Math.min(t.length-(o-e+1),t.length);t.splice(0,n)})}function SZ(){"auto"!==xX(this,NX)||xX(this,BX)?MX(this,BX,!1):(MX(this,BX,!0),TX(this,jX,uZ).call(this))}function kZ(){const{view:t}=this.hot,e=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();xX(this,PX).updateWidth(e).refreshBorderState()}function RZ(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`} - ${xX(this,PX).getHeight()}px)`}function xZ(){"auto"!==xX(this,NX)&&TX(this,GX,pZ).call(this)}function EZ(){xX(this,PX).refreshBorderState()}function MZ(){TX(this,jX,uZ).call(this)}function TZ(t){xX(this,PX).updateTheme(t)}function _Z(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function HZ(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)}const IZ="search",AZ=function(t,e,n,o,i){t.getCellMeta(e,n).isSearchResult=i},OZ=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 DZ=new WeakSet;class NZ extends Qk{static get PLUGIN_KEY(){return IZ}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[IZ]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[IZ];this.updatePluginSettings(t),this.addHook("beforeRenderer",(...t)=>_Z(this,DZ,PZ).call(this,...t)),super.enablePlugin()}disablePlugin(){const t=(...t)=>_Z(this,DZ,PZ).call(this,...t);this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",t)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(t,e=this.getCallback(),n=this.getQueryMethod()){const o=this.hot.countRows(),i=this.hot.countCols(),s=[],r=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};s.push(t)}h&&h(r,o,i,a,c)})}),s}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()}constructor(...t){super(...t),HZ(this,DZ),this.callback=AZ,this.queryMethod=OZ,this.searchResultClass="htSearchResult"}}function PZ(t,e,n,o,i,s){const r=s.className||[];let a=[];"string"==typeof r?a=r.split(" "):a.push(...r),this.isEnabled()&&s.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),s.className=a.join(" ")}class WZ{prepare({viewportWidth:t}){this.viewportWidth=t,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(t,e){this.baseWidths.set(t,e)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}constructor(t){this.baseWidths=new Map,this.stretchedWidths=new Map,this.overwriteColumnWidthFn=t}}class LZ extends WZ{calculate(){const t=Array.from(this.baseWidths).reduce((t,[,e])=>t+e,0);if(this.viewportWidth-t<0)return void this.stretchedWidths.clear();const e=this.viewportWidth/t,n=[],o=[];let i=this.viewportWidth,s=0;if(this.baseWidths.forEach((t,r)=>{const a=Math.round(t*e),l=this.overwriteColumnWidthFn(a,r);a===l&&a>=Qo?(n.push([r,l]),s+=l):a!==l&&(n.push([r,l]),o.push(r),i-=l)}),i<=Qo)return void this.stretchedWidths.clear();const r=i/s;let a=-1,l=0;n.forEach(([t,e],i)=>{let s=e;o.includes(t)||(s=Math.round(e*r)),this.stretchedWidths.set(t,s),a=t,i<n.length-1&&(l+=s)}),this.stretchedWidths.size>1&&this.stretchedWidths.set(a,Math.round(this.viewportWidth-l))}}function BZ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function VZ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,BZ(t,e,"get"))}function FZ(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 zZ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,BZ(t,e,"set"),n),n}var $Z=new WeakMap,UZ=new WeakMap;class jZ extends WZ{prepare(t){super.prepare(t),zZ(this,$Z,0),zZ(this,UZ,-1)}setColumnBaseWidth(t,e){super.setColumnBaseWidth(t,e),zZ(this,UZ,t),zZ(this,$Z,e)}calculate(){if(-1===VZ(this,UZ))return;const t=Array.from(this.baseWidths).reduce((t,[,e])=>t+e,0),e=this.viewportWidth-t+VZ(this,$Z);e<VZ(this,$Z)?this.stretchedWidths.clear():this.stretchedWidths.set(VZ(this,UZ),e)}constructor(...t){super(...t),FZ(this,$Z,{writable:!0,value:void 0}),FZ(this,UZ,{writable:!0,value:void 0}),zZ(this,$Z,0),zZ(this,UZ,-1)}}function YZ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function GZ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function qZ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,GZ(t,e,"get"))}function KZ(t,e,n){YZ(t,e),e.set(t,n)}function XZ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,GZ(t,e,"set"),n),n}function ZZ(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function QZ(t,e){YZ(t,e),e.add(t)}var JZ=new WeakMap,tQ=new WeakMap,eQ=new WeakMap,nQ=new WeakMap,oQ=new WeakSet,iQ=new WeakSet,sQ=new WeakSet;class rQ{useStrategy(t){XZ(this,nQ,qZ(this,eQ).has(t)?t:"none")}refreshStretching(){"none"!==qZ(this,nQ)?qZ(this,JZ).batchExecution(()=>{qZ(this,tQ).clear();const t=qZ(this,eQ).get(qZ(this,nQ));let e=qZ(this,JZ).view.getViewportWidth();ZZ(this,oQ,aQ).call(this)&&(e-=Ve(qZ(this,JZ).rootDocument)),t.prepare({viewportWidth:e});for(let e=0;e<qZ(this,JZ).countCols();e++)qZ(this,JZ).columnIndexMapper.isHidden(qZ(this,JZ).toPhysicalColumn(e))||t.setColumnBaseWidth(e,ZZ(this,iQ,lQ).call(this,e));t.calculate(),t.getWidths().forEach(([t,e])=>{qZ(this,tQ).setValueAtIndex(qZ(this,JZ).toPhysicalColumn(t),e)})},!0):qZ(this,tQ).clear()}getStretchedWidth(t){return qZ(this,tQ).getValueAtIndex(qZ(this,JZ).toPhysicalColumn(t))}constructor(t){QZ(this,oQ),QZ(this,iQ),QZ(this,sQ),KZ(this,JZ,{writable:!0,value:void 0}),KZ(this,tQ,{writable:!0,value:void 0}),KZ(this,eQ,{writable:!0,value:void 0}),KZ(this,nQ,{writable:!0,value:void 0}),XZ(this,eQ,new Map([["all",new LZ(ZZ(this,sQ,hQ).bind(this))],["last",new jZ(ZZ(this,sQ,hQ).bind(this))]])),XZ(this,nQ,"none"),XZ(this,JZ,t),XZ(this,tQ,qZ(this,JZ).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}}function aQ(){const{view:t,stylesHandler:e}=qZ(this,JZ);if(t.isVerticallyScrollableByWindow())return!1;const n=t.getViewportHeight(),o=qZ(this,JZ).countRows(),i=e.getDefaultRowHeight();let s=0,r=!1;for(let t=0;t<o;t++)if(!qZ(this,JZ).rowIndexMapper.isHidden(qZ(this,JZ).toPhysicalRow(t))&&(s+=qZ(this,JZ).getRowHeight(t)??i,s>n)){r=!0;break}return r}function lQ(t){return qZ(this,JZ).getColWidth(t,"StretchColumns")??Qo}function hQ(t,e){return qZ(this,JZ).runHooks("beforeStretchingColumnWidth",t,e)}function cQ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dQ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function uQ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dQ(t,e,"get"))}function gQ(t,e,n){cQ(t,e),e.set(t,n)}function pQ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,dQ(t,e,"set"),n),n}function fQ(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function mQ(t,e){cQ(t,e),e.add(t)}var wQ=new WeakMap,bQ=new WeakMap,vQ=new WeakMap,CQ=new WeakSet,yQ=new WeakSet;class SQ extends Qk{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(){this.enabled||(uQ(this,wQ).useStrategy(this.hot.getSettings().stretchH),uQ(this,vQ).observe(this.hot.rootElement),this.addHook("beforeRender",(...t)=>fQ(this,yQ,RQ).call(this,...t)),this.addHook("modifyColWidth",(...t)=>fQ(this,CQ,kQ).call(this,...t),10),super.enablePlugin())}updatePlugin(){uQ(this,wQ).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),uQ(this,vQ).unobserve(this.hot.rootElement)}getColumnWidth(t){return uQ(this,wQ).getStretchedWidth(t)}destroy(){uQ(this,vQ).disconnect(),pQ(this,vQ,null),pQ(this,wQ,null),super.destroy()}constructor(...t){super(...t),mQ(this,CQ),mQ(this,yQ),gQ(this,wQ,{writable:!0,value:void 0}),gQ(this,bQ,{writable:!0,value:void 0}),gQ(this,vQ,{writable:!0,value:void 0}),pQ(this,wQ,new rQ(this.hot)),pQ(this,bQ,null),pQ(this,vQ,new ResizeObserver(t=>{requestAnimationFrame(()=>{this.hot?.view.isHorizontallyScrollableByWindow()&&t.forEach(({contentRect:t})=>{null!==uQ(this,bQ)&&uQ(this,bQ)!==t.width&&(this.hot.view.adjustElementsSize(),this.hot.refreshDimensions()),pQ(this,bQ,t.width)})})}))}}function kQ(t,e,n){if(n===this.pluginName)return;const o=this.getColumnWidth(e);return"number"==typeof o?o:t}function RQ(t){t&&uQ(this,wQ).refreshStretching()}function xQ(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function EQ(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 MQ=new WeakSet,TQ=new WeakSet,_Q=new WeakSet;class HQ extends Qk{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",()=>xQ(this,MQ,IQ).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>xQ(this,TQ,AQ).call(this)),this.addHook("afterMomentumScroll",()=>xQ(this,_Q,OQ).call(this))}constructor(...t){super(...t),EQ(this,MQ),EQ(this,TQ),EQ(this,_Q),this.scrollbars=[],this.clones=[],this.lockedCollection=!1,this.freezeOverlays=!1}}function IQ(){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 AQ(){this.freezeOverlays=!0,x(this.clones,t=>{ue(t,"hide-tween")})}function OQ(){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 DQ(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)}const NQ="trimRows";var PQ=new WeakSet;class WQ extends Qk{static get PLUGIN_KEY(){return NQ}static get PLUGIN_PRIORITY(){return 330}static get SETTING_KEYS(){return[NQ]}isEnabled(){return!!this.hot.getSettings()[NQ]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Dl),this.trimmedRowsMap.addLocalHook("init",()=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,PQ,LQ).call(this)),super.enablePlugin())}updatePlugin(){const t=this.hot.getSettings()[NQ];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(...t){this.trimRows(t)}untrimRows(t){const e=this.getTrimmedRows(),n=this.isValidConfig(t);let o=e;const i=this.trimmedRowsMap.getValues().slice(),s=t.length>0;n&&s&&(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&&s)&&(n&&s&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",e,o,n&&s,n&&o.length<e.length))}untrimRow(...t){this.untrimRows(t)}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()}constructor(...t){super(...t),DQ(this,PQ),this.trimmedRowsMap=null}}function LQ(){const t=this.hot.getSettings()[NQ];Array.isArray(t)&&this.hot.batchExecution(()=>{x(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0)}class BQ{undo(){bt("Not implemented")}redo(){bt("Not implemented")}constructor(t){this.actionType="",this.actionType=t}}class VQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeCellAlignment",(t,n,o,i)=>{e.done(()=>new VQ({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){FM(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()}constructor({stateBefore:t,range:e,type:n,alignment:o}){super("cell_alignment"),this.stateBefore=t,this.range=e,this.type=n,this.alignment=o}}class FQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeColumnMove",(t,n)=>{!1!==t&&e.done(()=>new FQ({columns:t,finalIndex:n}))})}undo(t,e){const n=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e);iB(this.columns,this.finalColumnIndex,t.columnIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:t,to:e})=>{t<e&&(e-=1),n.moveColumn(e,t)}),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)}constructor({columns:t,finalIndex:e}){super("col_move"),this.columns=t.slice(),this.finalColumnIndex=e}}class zQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeColumnSort",(t,n,o)=>{o&&e.done(()=>new zQ({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()}constructor({currentSortState:t,newSortState:e}){super("col_sort"),this.previousSortState=t,this.nextSortState=e}}class $Q extends BQ{static startRegisteringEvents(t,e){t.addHook("afterCreateCol",(t,n,o)=>{e.done(()=>new $Q({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")}constructor({index:t,amount:e}){super("insert_col"),this.index=t,this.amount=e}}class UQ extends BQ{static startRegisteringEvents(t,e){t.addHook("afterCreateRow",(t,n,o)=>{e.done(()=>new UQ({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")}constructor({index:t,amount:e}){super("insert_row"),this.index=t,this.amount=e}}class jQ extends BQ{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 jQ({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")}constructor({changes:t,selected:e,countCols:n,countRows:o}){super("change"),this.changes=t,this.selected=e,this.countCols=n,this.countRows=o}}class YQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeFilter",(t,n)=>{e.done(()=>new YQ({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()}constructor({conditionsStack:t,previousConditionsStack:e}){super("filter"),this.conditionsStack=t,this.previousConditionsStack=e}}class GQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeMergeCells",(n,o)=>{if(o)return;const i=n.getTopStartCorner(),s=n.getBottomEndCorner(),r=t.getData(i.row,i.col,s.row,s.col);e.done(()=>new GQ({data:r,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)}constructor({data:t,cellRange:e}){super("merge_cells"),this.cellRange=e,this.data=t}}function qQ(t,e,n,o,i){const s=[];return ao(o,i,o=>{ao(e,n,e=>{const n=t.getCellMeta(e,o);s.push([n.visualRow,n.visualCol,n])})}),s}class KQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeRemoveCol",(n,o,i,s)=>{e.done(()=>{const e=t.getSourceDataArray(),i=(t.countCols()+n)%t.countCols(),s=i+o-1,r=[],a=[],l=[];return ao(e.length-1,n=>{const o=[],a=e[n];ao(i,s,e=>{o.push(a[t.toPhysicalColumn(e)])}),r.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 KQ({index:i,indexes:l,data:r,amount:o,headers:a,columnPositions:t.columnIndexMapper.getIndexesSequence(),rowPositions:t.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:t.getSettings().fixedColumnsStart,removedCellMetas:qQ(t,0,t.countRows(),i,s)})},s)})}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,s=[];for(let t=0;t<i;t++)s.push(R(this.data[t],o));const r=R(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]=s[e][o],a.push([e,n,t[n]])})}),void 0!==this.headers&&x(r,(e,o)=>{t.getSettings().colHeaders[n[o]]=e}),this.removedCellMetas.forEach(([e,n,o])=>{t.setCellMetaObject(e,n,o)}),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")}constructor({index:t,indexes:e,data:n,amount:o,headers:i,columnPositions:s,rowPositions:r,fixedColumnsStart:a,removedCellMetas:l}){super("remove_col"),this.index=t,this.indexes=e,this.data=n,this.amount=o,this.headers=i,this.columnPositions=s.slice(0),this.rowPositions=r.slice(0),this.fixedColumnsStart=a,this.removedCellMetas=l}}class XQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeRemoveRow",(n,o,i,s)=>{e.done(()=>{const e=t.toPhysicalRow(n),i=e+o-1,s=St(t.getSourceData(e,0,e+o-1,t.countSourceCols()-1));return new XQ({index:e,data:s,fixedRowsBottom:t.getSettings().fixedRowsBottom,fixedRowsTop:t.getSettings().fixedRowsTop,rowIndexesSequence:t.rowIndexMapper.getIndexesSequence(),removedCellMetas:qQ(t,e,i,0,t.countCols()-1)})},s)})}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,n,o])=>{t.setCellMetaObject(e,n,o)}),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")}constructor({index:t,data:e,fixedRowsBottom:n,fixedRowsTop:o,rowIndexesSequence:i,removedCellMetas:s}){super("remove_row"),this.index=t,this.data=e,this.fixedRowsBottom=n,this.fixedRowsTop=o,this.rowIndexesSequence=i,this.removedCellMetas=s}}class ZQ extends BQ{static startRegisteringEvents(t,e){t.addHook("beforeRowMove",(t,n)=>{!1!==t&&e.done(()=>new ZQ({rows:t,finalIndex:n}))})}undo(t,e){const n=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e);iB(this.rows,this.finalRowIndex,t.rowIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:t,to:e})=>{t<e&&(e-=1),n.moveRow(e,t)}),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)}constructor({rows:t,finalIndex:e}){super("row_move"),this.rows=t.slice(),this.finalRowIndex=e}}class QQ extends BQ{static startRegisteringEvents(t,e){t.addHook("afterUnmergeCells",(t,n)=>{n||e.done(()=>new QQ({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()}constructor({cellRange:t}){super("unmerge_cells"),this.cellRange=t}}function JQ(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)}const tJ="undoRedo";Mn.getSingleton().register("beforeUndo"),Mn.getSingleton().register("afterUndo"),Mn.getSingleton().register("beforeRedo"),Mn.getSingleton().register("afterRedo");var eJ=new WeakSet;class nJ extends Qk{static get PLUGIN_KEY(){return"undoRedo"}static get PLUGIN_PRIORITY(){return 1e3}static get SETTING_KEYS(){return!0}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){this.enabled||(this.addHook("afterChange",(...t)=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,eJ,oJ).call(this,...t)),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:tJ};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(tJ)}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()}constructor(t){var e,n;super(t),JQ(this,eJ),this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,e=t,n=this,[VQ,FQ,zQ,$Q,UQ,jQ,YQ,GQ,KQ,XQ,ZQ,QQ].forEach(t=>t.startRegisteringEvents(e,n))}}function oJ(t,e){"loadData"===e&&this.clear()}const iJ="ht-dialog";const sJ=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="${iJ}__content"></div>\n `}`;return Object.assign(e,n.refs),t=n.fragment,n},focusableElements:function(){return null===t&&bt("Compile the template first."),[]}}}],["confirm",function({id:t="",title:e="",description:n="",buttons:o=[]}){let i=null;const s={};return{TEMPLATE_NAME:"confirm",dialogA11YOptions:()=>({role:"alertdialog",ariaLabelledby:`${t}-dialog-confirm-title`,ariaDescribedby:n?`${t}-dialog-confirm-description`:void 0}),compile:function(){const r=_`${`\n <div tabindex="-1" data-ref="contentElement" class="${iJ}__content-wrapper-inner">\n <div class="${iJ}__content">\n <h2\n id="${t}-dialog-confirm-title"\n class="${iJ}__title">${K(e)}</h2>\n <p\n id="${t}-dialog-confirm-description"\n class="${iJ}__description">${K(n)}</p>\n </div>\n ${o.length>0?`\n <div data-ref="buttonsContainer" class="${iJ}__buttons">\n ${o.map(t=>`\n <button class="ht-button ht-button--${t.type}">${K(t.text)}</button>\n `).join("")}\n </div>\n `:""}\n </div>\n `}`;return Object.assign(s,r.refs),i=r.fragment,r},focusableElements:function(){null===i&&bt("Compile the template first.");const{contentElement:t,buttonsContainer:e}=s,n=[];return e?n.push(...Array.from(e.children)):n.push(t),n}}}]]);function rJ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aJ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function lJ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,aJ(t,e,"get"))}function hJ(t,e,n){rJ(t,e),e.set(t,n)}function cJ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,aJ(t,e,"set"),n),n}function dJ(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function uJ(t,e){rJ(t,e),e.add(t)}const gJ=`\n<div data-ref="dialogElement" class="${iJ}">\n <div data-ref="dialogWrapperElement" class="${iJ}__content-wrapper">\n</div>\n`;var pJ=new WeakMap,fJ=new WeakMap,mJ=new WeakMap,wJ=new WeakMap,bJ=new WeakMap,vJ=new WeakMap,CJ=new WeakMap,yJ=new WeakSet,SJ=new WeakSet;class kJ{useTemplate(t,e={}){if(!sJ.has(t)||"base"===t){bt(T`Invalid template: ${t}.\x20
|
|
277
|
+
Valid templates are: ${Array.from(sJ.keys()).filter(t=>"base"!==t).join(", ")}.`)}cJ(this,bJ,sJ.get(t)(e)),cJ(this,vJ,(e.buttons??[]).map(t=>t.callback))}useDefaultTemplate(){cJ(this,bJ,sJ.get("base")()),cJ(this,vJ,[])}install(){if(lJ(this,fJ)?.dialogElement)return;const t=_`${gJ}`;cJ(this,fJ,t.refs);const{dialogElement:e}=lJ(this,fJ);pe(e,[["aria-modal","true"],["dir",lJ(this,mJ)?"rtl":"ltr"]]),e.addEventListener("transitionstart",()=>dJ(this,SJ,xJ).call(this)),e.addEventListener("transitionend",()=>dJ(this,yJ,RJ).call(this)),lJ(this,pJ).after(t.fragment)}getContainer(){return lJ(this,fJ).dialogElement}getFocusableElements(){return lJ(this,bJ).focusableElements()}updateDialog({isVisible:t,content:e,customClassName:n,background:o,contentBackground:i,animation:s,a11y:r}){const a=lJ(this,bJ).compile(),{dialogElement:l,dialogWrapperElement:h}=lJ(this,fJ);h.innerHTML="",h.appendChild(a.fragment),Object.assign(lJ(this,fJ),a.refs);const{contentElement:c,buttonsContainer:d}=lJ(this,fJ);"base"!==lJ(this,bJ).TEMPLATE_NAME&&Object.assign(r,lJ(this,bJ).dialogA11YOptions());const u=n?` ${n}`:"",g=o?` ${iJ}--background-${o}`:"",p=s?` ${iJ}--animation`:"",f=t?` ${iJ}--show`:"";var m;l.className=[iJ,`${iJ}--${lJ(this,bJ).TEMPLATE_NAME}`,"handsontable",u,g,p,f].join(" "),pe(l,["base"===lJ(this,bJ).TEMPLATE_NAME?Q(-1):void 0]),pe(l,["alertdialog"===r.role?["role","alertdialog"]:["role","dialog"]]),r.ariaLabel&&!r.ariaLabelledby?pe(l,[r.ariaLabel?rt(r.ariaLabel):void 0]):fe(l,"aria-label"),r.ariaLabelledby?pe(l,[(m=r.ariaLabelledby,["aria-labelledby",m])]):fe(l,"aria-labelledby"),r.ariaDescribedby?pe(l,[at(r.ariaDescribedby)]):fe(l,"aria-describedby");return ue(c,`${iJ}__content${i?` ${iJ}__content--background`:""}`),"base"===lJ(this,bJ).TEMPLATE_NAME?(c.innerHTML="","string"==typeof e?ye(c,e,lJ(this,CJ)):(e instanceof HTMLElement||e instanceof DocumentFragment)&&c.appendChild(e)):d&&Array.from(d.children).forEach((t,e)=>{const n=lJ(this,vJ)[e];n&&t.addEventListener("click",n)}),this}showDialog(t){const{dialogElement:e}=lJ(this,fJ);return e.style.display="block",t&&e.offsetHeight,ue(e,`${iJ}--show`),cJ(this,wJ,!1),this}hideDialog(t){const{dialogElement:e}=lJ(this,fJ);return ge(e,`${iJ}--show`),(t&&!lJ(this,wJ)||!t)&&(e.style.display="none"),cJ(this,wJ,!1),this}focusDialog(){lJ(this,fJ).dialogElement.focus()}updateWidth(t){return lJ(this,fJ).dialogElement.style.width=`${t}px`,this}updateHeight(t){return lJ(this,fJ).dialogElement.style.height=`calc(100% - ${t}px)`,this}destroyDialog(){lJ(this,fJ)?.dialogElement.remove(),cJ(this,fJ,null)}constructor({rootElement:t,isRtl:e,sanitizer:n}){uJ(this,yJ),uJ(this,SJ),hJ(this,pJ,{writable:!0,value:void 0}),hJ(this,fJ,{writable:!0,value:void 0}),hJ(this,mJ,{writable:!0,value:void 0}),hJ(this,wJ,{writable:!0,value:void 0}),hJ(this,bJ,{writable:!0,value:void 0}),hJ(this,vJ,{writable:!0,value:void 0}),hJ(this,CJ,{writable:!0,value:void 0}),cJ(this,mJ,!1),cJ(this,wJ,!1),cJ(this,bJ,sJ.get("base")),cJ(this,vJ,[]),cJ(this,pJ,t),cJ(this,mJ,e),cJ(this,CJ,n),this.install()}}function RJ(){const{dialogElement:t}=lJ(this,fJ);de(t,`${iJ}--show`)||(t.style.display="none")}function xJ(){cJ(this,wJ,!0)}function EJ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function MJ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function TJ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,MJ(t,e,"get"))}function _J(t,e,n){EJ(t,e),e.set(t,n)}function HJ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,MJ(t,e,"set"),n),n}function IJ(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function AJ(t,e){EJ(t,e),e.add(t)}Rt(kJ,Fs);const OJ="dialog",DJ=OJ,NJ=`plugin:${OJ}`;var PJ=new WeakMap,WJ=new WeakMap,LJ=new WeakMap,BJ=new WeakSet,VJ=new WeakSet,FJ=new WeakSet,zJ=new WeakSet,$J=new WeakSet;class UJ extends Qk{static get PLUGIN_KEY(){return OJ}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===t?.description||"string"==typeof t?.description)&&(void 0===t?.buttons||Array.isArray(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===t?.role||["dialog","alertdialog"].includes(t?.role))&&(void 0===t?.ariaLabel||"string"==typeof t?.ariaLabel)&&(void 0===t?.ariaLabelledby||"string"==typeof t?.ariaLabelledby)&&(void 0===t?.ariaDescribedby||"string"==typeof t?.ariaDescribedby)}}isEnabled(){return!!this.hot.getSettings()[OJ]}enablePlugin(){this.enabled||(TJ(this,PJ)||HJ(this,PJ,new kJ({rootElement:this.hot.rootGridElement,sanitizer:this.hot.getSettings().sanitizer,isRtl:this.hot.isRtl()})),IJ(this,BJ,jJ).call(this),IJ(this,FJ,GJ).call(this),this.addHook("afterViewRender",()=>IJ(this,$J,KJ).call(this)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),IJ(this,VJ,YJ).call(this),IJ(this,zJ,qJ).call(this),super.disablePlugin()}isVisible(){return TJ(this,WJ)}show(t={}){this.enabled&&(this.isVisible()?this.update(t):(this.hot.runHooks("beforeDialogShow"),this.update(t),TJ(this,PJ).showDialog(this.getSetting("animation")),HJ(this,WJ,!0),this.hot.getFocusScopeManager().activateScope(OJ),HJ(this,LJ,this.hot.selection.exportSelection()),this.hot.deselectCell(),this.hot.runHooks("afterDialogShow")))}hide(){this.isVisible()&&(this.hot.runHooks("beforeDialogHide"),TJ(this,PJ).hideDialog(this.getSetting("animation")),HJ(this,WJ,!1),this.hot.getFocusScopeManager().deactivateScope(OJ),TJ(this,LJ)?.ranges.length>0?(this.hot.selection.importSelection(TJ(this,LJ)),this.hot.view.render(),HJ(this,LJ,null)):(this.hot.view.render(),HJ(this,LJ,null)),this.hot.runHooks("afterDialogHide"))}update(t){if(!this.enabled)return;this.updatePluginSettings(t);const e=this.getSetting("template");e!==UJ.DEFAULT_SETTINGS.template&&this.getSetting("content")!==UJ.DEFAULT_SETTINGS.content&&bt("The `template` option cannot be used together with the `content` option."),e?TJ(this,PJ).useTemplate(e.type,{id:this.hot.guid,...e}):TJ(this,PJ).useDefaultTemplate(),TJ(this,PJ).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(xh),type:"primary",callback:(...t)=>e?.(...t)}]},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(Eh),type:"secondary",callback:(...t)=>n?.(...t)},{text:this.hot.getTranslatedPhrase(xh),type:"primary",callback:(...t)=>e?.(...t)}]},contentBackground:!0,background:"semi-transparent",animation:!0,closable:!1})}focus(){TJ(this,PJ).focusDialog()}destroy(){TJ(this,PJ)?.destroyDialog(),HJ(this,PJ,null),HJ(this,WJ,!1),HJ(this,LJ,null),super.destroy()}constructor(...t){super(...t),AJ(this,BJ),AJ(this,VJ),AJ(this,FJ),AJ(this,zJ),AJ(this,$J),_J(this,PJ,{writable:!0,value:void 0}),_J(this,WJ,{writable:!0,value:void 0}),_J(this,LJ,{writable:!0,value:void 0}),HJ(this,PJ,null),HJ(this,WJ,!1),HJ(this,LJ,null)}}function jJ(){const t=this.hot.getShortcutManager(),e=t.getContext(NJ)??t.addContext(NJ);e.addShortcut({keys:[["Escape"]],callback:()=>{this.hide()},runOnlyIf:()=>TJ(this,WJ)&&this.getSetting("closable"),group:DJ}),e.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 YJ(){this.hot.getShortcutManager().getContext(NJ).removeShortcutsByGroup(DJ)}function GJ(){this.hot.getFocusScopeManager().registerScope(OJ,TJ(this,PJ).getContainer(),{shortcutsContextName:NJ,type:"modal",runOnlyIf:()=>this.isVisible(),onActivate:t=>{const e=this.hot.isListening(),n=TJ(this,PJ).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&&!TJ(this,PJ).getContainer().contains(this.hot.rootDocument.activeElement)&&TJ(this,PJ).getContainer().focus(),e&&this.hot.runHooks("afterDialogFocus","unknown"===t?"show":t)}})}function qJ(){this.hot.getFocusScopeManager().unregisterScope(OJ)}function KJ(){const{view:t,rootWrapperElement:e,rootWindow:n}=this.hot,o=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();TJ(this,PJ).updateWidth(o);const i=e.querySelector(".hot-display-license-info");if(i){const t=i.offsetHeight,e=Number.parseFloat(n.getComputedStyle(i).marginTop);TJ(this,PJ).updateHeight(t+e)}}function XJ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ZJ(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function QJ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ZJ(t,e,"get"))}function JJ(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,ZJ(t,e,"set"),n),n}const t0="loading";var e0=new WeakMap,n0=new WeakSet;class o0 extends Qk{static get PLUGIN_KEY(){return t0}static get PLUGIN_PRIORITY(){return 350}static get DEFAULT_SETTINGS(){return{icon:`<svg class="${Oy}__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()[t0]}enablePlugin(){this.enabled||(null===QJ(this,e0)&&(JJ(this,e0,this.hot.getPlugin("dialog")),QJ(this,e0)?.isEnabled()||(this.hot.getSettings().dialog=!0),this.hot.addHook("afterDialogFocus",()=>function(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}(this,n0,i0).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),super.disablePlugin()}isVisible(){return QJ(this,e0)?.isVisible()??!1}show(t={}){if(!this.isEnabled()||!QJ(this,e0)||!QJ(this,e0)?.isEnabled())return;if(this.isVisible())return void this.update(t);!1!==this.hot.runHooks("beforeLoadingShow")&&(this.update(t),QJ(this,e0).show(),this.hot.runHooks("afterLoadingShow"))}hide(){if(!QJ(this,e0)||!QJ(this,e0)?.isEnabled()||!this.isVisible())return;!1!==this.hot.runHooks("beforeLoadingHide")&&(QJ(this,e0).hide(),this.hot.runHooks("afterLoadingHide"))}update(t){if(!this.isEnabled()||!QJ(this,e0)||!QJ(this,e0)?.isEnabled())return;this.updatePluginSettings(t);const e=this.hot.guid,n=this.getSetting("icon"),o=this.getSetting("title")??this.hot.getTranslatedPhrase(md),i=this.getSetting("description"),s=function({id:t,icon:e,title:n,description:o}){return`\n <div class="${Oy}__content">\n <i class="${Oy}__icon">${e}</i>\n <div class="${Oy}__text">\n <h2 id="${t}-${t0}-title" class="${Oy}__title">${n}</h2>\n ${o?`<p id="${t}-${t0}-description" class="${Oy}__description">${o}</p>`:""}\n </div>\n </div>\n `}({id:e,icon:n,title:o,description:i});QJ(this,e0).update({content:s,customClassName:Oy,background:0===this.hot.countSourceRows()?"solid":"semi-transparent",a11y:{role:"alertdialog",ariaLabelledby:`${e}-${t0}-title`,ariaDescribedby:i?`${e}-${t0}-description`:void 0}})}destroy(){JJ(this,e0,null),super.destroy()}constructor(...t){var e,n;super(...t),XJ(e=this,n=n0),n.add(e),function(t,e,n){XJ(t,e),e.set(t,n)}(this,e0,{writable:!0,value:void 0}),JJ(this,e0,null)}}function i0(){QJ(this,e0).focus()}const s0="ht-notification",r0=["top-start","top-end","bottom-start","bottom-end"];function a0(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function l0(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,a0(t,e,"get"))}function h0(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 c0(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,a0(t,e,"set"),n),n}var d0=new WeakMap,u0=new WeakMap,g0=new WeakMap,p0=new WeakMap,f0=new WeakMap;class m0{install(){if(l0(this,p0))return;const t=l0(this,d0).ownerDocument,e=t.createElement("div");e.className=`${s0} handsontable`,e.setAttribute("dir",l0(this,g0)?"rtl":"ltr"),r0.forEach(n=>{const o=t.createElement("div");o.className=`${s0}__stack ${s0}__stack--${n}`,o.dataset.htNotificationPosition=n,o.tabIndex=-1,e.appendChild(o),l0(this,f0).set(n,o)}),l0(this,d0).after(e),c0(this,p0,e)}getHost(){return l0(this,p0)}getStack(t){return l0(this,f0).get(t)}setRtl(t){c0(this,g0,t),l0(this,p0)&&l0(this,p0).setAttribute("dir",t?"rtl":"ltr")}setSanitizer(t){c0(this,u0,t)}createToastElement(t,e,n){const o=l0(this,d0).ownerDocument,i=o.createElement("div"),s="error"===t.variant;i.className=`${s0}__toast ${s0}__toast--${t.variant}`,i.dataset.htNotificationId=t.id,i.setAttribute("role",s?"alert":"status"),i.setAttribute("aria-live",s?"assertive":"polite"),i.setAttribute("aria-atomic","true"),n&&(i.classList.add(`${s0}__toast--animate`),i.classList.add(t.position.startsWith("top")?`${s0}__toast--stack-top`:`${s0}__toast--stack-bottom`));const r=o.createElement("div");r.className=`${s0}__toast-inner`;const a=o.createElement("div");a.className=`${s0}__accent`,a.setAttribute("aria-hidden","true"),r.appendChild(a);const l=o.createElement("div");if(l.className=`${s0}__body`,t.title){const e=o.createElement("div");e.className=`${s0}__title`,e.textContent=K(t.title),l.appendChild(e)}const h=o.createElement("div");if(h.className=`${s0}__message`,"string"==typeof t.message?ye(h,t.message,l0(this,u0)):h.appendChild(t.message),l.appendChild(h),t.actions?.length){const e=o.createElement("div");e.className=`${s0}__actions`,t.actions.forEach((t,n)=>{const i=o.createElement("button");i.type="button",i.className="ht-button ht-button--"+("primary"===t.type?"primary":"secondary"),i.textContent=K(t.label),i.dataset.htNotificationAction=String(n),e.appendChild(i)}),l.appendChild(e)}if(r.appendChild(l),t.closable){const t=o.createElement("button");t.type="button",t.className=`${s0}__close`,t.setAttribute("aria-label",e),r.appendChild(t)}i.appendChild(r),i.tabIndex=-1,r.querySelectorAll("button").forEach(t=>{t.tabIndex=-1});const c=l0(this,d0).ownerDocument.defaultView;return n?c.requestAnimationFrame(()=>{c.requestAnimationFrame(()=>{i.classList.add(`${s0}__toast--visible`)})}):i.classList.add(`${s0}__toast--visible`),{element:i}}static getFocusables(t){const e=Array.from(t.querySelectorAll("button")).filter(t=>!t.disabled);return e.length>0?e:[t]}static setSequentialFocusWithinHost(t,e){if(!t)return;const n=e?0:-1;t.querySelectorAll(`.${s0}__toast`).forEach(t=>{const e=Array.from(t.querySelectorAll("button")).filter(t=>!t.disabled);e.forEach(t=>{t.tabIndex=n}),0===e.length?t.tabIndex=n:t.tabIndex=-1})}destroy(){l0(this,p0)?.remove(),c0(this,p0,null),l0(this,f0).clear()}constructor({rootElement:t,sanitizer:e,isRtl:n}){h0(this,d0,{writable:!0,value:void 0}),h0(this,u0,{writable:!0,value:void 0}),h0(this,g0,{writable:!0,value:void 0}),h0(this,p0,{writable:!0,value:void 0}),h0(this,f0,{writable:!0,value:void 0}),c0(this,g0,!1),c0(this,p0,null),c0(this,f0,new Map),c0(this,d0,t),c0(this,u0,e),c0(this,g0,n)}}function w0(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function b0(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function v0(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,b0(t,e,"get"))}function C0(t,e,n){w0(t,e),e.set(t,n)}function y0(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,b0(t,e,"set"),n),n}function S0(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function k0(t,e){w0(t,e),e.add(t)}const R0="notification",x0=`plugin:${R0}`,E0=`plugin:${R0}:global`,M0=R0,T0=new Set(r0),_0=new Set(["info","success","warning","error"]);var H0=new WeakMap,I0=new WeakMap,A0=new WeakMap,O0=new WeakMap,D0=new WeakMap,N0=new WeakMap,P0=new WeakMap,W0=new WeakMap,L0=new WeakMap,B0=new WeakSet,V0=new WeakSet,F0=new WeakMap,z0=new WeakSet,$0=new WeakSet,U0=new WeakSet,j0=new WeakSet,Y0=new WeakSet,G0=new WeakSet,q0=new WeakSet,K0=new WeakSet,X0=new WeakSet,Z0=new WeakSet,Q0=new WeakSet,J0=new WeakSet,t1=new WeakSet,e1=new WeakSet,n1=new WeakMap,o1=new WeakSet,i1=new WeakSet,s1=new WeakSet,r1=new WeakSet,a1=new WeakSet,l1=new WeakSet,h1=new WeakSet,c1=new WeakSet,d1=new WeakSet,u1=new WeakSet,g1=new WeakSet,p1=new WeakSet,f1=new WeakSet,m1=new WeakSet,w1=new WeakSet,b1=new WeakSet,v1=new WeakSet,C1=new WeakSet,y1=new WeakSet,S1=new WeakSet,k1=new WeakSet;class R1 extends Qk{static get PLUGIN_KEY(){return R0}static get PLUGIN_PRIORITY(){return 375}static get DEFAULT_SETTINGS(){return{stackLimit:10,animation:!0}}static get SETTINGS_VALIDATORS(){return{stackLimit:t=>"number"==typeof t&&t>0&&Number.isInteger(t),animation:t=>"boolean"==typeof t}}isEnabled(){return!!this.hot.getSettings()[R0]}enablePlugin(){this.enabled||(v0(this,H0)||y0(this,H0,new m0({rootElement:this.hot.rootGridElement,sanitizer:this.hot.getSettings().sanitizer,isRtl:this.hot.isRtl()})),v0(this,H0).install(),S0(this,J0,L1).call(this),S0(this,t1,B1).call(this),this.eventManager.addEventListener(this.hot.rootDocument,"focusin",v0(this,n1),!0),this.addHook("afterUpdateSettings",v0(this,F0)),this.eventManager.addEventListener(this.hot.rootDocument,"visibilitychange",()=>{S0(this,k1,a2).call(this)&&S0(this,y1,s2).call(this)}),super.enablePlugin(),y0(this,L0,S0(this,B0,x1).call(this)))}updatePlugin(t){const e=S0(this,B0,x1).call(this);t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,R0)&&null!==v0(this,L0)&&S0(this,V0,E1).call(this,v0(this,L0),e)||(this.disablePlugin(),this.enablePlugin()),super.updatePlugin()}disablePlugin(){this.hideAll(),S0(this,e1,V1).call(this),S0(this,h1,G1).call(this),super.disablePlugin(),v0(this,H0)?.destroy(),y0(this,H0,null),y0(this,O0,null),y0(this,D0,!1),y0(this,L0,null)}showMessage(t){if(!this.enabled)return"";const e=S0(this,z0,M1).call(this,t);if(!1===this.hot.runHooks("beforeNotificationShow",e))return"";const n=this.getSetting("stackLimit");return S0(this,$0,T1).call(this,e.position)>=n?(v0(this,A0)[e.position].push(e),e.id):(S0(this,U0,_1).call(this,e),e.id)}hide(t){if(!this.enabled||!t)return;const e=v0(this,I0).get(t);if(!e)return void S0(this,C1,i2).call(this,t);if(!1===this.hot.runHooks("beforeNotificationHide",t))return void(e.durationMs>0&&e.remainingMs<=0&&(e.remainingMs=e.durationMs));const n=this.hot.rootDocument.activeElement,o=n instanceof this.hot.rootWindow.HTMLElement&&e.element.contains(n);S0(this,c1,q1).call(this,e,!0),this.hot.runHooks("afterNotificationHide",t),S0(this,v1,o2).call(this,e.options.position),S0(this,b1,n2).call(this,o)}hideAll(){if(!this.enabled)return;r0.forEach(t=>{v0(this,A0)[t].length=0});[...v0(this,I0).keys()].forEach(t=>this.hide(t))}isVisible(t){return void 0===t?v0(this,I0).size>0:v0(this,I0).has(t)}getQueueSize(){return r0.reduce((t,e)=>t+v0(this,A0)[e].length,0)}destroy(){r0.forEach(t=>{v0(this,A0)[t].length=0}),v0(this,I0).clear(),S0(this,e1,V1).call(this),S0(this,h1,G1).call(this),v0(this,H0)?.destroy(),y0(this,H0,null),y0(this,O0,null),y0(this,D0,!1),y0(this,L0,null),super.destroy()}constructor(...t){super(...t),k0(this,B0),k0(this,V0),k0(this,z0),k0(this,$0),k0(this,U0),k0(this,j0),k0(this,Y0),k0(this,G0),k0(this,q0),k0(this,K0),k0(this,X0),k0(this,Z0),k0(this,Q0),k0(this,J0),k0(this,t1),k0(this,e1),k0(this,o1),k0(this,i1),k0(this,s1),k0(this,r1),k0(this,a1),k0(this,l1),k0(this,h1),k0(this,c1),k0(this,d1),k0(this,u1),k0(this,g1),k0(this,p1),k0(this,f1),k0(this,m1),k0(this,w1),k0(this,b1),k0(this,v1),k0(this,C1),k0(this,y1),k0(this,S1),k0(this,k1),C0(this,H0,{writable:!0,value:void 0}),C0(this,I0,{writable:!0,value:void 0}),C0(this,A0,{writable:!0,value:void 0}),C0(this,O0,{writable:!0,value:void 0}),C0(this,D0,{writable:!0,value:void 0}),C0(this,N0,{writable:!0,value:void 0}),C0(this,P0,{writable:!0,value:void 0}),C0(this,W0,{writable:!0,value:void 0}),C0(this,L0,{writable:!0,value:void 0}),C0(this,F0,{writable:!0,value:void 0}),C0(this,n1,{writable:!0,value:void 0}),y0(this,H0,null),y0(this,I0,new Map),y0(this,A0,{"top-start":[],"top-end":[],"bottom-start":[],"bottom-end":[]}),y0(this,O0,null),y0(this,D0,!1),y0(this,N0,!1),y0(this,P0,!1),y0(this,W0,!1),y0(this,L0,null),y0(this,F0,()=>{if(!this.enabled||!v0(this,H0))return;const t=this.hot.rootElement.getAttribute("dir");"rtl"===t||"ltr"===t?v0(this,H0).setRtl("rtl"===t):v0(this,H0).setRtl(this.hot.isRtl()),v0(this,H0).setSanitizer(this.hot.getSettings().sanitizer)}),y0(this,n1,t=>{if(0===v0(this,I0).size)return;const e=v0(this,H0)?.getHost(),n=t.target;if(n instanceof this.hot.rootWindow.HTMLElement&&e){if(e.contains(n)){if(null!==v0(this,O0))return;const n=t.relatedTarget;return void(n instanceof this.hot.rootWindow.HTMLElement&&this.hot.rootWrapperElement.contains(n)&&!e.contains(n)&&y0(this,O0,n))}S0(this,G0,A1).call(this)}})}}function x1(){return{stackLimit:this.getSetting("stackLimit"),animation:this.getSetting("animation")}}function E1(t,e){return t.stackLimit===e.stackLimit&&t.animation===e.animation}function M1(t){Et(t)&&("string"==typeof t.message||"undefined"!=typeof HTMLElement&&t.message instanceof HTMLElement)||bt("Notification.showMessage expects an object with a `message` string or HTMLElement.");const e=`htn-${j()}`,n=_0.has(t.variant)?t.variant:"info",o=T0.has(t.position)?t.position:"bottom-end",i="number"==typeof t.duration&&t.duration>=0?t.duration:4e3,s="boolean"!=typeof t.closable||t.closable,r=Array.isArray(t.actions)?t.actions.map(t=>{Et(t)&&"string"==typeof t.label&&"function"==typeof t.callback||bt("Each notification action needs `label` (string) and `callback` (function).");const e="primary"===t.type?"primary":"secondary";return{label:t.label,type:e,callback:t.callback}}):[];return{id:e,variant:n,title:"string"==typeof t.title?t.title:void 0,message:t.message,duration:i,position:o,closable:s,actions:r}}function T1(t){let e=0;return v0(this,I0).forEach(n=>{n.options.position===t&&(e+=1)}),e}function _1(t){const e=this.hot.getTranslatedPhrase(bd),n=this.getSetting("animation"),{element:o}=v0(this,H0).createToastElement(t,e,n),i=v0(this,H0).getStack(t.position);if(i||bt(`Unknown notification position "${t.position}".`),t.position.startsWith("top")?i.prepend(o):i.appendChild(o),t.position.startsWith("bottom")){this.hot.rootWindow.requestAnimationFrame(()=>{this.enabled&&(i.scrollTop=i.scrollHeight)})}const s=t.duration,r={id:t.id,options:t,element:o,durationMs:s,remainingMs:s,paused:!1};v0(this,I0).set(t.id,r),S0(this,j0,H1).call(this,r),v0(this,D0)&&S0(this,q0,O1).call(this),this.hot.runHooks("afterNotificationShow",t.id,t),s>0&&S0(this,y1,s2).call(this)}function H1(t){t.toastEventDisposers=[this.eventManager.addEventListener(t.element,"click",e=>S0(this,Y0,I1).call(this,e,t)),this.eventManager.addEventListener(t.element,"mouseenter",()=>{t.paused=!0}),this.eventManager.addEventListener(t.element,"mouseleave",()=>{t.paused=!1,t.durationMs>0&&!this.hot.rootDocument.hidden&&S0(this,y1,s2).call(this)})]}function I1(t,e){const n=t.target;if(!(n instanceof this.hot.rootWindow.HTMLElement))return;if(n.closest(`.${s0}__close`))return void this.hide(e.id);const o=n.closest("[data-ht-notification-action]");if(!o||!e.element.contains(o))return;const i=Number.parseInt(o.dataset.htNotificationAction,10),s=e.options.actions[i];s&&s.callback()}function A1(){const t=v0(this,H0)?.getHost();t&&m0.setSequentialFocusWithinHost(t,!1),y0(this,D0,!1)}function O1(){const t=v0(this,H0)?.getHost();t&&0!==v0(this,I0).size&&(m0.setSequentialFocusWithinHost(t,!0),y0(this,D0,!0))}function D1(){const t=v0(this,H0)?.getHost();if(!t||0===v0(this,I0).size)return;const e=this.hot.rootDocument.activeElement;e instanceof this.hot.rootWindow.HTMLElement&&!t.contains(e)&&y0(this,O0,e),this.hot.listen(),this.hot.getFocusScopeManager().activateScope(R0)}function N1(){const t=this.hot.getFocusScopeManager();t.getActiveScopeId()!==Pp&&t.activateScope(Pp)}function P1(){const t=this.hot.getFocusScopeManager();if(y0(this,W0,!0),t.getActiveScopeId()===R0)t.deactivateScope(R0);else{y0(this,W0,!1),S0(this,G0,A1).call(this);const t=v0(this,O0);y0(this,O0,null),t?.isConnected&&this.hot.getFocusManager().focusElement(t,{preventScroll:!0}),S0(this,X0,N1).call(this)}}function W1(){const t=this.hot.rootDocument,e=v0(this,H0)?.getHost();e?.contains(t.activeElement)&&S0(this,Z0,P1).call(this)}function L1(){v0(this,P0)||(this.hot.getFocusScopeManager().registerScope(R0,v0(this,H0).getHost(),{shortcutsContextName:x0,runOnlyIf:()=>v0(this,I0).size>0,enableFocusCatchers:!1,onActivate:()=>{const t=v0(this,H0)?.getHost();t&&(S0(this,q0,O1).call(this),S0(this,p1,Q1).call(this))},onDeactivate:()=>{S0(this,G0,A1).call(this);if(v0(this,W0)){y0(this,W0,!1);const t=v0(this,O0);y0(this,O0,null),t?.isConnected&&this.hot.getFocusManager().focusElement(t,{preventScroll:!0}),S0(this,X0,N1).call(this)}}}),y0(this,P0,!0))}function B1(){const t=this.hot.getShortcutManager(),e=t.getContext(x0)??t.addContext(x0),n=t.getOrCreateContext(E0,"global"),o=t.getContext(Pp),i={keys:[["f6"]],preventDefault:!0,callback:()=>{S0(this,K0,D1).call(this)},runOnlyIf:()=>S0(this,m1,t2).call(this),group:M0};n.addShortcut(i),o&&o.addShortcut(i),e.addShortcut({keys:[["Escape"]],callback:()=>S0(this,Q0,W1).call(this),runOnlyIf:()=>!0===v0(this,H0)?.getHost()?.contains(this.hot.rootDocument.activeElement),group:M0}),e.addShortcut({keys:[["Tab"]],preventDefault:!0,callback:()=>S0(this,l1,Y1).call(this),runOnlyIf:()=>S0(this,r1,U1).call(this),group:M0}),e.addShortcut({keys:[["Shift","Tab"]],preventDefault:!0,callback:()=>S0(this,Q0,W1).call(this),runOnlyIf:()=>S0(this,a1,j1).call(this),group:M0})}function V1(){const t=this.hot.getShortcutManager();t.getContext(x0)?.removeShortcutsByGroup(M0),t.getContext(E0)?.removeShortcutsByGroup(M0),t.getContext(Pp)?.removeShortcutsByGroup(M0)}function F1(){const t=v0(this,H0)?.getHost();if(!t)return[];const e=[...t.querySelectorAll(`.${s0}__toast`)],n=[];for(let t=0;t<e.length;t+=1)n.push(...m0.getFocusables(e[t]));return n}function z1(){return S0(this,o1,F1).call(this)[0]}function $1(){if(0===v0(this,I0).size)return null;const t=this.hot.rootDocument.activeElement,e=v0(this,H0)?.getHost();if(!(t instanceof this.hot.rootWindow.HTMLElement&&e?.contains(t)))return null;const n=S0(this,o1,F1).call(this);if(0===n.length)return null;const o=n.indexOf(t);return-1===o?null:(v0(this,D0)||S0(this,q0,O1).call(this),{list:n,idx:o})}function U1(){const t=S0(this,s1,$1).call(this);return null!==t&&t.idx===t.list.length-1}function j1(){const t=S0(this,s1,$1).call(this);return null!==t&&0===t.idx}function Y1(){const t=this.hot.getFocusScopeManager();y0(this,W0,!1),t.getActiveScopeId()===R0?t.deactivateScope(R0):S0(this,G0,A1).call(this),this.hot.listen(),t.activateScope(Pp,np.TAB_FROM_ABOVE),y0(this,O0,null)}function G1(){v0(this,P0)&&(this.hot.getFocusScopeManager().unregisterScope(R0),y0(this,P0,!1))}function q1(t,e){t.toastEventDisposers&&(t.toastEventDisposers.forEach(t=>t()),t.toastEventDisposers=null),v0(this,I0).delete(t.id),e&&t.element.remove()}function K1(t){const e=v0(this,H0)?.getHost();return!!e&&(t instanceof this.hot.rootWindow.HTMLElement&&e.contains(t))}function X1(t){let e=!1;return v0(this,I0).forEach(n=>{n.element.contains(t)&&(e=!0)}),e}function Z1(){this.hot.listen();const t=this.hot.getFocusScopeManager();t.getActiveScopeId()===R0&&t.deactivateScope(R0),t.activateScope(R0)}function Q1(){const t=this.hot.rootDocument;if(!this.enabled||0===v0(this,I0).size)return;if(S0(this,u1,X1).call(this,t.activeElement))return;const e=S0(this,i1,z1).call(this);e&&this.hot.getFocusManager().focusElement(e)}function J1(t){if(!(t instanceof this.hot.rootWindow.HTMLElement))return!1;const e=t.closest(".ht-root-wrapper");if(null!==e)return e===this.hot.rootWrapperElement;return this.hot.rootDocument.querySelectorAll(".ht-root-wrapper").length<=1}function t2(){if(!this.enabled||0===v0(this,I0).size)return!1;const t=v0(this,H0)?.getHost();if(!t)return!1;const e=this.hot.rootDocument.activeElement;return!(e instanceof this.hot.rootWindow.HTMLElement&&t.contains(e))&&S0(this,f1,J1).call(this,e)}function e2(){S0(this,Z0,P1).call(this)}function n2(t=!1){const e=this.hot.rootDocument,n=v0(this,H0)?.getHost(),o=e.activeElement;if(v0(this,I0).size>0){const e=o instanceof this.hot.rootWindow.HTMLElement&&!0===n?.contains(o);return void((e&&!S0(this,u1,X1).call(this,o)||!e&&t)&&S0(this,g1,Z1).call(this))}const i=v0(this,D0),s=S0(this,d1,K1).call(this,e.activeElement);(i||t||s)&&S0(this,w1,e2).call(this)}function o2(t){const e=this.getSetting("stackLimit");for(;v0(this,A0)[t].length>0&&S0(this,$0,T1).call(this,t)<e;){const e=v0(this,A0)[t].shift();S0(this,U0,_1).call(this,e)}}function i2(t){r0.forEach(e=>{const n=v0(this,A0)[e],o=n.findIndex(e=>e.id===t);o>=0&&n.splice(o,1)})}function s2(){!v0(this,N0)&&this.enabled&&(y0(this,N0,!0),this.hot._registerTimeout(()=>{y0(this,N0,!1),this.enabled&&(S0(this,S1,r2).call(this),S0(this,k1,a2).call(this)&&S0(this,y1,s2).call(this))},200))}function r2(){const t=!this.hot.rootDocument.hidden,e=[];v0(this,I0).forEach(n=>{n.durationMs<=0||!n.paused&&t&&(n.remainingMs-=200,n.remainingMs<=0&&e.push(n.id))}),e.forEach(t=>this.hide(t))}function a2(){if(this.hot.rootDocument.hidden)return!1;let t=!1;return v0(this,I0).forEach(e=>{e.durationMs>0&&!e.paused&&(t=!0)}),t}function l2(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function h2(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,l2(t,e,"get"))}function c2(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 d2(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,l2(t,e,"set"),n),n}const u2="ht-empty-data-state",g2=`<div data-ref="emptyDataStateElement" class="${u2} handsontable">\n <div class="${u2}__content-wrapper">\n <div data-ref="emptyDataStateInner" class="${u2}__content-wrapper-inner"></div>\n </div>\n</div>`;var p2=new WeakMap,f2=new WeakMap,m2=new WeakMap,w2=new WeakMap;class b2{install(){if(h2(this,m2)?.emptyDataStateElement)return;const t=_`${g2}`;d2(this,m2,t.refs);const{emptyDataStateInner:e,emptyDataStateElement:n}=h2(this,m2);pe(e,[Q(-1)]),pe(n,[Q(-1)]),h2(this,p2).after(t.fragment)}getElement(){return h2(this,m2)?.emptyDataStateElement}getFocusableElements(){const{emptyDataStateButtons:t,emptyDataStateInner:e}=h2(this,m2),n=Array.from(t?.children);return 0===n.length?[e]:n}show(){h2(this,m2)?.emptyDataStateElement&&(h2(this,m2).emptyDataStateElement.style.display="block")}hide(){h2(this,m2)?.emptyDataStateElement&&(h2(this,w2)?.remove(),d2(this,w2,null),h2(this,m2).emptyDataStateElement.style.display="none")}updateContent(t,e=!1){const{emptyDataStateElement:n,emptyDataStateInner:o}=h2(this,m2);let i="";i="string"==typeof t?{title:t}:{title:t?.title,description:t?.description,buttons:t?.buttons};const s=_`${(({title:t,description:e,buttons:n},o=!1)=>`\n ${o?`<div class="${u2}__spinner" aria-hidden="true"></div>`:""}\n <div class="${u2}__content">\n ${t?`<h2 class="${u2}__title">${K(t)}</h2>`:""}\n ${e?`<p class="${u2}__description">${K(e)}</p>`:""}\n </div>\n <div\n data-ref="emptyDataStateButtons"\n class="${u2}__buttons${n?.length>0?` ${u2}__buttons--has-buttons`:""}"\n >${!o&&n?.length>0?n.map(t=>`<button class="ht-button ht-button--${t.type}">${K(t.text)}</button>`).join(""):""}</div>`)(i,e)}`;e?(ue(n,`${u2}--loading`),pe(o,[["aria-busy","true"]])):(ge(n,`${u2}--loading`),fe(o,"aria-busy")),d2(this,m2,{...h2(this,m2),...s.refs}),o.innerHTML="",o.appendChild(s.fragment),!e&&i.buttons?.length>0&&Array.from(h2(this,m2).emptyDataStateButtons.children).forEach((t,e)=>{t.addEventListener("click",i.buttons[e].callback)})}updateClassNames(t){const{emptyDataStateElement:e}=h2(this,m2);t.countRenderableColumns()>0&&t.getColumnHeadersCount()>0?ue(e,`${u2}--disable-top-border`):ge(e,`${u2}--disable-top-border`),t.countRenderableRows()>0&&t.getRowHeadersCount()>0?ue(e,`${u2}--disable-inline-border`):ge(e,`${u2}--disable-inline-border`),t.hasHorizontalScroll()&&!t.isHorizontallyScrollableByWindow()?ue(e,`${u2}--disable-bottom-border`):ge(e,`${u2}--disable-bottom-border`)}updateSize(t,e=!1){const{emptyDataStateElement:n}=h2(this,m2),o=t.hasHorizontalScroll()?Ve(t.hot.rootDocument):0,i=t.countRenderableRows(),s=t.countRenderableColumns(),r=t.getColumnHeadersCount(),a=i>0||!0===e&&s>0;n.style.top=s>0?`${t.getColumnHeaderHeight()}px`:"0px",n.style.insetInlineStart="0px";const l={element:h2(this,w2)};!function(t,e,n,o,i){if(0!==n)return i.element?.remove(),void(i.element=null);i.element||(i.element=t.createElement("div"),i.element.classList.add(`${o}-placeholder`),e._wt.wtTable.holder.appendChild(i.element)),i.element.style.width="100%",i.element.style.height="150px"}(h2(this,f2),t,i,u2,l),d2(this,w2,l.element);const h=function(t,e,n){let o=t.getWorkspaceWidth();return t.isHorizontallyScrollableByWindow()?e>0?o=t.getTotalTableWidth():n&&(o=t.getViewportWidth()):t.getTableWidth()-t.getRowHeaderWidth()<t.getViewportWidth()&&e>0&&(o=t.getTableWidth()),o}(t,s,a),c=function(t,e,n,o){let i=t.getTableHeight();return t.isVerticallyScrollableByWindow()||t.hasVerticalScroll()?i=e>0?t.hot.getTableHeight()-t.getColumnHeaderHeight():t.hot.getTableHeight():n>0&&e>0?i=t.getViewportHeight()-o:n>0&&0===e&&(i=t.getWorkspaceHeight()-o),i}(t,s,r,o);n.style.width=`${h}px`,n.style.height=`${c}px`}destroy(){h2(this,m2)?.emptyDataStateElement?.remove(),h2(this,w2)?.remove(),d2(this,w2,null),d2(this,m2,null)}constructor({rootElement:t,rootDocument:e}){c2(this,p2,{writable:!0,value:void 0}),c2(this,f2,{writable:!0,value:void 0}),c2(this,m2,{writable:!0,value:void 0}),c2(this,w2,{writable:!0,value:void 0}),d2(this,p2,t),d2(this,f2,e),this.install()}}function v2(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C2(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function y2(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,C2(t,e,"get"))}function S2(t,e,n){v2(t,e),e.set(t,n)}function k2(t,e,n){return function(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}(t,C2(t,e,"set"),n),n}function R2(t,e,n){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return n}function x2(t,e){v2(t,e),e.add(t)}const E2="emptyDataState",M2=Object.freeze({UNKNOWN:"unknown",FILTERS:"filters",LOADING:"loading"}),T2=`plugin:${E2}`;var _2=new WeakMap,H2=new WeakMap,I2=new WeakMap,A2=new WeakMap,O2=new WeakMap,D2=new WeakMap,N2=new WeakSet,P2=new WeakSet,W2=new WeakSet,L2=new WeakSet,B2=new WeakSet,V2=new WeakSet,F2=new WeakSet,z2=new WeakSet,$2=new WeakSet,U2=new WeakSet,j2=new WeakSet,Y2=new WeakSet,G2=new WeakSet,q2=new WeakSet,K2=new WeakSet,X2=new WeakSet;class Z2 extends Qk{static get PLUGIN_KEY(){return E2}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===t?.title||"string"==typeof t?.title)&&(void 0===t?.description||"string"==typeof t?.description)&&(void 0===t?.buttons||Array.isArray(t?.buttons)&&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()[E2]}enablePlugin(){this.enabled||(y2(this,H2)||(k2(this,H2,new b2({rootElement:this.hot.rootGridElement,rootDocument:this.hot.rootDocument})),R2(this,V2,o3).call(this),R2(this,N2,Q2).call(this),R2(this,P2,J2).call(this)),this.addHook("afterInit",()=>R2(this,q2,d3).call(this)),this.addHook("afterRender",()=>R2(this,K2,u3).call(this)),this.addHook("afterRowSequenceCacheUpdate",()=>{R2(this,$2,r3).call(this)}),this.addHook("afterColumnSequenceCacheUpdate",()=>{R2(this,$2,r3).call(this)}),this.addHook("beforeFilter",t=>R2(this,X2,g3).call(this,t)),this.addHook("beforeDataProviderFetch",t=>{t.skipLoading||R2(this,W2,t3).call(this)}),this.addHook("afterDataProviderFetch",()=>R2(this,L2,e3).call(this)),this.addHook("afterDataProviderFetchError",()=>R2(this,L2,e3).call(this)),super.enablePlugin(),R2(this,$2,r3).call(this))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),R2(this,j2,l3).call(this),this.isVisible()&&y2(this,H2).show(),super.updatePlugin()}disablePlugin(){k2(this,D2,!1),R2(this,F2,i3).call(this),R2(this,B2,n3).call(this),y2(this,H2).destroy(),k2(this,H2,null),super.disablePlugin()}isVisible(){return y2(this,_2)}destroy(){k2(this,D2,!1),k2(this,_2,!1),y2(this,H2)?.destroy(),k2(this,H2,null),k2(this,I2,null),k2(this,A2,!1),k2(this,O2,null),super.destroy()}constructor(...t){super(...t),x2(this,N2),x2(this,P2),x2(this,W2),x2(this,L2),x2(this,B2),x2(this,V2),x2(this,F2),x2(this,z2),x2(this,$2),x2(this,U2),x2(this,j2),x2(this,Y2),x2(this,G2),x2(this,q2),x2(this,K2),x2(this,X2),S2(this,_2,{writable:!0,value:void 0}),S2(this,H2,{writable:!0,value:void 0}),S2(this,I2,{writable:!0,value:void 0}),S2(this,A2,{writable:!0,value:void 0}),S2(this,O2,{writable:!0,value:void 0}),S2(this,D2,{writable:!0,value:void 0}),k2(this,_2,!1),k2(this,H2,null),k2(this,I2,null),k2(this,A2,!1),k2(this,O2,null),k2(this,D2,!1)}}function Q2(){this.eventManager.addEventListener(y2(this,H2).getElement(),"wheel",t=>R2(this,G2,c3).call(this,t))}function J2(){k2(this,I2,new MutationObserver(()=>{if(!this.hot)return;const t=y2(this,H2).getElement();this.hot.rootGridElement.nextElementSibling!==t&&this.hot.rootGridElement.after(t)})),y2(this,I2).observe(this.hot.rootWrapperElement,{childList:!0})}function t3(){y2(this,D2)||(k2(this,D2,!0),R2(this,$2,r3).call(this))}function e3(){y2(this,D2)&&(k2(this,D2,!1),R2(this,Y2,h3).call(this),R2(this,$2,r3).call(this),this.hot.render())}function n3(){y2(this,I2).disconnect(),k2(this,I2,null)}function o3(){this.hot.getFocusScopeManager().registerScope(E2,y2(this,H2).getElement(),{shortcutsContextName:T2,runOnlyIf:()=>this.isVisible(),onActivate:t=>{const e=y2(this,H2)?.getFocusableElements();e.length>0&&("tab_from_above"===t?e.at(0).focus():"tab_from_below"===t&&e.at(-1).focus())}})}function i3(){this.hot.getFocusScopeManager().unregisterScope(E2)}function s3(t){let e;return e="function"==typeof this.getSetting("message")?this.getSetting("message")(t):this.getSetting("message"),"string"==typeof e&&(e={title:e}),e?.title||e?.description||e?.buttons||(e={},t===M2.FILTERS?(e.title=this.hot.getTranslatedPhrase(Rd),e.description=this.hot.getTranslatedPhrase(xd),e.buttons=[{text:this.hot.getTranslatedPhrase(Ed),type:"secondary",callback:()=>{const t=this.hot.getPlugin("filters");t&&(t.clearConditions(),t.filter())}}]):t===M2.LOADING?(e.title=this.hot.getTranslatedPhrase(Md),e.description=this.hot.getTranslatedPhrase(Td)):(e.title=this.hot.getTranslatedPhrase(Sd),e.description=this.hot.getTranslatedPhrase(kd))),e}function r3(){this.hot.view&&(y2(this,D2)?y2(this,_2)?R2(this,j2,l3).call(this):R2(this,U2,a3).call(this):0===this.hot.view.countRenderableColumns()||0===this.hot.view.countRenderableRows()?R2(this,U2,a3).call(this):R2(this,Y2,h3).call(this))}function a3(){y2(this,_2)||(this.hot.runHooks("beforeEmptyDataStateShow"),R2(this,j2,l3).call(this),y2(this,H2).show(),k2(this,_2,!0),k2(this,O2,this.hot.selection.exportSelection()),this.hot.getFocusScopeManager().activateScope(E2),this.hot.runHooks("afterEmptyDataStateShow"))}function l3(){y2(this,D2)?y2(this,H2).updateContent(R2(this,z2,s3).call(this,M2.LOADING),!0):y2(this,A2)?y2(this,H2).updateContent(R2(this,z2,s3).call(this,M2.FILTERS),!1):y2(this,H2).updateContent(R2(this,z2,s3).call(this,M2.UNKNOWN),!1)}function h3(){y2(this,_2)&&(this.hot.runHooks("beforeEmptyDataStateHide"),y2(this,H2).hide(),k2(this,_2,!1),this.hot.getFocusScopeManager().deactivateScope(E2),y2(this,O2)?.ranges.length>0?(this.hot.selection.importSelection(y2(this,O2)),this.hot.view.render(),k2(this,O2,null)):this.hot.selectCell(0,0,void 0,void 0,!1),this.hot.runHooks("afterEmptyDataStateHide"))}function c3(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 d3(){R2(this,$2,r3).call(this),this.hot.render()}function u3(){y2(this,H2)?.getElement()&&this.isVisible()&&this.hot.view&&(y2(this,H2).updateSize(this.hot.view,y2(this,D2)),y2(this,H2).updateClassNames(this.hot.view))}function g3(t){k2(this,A2,t?.length>0),this.isVisible()&&R2(this,j2,l3).call(this)}Vn(zp),Vn(Nb),Vn(Wb),Vn(Sv),Vn(Rv),Vn(xb),Vn(Iv),Vn(Av),Vn(Ov),Vn(Dv),Vn(Wv),Vn(iw),Vn(Lv),Vn(gy),Oo(Hy),Oo(Xm),Oo(Vy),Oo(Iy),Oo(zy),Oo(_y),Oo(jy),Oo(Gy),Oo(US),Oo(jS),Oo(YS),Oo(sw),Oo(qS),Bo(KS),Bo(QS),Bo(ZS),Bo(JS),Bo(tk),Bo(ek),Bo(ok),Bo(sk),fg(lk),fg(hk),fg(uk),fg(gk),fg(pk),fg(fk),fg(mk),fg(Ak),fg(Ok),fg(Dk),fg(Nk),fg(rw),fg(Pk),Eo(kR),Eo(UR),Eo(vx),Eo(Wx),Eo(eE),Eo(YE),Eo(lM),Eo(VT),Eo(L_),Eo(FH),Eo(wI),Eo(TA),Eo(XA),Eo(wO),Eo(lN),Eo(_L),Eo(fV),Eo(oF),Eo(RF),Eo(FF),Eo(kz),Eo(g$),Eo(Z$),Eo(WU),Eo(uY),Eo(zY),Eo($Y),Eo(Hq),Eo(VK),Eo(hZ),Eo(NZ),Eo(SQ),Eo(HQ),Eo(WQ),Eo(nJ),Eo(UJ),Eo(o0),Eo(R1),Eo(Z2);const p3={hleft:"htLeft",hcenter:"htCenter",hright:"htRight",hjustify:"htJustify",vtop:"htTop",vmiddle:"htMiddle",vbottom:"htBottom"};const f3=p(function({rows:e,cols:n,freeze:o,styles:i,autofilter:s,firstRowAsHeaders:r}){const a=[],l=[],h=[],c=!r||[];for(const[t,n]of Object.entries(e)){let e=+t;if(r){if(0===e){c.push(...Object.entries(n.cells).map(([,t])=>t.text));continue}e-=1}const o=[];a[e]=o;for(const[t,s]of Object.entries(n.cells)){const n=+t;o[n]=s.text;const r="number"==typeof s.style?i?.[s.style]:void 0;if(r){const t=l[e]??[];l[e]=t,t[n]=r,h.push({row:e,col:n,renderer:"customStylesRenderer",className:v(p3[`h${r.align}`],p3[`v${r.valign}`])})}}}const d=[];for(const[t,e]of Object.entries(n||{}))"number"==typeof e.width&&(d[+t]=e.width);const u=b.decode_cell(o||""),g=b.decode_range(s?.ref||"");return r&&-1!==u.r&&(u.r-=1),Oo("customStylesRenderer",(t,e,n,o,i,s,r)=>{sw(0,e,0,0,0,s,r);const{style:a}=r;a?.font?.bold&&(e.style.fontWeight="bold"),a?.color&&(e.style.color=a.color),a?.bgcolor&&(e.style.background=a.bgcolor)}),t(kb,{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:(t,e)=>{const n={style:{}};return l?.[t]?.[e]&&(n.style=l[t][e]),n},colWidths:d.length?d:void 0})});export{f3 as default};
|