@juki-team/base-ui 1.5.2 → 1.5.4
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-1RdVdC78.js +1 -0
- package/dist/esm/BarChart-4YVL8qrU.js +1 -0
- package/dist/esm/CartesianChart-CaeqB_2y.js +47 -0
- package/dist/esm/{ChangePasswordModal-B1Ahfv-S.js → ChangePasswordModal-OWm3MyKW.js} +1 -1
- package/dist/esm/{CodeEditor-Co_-jMMN.js → CodeEditor-B6RhGNP7.js} +1 -1
- package/dist/esm/CodeViewer-CZwCWtf1.js +1 -0
- package/dist/esm/{Collapse-B_Oe1-5C.js → Collapse-C6FDlfoR.js} +1 -1
- package/dist/esm/DataGrid-bZJxnNpn.js +127 -0
- package/dist/esm/DataViewer-CU0QwQQa.js +1 -0
- package/dist/esm/{DrawerView-BoMapmAb.js → DrawerView-O8ivFKAG.js} +1 -1
- package/dist/esm/{ExcalidrawButton-DRR-2JvH.js → ExcalidrawButton-Dx-6TOuw.js} +1 -1
- package/dist/esm/{GraphvizViewer-DEJDUNWF.js → GraphvizViewer-AxmRC6e5.js} +1 -1
- package/dist/esm/ImageLoaderCropper-B5z4gQda.js +1 -0
- package/dist/esm/InputCellPhoneNumber-12U8BtmT.js +1 -0
- package/dist/esm/{InputColor-BhVac99k.js → InputColor-Cpd36Uei.js} +2 -2
- package/dist/esm/LineChart-Cp3YgIYB.js +1 -0
- package/dist/esm/{LoaderLayer-D9O7WqFD.js → LoaderLayer-Cv80UCdL.js} +1 -1
- package/dist/esm/{MdMath-BtS290JE.js → MdMath-CVxzEaJK.js} +1 -1
- package/dist/esm/MdMathEditor-himmiyoG.js +29 -0
- package/dist/esm/Popover-CEc-CYlJ.js +6 -0
- package/dist/esm/ReplyIcon-BlBLARCH.js +1 -0
- package/dist/esm/{SettingsIcon-Dk27Vz1G.js → SettingsIcon-C3sN1TNw.js} +1 -1
- package/dist/esm/SlideDeck-I221o0di.js +1 -0
- package/dist/esm/{TableEyeIcon-D74isCSR.js → TableEyeIcon-BFfTLgKU.js} +1 -1
- package/dist/esm/TableOfContents-DqdT3oFH.js +1 -0
- package/dist/esm/Tooltip-DCefNWu7.js +1 -0
- package/dist/esm/UserCodeEditor-D4O5es0E.js +61 -0
- package/dist/esm/{VirtualizedRowsFixed-BAjhFO3R.js → VirtualizedRowsFixed-D9Yuhs6Z.js} +1 -1
- package/dist/esm/WorksheetAsSlides-DJJreHkG.js +1 -0
- package/dist/esm/{WorksheetBodies-2hrTre13.js → WorksheetBodies-VeYRksK3.js} +1 -1
- package/dist/esm/{WorksheetContents-CdM17xrm.js → WorksheetContents-CmB2azPo.js} +1 -1
- package/dist/esm/WorksheetEditor-CwF_HNWx.js +1 -0
- package/dist/esm/WorksheetNode-BTVi2Iol.js +1 -0
- package/dist/esm/WorksheetViewer-8nk0Y7Pu.js +1 -0
- package/dist/esm/abnfDiagram-WEYOIA3C-DEKNEQ23.js +1 -0
- package/dist/esm/arc-BXMOYbEk.js +1 -0
- package/dist/esm/architectureDiagram-ZHVYKT53-D8Cc0szw.js +1 -0
- package/dist/esm/basic-setup-DnHlH_GN.js +1 -0
- package/dist/esm/blockDiagram-RJAE7QA3-CVAxF28b.js +1 -0
- package/dist/esm/c4Diagram-XDPPPE54-DfOddOsg.js +1 -0
- package/dist/esm/channel-DaoqdAiW.js +1 -0
- package/dist/esm/chunk-2E7WHVMD-DzrxCta9.js +1 -0
- package/dist/esm/{chunk-QZHKN3VN-Cq1a-aN-.js → chunk-2Q5K7J3B-BAvN2osA.js} +1 -1
- package/dist/esm/chunk-4EMNKR2T-WzMQveGn.js +1 -0
- package/dist/esm/{chunk-YZCP3GAM-BDqtM1Ka.js → chunk-55XCU76K-Co_JK6zS.js} +1 -1
- package/dist/esm/{chunk-FMBD7UC4-DVZBlcm4.js → chunk-5VM5RSS4-2Alz3VU-.js} +1 -1
- package/dist/esm/{chunk-4BX2VUAB-7TA7AVyu.js → chunk-JWPE2WC7-BM31szoD.js} +1 -1
- package/dist/esm/chunk-NQOKRVIF-BvuLXPDI.js +1 -0
- package/dist/esm/chunk-VQ5W62QI-BM9st1eu.js +1 -0
- package/dist/esm/{chunk-55IACEB6-BpHVIT0b.js → chunk-XXDRQBXY-B7eZEtxE.js} +1 -1
- package/dist/esm/chunk-ZCHMQSOR-BfEzwJnw.js +1 -0
- package/dist/esm/classDiagram-v2-4MYWR3UA-BBYOuONr.js +1 -0
- package/dist/esm/commons-BHuDJzTw.js +1 -0
- package/dist/esm/constants.js +1 -1
- package/dist/esm/cose-bilkent-JH36ORCC-BBL1Y3YR.js +1 -0
- package/dist/esm/cynefin-EF2NZ3EQ-CaJSaYBh.js +1 -0
- package/dist/esm/cynefinDiagram-WF24UDRP-B6GLAQp-.js +1 -0
- package/dist/esm/cytoscape.esm-Bt9_GGFq.js +9 -0
- package/dist/esm/dagre-NK4GIZVX-B5sHdjHr.js +1 -0
- package/dist/esm/diagram-CBK3MWTC-Dcv51W2u.js +1 -0
- package/dist/esm/diagram-I5XIIV2D-BqonTetl.js +1 -0
- package/dist/esm/diagram-ODIL2UCW-CriVrDQT.js +1 -0
- package/dist/esm/diagram-PFBEJUXE-B03iAEwx.js +1 -0
- package/dist/esm/diagram-RJA3I4VV-Dj3xghQ1.js +1 -0
- package/dist/esm/diagram-TYUNFSNR-CcvVCW9_.js +1 -0
- package/dist/esm/ebnfDiagram-V4P3TTPT-BXu5Kifr.js +1 -0
- package/dist/esm/elk-QONTBCTQ-Jkx0FK2o.js +1 -0
- package/dist/esm/erDiagram-KYQIGQAA-BF9vCEaf.js +1 -0
- package/dist/esm/floating-ui.core-DzsaFWsC.js +1 -0
- package/dist/esm/floating-ui.dom-DGDCR4EF.js +1 -0
- package/dist/esm/flowDiagram-IUGLLWBU-DDMbhdom.js +1 -0
- package/dist/esm/ganttDiagram-R7GPNTJY-CQC15o39.js +1 -0
- package/dist/esm/gitGraphDiagram-PDYL7XHY-D_f2t3KD.js +1 -0
- package/dist/esm/graph-rGqC_56m.js +1 -0
- package/dist/esm/helpers.js +1 -1
- package/dist/esm/{index-A0sdG_JC.js → index-2Mitl1QB.js} +1 -1
- package/dist/esm/{index-Bw2EofiE.js → index-8mEJamTc.js} +1 -1
- package/dist/esm/{index-D_AOS7Yx.js → index-BMPFttUB.js} +1 -1
- package/dist/esm/{index-CtTbnbzM.js → index-C4KISU3M.js} +1 -1
- package/dist/esm/{index-Y09lLL_e.js → index-C9ua7WYO.js} +1 -1
- package/dist/esm/{index-CQbc3KUq.js → index-CAH_9Jug.js} +1 -1
- package/dist/esm/{index-D8zPYs0m.js → index-CGmB9AM1.js} +1 -1
- package/dist/esm/index-CKBtKrj5.js +1 -0
- package/dist/esm/{index-BR16hIbn.js → index-CRj4pqRR.js} +1 -1
- package/dist/esm/{index-CB1_GL3t.js → index-CWL6W5WQ.js} +1 -1
- package/dist/esm/{index-CpRfyO85.js → index-C_HL-Da-.js} +1 -1
- package/dist/esm/{index-Ccq-5wm6.js → index-ChphKFtR.js} +1 -1
- package/dist/esm/{index-C9_5xd3V.js → index-CkaLE__v.js} +1 -1
- package/dist/esm/{index-Ck9BxS1f.js → index-CoVpfkO8.js} +1 -1
- package/dist/esm/index-Cso1rXtQ.js +1 -0
- package/dist/esm/{index-D5NvcxPc.js → index-D5FWzr0h.js} +1 -1
- package/dist/esm/{index-CRfRlH9U.js → index-D5WiSbCh.js} +1 -1
- package/dist/esm/{index-GoUUn3QE.js → index-D5tgPh4d.js} +1 -1
- package/dist/esm/{index-DmCvSgoi.js → index-DH4SMqQP.js} +1 -1
- package/dist/esm/{index-xaEdDd13.js → index-DM4Zc3sU.js} +1 -1
- package/dist/esm/{index-DSGuayJy.js → index-DPe-z7ci.js} +1 -1
- package/dist/esm/{index-BzjjAmh3.js → index-DRSSYmEF.js} +1 -1
- package/dist/esm/{index--PWk-3Ol.js → index-Dx6l5ueb.js} +1 -1
- package/dist/esm/{index-DVFv6Eth.js → index-Dz8ISdDG.js} +1 -1
- package/dist/esm/{index-CtWPxOcn.js → index-ID6vqTYe.js} +1 -1
- package/dist/esm/{index-Cj5SSv5l.js → index-JPCp_Z3V.js} +1 -1
- package/dist/esm/{index-D2mDsVm5.js → index-V9oZCW09.js} +1 -1
- package/dist/esm/{index-CODLgwqm.js → index-_kF3_0-k.js} +1 -1
- package/dist/esm/{index-B3fb7Ita.js → index-bPHO9OeP.js} +1 -1
- package/dist/esm/{index-QhLowdpF.js → index-myBmcWfr.js} +1 -1
- package/dist/esm/{index-DAJdettS.js → index-nUMXMsLO.js} +1 -1
- package/dist/esm/infoDiagram-MVDRKAX5-04QJzIoW.js +1 -0
- package/dist/esm/isSymbol-D2gNAbOe.js +1 -0
- package/dist/esm/isUndefined--MLpwE__.js +1 -0
- package/dist/esm/ishikawaDiagram-HPEHV2GE-4pDsX60A.js +1 -0
- package/dist/esm/journeyDiagram-BOSHW7O7-BJFwx5Hu.js +1 -0
- package/dist/esm/kanban-definition-FNSA4HC5-MrsniETV.js +1 -0
- package/dist/esm/katex-ukrPy3Hx.js +1 -0
- package/dist/esm/{linear-BnXjbO66.js → linear-CIPQsvV7.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-CIDWRbhc.js +1 -0
- package/dist/esm/mermaid.core-DBVKQvxW.js +5 -0
- package/dist/esm/mindmap-definition-6OY57UG3-DnT4Ihuj.js +1 -0
- package/dist/esm/nsis-BFvJq6Vq.js +1 -0
- package/dist/esm/pegDiagram-ECIUJNBX-C3s5Vuxq.js +1 -0
- package/dist/esm/pieDiagram-GNMPY74T-CTjQZ9yP.js +1 -0
- package/dist/esm/quadrantDiagram-D57K4MC3-JTRqBH1z.js +1 -0
- package/dist/esm/railroadDiagram-Y72NRBL7-DtAwxQ6F.js +1 -0
- package/dist/esm/requirementDiagram-EQYSW5RA-CR7SUMC-.js +1 -0
- package/dist/esm/ruby-D9chwFAN.js +1 -0
- package/dist/esm/sankeyDiagram-SY24JHO5-DbxpJ7pE.js +1 -0
- package/dist/esm/sequenceDiagram-BLEHNHQU-CvZHKbjd.js +1 -0
- package/dist/esm/server.js +1 -1
- package/dist/esm/{settings-BIQ7IqJl.js → settings-BONQQsPx.js} +1 -1
- package/dist/esm/settings.js +1 -1
- package/dist/esm/sizeCapture-INFHLROL-f_GRBQe5.js +1 -0
- package/dist/esm/stateDiagram-v2-A6IESKWZ-DxF8GOQW.js +1 -0
- package/dist/esm/string-DPJhNSkw.js +1 -0
- package/dist/esm/swimlanes-B3ENRKFQ-YbCv2QO2.js +1 -0
- package/dist/esm/swimlanesDiagram-AYQRV4AK-CuclTt9Y.js +1 -0
- package/dist/esm/throttle-tEKq3i9o.js +1 -0
- package/dist/esm/{time-PiK_t_Re.js → time-DP3lbwAd.js} +1 -1
- package/dist/esm/timeline-definition-JXYKGLGB-C1x6bOWf.js +1 -0
- package/dist/esm/toNumber-B6ypue5Z.js +1 -0
- package/dist/esm/types-C3mmJ376.js +1 -0
- package/dist/esm/usecaseDiagram-WPOLBNNX-QdEejhhn.js +1 -0
- package/dist/esm/vennDiagram-Q3Y3IDCW-B0EVPCrz.js +1 -0
- package/dist/esm/viz-BmmZnl4P.js +9 -0
- package/dist/esm/wardleyDiagram-IVAIDKWA-Dlo4JFKg.js +1 -0
- package/dist/esm/{websocket-C4PinjUD.js → websocket-B2hJys_Q.js} +1 -1
- package/dist/esm/{xlsx-XBWnafwQ.js → xlsx-BVrgZ1Ou.js} +2 -2
- package/dist/esm/xychartDiagram-4URNHDU4-CU8TcG1V.js +1 -0
- package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3/node_modules/@milkdown/kit/lib/exception.d.ts +1 -0
- package/dist/module-types/node_modules/.pnpm/@milkdown+kit@7.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3/node_modules/@milkdown/kit/lib/plugin/streaming.d.ts +1 -0
- package/dist/module-types/src/components/atoms/Client/Client.d.ts +1 -1
- package/dist/module-types/src/components/atoms/CopyToClipboard/CopyToClipboard.d.ts +1 -1
- package/dist/module-types/src/components/atoms/DateLiteral/DateLiteral.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputCheckbox/InputCheckbox.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputPassword/InputPassword.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputRadio/InputRadio.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputSelect/InputSelect.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputTextArea/InputTextArea.d.ts +1 -1
- package/dist/module-types/src/components/atoms/InputToggle/InputToggle.d.ts +1 -1
- package/dist/module-types/src/components/atoms/Modal/Modal.d.ts +1 -1
- package/dist/module-types/src/components/atoms/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/module-types/src/components/atoms/Select/Select.d.ts +1 -1
- package/dist/module-types/src/components/atoms/T/T.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Collapse/Collapse.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Collapse/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/InputCellPhoneNumber/InputCellPhoneNumber.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/InputCellPhoneNumber/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Popover/Popover.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Popover/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Tooltip/Tooltip.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/Tooltip/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/VirtualizedRowsFixed/VirtualizedRowsFixed.d.ts +1 -1
- package/dist/module-types/src/components/atoms/_lazy_/VirtualizedRowsFixed/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/SpinIcon/Spin.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/SpinIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AcUnitIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AccountCircleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AcuteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddColumnLeftIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddColumnRightIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddPhotoAlternateIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddReactionIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddRowAboveIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AddRowBelowIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AdminPanelSettingsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AlarmIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AppsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowBackIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowDownwardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowDropDownIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowDropUpIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowForwardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowLeftIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowRightIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArrowUpwardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ArticleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AssignmentIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AttachFileIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AttachmentIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/AutorenewIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/BadgeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/BoltIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/BubbleChartIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/BuildIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CalendarMonthIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CalendarTodayIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CalendarViewWeekIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CheckIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ChecklistIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CloseIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CloudDownloadIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CloudUploadIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CodeBlocksIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CodeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/CommentIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ContactPhoneIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ContactsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ContentCopyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DarkModeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DashboardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DeleteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DemographyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DescriptionIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DesignServicesIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DoneAllIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DownloadIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DraftIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/DragIndicatorIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/EditIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/EditNoteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ErrorIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/EventIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/EventListIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ExclamationIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ExpandLessIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ExpandMoreIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ExtensionIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FileCopyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FileOpenIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FilterListIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FitnessCenterIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FolderIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FolderManagedIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FolderOpenIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatBoldIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH1Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH2Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH3Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH4Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH5Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatH6Icon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatInkHighlighterIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatItalicIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatListBulletedIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatListNumberedIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatQuoteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FormatStrikethroughIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ForwardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FullscreenExitIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/FullscreenIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/GlobeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/GroupAddIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/GroupIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/GroupsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/HardDriveIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/HelpIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/HistoryIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/HomeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/HomeStorageIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/InfoIIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/InkEraserIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/InvertColorsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LanguageIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LeaderboardIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LibraryBooksIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LightModeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LinkIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LinkOffIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ListIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LoadingIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LocationCityIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LocationOnIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LockClockIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LockIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LockPersonIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LoginIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/LogoutIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/MailIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ManageAccountsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ManageSearchIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ManufacturingIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/MenuBookIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/MenuIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/MoreTimeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/MoreVertIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NavigateBeforeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NavigateNextIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NewReleasesIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NoteAddIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NoteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/NotificationsActiveIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/OpenInNewIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PageInfoIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PaletteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PanToolIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PauseCircleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PendingActionsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PendingIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PersonIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PhotoLibraryIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PictureAsPdfIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PlayArrowIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PlayCircleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PostAddIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PreviewIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PriorityHighIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PublicIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/PublishIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/RedoIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/RefreshIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ReplyAllIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ReplyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SaveIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ScheduleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SchoolIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SearchIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SendIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SettingsAlertIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SettingsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SettingsSuggestIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ShareIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SideNavigationIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SmartToyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SpeedIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StepIntoIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StepOutIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StopCircleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StorageIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StylusLaserPointerIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/StylusNoteIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SupportAgentIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/SyncIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TableEyeIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TableIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TaskIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TimerIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TrendingUpIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/TrophyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/UndoIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/UpdateIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/VerticalSplitIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ViewCozyIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ViewHeadlineIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/ViewModuleIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/VisibilityIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/VisibilityOffIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/VoidIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/WarningIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/google/WidgetsIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/ArrowIcon_/Arrow.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/ArrowIcon_/NarrowArrow.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/ArrowIcon_/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/CheckIcon_/Check.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/CheckIcon_/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/CloseIcon_/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/DoubleUpIcon/DoubleUp.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/DoubleUpIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/ExclamationIcon_/Exclamation.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/ExclamationIcon_/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/MinusIcon/Minus.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/MinusIcon/NarrowMinus.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/MinusIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/PlusIcon/NarrowPlus.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/PlusIcon/Plus.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/PlusIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/UpIcon/Up.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/signs/UpIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/BalloonIcon/Balloon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/BalloonIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/FacebookIcon/Facebook.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/FacebookIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/GmailIcon/Gmail.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/GmailIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/SortIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/TelegramIcon/Telegram.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/specials/TelegramIcon/index.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/CircleFilledFrame.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/CircleFrame.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/CirclePath.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/Segment.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/SquareFilledFrame.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/SquareFrame.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/renderBasicIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/icons/utils/renderSignIcon.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/loaders/LoaderLayer.d.ts +1 -1
- package/dist/module-types/src/components/atoms/server/loaders/line-loader/LineLoader.d.ts +1 -1
- package/dist/module-types/src/components/mockup/MockupJukiProvider.d.ts +1 -1
- package/dist/module-types/src/components/mockup/MockupLoginButton.d.ts +1 -1
- package/dist/module-types/src/components/mockup/MockupToggleThemeButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/module-types/src/components/molecules/ButtonAction/ButtonAction.d.ts +1 -1
- package/dist/module-types/src/components/molecules/ButtonLoader/ButtonLoader.d.ts +1 -1
- package/dist/module-types/src/components/molecules/CheckboxList/CheckboxList.d.ts +1 -1
- package/dist/module-types/src/components/molecules/CircularProgress/CircularProgress.d.ts +1 -1
- package/dist/module-types/src/components/molecules/DayPicker/DayPicker.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Drawer/Drawer.d.ts +1 -1
- package/dist/module-types/src/components/molecules/FetcherLayer/FetcherLayer.d.ts +1 -1
- package/dist/module-types/src/components/molecules/FloatToolbar/FloatToolbar.d.ts +1 -1
- package/dist/module-types/src/components/molecules/HomeLink/HomeLink.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InformationPopover/FrozenInformation.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InformationPopover/InformationPopover.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InformationPopover/NewlineInfo.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InformationPopover/QuietInformation.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InformationPopover/UpsolvingInformation.d.ts +1 -1
- package/dist/module-types/src/components/molecules/InputDate/InputDate.d.ts +1 -1
- package/dist/module-types/src/components/molecules/LinkLastPath/LinkLastPath.d.ts +1 -1
- package/dist/module-types/src/components/molecules/MonthPicker/MonthPicker.d.ts +1 -1
- package/dist/module-types/src/components/molecules/MultiSelectSearchable/MultiSelectSearchable.d.ts +1 -1
- package/dist/module-types/src/components/molecules/NextButton/NextButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Pagination/Pagination.d.ts +1 -1
- package/dist/module-types/src/components/molecules/PreviousButton/PreviousButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/ProgressMultiBar/ProgressMultiBar.d.ts +1 -1
- package/dist/module-types/src/components/molecules/ProgressSlide/ProgressSlide.d.ts +1 -1
- package/dist/module-types/src/components/molecules/SplitModal/SplitModal.d.ts +1 -1
- package/dist/module-types/src/components/molecules/SplitPane/SplitPane.d.ts +1 -1
- package/dist/module-types/src/components/molecules/SubmissionRejudgeButton/SubmissionRejudgeButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Tabs/Tabs.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Tabs/mocks/JudgeTabs.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInline.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInline.deprecated.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButton.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInline/TabsInlineButtonLoader.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInlineBody/TabsInlineBody.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TabsInlineBody/TabsInlineBody.deprecated.d.ts +1 -1
- package/dist/module-types/src/components/molecules/ThemeColorPalette/ThemeColorPalette.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TimePicker/TimePicker.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Timer/Timer.d.ts +1 -1
- package/dist/module-types/src/components/molecules/Timer/TimerDisplay.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TimerLabeled/TimerLabeled.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TwoActionModal/TwoActionModal.d.ts +1 -1
- package/dist/module-types/src/components/molecules/TwoContentSection/TwoContentSection.d.ts +1 -1
- package/dist/module-types/src/components/molecules/YearPicker/YearPicker.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/BarChart/BarChart.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/BarChart/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/CodeEditor.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/CodeEditor/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/CodeViewer/CodeViewer.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/CodeViewer/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/DataGrid/DataGrid.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/DataGrid/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/DrawerView/DrawerView.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/DrawerView/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/ImageLoaderCropper/ImageLoaderCropper.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/ImageLoaderCropper/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/InputColor/InputColor.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/InputColor/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/LineChart/LineChart.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/LineChart/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/SlideDeck/SlideDeck.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/SlideDeck/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/SortableItems/SortableItems.d.ts +1 -1
- package/dist/module-types/src/components/molecules/_lazy_/SortableItems/index.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/ApplicationLoaderLayout.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/JukiLoadingLayout.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/PawsLoadingLayout.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/TwoContentCardsLayout.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/TwoContentLayout.d.ts +1 -1
- package/dist/module-types/src/components/molecules/layouts/UserLoaderLayout.d.ts +1 -1
- package/dist/module-types/src/components/organisms/AiChatPanel/AiChatPanel.d.ts +1 -1
- package/dist/module-types/src/components/organisms/CardNotification/CardNotification.d.ts +1 -1
- package/dist/module-types/src/components/organisms/CardNotification/constants.d.ts +4 -4
- package/dist/module-types/src/components/organisms/CheckUnsavedChanges/CheckUnsavedChanges.d.ts +1 -1
- package/dist/module-types/src/components/organisms/Field/Field.d.ts +1 -1
- package/dist/module-types/src/components/organisms/FieldDate/FieldDate.d.ts +1 -1
- package/dist/module-types/src/components/organisms/FieldText/FieldText.d.ts +1 -1
- package/dist/module-types/src/components/organisms/GraphvizEditor/GraphvizEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/GraphvizEditorModal/GraphvizEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/GraphvizViewers/GraphvizViewers.d.ts +1 -1
- package/dist/module-types/src/components/organisms/HorizontalMenu/HorizontalMenu.d.ts +1 -1
- package/dist/module-types/src/components/organisms/ImageUploaderButton/ImageUploaderButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/LoginUser/LoginUser.d.ts +1 -1
- package/dist/module-types/src/components/organisms/MdMathViewer/MdFloatToolbar/MdFloatToolbar.d.ts +1 -1
- package/dist/module-types/src/components/organisms/MdMathViewer/MdMathViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/MdMathViewer/MemoMdMath.deprecated.d.ts +1 -1
- package/dist/module-types/src/components/organisms/MdMathViewer/MemoMdMathViewer.deprecated.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PageNotFound/PageNotFound.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PagedDataViewer/PagedDataViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PresentationToolButtons/PresentationToolButtons.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PresentationToolButtons/buttons/FullscreenTimerButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PresentationToolButtons/buttons/FullscreenToggleButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/PresentationToolButtons/buttons/PointerButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/ProblemSelector/ProblemSelector.d.ts +1 -1
- package/dist/module-types/src/components/organisms/ProblemVerdictTag/ProblemVerdictTag.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/SubmitView.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionGroupInfo.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionListenerVerdict.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionMemory.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionTime.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmissionVerdict.d.ts +1 -1
- package/dist/module-types/src/components/organisms/SubmitView/commons/SubmitViewContent.d.ts +1 -1
- package/dist/module-types/src/components/organisms/TextHeadCell/TextHeadCell.d.ts +1 -1
- package/dist/module-types/src/components/organisms/UserChip/UserChip.d.ts +1 -1
- package/dist/module-types/src/components/organisms/UserNicknameLink/UserNicknameLink.d.ts +1 -1
- package/dist/module-types/src/components/organisms/UsersSelector/UsersSelector.d.ts +1 -1
- package/dist/module-types/src/components/organisms/VerticalMenu/VerticalMenu.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/ChangePasswordModal/ChangePasswordModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/ChangePasswordModal/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/DataViewerCard.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/DataViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/FilterDrawer/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkContestTableTest/MockJkContestTable.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkProblemTableTest/MockJkProblemTable.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkSubmissionsTableTest/MockJkSubmissionTable.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/JkUserTableTest/MockJkUserTable.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/RowVirtualizerFixed.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/Filter.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterDate.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterDateRange.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterSelect.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/TableHeadFilterText.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/ViewContainerRows.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/commons/DataViewerToolbar.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/commons/DisplayDataViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/commons/utils.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/DataViewer/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/ExcalidrawButton/ExcalidrawButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/ExcalidrawButton/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/GraphvizViewer/GraphvizViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/GraphvizViewer/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMath/MdMath.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMath/MermaidInline.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMath/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMath/utils.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/MdMathEditor.deprecated.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/MdMathEditor/TextPlainEditorContent/TextPlainEditorContent.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/CodeRunnerEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FileTreePanel/FileTreePanel.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/FirstPane.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/Header/RunCodeButton.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/Header/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/MermaidViewer/GraphicToolbar.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/MermaidViewer/MermaidViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/SettingsModal/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/TestCases/LogInfo.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/UserCodeEditor/CodeRunnerEditor/TestCases/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetAsSlides/WorksheetAsSlides.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetAsSlides/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetContents/WorksheetContents.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetContents/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/WorksheetEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/AddNewChild.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ChunkTitle.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/CodeEditorSheetSection/CodeEditorSheetSectionView.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/EditSheetModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/GraphSheetSection/GraphSheetSectionView.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSection.old.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSectionEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/JkmdSheetSection/JkmdSheetSectionEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetRecursiveSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ListSheetSection/ListSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizOptionsSheetSection/QuizOptionsSheetSectionView.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/ProblemSummary.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSection.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditor.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionEditorModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/QuizProblemSheetSection/QuizProblemSheetSectionView.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/ResultHeader.d.ts +2 -2
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/TableOfContents.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/TableOfContentsModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/UpRemoveDownButtons.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/WorksheetBodies.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/WorksheetNode.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetEditor/sheets/upRemoveDownActions.d.ts +4 -4
- package/dist/module-types/src/components/organisms/_layz_/WorksheetViewer/WorksheetViewer.d.ts +1 -1
- package/dist/module-types/src/components/organisms/_layz_/WorksheetViewer/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/ImageUploaderModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/PublicImagesTab/PublicImages.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/PublicImagesTab/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/ImageUploaderModal/UploadNewImageTab/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModal.d.ts +2 -2
- package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/ForgotPassword/ForgoPasswordModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/ForgotPassword/index.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/LoginModal/LoginModalTemplate/LoginModalTemplate.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/SignUpModal/SignUpModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/SignUpModal/SignUpModalTemplate/SignUpModalTemplate.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/SubmissionModal/SubmissionContentModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/SubmissionModal/SubmissionModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/UserPreviewModal/UserPreviewContentModal.d.ts +2 -2
- package/dist/module-types/src/components/organisms/modals/UserPreviewModal/UserPreviewModal.d.ts +1 -1
- package/dist/module-types/src/components/organisms/modals/WelcomeModal/WelcomeModal.d.ts +1 -1
- package/dist/module-types/src/components/providers/JukiAblyInitializer/JukiAblyInitializer.d.ts +2 -2
- package/dist/module-types/src/components/providers/JukiProviders.d.ts +1 -1
- package/dist/module-types/src/components/providers/JukiUIProvider/Image.d.ts +1 -1
- package/dist/module-types/src/components/providers/JukiUIProvider/JukiUIProvider.d.ts +1 -1
- package/dist/module-types/src/components/providers/JukiUIProvider/Link.d.ts +1 -1
- package/dist/module-types/src/components/providers/NotificationProvider/NotificationProvider.d.ts +1 -1
- package/dist/module-types/src/components/templates/ContestNameLinkField/ContestNameLinkField.d.ts +1 -1
- package/dist/module-types/src/components/templates/EditProfileModal/EditProfileModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/EditProfileModal/ImageProfileModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/EntityCreateLayout/EntityCreateLayout.d.ts +1 -1
- package/dist/module-types/src/components/templates/EntityLogsModal/EntityLogsModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/EntityUpdateLayout/EntityUpdateLayout.d.ts +1 -1
- package/dist/module-types/src/components/templates/ErrorBoundary/ErrorBoundary.d.ts +2 -2
- package/dist/module-types/src/components/templates/HelpSection/HelpSection.d.ts +1 -1
- package/dist/module-types/src/components/templates/MainMenu/DrawerViewMenuMobile/DrawerViewMenuMobile.d.ts +1 -1
- package/dist/module-types/src/components/templates/MainMenu/MainMenu.d.ts +1 -1
- package/dist/module-types/src/components/templates/MainMenu/SettingsSection/index.d.ts +3 -3
- package/dist/module-types/src/components/templates/NewViersionAvailableModal/NewVersionAvailable.d.ts +1 -1
- package/dist/module-types/src/components/templates/NewViersionAvailableModal/NewVersionAvailableModal/NewVersionAvailableModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/ProblemView/ProblemInfo.d.ts +6 -6
- package/dist/module-types/src/components/templates/ProblemView/ProblemView.d.ts +1 -1
- package/dist/module-types/src/components/templates/ProblemView/commons/ProblemCodeEditor.d.ts +1 -1
- package/dist/module-types/src/components/templates/ProblemView/commons/ProblemStatementView.d.ts +1 -1
- package/dist/module-types/src/components/templates/ProblemView/commons/SampleTest.d.ts +1 -1
- package/dist/module-types/src/components/templates/ResetPasswordModal/ResetPasswordModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserActiveSessions/UserMyActiveSessions.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserProfile/UserProfile.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserProfile/UserProfileDataContent.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserProfileSettings/UserProfileSettings.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserViewLayout/ProfileSubmissions.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserViewLayout/UserViewLayout.d.ts +1 -1
- package/dist/module-types/src/components/templates/UserViewLayout/types.d.ts +1 -0
- package/dist/module-types/src/components/templates/members/DocumentCustomMembersContent.d.ts +1 -1
- package/dist/module-types/src/components/templates/members/DocumentMembersButton.d.ts +1 -1
- package/dist/module-types/src/components/templates/members/DocumentMembersContent.d.ts +1 -1
- package/dist/module-types/src/components/templates/members/DocumentMembersModal/DocumentMembersModal.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemAdminActionsField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemCrawlerField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemKeyField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemModeField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemNameLinkField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemNameModalField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemOwnerField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemStatus.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/ProblemTypeField.d.ts +1 -1
- package/dist/module-types/src/components/templates/problem/TagsField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionContestField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionContestProblemField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionDateField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionLanguageField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionNicknameField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionProblemField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionRetrieveButton.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/SubmissionTimeField.d.ts +1 -1
- package/dist/module-types/src/components/templates/submission/commons/SubmissionInfo.d.ts +1 -1
- package/dist/module-types/src/stores/user/useUserStore.d.ts +1 -1
- package/package.json +83 -88
- package/src/styles/components/atoms/_tabs-inline.scss +115 -22
- package/src/styles/components/molecules/_layouts.scss +2 -2
- package/src/vendor/@milkdown/crepe/lib/theme/common/ai.css +446 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/block-edit.css +3 -3
- package/src/vendor/@milkdown/crepe/lib/theme/common/code-mirror.css +19 -5
- package/src/vendor/@milkdown/crepe/lib/theme/common/diff.css +177 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/image-block.css +2 -2
- package/src/vendor/@milkdown/crepe/lib/theme/common/link-tooltip.css +3 -3
- package/src/vendor/@milkdown/crepe/lib/theme/common/reset.css +15 -14
- package/src/vendor/@milkdown/crepe/lib/theme/common/style.css +2 -0
- package/src/vendor/@milkdown/crepe/lib/theme/common/table.css +1 -1
- package/src/vendor/@milkdown/crepe/lib/theme/common/top-bar.css +2 -2
- package/src/vendor/@milkdown/crepe/lib/theme/crepe/style.css +1 -0
- package/src/vendor/@milkdown/crepe/lib/theme/crepe-dark/style.css +1 -0
- package/src/vendor/@milkdown/crepe/lib/theme/frame/style.css +1 -0
- package/src/vendor/@milkdown/crepe/lib/theme/frame-dark/style.css +1 -0
- package/src/vendor/@milkdown/crepe/lib/theme/nord/style.css +1 -0
- package/src/vendor/@milkdown/crepe/lib/theme/nord-dark/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/ai.css +430 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/block-edit.css +3 -3
- package/src/vendor/@milkdown/crepe/src/theme/common/code-mirror.css +19 -5
- package/src/vendor/@milkdown/crepe/src/theme/common/diff.css +196 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/image-block.css +2 -2
- package/src/vendor/@milkdown/crepe/src/theme/common/link-tooltip.css +3 -3
- package/src/vendor/@milkdown/crepe/src/theme/common/reset.css +15 -14
- package/src/vendor/@milkdown/crepe/src/theme/common/style.css +2 -0
- package/src/vendor/@milkdown/crepe/src/theme/common/table.css +1 -1
- package/src/vendor/@milkdown/crepe/src/theme/common/top-bar.css +2 -2
- package/src/vendor/@milkdown/crepe/src/theme/crepe/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/crepe-dark/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/frame/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/frame-dark/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/nord/style.css +1 -0
- package/src/vendor/@milkdown/crepe/src/theme/nord-dark/style.css +1 -0
- package/src/vendor/fumadocs-ui/css/generated/docs.css +1 -512
- package/src/vendor/fumadocs-ui/css/generated/flux.css +1 -432
- package/src/vendor/fumadocs-ui/css/generated/glass.css +1 -0
- package/src/vendor/fumadocs-ui/css/generated/home.css +1 -220
- package/src/vendor/fumadocs-ui/css/generated/notebook.css +1 -540
- package/src/vendor/fumadocs-ui/css/generated/shared.css +1 -1176
- package/src/vendor/fumadocs-ui/css/lib/base.css +93 -2
- package/src/vendor/fumadocs-ui/css/lib/shiki.css +2 -2
- package/src/vendor/fumadocs-ui/css/preset-legacy.css +38 -0
- package/src/vendor/fumadocs-ui/css/preset.css +0 -80
- package/src/vendor/fumadocs-ui/css/solar.css +10 -20
- package/src/vendor/fumadocs-ui/css/vitepress.css +17 -10
- package/src/vendor/fumadocs-ui/dist/components/image-zoom2.css +5 -0
- package/src/vendor/fumadocs-ui/dist/style.css +1375 -936
- package/src/vendor/handsontable/styles/handsontable.css +964 -416
- package/src/vendor/handsontable/styles/handsontable.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-icons-horizon.css +11 -12
- package/src/vendor/handsontable/styles/ht-icons-horizon.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-icons-main.css +11 -12
- package/src/vendor/handsontable/styles/ht-icons-main.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.css +28 -5
- package/src/vendor/handsontable/styles/ht-theme-classic-no-icons.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-classic.css +39 -17
- package/src/vendor/handsontable/styles/ht-theme-classic.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.css +27 -4
- package/src/vendor/handsontable/styles/ht-theme-horizon-no-icons.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-horizon.css +38 -16
- package/src/vendor/handsontable/styles/ht-theme-horizon.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-main-no-icons.css +28 -5
- package/src/vendor/handsontable/styles/ht-theme-main-no-icons.min.css +5 -4
- package/src/vendor/handsontable/styles/ht-theme-main.css +39 -17
- package/src/vendor/handsontable/styles/ht-theme-main.min.css +5 -4
- package/src/vendor/highlight.js/scss/cybertopia-cherry.scss +2 -1
- package/src/vendor/highlight.js/scss/cybertopia-dimmer.scss +2 -1
- package/src/vendor/highlight.js/scss/cybertopia-icecap.scss +2 -1
- package/src/vendor/highlight.js/scss/cybertopia-saturated.scss +2 -1
- package/src/vendor/highlight.js/scss/equinox.scss +71 -0
- package/src/vendor/highlight.js/scss/vs-dark.scss +61 -0
- package/src/vendor/highlight.js/styles/cybertopia-cherry.css +2 -1
- package/src/vendor/highlight.js/styles/cybertopia-cherry.min.css +1 -1
- package/src/vendor/highlight.js/styles/cybertopia-dimmer.css +2 -1
- package/src/vendor/highlight.js/styles/cybertopia-dimmer.min.css +1 -1
- package/src/vendor/highlight.js/styles/cybertopia-icecap.css +2 -1
- package/src/vendor/highlight.js/styles/cybertopia-icecap.min.css +1 -1
- package/src/vendor/highlight.js/styles/cybertopia-saturated.css +2 -1
- package/src/vendor/highlight.js/styles/cybertopia-saturated.min.css +1 -1
- package/src/vendor/highlight.js/styles/equinox.css +71 -0
- package/src/vendor/highlight.js/styles/equinox.min.css +1 -0
- package/src/vendor/highlight.js/styles/vs-dark.css +61 -0
- package/src/vendor/highlight.js/styles/vs-dark.min.css +1 -0
- 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/src/vendor/react-image-crop/dist/ReactCrop.css +2 -1
- package/src/vendor/reveal.js/css/reveal.scss +15 -0
- package/src/vendor/reveal.js/dist/reveal.css +1 -1
- package/dist/esm/ArrowForwardIcon-B6qJaqxW.js +0 -1
- package/dist/esm/BarChart-ilBguU5i.js +0 -1
- package/dist/esm/CartesianChart-B4Big96I.js +0 -47
- package/dist/esm/CodeViewer-j4tlytYb.js +0 -1
- package/dist/esm/DataGrid-B0Av-VN8.js +0 -272
- package/dist/esm/DataViewer-jViuraZ_.js +0 -1
- package/dist/esm/ImageLoaderCropper-CeYhv904.js +0 -1
- package/dist/esm/InputCellPhoneNumber-C7hpcqFZ.js +0 -1
- package/dist/esm/LineChart-_gtzHQbx.js +0 -1
- package/dist/esm/MdMathEditor-B41-_-_8.js +0 -28
- package/dist/esm/Popover-BGWBnVdT.js +0 -6
- package/dist/esm/ReplyIcon-CPGYEALJ.js +0 -1
- package/dist/esm/SlideDeck-NtKwXHq5.js +0 -1
- package/dist/esm/TableOfContents-DBBkdhlJ.js +0 -1
- package/dist/esm/Tooltip-DaBTZZ8j.js +0 -13
- package/dist/esm/UserCodeEditor-DdyfLlQs.js +0 -28
- package/dist/esm/WorksheetAsSlides-B5FB6vVz.js +0 -1
- package/dist/esm/WorksheetEditor-HdlEcmnN.js +0 -1
- package/dist/esm/WorksheetNode-C-TrJMCB.js +0 -1
- package/dist/esm/WorksheetViewer-D0Co4NMK.js +0 -1
- package/dist/esm/_baseIteratee-DJNkOVK7.js +0 -1
- package/dist/esm/_baseUniq-BJKKUJ6e.js +0 -1
- package/dist/esm/arc-BqJSq9Se.js +0 -1
- package/dist/esm/architecture-YZFGNWBL-Pv0ede3r.js +0 -1
- package/dist/esm/architectureDiagram-Q4EWVU46-Qs_XxOCt.js +0 -1
- package/dist/esm/basic-setup-UGhpl5jF.js +0 -1
- package/dist/esm/blockDiagram-DXYQGD6D-CG7oWqi7.js +0 -1
- package/dist/esm/c4Diagram-AHTNJAMY-DyGWi7Su.js +0 -1
- package/dist/esm/channel-DjjqTXV9.js +0 -1
- package/dist/esm/chunk-4TB4RGXK-ChheKyYi.js +0 -1
- package/dist/esm/chunk-EDXVE4YY-DQ25JIov.js +0 -1
- package/dist/esm/chunk-OYMX7WX6-BgiA8Wjh.js +0 -1
- package/dist/esm/classDiagram-6PBFFD2Q-D-xRfeAV.js +0 -1
- package/dist/esm/classDiagram-v2-HSJHXN6E-D-xRfeAV.js +0 -1
- package/dist/esm/clone-DCVnqO4M.js +0 -1
- package/dist/esm/commons-B_OozOv-.js +0 -1
- package/dist/esm/cose-bilkent-S5V4N54A-uYVAtvEb.js +0 -1
- package/dist/esm/cytoscape.esm-D5qQrGhU.js +0 -9
- package/dist/esm/dagre-KV5264BT-CmDBeo-P.js +0 -1
- package/dist/esm/diagram-5BDNPKRD-DVvj2_2u.js +0 -1
- package/dist/esm/diagram-G4DWMVQ6-DYpFO01Z.js +0 -1
- package/dist/esm/diagram-MMDJMWI5-CDbT7cky.js +0 -1
- package/dist/esm/diagram-TYMM5635-QWJ6iFCJ.js +0 -1
- package/dist/esm/erDiagram-SMLLAGMA-BaIhydf3.js +0 -1
- package/dist/esm/floating-ui.dom-BKnkJW47.js +0 -1
- package/dist/esm/flowDiagram-DWJPFMVM--s6o35x5.js +0 -1
- package/dist/esm/ganttDiagram-T4ZO3ILL-CE7k2fwu.js +0 -1
- package/dist/esm/gitGraph-7Q5UKJZL-Dw9SBp3L.js +0 -1
- package/dist/esm/gitGraphDiagram-UUTBAWPF-VFFCKAr8.js +0 -1
- package/dist/esm/graph-C49NoLzy.js +0 -1
- package/dist/esm/index-Bp7rYslS.js +0 -1
- package/dist/esm/index-CP5vpK1A.js +0 -1
- package/dist/esm/info-OMHHGYJF-uLTg2g1k.js +0 -1
- package/dist/esm/infoDiagram-42DDH7IO-DfB27x0W.js +0 -1
- package/dist/esm/isSymbol-CATEdeai.js +0 -1
- package/dist/esm/isUndefined-DgmxjSXK.js +0 -1
- package/dist/esm/ishikawaDiagram-UXIWVN3A-hkiElo3Y.js +0 -1
- package/dist/esm/journeyDiagram-VCZTEJTY-svJ9aZB7.js +0 -1
- package/dist/esm/kanban-definition-6JOO6SKY-aCGgjGQa.js +0 -1
- package/dist/esm/layout-Dn6BZDTj.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-KtTYbDqg.js +0 -1
- package/dist/esm/mermaid.core-Crnpnced.js +0 -1
- package/dist/esm/min-Dc9VrJ6M.js +0 -1
- package/dist/esm/mindmap-definition-QFDTVHPH-D0c-OxXp.js +0 -1
- package/dist/esm/nsis-Cx8FAvMN.js +0 -1
- package/dist/esm/packet-4T2RLAQJ-FrKYDPbn.js +0 -1
- package/dist/esm/pie-ZZUOXDRM-obOGHjHy.js +0 -1
- package/dist/esm/pieDiagram-DEJITSTG-Ago1dmgK.js +0 -1
- package/dist/esm/purify.es-DBOWJxv3.js +0 -2
- package/dist/esm/quadrantDiagram-34T5L4WZ-f7CWEYhG.js +0 -1
- package/dist/esm/radar-PYXPWWZC-BEcFMluC.js +0 -1
- package/dist/esm/requirementDiagram-MS252O5E-B_KOoVtP.js +0 -1
- package/dist/esm/ruby-CR-u2WLS.js +0 -1
- package/dist/esm/sankeyDiagram-XADWPNL6-BpENeDG-.js +0 -1
- package/dist/esm/sequenceDiagram-FGHM5R23-DjCr8k36.js +0 -1
- package/dist/esm/stateDiagram-FHFEXIEX-B0Hp6EQN.js +0 -1
- package/dist/esm/stateDiagram-v2-QKLJ7IA2-DDbvXv_Y.js +0 -1
- package/dist/esm/string-LeDn2fkG.js +0 -1
- package/dist/esm/throttle-BsCMUG1-.js +0 -1
- package/dist/esm/timeline-definition-GMOUNBTQ-nYM0ar6p.js +0 -1
- package/dist/esm/toNumber-Bh_HTlSx.js +0 -1
- package/dist/esm/treeView-SZITEDCU-BNkk4mhj.js +0 -1
- package/dist/esm/treemap-W4RFUUIX-DWvE4iLu.js +0 -1
- package/dist/esm/types-JRcv-6PR.js +0 -1
- package/dist/esm/vennDiagram-DHZGUBPP-CQ4yw6a2.js +0 -1
- package/dist/esm/viz-CFEjElvl.js +0 -9
- package/dist/esm/wardley-RL74JXVD-BYbSDrTb.js +0 -1
- package/dist/esm/wardleyDiagram-NUSXRM2D-ChuA4cDu.js +0 -1
- package/dist/esm/xychartDiagram-5P7HB3ND-C_GW0EwI.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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_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.23.0_@codemirror+language@6.13.1_@codemirror+state@6.7.6_@codemirror+view@6.43.15_typescript@6.0.3}/node_modules/@milkdown/kit/lib/utils.d.ts +0 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import e,{forwardRef as o,useId as n,useRef as i,useCallback as s,useMemo as r,useEffect as l,Children as a,useImperativeHandle 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{utils as m}from"./xlsx-BVrgZ1Ou.js";import{c as w}from"./commons-BHuDJzTw.js";import"./settings-BONQQsPx.js";import"./enums.js";import"./constants.js";const b=t=>["tabindex",t],v=()=>["role","gridcell"],C=()=>["role","gridcell button"],y=()=>["role","rowheader"],S=()=>["role","columnheader"],k=()=>["role","row"],R=()=>["scope","col"],E=()=>["scope","row"],x=t=>["aria-label",t],M=t=>["aria-describedby",t],T=(t=!0)=>["aria-disabled",t],H=t=>["aria-haspopup",t],I=t=>["aria-rowcount",t],_=t=>["aria-colcount",t],A=t=>["aria-rowindex",t],W=t=>["aria-colindex",t],O=t=>["aria-expanded",t],N=t=>["aria-checked",t],P=t=>["aria-relevant",t],D=t=>["aria-posinset",t];function L(t,e){const o=e.length;let n=0;for(;n<o;)t.push(e[n]),n+=1}function z(t){const e=[];if(!t||0===t.length||!t[0]||0===t[0].length)return e;const o=t.length,n=t[0].length;for(let i=0;i<o;i++)for(let o=0;o<n;o++)e[o]||(e[o]=[]),e[o][i]=t[i][o];return e}function B(t,e,o,n){let i=-1;const s=Array.isArray(t)?t:Array.from(t),r=s.length;let l=o;for(i+=1;i<r;)l=e(l,s[i],i,s),i+=1;return l}function V(t,e){let o=0;const n=Array.isArray(t)?t:Array.from(t),i=n.length,s=[];let r=-1;for(;o<i;){const t=n[o];e(t,o,n)&&(r+=1,s[r]=t),o+=1}return s}function F(t,e){let o=0;const n=Array.isArray(t)?t:Array.from(t),i=n.length,s=[];let r=-1;for(;o<i;){const t=n[o];r+=1,s[r]=e(t,o,n),o+=1}return s}function $(t,e){let o,n=0;o=Array.isArray(t)?t:Array.from(t);const i=o.length;for(;n<i&&!1!==e(o[n],n,o);)n+=1;return o}function U(t,e){let o=0;for(let n=0;n<t.length;n++)e.has(n)||(t[o]=t[n],o+=1);return t.length=o,t}function j(t,e,o,n){if(o<=0)return t;const i=t.length,s=Math.min(e,i);t.length=i+o;for(let e=i-1;e>=s;e--)t[e+o]=t[e];return t.fill(n,s,s+o),t}function q(t){const e=[],o=new Set;return $(t,t=>{o.has(t)||(o.add(t),e.push(t))}),e}function G(...t){const[e,...o]=[...t];let n=e;return $(o,t=>{const e=new Set(t);n=n.filter(t=>!e.has(t))}),n}function Y(t,e=" "){return t.split(e)}function X(t,...e){const o=B(Array.from(t),(t,o,n)=>t+o.replace(/\r?\n\s*/g,"")+(e[n]?e[n]:""),"");return o.trim()}function K(t,...e){const o=document.createElement("template");o.innerHTML=Array.from(t).reduce((t,o,n)=>t+o+(e[n]??""),"");const n=o.content.cloneNode(!0),i={};return n.querySelectorAll("[data-ref]").forEach(t=>{const e=t.dataset.ref??null;delete t.dataset.ref,null!==e&&(i[e]=t)}),{fragment:n,refs:i}}const Z={"non-commercial-and-evaluation":"non-commercial-and-evaluation"},Q=/^[0-9a-fA-F]{25}$/;function J(t){return"entitlement"===function(t){if("string"!=typeof t)return"unknown";const e=t.trim(),o=e.toLowerCase();if(Object.prototype.hasOwnProperty.call(Z,o))return Z[o];const n=e.lastIndexOf("[");return-1!==n&&-1!==e.indexOf("]",n)?"entitlement":Q.test(e.replace(/-/g,""))?"legacy":"unknown"}(t)}const tt=["usage_until","release_until"],et=864e5,ot=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function nt(t){return`00000000${(t>>>0).toString(16)}`.slice(-8)}function it(t){const e=t.length,o=Math.ceil((e+17)/128),n=new Uint8Array(128*o);n.set(t),n[e]=128;const i=8*e,s=n.length;n[s-7]=255&Math.floor(i/281474976710656),n[s-6]=255&Math.floor(i/1099511627776),n[s-5]=255&Math.floor(i/4294967296),n[s-4]=i>>>24&255,n[s-3]=i>>>16&255,n[s-2]=i>>>8&255,n[s-1]=255&i;const r=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],l=new Array(80),a=new Array(80);for(let t=0;t<o;t+=1){const e=128*t;for(let t=0;t<16;t+=1){const o=e+8*t;l[t]=(n[o]<<24|n[o+1]<<16|n[o+2]<<8|n[o+3])>>>0,a[t]=(n[o+4]<<24|n[o+5]<<16|n[o+6]<<8|n[o+7])>>>0}for(let t=16;t<80;t+=1){const e=l[t-2],o=a[t-2],n=l[t-15],i=a[t-15],s=(e>>>19|o<<13)^(o>>>29|e<<3)^e>>>6,r=(n>>>1|i<<31)^(n>>>8|i<<24)^n>>>7,h=(i>>>1|n<<31)^(i>>>8|n<<24)^(i>>>7|n<<25),c=(((o>>>19|e<<13)^(e>>>29|o<<3)^(o>>>6|e<<26))>>>0)+(a[t-7]>>>0)+(h>>>0)+(a[t-16]>>>0);a[t]=c>>>0,l[t]=(s>>>0)+(l[t-7]>>>0)+(r>>>0)+(l[t-16]>>>0)+Math.floor(c/4294967296)>>>0}let o=r[0],i=r[1],s=r[2],h=r[3],c=r[4],d=r[5],u=r[6],g=r[7],p=r[8],f=r[9],m=r[10],w=r[11],b=r[12],v=r[13],C=r[14],y=r[15];for(let t=0;t<80;t+=1){const e=(p>>>14|f<<18)^(p>>>18|f<<14)^(f>>>9|p<<23),n=(o>>>28|i<<4)^(i>>>2|o<<30)^(i>>>7|o<<25),r=(i>>>28|o<<4)^(o>>>2|i<<30)^(o>>>7|i<<25),S=p&m^~p&b,k=o&s^o&c^s&c,R=i&h^i&d^h&d,E=(y>>>0)+(((f>>>14|p<<18)^(f>>>18|p<<14)^(p>>>9|f<<23))>>>0)+((f&w^~f&v)>>>0)+(ot[2*t+1]>>>0)+(a[t]>>>0),x=E>>>0,M=(C>>>0)+(e>>>0)+(S>>>0)+(ot[2*t]>>>0)+(l[t]>>>0)+Math.floor(E/4294967296)>>>0,T=(r>>>0)+(R>>>0),H=T>>>0,I=(n>>>0)+(k>>>0)+Math.floor(T/4294967296)>>>0;C=b,y=v,b=m,v=w,m=p,w=f;const _=(g>>>0)+x;f=_>>>0,p=(u>>>0)+M+Math.floor(_/4294967296)>>>0,u=c,g=d,c=s,d=h,s=o,h=i;const A=x+H;i=A>>>0,o=M+I+Math.floor(A/4294967296)>>>0}const S=[o,i,s,h,c,d,u,g,p,f,m,w,b,v,C,y];for(let t=0;t<16;t+=2){const e=(r[t+1]>>>0)+(S[t+1]>>>0);r[t+1]=e>>>0,r[t]=(r[t]>>>0)+(S[t]>>>0)+Math.floor(e/4294967296)>>>0}}return r.map(nt).join("")}function st(t){const e=[];for(let o=0;o<t.length;o+=1){let n=t.charCodeAt(o);if(n>=55296&&n<=56319&&o+1<t.length){const e=t.charCodeAt(o+1);e>=56320&&e<=57343&&(n=1024*(n-55296)+(e-56320)+65536,o+=1)}n<128?e.push(n):n<2048?e.push(192|n>>6,128|63&n):n<65536?e.push(224|n>>12,128|n>>6&63,128|63&n):e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n)}return e}function rt(t){const e=function(t){const e=`${t}`.replace(/-/g,"+").replace(/_/g,"/").replace(/=+$/,"");if(!/^[A-Za-z0-9+/]*$/.test(e)||e.length%4==1)return null;const o=[];for(let t=0;t<e.length;t+=4){const n=[0,1,2,3].map(o=>{const n=e.charAt(t+o);return""===n?-1:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(n)});o.push(n[0]<<2|n[1]>>4),-1!==n[2]&&o.push((15&n[1])<<4|n[2]>>2),-1!==n[3]&&o.push((3&n[2])<<6|n[3])}return o}(t);return null===e?null:function(t){let e="",o=0;for(;o<t.length;){const n=t[o];let i;n<128?(i=n,o+=1):n<224?(i=(31&n)<<6|63&t[o+1],o+=2):n<240?(i=(15&n)<<12|(63&t[o+1])<<6|63&t[o+2],o+=3):(i=(7&n)<<18|(63&t[o+1])<<12|(63&t[o+2])<<6|63&t[o+3],o+=4),i>=65536?(i-=65536,e+=String.fromCharCode(55296+(i>>10),56320+(1023&i))):e+=String.fromCharCode(i)}return e}(e)}function lt(t){const e="string"==typeof t?/^(\d{4})-(\d{2})-(\d{2})$/.exec(t):null;if(null===e)return null;const o=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10);if(o<100)return null;const s=Date.UTC(o,n-1,i),r=new Date(s);return r.getUTCFullYear()!==o||r.getUTCMonth()!==n-1||r.getUTCDate()!==i?null:s}const at=/^[A-Za-z0-9\-_]+$/,ht=/^[0-9a-f]+$/,ct=/[\t\n\v\f\r \u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/g,dt=/\\[nrt]/g;function ut(t){return t.replace(dt,"").replace(ct,"")}function gt(t){return ut(t).normalize("NFC")}function pt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function ft(t){return null!==t&&"object"==typeof t&&!Array.isArray(t)}function mt(t){return"number"==typeof t&&Number.isFinite(t)&&Math.floor(t)===t&&t>=0}function wt(t){return Array.isArray(t)&&t.every(t=>"string"==typeof t)}function bt(t){return null!==t&&"object"==typeof t&&!Object.isFrozen(t)}function vt(t,e,o){Object.defineProperty(t,e,{value:o,enumerable:!0,writable:!0,configurable:!0})}function Ct(t,e,o){if(""!==gt(o))return!1;const n=gt(e);return""!==n&&pt(t,"prose")&&"string"==typeof t.prose&&function(t){return it(st(t)).slice(0,64)}(n)===t.prose}function yt(t){const e=t.lastIndexOf("[");if(-1===e)return null;const o=t.indexOf("]",e);if(-1===o)return null;const n=ut(t.slice(e+1,o));if(n.length<=128)return null;const i=n.slice(0,-128),s=n.slice(-128);if(!at.test(i)||!ht.test(s))return null;if(function(t){return it(st(t))}(i)!==s)return null;const r=rt(i);if(null===r)return null;let l;try{l=JSON.parse(r)}catch(t){return null}if(!ft(l)||!ft(l.products))return null;const a=function(t){return pt(t,"v")?!mt(t.v)||t.v<2?null:t.v:1}(l);if(null===a)return null;if(a>=2&&!Ct(l,t.slice(0,e),t.slice(o+1)))return null;const h={},c=l.products;let d=!1;return Object.keys(c).forEach(t=>{const e=function(t){if(!ft(t))return null;if(!wt(t.capabilities))return null;const e=tt.filter(e=>void 0!==t[e]);if(1!==e.length)return null;if(null===lt(t[e[0]]))return null;if(!mt(t.notice)||!mt(t.grace))return null;if(void 0!==t.flags&&!wt(t.flags))return null;const o={};return Object.keys(t).forEach(e=>vt(o,e,t[e])),vt(o,"capabilities",t.capabilities.slice()),vt(o,"notice",t.notice),vt(o,"grace",t.grace),vt(o,"flags",void 0===t.flags?[]:t.flags.slice()),vt(o,e[0],t[e[0]]),o}(c[t]);null!==e?vt(h,t,e):d=!0}),d?null:function(t){const e=[t];for(;e.length>0;){const t=e.pop();bt(t)&&(Object.freeze(t),Object.keys(t).forEach(o=>e.push(t[o])))}return t}({version:a,products:h})}let St=null,kt=null;function Rt(t,e){if(!pt(t.products,e))return null;const o=t.products[e];return ft(o)?o:null}function Et(t){return Math.floor(t/et)*et}function xt(t,e){return(t-Et(e))/et}function Mt(t,e){const o=-1!==t.flags.indexOf("trial");if(void 0!==t.release_until){const n=t.release_until;return{state:n>=e.buildDate||null===lt(e.buildDate)?"release_valid":"release_expired",isTrial:o,daysRemaining:null,licensedUntil:n}}const n=`${t.usage_until}`,i=lt(n)??Et(e.now),s=function(t,e,o){const n=t+et;if(o>=n)return o<n+e.grace*et?"soft_stop":"hard_stop";const i=xt(t,o);return e.notice>0&&i<=e.notice?"notice":"valid"}(i,t,e.now);return{state:`${o?"trial":"usage"}_${s}`,isTrial:o,daysRemaining:xt(i,e.now),licensedUntil:n}}function Tt(t){return{console:-1===t.flags.indexOf("no-console-warns"),ui:-1===t.flags.indexOf("no-ui-warns")}}const Ht=Object.freeze({unrestricted:!0,products:Object.freeze({})});function It(t){const e={};return Object.keys(t.products).forEach(o=>{const n=Rt(t,o);null!==n&&vt(e,o,{capabilities:n.capabilities.slice()})}),{unrestricted:!1,products:e}}function _t(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 At(t){return void 0!==t}function Wt(t){return void 0===t}function Ot(t){return null===t||""===t||Wt(t)}const Nt="length",Pt=t=>parseInt(t,16),Dt=t=>parseInt(t,10),Lt=(t,e,o)=>t.substr(e,o),zt=t=>(t.codePointAt(0)??0)-65,Bt=t=>`${t}`.replace(/\-/g,""),Vt=t=>Pt(Lt(Bt(t),Pt("12"),zt("F")))/(Pt(Lt(Bt(t),zt("B"),~~![][Nt]))||9),Ft=()=>"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);let $t=!1;const Ut=new Set,jt={invalid:()=>X`
|
|
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})=>X`
|
|
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:()=>X`
|
|
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:()=>""},qt={invalid:()=>X`
|
|
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})=>X`
|
|
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:()=>X`
|
|
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 Gt(t){return 0===t?"expires today":`expires in ${t} ${1===t?"day":"days"}`}function Yt(t){return`${t} (UTC)`}const Xt="Your Handsontable license key has expired.",Kt="To continue using Handsontable, you need to purchase a license.";function Zt({licensedUntil:t}){return X`
|
|
23
|
+
Your Handsontable subscription license expired on ${Yt(t)}. To continue using the\x20
|
|
24
|
+
software, contact sales@handsontable.com to purchase a valid license key.`}const Qt={trial_notice:{severity:"warn",message:({daysRemaining:t})=>X`
|
|
25
|
+
Your Handsontable license key ${Gt(t)}.\x20
|
|
26
|
+
${Kt}`},trial_soft_stop:{severity:"error",message:({licensedUntil:t})=>X`
|
|
27
|
+
Your Handsontable trial license key expired on ${Yt(t)}.\x20
|
|
28
|
+
${Kt}`},trial_hard_stop:{severity:"error",message:({licensedUntil:t})=>X`
|
|
29
|
+
Your Handsontable trial license key expired on ${Yt(t)}. You may no longer use\x20
|
|
30
|
+
Handsontable under the trial license. To continue using the software, contact\x20
|
|
31
|
+
sales@handsontable.com to purchase a valid license.`},usage_notice:{severity:"warn",message:({licensedUntil:t})=>X`
|
|
32
|
+
Your Handsontable subscription license expires on ${Yt(t)}.\x20
|
|
33
|
+
To renew your license, contact sales@handsontable.com.`},usage_soft_stop:{severity:"error",message:Zt},usage_hard_stop:{severity:"error",message:Zt},release_expired:{severity:"error",message:({licensedUntil:t,hotVersion:e})=>X`
|
|
34
|
+
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
|
35
|
+
version ${e}. Renew your license key or downgrade to a version released on or before\x20
|
|
36
|
+
${t}. If you need any help, contact us at sales@handsontable.com.`}},Jt={trial_soft_stop:()=>X`
|
|
37
|
+
${Xt} ${Kt}\x20
|
|
38
|
+
<a href="mailto:sales@handsontable.com">Contact Sales</a>.`,release_expired:({licensedUntil:t,hotVersion:e})=>X`
|
|
39
|
+
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
|
40
|
+
version ${e}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your license\x20
|
|
41
|
+
key or downgrade to a version released on or before ${t}. If you need any help, contact us\x20
|
|
42
|
+
at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},te=Object.freeze(["trial_hard_stop","invalid","missing"]);function ee(t){return-1!==te.indexOf(t)}function oe(t){return"string"==typeof t?t.trim():t}function ne({className:t,key:e,element:o,releaseDate:n}){if(J(e=oe(e)))return function({className:t,key:e,element:o,releaseDate:n}){if(Ft())return null;const{lifecycle:i,channels:s}=ae(e,n),{state:r}=i,l={daysRemaining:i.daysRemaining,licensedUntil:i.licensedUntil??void 0,hotVersion:"18.1.2"};if(s.console&&!Ut.has(e??"")){const t="invalid"===r?{severity:"warn",message:()=>jt.invalid({})}:Qt[r];t&&(console[t.severity](t.message(l)),Ut.add(e??""))}if(!s.ui||!o||ee(r))return null;const a=Jt[r];if(!a)return null;const h=o.ownerDocument,c=h.createElement("div"),d=h.createElement("div");return c.className=`handsontable ${t}`,d.className=`${t}_inner`,d.innerHTML=a(l),c.appendChild(d),o.appendChild(c),c}({className:t,key:e,element:o,releaseDate:n});const i=!Ot(e),s="string"==typeof e&&("non-commercial-and-evaluation"===e.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===e.toLowerCase()),r="18.1.2";let l,a="invalid",h="invalid";const c=he(e=Bt(e||""));if(s)a="non_commercial",h="valid";else if(i||c)if(c){const t=n,[o,i,s]=t.split("/").map(Number),r=Math.floor(Date.UTC(s,i-1,o)/864e5),c=Vt(e);l=new Intl.DateTimeFormat("en-US",{year:"numeric",month:"long",day:"2-digit",timeZone:"UTC"}).format(864e5*(c+1)),r>c?(a="expired",h="expired"):(a="valid",h="valid")}else a="invalid",h="invalid";else a="missing",h="missing";if(Ft()&&(a="valid",h="valid"),!$t&&"valid"!==a){jt[a]({keyValidityDate:l,hotVersion:r})&&console["non_commercial"===a?"info":"warn"](jt[a]({keyValidityDate:l,hotVersion:r})),$t=!0}if("valid"!==h&&!ee(h)&&o){if(qt[h]({keyValidityDate:l,hotVersion:r})){const e=document.createElement("div"),n=document.createElement("div");return e.className=`handsontable ${t}`,n.className=`${t}_inner`,n.innerHTML=qt[h]({keyValidityDate:l,hotVersion:r}),e.appendChild(n),o.appendChild(e),e}}return null}function ie(t){const[e,o,n]=`${t}`.split("/");return e&&o&&n?`${n}-${o.padStart(2,"0")}-${e.padStart(2,"0")}`:""}const se=Object.freeze({console:!0,ui:!0});function re(t,e=null){return{state:t,isTrial:!1,daysRemaining:null,licensedUntil:e}}function le(t,e){if("string"==typeof t&&("non-commercial-and-evaluation"===t.toLowerCase()||"ht68e-1f2b7-47158-70b05-0842f"===t.toLowerCase()))return re("non_commercial");if(Ot(t))return re("missing");const o=Bt(t||"");if(!he(o))return re("invalid");const n=e,[i,s,r]=n.split("/").map(Number),l=Math.floor(Date.UTC(r,s-1,i)/864e5),a=Vt(o);return l>a?re("legacy_expired",new Date(864e5*(a+1)).toISOString().slice(0,10)):re("legacy_valid")}function ae(t,e){const o=oe(t);if(Ft())return{lifecycle:re("legacy_valid"),channels:se,grants:Ht};if(!J(o))return{lifecycle:le(o,e),channels:se,grants:Ht};const n=function(t){if("string"!=typeof t)return null;if(t!==St){const e=yt(t);St=t,kt=e}return kt}(o),i=null===n?null:Rt(n,"handsontable");if(null===n||null===i)return{lifecycle:re("invalid"),channels:se,grants:Ht};const s=e;return{lifecycle:Mt(i,{now:Date.now(),buildDate:ie(s)}),channels:Tt(i),grants:It(n)}}function he(t){let e=[][Nt],o=e;if(t[Nt]!==zt("Z"))return!1;for(let e="",n="B<H4P+".split(""),i=zt(n.shift()??"A");i;i=zt(n.shift()??"A"))--i<""[Nt]?o|=(Dt(`${Dt(Pt(e)+(Pt(Lt(t,Math.abs(i),2))+String([])).padStart(2,"0"))}`)%97||2)>>1:e=Lt(t,i,i?1===n[Nt]?9:8:6);return o===e}function ce(t){const e=new Error(t);throw e.cause={handsontable:!0},e}function de(t){let e;if(Array.isArray(t))e=t.length?new Array(t.length).fill(null):[];else{const o=Object.create(null);ke(t,(t,e)=>{"__children"!==e&&(t&&"object"==typeof t&&!Array.isArray(t)?o[e]=de(t):Array.isArray(t)?t.length&&"object"==typeof t[0]&&!Array.isArray(t[0])?o[e]=[de(t[0])]:o[e]=[]:o[e]=null)}),e=o}return e}function ue(t,e,o){const n=Array.isArray(o);return ke(e,(e,i)=>{"__proto__"!==i&&"constructor"!==i&&"prototype"!==i&&(!1===n||o.includes(i))&&(t[i]=e)}),t}function ge(t,e){ke(e,(o,n)=>{if("__proto__"===n||"constructor"===n||"prototype"===n)return;const i=e[n];i&&"object"==typeof i?(t[n]||(Array.isArray(i)?t[n]=[]:"[object Date]"===Object.prototype.toString.call(i)?t[n]=i:t[n]={}),ge(t[n],i)):t[n]=i})}function pe(t){if(Array.isArray(t))return t.map(t=>pe(t));if(t instanceof Date)return new Date(t);if("object"==typeof t&&null!==t){const e={};for(const[o,n]of Object.entries(t))"__proto__"!==o&&"constructor"!==o&&"prototype"!==o&&(e[o]=pe(n));return e}return t}function fe(t){const e={};return ke(t,(t,o)=>{e[o]=t}),e}function me(t,e){const o=`_${t}`;return function(){return void 0===this[o]&&(this[o]=function(t){let e=t;return(Array.isArray(e)||Ce(e))&&(e=pe(e)),e}(e)),this[o]}}function we(t){const e=`_${t}`;return function(t){this[e]=t}}function be(t,...e){return t.MIXINS||(t.MIXINS=[]),$(e,e=>{t.MIXINS.push(e.MIXIN_NAME),ke(e,(e,o)=>{void 0!==t.prototype[o]&&ce(`Mixin conflict. Property '${o}' already exist and cannot be overwritten.`),"function"==typeof e?t.prototype[o]=e:Object.defineProperty(t.prototype,o,{get:me(o,e),set:we(o),configurable:!0})})}),t}function ve(t,e){const o=t=>{if(void 0===t)return"undefined";if(Array.isArray(t))return`[${t.map(o).join(",")}]`;if(t instanceof Date)return JSON.stringify(t);if(null!==t&&"object"==typeof t){return`{${Object.entries(t).sort(([t],[e])=>t.localeCompare(e)).map(([t,e])=>`${JSON.stringify(t)}:${o(e)}`).join(",")}}`}return JSON.stringify(t)};return o(t)===o(e)}function Ce(t){return ye(t)}function ye(t){return"[object Object]"===Object.prototype.toString.call(t)}function Se(t,e,o,n){n.value=o,n.writable=!1!==n.writable,n.enumerable=!1!==n.enumerable,n.configurable=!1!==n.configurable,Object.defineProperty(t,e,n)}function ke(t,e){const o=t;for(const n in o)if((!o.hasOwnProperty||o.hasOwnProperty&&Object.prototype.hasOwnProperty.call(o,n))&&!1===e(o[n],n,t))break;return t}function Re(t,e){const o=e.split(".");let n=t;for(const t of o)if(n=n[t],void 0===n)return;return n}function Ee(t,e,o){if("string"!=typeof e)return;if(null===t||"object"!=typeof t)return;const n=e.split(".");let i=t;for(let t=0;t<n.length;t+=1){const e=n[t];if("__proto__"===e||"constructor"===e||"prototype"===e)return;if(t!==n.length-1){Te(i,e)||(i[e]={});const t=i[e];if(!ye(t))return;i=t}else Object.defineProperty(i,e,{value:o,writable:!0,enumerable:!0,configurable:!0})}}function xe(t){if(!Ce(t))return 0;const e=function(t){let o=0;return ye(t)?ke(t,(t,n)=>{"__children"!==n&&(o+=e(t))}):o+=1,o};return e(t)}function Me(t,e="value"){const o=`_${e}`,n={_touched:!1,[o]:t,isTouched(){return Boolean(this._touched)},value:void 0};return Object.defineProperty(n,e,{get(){return this[o]},set(t){this._touched=!0,this[o]=t},enumerable:!0,configurable:!0}),n}function Te(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function He(t,e){if("object"!=typeof t||null===t)return e;if("object"!=typeof e||null===e)return t;const o={};return Object.keys(e).forEach(n=>{const i=e[n],s=t[n];ye(i)?o[n]=He(ye(s)?s:{},i):o[n]=Te(t,n)&&void 0!==s?s:i}),Object.keys(t).forEach(e=>{Te(o,e)||(o[e]=t[e])}),o}function Ie(t={},e={}){const o={...t};return Object.keys(e).forEach(t=>{if("__proto__"===t||"constructor"===t||"prototype"===t)return;const n=e[t],i=o[t];ye(n)&&ye(i)?o[t]=Ie(i,n):o[t]=n}),o}function _e(t){return ye(t)&&At(t.key)&&At(t.value)}function Ae(t){return window.requestAnimationFrame(t)}function We(t,e=100){return"function"==typeof window.requestIdleCallback?window.requestIdleCallback(()=>t(),{timeout:e}):window.requestAnimationFrame(t)}function Oe(t){"function"==typeof window.cancelIdleCallback?window.cancelIdleCallback(t):window.cancelAnimationFrame(t)}function Ne(){return"ontouchstart"in window}let Pe;const De=t=>{const e={value:!1,test(o,n){e.value=t(o,n)}};return e},Le={chrome:De((t,e)=>/Chrome/.test(t)&&/Google/.test(e??"")),chromeWebKit:De(t=>/CriOS/.test(t)),edge:De(t=>/Edge/.test(t)),edgeWebKit:De(t=>/EdgiOS/.test(t)),firefox:De(t=>/Firefox/.test(t)),firefoxWebKit:De(t=>/FxiOS/.test(t)),mobile:De(t=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t)),safari:De((t,e)=>/Safari/.test(t)&&/Apple Computer/.test(e??"")),safariBefore261:De((t,e)=>{if(!/Safari/.test(t)||!/Apple Computer/.test(e??""))return!1;const o=/Version\/(\d+(?:\.\d+)?)/i.exec(t);return(o?Number.parseFloat(o[1]):0)<26.1})},ze={mac:De(t=>/^Mac/.test(t)),win:De(t=>/^Win/.test(t)),linux:De(t=>/^Linux/.test(t)),ios:De(t=>/iPhone|iPad|iPod/i.test(t))};function Be(){return Le.firefox.value}function Ve(){return Le.safari.value}function Fe(){return Le.mobile.value}function $e(){return ze.ios.value}function Ue({maxTouchPoints:t}=navigator){return(t??0)>2&&ze.mac.value}function je(){return ze.win.value}function qe(){return ze.mac.value}function Ge(t,e={}){return`${t}`.replace(/(?:\\)?\[([^[\]]+)]/g,(t,o)=>"\\"===t.charAt(0)?t.substr(1,t.length-1):void 0===e[o]?"":String(e[o]))}function Ye(...t){At(console)&&console.log(...t)}function Xe(...t){At(console)&&console.warn(...t)}"undefined"!=typeof window&&(function({userAgent:t=navigator.userAgent,vendor:e=navigator.vendor}={}){ke(Le,({test:o})=>o(t,e))}(),function({platform:t=navigator.platform}={}){ke(ze,({test:e})=>e(t))}());const Ke=new WeakMap;function Ze(t,e,...o){let n=Ke.get(t);void 0===n&&(n=new Set,Ke.set(t,n)),n.has(e)||(n.add(e),Xe(...o))}const Qe=new Set;function Je(t,e){Qe.has(t)||At(console)&&(Qe.add(t),console.warn(e))}function to(t,e){Je(t,`Deprecated: ${e}`)}function eo(...t){At(console)&&console.error(...t)}function oo(t,e){const o=t.closest(".handsontable");return!!o&&(o.parentNode===e||o===e)}function no(t){return t.target}function io(t){return function(t){const{frameElement:e}=t;return t.parent&&Object.getPrototypeOf(t.parent)&&e instanceof HTMLIFrameElement?e:null}(t)?t.parent:null}function so(t,e=[],o){const{ELEMENT_NODE:n}=Node;let i=t;for(;null!=i&&i!==o;){const{nodeType:t,nodeName:o}=i;if(t===n&&en(i)&&(e.includes(o)||e.includes(i)))return i;i=nn(i)?i.host:i.parentNode}return null}function ro(t,e,o){const n=[];let i=en(t)?t:null;for(;i&&(i=so(i,e,o),i&&(!o||o.contains(i)));)if(n.push(i),nn(i)){const{host:t}=i;i=en(t)?t:null}else i=i.parentElement;const s=n.length;return s?n[s-1]:null}function lo(t,e){let o=t.parentNode,n=[];for("string"==typeof e?n=t instanceof Document?Array.from(t.querySelectorAll(e)):Array.from(t.ownerDocument.querySelectorAll(e)):n.push(e);null!==o;){if(n.indexOf(o)>-1)return!0;o=o.parentNode}return!1}function ao(t,e,o){const n=o.parentElement?.querySelector(`.ht_clone_${t}`);return!!n&&n.contains(e)}function ho(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,o=Array.from(e?.parentNode?.childNodes??[]);return(e?o.indexOf(e):-1)+(Number.parseInt(t.getAttribute("rowspan")??"",10)||1)>=o.length}function co(t){return t&&t.length?t.filter(t=>!!t):[]}function uo(t,e){if(!t||!t.length)return{regexFree:[],regexes:[]};const o=[],n=[];return n.push(...t.filter(t=>{const n=t instanceof RegExp;return n&&e&&o.push(t),!n})),{regexFree:n,regexes:o}}function go(t,e){return void 0!==t.classList&&"string"==typeof e&&""!==e&&t.classList.contains(e)}function po(t,e){"string"==typeof e&&(e=e.split(" ")),(e=co(e)).length>0&&t.classList.add(...e)}function fo(t,e){"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);let{regexFree:o,regexes:n}=uo(e,!0);o=co(o),o.length>0&&t.classList.remove(...o),n.forEach(e=>{t.classList.forEach(o=>{e.test(o)&&t.classList.remove(o)})})}function mo(t,e=[],o){Array.isArray(e)||(e=[[e,o??""]]),e.forEach(e=>{Array.isArray(e)&&""!==e[0]&&t.setAttribute(e[0],String(e[1]))})}function wo(t,e=[]){"string"==typeof e?e=e.split(" "):e instanceof RegExp&&(e=[e]);const{regexFree:o,regexes:n}=uo(e,!0);if(o.forEach(e=>{""!==e&&t.removeAttribute(e)}),n.length>0){const e=t.getAttributeNames();for(let o=0;o<e.length;o++){const i=e[o];for(let e=0;e<n.length;e++)if(n[e].test(i)){t.removeAttribute(i);break}}}}function bo(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--)bo(e[t])}}function vo(t){let e;for(;e=t.lastChild;)t.removeChild(e)}const Co=/(<([^>]*)>|&([^;]*);)/,yo="sanitizer";function So(t){return`HTML content is being written to the DOM ("${t}") without a sanitizer. Configure the "sanitizer" option to prevent XSS vulnerabilities.`}const ko={};function Ro(t,e,o=!0,n="innerHTML",i=ko){if(Co.test(e)){let s;"function"==typeof o?s=o(e,n)??"":(!1!==o&&Ze(i,yo,So(n)),s=e),t.innerHTML=s}else Eo(t,e)}function Eo(t,e){const o=t.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=e:(vo(t),t.appendChild(t.ownerDocument.createTextNode(e)))}function xo(t){if("function"==typeof t.checkVisibility)return t.checkVisibility();const e=t.ownerDocument.documentElement,o=t.ownerDocument.defaultView;let n=t;for(;n!==e;){if(null===n)return!1;if(nn(n)){const t=n.host;return t.impl?xo(t.impl):xo(t)}if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!1;if(n.nodeType===Node.ELEMENT_NODE&&en(n)&&"none"===o?.getComputedStyle(n).display)return!1;n=n.parentNode}return!0}function Mo(t){const e=t.ownerDocument,o=e.defaultView,n=e.documentElement;let i,s,r,l=t;for(i=l.offsetLeft,s=l.offsetTop,r=l;(l=en(l.offsetParent)?l.offsetParent:null)&&l!==e.body&&"offsetLeft"in l;)i+=l.offsetLeft,s+=l.offsetTop,r=l;return r&&"fixed"===r.style.position&&(i+=(o?.pageXOffset??0)||n.scrollLeft,s+=(o?.pageYOffset??0)||n.scrollTop),{left:i,top:s}}function To(t,e=window){return t instanceof Window?function(t=window){return t.scrollY}(e):t.scrollTop}function Ho(t,e=window){return t instanceof Window?function(t=window){return t.scrollX}(e):t.scrollLeft}function Io(t){const e=t.ownerDocument,o=e.defaultView,n=["auto","scroll"];let i=t.parentElement;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(o&&({overflow:t,overflowX:e,overflowY:s}=o.getComputedStyle(i)),n.includes(t)||n.includes(e)||n.includes(s))return i;if(i.clientHeight<=i.scrollHeight+1&&(n.includes(s)||n.includes(t)))return i;if(i.clientWidth<=i.scrollWidth+1&&(n.includes(e)||n.includes(t)))return i;i=i.parentElement}return o??e.documentElement}const _o=["scroll","hidden","auto","clip"],Ao=["visible","clip","hidden","scroll","auto","overlay"];function Wo(t,e){return _o.includes(t)&&!("clip"===t&&("visible"===e||""===e))}function Oo(t,e){const o=t.style.overflow.split(/\s+/).filter(Boolean),[n="",i=n]=o,s=(t,o,n)=>{const i=t||o;return Ao.includes(i)?i:e.getPropertyValue(n)};return{x:s(t.style.overflowX,n,"overflow-x"),y:s(t.style.overflowY,i,"overflow-y")}}function No(t){const e=t.ownerDocument,o=e.defaultView;let n=t.parentElement;for(;n&&n.style&&e.body!==n;){if(o){const{x:t,y:e}=Oo(n,o.getComputedStyle(n));if(Wo(t,e)||Wo(e,t))return n}else if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;n=n.parentElement}return o??e.documentElement}function Po(t,e,o=window){if(!t)return;if(t instanceof Window)return"width"===e?`${t.innerWidth}px`:"height"===e?`${t.innerHeight}px`:void 0;const n=t.style.getPropertyValue(e)||t.style[e];if(""!==n&&void 0!==n)return n;const i=o.getComputedStyle(t),s=i.getPropertyValue(e)||i[e];return""!==s&&void 0!==s?s:void 0}function Do(t){return t.offsetWidth}function Lo(t){return t.offsetHeight}function zo(t){return t instanceof Window?t.innerHeight:t.clientHeight}function Bo(t){return t.selectionStart?t.selectionStart:0}function Vo(t=window){if(t.getSelection){const e=t.getSelection();e?.empty?e.empty():e?.removeAllRanges&&e.removeAllRanges()}}function Fo(t,e,o){if(void 0===o&&(o=e),t.setSelectionRange){t.focus();try{t.setSelectionRange(e,o)}catch(n){const i=t.parentElement;if(i){const n=i.style.display;i.style.display="block",t.setSelectionRange(e,o),i.style.display=n}}}}let $o;function Uo(t=document){const e=(e=!1)=>{const o=t.createElement("div");o.style.height="200px",o.style.width="100%";const n=t.createElement("div");n.classList.add("htScrollbarTest"),e&&n.classList.add("htScrollbarSafariTest"),n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(o),t.body.appendChild(n);const i=o.offsetWidth;n.style.overflow="scroll";let s=o.offsetWidth;return i===s&&(s=n.clientWidth),t.body.removeChild(n),i-s},o=e();return 0!==o||!Le.safariBefore261.value||Fe()||Ue()?o:e(!0)}function jo(t=document){return void 0===$o&&($o=Uo(t)),$o}function qo(t){return t instanceof Window?t.document.body.scrollHeight>t.innerHeight:t.offsetWidth!==t.clientWidth}function Go(t){return t instanceof Window?t.document.body.scrollWidth>t.innerWidth:t.offsetHeight!==t.clientHeight}function Yo(t,e,o){t.style.transform=`translate3d(${e},${o},0)`}function Xo(t){t.style.transform&&""!==t.style.transform&&(t.style.transform="")}function Ko(t){return t&&(["INPUT","SELECT","TEXTAREA"].indexOf(t.nodeName)>-1||"true"===t.contentEditable)}function Zo(t){return Ko(t)&&"hotInput"in t.dataset==!1}function Qo(t){return!t.parentNode}function Jo(t,e=!0,o=!0){const n=t.ownerDocument,i=n.createRange(),s=n.defaultView?.getSelection();if(mo(t,"contenteditable",!0),o){const e=["aria-hidden","true"];mo(t,e[0],e[1])}e&&po(t,"invisibleSelection"),i.selectNodeContents(t),s?.removeAllRanges(),s?.addRange(i)}function tn(t,e=!0){const o=t.ownerDocument.defaultView?.getSelection();t.hasAttribute("aria-hidden")&&t.removeAttribute("aria-hidden"),o?.removeAllRanges(),e&&fo(t,"invisibleSelection"),t.removeAttribute("contenteditable")}function en(t){if("object"!=typeof t||null===t)return!1;const e=t.ownerDocument?.defaultView?.Element;return!!(e&&t instanceof e)}function on(t){return en(t)&&("TD"===t.tagName||"TH"===t.tagName)}function nn(t){return"object"==typeof t&&null!==t&&("nodeType"in t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t)}function sn(t){const e=[];let o=t.getRootNode();for(;nn(o);){const{host:t}=o;if(!en(t))break;e.push(t),o=t.getRootNode()}return e}function rn(t){let e=t.activeElement;for(;e?.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e}function ln(t){return"function"==typeof t}function an(t,e=200){let o,n=null;function i(...i){return n&&clearTimeout(n),n=setTimeout(()=>{n=null,o=t.apply(this,i)},e),o}return i.cancel=function(){null!==n&&(clearTimeout(n),n=null)},i}function hn(t,e,o,n,i,s,r,l){const a=t;return At(l)?a.call(e,o,n,i,s,r,l):At(r)?a.call(e,o,n,i,s,r):At(s)?a.call(e,o,n,i,s):At(i)?a.call(e,o,n,i):At(n)?a.call(e,o,n):At(o)?a.call(e,o):a.call(e)}const cn={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Be()?182:174,AUDIO_MUTE:Be()?181:173,AUDIO_UP:Be()?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},dn=[cn.ALT,cn.ARROW_DOWN,cn.ARROW_LEFT,cn.ARROW_RIGHT,cn.ARROW_UP,cn.AUDIO_DOWN,cn.AUDIO_MUTE,cn.AUDIO_UP,cn.BACKSPACE,cn.CAPS_LOCK,cn.DELETE,cn.END,cn.ENTER,cn.ESCAPE,cn.F1,cn.F2,cn.F3,cn.F4,cn.F5,cn.F6,cn.F7,cn.F8,cn.F9,cn.F10,cn.F11,cn.F12,cn.F13,cn.F14,cn.F15,cn.F16,cn.F17,cn.F18,cn.F19,cn.HOME,cn.INSERT,cn.MEDIA_NEXT,cn.MEDIA_PLAY_PAUSE,cn.MEDIA_PREV,cn.MEDIA_STOP,cn.NULL,cn.NUM_LOCK,cn.PAGE_DOWN,cn.PAGE_UP,cn.PAUSE,cn.SCROLL_LOCK,cn.SHIFT,cn.TAB];function un(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 gn(t,e){const o=e.split("|");let n=!1;return $(o,e=>{if(t===cn[e])return n=!0,!1}),n}function pn(t){t.isImmediatePropagationEnabled=!1,t.cancelBubble=!0}function fn(t){return!1===t.isImmediatePropagationEnabled}function mn(t){return 2===t.button}function wn(t){return 0===t.button}function bn(t){return"touches"in t&&"changedTouches"in t}function vn(t){if(!bn(t)||0===t.changedTouches.length)return null;const{identifier:e,clientX:o,clientY:n}=t.changedTouches[0];return{identifier:e,clientX:o,clientY:n}}function Cn(t,e){if(!bn(t))return null;for(let o=0;o<t.touches.length;o++){const n=t.touches[o];if(n.identifier===e)return{identifier:n.identifier,clientX:n.clientX,clientY:n.clientY}}return null}function yn(t){return t[0].toUpperCase()+t.substr(1)}function Sn(){const t=new Uint16Array(4);return globalThis.crypto.getRandomValues(t),Array.from(t,t=>t.toString(16).padStart(4,"0")).join("")}function kn(t){if("string"!=typeof t)return!1;try{const e=JSON.parse(t);return"object"==typeof e&&null!==e}catch{return!1}}function Rn(t){return/^(?:\d\d?%|100%)$/.test(t)}function En(t){const e=String(t);let o="",n=0,i=!1,s="";for(let t=0;t<e.length;t++){const r=e[t];n>0&&!i&&('"'===r||"'"===r)?(i=!0,s=r):i&&r===s?i=!1:i||"<"!==r?!i&&">"===r&&n>0?n-=1:0===n&&(o+=r):n+=1}return o}const xn={"&":"&","<":"<",">":">",'"':""","'":"'"};function Mn(t){return String(t).replace(/[&<>"']/g,t=>xn[t])}function Tn(t){return"string"!=typeof t?t:t.replace(/([A-Z])/g,"-$1").replaceAll("_","-").toLowerCase()}const Hn="IİÌÍĨ",In=Hn.toLowerCase(),_n=new Map;function An(t,e){return function(t){const e=_n.get(t);if(void 0!==e)return e;let o;try{o=Hn.toLocaleLowerCase(t)!==In}catch{o=!1}return _n.set(t,o),o}(e)?t.toLocaleLowerCase(e):t.toLowerCase()}const Wn=["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","afterOnSelectionHandleMouseDown","afterOnSelectionEdgeMouseDown","beforeMoveCells","afterMoveCells","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterOnCellMouseOverOutside","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","beforeOnCellMouseOverOutside","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","afterCustomBordersUpdate","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowCollapse","afterRowCollapse","beforeRowExpand","afterRowExpand","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","modifySinglePassLayout","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"],On=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"],["persistentStateSave","17.0.0"],["persistentStateLoad","17.0.0"],["persistentStateReset","17.0.0"]]),Nn=new Map([]);function Pn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dn(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ln(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Dn(t,e,"get"))}function zn(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Dn(t,e,"set"),o),o}function Bn(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Vn(t,e){Pn(t,e),e.add(t)}var Fn=new WeakMap,$n=new WeakSet,Un=new WeakSet;class jn{getList(t){return Ln(this,Fn).get(t)??null}getHooks(t){const e=Ln(this,Fn).get(t),o=[];if(e){let t=e.head;for(;t;)o.push(t),t=t.next}return o}add(t,e,o={}){let n=Ln(this,Fn).get(t);n||(n=Bn(this,Un,Gn).call(this,t),Wn.push(t));for(let t=n.head;null!==t;t=t.next)if(t.callback===e)return;const i=Number.isInteger(o.orderIndex)?o.orderIndex??0:0,s=!!o.runOnce,r=!!o.initialHook;if(r)for(let t=n.head;null!==t;t=t.next)if(t.initialHook)return void(t.callback=e);Bn(this,$n,qn).call(this,n,{callback:e,orderIndex:i,runOnce:s,initialHook:r,next:null})}has(t){const e=Ln(this,Fn).get(t);return!!e&&null!==e.head}remove(t,e){const o=Ln(this,Fn).get(t);if(!o)return!1;let n=null,i=o.head;for(;null!==i;){if(i.callback===e)return n?n.next=i.next:o.head=i.next,i===o.tail&&(o.tail=n),!0;n=i,i=i.next}return!1}destroy(){Ln(this,Fn).clear()}constructor(){var t,e,o;Vn(this,$n),Vn(this,Un),o={writable:!0,value:void 0},Pn(t=this,e=Fn),e.set(t,o),zn(this,Fn,new Map),Wn.forEach(t=>Bn(this,Un,Gn).call(this,t))}}function qn(t,e){if(null===t.head)return t.head=e,void(t.tail=e);if(e.orderIndex>=t.tail.orderIndex)return t.tail.next=e,void(t.tail=e);let o=null,n=t.head;for(;null!==n&&n.orderIndex<=e.orderIndex;)o=n,n=n.next;null===o?(e.next=t.head,t.head=e):(e.next=n,o.next=e)}function Gn(t){const e={head:null,tail:null};return Ln(this,Fn).set(t,e),e}function Yn(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Xn(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 Kn=X`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
|
43
|
+
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
|
|
44
|
+
learn about the migration path.`;var Zn=new WeakSet;class Qn{static getSingleton(){return ti}getBucket(t=null){return t?(t.pluginHookBucket||(t.pluginHookBucket=new jn),t.pluginHookBucket):this.globalBucket}add(t,e,o=null,n){return Array.isArray(e)?$(e,e=>this.add(t,e,o)):(On.has(t)&&Xe(Ge(Kn,{hookName:t,removedInVersion:On.get(t)})),Nn.has(t)&&Xe(Nn.get(t)),this.getBucket(o).add(t,e,{orderIndex:n,runOnce:!1})),this}once(t,e,o=null,n){return Array.isArray(e)?$(e,e=>this.once(t,e,o)):this.getBucket(o).add(t,e,{orderIndex:n,runOnce:!0}),this}addAsFixed(t,e,o=null){return Array.isArray(e)?$(e,e=>this.addAsFixed(t,e,o)):this.getBucket(o).add(t,e,{initialHook:!0}),this}remove(t,e,o=null){return this.getBucket(o).remove(t,e)}has(t,e=null){return this.getBucket(e).has(t)}run(t,e,o,n,i,s,r,l){return o=Yn(this,Zn,Jn).call(this,this.getBucket().getList(e),t,e,null,o,n,i,s,r,l),o=Yn(this,Zn,Jn).call(this,this.getBucket(t).getList(e),t,e,t,o,n,i,s,r,l)}destroy(t=null){this.getBucket(t).destroy()}register(t){this.isRegistered(t)||Wn.push(t)}deregister(t){this.isRegistered(t)&&Wn.splice(Wn.indexOf(t),1)}isDeprecated(t){return Nn.has(t)||On.has(t)}isRegistered(t){return Wn.indexOf(t)>=0}getRegistered(){return Wn}constructor(){Xn(this,Zn),this.globalBucket=new jn}}function Jn(t,e,o,n,i,s,r,l,a,h){if(null===t||null===t.head)return i;let c=t.head;const d=t.tail;for(;null!==c;){const t=hn(c.callback,e,i,s,r,l,a,h);if(void 0!==t&&(i=t),c.runOnce&&this.remove(o,c.callback,n),c===d)break;c=c.next}return i}const ti=new Qn;const ei=new Map;function oi(t="common"){ei.has(t)||ei.set(t,new Map);const e=ei.get(t);return{register:function(t,o){e.set(t,o)},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(){ei.delete(t),e.clear()}}}function ni(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ii(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ni(t,e,"get"))}function si(t,e,o){!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,o)}function ri(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ni(t,e,"set"),o),o}const{register:li,getItem:ai,hasItem:hi,getNames:ci,getValues:di}=oi("editors");var ui=new WeakMap,gi=new WeakMap;class pi{getConstructor(){return ii(this,ui)}getInstance(t){return t.guid in ii(this,gi)||(ii(this,gi)[t.guid]=new(ii(this,ui))(t)),ii(this,gi)[t.guid]}constructor(t){si(this,ui,{writable:!0,value:void 0}),si(this,gi,{writable:!0,value:void 0}),ri(this,gi,{}),ri(this,ui,t);const e=ii(this,gi);Qn.getSingleton().add("afterDestroy",function(){e[this.guid]=null})}}const fi=new WeakMap;function mi(t){return"function"==typeof t}function wi(t){return mi(t)||ce("Editor class must be a constructor function."),t}function bi(t){if("string"!=typeof t)return wi(t);hi(t)||ce(`No registered editor found under "${t}" name`);return ai(t).getConstructor()}function vi(t,e){let o="string"==typeof t?t:null,n=e;t&&mi(t)&&(n=t,o=t.EDITOR_TYPE??null),n||ce("Editor class is required to register an editor.");const i=wi(n),s=new pi(i);null!==o&&li(o,s),fi.set(i,s)}const Ci={_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){$(this._hooksStorage[t]||[],e=>{this.hot.removeHook(t,e)})},clearHooks(){ke(this._hooksStorage,(t,e)=>this.removeHooksByKey(e)),this._hooksStorage={}}};function yi(t,e){const{instance:o,visualRow:n,visualCol:i,valueSetter:s}=e;return ln(s)?s.call(o,t,n,i,e):t}function Si(t,e){const{instance:o,visualRow:n,visualCol:i,valueGetter:s}=e;return ln(s)?s.call(o,t,n,i,e):t}function ki(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Ri(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)}Se(Ci,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const Ei=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});var xi=new WeakSet,Mi=new WeakSet;class Ti{static get EDITOR_TYPE(){return"base"}_fireCallbacks(t){this._closeCallback&&(this._closeCallback(t),this._closeCallback=null)}init(){}getValue(){ce("Editor getValue() method unimplemented")}setValue(t){ce("Editor setValue() method unimplemented")}open(t){ce("Editor open() method unimplemented")}close(){ce("Editor close() method unimplemented")}focus(){ce("Editor focus() method unimplemented")}prepare(t,e,o,n,i,s){this.TD=n,this.row=t,this.col=e,this.prop=o,this.originalValue=i,this.cellProperties=s,this.state=this.isOpened()?this.state:Ei.VIRGIN}extend(){return class extends this.constructor{}}saveValue(t,e){let o,n,i,s;if(e){const t=this.hot.getSelectedRangeActive(),e=t?.getTopStartCorner(),r=t?.getBottomEndCorner();o=e?.row??this.row,n=e?.col??this.col,i=r?.row??this.row,s=r?.col??this.col}else[o,n,i,s]=[this.row,this.col,null,null];const r=this.hot.runHooks("modifyGetCellCoords",o,n,!1,"meta");Array.isArray(r)&&([o,n]=r),this.hot.populateFromArray(o,n,t,i,s,"edit")}beginEditing(t,e){if(this.state!==Ei.VIRGIN)return;if(null===this.row||null===this.col)return void Xe("Editor opened without valid cell coordinates.");const o=this.hot,n=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),i=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(null!==n&&null!==i&&o.view.scrollViewport({row:n,col:i}),this.state=Ei.EDITING,this.isInFullEditMode()){const e=Si(this.originalValue,this.hot.getCellMeta(this.row,this.col)),o="string"==typeof t?t:_t(e);this.setValue(o)}this.open(e),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col),this.addHook("beforeDialogShow",()=>this.cancelChanges())}finishEditing(t,e,o){if(o){const t=this._closeCallback;this._closeCallback=e=>{t&&t(e),o(e),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==Ei.VIRGIN){if(this.state===Ei.EDITING){if(t)return this.cancelChanges(),void this.hot.view.render();let o=this.getValue();this.cellProperties.trimWhitespace&&(o="string"==typeof o?String.prototype.trim.call(o||""):o),"function"==typeof this.cellProperties.valueParser&&(o=this.cellProperties.valueParser(o,this.cellProperties)),this.state=Ei.WAITING,this.saveValue([[o]],e),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",t=>{this.state=Ei.FINISHED,this.discardEditor(t)}):(this.state=Ei.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=Ei.FINISHED,this.discardEditor()}discardEditor(t){if(this.state===Ei.FINISHED)if(!1===t&&!0!==this.cellProperties.allowInvalid){if(null===this.row||null===this.col)return;this.hot.selectCell(this.row,this.col),this.focus(),this.state=Ei.EDITING,this._fireCallbacks(!1)}else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=Ei.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===Ei.WAITING}getEditedCellRect(){const t=this.getEditedCell();if(!t)return;const{wtOverlays:e,wtViewport:o}=this.hot.view._wt,n=this.hot.rootWindow,i=Mo(t),s=Do(t),r=Mo(this.hot.rootElement),l=Do(this.hot.rootElement),a=e.topOverlay?.holder,h=e.inlineStartOverlay?.holder,c=a!==n?a.scrollTop:0,d=h!==n?h.scrollLeft:0,u=n.innerWidth-r.left-l,{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()?n.innerWidth-i.left-s-u-1+m:i.left-r.left-1-m,["top","top_inline_start_corner"].includes(p)&&(b+=e.topOverlay?.getOverlayOffset()??0),["inline_start","top_inline_start_corner"].includes(p)&&(v+=Math.abs(e.inlineStartOverlay?.getOverlayOffset()??0));const C=this.hot.hasColHeaders(),y=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row??0),S=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col??0),k=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(C&&(y??0)<=0||y===k)&&(b+=1),(S??0)<=0&&(v+=1);const R=o.rowsRenderCalculator?.startPosition??0,E=o.columnsRenderCalculator?.startPosition??0,x=Math.abs(e.inlineStartOverlay?.getScrollPosition()??0),M=e.topOverlay?.getScrollPosition()??0,T=jo(this.hot.rootDocument),H=ki(this,xi,Hi).call(this,t,p,R,M,T),I=ki(this,Mi,Ii).call(this,t,p,g,s,E,x),_=n.getComputedStyle(t),A=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",W=Number.parseInt(_[A],10)>0?0:1,O=Number.parseInt(_.borderTopWidth,10)>0?0:1,N=Do(t)+W,P=Lo(t)+O,D=a&&qo(a)?T:0,L=h&&Go(h)?T:0,z=this.hot.view.maximumVisibleElementWidth(I)-D+W;return{top:b,start:v,height:P,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(H??0)-L+O,this.hot.stylesHandler.getDefaultRowHeight()??0),width:N,maxWidth:z}}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 null===this.row||null===this.col?null:this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){if(null===this.row||null===this.col)return"";const t=this.hot.countRows(),e=this.hot.getSettings();let o="";return this.row<(e.fixedRowsTop??0)?o=this.col<(e.fixedColumnsStart??0)?"top-inline-start-corner":"top":e.fixedRowsBottom&&this.row>=t-e.fixedRowsBottom?o=this.col<(e.fixedColumnsStart??0)?"bottom-inline-start-corner":"bottom":this.col<(e.fixedColumnsStart??0)&&(o="inline-start"),o}constructor(t){Ri(this,xi),Ri(this,Mi),this.state=Ei.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.hot=t,this.init()}}function Hi(t,e,o,n,i){let s=t.offsetTop;const{wtOverlays:r}=this.hot.view._wt;if(["inline_start","master"].includes(e)&&(s+=o-n),["bottom","bottom_inline_start_corner"].includes(e)&&r.bottomOverlay?.clone){const{wtViewport:t,wtTable:e}=r.bottomOverlay.clone;s+=t.getWorkspaceHeight()-e.getHeight()-i}return s}function Ii(t,e,o,n,i,s){let r=t.offsetLeft;return this.hot.isRtl()?(r=r>=0?o.getWidth()-t.offsetLeft:Math.abs(r),r+=i-s-n):["top","master","bottom"].includes(e)&&(r+=i-s),r}be(Ti,Ci);class _i{addEventListener(t,e,o,n=!1){if(!this.context)return()=>{};const i=o;function s(t){i.call(this,function(t){const e=t.stopImmediatePropagation;return t.stopImmediatePropagation=function(){e.apply(this),pn(this)},t}(t))}return this.context.eventListeners.push({element:t,event:e,callback:o,callbackProxy:s,options:n,eventManager:this}),t.addEventListener(e,s,n),()=>{this.removeEventListener(t,e,o)}}removeEventListener(t,e,o,n=!1){if(!this.context)return;let i,s=this.context.eventListeners.length;for(;s;)if(s-=1,i=this.context.eventListeners[s],i.event===e&&i.element===t){if(o&&o!==i.callback)continue;if(n&&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 o=this.context.eventListeners[e];t&&o.eventManager!==this||(this.context.eventListeners.splice(e,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options))}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(t,e){let o="document"in t?t.document:void 0,n="window"in t?t:void 0;o||(o=t.ownerDocument?t.ownerDocument:t,n=o.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==e,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0};let s;o.createEvent?(s=o.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,o.body.parentNode)):s=o.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 Ai(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wi(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Oi(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Wi(t,e,"get"))}function Ni(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Wi(t,e,"set"),o),o}function Pi(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Di(t,e){Ai(t,e),e.add(t)}var Li=new WeakMap,zi=new WeakSet,Bi=new WeakSet,Vi=new WeakSet,Fi=new WeakSet;class $i{getActiveEditor(){return this.activeEditor}prepareEditor(){if(Ni(this,Li,!1),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:o}=t,n=e,i=o,s=this.hot.runHooks("modifyGetCellCoords",n,i,!1,"meta");let r=n,l=i;if(Array.isArray(s)&&([r,l]=s),this.cellProperties=this.hot.getCellMeta(r,l),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(n,i,!0);if(a){const t=this.hot.getCellEditor(this.cellProperties),e=this.hot.colToProp(l),o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r),l);this.activeEditor=function(t,e){let o;return mi(t)?(fi.get(t)||vi(null,t),o=fi.get(t)):"string"==typeof t?o=ai(t):ce('Only strings and functions can be passed as "editor" parameter'),o||ce(`No editor registered under name "${t}"`),o.getInstance(e)}(t,this.hot),this.activeEditor.prepare(n,i,e,a,o,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(t,e,o=!1){if(!this.isCellEditable())return void this.clearActiveEditor();const n=this.hot.getSelectedRangeActive();let i=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,t,e,o);e instanceof MouseEvent&&"boolean"!=typeof i&&(i=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(t,e))):this.clearActiveEditor()}closeEditor(t=!1,e=!1,o){this.activeEditor?this.activeEditor.finishEditing(t,e,o):o&&o(!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:o,col:n}=t.highlight;return null!==o&&null!==n&&!(this.cellProperties.readOnly||!e||Pi(this,zi,Ui).call(this,o,n))}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??0),e.col=-(e.col??0)),this.hot.selection.isMultiple()?this.selection.transformFocus(e.row??0,e.col??0):this.selection.transformStart(e.row??0,e.col??0,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}constructor(t,e,o){var n,i,s;Di(this,zi),Di(this,Bi),Di(this,Vi),Di(this,Fi),s={writable:!0,value:void 0},Ai(n=this,i=Li),i.set(n,s),this.destroyed=!1,Ni(this,Li,!1),this.hot=t,this.tableMeta=e,this.selection=o,this.eventManager=new _i(t),this.hot.addHook("afterDocumentKeyDown",t=>Pi(this,Vi,qi).call(this,t)),this.hot.addHook("beforeCompositionStart",t=>Pi(this,Vi,qi).call(this,t)),this.hot.addHook("afterRowSequenceCacheUpdate",()=>Pi(this,Bi,ji).call(this)),this.hot.addHook("afterColumnSequenceCacheUpdate",()=>Pi(this,Bi,ji).call(this)),this.hot.view._wt.update("onCellDblClick",(t,e,o)=>Pi(this,Fi,Gi).call(this,t,e))}}function Ui(t,e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(t))||this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}function ji(t){const e=this.activeEditor??t;e&&null!==e.row&&null!==e.col&&Pi(this,zi,Ui).call(this,e.row,e.col)&&(e.isWaiting()?Oi(this,Li)||(Ni(this,Li,!0),this.hot.addHookOnce("postAfterValidate",()=>{Ni(this,Li,!1),this.hot._registerTimeout(()=>Pi(this,Bi,ji).call(this,e),0)})):e.state!==Ei.EDITING||Oi(this,Li)||(Ni(this,Li,!0),this.hot._registerTimeout(()=>{Ni(this,Li,!1),!this.destroyed&&e.state===Ei.EDITING&&null!==e.row&&null!==e.col&&Pi(this,zi,Ui).call(this,e.row,e.col)&&e.finishEditing(!1,!1,t=>{t||e.finishEditing(!0)})},0)))}function qi(t){const e=this.hot.getSelectedRangeActive();if(!this.hot.isListening()||!e||e.highlight.isHeader()||fn(t))return;const{keyCode:o}=t,n=(t.ctrlKey||t.metaKey)&&!t.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&(function(t){return dn.includes(t)}(o)||function(t){return[cn.CONTROL,cn.COMMAND_LEFT,cn.COMMAND_RIGHT,cn.COMMAND_FIREFOX].includes(t)}(o)||n||this.isEditorOpened()||this.openEditor("",t))}function Gi(t,e){e?.isCell()&&(this.hot.getShortcutManager().isCtrlPressed()?this.clearActiveEditor():this.openEditor(null,t,!0))}const Yi=new WeakMap;$i.getInstance=function(t,e,o){let n=Yi.get(t);return n||(n=new $i(t,e,o),Yi.set(t,n)),n};const Xi={" ":" ","&":"&","<":"<",">":">"},Ki=new RegExp(Object.keys(Xi).map(t=>`(${t})`).join("|"),"gi");function Zi(t){const e=t.hasColHeaders(),o=t.hasRowHeaders(),n=[e?-1:0,o?-1:0,t.countRows()-1,t.countCols()-1],i=t.getData(...n),s=i.length,r=s>0?i[0].length:0,l=["<table>","</table>"],a=e?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=o?1:0,d=e?1:0;for(let n=0;n<s;n+=1){const s=e&&0===n,l=[];for(let e=0;e<r;e+=1){const r=!s&&o&&0===e;let a="";if(s)a=`<th>${t.getColHeader(e-c)}</th>`;else if(r)a=`<th>${t.getRowHeader(n-d)}</th>`;else{const o=i[n][e],{hidden:s,rowspan:r,colspan:l}=t.getCellMetaTransient(n-d,e-c);if(!s){const t=[];if(r&&t.push(`rowspan="${r}"`),l&&t.push(`colspan="${l}"`),Ot(o))a=`<td ${t.join(" ")}></td>`;else{const e=String(o).replaceAll("<","<").replaceAll(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");a=`<td ${t.join(" ")}>${e}</td>`}}}l.push(a)}const u=["<tr>",...l,"</tr>"].join("");s?a.splice(1,0,u):h.splice(-1,0,u)}return l.splice(1,0,a.join(""),h.join("")),l.join("")}function Qi(t){const e=t.length,o=["<table>"];for(let n=0;n<e;n+=1){const i=t[n],s=i.length,r=[];0===n&&o.push("<tbody>");for(let t=0;t<s;t+=1){const e=i[t],o=Ot(e)?"":e.toString().replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").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>${o}</td>`)}o.push("<tr>",...r,"</tr>"),n+1===e&&o.push("</tbody>")}return o.push("</table>"),o.join("")}const Ji=/<td\b[^>]*>/i,ts=/<\/\s*td\s*>/i,es=/<p.*?>/g;function os(t,e){let o=1,n=e;for(;o>0;){const e=t.substring(n),i=e.match(Ji),s=e.match(ts);if(!s)return null;const r=n+(s.index??0),l=s[0].length,a=i?n+(i.index??0):t.length;if(a<r)o+=1,n=a+(i?.[0].length??0);else{if(o-=1,0===o)return{start:r,length:l};n=r+l}}return null}function ns(t,e=document){const o={};let n=t,i=null;if("string"==typeof n){const t=function(t){const e=[];let o=0;for(;o<t.length;){const n=t.substring(o).match(Ji);if(!n){e.push(t.substring(o));break}const i=o+(n.index??0),s=n[0],r=i+s.length;e.push(t.substring(o,i));const l=os(t,r);if(!l){e.push(t.substring(i));break}const a=t.substring(i,l.start+l.length),h=l.start-i;let c,d=a.substring(s.length,h).trim().replaceAll(/\n\s+/g," ").replaceAll(es,"\n").replace(/^\n+/,"").replaceAll(/<\/(.*)>\s+$/gm,"</$1>");do{c=d,d=d.replace(/<(?!br\b)[^>]+>/gi,"")}while(d!==c);d=d.replaceAll(/^ $/gm,""),e.push(`${s}${d}</td>`),o=l.start+l.length}return e.join("")}(n);i=(new(e.defaultView?.DOMParser??DOMParser)).parseFromString(t,"text/html"),n=i.querySelector("table")}if(!n||!function(t){return"TABLE"===(t&&t.nodeName||"")}(n))return;const s=n,r=i?.querySelector('meta[name$="enerator"]')??null,l=null!==s.querySelector("tbody th"),a=s.querySelector("tr"),h=a?Array.from(a.cells).reduce((t,e)=>t+e.colSpan,0)-(l?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?o.nestedHeaders=Array.from(t).reduce((t,e)=>{const o=Array.from(e.cells).reduce((t,e,o)=>{if(l&&0===o)return t;const{colSpan:n,innerHTML:i}=e,s=n>1?{label:i,colspan:n}:i;return t.push(s),t},[]);return t.push(o),t},[]):u&&(o.colHeaders=Array.from(t[0].children).reduce((t,e,o)=>(l&&0===o||t.push(e.innerHTML),t),[]))}d.length&&(o.fixedRowsTop=d.length),c.length&&(o.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=Array.from({length:p},()=>Array.from({length:h})),w=[],b=[];for(let t=0;t<p;t++){const e=f[t],o=Array.from(e.cells),n=o.length;for(let e=0;e<n;e++){const n=o[e],{nodeName:i,innerHTML:s,rowSpan:l,colSpan:a}=n,h=m[t].findIndex(t=>void 0===t);if("TD"===i){if(l>1||a>1){for(let e=t;e<t+l;e++)if(e<p)for(let t=h;t<h+a;t++)m[e][t]=null;const e=n.getAttribute("style");e&&e.includes("mso-ignore:colspan")||w.push({col:h,row:t,rowspan:l,colspan:a})}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(Ki,t=>Xi[t])}else b.push(s)}}return w.length&&(o.mergeCells=w),b.length&&(o.rowHeaders=b),m.length&&(o.data=m),o}function is(t,e=[]){if("number"==typeof t)return!isNaN(t)&&isFinite(t);if("string"==typeof t){if(0===t.length)return!1;if(1===t.length)return/\d/.test(t);const o=Array.from(new Set([".",...e])).map(t=>`\\${t}`).join("|");return new RegExp(`^[+-]?(((${o})?\\d+((${o})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(t.trim())}return"object"==typeof t&&null!==t&&("number"==typeof t.valueOf()&&!(t instanceof Date))}function ss(t,e){return"."===e&&"string"==typeof t&&/^[+-]?[1-9]\d{0,2}(,\d{3})+$/.test(t.trim())}function rs(t,e){return","===e&&"string"==typeof t&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+$/.test(t.trim())}function ls(t,e){return","===e&&"string"==typeof t&&/^[+-]?[1-9]\d{0,2}(\.\d{3})+,\d+$/.test(t.trim())}function as(t,e,o){let n,i,s;for("function"==typeof e?(n=-1,i=t,s=e):(n=t-1,i=e,s=o);++n<=i&&!1!==s(n););}function hs(t,e,o){let n,i,s=t+1;for("function"==typeof e?(i=e,n=0):(i=o,n=e);--s>=n&&!1!==i(s););}function cs(t,e){return e=Number.parseInt(e.toString().replace("%",""),10),e=isNaN(e)?0:e,Number.parseInt(String(t*e/100),10)}function ds(t,e,o){return Math.min(t,e)===t?e:Math.max(t,o)===t?o:t}function us(t){const e=/^([+-]?)(\d*)(?:\.(\d*))?(?:e([+-]?\d+))?$/i.exec(t.trim());if(null===e||""===e[2]&&""===(e[3]??""))return t.trim();const o="-"===e[1]?"-":"",n=e[2],i=e[3]??"",s=Number.parseInt(e[4]??"0",10);if(Math.abs(s)>1e3)return t.trim();let r=`${n}${i}`,l=n.length+s;l>r.length&&(r=r.padEnd(l,"0")),l<1&&(r=`${"0".repeat(1-l)}${r}`,l=1);const a=r.slice(0,l).replace(/^0+(?=\d)/,""),h=r.slice(l);return`${o}${a}${h.length>0?`.${h}`:""}`}function gs(t){return Number.isInteger(t)&&"number"==typeof t&&t>=0}const ps="asc",fs=new Map([[ps,[-1,1]],["desc",[1,-1]]]),ms=t=>`The priority '${t}' is already declared in a map.`,ws=t=>`The priority '${t}' is not a number.`;const bs=t=>`The id '${t}' is already declared in a map.`;function vs({errorIdExists:t}={}){const e=new Map,o=ln(t)?t:bs;function n(){return[...e]}function i(t){return e.has(t)}return{addItem:function(t,n){i(t)&&ce(String(o(t))),e.set(t,n)},clear:function(){e.clear()},getId:function(t){const[e]=n().find(([e,o])=>t===o&&e)||[null];return e},getItem:function(t){return e.get(t)},getItems:n,getValues:function(){return[...e.values()]},hasItem:i,removeItem:function(t){return e.delete(t)}}}const Cs=t=>`'${t}' value is already declared in a unique set.`;const ys=t=>`There is already registered "${t}" plugin.`,Ss=function({errorPriorityExists:t,errorPriorityNaN:e}={}){const o=new Map,n=ln(t)?t:ms,i=ln(e)?e:ws;return{addItem:function(t,e){is(t)||ce(String(i(t))),o.has(t)&&ce(String(n(t))),o.set(t,e)},getItems:function(t=ps){const[e,n]=fs.get(t)||fs.get(ps);return[...o].sort((t,o)=>t[0]<o[0]?e:n).map(t=>t[1])}}}({errorPriorityExists:t=>`There is already registered plugin on priority "${t}".`,errorPriorityNaN:t=>`The priority "${t}" is not a number.`}),ks=function({errorItemExists:t}={}){const e=new Set,o=ln(t)?t:Cs;return{addItem:function(t){e.has(t)&&ce(String(o(t))),e.add(t)},clear:function(){e.clear()},getItems:function(){return[...e]}}}({errorItemExists:ys}),Rs=vs({errorIdExists:ys});function Es(){return[...Ss.getItems(),...ks.getItems()]}function xs(t){const e=yn(t);return Rs.getItem(e)}function Ms(t,e,o){const[n,i,s]=function(t,e,o){"function"==typeof t&&(t=(e=t).PLUGIN_KEY,o=e.PLUGIN_PRIORITY);return[t,e,o]}(t,e,o);void 0===xs(n)&&function(t,e,o){const n=yn(t);Rs.hasItem(n)&&ce(ys(n));void 0===o?ks.addItem(n):Ss.addItem(o,n);Rs.addItem(n,e)}(n,i,s)}const{register:Ts,getItem:Hs,hasItem:Is,getNames:_s,getValues:As}=oi("renderers");function Ws(t){return"function"==typeof t?t:(Is(t)||ce(`No registered renderer found under "${t}" name`),Hs(t))}function Os(t,e){"string"!=typeof t&&(e=t,t=t.RENDERER_TYPE),Ts(t,e)}const{register:Ns,getItem:Ps,hasItem:Ds,getNames:Ls,getValues:zs}=oi("validators");function Bs(t,e){"string"!=typeof t&&(e=t,t=t.VALIDATOR_TYPE),Ns(t,e)}function Vs(t,e,o){return"function"==typeof e.valueFormatter?e.valueFormatter(t,e):"function"==typeof o&&"function"==typeof o.valueFormatter?o.valueFormatter.call(e,t,e):t}function Fs(t,e){const[o]=e,n=e[6];try{t(...e),n._isBaseRendererCalled||o.getCellRenderer({renderer:"base"})(...e)}finally{n._isBaseRendererCalled=!1}}function $s(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Us(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 js=new WeakSet,qs=new WeakSet;class Gs{measure(t){if(this.rowHeights.clear(),this.columnHeaderHeights.clear(),!t?.wtTable)return;const e=t.wtSettings.getSetting("stylesHandler").areCellsBorderBox();$s(this,js,Ys).call(this,t.wtTable,e),[t.wtOverlays?.topOverlay?.clone,t.wtOverlays?.bottomOverlay?.clone].forEach(t=>{t?.wtTable&&$s(this,js,Ys).call(this,t.wtTable,e)}),$s(this,qs,Xs).call(this,t.wtTable)}hasColumnHeaderTallerThan(t){for(const e of this.columnHeaderHeights.values())if(e>t)return!0;return!1}constructor(){Us(this,js),Us(this,qs),this.rowHeights=new Map,this.columnHeaderHeights=new Map}}function Ys(t,e){const{TBODY:o,rowFilter:n}=t;if(!o||!n)return;const i=e?Lo:zo,s=e?0:1;let r=o.childNodes.length;for(;r;){r-=1;const t=n.renderedToSource(r),l=o.childNodes[r],a=l.querySelector("th");let h;h=a?i(a):i(l)-s,e||(h+=1),this.rowHeights.set(t,h)}}function Xs(t){const{THEAD:e}=t;if(!e)return;const o=e.childNodes;for(let t=0,e=o.length;t<e;t++){const e=o[t].childNodes;let n;for(let t=0;t<e.length;t++){const o=e[t];if(o instanceof HTMLTableCellElement&&o.rowSpan<=1){const t=zo(o);(void 0===n||t>n)&&(n=t)}}void 0!==n&&this.columnHeaderHeights.set(t,n)}}function Ks(t){if(function(t){return"sourceCapabilities"in t}(t)&&t.sourceCapabilities)return!0===t.sourceCapabilities.firesTouchEvents}class Zs{initialize(){}process(t,e){const{totalCalculatedWidth:o,zeroBasedScrollOffset:n,viewportWidth:i,columnWidth:s}=e;o>=n&&o+s<=n+(n>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t),this.endColumn=t)}finalize(t){const{scrollOffset:e,viewportWidth:o,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:s,needReverse:r,positionCache:l,columnWidth:a}=t;if(!l)return;if(this.endColumn===s-1&&r)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=l.getOffset(this.endColumn)+a-l.getOffset(this.startColumn-1);if(t<=o&&(this.startColumn-=1),t>=o)break}this.startPosition=null!==this.startColumn?l.getOffset(this.startColumn):null;const h=e+o-(i>0?o+1:o),c=null===this.startColumn?0:t.getColumnWidth(this.startColumn);h<-1*n||e>l.getOffset(t.lastProcessedIndex)||-1*e-o>-1*c?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,null!==this.endColumn&&s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&null!==this.endColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class Qs{initialize(){}process(t,e){const{totalCalculatedHeight:o,zeroBasedScrollOffset:n,innerViewportHeight:i,rowHeight:s}=e;o>=n&&o+s<=i&&(null===this.startRow&&(this.startRow=t),this.endRow=t)}finalize(t){const{scrollOffset:e,viewportHeight:o,horizontalScrollbarHeight:n,totalRows:i,needReverse:s,positionCache:r,rowHeight:l}=t;if(!r)return;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=r.getOffset(this.endRow)+l-r.getOffset(this.startRow-1);if(t<=o-n&&(this.startRow-=1),t>=o-n)break}this.startPosition=null!==this.startRow?r.getOffset(this.startRow):null;e+o-n<(null===this.startRow?0:t.getRowHeight(this.startRow))||e>r.getOffset(t.lastProcessedIndex)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,null!==this.endRow&&i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&null!==this.endRow&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class Js{initialize(){}process(t,e){const{totalCalculatedWidth:o,zeroBasedScrollOffset:n,viewportWidth:i}=e;o<=n&&(this.startColumn=t);o>=n&&o<=n+(n>0?i+1:i)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t)),this.endColumn=t}finalize(t){const{scrollOffset:e,viewportWidth:o,inlineStartOffset:n,zeroBasedScrollOffset:i,totalColumns:s,needReverse:r,positionCache:l,columnWidth:a}=t;if(!l)return;if(this.endColumn===s-1&&r)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=l.getOffset(this.endColumn)+a-l.getOffset(this.startColumn-1);if(this.startColumn-=1,t>o)break}this.startPosition=null!==this.startColumn?l.getOffset(this.startColumn):null;e+o-(i>0?o+1:o)<-1*n||e>l.getOffset(t.lastProcessedIndex)+a||-1*e-o>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,null!==this.endColumn&&s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&null!==this.endColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(){this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class tr{initialize(){}process(t,e){const{totalCalculatedHeight:o,zeroBasedScrollOffset:n,innerViewportHeight:i}=e;o<=n&&(this.startRow=t),o>=n&&o<=i&&null===this.startRow&&(this.startRow=t),this.endRow=t}finalize(t){const{scrollOffset:e,viewportHeight:o,horizontalScrollbarHeight:n,totalRows:i,needReverse:s,positionCache:r,rowHeight:l}=t;if(!r)return;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const t=r.getOffset(this.endRow)+l-r.getOffset(this.startRow-1);if(this.startRow-=1,t>=o-n)break}this.startPosition=null!==this.startRow?r.getOffset(this.startRow):null;e+o-n<0||e>r.getOffset(t.lastProcessedIndex)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,null!==this.endRow&&i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&null!==this.endRow&&(this.count=this.endRow-this.startRow+1)}constructor(){this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1}}class er{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 or{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 nr extends Js{finalize(t){super.finalize(t);const{overrideFn:e,totalColumns:o,positionCache:n}=t;if(this.scrollOffset=t.zeroBasedScrollOffset,null!==this.startColumn&&"function"==typeof e){const t=this.startColumn,o=this.endColumn;e(this),this.columnStartOffset=t-this.startColumn,this.columnEndOffset=null!==this.endColumn&&null!==o?this.endColumn-o:0}null!==this.startColumn&&this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==this.startColumn&&n?n.getOffset(this.startColumn):null,null!==this.endColumn&&o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&null!==this.endColumn&&(this.count=this.endColumn-this.startColumn+1)}constructor(...t){super(...t),this.columnStartOffset=0,this.columnEndOffset=0,this.scrollOffset=0}}class ir extends tr{finalize(t){super.finalize(t);const{overrideFn:e,totalRows:o,positionCache:n}=t;if(this.scrollOffset=t.zeroBasedScrollOffset,null!==this.startRow&&"function"==typeof e){const t=this.startRow,o=this.endRow;e(this),this.rowStartOffset=t-this.startRow,this.rowEndOffset=null!==this.endRow&&null!==o?this.endRow-o:0}null!==this.startRow&&this.startRow<0&&(this.startRow=0),this.startPosition=null!==this.startRow&&n?n.getOffset(this.startRow):null,null!==this.endRow&&o<this.endRow&&(this.endRow=o-1),null!==this.startRow&&null!==this.endRow&&(this.count=this.endRow-this.startRow+1)}constructor(...t){super(...t),this.rowStartOffset=0,this.rowEndOffset=0,this.scrollOffset=0}}function sr(t,{totalCount:e,zeroBasedScrollOffset:o,scrollEnd:n,positionCache:i,setSizeField:s,setTotalCalculated:r,getTotalCalculated:l}){t._initialize(t);let a=0;if(o>0&&e>0){a=i.findIndexAtOffset(o),r(t,i.getOffset(a))}let h=-1;for(let o=a;o<e;o++){const e=i.getSizeAt(o);if(s(t,e),t._process(o,t),h=o,r(t,l(t)+e),l(t)>=n){t.needReverse=!1;break}}t.lastProcessedIndex=h,t._finalize(t)}class rr{_initialize(t){this.calculationTypes.forEach(([e,o])=>{this.calculationResults.set(e,o),o.initialize(t)})}_process(t,e){this.calculationTypes.forEach(([,o])=>o.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 lr extends rr{calculate(){this.positionCache&&sr(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})}getResultsFor(t){return this.calculationResults.get(t)}getColumnWidth(t){return this.positionCache?.getSizeAt(t)??0}constructor({calculationTypes:t,viewportWidth:e,scrollOffset:o,totalColumns:n,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.positionCache=null,this.lastProcessedIndex=-1,this.viewportWidth=e,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalColumns=n,this.overrideFn=i,this.inlineStartOffset=s,this.positionCache=r,this.calculate()}}class ar extends rr{calculate(){this.positionCache&&sr(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})}getResultsFor(t){return this.calculationResults.get(t)}getRowHeight(t){return this.positionCache?.getSizeAt(t)??0}constructor({calculationTypes:t,viewportHeight:e,scrollOffset:o,totalRows:n,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.positionCache=null,this.lastProcessedIndex=-1,this.viewportHeight=e,this.scrollOffset=o,this.zeroBasedScrollOffset=Math.max(o,0),this.totalRows=n,this.overrideFn=i,this.horizontalScrollbarHeight=s??0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.positionCache=r,this.calculate()}}function hr(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function cr(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,hr(t,e,"get"))}function dr(t,e,o){!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,o)}function ur(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,hr(t,e,"set"),o),o}var gr=new WeakMap;class pr{isValid(t){const{countRows:e,countCols:o,countRowHeaders:n,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...t};if(!Number.isInteger(this.row)||!Number.isInteger(this.col))return!1;const s=this.row,r=this.col;return!(s<-i||r<-n)&&!(s>=e||r>=o)}isSet(){return null!==this.row&&null!==this.col}isEqual(t){return t===this||this.row===t.row&&this.col===t.col}isHeader(){return!this.isCell()}isCell(){return null!==this.row&&null!==this.col&&this.row>=0&&this.col>=0}isRtl(){return cr(this,gr)}isSouthEastOf(t){if(null===this.row||null===this.col||null===t.row||null===t.col)return!1;const e=this.row,o=this.col,n=t.row,i=t.col;return e>=n&&(cr(this,gr)?o<=i:o>=i)}isNorthWestOf(t){if(null===this.row||null===this.col||null===t.row||null===t.col)return!1;const e=this.row,o=this.col,n=t.row,i=t.col;return e<=n&&(cr(this,gr)?o>=i:o<=i)}isSouthWestOf(t){if(null===this.row||null===this.col||null===t.row||null===t.col)return!1;const e=this.row,o=this.col,n=t.row,i=t.col;return e>=n&&(cr(this,gr)?o>=i:o<=i)}isNorthEastOf(t){if(null===this.row||null===this.col||null===t.row||null===t.col)return!1;const e=this.row,o=this.col,n=t.row,i=t.col;return e<=n&&(cr(this,gr)?o<=i:o>=i)}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 pr&&ur(this,gr,t.isRtl()),this}clone(){return new pr(this.row??void 0,this.col??void 0,cr(this,gr))}toObject(){return{row:this.row,col:this.col}}constructor(t,e,o=!1){dr(this,gr,{writable:!0,value:void 0}),this.row=null,this.col=null,ur(this,gr,!1),ur(this,gr,o),void 0!==t&&(this.row=t),void 0!==e&&(this.col=e)}}function fr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mr(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function wr(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,mr(t,e,"get"))}function br(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,mr(t,e,"set"),o),o}function vr(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}var Cr=new WeakMap,yr=new WeakSet;class Sr{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 null!==this.from.row&&null!==this.from.col&&null!==this.to.row&&null!==this.to.col&&(vr(this,yr,kr).call(this,this.from.row)>=0&&this.from.row===this.to.row&&vr(this,yr,kr).call(this,this.from.col)>=0&&this.from.col===this.to.col)}isSingleHeader(){return null!==this.from.row&&null!==this.from.col&&null!==this.to.row&&null!==this.to.col&&((vr(this,yr,kr).call(this,this.from.row)<0||vr(this,yr,kr).call(this,this.from.col)<0)&&this.from.row===this.to.row&&this.from.col===this.to.col)}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(vr(this,yr,kr).call(this,this.from.col)<0&&vr(this,yr,kr).call(this,this.to.col)<0||vr(this,yr,kr).call(this,this.from.row)<0&&vr(this,yr,kr).call(this,this.to.row)<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row))-Math.min(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row))+1}getOuterWidth(){return Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))-Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))+1}getHeight(){if(vr(this,yr,kr).call(this,this.from.row)<0&&vr(this,yr,kr).call(this,this.to.row)<0)return 0;const t=Math.max(vr(this,yr,kr).call(this,this.from.row),0),e=Math.max(vr(this,yr,kr).call(this,this.to.row),0);return Math.max(t,e)-Math.min(t,e)+1}getWidth(){if(vr(this,yr,kr).call(this,this.from.col)<0&&vr(this,yr,kr).call(this,this.to.col)<0)return 0;const t=Math.max(vr(this,yr,kr).call(this,this.from.col),0),e=Math.max(vr(this,yr,kr).call(this,this.to.col),0);return Math.max(t,e)-Math.min(t,e)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(t){if(null===this.from.row||null===this.from.col||null===this.to.row||null===this.to.col||null===t.row||null===t.col)return!1;const e=vr(this,yr,kr).call(this,t.row),o=vr(this,yr,kr).call(this,t.col),n=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return vr(this,yr,kr).call(this,n.row)<=e&&vr(this,yr,kr).call(this,i.row)>=e&&vr(this,yr,kr).call(this,n.col)<=o&&vr(this,yr,kr).call(this,i.col)>=o}includesRange(t){return this.includes(t.getOuterTopStartCorner())&&this.includes(t.getOuterBottomEndCorner())}isEqual(t){if(null===this.from.row||null===this.from.col||null===this.to.row||null===this.to.col||null===t.from.row||null===t.from.col||null===t.to.row||null===t.to.col)return!1;const e=Math.min(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),o=Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),n=Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)),i=Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)),s=Math.min(vr(this,yr,kr).call(this,t.from.row),vr(this,yr,kr).call(this,t.to.row)),r=Math.max(vr(this,yr,kr).call(this,t.from.row),vr(this,yr,kr).call(this,t.to.row)),l=Math.min(vr(this,yr,kr).call(this,t.from.col),vr(this,yr,kr).call(this,t.to.col)),a=Math.max(vr(this,yr,kr).call(this,t.from.col),vr(this,yr,kr).call(this,t.to.col));return e===s&&o===r&&n===l&&i===a}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 vr(this,yr,kr).call(this,this.getOuterTopEndCorner().col)>=vr(this,yr,kr).call(this,t.getOuterTopStartCorner().col)&&vr(this,yr,kr).call(this,this.getOuterTopEndCorner().col)<=vr(this,yr,kr).call(this,t.getOuterTopEndCorner().col)||vr(this,yr,kr).call(this,this.getOuterTopStartCorner().col)<=vr(this,yr,kr).call(this,t.getOuterTopEndCorner().col)&&vr(this,yr,kr).call(this,this.getOuterTopStartCorner().col)>=vr(this,yr,kr).call(this,t.getOuterTopStartCorner().col)}isOverlappingVertically(t){return vr(this,yr,kr).call(this,this.getOuterBottomStartCorner().row)>=vr(this,yr,kr).call(this,t.getOuterTopRightCorner().row)&&vr(this,yr,kr).call(this,this.getOuterBottomStartCorner().row)<=vr(this,yr,kr).call(this,t.getOuterBottomStartCorner().row)||vr(this,yr,kr).call(this,this.getOuterTopEndCorner().row)<=vr(this,yr,kr).call(this,t.getOuterBottomStartCorner().row)&&vr(this,yr,kr).call(this,this.getOuterTopEndCorner().row)>=vr(this,yr,kr).call(this,t.getOuterTopRightCorner().row)}expand(t,e=!0){const o=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();if(vr(this,yr,kr).call(this,t.row)<vr(this,yr,kr).call(this,o.row)||vr(this,yr,kr).call(this,t.col)<vr(this,yr,kr).call(this,o.col)||vr(this,yr,kr).call(this,t.row)>vr(this,yr,kr).call(this,n.row)||vr(this,yr,kr).call(this,t.col)>vr(this,yr,kr).call(this,n.col)){const i=this.getVerticalDirection(),s=this.getHorizontalDirection();return this.from=this._createCellCoords(Math.min(vr(this,yr,kr).call(this,o.row),vr(this,yr,kr).call(this,t.row)),Math.min(vr(this,yr,kr).call(this,o.col),vr(this,yr,kr).call(this,t.col))),this.to=this._createCellCoords(Math.max(vr(this,yr,kr).call(this,n.row),vr(this,yr,kr).call(this,t.row)),Math.max(vr(this,yr,kr).call(this,n.col),vr(this,yr,kr).call(this,t.col))),e&&((vr(this,yr,kr).call(this,t.row)<vr(this,yr,kr).call(this,o.row)&&"N-S"===i||vr(this,yr,kr).call(this,t.row)>vr(this,yr,kr).call(this,n.row)&&"S-N"===i)&&this.flipDirectionVertically(),(vr(this,yr,kr).call(this,t.col)<vr(this,yr,kr).call(this,o.col)&&"W-E"===s||vr(this,yr,kr).call(this,t.col)>vr(this,yr,kr).call(this,n.col)&&"E-W"===s)&&this.flipDirectionHorizontally()),!0}return!1}expandByRange(t,e=!0){if(this.includesRange(t)||!this.overlaps(t))return!1;const o=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner(),i=this.getDirection(),s=t.getOuterTopStartCorner(),r=t.getOuterBottomEndCorner(),l=Math.min(vr(this,yr,kr).call(this,o.row),vr(this,yr,kr).call(this,s.row)),a=Math.min(vr(this,yr,kr).call(this,o.col),vr(this,yr,kr).call(this,s.col)),h=Math.max(vr(this,yr,kr).call(this,n.row),vr(this,yr,kr).call(this,r.row)),c=Math.max(vr(this,yr,kr).call(this,n.col),vr(this,yr,kr).call(this,r.col)),d=this._createCellCoords(l,a),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":"NW-SE"}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"}getInlineDirection(){return this.getHorizontalDirection()===(wr(this,Cr)?"E-W":"W-E")?"start-end":"end-start"}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(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))).normalize()}getTopLeftCorner(){return wr(this,Cr)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))).normalize()}getBottomRightCorner(){return wr(this,Cr)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))).normalize()}getTopRightCorner(){return wr(this,Cr)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col))).normalize()}getBottomLeftCorner(){return wr(this,Cr)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)))}getOuterTopLeftCorner(){return wr(this,Cr)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)))}getOuterBottomRightCorner(){return wr(this,Cr)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)))}getOuterTopRightCorner(){return wr(this,Cr)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)))}getOuterBottomLeftCorner(){return wr(this,Cr)?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){if(t instanceof pr)return 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(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),o=Math.max(vr(this,yr,kr).call(this,this.from.row),vr(this,yr,kr).call(this,this.to.row)),n=Math.min(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)),i=Math.max(vr(this,yr,kr).call(this,this.from.col),vr(this,yr,kr).call(this,this.to.col)),s=Math.min(vr(this,yr,kr).call(this,t.from.row),vr(this,yr,kr).call(this,t.to.row)),r=Math.max(vr(this,yr,kr).call(this,t.from.row),vr(this,yr,kr).call(this,t.to.row)),l=Math.min(vr(this,yr,kr).call(this,t.from.col),vr(this,yr,kr).call(this,t.to.col)),a=Math.max(vr(this,yr,kr).call(this,t.from.col),vr(this,yr,kr).call(this,t.to.col)),h=[];return e===s&&h.push("top"),i===a&&h.push(wr(this,Cr)?"left":"right"),o===r&&h.push("bottom"),n===l&&h.push(wr(this,Cr)?"right":"left"),h}getInner(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),o=[];if(null===t.row||null===t.col||null===e.row||null===e.col)return o;const n=vr(this,yr,kr).call(this,t.row),i=vr(this,yr,kr).call(this,t.col),s=vr(this,yr,kr).call(this,e.row),r=vr(this,yr,kr).call(this,e.col);for(let t=n;t<=s;t++)for(let e=i;e<=r;e++)this.from.row===t&&this.from.col===e||this.to.row===t&&this.to.col===e||o.push(this._createCellCoords(t,e));return o}getAll(){const t=this.getOuterTopStartCorner(),e=this.getOuterBottomEndCorner(),o=[];if(null===t.row||null===t.col||null===e.row||null===e.col)return o;const n=vr(this,yr,kr).call(this,t.row),i=vr(this,yr,kr).call(this,t.col),s=vr(this,yr,kr).call(this,e.row),r=vr(this,yr,kr).call(this,e.col);for(let l=n;l<=s;l++)for(let a=i;a<=r;a++)n===l&&i===a?o.push(t):s===l&&r===a?o.push(e):o.push(this._createCellCoords(l,a));return o}forAll(t){const e=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();if(null===e.row||null===e.col||null===o.row||null===o.col)return;const n=vr(this,yr,kr).call(this,e.row),i=vr(this,yr,kr).call(this,e.col),s=vr(this,yr,kr).call(this,o.row),r=vr(this,yr,kr).call(this,o.col);for(let e=n;e<=s;e++)for(let o=i;o<=r;o++){if(!1===t(e,o))return}}clone(){return new Sr(this.highlight,this.from,this.to,wr(this,Cr))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(t,e){return new pr(t??void 0,e??void 0,wr(this,Cr))}constructor(t,e=t,o=t,n=!1){var i,s;fr(i=this,s=yr),s.add(i),function(t,e,o){fr(t,e),e.set(t,o)}(this,Cr,{writable:!0,value:void 0}),br(this,Cr,!1),this.highlight=t.clone(),this.from=e.clone(),this.to=o.clone(),br(this,Cr,n)}}function kr(t){return t??0}function Rr(t){return"function"==typeof t?.getTopStartCorner}function Er(t,e,o,n,i){let s=0;for(let r=o;r<=n;r++){const o=t.getCell({row:e,col:r},!0);if(!en(o))continue;const n=t.domBindings.geometryReader.offsetWidth(o);if(i<s+n)return r;s+=n}return null}function xr(t,e,o,n,i){let s=0;for(let r=o;r<=n;r++){const o=t.getCell({row:r,col:e},!0);if(!en(o))continue;const n=t.domBindings.geometryReader.offsetHeight(o);if(i<s+n)return r;s+=n}return null}function Mr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tr(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Hr(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Tr(t,e,"get"))}function Ir(t,e,o){Mr(t,e),e.set(t,o)}function _r(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Tr(t,e,"set"),o),o}function Ar(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Wr(t,e){Mr(t,e),e.add(t)}function Or(t){return{facadeGetter:t.getFacade(),rootDocument:t.rootDocument,rootWindow:t.rootWindow,geometryReader:t.geometryReader,wtSettings:t.wtSettings,eventManager:t.makeEventManager(),wtTable:t.getWtTable(),selectionManager:t.getSelectionManager()}}var Nr=new WeakMap,Pr=new WeakMap,Dr=new WeakMap,Lr=new WeakMap,zr=new WeakMap,Br=new WeakMap,Vr=new WeakMap,Fr=new WeakMap,$r=new WeakMap,Ur=new WeakMap,jr=new WeakMap,qr=new WeakMap,Gr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap,Kr=new WeakMap,Zr=new WeakSet,Qr=new WeakSet,Jr=new WeakSet,tl=new WeakSet,el=new WeakSet,ol=new WeakSet;let nl=class{registerEvents(){Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"contextmenu",t=>this.onContextMenu(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.TABLE,"mouseover",t=>this.onMouseOver(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.TABLE,"mouseout",t=>this.onMouseOut(t)),Hr(this,Nr).wtTable.isMaster&&(Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).rootDocument,"mousemove",t=>this.onMouseMove(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).rootDocument,"mouseup",()=>{_r(this,Xr,!1),_r(this,Kr,null)}));const t=()=>{Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"touchstart",t=>this.onTouchStart(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"touchend",t=>this.onTouchEnd(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"touchmove",t=>this.onTouchMove(t)),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"touchcancel",()=>this.onTouchCancel()),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"scroll",()=>this.onHolderScroll())},e=()=>{Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"mouseup",t=>{Ar(this,Zr,il).call(this,t)||this.onMouseUp(t)}),Hr(this,Nr).eventManager.addEventListener(Hr(this,Nr).wtTable.holder,"mousedown",t=>{Ar(this,Zr,il).call(this,t)||this.onMouseDown(t)})};Fe()?t():(Ne()&&t(),e())}selectedCellWasTouched(t){const e=this.parentCell(t).coords;if(Hr(this,Dr)&&e){const[t,o]=[e.row,Hr(this,Dr).from.row],[n,i]=[e.col,Hr(this,Dr).from.col];return t===o&&n===i}return!1}parentCell(t){const e={coords:null,TD:null},o=ro(t,["TD","TH"],Hr(this,Nr).wtTable.TABLE),n=t;if(o)e.coords=Hr(this,Nr).wtTable.getCoords(o),e.TD=o;else if(go(n,"wtBorder")&&go(n,"current")){const t=Hr(this,Nr).selectionManager.getFocusSelection()?.cellRange;t&&(e.coords=t.highlight,e.TD=Hr(this,Nr).wtTable.getCell(e.coords))}else if(go(n,"wtBorder")&&go(n,"area")){const t=Hr(this,Nr).selectionManager.getAreaSelection()?.cellRange;t&&(e.coords=t.to,e.TD=Hr(this,Nr).wtTable.getCell(e.coords))}return e}onMouseDown(t){const e=rn(Hr(this,Nr).rootDocument),o=no(t),n=t=>function(t,e=0){let o=-1,n=null,i=t;for(;null!==i;){if(o===e){n=en(i)?i:null;break}nn(i)?i=i.host:(o+=1,i=i.parentNode)}return n}(o,t),i=no(t);if(e&&!["TD","TH"].includes(e.nodeName)&&(i===e||n(0)===e||n(1)===e))return;const s=this.parentCell(i);go(i,"corner")?Hr(this,Nr).wtSettings.getSetting("onCellCornerMouseDown",t,i):s.TD&&(_r(this,Xr,!0),_r(this,Kr,null),Hr(this,Nr).wtSettings.has("onCellMouseDown")&&this.callListener("onCellMouseDown",t,s.coords,s.TD)),!this.touchApplied&&0===t.button&&s.TD&&(Hr(this,zr)[0]=s.TD,null!==Hr(this,Lr)[0]&&clearTimeout(Hr(this,Lr)[0]),Hr(this,Lr)[0]=setTimeout(()=>{Hr(this,zr)[0]=null},1e3))}onContextMenu(t){if(Ar(this,ol,hl).call(this),Hr(this,Nr).wtSettings.has("onCellContextMenu")){const e=this.parentCell(no(t));e.TD&&this.callListener("onCellContextMenu",t,e.coords,e.TD)}}onMouseOver(t){if(!Hr(this,Nr).wtSettings.has("onCellMouseOver"))return;const e=Hr(this,Nr).wtTable.TABLE,o=ro(no(t),["TD","TH"],e),n=Hr(this,Pr)||this;if(o&&o!==n.lastMouseOver&&lo(o,e)){n.lastMouseOver=o;const e=Hr(this,Nr).wtTable.getCoords(o);e&&this.callListener("onCellMouseOver",t,e,o)}}onMouseMove(t){if(!Hr(this,Xr))return;const{coords:e,isOutside:o}=Ar(this,Qr,sl).call(this,t.clientX,t.clientY);if(o){const o=Hr(this,Kr);if(!o||o.row!==e.row||o.col!==e.col){const o=Hr(this,Nr).wtTable.getCell(e);o instanceof HTMLElement&&(_r(this,Kr,{row:e.row,col:e.col}),this.callListener("onCellMouseOverOutside",t,e,o))}}else _r(this,Kr,null)}onMouseOut(t){if(!Hr(this,Nr).wtSettings.has("onCellMouseOut"))return;const e=Hr(this,Nr).wtTable.TABLE,o=ro(no(t),["TD","TH"],e),n=ro(t.relatedTarget,["TD","TH"],e),i=Hr(this,Pr)||this;if(o&&o!==n&&lo(o,e)){const e=Hr(this,Nr).wtTable.getCoords(o);e&&this.callListener("onCellMouseOut",t,e,o),null===n&&(i.lastMouseOver=null)}}onMouseUp(t){_r(this,Xr,!1),_r(this,Kr,null);const e=this.parentCell(no(t));e.TD&&Hr(this,Nr).wtSettings.has("onCellMouseUp")&&this.callListener("onCellMouseUp",t,e.coords,e.TD),this.touchApplied?Ar(this,Jr,rl).call(this,t,e):0===t.button&&(e.TD&&e.TD===Hr(this,zr)[0]&&e.TD===Hr(this,zr)[1]?(Ar(this,tl,ll).call(this,t,e),Hr(this,zr)[0]=null,Hr(this,zr)[1]=null):e.TD&&e.TD===Hr(this,zr)[0]&&(Hr(this,zr)[1]=e.TD,null!==Hr(this,Lr)[1]&&clearTimeout(Hr(this,Lr)[1]),Hr(this,Lr)[1]=setTimeout(()=>{Hr(this,zr)[1]=null},500)))}onTouchStart(t){_r(this,Dr,Hr(this,Nr).selectionManager.getFocusSelection()?.cellRange??null),this.touchApplied=!0,_r(this,jr,!1),_r(this,$r,!1),_r(this,qr,t),Ar(this,el,al).call(this,t)}onTouchEnd(t){const e=Hr(this,jr),o=!e&&!Hr(this,$r)&&null!==Hr(this,qr),n=Hr(this,qr);Ar(this,ol,hl).call(this),_r(this,qr,null),o&&null!==n&&this.onMouseDown(n);const i=no(t),s=this.parentCell(i)?.coords,r=null!=s&&(s.row??-1)>=0&&(s.col??-1)>=0;if(t.cancelable&&r&&Hr(this,Nr).wtSettings.getSetting("isDataViewInstance")){const e=["A","BUTTON","INPUT"];$e()&&(Le.chromeWebKit.value||Le.firefoxWebKit.value)&&this.selectedCellWasTouched(i)&&!e.includes(i.tagName)?t.preventDefault():this.selectedCellWasTouched(i)||"INPUT"===i.tagName&&"checkbox"===i.type||t.preventDefault()}!e||Hr(this,$r)?(this.onMouseUp(t),_r(this,Gr,Date.now()),_r(this,Yr,!0)):(_r(this,Br,null),_r(this,Yr,!1)),this.touchApplied=!1,_r(this,jr,!1),_r(this,$r,!1)}onTouchCancel(){Ar(this,ol,hl).call(this),this.touchApplied=!1,_r(this,Xr,!1),_r(this,jr,!1),_r(this,$r,!1),_r(this,qr,null),_r(this,Br,null),_r(this,Yr,!1)}onHolderScroll(){this.momentumScrolling||(this.momentumScrolling={}),this.touchApplied&&_r(this,jr,!0),Ar(this,ol,hl).call(this),clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||Hr(this,Nr).wtSettings.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,Hr(this,Nr).wtSettings.getSetting("onAfterMomentumScroll"))},200)}onTouchMove(t){if(null===Hr(this,Ur))return;const e=t.touches[0];if(!e)return _r(this,jr,!0),void Ar(this,ol,hl).call(this);const o=Math.abs(e.clientX-Hr(this,Ur).x),n=Math.abs(e.clientY-Hr(this,Ur).y);(o>10||n>10)&&(_r(this,jr,!0),Ar(this,ol,hl).call(this))}callListener(t,e,o,n){const i=Hr(this,Nr).wtSettings.getSettingPure(t);i&&i(e,o,n,Hr(this,Nr).facadeGetter())}destroy(){null!==Hr(this,Lr)[0]&&clearTimeout(Hr(this,Lr)[0]),null!==Hr(this,Lr)[1]&&clearTimeout(Hr(this,Lr)[1]),Ar(this,ol,hl).call(this),this.momentumScrolling&&clearTimeout(this.momentumScrolling._timeout),Hr(this,Nr).eventManager.destroy()}constructor(t,e=null){Wr(this,Zr),Wr(this,Qr),Wr(this,Jr),Wr(this,tl),Wr(this,el),Wr(this,ol),Ir(this,Nr,{writable:!0,value:void 0}),Ir(this,Pr,{writable:!0,value:void 0}),Ir(this,Dr,{writable:!0,value:void 0}),Ir(this,Lr,{writable:!0,value:void 0}),Ir(this,zr,{writable:!0,value:void 0}),Ir(this,Br,{writable:!0,value:void 0}),Ir(this,Vr,{writable:!0,value:void 0}),Ir(this,Fr,{writable:!0,value:void 0}),Ir(this,$r,{writable:!0,value:void 0}),Ir(this,Ur,{writable:!0,value:void 0}),Ir(this,jr,{writable:!0,value:void 0}),Ir(this,qr,{writable:!0,value:void 0}),Ir(this,Gr,{writable:!0,value:void 0}),Ir(this,Yr,{writable:!0,value:void 0}),Ir(this,Xr,{writable:!0,value:void 0}),Ir(this,Kr,{writable:!0,value:void 0}),_r(this,Dr,null),_r(this,Lr,[null,null]),_r(this,zr,[null,null]),_r(this,Br,null),_r(this,Vr,0),_r(this,Fr,null),_r(this,$r,!1),_r(this,Ur,null),_r(this,jr,!1),_r(this,qr,null),_r(this,Gr,0),_r(this,Yr,!1),_r(this,Xr,!1),_r(this,Kr,null),_r(this,Nr,t),_r(this,Pr,e),this.registerEvents()}};function il(t){if(!1===Ks(t))return!1;const e=Date.now()-Hr(this,Gr)<500;return Hr(this,Yr)&&e?("mouseup"===t.type&&_r(this,Yr,!1),!0):(_r(this,Yr,!1),!1)}function sl(t,e){return function(t,e,o){const n=t.wtSettings.getSetting("rtlMode"),i=t.facadeGetter(),s=t.wtSettings.getSetting("fixedColumnsStart"),r=t.wtSettings.getSetting("fixedRowsTop"),l=t.wtSettings.getSetting("fixedRowsBottom"),a=i.wtScroll.getFirstPartiallyVisibleRow(),h=i.wtScroll.getLastPartiallyVisibleRow(),c=i.wtScroll.getFirstPartiallyVisibleColumn(),d=i.wtScroll.getLastPartiallyVisibleColumn(),u=t.geometryReader.getBoundingClientRect(t.wtTable.wtRootElement),g=t.wtSettings.getSetting("columnHeaders").length>0?i.wtViewport.getColumnHeaderHeight():0,p=t.wtSettings.getSetting("rowHeaders").length>0?i.wtViewport.getRowHeaderWidth():0,f=t.rootWindow,m=i.wtViewport.isHorizontallyScrollableByWindow()?Math.min(0,u.left):u.left,w=i.wtViewport.isVerticallyScrollableByWindow()?Math.min(0,u.top):u.top,b=i.wtViewport.isHorizontallyScrollableByWindow()?f.innerWidth:u.left+i.wtViewport.getViewportWidth()+p,v=i.wtViewport.isVerticallyScrollableByWindow()?f.innerHeight:u.top+i.wtViewport.getViewportHeight()+g,C=ds(e,m,b),y=ds(o,w,v);let S=null;if(s>0){const e=i.getCell({row:a,col:0},!0);if(en(e)){const o=t.geometryReader.getBoundingClientRect(e);S=Er(i,a,0,s-1,n?o.right-C:C-o.left)}}if(null===S){const e=i.getCell({row:a,col:c},!0);if(en(e)){const o=t.geometryReader.getBoundingClientRect(e),s=n?o.right-C:C-o.left;S=Er(i,a,c,d,s),null===S&&(S=s<0?c:d)}else S=c}let k=null;if(r>0){const e=i.getCell({row:0,col:c},!0);en(e)&&(k=xr(i,c,0,r-1,y-t.geometryReader.getBoundingClientRect(e).top))}if(null===k&&l>0){const e=t.wtSettings.getSetting("totalRows"),o=e-l,n=e-1,s=i.getCell({row:o,col:c},!0);if(en(s)){const e=y-t.geometryReader.getBoundingClientRect(s).top;e>=0&&(k=xr(i,c,o,n,e),null===k&&(k=n))}}if(null===k){const e=i.getCell({row:a,col:c},!0);en(e)?(k=xr(i,c,a,h,y-t.geometryReader.getBoundingClientRect(e).top),null===k&&(k=h)):k=a}return{coords:i.createCellCoords(k,S),isOutside:e<m||e>b||o<w||o>v}}(Hr(this,Nr),t,e)}function rl(t,e){if(Hr(this,$r)||!e.TD||!e.coords)return void _r(this,Br,null);const o=Date.now();if(null!==Hr(this,Br)&&Hr(this,Br).row===e.coords.row&&Hr(this,Br).col===e.coords.col&&o-Hr(this,Vr)<1e3)return Ar(this,tl,ll).call(this,t,e),void _r(this,Br,null);_r(this,Br,e.coords.clone()),_r(this,Vr,o)}function ll(t,e){go(no(t),"corner")?this.callListener("onCellCornerDblClick",t,e.coords,e.TD):this.callListener("onCellDblClick",t,e.coords,e.TD)}function al(t){Ar(this,ol,hl).call(this);const e=t.touches[0];e&&(_r(this,Ur,{x:e.clientX,y:e.clientY}),_r(this,Fr,setTimeout(()=>{_r(this,Fr,null),_r(this,$r,!0),_r(this,Ur,null),this.onMouseDown(t),Hr(this,zr)[0]=null,Hr(this,zr)[1]=null,_r(this,Br,null),null!==Hr(this,Lr)[0]&&clearTimeout(Hr(this,Lr)[0]),null!==Hr(this,Lr)[1]&&clearTimeout(Hr(this,Lr)[1]);const o=t.target;if(!o)return;const n=new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,clientX:e.clientX,clientY:e.clientY,screenX:e.screenX,screenY:e.screenY});o.dispatchEvent(n)},500)))}function hl(){null!==Hr(this,Fr)&&(clearTimeout(Hr(this,Fr)),_r(this,Fr,null)),_r(this,Ur,null)}const cl={getCell(t){if(null===t.row||null===t.col)return-5;let e=t.row,o=t.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",e,o,!this.isMaster,"render");if(n&&Array.isArray(n)&&([e,o]=n),this.isRowBeforeRenderedRows(e))return-1;if(this.isRowAfterRenderedRows(e))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const i=this.getRow(e);!i&&e>=0&&ce("TR was expected to be rendered but is not");const s=!1!==i?i:null,r=s?.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];return!r&&o>=0&&ce("TD or TH was expected to be rendered but is not"),r},getRow(t){let e=null,o=null;return t<0?(e=this.rowFilter?.sourceRowToVisibleColHeadedRow(t),o=this.THEAD):(e=this.rowFilter?.sourceToRendered(t),o=this.TBODY),null!=e&&null!==o&&(!(o.childNodes.length<e+1)&&o.childNodes[e])},getColumnHeader(t,e=0){const o=this.THEAD.childNodes[e],n=o?.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t)];return en(n)?n:void 0},getColumnHeaders(t){const e=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(t);return this.THEAD.childNodes.forEach(t=>{const n=t.childNodes[o];on(n)&&e.push(n)}),e},getRowHeader(t,e=0){if(e>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(t),n=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(t):o,i=o<0?this.THEAD:this.TBODY,s=i?.childNodes[n],r=s?.childNodes[e];return en(r)?r:void 0},getRowHeaders(t){const e=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<o;n++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)],i=o?.childNodes[n];i&&e.push(i)}return e},getCoords(t){let e=t;if("TD"!==e.nodeName&&"TH"!==e.nodeName&&(e=so(e,["TD","TH"])),null===e)return null;const o=e.parentNode;if(!o)return null;const n=o.parentNode;if(!n)return null;let i=en(o)?function(t){let e=0,o=t;if(o.previousSibling)for(;o=o.previousSibling;)e+=1;return e}(o):0,s=on(e)?e.cellIndex:0;if(ao(Ba,e,this.wtRootElement)||ao(Da,e,this.wtRootElement))"THEAD"===n.nodeName&&(i-=n.childNodes.length);else if(ao(Va,e,this.wtRootElement)||ao(La,e,this.wtRootElement)){i=this.wtSettings.getSetting("totalRows")-n.childNodes.length+i}else n===this.THEAD?i=this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter&&(i=this.rowFilter.renderedToSource(i));ao(Ba,e,this.wtRootElement)||ao(za,e,this.wtRootElement)||ao(Va,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)},getTrForRow(t){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(t)]}};Se(cl,"MIXIN_NAME","cellAccess",{writable:!1,enumerable:!1});const dl={fixTableDomTree(){const t=this.deps.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 o;return e&&e.nodeType===Node.ELEMENT_NODE&&en(e)&&go(e,"wtHolder")||(o=this.deps.rootDocument.createElement("div"),o.className="wtSpreader",e&&t.before(o),o.appendChild(t)),o&&(o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&mo(o,[["role","presentation"]])),o},createHider(t){const e=t.parentNode;let o;return e&&e.nodeType===Node.ELEMENT_NODE&&en(e)&&go(e,"wtHolder")||(o=this.deps.rootDocument.createElement("div"),o.className="wtHider",e&&t.before(o),o.appendChild(t)),o&&this.wtSettings.getSetting("ariaTags")&&mo(o,[["role","presentation"]]),o},createHolder(t){const e=t.parentNode;let o;if(!e||e.nodeType!==Node.ELEMENT_NODE||!en(e)||!go(e,"wtHolder")){if(o=this.deps.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",this.isMaster&&mo(o,[b(-1)]),e&&t.before(o),this.isMaster){const t=o.parentNode;en(t)&&(t.className+="ht_master handsontable",t.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&mo(t,[["role","presentation"]]))}o.appendChild(t)}return o&&this.wtSettings.getSetting("ariaTags")&&mo(o,[["role","presentation"]]),o}};Se(dl,"MIXIN_NAME","domScaffold",{writable:!1,enumerable:!1});const ul={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 this.deps.geometryReader.outerWidth(this.TABLE)},getHeight(){return this.deps.geometryReader.outerHeight(this.TABLE)},getTotalWidth(){const t=this.deps.geometryReader.outerWidth(this.hider);return 0!==t?t:this.getWidth()},getTotalHeight(){const t=this.deps.geometryReader.outerHeight(this.hider);return 0!==t?t:this.getHeight()},isVisible(){return xo(this.TABLE)}},gl={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()}};class pl{setSize(t){this.nextSize=t}setOffset(t){this.nextOffset=t}constructor(){this.nextSize=0,this.nextOffset=0}}class fl{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 pl,this.workingSpace=0,this.sharedSize=null}}class ml{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}getRenderedChildCount(){const{rootNode:t,sizeSet:e}=this;let o=0;if(this.isSharedViewSet()){let n=t.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)o+=1;else if(e.isPlaceOn(1))break;n=n.nextElementSibling}}else o=t.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:t,sizeSet:e}=this,o=this.isSharedViewSet(),{nextSize:n}=e.getViewSize();let i=this.getRenderedChildCount();for(;i<n;){const n=this.nodesPool();!o||e.isPlaceOn(2)?t.appendChild(n):t.insertBefore(n,t.firstChild),i+=1}const s=o&&e.isPlaceOn(1);for(;i>n;){const e=s?t.firstChild:t.lastChild;e&&t.removeChild(e),i-=1}}render(){const{rootNode:t,sizeSet:e}=this;let o=this.visualIndex;this.isSharedViewSet()&&e.isPlaceOn(2)&&e.sharedSize&&(o+=e.sharedSize.nextSize);let n=t.children[o];if(n){if(n.tagName!==this.childNodeType){const t=this.nodesPool();n.replaceWith(t),n=t}}else n=this.nodesPool(),t.appendChild(n);this.collectedNodes.push(n),this.visualIndex+=1}end(){}constructor(t,e,o){this.sizeSet=new fl,this.collectedNodes=[],this.visualIndex=0,this.rootNode=t,this.nodesPool=e,this.childNodeType="string"==typeof o?o.toUpperCase():o}}class wl extends ml{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 bl{setRootDocument(t){this.rootDocument=t}obtain(t,e){return this.rootDocument.createElement(this.nodeType)}constructor(t){this.nodeType=t.toUpperCase()}}class vl{setTable(t){this.nodesPool&&this.nodesPool.setRootDocument(t.rootDocument),this.table=t}render(){}constructor(t,e){this.nodesPool=null,this.renderedNodes=0,this.nodesPool="string"==typeof t?new bl(t):null,this.nodeType=t,void 0!==e&&(this.rootNode=e)}}class Cl extends vl{obtainOrderView(t){return this.orderViews.has(t)||this.orderViews.set(t,new wl(t,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(t)}render(){const{rowsToRender:t,rowHeaderFunctions:e,rowHeadersCount:o,rows:n,cells:i}=this.table;for(let s=0;s<t;s++){const t=this.table.renderedRowToSource(s),r=n.getRenderedNode(s);if(!r)continue;const l=this.obtainOrderView(r),a=i.obtainOrderView(r);l.appendView(a).setSize(o).setOffset(0).start();for(let n=0;n<o;n++){l.render();const o=l.getCurrentNode();o&&(o.className="",o.removeAttribute("style"),wo(o,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&mo(o,[y(),E(),W(n+1),b(-1)]),e[n](t,o,n))}l.end()}}constructor(){super("TH"),this.orderViews=new WeakMap}}class yl extends vl{getRenderedNode(t){return this.orderView.getNode(t)}render(){const{columnHeadersCount:t}=this.table;this.table.isAriaEnabled()&&mo(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();t&&this.table.isAriaEnabled()&&mo(t,[k(),A(e+1)])}this.orderView.end()}constructor(t){super("TR",t),this.orderView=new ml(t,()=>this.nodesPool.obtain(),this.nodeType)}}function Sl(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function kl(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 Rl=new WeakSet;class El extends vl{obtainOrderView(t){return this.orderViews.has(t)||this.orderViews.set(t,new ml(t,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(t)}render(){const{columnHeadersCount:t,columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:n,columnHeaderRows:i}=this.table,s=o+n;for(let o=0;o<t;o++){const t=i.getRenderedNode(o);if(!t)continue;const r=this.obtainOrderView(t);r.setSize(s).setOffset(0).start();for(let t=0;t<s;t++){r.render();const i=t-n,s=this.table.renderedColumnToSource(i),l=r.getCurrentNode();l&&(l.className="",l.removeAttribute("style"),wo(l,[/aria-(.*)/,/role/]),this.table.isAriaEnabled()&&mo(l,[W(t+1),b(-1),S(),...i>=0?[R()]:[C(),x("Select whole grid")]]),e[o](s,l,o))}r.end(),Sl(this,Rl,xl).call(this,t)}}constructor(){super("TH"),kl(this,Rl),this.orderViews=new WeakMap}}function xl(t){const{children:e}=t;let o=null;for(let t=e.length-1;t>=0;t--){const n=e[t];null!==o||go(n,"hiddenHeader")?go(n,"htLastVisibleHeader")&&fo(n,"htLastVisibleHeader"):(o=n,go(n,"htLastVisibleHeader")||po(n,"htLastVisibleHeader"))}}let Ml=!1;class Tl extends vl{render(){const{columnsToRender:t,rowHeadersCount:e}=this.table,o=t+e;!Ml&&t>1e3&&(Ml=!0,Xe(X`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
|
|
45
|
+
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
|
46
|
+
turning off the "renderAllColumns" option.`)),this.orderView.setSize(o).setOffset(0).start();for(let t=0;t<o;t++){this.orderView.render();const o=this.orderView.getCurrentNode();if(o)if(t<e){const e=this.table.renderedColumnToSource(t);o.style.width=`${this.table.columnUtils.getHeaderWidth(e)}px`}else{const n=this.table.renderedColumnToSource(t-e);o.style.width=`${this.table.columnUtils.getWidth(n)}px`}}this.orderView.end();const n=this.rootNode.firstChild;n&&po(n,"rowHeader")}constructor(t){super("COL",t),this.orderView=new ml(t,()=>this.nodesPool.obtain(),this.nodeType)}}const Hl="ht__row_even",Il="ht__row_odd";let _l=!1;class Al extends vl{getRenderedNode(t){return this.orderView.getNode(t)}render(){const{rowsToRender:t}=this.table;!_l&&t>1e3&&(_l=!0,Xe(X`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
|
|
47
|
+
Consider limiting the number of rendered rows by specifying the table height and/or\x20
|
|
48
|
+
turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&mo(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(),o=this.table.renderedRowToSource(e);t&&(this.table.isAriaEnabled()&&mo(t,[k(),A(o+(this.table.rowUtils?.deps?.getColumnHeaders()?.length??0)+1)]),(o+1)%2==0?go(t,Hl)||(fo(t,Il),po(t,Hl)):go(t,Il)||(fo(t,Hl),po(t,Il)))}this.orderView.end()}constructor(t){super("TR",t),this.orderView=new ml(t,()=>this.nodesPool.obtain(),this.nodeType)}}class Wl extends vl{obtainOrderView(t){return this.orderViews.has(t)||this.orderViews.set(t,new wl(t,()=>this.nodesPool.obtain(),this.nodeType)),this.orderViews.get(t)}render(){const{rowsToRender:t,columnsToRender:e,rows:o,rowHeaders:n}=this.table;for(let i=0;i<t;i++){const t=this.table.renderedRowToSource(i),s=o.getRenderedNode(i);if(!s)continue;const r=this.obtainOrderView(s),l=n.obtainOrderView(s);r.prependView(l).setSize(e).setOffset(0).start();for(let o=0;o<e;o++){r.render();const e=this.table.renderedColumnToSource(o),n=r.getCurrentNode();n&&(go(n,"hide")||(n.className=""),n.removeAttribute("style"),n.removeAttribute("dir"),wo(n,[/aria-(.*)/,/role/]),this.table.cellRenderer(t,e,n),this.table.isAriaEnabled()&&mo(n,[...n.hasAttribute("role")?[]:[v()],b(-1),W(e+(this.table.rowUtils?.deps?.getRowHeaders()?.length??0)+1)]))}r.end()}}constructor(){super("TD"),this.orderViews=new WeakMap}}function Ol(t,e){return t-function(t){return t?0:1}(e)}function Nl(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pl(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Dl(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Pl(t,e,"get"))}function Ll(t,e,o){Nl(t,e),e.set(t,o)}function zl(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Pl(t,e,"set"),o),o}function Bl(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Vl(t,e){Nl(t,e),e.add(t)}var Fl=new WeakMap,$l=new WeakMap,Ul=new WeakMap,jl=new WeakMap,ql=new WeakMap,Gl=new WeakMap,Yl=new WeakSet,Xl=new WeakSet;class Kl{setActiveOverlayName(t){this.activeOverlayName=t}setAxisUtils(t,e){this.rowUtils=t,this.columnUtils=e}setViewportSize(t,e){this.rowsToRender=t,this.columnsToRender=e}setColumnHeadersRenderSkippable(t){zl(this,Fl,t)}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:o,colGroup:n,rows:i,cells:s}){t.setTable(this),e.setTable(this),o.setTable(this),n.setTable(this),i.setTable(this),s.setTable(this),this.rowHeaders=t,this.columnHeaderRows=e,this.columnHeaders=o,this.colGroup=n,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(){Bl(this,Yl,Zl).call(this)||(this.columnHeaderRows.render(),this.columnHeaders.render(),Bl(this,Xl,Ql).call(this)),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:t,rows:e}=this;for(let o=0;o<t;o++){const t=e.getRenderedNode(o),n=this.rowUtils;if(t&&t.firstChild){const e=this.renderedRowToSource(o),i=n.getHeightByOverlayName(e,this.activeOverlayName);if(i){const e=Ol(i,this.stylesHandler.areCellsBorderBox());t.firstChild.style.height=`${e}px`}else t.firstChild.style.height=""}}}constructor(t,{cellRenderer:e,stylesHandler:o}={}){Vl(this,Yl),Vl(this,Xl),Ll(this,Fl,{writable:!0,value:void 0}),Ll(this,$l,{writable:!0,value:void 0}),Ll(this,Ul,{writable:!0,value:void 0}),Ll(this,jl,{writable:!0,value:void 0}),Ll(this,ql,{writable:!0,value:void 0}),Ll(this,Gl,{writable:!0,value:void 0}),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,zl(this,Fl,!1),zl(this,$l,!1),zl(this,Ul,-1),zl(this,jl,-1),zl(this,ql,-1),zl(this,Gl,-1),this.rootNode=t,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=e,this.stylesHandler=o}}function Zl(){return Dl(this,Fl)&&Dl(this,$l)&&Dl(this,Ul)===(this.columnFilter?this.columnFilter.offset:0)&&Dl(this,jl)===this.columnsToRender&&Dl(this,ql)===this.columnHeadersCount&&Dl(this,Gl)===this.rowHeadersCount}function Ql(){zl(this,$l,!0),zl(this,Ul,this.columnFilter?this.columnFilter.offset:0),zl(this,jl,this.columnsToRender),zl(this,ql,this.columnHeadersCount),zl(this,Gl,this.rowHeadersCount)}class Jl{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}setColumnHeadersRenderSkippable(t){return this.renderer.setColumnHeadersRenderSkippable(t),this}render(){this.renderer.render()}constructor({TABLE:t,THEAD:e,COLGROUP:o,TBODY:n,rowUtils:i,columnUtils:s,cellRenderer:r,stylesHandler:l}={}){this.renderer=new Kl(t,{cellRenderer:r,stylesHandler:l}),this.renderer.setRenderers({rowHeaders:new Cl,columnHeaderRows:new yl(e),columnHeaders:new El,colGroup:new Tl(o),rows:new Al(n),cells:new Wl}),this.renderer.setAxisUtils(i,s)}}function ta(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ea(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ta(t,e,"get"))}function oa(t,e,o){!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,o)}function na(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ta(t,e,"set"),o),o}var ia=new WeakMap,sa=new WeakMap;class ra{get deps(){return ea(this,ia)}getWidth(t){return ea(this,sa).getSize(t)||ea(this,sa).getDefaultSize()}getHeaderHeight(t){const e=this.wtSettings.getSetting("stylesHandler").getDefaultRowHeight(),o=this.wtSettings.getSetting("columnHeaderHeight"),n=Array.isArray(o)?o[t]:o;return null!=n?e?Math.max(e,n):n:e}getHeaderWidth(t){const{columnFilter:e}=ea(this,ia).getWtTable();if(e)return this.headerWidths.get(e.sourceToRendered(t))}calculateWidths(){const{wtSettings:t}=this;let e=t.getSetting("rowHeaderWidth");if(e=t.getSetting("onModifyRowHeaderWidth",e),null!=e){const o=t.getSetting("rowHeaders").length,n=t.getSetting("defaultColumnWidth");for(let t=0;t<o;t++){let o=Array.isArray(e)?e[t]:e;o=null==o?n:o,this.headerWidths.set(t,o)}}}constructor(t){oa(this,ia,{writable:!0,value:void 0}),oa(this,sa,{writable:!0,value:void 0}),this.headerWidths=new Map,na(this,ia,t),na(this,sa,t.columnSizeSource),this.wtSettings=t.wtSettings}}function la(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,la(t,e,"get"))}function ha(t,e,o){!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,o)}function ca(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,la(t,e,"set"),o),o}var da=new WeakMap,ua=new WeakMap;class ga{get deps(){return aa(this,da)}getHeight(t){let e=aa(this,ua).getSize(t);const o=aa(this,da).getWtViewport().oversizedRows[t];return void 0!==o&&(e=void 0===e?o:Math.max(e,o)),e}getHeightByOverlayName(t,e){let o=aa(this,ua).getSizeForOverlay(t,e);const n=aa(this,da).getWtViewport().oversizedRows[t];return void 0!==n&&(o=void 0===o?n:Math.max(o,n)),o}constructor(t){ha(this,da,{writable:!0,value:void 0}),ha(this,ua,{writable:!0,value:void 0}),ca(this,da,t),ca(this,ua,t.rowSizeSource),this.wtSettings=t.wtSettings}}class pa{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,o){this.offset=t,this.total=e,this.countTH=o}}class fa{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,o){this.offset=t,this.total=e,this.countTH=o}}function ma(t){const{wtSettings:e}=t,o=t.THEAD.childNodes,n=e.getSetting("stylesHandler").getDefaultRowHeight();for(let i=0,s=e.getSetting("columnHeaders").length;i<s;i++){const e=t.getColumnHeaderHeight(i);if(e>n){if(!o[i]||0===o[i].childNodes.length)return;const t=o[i].childNodes[0];en(t)&&(t.style.height=`${e}px`)}}}function wa(t){const e=t.deps.getWtOverlays(),o=e.topInlineStartCornerOverlay?.clone;if(!o?.wtTable?.THEAD)return;const n=t.wtSettings.getSetting("columnHeaders");if(!n.length)return;const i=o.wtTable.THEAD.childNodes,s=e.topOverlay?.clone,r=[t.THEAD,s?.wtTable?.THEAD];for(let e=0,o=n.length;e<o;e++){const o=i[e];if(!en(o))continue;const n=t.deps.geometryReader.getBoundingClientRect(o).height;r.forEach(o=>{const i=o?.childNodes[e];if(!en(i)||0===i.childNodes.length)return;const s=i.childNodes[0];if(!en(s))return;const r=t.deps.geometryReader.getBoundingClientRect(i).height;Math.abs(r-n)>.1&&(s.style.height=`${n}px`)})}}function ba(t){const{TBODY:e,rowFilter:o}=t;if(!e||!o)return;const n=t.wtSettings.getSetting("stylesHandler").areCellsBorderBox(),i=e.childNodes;for(let e=0;e<i.length;e++){const s=i[e].firstChild;if(!en(s))continue;const r=o.renderedToSource(e),l=t.rowUtils.getHeightByOverlayName(r,t.name);s.style.height=l?`${Ol(l,n)}px`:""}}function va(t){const{wtSettings:e}=t;return!e.getSetting("externalRowCalculator")&&!!e.getSetting("fixedColumnsStart")&&t.getFirstRenderedColumn()>0}function Ca(t,e,{deferShrinkDetection:o=!1,recordedRows:n}={}){if(t.wtSettings.getSetting("externalRowCalculator"))return!1;let i=t.TBODY.childNodes.length;const s=t.wtSettings.getSetting("stylesHandler"),r=i*s.getDefaultRowHeight(),l=t.deps.geometryReader.innerHeight(t.TBODY)-1,a=s.areCellsBorderBox(),h=a?e=>t.deps.geometryReader.outerHeight(e):e=>t.deps.geometryReader.innerHeight(e),c=a?0:1,d=a?1:0;let u,g,p,f,m;if(r===l&&!t.wtSettings.getSetting("fixedRowsBottom"))return!o&&void 0!==e&&e.size>0&&(t.deps.getWtViewport().invalidateRowHeightCache(),!0);const w=t.deps.getWtViewport();let b=!1;for(;i;){i-=1,p=t.rowFilter.renderedToSource(i),u=t.getRowHeight(p),f=t.getTrForRow(p),m=f.querySelector("th");const o=0===i?d:0;if(g=m?h(m):h(f)-c,!u&&s.getDefaultRowHeight()<g-o||void 0!==u&&u<g){a||(g+=1),w.oversizedRows[p]=g,n?.add(p);const t=e?.get(p);(void 0===t||Math.abs(g-t)>1)&&(b=!0),e?.delete(p)}}return!o&&void 0!==e&&e.size>0&&(b=!0),b&&w.invalidateRowHeightCache(),b}function ya(t,e){const{wtSettings:o}=t,n=o.getSetting("rowHeaders"),i=o.getSetting("columnHeaders"),s={runFastDraw:e,performRedraw:!0,positionChanged:!1,syncFrozenRows:!1,rowHeaders:n,columnHeaders:i,rowHeadersCount:n.length,columnHeadersCount:i.length};t.isMaster?function(t,e){const{wtSettings:o}=t,n=t.deps.getWtOverlays(),i=t.deps.getWtViewport(),s=function(t,e){return{rowsRenderCalculator:e.rowsRenderCalculator,columnsRenderCalculator:e.columnsRenderCalculator,rowFilter:t.rowFilter,columnFilter:t.columnFilter,correctHeaderWidth:t.correctHeaderWidth}}(t,i);n.isScrollDrivenDraw=e.runFastDraw,n.beforeDraw(),t.holderOffset=t.deps.geometryReader.offset(t.holder),i.rowHeightCache.ensureBuilt(),i.columnWidthCache.ensureBuilt(),i.usesLayoutSnapshotForCalculators()&&n.prepareHeaderBorders();if(i.beginDrawLayout(),e.runFastDraw=i.createCalculators(e.runFastDraw,{stationaryBands:n.isScrollDrivenDraw&&i.allowsStationaryBands()}),e.rowHeadersCount&&!o.getSetting("fixedColumnsStart")){const o=n.inlineStartOverlay.getScrollPosition(),i=t.correctHeaderWidth;t.correctHeaderWidth=0!==o,i!==t.correctHeaderWidth&&(e.runFastDraw=!1)}if(e.runFastDraw)n.refresh(!0),wa(t);else{t.tableOffset=t.deps.geometryReader.offset(t.TABLE);const r=Sa(t,e);e.syncFrozenRows=va(t),e.syncFrozenRows||i.releaseFrozenOversizedRows(),t.alignOverlaysWithTrimmingContainer();const l={},a=i.renderCycleSeq;if(o.getSetting("beforeDraw",!0,l),e.performRedraw=!0!==l.skipRender,e.performRedraw){if(Ra(t,e,r,ka(n)),!o.getSetting("externalRowCalculator")){const t=i.usesLayoutSnapshotForCalculators()&&i.rowHeightCache.isCurrent()&&i.columnWidthCache.isCurrent();i.rowHeightCache.ensureBuilt(),i.columnWidthCache.ensureBuilt(),t||i.createVisibleCalculators()}const s=e.syncFrozenRows?function(t){const e=t.deps.getWtViewport(),{frozenOversizedRows:o}=e;if(0===o.size)return;e.frozenClearRowCacheBuildSeq=e.rowHeightCache.buildSeq;const{wtSettings:n}=t,i=new Map,s=t=>{if(!o.has(t))return;const n=e.oversizedRows[t];void 0!==n&&i.set(t,n),delete e.oversizedRows[t],o.delete(t)},r=t.getRenderedRowsCount();for(let e=0;e<r;e++)s(t.rowFilter.renderedToSource(e));const l=n.getSetting("totalRows"),a=n.getSetting("fixedRowsTop"),h=n.getSetting("fixedRowsBottom");for(let t=0;t<a;t++)s(t);for(let t=Math.max(0,l-h);t<l;t++)s(t);return i}(t):void 0;n.refresh(!1),wa(t);const l=function(t,e){const o=t.deps.getWtOverlays(),n=va(t),i=n?[o.inlineStartOverlay,o.topInlineStartCornerOverlay,o.bottomInlineStartCornerOverlay].filter(t=>t?.needFullRender).map(t=>t?.clone?.wtTable).filter(t=>!!t?.TBODY):[],s=()=>void 0!==e&&e.size>0&&(t.deps.getWtViewport().invalidateRowHeightCache(),!0),r=()=>{const o=t.deps.getWtViewport();return void 0!==e&&o.rowHeightCache.buildSeq!==o.frozenClearRowCacheBuildSeq&&(o.invalidateRowHeightCache(),!0)};if(!n||0===i.length){const t=s();return!(!r()&&!t||(o.adjustElementsSize(),0))}const l=new Set;let a=!1;i.forEach(t=>{a=Ca(t,e,{deferShrinkDetection:!0,recordedRows:l})||a});const{frozenOversizedRows:h}=t.deps.getWtViewport();l.forEach(t=>h.add(t)),a=s()||a;const c=r(),d=[o.topOverlay?.clone?.wtTable,o.bottomOverlay?.clone?.wtTable,...i];if(a){ba(t);const e=new Set;Ca(t,void 0,{recordedRows:e}),e.forEach(t=>h.delete(t)),e.size>0&&d.push(t)}return(l.size>0||a)&&(d.includes(t)||d.push(t),d.forEach(t=>{t&&ba(t)})),!(!a&&!c||(o.adjustElementsSize(),0))}(t,s);l&&!o.getSetting("externalRowCalculator")&&(i.rowHeightCache.ensureBuilt(),i.columnWidthCache.ensureBuilt(),i.createVisibleCalculators()),n.applyToDOM(),o.getSetting("onDraw",!0)}else!function(t,e,o,n){const{wtSettings:i}=t;if(e.renderCycleSeq!==n)return;t.correctHeaderWidth=o.correctHeaderWidth,(null===o.rowFilter||o.rowFilter.total===i.getSetting("totalRows"))&&(e.rowsRenderCalculator=o.rowsRenderCalculator,null!==o.rowFilter&&(t.rowFilter=o.rowFilter));null!==o.columnFilter&&o.columnFilter.total!==i.getSetting("totalColumns")||(e.columnsRenderCalculator=o.columnsRenderCalculator,null!==o.columnFilter&&(t.columnFilter=o.columnFilter))}(t,i,s,a)}xa(t,e),e.positionChanged?(e.performRedraw?n.refreshAll():(xa(t,e),Ea(t,e.runFastDraw)),n.adjustElementsSize()):Ea(t,e.runFastDraw);n.afterDraw(!e.runFastDraw&&e.performRedraw),t.deps.setDrawn(!0)}(t,s):function(t,e){if(!e.runFastDraw){t.tableOffset=t.deps.getParentTableOffset();const o=Sa(t,e),n=t.deps.getCloneSource().wtOverlays;Ra(t,e,o,ka(n)),t.is(La)&&t.deps.getCloneSource().wtOverlays.adjustElementsSize()}Ea(t,e.runFastDraw),t.deps.setDrawn(!0)}(t,s)}function Sa(t,e){const o=Math.max(t.getFirstRenderedRow(),0),n=Math.max(t.getFirstRenderedColumn(),0),i=new fa(o,t.wtSettings.getSetting("totalRows"),e.columnHeadersCount),s=new pa(n,t.wtSettings.getSetting("totalColumns"),e.rowHeadersCount);return t.rowFilter=i,t.columnFilter=s,{rowFilter:i,columnFilter:s}}function ka(t){return!!t&&t.isScrollDrivenDraw&&t.verticalScrolling&&!t.horizontalScrolling}function Ra(t,e,o,n){t.tableRenderer.setHeaderContentRenderers(e.rowHeaders,e.columnHeaders),(t.is(La)||t.is(Va))&&t.tableRenderer.setHeaderContentRenderers(e.rowHeaders,[]),t.tableRenderer.setColumnHeadersRenderSkippable(n);const i=function(t){const{wtSettings:e}=t,o=t.deps.getWtViewport();if(!t.isMaster&&!t.is(La))return;if(e.getSetting("externalRowCalculator"))return;const n=t.getRenderedRowsCount(),i=new Map;for(let e=0;e<n;e++){const n=t.rowFilter.renderedToSource(e),s=o.oversizedRows?.[n];s&&!o.frozenOversizedRows.has(n)&&(i.set(n,s),delete o.oversizedRows[n])}return i}(t);t.tableRenderer.setActiveOverlayName(t.name).setViewportSize(t.getRenderedRowsCount(),t.getRenderedColumnsCount()).setFilters(o.rowFilter,o.columnFilter).render(),t.deps.getWtViewport().renderCycleSeq+=1,ma(t),(t.isMaster||t.is(La))&&Ca(t,i)}function Ea(t,e){t.deps.getSelectionManager().setActiveOverlay(t.facadeGetter()).render(e)}function xa(t,e){const o=t.deps.getWtOverlays();e.positionChanged=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(e.positionChanged=o.bottomOverlay.resetFixedPosition()||e.positionChanged),e.positionChanged=o.inlineStartOverlay.resetFixedPosition()||e.positionChanged,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()}function Ma(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ta(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Ma(t,e,"get"))}function Ha(t,e,o){!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,o)}function Ia(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Ma(t,e,"set"),o),o}function _a(t){return{wot:t.wot,facadeGetter:t.getFacade(),wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootTable:t.rootTable,geometryReader:t.geometryReader,rowSizeSource:t.rowSizeSource,columnSizeSource:t.columnSizeSource,getWtTable:t.getWtTable,getWtViewport:t.getWtViewport,getWtOverlays:t.getWtOverlays,getSelectionManager:t.getSelectionManager,getCloneSource:t.getCloneSource,getParentTableOffset:t.getParentTableOffset,getColumnHeaders:t.getColumnHeaders,getRowHeaders:t.getRowHeaders,isDrawn:t.isDrawn,setDrawn:t.setDrawn}}var Aa=new WeakMap;class Wa{get deps(){return Ta(this,Aa)}alignOverlaysWithTrimmingContainer(){}is(t){return this.name===t}draw(t=!1){return ya(this,t),this}_modifyRowHeaderWidth(t){let e="function"==typeof t?t():t;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="number"==typeof t?t:this.wtSettings.getSetting("defaultColumnWidth");return this.correctHeaderWidth&&(e+=1),e}destroy(){}constructor(t,e){Ha(this,Aa,{writable:!0,value:void 0}),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.isMaster="master"===e,this.name=e,Ia(this,Aa,t),this.facadeGetter=t.facadeGetter,this.wtSettings=t.wtSettings,this.wot=Ta(this,Aa).wot,this.TABLE=t.rootTable,bo(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 o=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(o)),this.rowUtils=new ga(Ta(this,Aa)),this.columnUtils=new ra(Ta(this,Aa)),this.tableRenderer=new Jl({TABLE:this.TABLE,THEAD:this.THEAD??void 0,COLGROUP:this.COLGROUP??void 0,TBODY:this.TBODY??void 0,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.wtSettings.getSetting("stylesHandler")})}}be(Wa,cl),be(Wa,dl),be(Wa,ul),be(Wa,gl);const Oa={getFirstRenderedRow(){const t=this.getRenderedRowsCount();return 0===t?-1:(this.wtSettings.getSetting("totalRows")??0)-t},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return 0===this.getRenderedRowsCount()?-1:(this.wtSettings.getSetting("totalRows")??0)-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows")??0,this.wtSettings.getSetting("fixedRowsBottom"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};Se(Oa,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const Na={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")??0,this.wtSettings.getSetting("fixedColumnsStart"))},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.deps.getRowHeaders().length}};Se(Na,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});class Pa extends Wa{constructor(t){super(t,Va)}}be(Pa,Oa),be(Pa,Na);const Da="top",La="bottom",za="inline_start",Ba="top_inline_start_corner",Va="bottom_inline_start_corner",Fa=[Da,La,za,Ba,Va],$a=new Map([[Da,`ht_clone_${Da}`],[La,`ht_clone_${La}`],[za,`ht_clone_${za} ht_clone_left`],[Ba,`ht_clone_${Ba} ht_clone_top_left_corner`],[Va,`ht_clone_${Va} ht_clone_bottom_left_corner`]]);function Ua(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ja(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,ja(t,e,"get"))}function Ga(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ja(t,e,"set"),o),o}function Ya(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Xa(t,e){Ua(t,e),e.add(t)}var Ka=new WeakMap,Za=new WeakSet,Qa=new WeakSet;class Ja{scrollViewport(t,e,o){if(t.col<0||t.row<0)return!1;const n=this.scrollViewportHorizontally(t.col,e),i=this.scrollViewportVertically(t.row,o);return n||i}scrollViewportHorizontally(t,e="auto"){const{wtSettings:o}=qa(this,Ka);if(!qa(this,Ka).isDrawn())return!1;const n=o.getSetting("totalColumns"),i=Me(e);if(t=o.getSetting("onBeforeViewportScrollHorizontally",t,i),!Number.isInteger(t)||t<0||t>n)return!1;e=i.value;const s=o.getSetting("fixedColumnsStart"),r=qa(this,Ka).getInlineStartOverlay(),l="auto"===e;if(l&&t<s)return!1;const a=this.getFirstVisibleColumn(),h=this.getLastVisibleColumn();let c=!1;return(l&&(t<a||t>h)||!l)&&(c=r.scrollTo(t,l?t>=this.getLastPartiallyVisibleColumn():"end"===e)),c}scrollViewportVertically(t,e="auto"){const{wtSettings:o}=qa(this,Ka);if(!qa(this,Ka).isDrawn())return!1;const n=o.getSetting("totalRows"),i=Me(e);if(t=o.getSetting("onBeforeViewportScrollVertically",t,i),!Number.isInteger(t)||t<0||t>n)return!1;e=i.value;const s=o.getSetting("fixedRowsBottom"),r=o.getSetting("fixedRowsTop"),l=qa(this,Ka).getTopOverlay(),a="auto"===e;if(a&&(t<r||t>n-s-1))return!1;const h=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let d=!1;return(a&&(t<h||t>c)||!a)&&(d=l.scrollTo(t,a?t>=this.getLastPartiallyVisibleRow():"bottom"===e)),d}getFirstVisibleRow(){return qa(this,Ka).getWtTable().getFirstVisibleRow()}getLastVisibleRow(){return Ya(this,Qa,eh).call(this,qa(this,Ka).getWtTable().getLastVisibleRow())}getFirstPartiallyVisibleRow(){return qa(this,Ka).getWtTable().getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return Ya(this,Qa,eh).call(this,qa(this,Ka).getWtTable().getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return qa(this,Ka).getWtTable().getFirstVisibleColumn()}getLastVisibleColumn(){return Ya(this,Za,th).call(this,qa(this,Ka).getWtTable().getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return qa(this,Ka).getWtTable().getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return Ya(this,Za,th).call(this,qa(this,Ka).getWtTable().getLastPartiallyVisibleColumn())}constructor(t){var e,o,n;Xa(this,Za),Xa(this,Qa),n={writable:!0,value:void 0},Ua(e=this,o=Ka),o.set(e,n),Ga(this,Ka,t)}}function th(t){const{wtSettings:e,rootWindow:o,geometryReader:n}=qa(this,Ka),i=qa(this,Ka).getInlineStartOverlay(),s=qa(this,Ka).getWtTable(),r=qa(this,Ka).getWtViewport(),l=e.getSetting("totalColumns");if(i.mainTableScrollableElement===o){let a=null;if(e.getSetting("rtlMode")){const t=n.getBoundingClientRect(s.TABLE),e=o.document,i=n.offsetWidth(e.documentElement);a=Math.abs(t.right-i)}else{a=n.offset(s.wtRootElement).left}const h=Math.abs(Ho(o,o));if(a>h){const e=n.innerWidth(o);let s=r.getRowHeaderWidth();for(let o=1;o<=l;o++)if(s+=i.sumCellSizes(o-1,o),a+s-h>=e){t=o-2;break}}}return t}function eh(t){const{wtSettings:e,rootWindow:o,geometryReader:n}=qa(this,Ka),i=qa(this,Ka).getTopOverlay(),s=qa(this,Ka).getWtTable(),r=qa(this,Ka).getWtViewport(),l=e.getSetting("totalRows");if(i.mainTableScrollableElement===o){const e=n.offset(s.wtRootElement),a=To(o,o);if(e.top>a){const s=n.innerHeight(o);let h=r.getColumnHeaderHeight();for(let o=1;o<=l;o++)if(h+=i.sumCellSizes(o-1,o),e.top+h-a>=s){t=o-2;break}}}return t}function oh(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function nh(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,oh(t,e,"get"))}function ih(t,e,o){!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,o)}function sh(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,oh(t,e,"set"),o),o}var rh=new WeakMap;class lh{clientWidth(t){return t.clientWidth}clientHeight(t){return t.clientHeight}offsetWidth(t){return t.offsetWidth}offsetHeight(t){return t.offsetHeight}offsetTop(t){return t.offsetTop}offsetLeft(t){return t.offsetLeft}offsetParent(t){return t.offsetParent}isRendered(t){return t.isConnected&&t.getClientRects().length>0}scrollWidth(t){return t.scrollWidth}scrollHeight(t){return t.scrollHeight}getBoundingClientRect(t){return t.getBoundingClientRect()}outerWidth(t){return Do(t)}outerHeight(t){return Lo(t)}innerHeight(t){return zo(t)}innerWidth(t){return function(t){return t instanceof Window?t.innerWidth:t.clientWidth}(t)}offset(t){return Mo(t)}getScrollbarWidth(t){return jo(t)}getComputedStyle(t){return nh(this,rh).getComputedStyle(t)}getStyle(t,e){return Po(t,e,nh(this,rh))}getMaximumScrollTop(t){return function(t){return t.scrollHeight-t.clientHeight}(t)}getMaximumScrollLeft(t){return function(t){return t.scrollWidth-t.clientWidth}(t)}constructor(t){ih(this,rh,{writable:!0,value:void 0}),sh(this,rh,t)}}function ah(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function hh(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ah(t,e,"get"))}function ch(t,e,o){!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,o)}function dh(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ah(t,e,"set"),o),o}var uh=new WeakMap;class gh{getSize(t){return hh(this,uh).getSetting("rowHeight",t)}getSizeForOverlay(t,e){return hh(this,uh).getSetting("rowHeightByOverlayName",t,e)}getDefaultSize(){return hh(this,uh).getSetting("stylesHandler").getDefaultRowHeight()}isUniform(){return hh(this,uh).getSetting("rowHeightsUniform")}constructor(t){ch(this,uh,{writable:!0,value:void 0}),dh(this,uh,t)}}var ph=new WeakMap;class fh{getSize(t){return hh(this,ph).getSetting("columnWidth",t)}getDefaultSize(){return hh(this,ph).getSetting("defaultColumnWidth")}isUniform(){return hh(this,ph).getSetting("columnWidthsUniform")}constructor(t){ch(this,ph,{writable:!0,value:void 0}),dh(this,ph,t)}}class mh{get eventManager(){return new _i(this)}get rootDocument(){return this.domBindings.rootDocument}get rootWindow(){return this.domBindings.rootWindow}getSetting(t,...e){return this.wtSettings.getSetting(t,...e)}update(t,e){this.wtSettings.update(t,e)}findOriginalHeaders(){const t=[];if(this.wtTable.THEAD&&this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let e=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;e<o;e++)t.push(this.wtTable.THEAD.childNodes[0].childNodes[e].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(e,o){Eo(o,t[e])}])}}createCellCoords(t,e){return new pr(t,e,this.wtSettings.getSetting("rtlMode"))}createCellRange(t,e,o){return new Sr(t,e,o,this.wtSettings.getSetting("rtlMode"))}draw(t=!1){return this.drawInterrupted=!1,!this.wtTable.isVisible()||function(t){const e=t.ownerDocument.defaultView;let o=t;for(;o.parentElement;){if("0px"===o.style.height||"0"===o.style.height){const t=e?.getComputedStyle(o).getPropertyValue("overflow");return"hidden"===t||"clip"===t}o=o.parentElement}return!1}(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(t),this}getCell(t,e=!1){if(null===t.row||null===t.col)return;if(!e)return this.wtTable.getCell(t);const o=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),i=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");return t.row<n&&t.col<s?this.wtOverlays.topInlineStartCornerOverlay.clone?.wtTable.getCell(t):t.row<n?this.wtOverlays.topOverlay.clone?.wtTable.getCell(t):t.col<s&&t.row>=o-i?this.wtOverlays.bottomInlineStartCornerOverlay?.clone?.wtTable.getCell(t):t.col<s?this.wtOverlays.inlineStartOverlay.clone?.wtTable.getCell(t):t.row<o&&t.row>=o-i?this.wtOverlays.bottomOverlay?.clone?.wtTable.getCell(t):this.wtTable.getCell(t)}scrollViewport(t,e,o){return null!==t.row&&null!==t.col&&this.wtScroll.scrollViewport(t,e,o)}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()]}getOverlayByName(t){return null}exportSettingsAsClassNames(){}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}constructor(t,e,o){var n,i;this.guid=`wt_${Sn()}`,this.drawInterrupted=!1,this.drawn=!1,this.activeOverlayName="master",this.domBindings={rootTable:t,rootDocument:t.ownerDocument,rootWindow:t.ownerDocument.defaultView,geometryReader:o??new lh(t.ownerDocument.defaultView)},this.wtSettings=e,this.engineContext={wot:n=this,wtSettings:n.wtSettings,rootDocument:n.domBindings.rootDocument,rootWindow:n.domBindings.rootWindow,rootTable:n.domBindings.rootTable,geometryReader:n.domBindings.geometryReader,rowSizeSource:new gh(n.wtSettings),columnSizeSource:new fh(n.wtSettings),makeEventManager:()=>n.eventManager,getFacade:()=>n.wtSettings.getSetting("facade",n),isDrawn:()=>n.drawn,setDrawn:t=>{n.drawn=t},getWtTable:()=>n.wtTable,getWtViewport:()=>n.wtViewport,getWtOverlays:()=>n.wtOverlays,getWtEvent:()=>n.wtEvent,getSelectionManager:()=>n.selectionManager,getCloneSource:()=>n.cloneSource,getParentTableOffset:()=>n.cloneSource.wtTable.tableOffset,getColumnHeaders:()=>n.wtSettings.getSetting("columnHeaders"),getRowHeaders:()=>n.wtSettings.getSetting("rowHeaders"),getTopOverlay:()=>n.wtOverlays.topOverlay,getInlineStartOverlay:()=>n.wtOverlays.inlineStartOverlay,getBottomOverlay:()=>n.wtOverlays.bottomOverlay},this.wtScroll=new Ja({wtSettings:(i=this.engineContext).wtSettings,rootWindow:i.rootWindow,geometryReader:i.geometryReader,isDrawn:i.isDrawn,getWtTable:i.getWtTable,getWtViewport:i.getWtViewport,getTopOverlay:i.getTopOverlay,getInlineStartOverlay:i.getInlineStartOverlay})}}class wh extends mh{constructor(t,e,o){super(t,e,o.geometryReader),this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(_a(this.engineContext)),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new nl(Or(this.engineContext),o.event),this.findOriginalHeaders()}}function bh(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function vh(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,bh(t,e,"get"))}function Ch(t,e,o){!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,o)}function yh(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,bh(t,e,"set"),o),o}var Sh=new WeakMap;class kh{get deps(){return vh(this,Sh)}prepareHeaderBorders(){}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=No(this.hider.parentNode?.parentNode??this.hider)}updateMainScrollableElement(){const t=vh(this,Sh).getWtTable(),{rootWindow:e}=vh(this,Sh),o=vh(this,Sh).geometryReader.getComputedStyle(t.wtRootElement.parentNode).getPropertyValue("overflow"),n=this.wtSettings.getSetting("preventOverflow");"hidden"===o||"clip"===o?this.mainTableScrollableElement=vh(this,Sh).getWtTable().holder:"horizontal"===n&&this.type===Da||"vertical"===n&&this.type===za?this.mainTableScrollableElement=e:this.mainTableScrollableElement=Io(t.TABLE)}getRelativeCellPosition(t,e,o){if(!this.clone||!1===this.clone.wtTable.holder.contains(t))return void Xe(`The provided element is not a child of the ${this.type} overlay`);const n=this.mainTableScrollableElement===vh(this,Sh).rootWindow,i=o<this.wtSettings.getSetting("fixedColumnsStart"),s=e<this.wtSettings.getSetting("fixedRowsTop"),r=e>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,{geometryReader:a}=vh(this,Sh),h={start:this.getRelativeStartPosition(l),top:a.offsetTop(l)},c={start:this.getRelativeStartPosition(t),top:a.offsetTop(t)};let d=null;return d=n?this.getRelativeCellPositionWithinWindow(s,i,c,h):this.getRelativeCellPositionWithinHolder(s,r,i,c,h),d}getRelativeStartPosition(t){const{geometryReader:e}=vh(this,Sh);if(!this.isRtl())return e.offsetLeft(t);return e.offsetWidth(e.offsetParent(t))-e.offsetLeft(t)-e.offsetWidth(t)}getRelativeCellPositionWithinWindow(t,e,o,n){const{geometryReader:i}=vh(this,Sh),s=i.getBoundingClientRect(vh(this,Sh).getWtTable().wtRootElement),r=vh(this,Sh).getWtOverlays().scrollableElement!==vh(this,Sh).rootWindow,l=r?vh(this,Sh).getWtOverlays().inlineStartOverlay.getScrollPosition():0,a=r?vh(this,Sh).getWtOverlays().topOverlay.getScrollPosition():0;let h=0,c=0;if(e){let t=s.left;this.isRtl()&&(t=vh(this,Sh).rootWindow.innerWidth-(s.left+s.width+i.getScrollbarWidth())),h=t<=0?-1*t:0}else h=n.start-l;if(t&&this.clone){c=i.getBoundingClientRect(this.clone.wtTable.TABLE).top-s.top}else c=n.top-a;return{start:o.start+h,top:o.top+c}}getRelativeCellPositionWithinHolder(t,e,o,n,i){const s=vh(this,Sh).getWtOverlays().inlineStartOverlay.getScrollPosition(),r=vh(this,Sh).getWtOverlays().topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=s-i.start),e&&this.clone){const{geometryReader:t}=vh(this,Sh),e=t.getBoundingClientRect(vh(this,Sh).getWtTable().wtRootElement);a=-1*t.getBoundingClientRect(this.clone.wtTable.TABLE).top+e.top}else t||(a=r-i.top);return{start:n.start-l,top:n.top-a}}makeClone(){-1===Fa.indexOf(this.type)&&ce(`Clone type "${this.type}" is not supported.`);const t=vh(this,Sh).getWtTable(),{wtSettings:e}=this,{rootDocument:o,rootWindow:n}=vh(this,Sh),i=o.createElement("div"),s=o.createElement("table"),r=t.wtRootElement.parentNode;r||ce("The Walkontable root element has no parent node."),i.className=`${$a.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")&&mo(i,[["role","presentation"]]),s.className=t.TABLE.className;const l=t.TABLE.getAttribute("role");l&&s.setAttribute("role",l),i.appendChild(s),r.appendChild(i);const a=this.wtSettings.getSetting("preventOverflow"),h=vh(this,Sh).geometryReader.getComputedStyle(r).getPropertyValue("overflow");return"hidden"===h||"clip"===h?this.mainTableScrollableElement=t.holder:"horizontal"===a&&this.type===Da||"vertical"===a&&this.type===za?this.mainTableScrollableElement=n:this.mainTableScrollableElement=Io(t.TABLE),new wh(s,this.wtSettings,(c=vh(this,Sh),d=this,{source:c.wot,overlay:d,viewport:c.getWtViewport(),event:c.getWtEvent(),selectionManager:c.getSelectionManager(),geometryReader:c.geometryReader}));var c,d}refresh(t=!1){if(this.needFullRender&&this.clone){const e=this.clone.cloneSource;e.activeOverlayName=this.clone.wtTable.name,this.clone.draw(t),e.activeOverlayName="master"}}reset(){if(!this.clone)return;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 instanceof wh&&this.clone.wtEvent.destroy(),this.clone?.eventManager.destroy()}constructor(t,e){Ch(this,Sh,{writable:!0,value:void 0}),Se(this,"wot",t.wot,{writable:!1}),yh(this,Sh,t),this.facadeGetter=t.facadeGetter,this.wtSettings=t.wtSettings;const{TABLE:o,hider:n,spreader:i,holder:s,wtRootElement:r}=t.getWtTable();this.type=e,this.TABLE=o,this.hider=n,this.spreader=i,this.holder=s,this.wtRootElement=r,this.trimmingContainer=No(this.hider.parentNode?.parentNode??this.hider),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}}class Rh extends kh{createTable(t){return new Pa(t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:t}=this;this.updateTrimmingContainer();const{clone:e}=this;if(!t.wtTable.holder.parentNode||!e)return!1;const o=e.wtTable.holder.parentNode;if(o.style.top="",this.trimmingContainer===this.deps.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset(),{geometryReader:e}=this.deps,n=e.getBoundingClientRect(this.deps.getWtTable().TABLE),i=e.getBoundingClientRect(this.deps.getWtTable().holder),s=Math.max(0,n.bottom-i.bottom),r=this.bottomOverlay.getOverlayOffset()-s;o.style[this.isRtl()?"right":"left"]=`${t}px`,o.style.bottom=`${r}px`}else Xo(o),this.repositionOverlay();let n=this.deps.geometryReader.outerHeight(e.wtTable.TABLE);const i=this.deps.geometryReader.outerWidth(e.wtTable.TABLE);return this.deps.getWtTable().hasDefinedSize()||(n=0),o.style.height=`${n}px`,o.style.width=`${i}px`,!0}setScrollPosition(t){return!1}getScrollPosition(){return 0}getTableParentOffset(){return 0}getOverlayOffset(){return 0}onScroll(){}sumCellSizes(t,e){return 0}adjustElementsSize(){}applyToDOM(){}scrollTo(t,e){return!1}repositionOverlay(){if(!this.clone)return;const t=this.deps.getWtTable(),e=this.deps.getWtViewport(),{rootDocument:o}=this.deps,n=this.clone.wtTable.holder.parentNode;let i=0;e.hasVerticalScroll()||(i+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(i+=this.deps.geometryReader.getScrollbarWidth(o)),n.style.bottom=`${i}px`}constructor(t,e,o){super(t,Va),this.bottomOverlay=e,this.inlineStartOverlay=o}}const Eh={getFirstRenderedRow(){return this.deps.getWtViewport().rowsRenderCalculator?.startRow??-1},getFirstVisibleRow(){return this.deps.getWtViewport().rowsVisibleCalculator?.startRow??-1},getFirstPartiallyVisibleRow(){return this.deps.getWtViewport().rowsPartiallyVisibleCalculator?.startRow??-1},getLastRenderedRow(){return this.deps.getWtViewport().rowsRenderCalculator?.endRow??-1},getLastVisibleRow(){return this.deps.getWtViewport().rowsVisibleCalculator?.endRow??-1},getLastPartiallyVisibleRow(){return this.deps.getWtViewport().rowsPartiallyVisibleCalculator?.endRow??-1},getRenderedRowsCount(){return this.deps.getWtViewport().rowsRenderCalculator?.count??0},getVisibleRowsCount(){return this.deps.getWtViewport().rowsVisibleCalculator?.count??0},getColumnHeadersCount(){return this.deps.getColumnHeaders().length}};Se(Eh,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});const xh={getFirstRenderedColumn(){return this.deps.getWtViewport().columnsRenderCalculator?.startColumn??-1},getFirstVisibleColumn(){return this.deps.getWtViewport().columnsVisibleCalculator?.startColumn??-1},getFirstPartiallyVisibleColumn(){return this.deps.getWtViewport().columnsPartiallyVisibleCalculator?.startColumn??-1},getLastRenderedColumn(){return this.deps.getWtViewport().columnsRenderCalculator?.endColumn??-1},getLastVisibleColumn(){return this.deps.getWtViewport().columnsVisibleCalculator?.endColumn??-1},getLastPartiallyVisibleColumn(){return this.deps.getWtViewport().columnsPartiallyVisibleCalculator?.endColumn??-1},getRenderedColumnsCount(){return this.deps.getWtViewport().columnsRenderCalculator?.count??0},getVisibleColumnsCount(){return this.deps.getWtViewport().columnsVisibleCalculator?.count??0},getRowHeadersCount(){return this.deps.getRowHeaders().length}};Se(xh,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});class Mh extends Wa{constructor(t){super(t,La)}}function Th(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}be(Mh,Oa),be(Mh,xh);var Hh=new WeakSet;class Ih extends kh{createTable(t){return new Mh(t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!(this.needFullRender&&this.shouldBeRendered()&&this.deps.getWtTable().holder.parentNode&&this.clone))return!1;const{rootWindow:t}=this.deps,e=this.clone.wtTable.holder.parentNode;e.style.top="";let o=0;const n=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==t||n&&"vertical"===n)o=this.getScrollPosition(),this.repositionOverlay();else{o=this.getOverlayOffset();const{geometryReader:t}=this.deps,n=t.getBoundingClientRect(this.deps.getWtTable().TABLE),i=t.getBoundingClientRect(this.deps.getWtTable().holder),s=Math.max(0,n.bottom-i.bottom);e.style.bottom=o-s+"px"}const i=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),i}repositionOverlay(){if(!this.clone)return;const t=this.deps.getWtTable(),e=this.deps.getWtViewport(),{rootDocument:o}=this.deps,n=this.clone.wtTable.holder.parentNode;let i=0;e.hasVerticalScroll()||(i+=e.getWorkspaceHeight()-t.getTotalHeight()),e.hasVerticalScroll()&&e.hasHorizontalScroll()&&(i+=this.deps.geometryReader.getScrollbarWidth(o)),n.style.bottom=`${i}px`}setScrollPosition(t){const{rootWindow:e}=this.deps,o=this.mainTableScrollableElement,n=o,i=()=>o===e?e.scrollY:n.scrollTop,s=i();let r=!1;var l;return t!==s&&(l=t,o===e?e.scrollTo(e.scrollX,l):n.scrollTop=l,r=s!==i()),r}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){return this.deps.getWtViewport().sumRowHeights(t,e)}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){if(!this.clone)return;const t=this.deps.getWtTable(),e=this.deps.getWtViewport(),{rootDocument:o,rootWindow:n}=this.deps,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===s){let n=e.getWorkspaceWidth();e.hasVerticalScroll()&&(n-=this.deps.geometryReader.getScrollbarWidth(o)),n=Math.min(n,this.deps.geometryReader.scrollWidth(t.wtRootElement)),i.width=`${n}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let r=this.deps.geometryReader.outerHeight(this.clone.wtTable.TABLE);t.hasDefinedSize()||(r=0),i.height=`${r}px`}adjustRootChildrenSize(){if(!this.clone)return;const{holder:t}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width;const e=t.parentNode;t.style.width=e.style.width,t.style.height=e.style.height}applyToDOM(){const t=this.wtSettings.getSetting("totalRows"),e=this.deps.getWtViewport().rowsRenderCalculator;"number"==typeof e?.startPosition?this.spreader.style.top=`${e.startPosition}px`:0===t||null===e?this.spreader.style.top="0":ce("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){if(!this.clone)return;const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable,o=this.deps.getWtViewport().columnsRenderCalculator;e.style[t]="number"==typeof o?.startPosition?`${o.startPosition}px`:""}scrollTo(t,e){let o=this.getTableParentOffset();const{geometryReader:n}=this.deps,i=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let s=0;return e&&n.offsetHeight(i)!==n.clientHeight(i)&&(s=n.getScrollbarWidth(this.deps.rootDocument)),e?(o+=this.sumCellSizes(0,t+1),o-=this.deps.getWtViewport().getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),t),o+=s,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.deps.rootWindow?this.deps.getWtTable().holderOffset.top:0}getScrollPosition(){return To(this.mainTableScrollableElement,this.deps.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.deps,e=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)&&this.clone){const t=this.deps.getWtTable().getTotalHeight(),e=t-this.clone.wtTable.getTotalHeight(),n=this.deps.geometryReader.clientHeight(this.deps.rootDocument.documentElement);o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-n+t,0),o>e&&(o=0)}return o}prepareHeaderBorders(){this.needFullRender&&this.shouldBeRendered()&&this.deps.getWtTable().holder.parentNode&&this.clone&&this.trimmingContainer!==this.deps.rootWindow&&this.adjustHeaderBordersPosition(this.getScrollPosition())}adjustHeaderBordersPosition(t){const e=this.deps.getWtTable().holder.parentNode,o=function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,Hh,_h).call(this,t);return"add"===o.innerBorderBottom?po(e,"innerBorderBottom"):"remove"===o.innerBorderBottom&&fo(e,"innerBorderBottom"),"keep"!==o.innerBorderBottom&&(this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")),o.positionChanged}constructor(t){super(t,La),Th(this,Hh),this.cachedFixedRowsBottom=-1,this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}}function _h(t){const{wtSettings:e}=this,o=this.deps.getWtTable().holder.parentNode,n=e.getSetting("fixedRowsBottom"),i=this.cachedFixedRowsBottom!==n,s=e.getSetting("columnHeaders");let r="keep",l=!1;if((i||0===n)&&s.length>0){const n=go(o,"innerBorderBottom");t||0===e.getSetting("totalRows")?(r="add",l=!n):(r="remove",l=n)}return{innerBorderBottom:r,positionChanged:l}}class Ah extends Wa{constructor(t){super(t,za)}}be(Ah,Eh),be(Ah,Na);const Wh={_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 o=this._localHooks[t].indexOf(e);o>-1&&this._localHooks[t].splice(o,1)}return this},runLocalHooks(t,e,o,n,i,s,r){if(this._localHooks[t]){const l=this._localHooks[t].length;for(let a=0;a<l;a++)hn(this._localHooks[t][a],this,e,o,n,i,s,r)}},clearLocalHooks(){return this._localHooks={},this}};Se(Wh,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});let Oh=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??0,t.col??0,e.row??0,e.col??0]}destroy(){this.runLocalHooks("destroy")}constructor(t,e){this.settings=t,this.cellRange=e||null}};be(Oh,Wh);const Nh="active-header",Ph="header",Dh="area",Lh="focus",zh="custom-selection",Bh=t=>{const e=t.wtSettings.getSetting("stylesHandler"),o=e.getCSSVariableValue("cell-autofill-size"),n=e.getCSSVariableValue("cell-autofill-border-width"),i=e.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:o,height:o,borderWidth:n,borderStyle:"solid",borderColor:i})};function Vh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fh(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function $h(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Fh(t,e,"get"))}function Uh(t,e,o){Vh(t,e),e.set(t,o)}function jh(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Fh(t,e,"set"),o),o}function qh(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Gh(t,e){Vh(t,e),e.add(t)}var Yh=new WeakMap,Xh=new WeakMap,Kh=new WeakSet,Zh=new WeakSet;class Qh{setActiveOverlay(t){return jh(this,Xh,t),this}setActiveSelection(t){return jh(this,Yh,t),this}scan(){const t=$h(this,Yh).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,o,n,i]=$h(this,Yh).getCorners(),{wtTable:s}=$h(this,Xh),r=s.getRenderedColumnsCount(),l=s.getColumnHeadersCount();let a=0;for(let h=-s.getRowHeadersCount();h<r;h++){const r=s.columnFilter.renderedToSource(h);if(!(r<o||r>i)){for(let h=-l;h<0;h++){if(h<e||h>n)continue;const c=h+l;let d=s.getColumnHeader(r,c);const u=$h(this,Xh).getSetting("onBeforeHighlightingColumnHeader",r,c,{selectionType:$h(this,Yh).settings.selectionType,columnCursor:a,selectionWidth:i-o+1});null!==u&&(u!==r&&(d=s.getColumnHeader(u,c)),en(d)&&t(d))}a+=1}}}scanRowsInHeadersRange(t){const[e,o,n,i]=$h(this,Yh).getCorners(),{wtTable:s}=$h(this,Xh),r=s.getRenderedRowsCount(),l=s.getRowHeadersCount();let a=0;for(let h=-s.getColumnHeadersCount();h<r;h++){const r=s.rowFilter.renderedToSource(h);if(!(r<e||r>n)){for(let h=-l;h<0;h++){if(h<o||h>i)continue;const c=h+l;let d=s.getRowHeader(r,c);const u=$h(this,Xh).getSetting("onBeforeHighlightingRowHeader",r,c,{selectionType:$h(this,Yh).settings.selectionType,rowCursor:a,selectionHeight:n-e+1});null!==u&&(u!==r&&(d=s.getRowHeader(u,c)),en(d)&&t(d))}a+=1}}}scanCellsRange(t){const{wtTable:e}=$h(this,Xh);qh(this,Kh,Jh).call(this,(o,n)=>{const i=e.getCell($h(this,Xh).createCellCoords(o,n));if(!en(i))return;const s=$h(this,Xh).getSetting("onAfterDrawSelection",o,n,$h(this,Yh).settings.layerLevel);"string"==typeof s&&po(i,s),t(i)})}scanRowsInCellsRange(t){const[e,,o]=$h(this,Yh).getCorners(),{wtTable:n}=$h(this,Xh);qh(this,Zh,tc).call(this,(i,s)=>{if(i>=e&&i<=o){const e=n.getCell($h(this,Xh).createCellCoords(i,s));en(e)&&t(e)}})}scanColumnsInCellsRange(t){const[,e,,o]=$h(this,Yh).getCorners(),{wtTable:n}=$h(this,Xh);qh(this,Zh,tc).call(this,(i,s)=>{if(s>=e&&s<=o){const e=n.getCell($h(this,Xh).createCellCoords(i,s));en(e)&&t(e)}})}constructor(){Gh(this,Kh),Gh(this,Zh),Uh(this,Yh,{writable:!0,value:void 0}),Uh(this,Xh,{writable:!0,value:void 0}),jh(this,Yh,null),jh(this,Xh,null)}}function Jh(t){let[e,o,n,i]=$h(this,Yh).getCorners();if(e<0&&n<0||o<0&&i<0)return;const{wtTable:s}=$h(this,Xh),r=e!==n||o!==i;if(o=Math.max(o??0,0),i=Math.max(i??0,0),e=Math.max(e??0,0),n=Math.max(n??0,0),r){if(o=Math.max(o,s.getFirstRenderedColumn()),i=Math.min(i,s.getLastRenderedColumn()),e=Math.max(e,s.getFirstRenderedRow()),n=Math.min(n,s.getLastRenderedRow()),i<o||n<e)return}else{if(!en(s.getCell($h(this,Xh).createCellCoords(e,o))))return}for(let s=e;s<=n;s+=1)for(let e=o;e<=i;e+=1)t(s,e)}function tc(t){const{wtTable:e}=$h(this,Xh),o=e.getRenderedRowsCount(),n=e.getRenderedColumnsCount();for(let i=0;i<o;i+=1){const o=e.rowFilter.renderedToSource(i);for(let i=0;i<n;i+=1)t(o,e.columnFilter.renderedToSource(i))}}const ec="ht-border-style-";class oc{registerListeners(){const t=this.wot.rootDocument.body;if(this.eventManager.addEventListener(t,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(t,"mouseup",()=>this.onMouseUp()),this.main)for(let t=0,e=this.main.childNodes.length;t<e;t++){const e=this.main,o=e.childNodes[t];this.eventManager.addEventListener(o,"mouseenter",o=>this.onMouseEnter(o,e.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(t,e){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;t.preventDefault(),pn(t);const o=this.wot.rootDocument.body,n=this.wot.domBindings.geometryReader.getBoundingClientRect(e);e.style.display="none";const i=t=>{var s;((s=t).clientY<Math.floor(n.top)||s.clientY>Math.ceil(n.top+n.height)||s.clientX<Math.floor(n.left)||s.clientX>Math.ceil(n.left+n.width))&&(this.eventManager.removeEventListener(o,"mousemove",i),e.style.display="block")};this.eventManager.addEventListener(o,"mousemove",i)}createBorders(t){const{rootDocument:e}=this.wot;this.main=e.createElement("div");const o=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top="0",n.left="0";const i=t.selectionType===zh,s=[];for(let r=0;r<5;r++){const l=o[r],a=e.createElement("div"),h=e=>{const o=this.settings[l];return o&&o[e]?o[e]:t.border?.[e]};a.className=`wtBorder ${this.settings.className||""}`,this.settings[l]?.hide&&(a.className+=" hidden"),n=a.style;const c=h("style");c?(["start","end"].includes(l)?a.className+=` ${ec}${c}-vertical`:a.className+=` ${ec}${c}-horizontal`,n.setProperty("--ht-custom-border-size",`${h("width")}px`),n.setProperty("--ht-custom-border-color",String(h("color")??""))):n.backgroundColor=String(h("color")??""),n.height=`${h("width")}px`,n.width=`${h("width")}px`,i&&(n.zIndex=`${h("width")??1}`),s.push(a),this.main.appendChild(a)}this.top=s[0],this.start=s[1],this.bottom=s[2],this.end=s[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=s[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(" "),Fe()&&this.wot.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:r}=this.wot;let l=r.bordersHolder;l||(l=e.createElement("div"),l.className="htBorders",r.bordersHolder=l,r.spreader.appendChild(l)),l.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:t,wtSettings:e}=this.wot,o=e.getSetting("stylesHandler"),n=o.getCSSVariableValue("cell-mobile-handle-size"),i=o.getCSSVariableValue("cell-mobile-handle-border-radius"),s=o.getCSSVariableValue("cell-mobile-handle-background-color"),r=o.getCSSVariableValue("cell-mobile-handle-background-opacity"),l=o.getCSSVariableValue("cell-mobile-handle-border-width"),a=o.getCSSVariableValue("cell-mobile-handle-border-color");this.selectionHandles={top:t.createElement("div"),topHitArea:t.createElement("div"),bottom:t.createElement("div"),bottomHitArea:t.createElement("div"),styles:{}};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};const h=[this.selectionHandles.styles.bottomHitArea,this.selectionHandles.styles.topHitArea];for(const t of h)t.position="absolute",t.height="40px",t.width="40px",t.borderRadius=`${parseInt(String(40/1.5),10)}px`;for(const t of[this.selectionHandles.styles.bottom,this.selectionHandles.styles.top])t.position="absolute",t.height=`${n}px`,t.width=`${n}px`,t.borderRadius=`${i}px`,t.background=`color-mix(in srgb, ${s} ${r}%, transparent)`,t.border=`${l}px solid ${a}`;this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}createAdjustHandles(){const{rootDocument:t}=this.wot,e=e=>{const o=t.createElement("div");return o.className=`wtSelectionHandle wtSelectionHandle--${e}`,o.style.display="none",this.main.appendChild(o),this.eventManager.addEventListener(o,"mousedown",t=>{mn(t)||(pn(t),t.preventDefault(),this.wot.getSetting("onSelectionHandleMouseDown",t,e))}),o},o=e("top"),n=e("bottom"),i=e("start"),s=e("end");return this.adjustHandles={top:o,bottom:n,start:i,end:s,styles:{top:o.style,bottom:n.style,start:i.style,end:s.style}},this.adjustHandles}createMoveZone(){const{rootDocument:t}=this.wot,e=e=>{const o=t.createElement("div");return o.className="wtMoveZone",o.style.position="absolute",o.style.display="none",o.style.zIndex="100",o.style.pointerEvents="auto",o.style.cursor="grab",this.main.appendChild(o),this.eventManager.addEventListener(o,"mousedown",t=>{mn(t)||(pn(t),t.preventDefault(),this.wot.getSetting("onSelectionEdgeMouseDown",t,e))}),o},o=e("top"),n=e("bottom"),i=e("start"),s=e("end");this.moveZone={top:o,bottom:n,start:i,end:s,styles:{top:o.style,bottom:n.style,start:i.style,end:s.style}}}positionMoveZone(t,e,o,n){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",s=this.moveZone.styles,r=Math.floor(3);s.top[i]=`${e}px`,s.top.top=t-r+"px",s.top.width=`${o}px`,s.top.height="6px",s.top.display="block",s.bottom[i]=`${e}px`,s.bottom.top=t+n-r+"px",s.bottom.width=`${o}px`,s.bottom.height="6px",s.bottom.display="block",s.start[i]=e-r+"px",s.start.top=`${t}px`,s.start.width="6px",s.start.height=`${n}px`,s.start.display="block",s.end[i]=e+o-r+"px",s.end.top=`${t}px`,s.end.width="6px",s.end.height=`${n}px`,s.end.display="block"}isSouthEastOfAreaSelection(t,e){const o=this.wot.selectionManager.getAreaSelection();if(!o)return!1;if(!o.cellRange)return!0;const n=o.cellRange.getBottomEndCorner();return n.row===t&&n.col===e}updateMultipleSelectionHandlesPosition(t,e,o,n,i,s){const r=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),u=parseInt(l.width,10),g=parseInt(a.width,10),p=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();l.top=`${parseInt(String(o-u-1),10)}px`,l[r]=`${parseInt(String(n-u-1),10)}px`,a.top=`${parseInt(String(o-g/4*3),10)}px`,a[r]=`${parseInt(String(n-g/4*3),10)}px`;const m=Math.min(parseInt(String(n+i),10),p-u-2*d),w=Math.min(parseInt(String(n+i-g/4),10),p-g-2*d);h[r]=`${m}px`,c[r]=`${w}px`;const b=Math.min(parseInt(String(o+s),10),f-u-2*d),v=Math.min(parseInt(String(o+s-g/4),10),f-g-2*d);h.top=`${b}px`,c.top=`${v}px`;const C=this.settings.border?.cornerVisible;C&&"function"==typeof C&&C()?(l.display="block",a.display="block",this.isSouthEastOfAreaSelection(t,e)?(h.display="block",c.display="block"):(h.display="none",c.display="none")):(l.display="none",h.display="none",a.display="none",c.display="none"),t===this.wot.wtSettings.getSetting("fixedRowsTop")||e===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}isFrozenBoundaryEdge(t,e){if("row"===t){const t=this.wot.getSetting("fixedRowsTop");return t>0&&e===t}const o=this.wot.getSetting("fixedColumnsStart");return o>0&&e===o}isFrozenStartBoundaryOppositeEdge(t,e){if("row"===t){const t=this.wot.getSetting("fixedRowsTop");return t>0&&e===t-1}const o=this.wot.getSetting("fixedColumnsStart");return o>0&&e===o-1}isBoundaryCornerScrolledOut(t,e){const o=this.wot.cloneSource?.wtTable;if(!o)return!1;const n="row"===t?o.getFirstVisibleRow():o.getFirstVisibleColumn();return n>=0&&e<n}isFrozenBottomBoundaryEdge(t){const e=this.wot.getSetting("fixedRowsBottom"),o=this.wot.getSetting("totalRows");return e>0&&t===o-e-1}isFrozenBottomBoundaryOppositeEdge(t){const e=this.wot.getSetting("fixedRowsBottom"),o=this.wot.getSetting("totalRows");return e>0&&t===o-e}isBottomBoundaryCornerScrolledOut(t){const e=this.wot.cloneSource?.wtTable;if(!e)return!1;const o=e.getLastVisibleRow();return o>=0&&t>o}drawFrozenBoundaryEdge(t){const{wtTable:e}=this.wot,o=e.name,n="top"===o,i="inline_start"===o,s="top_inline_start_corner"===o,r="bottom"===o,l="bottom_inline_start_corner"===o;if(!(n||i||s||r||l))return!1;const a=this.wot.wtSettings.getSetting("rtlMode"),[h,c,d,u]=t,g=this.settings.border?.width??0,p=Math.ceil(g/2),f=this.isFrozenBoundaryEdge("row",h)&&!this.isBoundaryCornerScrolledOut("row",h),m=this.isFrozenBoundaryEdge("column",c)&&!this.isBoundaryCornerScrolledOut("column",c),w=this.isFrozenBottomBoundaryEdge(d)&&!this.isBottomBoundaryCornerScrolledOut(d);if(f&&(n||s)){const t=Math.max(c,e.getFirstRenderedColumn()),o=Math.min(u,e.getLastRenderedColumn());if(this.drawRowFreezeEdge(t,o,a,p))return!0}if(m&&(i||s||l)){const t=Math.max(h,e.getFirstRenderedRow()),o=Math.min(d,e.getLastRenderedRow());if(this.drawColumnFreezeEdge(t,o,a,p))return!0}if(w&&(r||l)){const t=Math.max(c,e.getFirstRenderedColumn()),o=Math.min(u,e.getLastRenderedColumn());if(this.drawRowFreezeBottomEdge(t,o,a,p))return!0}return!!(s&&f&&m&&this.drawFrozenBoundaryCorner(a,g))||!!(l&&w&&m&&this.drawFrozenBottomBoundaryCorner(a,g))}drawHorizontalFreezeEdge(t,e,o,n,i,s,r){const{geometryReader:l}=this.wot.domBindings;if(n<o)return!1;const{wtTable:a}=this.wot,h=a.getCell(this.wot.createCellCoords(t,o)),c=a.getCell(this.wot.createCellCoords(t,n));if(!en(h)||!en(c))return!1;const d=l.offset(a.TABLE),u=l.offset(h),g=l.offset(c),p=0===o?0:1;if(this.disappear(),e.top=`${r(h,u,d.top)}px`,i){const t=u.left+l.outerWidth(h),o=d.left+l.outerWidth(a.TABLE);e.right=o-t-p+"px",e.width=t-g.left+s-(1-p)+"px"}else{e.left=u.left-d.left-p+"px";const t=g.left+l.outerWidth(c)-u.left+s-(1-p);e.width=`${t}px`}return e.display="block",!0}drawRowFreezeEdge(t,e,o,n){const i=this.wot.getSetting("fixedRowsTop")-1;return this.drawHorizontalFreezeEdge(i,this.topStyle,t,e,o,n,(t,e,o)=>e.top+this.wot.domBindings.geometryReader.outerHeight(t)-o-1)}drawRowFreezeBottomEdge(t,e,o,n){const i=this.wot.getSetting("fixedRowsBottom"),s=this.wot.getSetting("totalRows")-i;return this.drawHorizontalFreezeEdge(s,this.bottomStyle,t,e,o,n,(t,e,o)=>e.top-o-parseInt(this.bottomStyle.height,10)+n)}drawColumnFreezeEdge(t,e,o,n){if(e<t)return!1;const{geometryReader:i}=this.wot.domBindings,{wtTable:s}=this.wot,r=this.wot.getSetting("fixedColumnsStart")-1,l=s.getCell(this.wot.createCellCoords(t,r)),a=s.getCell(this.wot.createCellCoords(e,r));if(!en(l)||!en(a))return!1;const h=i.offset(s.TABLE),c=i.offset(l),d=i.offset(a),u=0===t;let g=c.top-h.top-1,p=d.top+i.outerHeight(a)-c.top+n;if(u&&(g+=1,p=Math.max(p-1,0)),this.disappear(),this.startStyle.top=`${g}px`,o){const t=h.left+i.outerWidth(s.TABLE);this.startStyle.right=t-c.left-1+"px"}else{const t=c.left+i.outerWidth(l);this.startStyle.left=t-h.left-1+"px"}return this.startStyle.height=`${p}px`,this.startStyle.display="block",!0}drawFreezeCorner(t,e,o,n,i){const{geometryReader:s}=this.wot.domBindings,{wtTable:r}=this.wot,l=this.wot.getSetting("fixedColumnsStart")-1,a=r.getCell(this.wot.createCellCoords(t,l));if(!en(a))return!1;const h=s.offset(r.TABLE),c=s.offset(a);if(this.disappear(),e.top=`${i(a,c,h.top)}px`,e.height=`${n}px`,e.width=`${n}px`,o){const t=h.left+s.outerWidth(r.TABLE);e.right=t-c.left-1+"px"}else{const t=c.left+s.outerWidth(a);e.left=t-h.left-1+"px"}return e.display="block",!0}drawFrozenBoundaryCorner(t,e){const o=this.wot.getSetting("fixedRowsTop")-1;return this.drawFreezeCorner(o,this.topStyle,t,e,(t,e,o)=>e.top+this.wot.domBindings.geometryReader.outerHeight(t)-o-1)}drawFrozenBottomBoundaryCorner(t,e){const o=this.wot.getSetting("fixedRowsBottom"),n=this.wot.getSetting("totalRows")-o,i=Math.ceil(e/2);return this.drawFreezeCorner(n,this.bottomStyle,t,e,(t,o,n)=>o.top-n-e+i)}getFillHandleAnchor(t,e,o){const{geometryReader:n}=this.wot.domBindings;if(o){const{top:e,left:o}=n.getBoundingClientRect(t);return{top:e,left:o}}const i=n.offset(this.wot.wtTable.hider);return{top:e.top-i.top,left:e.left-i.left}}isCornerLiftedAtInlineEnd(t,e,o,n,i){if(t!==this.wot.getSetting("totalColumns")-1)return!1;const{geometryReader:s}=this.wot.domBindings,r=parseInt(String(this.cornerDefaultStyle.width),10)/2;return i?e-r<0:e+s.outerWidth(o)+r>=s.innerWidth(n)}isCornerLiftedAtBlockEnd(t,e,o,n){if(this.isFrozenBottomBoundaryEdge(t))return!0;if(t!==this.wot.getSetting("totalRows")-1)return!1;const{geometryReader:i}=this.wot.domBindings,s=parseInt(String(this.cornerDefaultStyle.height),10)/2;return e+i.outerHeight(o)+s>=i.innerHeight(n)}appear(t){if(this.disabled)return;if(this.drawFrozenBoundaryEdge(t))return;let[e,o,n,i]=t;const s=e,r=o,l=n,a=i;if(e<0&&n<0||o<0&&i<0)return void this.disappear();const{wtTable:h,rootDocument:c,rootWindow:d}=this.wot,{geometryReader:u}=this.wot.domBindings,g=e!==n||o!==i,p=h.getFirstRenderedRow(),f=h.getLastRenderedRow(),m=h.getFirstRenderedColumn(),w=h.getLastRenderedColumn();if(m<0&&w<0||p<0&&f<0)return void this.disappear();let b;if(g){if(o=Math.max(o,m),i=Math.min(i,w),e=Math.max(e,p),n=Math.min(n,f),i<o||n<e)return void this.disappear();if(b=h.getCell(this.wot.createCellCoords(e,o)),!en(b))return void this.disappear()}else if(b=h.getCell(this.wot.createCellCoords(e,o)),!en(b))return void this.disappear();const v=g?h.getCell(this.wot.createCellCoords(n,i)):b,C=b,y=en(v)?v:C,S=u.offset(C),k=g?u.offset(y):S,R=u.offset(h.TABLE),E=S.top,x=S.left,M=this.wot.wtSettings.getSetting("rtlMode");let T=0,H=0;if(M){const t=u.outerWidth(h.TABLE),e=u.outerWidth(C),o=d.innerWidth-R.left-t;H=x+e-k.left,T=d.innerWidth-x-e-o-1}else H=k.left+u.outerWidth(y)-x,T=x-R.left-1;if(this.isEntireColumnSelected(e,n)){const t=e,n=this.getDimensionsFromHeader("columns",o,i,t,R);let s=null;n&&([s,T,H]=n),s&&(b=s)}let I=E-R.top-1,_=k.top+u.outerHeight(y)-E;if(this.isEntireRowSelected(o,i)){const t=o,i=this.getDimensionsFromHeader("rows",e,n,t,R);let s=null;i&&([s,I,_]=i),s&&(b=s)}const A=u.getComputedStyle(C);parseInt(A.borderTopWidth,10)>0&&(I+=1,_=_>0?_-1:0),parseInt(A[M?"borderRightWidth":"borderLeftWidth"],10)>0&&(T+=1,H=H>0?H-1:0);const W=M?"right":"left",O=!this.settings.end?.hide,N=!this.settings.bottom?.hide,P=parseInt(this.bottomStyle.height,10),D=parseInt(this.endStyle.width,10),L=Math.ceil(P/2),z=Math.ceil(D/2),B=O?z:0,V=N?L:0;this.topStyle.top=`${I}px`,this.topStyle[W]=`${T}px`,this.topStyle.width=`${H+B}px`,this.topStyle.display="block",this.startStyle.top=`${I}px`,this.startStyle[W]=`${T}px`,this.startStyle.height=`${_+V}px`,this.startStyle.display="block",this.bottomStyle.top=`${I+_-P+L}px`,this.bottomStyle[W]=`${T}px`,this.bottomStyle.width=`${H+B}px`,this.bottomStyle.display="block",this.endStyle.top=`${I}px`,this.endStyle[W]=`${T+H-D+z}px`,this.endStyle.height=`${_+V}px`,this.endStyle.display="block";const F=h.name,$=a<this.wot.getSetting("fixedColumnsStart");this.isFrozenBoundaryEdge("row",s)&&("inline_start"===F||h.isMaster&&$)&&(this.topStyle.display="none"),this.isFrozenBoundaryEdge("column",r)&&(h.isMaster||"top"===F||"bottom"===F)&&(this.startStyle.display="none"),this.isFrozenBottomBoundaryEdge(l)&&("inline_start"===F||h.isMaster&&$)&&(this.bottomStyle.display="none");let U=this.settings.border?.cornerVisible;U="function"==typeof U?U(this.settings.layerLevel):U;const j=this.wot.getSetting("onModifyGetCellCoords",n,i,!1,"render");let[q,G]=[n,i];if(j&&Array.isArray(j)&&([,,q,G]=j),!Fe()&&U&&this.isSouthEastOfAreaSelection(q,G)){const t=Number(this.cornerDefaultStyle.borderWidth);this.cornerStyle.top=I+_+this.cornerCenterPointOffset-t+"px",this.cornerStyle[W]=T+H+this.cornerCenterPointOffset-Number(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=String(this.cornerDefaultStyle.width),this.cornerStyle.display="none";let e=No(h.TABLE);const o=Object.is(e,d);o&&(e=c.documentElement);const s=parseInt(String(this.cornerDefaultStyle.borderWidth),10)-1,r=Math.ceil(parseInt(String(this.cornerDefaultStyle.width),10)/2),l=Math.ceil(parseInt(String(this.cornerDefaultStyle.height),10)/2),a=this.getFillHandleAnchor(y,k,o);if(this.isCornerLiftedAtInlineEnd(i,a.left,y,e,M)){const t=Math.floor(T+H+this.cornerCenterPointOffset-r-s);po(this.corner,"wtCornerInlineEndEdge"),this.cornerStyle[W]=t-1+"px"}else fo(this.corner,"wtCornerInlineEndEdge");if(this.isCornerLiftedAtBlockEnd(n,a.top,y,e)){const t=Math.floor(I+_+this.cornerCenterPointOffset-l-s);po(this.corner,"wtCornerBlockEndEdge"),this.cornerStyle.top=t-1+"px"}else fo(this.corner,"wtCornerBlockEndEdge");this.cornerStyle.display="block"}else this.cornerStyle.display="none";Fe()&&this.wot.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(n,i,I,T,H,_);let Y=this.settings.border?.adjustHandlesVisible;if(Y="function"==typeof Y?Y(this.settings.layerLevel):Y,!Fe()&&Y&&this.wot.getSetting("isDataViewInstance")){const e=this.adjustHandles??this.createAdjustHandles();this.positionAdjustHandles(I,T,H,_,t),(this.isFrozenBoundaryEdge("row",t[0])||this.isFrozenBottomBoundaryOppositeEdge(t[0]))&&(e.styles.top.display="none"),this.isFrozenBoundaryEdge("column",t[1])&&(e.styles.start.display="none"),(this.isFrozenStartBoundaryOppositeEdge("row",t[2])||this.isFrozenBottomBoundaryEdge(t[2]))&&(e.styles.bottom.display="none"),this.isFrozenStartBoundaryOppositeEdge("column",t[3])&&(e.styles.end.display="none")}else this.adjustHandles&&(this.adjustHandles.styles.top.display="none",this.adjustHandles.styles.bottom.display="none",this.adjustHandles.styles.start.display="none",this.adjustHandles.styles.end.display="none");let X=this.settings.border?.moveEnabled;X="function"==typeof X?X(this.settings.layerLevel):X,!Fe()&&X&&this.wot.getSetting("isDataViewInstance")?(this.moveZone||this.createMoveZone(),this.positionMoveZone(I,T,H,_)):this.moveZone&&(this.moveZone.styles.top.display="none",this.moveZone.styles.bottom.display="none",this.moveZone.styles.start.display="none",this.moveZone.styles.end.display="none")}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,o,n,i){const{geometryReader:s}=this.wot.domBindings,{wtTable:r}=this.wot,l=r.wtRootElement.parentNode;let a=null,h=null,c=null,d=null,u=null,g=null,p=null,f=null;switch(t){case"rows":a=(...t)=>r.getRowHeader(t[0],t[1]),h=t=>s.outerHeight(t),c="ht__selection--rows",g="top";break;case"columns":a=(...t)=>r.getColumnHeader(t[0],t[1]),h=t=>s.outerWidth(t),c="ht__selection--columns",g="left"}if(c&&l.classList.contains(c)){const t=this.wot.getSetting("columnHeaders").length;if(p=a?.(e,t-n),f=a?.(o,t-n),!p||!f)return!1;const r=s.offset(p),l=s.offset(f),c=r[g],m=l[g];return d=c-i[g]-1,u=m+h(f)-c,[p,d,u]}return!1}positionAdjustHandles(t,e,o,n,i){const s=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",[r,l,a,h]=i,c=this.wot.getSetting("totalRows")-1,d=this.wot.getSetting("totalColumns")-1,u=this.wot.wtSettings.getSetting("stylesHandler"),g=u.getCSSVariableValue("cell-selection-handle-size"),p=u.getCSSVariableValue("cell-selection-handle-length"),f=parseInt(null!=g?String(g):"8",10),m=parseInt(null!=p?String(p):"24",10),w=m,b=f,v=m,C=f,y=f,S=m,k=f,R=m,E=this.adjustHandles.styles;E.top.display="none",E.bottom.display="none",E.start.display="none",E.end.display="none",r>0&&(E.top[s]=e+Math.round(o/2)-Math.round(w/2)+"px",E.top.top=t-Math.round(b/2)+"px",E.top.display="block"),a<c&&(E.bottom[s]=e+Math.round(o/2)-Math.round(v/2)+"px",E.bottom.top=t+n-Math.round(C/2)+"px",E.bottom.display="block"),l>0&&(E.start[s]=e-Math.round(y/2)+"px",E.start.top=t+Math.round(n/2)-Math.round(S/2)+"px",E.start.display="block"),h<d&&(E.end[s]=e+o-Math.round(k/2)+"px",E.end.top=t+Math.round(n/2)-Math.round(R/2)+"px",E.end.display="block")}changeBorderStyle(t,e){const o=this[t],n=o.style,i=e[t];!i||i.hide?po(o,"hidden"):(go(o,"hidden")&&fo(o,"hidden"),n.backgroundColor=String(i.color??""),"top"!==t&&"bottom"!==t||(n.height=`${i.width}px`),"start"!==t&&"end"!==t||(n.width=`${i.width}px`))}changeBorderToDefaultStyle(t){const e=1,o="#000",n=this[t].style;n.backgroundColor=o,n.width=`${e}px`,n.height=`${e}px`}toggleHiddenClass(t,e){this.changeBorderToDefaultStyle(t);const o=this[t];e?po(o,"hidden"):fo(o,"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",Fe()&&this.wot.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"),this.adjustHandles&&(this.adjustHandles.styles.top.display="none",this.adjustHandles.styles.bottom.display="none",this.adjustHandles.styles.start.display="none",this.adjustHandles.styles.end.display="none"),this.moveZone&&(this.moveZone.styles.top.display="none",this.moveZone.styles.bottom.display="none",this.moveZone.styles.start.display="none",this.moveZone.styles.end.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main?.parentNode?.removeChild(this.main)}constructor(t,e){e&&(this.eventManager=t.eventManager,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=Bh(this.wot),this.cornerCenterPointOffset=-Math.ceil(parseInt(String(this.cornerDefaultStyle.width),10)/2),this.corner=null,this.cornerStyle=null,this.createBorders(e),this.registerListeners())}}function nc(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ic(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function sc(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ic(t,e,"get"))}function rc(t,e,o){nc(t,e),e.set(t,o)}function lc(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ic(t,e,"set"),o),o}function ac(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function hc(t,e){nc(t,e),e.add(t)}var cc=new WeakMap,dc=new WeakMap,uc=new WeakMap,gc=new WeakMap,pc=new WeakMap,fc=new WeakMap,mc=new WeakSet,wc=new WeakSet,bc=new WeakSet,vc=new WeakSet,Cc=new WeakSet,yc=new WeakSet,Sc=new WeakSet,kc=new WeakSet;class Rc{setActiveOverlay(t){return lc(this,cc,t),sc(this,uc).setActiveOverlay(sc(this,cc)),sc(this,gc).has(sc(this,cc))||sc(this,gc).set(sc(this,cc),new Set),this}getFocusSelection(){return null!==sc(this,dc)?sc(this,dc).getFocus():null}getAreaSelection(){return null!==sc(this,dc)?sc(this,dc).createLayeredArea():null}getBorderInstance(t){if(!t.settings.border)return null;if(sc(this,fc).has(t)){const e=sc(this,fc).get(t);if(e.has(sc(this,cc)))return e.get(sc(this,cc));const o=new oc(sc(this,cc),t.settings);return e.set(sc(this,cc),o),o}const e=new oc(sc(this,cc),t.settings);return sc(this,fc).set(t,new Map([[sc(this,cc),e]])),e}getBorderInstances(t){return Array.from(sc(this,fc).get(t)?.values()??[])}destroyBorders(t){sc(this,fc).get(t)?.forEach(t=>t.destroy()),sc(this,fc).delete(t)}refreshAllBorderHandleStyles(){sc(this,fc).forEach(t=>{t.forEach(t=>{"updateMultipleSelectorHandlesStyles"in t&&"function"==typeof t.updateMultipleSelectorHandlesStyles&&t.updateMultipleSelectorHandlesStyles()})})}render(t){if(null===sc(this,dc))return;t&&ac(this,kc,Ac).call(this);const e=Array.from(sc(this,dc)),o=new Map,n=new Map;for(let t=0;t<e.length;t++){const i=e[t],{className:s,headerAttributes:r,createLayers:l,selectionType:a}=i.settings;if(sc(this,pc).has(i)||(sc(this,pc).add(i),i.addLocalHook("destroy",()=>this.destroyBorders(i))),a===zh&&ac(this,mc,Ec).call(this,i)){sc(this,fc).get(i)?.get(sc(this,cc))?.disappear();continue}const h=this.getBorderInstance(i);if(i.isEmpty()){h?.disappear();continue}if(s){const t=sc(this,uc).setActiveSelection(i).scan(),e=a===Nh;t.forEach(t=>{if(o.has(t)){const e=o.get(t);e.has(s)&&!0===l?e.set(s,(e.get(s)??0)+1):e.set(s,1)}else o.set(t,new Map([[s,1]]));if(r&&(n.has(t)||n.set(t,[]),"TH"===t.nodeName)){const e=r;n.get(t).push(...e)}e&&ac(this,wc,xc).call(this,t,s,o)})}const c=i.getCorners();a===Nh&&s&&(ac(this,Cc,Hc).call(this,c,s,o),ac(this,yc,Ic).call(this,c,s,o),ac(this,Sc,_c).call(this,c,s,o)),sc(this,cc).getSetting("onBeforeDrawBorders",c,a),h?.appear(c)}o.forEach((t,e)=>{const o=Array.from(t).map(([t,e])=>1===e?t:[t,...Array.from({length:e-1},(e,o)=>`${t}-${o+1}`)]).flat();o.forEach(t=>sc(this,gc).get(sc(this,cc))?.add(t)),po(e,o),"TD"===e.nodeName&&Array.isArray(sc(this,dc).options?.cellAttributes)&&mo(e,sc(this,dc).options.cellAttributes)}),Array.from(n.keys()).forEach(t=>{mo(t,[...n.get(t)])})}constructor(t){hc(this,mc),hc(this,wc),hc(this,bc),hc(this,vc),hc(this,Cc),hc(this,yc),hc(this,Sc),hc(this,kc),rc(this,cc,{writable:!0,value:void 0}),rc(this,dc,{writable:!0,value:void 0}),rc(this,uc,{writable:!0,value:void 0}),rc(this,gc,{writable:!0,value:void 0}),rc(this,pc,{writable:!0,value:void 0}),rc(this,fc,{writable:!0,value:void 0}),lc(this,cc,null),lc(this,uc,new Qh),lc(this,gc,new WeakMap),lc(this,pc,new WeakSet),lc(this,fc,new Map),lc(this,dc,t)}}function Ec(t){if(t.isEmpty())return!0;const{wtTable:e}=sc(this,cc),[o,n,i,s]=t.getCorners(),r=e.getFirstRenderedRow(),l=e.getLastRenderedRow(),a=e.getFirstRenderedColumn(),h=e.getLastRenderedColumn();return r<0&&l<0||a<0&&h<0||(i<r||o>l||s<a||n>h)}function xc(t,e,o){if("TH"!==t.nodeName)return;const n=t.previousElementSibling;null!==n&&"TH"===n.nodeName&&ac(this,vc,Tc).call(this,o,n,`${e}-prev`),ac(this,bc,Mc).call(this,t,e,o)}function Mc(t,e,o){const n=t.parentElement;if(null===n||"TR"!==n.nodeName||null===n.parentElement||"TBODY"!==n.parentElement.nodeName)return;const i=n.previousElementSibling;if(null!==i&&"TR"===i.nodeName)for(let t=0;t<i.children.length;t++){const n=i.children[t];if("TH"!==n.nodeName)break;ac(this,vc,Tc).call(this,o,n,`${e}-prev-row`)}}function Tc(t,e,o){t.has(e)?t.get(e).set(o,1):t.set(e,new Map([[o,1]]))}function Hc(t,e,o){const n=sc(this,cc),i=n.getSetting("fixedColumnsStart");if(i<=0)return;const{wtTable:s}=n;if(s.getLastRenderedColumn()!==i-1)return;if(Math.min(t[1],t[3])!==i)return;const r=`${e}-seam`,l=s.getColumnHeadersCount();for(let t=0;t<l;t++){const e=s.getColumnHeader(i-1,t);en(e)&&ac(this,vc,Tc).call(this,o,e,r)}}function Ic(t,e,o){const n=sc(this,cc),i=n.getSetting("fixedRowsTop");if(i<=0)return;const{wtTable:s}=n,r=i-1;if(s.getLastRenderedRow()!==r)return;if(Math.min(t[0],t[2])!==i)return;const l=`${e}-row-seam-top`,a=s.getRowHeadersCount();for(let t=0;t<a;t++){const e=s.getRowHeader(r,t);en(e)&&"TH"===e.nodeName&&ac(this,vc,Tc).call(this,o,e,l)}}function _c(t,e,o){const n=sc(this,cc),i=n.getSetting("fixedRowsBottom");if(i<=0)return;const{wtTable:s}=n,r=n.getSetting("totalRows")-i;if(s.getFirstRenderedRow()!==r)return;if(Math.max(t[0],t[2])!==r-1)return;const l=`${e}-row-seam-bottom`,a=s.getRowHeadersCount();for(let t=0;t<a;t++){const e=s.getRowHeader(r,t);en(e)&&"TH"===e.nodeName&&ac(this,vc,Tc).call(this,o,e,l)}}function Ac(){const t=sc(this,gc).get(sc(this,cc));if(!t)return;const e=sc(this,cc).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(e))for(let o=0;o<e.length;o++)t.add(e[o]);t.forEach(t=>{const e=sc(this,cc).wtTable.TABLE.querySelectorAll(`.${t}`);let o=[];Array.isArray(sc(this,dc).options?.cellAttributes)&&(o=sc(this,dc).options.cellAttributes.map(t=>t[0])),Array.isArray(sc(this,dc).options?.headerAttributes)&&(o=[...o,...sc(this,dc).options.headerAttributes.map(t=>t[0])]);for(let n=0,i=e.length;n<i;n++)fo(e[n],t),wo(e[n],o)}),t.clear()}function Wc(t,e){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.add(t)}var Oc=new WeakSet;class Nc extends kh{createTable(t){return new Ah(t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const t=this.deps.getWtTable();if(!this.needFullRender||!this.shouldBeRendered()||!t.holder.parentNode)return!1;if(!this.clone)return!1;const{rootWindow:e}=this.deps,o=this.clone.wtTable.holder.parentNode,n=this.wtSettings.getSetting("preventOverflow");let i=0;this.trimmingContainer!==e||n&&"horizontal"===n?(i=this.getScrollPosition(),Xo(o)):(i=this.getOverlayOffset()*(this.isRtl()?-1:1),Yo(o,`${i}px`,"0px"));const s=this.adjustHeaderBordersPosition(i);return this.adjustElementsSize(),s}setScrollPosition(t){const{rootWindow:e}=this.deps,o=this.mainTableScrollableElement,n=o,i=()=>o===e?e.scrollX:n.scrollLeft;this.isRtl()&&(t=-t);const s=i();let r=!1;var l;return t!==s&&(l=t,o===e?e.scrollTo(l,e.scrollY):n.scrollLeft=l,r=s!==i()),r}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(t,e){const o=this.wtSettings.getSetting("defaultColumnWidth");let n=t,i=0;for(;n<e;)i+=this.deps.getWtTable().getColumnWidth(n)||o,n+=1;return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){if(!this.clone)return;const t=this.deps.getWtTable(),e=this.deps.getWtViewport(),{rootDocument:o,rootWindow:n}=this.deps,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"vertical"===s){let n=e.getWorkspaceHeight();if(e.hasHorizontalScroll()){const e=this.deps.geometryReader.clientHeight(t.holder);n=e>0?e:n-this.deps.geometryReader.getScrollbarWidth(o)}n=Math.min(n,this.deps.geometryReader.scrollHeight(t.wtRootElement)),i.height=`${n}px`}else i.height="";this.clone.wtTable.holder.style.height=i.height;const r=this.deps.geometryReader.outerWidth(this.clone.wtTable.TABLE);i.width=`${r}px`}adjustRootChildrenSize(){if(!this.clone)return;const{holder:t}=this.clone.wtTable,e=Bh(this.wot),o=this.deps.getSelectionManager().getFocusSelection()?parseInt(e.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height;const n=t.parentNode;t.style.height=n.style.height,t.style.width=`${parseInt(n.style.width,10)+o}px`}applyToDOM(){const t=this.wtSettings.getSetting("totalColumns"),e=this.isRtl()?"right":"left",o=this.deps.getWtViewport().columnsRenderCalculator;"number"==typeof o?.startPosition?this.spreader.style[e]=`${o.startPosition}px`:0===t||null===o?this.spreader.style[e]="0":ce("Incorrect value of the columnsRenderCalculator"),this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){if(!this.clone)return;const t=this.deps.getWtViewport().rowsRenderCalculator;this.clone.wtTable.spreader.style.top="number"==typeof t?.startPosition?`${t.startPosition}px`:""}scrollTo(t,e){const{wtSettings:o}=this,{geometryReader:n}=this.deps,i=o.getSetting("rowHeaders"),s=o.getSetting("fixedColumnsStart"),r=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,l=0===s&&i.length>0&&!go(r.parentNode,"innerBorderInlineStart")?1:0;let a=this.getTableParentOffset(),h=0;if(e){this.deps.getWtTable().getColumnWidth(t)>this.deps.getWtViewport().getViewportWidth()&&(e=!1)}return e&&n.offsetWidth(r)!==n.clientWidth(r)&&(h=n.getScrollbarWidth(this.deps.rootDocument)),e?(a+=this.sumCellSizes(0,t+1),a-=this.deps.getWtViewport().getViewportWidth(),a+=l):a+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),t),a+=h,n.getMaximumScrollLeft(this.mainTableScrollableElement)===a-l&&l>0&&this.deps.getWtOverlays().expandHiderHorizontallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){let t=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.deps.rootWindow||(t=this.deps.getWtTable().holderOffset.left),t}getScrollPosition(){return Math.abs(Ho(this.mainTableScrollableElement,this.deps.rootWindow))}getOverlayOffset(){const{rootWindow:t}=this.deps,e=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===t&&(!e||"horizontal"!==e)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.deps.getWtTable().getTotalWidth()-(this.clone?this.clone.wtTable.getTotalWidth():0)&&(o=0)}return o}prepareHeaderBorders(){this.needFullRender&&this.shouldBeRendered()&&this.deps.getWtTable().holder.parentNode&&this.clone&&this.trimmingContainer!==this.deps.rootWindow&&this.adjustHeaderBordersPosition(this.getScrollPosition())}adjustHeaderBordersPosition(t){const e=this.deps.getWtTable().holder.parentNode,o=function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,Oc,Pc).call(this,t);return o.hasEmptyRows?po(e,"emptyRows"):fo(e,"emptyRows"),"add"===o.innerBorder?po(e,"innerBorderLeft innerBorderInlineStart"):"remove"===o.innerBorder&&fo(e,"innerBorderLeft innerBorderInlineStart"),o.positionChanged}constructor(t){super(t,za),Wc(this,Oc)}}function Pc(t){const{wtSettings:e}=this,o=this.deps.getWtTable().holder.parentNode,n=e.getSetting("rowHeaders"),i=e.getSetting("fixedColumnsStart"),s=!e.getSetting("totalRows");let r="keep",l=!1;if(!("vertical"===e.getSetting("preventOverflow")))if(i&&!n.length)r="add";else if(!i&&n.length){const e=go(o,"innerBorderInlineStart");t?(r="add",l=!e):(r="remove",l=e)}return{hasEmptyRows:s,innerBorder:r,positionChanged:l}}const Dc={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")??0,this.wtSettings.getSetting("fixedRowsTop"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.deps.getColumnHeaders().length}};Se(Dc,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});class Lc extends Wa{constructor(t){super(t,Ba)}}be(Lc,Dc),be(Lc,Na);class zc extends kh{createTable(t){return new Lc(t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}setScrollPosition(t){return!1}getScrollPosition(){return 0}getTableParentOffset(){return 0}getOverlayOffset(){return 0}onScroll(){}sumCellSizes(t,e){return 0}adjustElementsSize(){}applyToDOM(){}scrollTo(t,e){return!1}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.deps.getWtTable().holder.parentNode||!this.clone)return!1;const t=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.deps.rootWindow){Yo(t,`${this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1)}px`,`${this.topOverlay.getOverlayOffset()}px`)}else Xo(t);const{geometryReader:e}=this.deps;let o=e.outerHeight(this.clone.wtTable.TABLE);const n=e.outerWidth(this.clone.wtTable.TABLE);return this.deps.getWtTable().hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${n}px`,!0}constructor(t,e,o){super(t,Ba),this.topOverlay=e,this.inlineStartOverlay=o}}class Bc extends Wa{constructor(t){super(t,Da)}}function Vc(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)}be(Bc,Dc),be(Bc,xh);var Fc=new WeakSet;class $c extends kh{createTable(t){return new Bc(t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!(this.needFullRender&&this.shouldBeRendered()&&this.deps.getWtTable().holder.parentNode&&this.clone))return!1;const t=this.clone.wtTable.holder.parentNode,{rootWindow:e}=this.deps,o=this.wtSettings.getSetting("preventOverflow");let n=0,i=!1;if(this.trimmingContainer!==e||o&&"vertical"===o)n=this.getScrollPosition(),Xo(t);else{const e=this.deps.getWtTable(),{geometryReader:o}=this.deps,s=o.getBoundingClientRect(e.hider);i=Math.ceil(s.bottom)===o.offsetHeight(t),n=this.getOverlayOffset(),Yo(t,"0px",`${n}px`)}const s=this.adjustHeaderBordersPosition(n,i);return this.adjustElementsSize(),s}setScrollPosition(t){const{rootWindow:e}=this.deps,o=this.mainTableScrollableElement,n=o,i=()=>o===e?e.scrollY:n.scrollTop,s=i();let r=!1;var l;return t!==s&&(l=t,o===e?e.scrollTo(e.scrollX,l):n.scrollTop=l,r=s!==i()),r}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(t,e){return this.deps.getWtViewport().sumRowHeights(t,e)}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){if(!this.clone)return;const t=this.deps.getWtTable(),e=this.deps.getWtViewport(),{rootDocument:o,rootWindow:n}=this.deps,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===s){let n=e.getWorkspaceWidth();e.hasVerticalScroll()&&(n-=this.deps.geometryReader.getScrollbarWidth(o)),n=Math.min(n,this.deps.geometryReader.scrollWidth(t.wtRootElement)),i.width=`${n}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let r=this.deps.geometryReader.outerHeight(this.clone.wtTable.TABLE);t.hasDefinedSize()||(r=0),i.height=`${r}px`}shouldReserveSelectionCornerOffset(t){if(!t||!t.cellRange)return!1;const e=this.wtSettings.getSetting("fixedRowsTop"),o=t.cellRange.getBottomEndCorner().row;if(null===o||o>=e)return!1;if(Fe())return!0;const n=t.settings.border,i=n?.cornerVisible;return"function"==typeof i?!!i(t.settings.layerLevel):!!i}adjustRootChildrenSize(){if(!this.clone)return;const{holder:t}=this.clone.wtTable,e=Bh(this.wot),o=this.deps.getSelectionManager().getFocusSelection(),n=this.shouldReserveSelectionCornerOffset(o)?parseInt(e.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width;const i=t.parentNode;t.style.width=i.style.width,t.style.height=`${parseInt(i.style.height,10)+n}px`}applyToDOM(){const t=this.wtSettings.getSetting("totalRows")??0,e=this.deps.getWtViewport().rowsRenderCalculator;"number"==typeof e?.startPosition?this.spreader.style.top=`${e.startPosition}px`:0===t||null===e?this.spreader.style.top="0":ce("Incorrect value of the rowsRenderCalculator"),this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){if(!this.clone)return;const t=this.isRtl()?"right":"left",{spreader:e}=this.clone.wtTable,o=this.deps.getWtViewport().columnsRenderCalculator;e.style[t]="number"==typeof o?.startPosition?`${o.startPosition}px`:""}scrollTo(t,e){const{wot:o,wtSettings:n}=this,{geometryReader:i}=this.deps,s=(o.cloneSource?o.cloneSource:o).wtTable.holder,r=n.getSetting("columnHeaders"),l=0===n.getSetting("fixedRowsTop")&&r.length>0&&!go(s.parentNode,"innerBorderTop")?1:0;let a=this.getTableParentOffset(),h=0;if(e){(this.deps.getWtTable().getRowHeight(t)??0)>this.deps.getWtViewport().getViewportHeight()&&(e=!1)}if(e&&i.offsetHeight(s)!==i.clientHeight(s)&&(h=i.getScrollbarWidth(this.deps.rootDocument)),e){const e=n.getSetting("fixedRowsBottom"),i=n.getSetting("totalRows");a+=this.sumCellSizes(0,t+1),a-=o.wtViewport.getViewportHeight()-this.sumCellSizes(i-e,i),a+=1,a+=l}else a+=this.sumCellSizes(n.getSetting("fixedRowsTop"),t);return a+=h,i.getMaximumScrollTop(this.mainTableScrollableElement)===a-l&&l>0&&this.deps.getWtOverlays().expandHiderVerticallyBy(l),this.setScrollPosition(a)}getTableParentOffset(){return this.mainTableScrollableElement===this.deps.rootWindow?this.deps.getWtTable().holderOffset.top:0}getScrollPosition(){return To(this.mainTableScrollableElement,this.deps.rootWindow)}getOverlayOffset(){const{rootWindow:t}=this.deps,e=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===t&&(!e||"vertical"!==e)){const t=this.deps.getWtTable().getTotalHeight()-(this.clone?this.clone.wtTable.getTotalHeight():0);o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>t&&(o=0)}return o}prepareHeaderBorders(){this.needFullRender&&this.shouldBeRendered()&&this.deps.getWtTable().holder.parentNode&&this.clone&&this.trimmingContainer!==this.deps.rootWindow&&this.adjustHeaderBordersPosition(this.getScrollPosition())}adjustHeaderBordersPosition(t,e=!1){const o=this.deps.getWtTable().holder.parentNode,n=function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,Fc,Uc).call(this,t,e);return n.hasEmptyColumns?po(o,"emptyColumns"):fo(o,"emptyColumns"),"add"===n.innerBorderTop?po(o,"innerBorderTop"):"remove"===n.innerBorderTop&&fo(o,"innerBorderTop"),"keep"!==n.innerBorderTop&&(this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")),n.positionChanged}constructor(t){super(t,Da),Vc(this,Fc),this.cachedFixedRowsTop=-1,this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}}function Uc(t,e){const{wtSettings:o}=this,n=this.deps.getWtTable().holder.parentNode,i=o.getSetting("totalColumns")??0,s="horizontal"===o.getSetting("preventOverflow"),r=!i;let l="keep",a=!1;if(!e&&!s){const e=o.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==e,s=o.getSetting("columnHeaders");if((i||0===e)&&s.length>0){const e=go(n,"innerBorderTop");t||0===o.getSetting("totalRows")?(l="add",a=!e):(l="remove",a=e)}}return{hasEmptyColumns:r,innerBorderTop:l,positionChanged:a}}function jc(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qc(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Gc(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,qc(t,e,"get"))}function Yc(t,e,o){jc(t,e),e.set(t,o)}function Xc(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,qc(t,e,"set"),o),o}function Kc(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Zc(t,e){jc(t,e),e.add(t)}var Qc=new WeakMap,Jc=new WeakMap,td=new WeakMap,ed=new WeakSet,od=new WeakSet,nd=new WeakSet,id=new WeakSet,sd=new WeakSet,rd=new WeakSet,ld=new WeakSet,ad=new WeakSet,hd=new WeakSet,cd=new WeakSet;class dd{registerListeners(){const{eventManager:t,rootDocument:e}=Gc(this,Qc);Gc(this,Jc)&&(Xc(this,Jc,!1),Kc(this,rd,wd).call(this,"relative",0,0)),Xc(this,td,!1),t.addEventListener(e,"mousedown",t=>{t instanceof MouseEvent&&Xc(this,td,Kc(this,ad,vd).call(this,t))}),t.addEventListener(e,"mouseup",()=>{Xc(this,td,!1),Gc(this,Jc)&&this.deactivate()})}tryActivate(t,e){!Gc(this,td)||Gc(this,Jc)||Ve()||!t&&!e||Kc(this,ed,ud).call(this)}syncOffsets(){if(!Gc(this,Jc))return;const t=Gc(this,Qc).getWtViewport(),e=t.rowsRenderCalculator?.startPosition,o=t.columnsRenderCalculator?.startPosition;if("number"!=typeof e||"number"!=typeof o)return;const n=e-Kc(this,od,gd).call(this),i=o-Kc(this,nd,pd).call(this);Kc(this,rd,wd).call(this,"sticky",n,i)}destroy(){Gc(this,Jc)&&Kc(this,rd,wd).call(this,"relative",0,0),Xc(this,Jc,!1),Xc(this,td,!1)}deactivate(){const t=Gc(this,Qc).wtTable.spreader,e=Gc(this,Qc).getWtViewport(),o=Gc(this,Qc).wtSettings.getSetting("rtlMode")?"right":"left";Gc(this,Qc).refreshAll();const n=Number.parseInt(t.style.top,10)||0,i=Number.parseInt(t.style[o],10)||0,s=e.rowsRenderCalculator?.startPosition,r=e.columnsRenderCalculator?.startPosition,l="number"==typeof s?s-n:Kc(this,od,gd).call(this),a="number"==typeof r?r-i:Kc(this,nd,pd).call(this);Kc(this,id,fd).call(this,l,a),Xc(this,Jc,!1),Kc(this,rd,wd).call(this,"relative",0,0),Gc(this,Qc).refreshAll(),Gc(this,Qc).applyToDOM()}constructor(t){Zc(this,ed),Zc(this,od),Zc(this,nd),Zc(this,id),Zc(this,sd),Zc(this,rd),Zc(this,ld),Zc(this,ad),Zc(this,hd),Zc(this,cd),Yc(this,Qc,{writable:!0,value:void 0}),Yc(this,Jc,{writable:!0,value:void 0}),Yc(this,td,{writable:!0,value:void 0}),Xc(this,Jc,!1),Xc(this,td,!1),Xc(this,Qc,t)}}function ud(){const t=Gc(this,Qc).wtTable.spreader,e=Gc(this,Qc).wtSettings.getSetting("rtlMode")?"right":"left",o=(Number.parseInt(t.style.top,10)||0)-Kc(this,od,gd).call(this),n=(Number.parseInt(t.style[e],10)||0)-Kc(this,nd,pd).call(this);Xc(this,Jc,!0),Kc(this,rd,wd).call(this,"sticky",o,n)}function gd(){const t=Gc(this,Qc).getTopOverlay();return t.getScrollPosition()-t.getTableParentOffset()}function pd(){const t=Gc(this,Qc).getInlineStartOverlay();return Kc(this,cd,yd).call(this)&&Kc(this,hd,Cd).call(this)?Math.abs(t.getScrollPosition()):Math.abs(t.getScrollPosition())-t.getTableParentOffset()}function fd(t,e){if(Kc(this,hd,Cd).call(this)){const{rootWindow:o}=Gc(this,Qc),n=Kc(this,cd,yd).call(this)?e:e+Gc(this,Qc).getInlineStartOverlay().getTableParentOffset();o.scrollTo(n,t+Gc(this,Qc).getTopOverlay().getTableParentOffset())}else Gc(this,Qc).wtTable.holder.scrollTop=t,Gc(this,Qc).wtTable.holder.scrollLeft=Kc(this,cd,yd).call(this)?-e:e}function md(t){t.style.top="",t.style.bottom="",t.style.left="",t.style.right=""}function wd(t,e,o){const n=Gc(this,Qc).wtTable.spreader,i=Kc(this,cd,yd).call(this),s=i?"right":"left",r="sticky"===t;n.style.position=t,r?(n.style.top=`${e}px`,n.style.bottom="",n.style[s]=`${o}px`,n.style[i?"left":"right"]=""):Kc(this,sd,md).call(this,n),Kc(this,hd,Cd).call(this)||(Kc(this,ld,bd).call(this,Gc(this,Qc).getInlineStartOverlay(),t,r,e,null,i),Kc(this,ld,bd).call(this,Gc(this,Qc).getTopOverlay(),t,r,null,o,i),Kc(this,ld,bd).call(this,Gc(this,Qc).getBottomOverlay(),t,r,null,o,i))}function bd(t,e,o,n,i,s){if(!t.needFullRender||!t.clone)return;const r=t.clone.wtTable.spreader,l=s?"right":"left";r.style.position=e,o?(null!==n&&(r.style.top=`${n}px`),null!==i&&(r.style[l]=`${i}px`,r.style[s?"left":"right"]="")):Kc(this,sd,md).call(this,r)}function vd(t){return Kc(this,hd,Cd).call(this)?t.target===Gc(this,Qc).rootDocument.documentElement:t.target===Gc(this,Qc).getScrollableElement()}function Cd(){return Gc(this,Qc).getScrollableElement()===Gc(this,Qc).rootWindow}function yd(){return Gc(this,Qc).wtSettings.getSetting("rtlMode")}function Sd(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function kd(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Sd(t,e,"get"))}function Rd(t,e,o){!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,o)}function Ed(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Sd(t,e,"set"),o),o}var xd=new WeakMap,Md=new WeakMap,Td=new WeakMap,Hd=new WeakMap;class Id{observe(){const t=kd(this,xd).wtTable.wtRootElement.parentElement;t&&kd(this,Hd).observe(t)}resetResizeCount(){Ed(this,Md,0)}destroy(){null!==kd(this,Td)&&(clearTimeout(kd(this,Td)),Ed(this,Td,null)),kd(this,Hd).disconnect()}constructor(t){Rd(this,xd,{writable:!0,value:void 0}),Rd(this,Md,{writable:!0,value:void 0}),Rd(this,Td,{writable:!0,value:void 0}),Rd(this,Hd,{writable:!0,value:void 0}),Ed(this,Md,0),Ed(this,Td,null),Ed(this,Hd,new ResizeObserver(t=>{Ae(()=>{Array.isArray(t)&&t.length&&(Ed(this,Md,kd(this,Md)+1),300===kd(this,Md)&&(Xe("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."),kd(this,Hd).disconnect()),null!==kd(this,Td)&&clearTimeout(kd(this,Td)),Ed(this,Td,setTimeout(()=>{Ed(this,Md,0)},100)),kd(this,xd).wtSettings.getSetting("onContainerElementResize"))})})),Ed(this,xd,t)}}function _d(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ad(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,_d(t,e,"get"))}function Wd(t,e,o){!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,o)}function Od(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,_d(t,e,"set"),o),o}var Nd=new WeakMap,Pd=new WeakMap;class Dd{updateLastSpreaderSize(){const t=Ad(this,Nd).wtTable.spreader,{geometryReader:e}=Ad(this,Nd),o=e.clientWidth(t),n=e.clientHeight(t),i=o!==Ad(this,Pd).width||n!==Ad(this,Pd).height;return i&&(Ad(this,Pd).width=o,Ad(this,Pd).height=n),i}adjustElementsSize(){const{wtSettings:t,rootWindow:e,geometryReader:o}=Ad(this,Nd),n=Ad(this,Nd).getWtViewport(),{wtTable:i}=Ad(this,Nd),s=Ad(this,Nd).getTopOverlay(),r=Ad(this,Nd).getInlineStartOverlay(),l=Ad(this,Nd).getBottomOverlay(),a=Ad(this,Nd).getScrollableElement(),h=a===e,c=t.getSetting("totalColumns"),d=t.getSetting("totalRows"),u=n.getRowHeaderWidth(),g=n.getColumnHeaderHeight(),p=t.getSetting("externalRowCalculator")?0:1,f=g+s.sumCellSizes(0,d)+p,m=u+r.sumCellSizes(0,c),w=i.hider.style,b=!h&&a instanceof HTMLElement&&a.scrollTop>Math.max(0,f-o.clientHeight(i.holder))?1:0,v=!h&&a instanceof HTMLElement&&a.scrollLeft>Math.max(0,m-o.clientWidth(i.holder))?1:0;w.width=`${m+v}px`,w.height=`${f+b}px`,s.adjustElementsSize(),r.adjustElementsSize(),l.adjustElementsSize()}expandHiderVerticallyBy(t){const{hider:e}=Ad(this,Nd).wtTable;e.style.height=`${parseInt(e.style.height,10)+t}px`}expandHiderHorizontallyBy(t){const{hider:e}=Ad(this,Nd).wtTable;e.style.width=`${parseInt(e.style.width,10)+t}px`}constructor(t){Wd(this,Nd,{writable:!0,value:void 0}),Wd(this,Pd,{writable:!0,value:void 0}),Od(this,Pd,{width:null,height:null}),Od(this,Nd,t)}}function Ld(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zd(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Bd(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,zd(t,e,"get"))}function Vd(t,e,o){Ld(t,e),e.set(t,o)}function Fd(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,zd(t,e,"set"),o),o}function $d(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Ud(t,e){Ld(t,e),e.add(t)}var jd=new WeakMap,qd=new WeakMap,Gd=new WeakMap,Yd=new WeakMap,Xd=new WeakMap,Kd=new WeakMap,Zd=new WeakMap,Qd=new WeakMap,Jd=new WeakMap,tu=new WeakMap,eu=new WeakMap,ou=new WeakMap,nu=new WeakMap,iu=new WeakSet,su=new WeakSet,ru=new WeakSet,lu=new WeakSet;class au{get scrollableElement(){return Bd(this,qd)}get isScrollableElementProvisional(){return Bd(this,Gd)}get verticalScrolling(){return Bd(this,Zd)}set verticalScrolling(t){Fd(this,Zd,t)}get horizontalScrolling(){return Bd(this,Qd)}set horizontalScrolling(t){Fd(this,Qd,t)}setRenderingStateChanged(t){Fd(this,eu,t)}cacheScrollCallbackPositions(){Fd(this,ou,Bd(this,jd).getTopOverlay().getScrollPosition()),Fd(this,nu,Bd(this,jd).getInlineStartOverlay().getScrollPosition())}syncScrollPositions(){if(Bd(this,jd).getDestroyed())return;const t=Bd(this,jd).getTopOverlay(),e=Bd(this,jd).getInlineStartOverlay(),o=Bd(this,jd).getBottomOverlay(),n=Bd(this,jd).getWtViewport(),{wtSettings:i}=Bd(this,jd),s=Bd(this,qd),r=t.clone?.wtTable.holder,l=e.clone?.wtTable.holder,a=i.getSetting("preventOverflow");let h=s instanceof HTMLElement?s.scrollLeft:0,c=s instanceof HTMLElement?s.scrollTop:0;if(n.isHorizontallyScrollableByWindow()&&("boolean"==typeof a&&a||"horizontal"!==a)&&s instanceof Window&&(h=s.scrollX),n.isVerticallyScrollableByWindow()&&("boolean"==typeof a&&a||"vertical"!==a)&&s instanceof Window&&(c=s.scrollY),Fd(this,Qd,Bd(this,Jd)!==h),Fd(this,Zd,Bd(this,tu)!==c),Fd(this,Jd,h),Fd(this,tu,c),Bd(this,jd).tryActivateStickyScroll(Bd(this,Zd),Bd(this,Qd)),Bd(this,Qd)){en(r)&&(r.scrollLeft=h);const t=o.needFullRender?o.clone?.wtTable.holder:null;t&&(t.scrollLeft=h)}Bd(this,Zd)&&en(l)&&(n.isVerticallyScrollableByWindow()?l.scrollTop=0:l.scrollTop=c),Bd(this,jd).refreshAll(),Bd(this,jd).syncStickyScrollOffsets()}fireScrollCallbacksAndReset(){Bd(this,Zd)&&$d(this,iu,hu).call(this)&&Bd(this,jd).getInlineStartOverlay().onScroll(),Bd(this,Qd)&&$d(this,su,cu).call(this)&&Bd(this,jd).getTopOverlay().onScroll(),Fd(this,Zd,!1),Fd(this,Qd,!1)}syncScrollWithMaster(){if(!Bd(this,eu))return;const t=Bd(this,jd).getTopOverlay(),e=Bd(this,jd).getBottomOverlay(),o=Bd(this,jd).getInlineStartOverlay(),n=t.mainTableScrollableElement;if(!(n instanceof HTMLElement))return;const{scrollLeft:i,scrollTop:s}=n;t.needFullRender&&t.clone&&(t.clone.wtTable.holder.scrollLeft=i),e.needFullRender&&e.clone&&(e.clone.wtTable.holder.scrollLeft=i),o.needFullRender&&o.clone&&(o.clone.wtTable.holder.scrollTop=s),Fd(this,eu,!1)}resetSizesMeasuredBeforeLayoutSettled(){if(!Bd(this,Xd))return;Fd(this,Kd,!0);const t=Bd(this,jd).getWtViewport();t.resetAllOversizedRows(),t.invalidateColumnWidthCache()}confirmSizesRemeasured(){Bd(this,Kd)&&(Fd(this,Kd,!1),Fd(this,Xd,!1))}resolveProvisionalLayout(){if(!Bd(this,Gd)||!Bd(this,jd).geometryReader.isRendered(Bd(this,jd).wtTable.wtRootElement))return;const{rootWindow:t}=Bd(this,jd),e=$d(this,lu,uu).call(this);if(!(e!==t||Bd(this,jd).getTopOverlay().trimmingContainer===t))return Fd(this,Gd,e!==Bd(this,Yd)),void Fd(this,Yd,e);this.updateMainScrollableElements(),Fd(this,Xd,!0)}updateMainScrollableElements(){Bd(this,jd).eventManager.clearEvents(!0),Bd(this,jd).getInlineStartOverlay().updateMainScrollableElement(),Bd(this,jd).getTopOverlay().updateMainScrollableElement(),Bd(this,jd).getBottomOverlay().needFullRender&&Bd(this,jd).getBottomOverlay().updateMainScrollableElement(),Fd(this,qd,$d(this,ru,du).call(this)),Bd(this,jd).registerListeners()}constructor(t){Ud(this,iu),Ud(this,su),Ud(this,ru),Ud(this,lu),Vd(this,jd,{writable:!0,value:void 0}),Vd(this,qd,{writable:!0,value:void 0}),Vd(this,Gd,{writable:!0,value:void 0}),Vd(this,Yd,{writable:!0,value:void 0}),Vd(this,Xd,{writable:!0,value:void 0}),Vd(this,Kd,{writable:!0,value:void 0}),Vd(this,Zd,{writable:!0,value:void 0}),Vd(this,Qd,{writable:!0,value:void 0}),Vd(this,Jd,{writable:!0,value:void 0}),Vd(this,tu,{writable:!0,value:void 0}),Vd(this,eu,{writable:!0,value:void 0}),Vd(this,ou,{writable:!0,value:void 0}),Vd(this,nu,{writable:!0,value:void 0}),Fd(this,Gd,!1),Fd(this,Yd,null),Fd(this,Xd,!1),Fd(this,Kd,!1),Fd(this,Zd,!1),Fd(this,Qd,!1),Fd(this,eu,!1),Fd(this,ou,null),Fd(this,nu,null),Fd(this,jd,t),Fd(this,qd,$d(this,ru,du).call(this)),Fd(this,Jd,Bd(this,jd).rootWindow.scrollX),Fd(this,tu,Bd(this,jd).rootWindow.scrollY)}}function hu(){const t=Bd(this,jd).getTopOverlay().getScrollPosition();return Bd(this,ou)!==t&&(Fd(this,ou,t),!0)}function cu(){const t=Bd(this,jd).getInlineStartOverlay().getScrollPosition();return Bd(this,nu)!==t&&(Fd(this,nu,t),!0)}function du(){const{wtTable:t,geometryReader:e}=Bd(this,jd);return Fd(this,Gd,!e.isRendered(t.wtRootElement)),Fd(this,Yd,null),$d(this,lu,uu).call(this)}function uu(){const{wtTable:t,geometryReader:e}=Bd(this,jd),o=t.wtRootElement.parentNode;return null!==o&&1===o.nodeType&&(()=>{const t=e.getComputedStyle(o).getPropertyValue("overflow");return"hidden"===t||"clip"===t})()?t.holder:Io(t.TABLE)}function gu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pu(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function fu(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,pu(t,e,"get"))}function mu(t,e,o){gu(t,e),e.set(t,o)}function wu(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,pu(t,e,"set"),o),o}function bu(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function vu(t,e){gu(t,e),e.add(t)}var Cu=new WeakMap,yu=new WeakMap,Su=new WeakMap,ku=new WeakSet,Ru=new WeakSet,Eu=new WeakSet,xu=new WeakSet,Mu=new WeakSet,Tu=new WeakSet;class Hu{registerListeners(){const{rootDocument:t,rootWindow:e,wtTable:o,wtSettings:n,eventManager:i}=fu(this,Cu),s=fu(this,Cu).getTopOverlay(),r=fu(this,Cu).getInlineStartOverlay(),{mainTableScrollableElement:l}=s,{mainTableScrollableElement:a}=r;i.addEventListener(t.documentElement,"keydown",t=>bu(this,Eu,Au).call(this,t)),i.addEventListener(t.documentElement,"keyup",()=>bu(this,xu,Wu).call(this)),i.addEventListener(t,"visibilitychange",()=>bu(this,xu,Wu).call(this)),fu(this,Cu).registerStickyScrollListeners(),i.addEventListener(l,"scroll",t=>bu(this,ku,Iu).call(this,t),{passive:!0}),l!==a&&i.addEventListener(a,"scroll",t=>bu(this,ku,Iu).call(this,t),{passive:!0});const h=fu(this,Cu).getScrollableElement()===e,c=n.getSetting("preventWheel"),d={passive:h};let u;i.addEventListener(o.wtRootElement,"wheel",t=>bu(this,Ru,_u).call(this,t,c),d),fu(this,Cu).getCloneableOverlays().forEach(t=>{t.clone&&i.addEventListener(t.clone.wtTable.holder,"wheel",t=>bu(this,Ru,_u).call(this,t,c),d)}),i.addEventListener(e,"resize",()=>{Ae(()=>{clearTimeout(u),n.getSetting("onWindowResize"),u=setTimeout(()=>{fu(this,Cu).resetResizeCount()},200)})}),h||fu(this,Cu).observeResize()}constructor(t){vu(this,ku),vu(this,Ru),vu(this,Eu),vu(this,xu),vu(this,Mu),vu(this,Tu),mu(this,Cu,{writable:!0,value:void 0}),mu(this,yu,{writable:!0,value:void 0}),mu(this,Su,{writable:!0,value:void 0}),wu(this,yu,!1),wu(this,Cu,t),wu(this,Su,bu(this,Tu,Nu).call(this))}}function Iu(t){const{rootWindow:e}=fu(this,Cu),o=fu(this,Cu).getInlineStartOverlay().mainTableScrollableElement,n=fu(this,Cu).getTopOverlay().mainTableScrollableElement,i=t.target;(!fu(this,yu)||(n===e||i===e||n instanceof HTMLElement&&no(t).contains(n))&&(o===e||i===e||o instanceof HTMLElement&&no(t).contains(o)))&&fu(this,Cu).syncScrollPositions()}function _u(t,e){if(t.ctrlKey)return;const{rootWindow:o}=fu(this,Cu),n=fu(this,Cu).getInlineStartOverlay().mainTableScrollableElement,i=fu(this,Cu).getTopOverlay().mainTableScrollableElement,s=t.target,r=i!==o&&s!==o&&!(s instanceof Node&&i instanceof HTMLElement&&s.contains(i)),l=n!==o&&s!==o&&!(s instanceof Node&&n instanceof HTMLElement&&s.contains(n));if(fu(this,yu)&&(r||l)||fu(this,Cu).getScrollableElement()===o)return;const a=bu(this,Mu,Ou).call(this,t);(e||fu(this,Cu).getScrollableElement()!==o&&a)&&t.preventDefault()}function Au(t){wu(this,yu,gn(t.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT"))}function Wu(){wu(this,yu,!1)}function Ou(t){let e,o;!function(t){return"wheelDeltaY"in t||"wheelDeltaX"in t}(t)?(e=t.deltaY,o=t.deltaX):(e=isNaN(t.deltaY)?-1*(t.wheelDeltaY??0):t.deltaY,o=isNaN(t.deltaX)?-1*(t.wheelDeltaX??0):t.deltaX),1===t.deltaMode&&(o+=o*fu(this,Su),e+=e*fu(this,Su));const n=fu(this,Cu).scrollVertically(e),i=fu(this,Cu).scrollHorizontally(o);return n||i}function Nu(){const{rootDocument:t,geometryReader:e}=fu(this,Cu),o=e.getComputedStyle(t.body),n=parseInt(o.lineHeight,10),i=1.2*parseInt(o.fontSize,10);return n||i}function Pu(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Du(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Lu(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Du(t,e,"get"))}function zu(t,e,o){Pu(t,e),e.set(t,o)}function Bu(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Du(t,e,"set"),o),o}function Vu(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}var Fu=new WeakMap,$u=new WeakMap,Uu=new WeakMap,ju=new WeakMap,qu=new WeakMap,Gu=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Ku=new WeakSet;class Zu{get verticalScrolling(){return Lu(this,ju).verticalScrolling}set verticalScrolling(t){Lu(this,ju).verticalScrolling=t}get horizontalScrolling(){return Lu(this,ju).horizontalScrolling}set horizontalScrolling(t){Lu(this,ju).horizontalScrolling=t}get scrollableElement(){return Lu(this,ju).scrollableElement}get isScrollableElementProvisional(){return Lu(this,ju).isScrollableElementProvisional}getOverlays(t=!1){const e=[...Lu(this,qu)];return t&&e.push(this.wtTable),e}initOverlays(){const t=Lu(this,Fu).makeOverlayDeps;this.topOverlay=new $c(t()),this.bottomOverlay=new Ih(t()),this.inlineStartOverlay=new Nc(t()),this.topInlineStartCornerOverlay=new zc(t(),this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new Rh(t(),this.bottomOverlay,this.inlineStartOverlay),Bu(this,qu,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}prepareHeaderBorders(){this.topOverlay.prepareHeaderBorders(),this.bottomOverlay.clone&&this.bottomOverlay.prepareHeaderBorders(),this.inlineStartOverlay.prepareHeaderBorders()}beforeDraw(){this.isScrollDrivenDraw||Lu(this,ju).resetSizesMeasuredBeforeLayoutSettled(),Lu(this,ju).setRenderingStateChanged(Lu(this,qu).reduce((t,e)=>e.hasRenderingStateChanged()||t,!1)),Lu(this,qu).forEach(t=>t.updateStateOfRendering("before"))}afterDraw(t){this.syncScrollWithMaster(),Lu(this,qu).forEach(t=>{const e=t.hasRenderingStateChanged();t.updateStateOfRendering("after"),e&&!t.needFullRender&&t.reset()}),t&&Lu(this,ju).confirmSizesRemeasured(),this.isScrollDrivenDraw||Lu(this,ju).resolveProvisionalLayout()}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),Lu(this,ju).fireScrollCallbacksAndReset()):this.destroy())}registerListeners(){Lu(this,$u).registerListeners()}scrollVertically(t){if(!(this.scrollableElement instanceof HTMLElement))return!1;const e=this.scrollableElement,o=e.scrollTop;return e.scrollTop+=t,o!==e.scrollTop}scrollHorizontally(t){if(!(this.scrollableElement instanceof HTMLElement))return!1;const e=this.scrollableElement,o=e.scrollLeft;return e.scrollLeft+=t,o!==e.scrollLeft}syncScrollPositions(){Lu(this,ju).syncScrollPositions()}syncScrollWithMaster(){Lu(this,ju).syncScrollWithMaster()}updateMainScrollableElements(){Lu(this,ju).updateMainScrollableElements()}destroy(){Lu(this,Gu).cancel(),Lu(this,Xu).destroy(),Lu(this,Yu).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){const e=this.isScrollDrivenDraw&&(this.verticalScrolling||this.horizontalScrolling),o=t||this.isScrollDrivenDraw&&this.verticalScrolling&&!this.horizontalScrolling;e?Lu(this,Gu).call(this):Vu(this,Ku,Qu).call(this),this.bottomOverlay.clone&&this.bottomOverlay.refresh(o),this.inlineStartOverlay.refresh(t),this.topOverlay.refresh(t),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(t),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(o)}updateLastSpreaderSize(){return Lu(this,Uu).updateLastSpreaderSize()}refreshColumnHeaderHeights(){[this.wot.wtTable,this.topOverlay.clone?.wtTable,this.inlineStartOverlay.clone?.wtTable,this.topInlineStartCornerOverlay?.clone?.wtTable].forEach(t=>{t&&ma(t)}),wa(this.wot.wtTable),this.adjustElementsSize()}adjustElementsSize(){Lu(this,Uu).adjustElementsSize()}expandHiderVerticallyBy(t){Lu(this,Uu).expandHiderVerticallyBy(t)}expandHiderHorizontallyBy(t){Lu(this,Uu).expandHiderHorizontallyBy(t)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM(),Lu(this,Yu).syncOffsets())}getParentOverlay(t){if(!t)return null;const e=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return $(e,e=>{e&&e.clone&&e.clone.wtTable.TABLE.contains(t)&&(o=e.clone)}),o}syncOverlayTableClassNames(){const t=this.wtTable.TABLE;$([this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay],e=>{e&&e.clone&&(e.clone.wtTable.TABLE.className=t.className)})}constructor(t){var e,o;Pu(e=this,o=Ku),o.add(e),zu(this,Fu,{writable:!0,value:void 0}),zu(this,$u,{writable:!0,value:void 0}),zu(this,Uu,{writable:!0,value:void 0}),zu(this,ju,{writable:!0,value:void 0}),zu(this,qu,{writable:!0,value:void 0}),zu(this,Gu,{writable:!0,value:void 0}),zu(this,Yu,{writable:!0,value:void 0}),zu(this,Xu,{writable:!0,value:void 0}),this.scrollbarSize=0,this.destroyed=!1,this.isScrollDrivenDraw=!1,Bu(this,qu,[]),Bu(this,Gu,an(Vu(this,Ku,Qu).bind(this),200)),Bu(this,Fu,t),this.wot=t.wot,this.wtSettings=t.wtSettings,this.wtTable=t.wtTable;const{rootDocument:n}=t;this.eventManager=t.eventManager,this.scrollbarSize=Lu(this,Fu).geometryReader.getScrollbarWidth(n),Bu(this,Yu,new dd(Lu(this,Fu).makeStickyScrollDeps(this))),Bu(this,Xu,new Id(Lu(this,Fu).makeResizeMonitorDeps())),Bu(this,Uu,new Dd(Lu(this,Fu).makeSpreaderSizeDeps(this))),Bu(this,ju,new au(Lu(this,Fu).makeScrollSyncDeps(this,Lu(this,Yu)))),Bu(this,$u,new Hu(Lu(this,Fu).makeNativeScrollInputDeps(this,Lu(this,Yu),Lu(this,Xu)))),this.initOverlays(),Lu(this,ju).cacheScrollCallbackPositions(),this.destroyed=!1,this.registerListeners()}}function Qu(){if(this.destroyed)return;this.updateLastSpreaderSize()&&this.adjustElementsSize()}class Ju{update(t,e){return void 0===e?ke(t,(t,e)=>{this.settings[e]=t}):this.settings[t]=e,this}getSetting(t,e,o,n,i){return"function"==typeof this.settings[t]?this.settings[t](e,o,n,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(function(t){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,singlePassLayout:!0,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>t.getSetting("fixedColumnsStart")>0||t.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>t.getSetting("fixedRowsTop")>0||t.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>t.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,o,n)=>{const i=t.getSetting("data",e,o);Eo(n,null==i?"":i)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},rowHeightsUniform:()=>!1,columnWidthsUniform:()=>!1,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold:null,viewportRowRenderingOffsetIsAuto:!0,viewportColumnRenderingOffsetIsAuto:!0,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOverOutside:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,onSelectionHandleMouseDown:null,onSelectionEdgeMouseDown: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}}(this)),ke(this.defaults,(e,o)=>{void 0!==t[o]?this.settings[o]=t[o]:void 0===e?ce(`A required setting "${o}" was not provided`):this.settings[o]=e})}}function tg(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function eg(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,tg(t,e,"get"))}function og(t,e,o){!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,o)}function ng(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,tg(t,e,"set"),o),o}var ig=new WeakMap,sg=new WeakMap,rg=new WeakMap,lg=new WeakMap;class ag extends Wa{alignOverlaysWithTrimmingContainer(){const t=ig.has(this),e=No(this.wtRootElement),{geometryReader:o}=this.deps;if(e instanceof HTMLElement){if(t){if(eg(this,lg)!==e){eg(this,sg)?.disconnect(),eg(this,rg)?.disconnect(),ng(this,ig,null),ng(this,lg,e);const t=()=>{ng(this,ig,null)},o=new ResizeObserver(t);o.observe(e),ng(this,sg,o);const n=new ResizeObserver(t);n.observe(this.hider),ng(this,rg,n)}const t=o.offsetWidth(e),n=o.offsetHeight(e),i=o.scrollWidth(e),s=o.scrollHeight(e),r=o.getStyle(e,"overflow")??"",l=o.getStyle(e,"height")??"",a=o.offsetHeight(this.hider),h=o.offsetWidth(this.hider),c=eg(this,ig);if(null!==c&&c.trimmingOffsetWidth===t&&c.trimmingOffsetHeight===n&&c.trimmingScrollWidth===i&&c.trimmingScrollHeight===s&&c.trimmingOverflow===r&&c.trimmingHeight===l&&c.hiderOffsetHeight===a&&c.hiderOffsetWidth===h){const t=this.holder.style;t.width=c.holderWidth,t.height=c.holderHeight,t.overflow="",this.hasTableHeight=c.hasTableHeight,this.hasTableWidth=c.hasTableWidth}else{const c=e.parentElement,d=this.holder.style;let u=t,g=n;const p=["auto","hidden","scroll","clip"],f=r?r.split(" ").some(t=>p.includes(t)):[o.getStyle(e,"overflowX"),o.getStyle(e,"overflowY")].some(t=>t&&p.includes(t));let m="auto"===l;if(c&&f){const t=e.cloneNode(!1);t.style.overflow="auto",t.style.position="absolute",t.style.border="0",t.style.padding="0",e.nextElementSibling?c.insertBefore(t,e.nextElementSibling):c.appendChild(t);const n=parseInt(o.getComputedStyle(t).height,10);if(c.removeChild(t),0===n){g=0;const t=o.getComputedStyle(e),n=t.overflowX,i=t.overflowY;"auto"!==n&&"scroll"!==n||"auto"===i||"scroll"===i||(m=!0)}}g=Math.min(g,s),u=Math.min(u,i);const w=m?"auto":`${g}px`,b=`${u}px`,v="auto"===w||g>0,C=u>0;d.height=w,d.width=b,d.overflow="",this.hasTableHeight=v,this.hasTableWidth=C,u>0&&ng(this,ig,{trimmingOffsetWidth:t,trimmingOffsetHeight:n,trimmingScrollWidth:i,trimmingScrollHeight:s,trimmingOverflow:r,trimmingHeight:l,hiderOffsetHeight:a,hiderOffsetWidth:h,holderWidth:b,holderHeight:w,hasTableHeight:v,hasTableWidth:C})}}}else{this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}this.isTableVisible=xo(this.TABLE)}destroy(){eg(this,sg)?.disconnect(),eg(this,rg)?.disconnect(),ng(this,ig,null),ng(this,sg,null),ng(this,rg,null),ng(this,lg,null)}constructor(t){super(t,"master"),og(this,ig,{writable:!0,value:void 0}),og(this,sg,{writable:!0,value:void 0}),og(this,rg,{writable:!0,value:void 0}),og(this,lg,{writable:!0,value:void 0}),ng(this,ig,null),ng(this,sg,null),ng(this,rg,null),ng(this,lg,null)}}function hg(t,e,o){const n=t>=0?e(t):NaN;return isNaN(n)?o:n}function cg(t,e){let o=0;for(;o<t;){const n=o+t>>>1;e(n)?o=n+1:t=n}return o}function dg(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ug(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dg(t,e,"get"))}function gg(t,e,o){!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,o)}function pg(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,dg(t,e,"set"),o),o}be(ag,Eh),be(ag,xh);var fg=new WeakMap,mg=new WeakMap;class wg{getOffset(t){return t<=0?0:Math.min(t,ug(this,mg))*ug(this,fg)}findIndexAtOffset(t){return t<=0||0===ug(this,mg)?0:Math.min(Math.floor(t/ug(this,fg)),ug(this,mg)-1)}getSizeAt(t){return t<0||t>=ug(this,mg)?0:ug(this,fg)}getTotalSize(){return ug(this,mg)*ug(this,fg)}constructor(t,e){gg(this,fg,{writable:!0,value:void 0}),gg(this,mg,{writable:!0,value:void 0}),this.prefixSum=null,pg(this,fg,t),pg(this,mg,e)}}function bg(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vg(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Cg(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,vg(t,e,"get"))}function yg(t,e,o){bg(t,e),e.set(t,o)}function Sg(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,vg(t,e,"set"),o),o}var kg=new WeakMap,Rg=new WeakMap,Eg=new WeakMap,xg=new WeakMap,Mg=new WeakMap,Tg=new WeakSet;class Hg{getOffset(t){if(t<=0)return 0;const e=Math.min(t,Cg(this,Rg));return e*Cg(this,kg)+Cg(this,xg)[function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,Tg,Ig).call(this,e)]}findIndexAtOffset(t){if(t<=0||0===Cg(this,Rg))return 0;const e=cg(Cg(this,Rg),e=>this.getOffset(e+1)<=t);return Math.min(e,Cg(this,Rg)-1)}getSizeAt(t){return t<0||t>=Cg(this,Rg)?0:Cg(this,Mg).get(t)??Cg(this,kg)}getTotalSize(){return Cg(this,Rg)*Cg(this,kg)+Cg(this,xg)[Cg(this,xg).length-1]}constructor(t,e,o,n){var i,s;bg(i=this,s=Tg),s.add(i),yg(this,kg,{writable:!0,value:void 0}),yg(this,Rg,{writable:!0,value:void 0}),yg(this,Eg,{writable:!0,value:void 0}),yg(this,xg,{writable:!0,value:void 0}),yg(this,Mg,{writable:!0,value:void 0}),this.prefixSum=null;const r=new Map;for(const i of Object.keys(t)){const s=Number(i);if(void 0!==t[s]&&s>=0&&s<e){const t=o(s);r.set(s,isNaN(t)?n:t)}}const l=Float64Array.from(r.keys()).sort();let a=e-1;for(;a>=0&&r.has(a);)a-=1;const h=hg(a,o,n),c=new Float64Array(l.length+1);for(let t=0;t<l.length;t++)c[t+1]=c[t]+(r.get(l[t])-h);Sg(this,kg,h),Sg(this,Rg,e),Sg(this,Eg,l),Sg(this,xg,c),Sg(this,Mg,r)}}function Ig(t){const e=Cg(this,Eg);return cg(e.length,o=>e[o]<t)}function _g(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ag(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,_g(t,e,"get"))}function Wg(t,e,o){!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,o)}function Og(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,_g(t,e,"set"),o),o}var Ng=new WeakMap;class Pg{getOffset(t){return t<=0?0:t>=Ag(this,Ng)?this.prefixSum[Ag(this,Ng)]:this.prefixSum[t]}findIndexAtOffset(t){if(t<=0||0===Ag(this,Ng))return 0;const e=cg(Ag(this,Ng),e=>this.prefixSum[e+1]<=t);return Math.min(e,Ag(this,Ng)-1)}getSizeAt(t){return t<0||t>=Ag(this,Ng)?0:this.prefixSum[t+1]-this.prefixSum[t]}getTotalSize(){return this.prefixSum[Ag(this,Ng)]}constructor(t,e,o){Wg(this,Ng,{writable:!0,value:void 0});const n=new Float64Array(t+1);n[0]=0;for(let i=0;i<t;i++){const t=e(i);n[i+1]=n[i]+(isNaN(t)?o:t)}this.prefixSum=n,Og(this,Ng,t)}}function Dg(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Lg(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Dg(t,e,"get"))}function zg(t,e,o){!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,o)}function Bg(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Dg(t,e,"set"),o),o}var Vg=new WeakMap,Fg=new WeakMap,$g=new WeakMap,Ug=new WeakMap,jg=new WeakMap,qg=new WeakMap,Gg=new WeakMap;class Yg{get prefixSum(){return Lg(this,Vg)?.prefixSum??null}build(){var t,e,o;const n=Lg(this,Fg).call(this),i=Lg(this,$g),s=Lg(this,Ug).call(this);if(this.totalItems=n,this.buildSeq+=1,null===(t=Lg(this,Gg))||void 0===t||t.call(this),null===(e=Lg(this,jg))||void 0===e?void 0:e.call(this)){const t=hg(n-1,i,s);return void Bg(this,Vg,new wg(t,n))}const r=null===(o=Lg(this,qg))||void 0===o?void 0:o.call(this);Bg(this,Vg,r?new Hg(r,n,i,s):new Pg(n,i,s))}getOffset(t){return Lg(this,Vg)?.getOffset(t)??0}findIndexAtOffset(t){return Lg(this,Vg)?.findIndexAtOffset(t)??0}getSizeAt(t){return Lg(this,Vg)?.getSizeAt(t)??0}getTotalSize(){return Lg(this,Vg)?.getTotalSize()??0}ensureBuilt(){this.isCurrent()||this.build()}invalidate(){Bg(this,Vg,null),this.totalItems=0}isBuilt(){return null!==this.prefixSum}isCurrent(){return null!==Lg(this,Vg)&&this.totalItems===Lg(this,Fg).call(this)}constructor({totalItemsFn:t,sizeFn:e,defaultSizeFn:o,isUniformFn:n,sparseExceptionsFn:i,onBuildFn:s}){zg(this,Vg,{writable:!0,value:void 0}),zg(this,Fg,{writable:!0,value:void 0}),zg(this,$g,{writable:!0,value:void 0}),zg(this,Ug,{writable:!0,value:void 0}),zg(this,jg,{writable:!0,value:void 0}),zg(this,qg,{writable:!0,value:void 0}),zg(this,Gg,{writable:!0,value:void 0}),this.totalItems=0,Bg(this,Vg,null),this.buildSeq=0,Bg(this,Fg,t),Bg(this,$g,e),Bg(this,Ug,o),Bg(this,jg,n),Bg(this,qg,i),Bg(this,Gg,s)}}function Xg(t){const{geometryReader:e}=t.deps;if(t.isVerticallyScrollableByWindow()){const o=t.deps.rootDocument.documentElement;return e.scrollHeight(o)>e.clientHeight(o)}const{holder:o,hider:n}=t.wtTable,i=e.clientHeight(o),s=e.offsetHeight(n);return i<s||s>t.getWorkspaceHeight()}function Kg(t){const{rootDocument:e,rootWindow:o,geometryReader:n}=t.deps,i=t.deps.getTopOverlay().trimmingContainer;let s=0;if(i===o)s=n.clientHeight(e.documentElement);else{s=n.outerHeight(i)>0&&n.clientHeight(i)>0?n.clientHeight(i):Math.max(n.clientHeight(e.documentElement),1)}return s}function Zg(t){const{rootDocument:e,rootWindow:o,geometryReader:n}=t.deps,i=t.deps.getInlineStartOverlay().trimmingContainer;let s;if(i===o){const o=t.wtSettings.getSetting("totalColumns");s=n.offsetWidth(t.wtTable.holder),t.getRowHeaderWidth()+t.sumColumnWidths(0,o)>s&&(s=n.clientWidth(e.documentElement))}else s=n.clientWidth(i);return s}const Qg={getWorkspaceHeight(){return this.usesLayoutSnapshotForCalculators()?this.getLayout().workspaceHeight:Kg(this)},getViewportHeight(){let t=this.getWorkspaceHeight();const e=this.getColumnHeaderHeight();return e>0&&(t-=e),t},getWorkspaceWidth(){return this.usesLayoutSnapshotForCalculators()?this.getLayout().workspaceWidth:Zg(this)},getViewportWidth(){const t=this.getWorkspaceWidth(),e=this.getRowHeaderWidth();return e>0?t-e:t},hasVerticalScroll(){return!this.wtSettings.getSetting("singlePassLayout")||this.isVerticallyScrollableByWindow()?Xg(this):this.getLayout().hasVerticalScroll},hasHorizontalScroll(){return!this.wtSettings.getSetting("singlePassLayout")||this.isVerticallyScrollableByWindow()?function(t){const{geometryReader:e}=t.deps;if(t.isVerticallyScrollableByWindow()){const o=t.deps.rootDocument.documentElement;return e.scrollWidth(o)>e.clientWidth(o)}const{hider:o}=t.wtTable,n=e.offsetWidth(o),i=Xg(t)?e.getScrollbarWidth():0;return n>Zg(t)-i}(this):this.getLayout().hasHorizontalScroll},isVerticallyScrollableByWindow(){return this.deps.getTopOverlay().trimmingContainer===this.deps.rootWindow},isHorizontallyScrollableByWindow(){return this.deps.getInlineStartOverlay().trimmingContainer===this.deps.rootWindow},sumColumnWidths(t,e){let o=0,n=t;for(;n<e;)o+=this.wtTable.getColumnWidth(n),n+=1;return o},getWorkspaceOffset(){return this.deps.geometryReader.offset(this.wtTable.holder)},getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=this.wtTable.THEAD?this.deps.geometryReader.outerHeight(this.wtTable.THEAD):0):this.columnHeaderHeight=0,this.columnHeaderHeight},getRowHeaderWidth(){const t=this.wtSettings.getSetting("rowHeaderWidth"),e=this.wtSettings.getSetting("rowHeaders");if(t){this.rowHeaderWidth=0;for(let o=0,n=e.length;o<n;o++){const e=Array.isArray(t)?t[o]:t;this.rowHeaderWidth+=e??NaN}}if(isNaN(this.rowHeaderWidth))if(e.length){let t=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=e.length;o<n;o++)t?(this.rowHeaderWidth+=this.deps.geometryReader.outerWidth(t),t=t.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}};function Jg(t,e,o,n,i){let s=Math.sign(t);if(0===s)if(e.startOffset>1)s=-1;else{if(!(e.endOffset>1))return null;s=1}const r=Math.min(Math.ceil(o.count/2),i),l=s>0?Math.min(r,n-1-o.end):Math.min(r,o.start);return l<=0?null:{side:s,extension:l}}function tp(t,e,o,n){const i=o-e;return i<=0?0:Math.max(0,Math.min(i,n-1-t))}const ep={createRowsCalculator(t=["rendered","fullyVisible","partiallyVisible"],e="visible"){const{wtSettings:o,wtTable:n}=this,i=o.getSetting("totalRows"),s=this.usesLayoutSnapshotForCalculators();let r,l,a=0;if(s){const t=this.getLayout();r="render"===e?t.renderViewportHeight:t.visibleViewportHeight}else r=this.getViewportHeight();this.rowHeaderWidth=NaN;const h=this.deps.getTopOverlay(),c=this.deps.getBottomOverlay();let d=h.getScrollPosition()-h.getTableParentOffset();const u=o.getSetting("fixedRowsTop"),g=o.getSetting("fixedRowsBottom");if(u&&d>=0&&(l=h.sumCellSizes(0,u),d+=l,r-=l),g&&c.clone&&(l=c.sumCellSizes(i-g,i),r-=l),!s){const{geometryReader:t}=this.deps;t.clientHeight(n.holder)!==t.offsetHeight(n.holder)&&(a=t.getScrollbarWidth(this.deps.rootDocument))}return new ar({calculationTypes:t.flatMap(t=>{const e=this.rowsCalculatorTypes.get(t);return e?[[t,e()]]:[]}),viewportHeight:r,scrollOffset:d,totalRows:i,overrideFn:o.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:a,rowHeightCache:this.rowHeightCache})},createColumnsCalculator(t=["rendered","fullyVisible","partiallyVisible"],e="visible"){const{wtSettings:o,wtTable:n}=this,i=this.deps.getInlineStartOverlay(),s=o.getSetting("totalColumns"),r=this.usesLayoutSnapshotForCalculators();let l;if(r){const t=this.getLayout();l="render"===e?t.renderViewportWidth:t.visibleViewportWidth}else l=this.getViewportWidth();let a=Math.abs(i.getScrollPosition())-i.getTableParentOffset();this.columnHeaderHeight=NaN;const h=o.getSetting("fixedColumnsStart");if(h&&a>=0){const t=i.sumCellSizes(0,h);a+=t,l-=t}if(!r){const{geometryReader:t}=this.deps;t.clientWidth(n.holder)!==t.offsetWidth(n.holder)&&(l-=t.getScrollbarWidth(this.deps.rootDocument))}return new lr({calculationTypes:t.flatMap(t=>{const e=this.columnsCalculatorTypes.get(t);return e?[[t,e()]]:[]}),viewportWidth:l,scrollOffset:a,totalColumns:s,overrideFn:o.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:i.getTableParentOffset(),columnWidthCache:this.columnWidthCache})},createCalculators(t=!1,{stationaryBands:e=!1}={}){const{wtSettings:o}=this,n=this.usesLayoutSnapshotForCalculators(),i=n?["fullyVisible","partiallyVisible"]:void 0,s=this.createRowsCalculator(i),r=this.createColumnsCalculator(i),l=n?this.createRowsCalculator(["rendered"],"render"):s,a=n?this.createColumnsCalculator(["rendered"],"render"):r;if(t&&!o.getSetting("renderAllRows")){const e=s.getResultsFor("fullyVisible"),o=s.getResultsFor("partiallyVisible");t=this.areAllProposedVisibleRowsAlreadyRendered(e,o)}if(t&&!o.getSetting("renderAllColumns")){const e=r.getResultsFor("fullyVisible"),o=r.getResultsFor("partiallyVisible");t=this.areAllProposedVisibleColumnsAlreadyRendered(e,o)}if(!t){const t=l.getResultsFor("rendered")??null,o=a.getResultsFor("rendered")??null;e&&(this.applyRenderedColumnsBandOverscan(o),this.applyRenderedRowsBandOverscan(t),this.stabilizeRenderedRowsBand(t),this.stabilizeRenderedColumnsBand(o)),this.rowsRenderCalculator=t,this.columnsRenderCalculator=o}return this.rowsVisibleCalculator=s.getResultsFor("fullyVisible")??null,this.columnsVisibleCalculator=r.getResultsFor("fullyVisible")??null,this.rowsPartiallyVisibleCalculator=s.getResultsFor("partiallyVisible")??null,this.columnsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible")??null,t},createVisibleCalculators(){const t=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),e=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=t.getResultsFor("fullyVisible")??null,this.columnsVisibleCalculator=e.getResultsFor("fullyVisible")??null,this.rowsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")??null,this.columnsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible")??null},usesLayoutSnapshotForCalculators(){return this.wtSettings.getSetting("singlePassLayout")&&!this.isVerticallyScrollableByWindow()&&!this.isHorizontallyScrollableByWindow()&&this.wtSettings.getSetting("rowHeightsUniform")&&this.wtSettings.getSetting("columnWidthsUniform")},allowsStationaryBands(){return this.wtSettings.getSetting("singlePassLayout")&&!this.isVerticallyScrollableByWindow()&&!this.isHorizontallyScrollableByWindow()},applyRenderedColumnsBandOverscan(t){const e=this.columnsRenderCalculator;if(!(t instanceof nr)||!(e instanceof nr)||null===t.startColumn||null===t.endColumn||!this.wtSettings.getSetting("viewportColumnRenderingOffsetIsAuto")||t.columnStartOffset>1||t.columnEndOffset>1||!this.wtSettings.getSetting("columnWidthsUniform"))return;const o=Jg(t.scrollOffset-e.scrollOffset,{startOffset:e.columnStartOffset,endOffset:e.columnEndOffset},{start:t.startColumn,end:t.endColumn,count:t.count},this.wtSettings.getSetting("totalColumns"),8);o&&(o.side>0?(t.endColumn+=o.extension,t.count+=o.extension,t.columnEndOffset+=o.extension):(t.startColumn-=o.extension,t.count+=o.extension,t.columnStartOffset+=o.extension,t.startPosition=this.columnWidthCache.getOffset(t.startColumn)))},applyRenderedRowsBandOverscan(t){const e=this.rowsRenderCalculator;if(!(t instanceof ir)||!(e instanceof ir)||null===t.startRow||null===t.endRow||!this.wtSettings.getSetting("viewportRowRenderingOffsetIsAuto")||t.rowStartOffset>1||t.rowEndOffset>1||!this.wtSettings.getSetting("rowHeightsUniform"))return;const o=Jg(t.scrollOffset-e.scrollOffset,{startOffset:e.rowStartOffset,endOffset:e.rowEndOffset},{start:t.startRow,end:t.endRow,count:t.count},this.wtSettings.getSetting("totalRows"),4);o&&(o.side>0?(t.endRow+=o.extension,t.count+=o.extension,t.rowEndOffset+=o.extension):(t.startRow-=o.extension,t.count+=o.extension,t.rowStartOffset+=o.extension,t.startPosition=this.rowHeightCache.getOffset(t.startRow)))},stabilizeRenderedRowsBand(t){const e=this.rowsRenderCalculator;if(!t||!e||null===t.endRow)return;const o=tp(t.endRow,t.count,e.count,this.wtSettings.getSetting("totalRows"));t.endRow+=o,t.count+=o},stabilizeRenderedColumnsBand(t){const e=this.columnsRenderCalculator;if(!t||!e||null===t.endColumn)return;const o=tp(t.endColumn,t.count,e.count,this.wtSettings.getSetting("totalColumns"));t.endColumn+=o,t.count+=o},areAllProposedVisibleRowsAlreadyRendered(t,e){if(!(this.rowsVisibleCalculator&&this.rowsRenderCalculator&&t&&e))return!1;let{startRow:o,endRow:n}=t;const{startRow:i,endRow:s}=e;if(null===o&&null===n){if(!t.isVisibleInTrimmingContainer&&null!==i&&!this.wtTable.isRowBeforeRenderedRows(i)&&null!==s&&!this.wtTable.isRowAfterRenderedRows(s))return!0;o=i,n=s}if(null===o||null===n)return!1;const{startRow:r,endRow:l,rowStartOffset:a,rowEndOffset:h}=this.rowsRenderCalculator;if(null===r||null===l)return!1;const c=this.wtSettings.getSetting("totalRows")-1,d=this.wtSettings.getSetting("viewportRowRenderingThreshold");return"number"==typeof d&&Number.isInteger(d)&&d>0?(o=Math.max(0,o-Math.min(a,d)),n=Math.min(c,n+Math.min(h,d))):"auto"===d&&(o=Math.max(0,o-Math.ceil(a/2)),n=Math.min(c,n+Math.ceil(h/2))),!(o<r||o===r&&o>0)&&!(n>l||n===l&&n<c)},areAllProposedVisibleColumnsAlreadyRendered(t,e){if(!(this.columnsVisibleCalculator&&this.columnsRenderCalculator&&t&&e))return!1;let{startColumn:o,endColumn:n}=t;const{startColumn:i,endColumn:s}=e;if(null===o&&null===n){if(!t.isVisibleInTrimmingContainer&&null!==i&&!this.wtTable.isColumnBeforeRenderedColumns(i)&&null!==s&&!this.wtTable.isColumnAfterRenderedColumns(s))return!0;o=i,n=s}if(null===o||null===n)return!1;const{startColumn:r,endColumn:l,columnStartOffset:a,columnEndOffset:h}=this.columnsRenderCalculator;if(null===r||null===l)return!1;const c=this.wtSettings.getSetting("totalColumns")-1,d=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return"number"==typeof d&&Number.isInteger(d)&&d>0?(o=Math.max(0,o-Math.min(a,d)),n=Math.min(c,n+Math.min(h,d))):"auto"===d&&(o=Math.max(0,o-Math.ceil(a/2)),n=Math.min(c,n+Math.ceil(h/2))),!(o<r||o===r&&o>0)&&!(n>l||n===l&&n<c)}};function op(t){return{geometryReader:t.geometryReader,wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootWindow:t.rootWindow,getWtTable:t.getWtTable,getWtViewport:t.getWtViewport,getTopOverlay:t.getTopOverlay,getInlineStartOverlay:t.getInlineStartOverlay}}function np(t){return"scroll"===t?"scroll":"hidden"===t?"hidden":"auto"}function ip(t){const{geometryReader:e,wtSettings:o,rootDocument:n,rootWindow:i}=t,s=t.getWtViewport(),r=t.getWtTable(),l=t.getTopOverlay().trimmingContainer===i,a=o.getSetting("rtlMode"),h=e.getScrollbarWidth(n);s.rowHeightCache.ensureBuilt(),s.columnWidthCache.ensureBuilt();const c=s.getRowHeaderWidth(),d=s.getColumnHeaderHeight(),u=o.getSetting("externalRowCalculator")?0:1,g=c+s.columnWidthCache.getTotalSize(),p=d+s.rowHeightCache.getTotalSize()+u,f=l?n.documentElement:r.holder,m=np(e.getStyle(f,"overflow-x")),w=np(e.getStyle(f,"overflow-y"));if(l){const t=n.documentElement,o=e.clientWidth(t),i=e.clientHeight(t);return{scrollMode:"window",workspaceWidth:o,workspaceHeight:i,totalContentWidth:g,totalContentHeight:p,scrollbarSize:h,overflowX:m,overflowY:w,rowHeaderWidth:c,columnHeaderHeight:d,isRtl:a,windowContext:{documentScrollWidth:e.scrollWidth(t),documentScrollHeight:e.scrollHeight(t),documentClientWidth:o,documentClientHeight:i,currentHiderWidth:e.offsetWidth(r.hider),currentHiderHeight:e.offsetHeight(r.hider)}}}return{scrollMode:"element",workspaceWidth:Zg(s),workspaceHeight:Kg(s),totalContentWidth:g,totalContentHeight:p,scrollbarSize:h,overflowX:m,overflowY:w,rowHeaderWidth:c,columnHeaderHeight:d,isRtl:a}}function sp(t){const{hasVerticalScroll:e,hasHorizontalScroll:o}="window"===t.scrollMode?function(t){const e=t.windowContext;if(!e)return{hasVerticalScroll:!1,hasHorizontalScroll:!1};const o=e.documentScrollHeight-e.currentHiderHeight+t.totalContentHeight,n=e.documentScrollWidth-e.currentHiderWidth+t.totalContentWidth;return{hasVerticalScroll:"scroll"===t.overflowY||"hidden"!==t.overflowY&&o>e.documentClientHeight,hasHorizontalScroll:"scroll"===t.overflowX||"hidden"!==t.overflowX&&n>e.documentClientWidth}}(t):function(t){const{totalContentWidth:e,totalContentHeight:o,workspaceWidth:n,workspaceHeight:i,scrollbarSize:s}=t,r="scroll"===t.overflowY,l="scroll"===t.overflowX,a="hidden"===t.overflowY,h="hidden"===t.overflowX;let c=r||!a&&o>i;const d=l||!h&&e>n-(c?s:0);return!d||c||a||(c=o>i-s),{hasVerticalScroll:c,hasHorizontalScroll:d}}(t),{workspaceWidth:n,workspaceHeight:i,scrollbarSize:s}=t,r=n-(e?s:0),l=i-(o?s:0),a=n-t.rowHeaderWidth,h=i-t.columnHeaderHeight,c=r-t.rowHeaderWidth,d=l-t.columnHeaderHeight;return Object.freeze({scrollMode:t.scrollMode,hasVerticalScroll:e,hasHorizontalScroll:o,workspaceWidth:n,workspaceHeight:i,innerWidth:r,innerHeight:l,viewportWidth:c,viewportHeight:d,renderViewportWidth:a,renderViewportHeight:h,visibleViewportWidth:c,visibleViewportHeight:d,rowHeaderWidth:t.rowHeaderWidth,columnHeaderHeight:t.columnHeaderHeight,totalContentWidth:t.totalContentWidth,totalContentHeight:t.totalContentHeight,hiderWidth:t.totalContentWidth,hiderHeight:t.totalContentHeight,scrollbarSize:s,isRtl:t.isRtl})}function rp(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,rp(t,e,"get"))}function ap(t,e,o){!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,o)}function hp(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,rp(t,e,"set"),o),o}var cp=new WeakMap,dp=new WeakMap,up=new WeakMap,gp=new WeakMap;class pp{get deps(){return lp(this,cp)}beginDrawLayout(){return hp(this,up,sp(ip(lp(this,dp)))),lp(this,up)}getLayout(){return null===lp(this,up)&&hp(this,up,sp(ip(lp(this,dp)))),lp(this,up)}invalidateLayout(){hp(this,up,null)}sumRowHeights(t,e){const o=this.rowHeightCache;o.ensureBuilt();let n=o.getOffset(e)-o.getOffset(t);return new Set([lp(this,gp),this.wtTable.getFirstRenderedRow()]).forEach(i=>{if(i>=0&&i>=t&&i<e&&i<o.totalItems){const t=this.wtTable.getRowHeight(i),e=void 0===t?lp(this,cp).rowSizeSource.getDefaultSize():t;n+=e-o.getSizeAt(i)}}),n}invalidateRowHeightCache(){this.rowHeightCache.invalidate(),this.invalidateLayout()}resetAllOversizedRows(){this.oversizedRows={},this.frozenOversizedRows.clear(),this.invalidateRowHeightCache()}releaseFrozenOversizedRows(){this.frozenOversizedRows.clear()}invalidateColumnWidthCache(){this.columnWidthCache.invalidate(),this.invalidateLayout()}invalidateAllCaches(){this.rowHeightCache.invalidate(),this.columnWidthCache.invalidate(),this.invalidateLayout()}resetHasOversizedColumnHeadersMarked(){ke(this.hasOversizedColumnHeadersMarked,(t,e,o)=>{o[e]=void 0})}constructor(t){ap(this,cp,{writable:!0,value:void 0}),ap(this,dp,{writable:!0,value:void 0}),ap(this,up,{writable:!0,value:void 0}),ap(this,gp,{writable:!0,value:void 0}),hp(this,up,null),this.renderCycleSeq=0,hp(this,gp,-1);const{wtSettings:e,wtTable:o,rowSizeSource:n,columnSizeSource:i}=t;hp(this,cp,t),hp(this,dp,t.layoutDeps),this.wot=t.wot,this.wtSettings=e,this.wtTable=o,this.oversizedRows={},this.frozenOversizedRows=new Set,this.frozenClearRowCacheBuildSeq=0,this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsRenderCalculator=null,this.columnsRenderCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new or:new ir],["fullyVisible",()=>new Qs],["partiallyVisible",()=>new tr]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new er:new nr],["fullyVisible",()=>new Zs],["partiallyVisible",()=>new Js]]),this.rowHeightCache=new Yg({totalItemsFn:()=>e.getSetting("totalRows"),sizeFn:t=>o.getRowHeight(t)??NaN,defaultSizeFn:()=>n.getDefaultSize(),isUniformFn:()=>n.isUniform()&&0===Object.keys(this.oversizedRows).length,sparseExceptionsFn:()=>n.isUniform()?this.oversizedRows:null,onBuildFn:()=>{hp(this,gp,o.getFirstRenderedRow())}}),this.columnWidthCache=new Yg({totalItemsFn:()=>e.getSetting("totalColumns"),sizeFn:t=>o.getColumnWidth(t),defaultSizeFn:()=>i.getDefaultSize(),isUniformFn:()=>i.isUniform()}),this.eventManager=t.eventManager,this.eventManager.addEventListener(lp(this,cp).rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight(),this.invalidateLayout()})}}be(pp,Qg),be(pp,ep);class fp extends mh{exportSettingsAsClassNames(){const t=[],e=[];ke({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},(o,n)=>{this.wtSettings.getSetting(n).length&&e.push(o),t.push(o)}),fo(this.wtTable.wtRootElement.parentNode,t),po(this.wtTable.wtRootElement.parentNode,e)}destroy(){this.wtTable.destroy(),super.destroy()}getOverlayByName(t){if(!Fa.includes(t))return null;const e=t.replace(/_([a-z])/g,(t,e)=>e.toUpperCase());return this.wtOverlays[`${e}Overlay`]??null}constructor(t,e){var o;super(t,new Ju(e)),this.wtTable=new ag(_a(this.engineContext)),this.wtViewport=new pp({wot:(o=this.engineContext).wot,rootDocument:o.rootDocument,rootWindow:o.rootWindow,geometryReader:o.geometryReader,rowSizeSource:o.rowSizeSource,columnSizeSource:o.columnSizeSource,layoutDeps:op(o),wtSettings:o.wtSettings,eventManager:o.makeEventManager(),wtTable:o.getWtTable(),getTopOverlay:o.getTopOverlay,getInlineStartOverlay:o.getInlineStartOverlay,getBottomOverlay:o.getBottomOverlay}),this.selectionManager=new Rc(this.wtSettings.getSetting("selections")),this.wtEvent=new nl(Or(this.engineContext)),this.wtOverlays=new Zu(function(t){return{wot:t.wot,wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootWindow:t.rootWindow,geometryReader:t.geometryReader,eventManager:t.makeEventManager(),wtTable:t.getWtTable(),makeOverlayDeps:()=>function(t){return{wot:t.wot,facadeGetter:t.getFacade(),wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootWindow:t.rootWindow,geometryReader:t.geometryReader,getWtTable:t.getWtTable,getWtViewport:t.getWtViewport,getWtOverlays:t.getWtOverlays,getWtEvent:t.getWtEvent,getSelectionManager:t.getSelectionManager}}(t),makeStickyScrollDeps:e=>function(t,e){return{wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootWindow:t.rootWindow,eventManager:e.eventManager,wtTable:t.getWtTable(),getWtViewport:t.getWtViewport,getTopOverlay:t.getTopOverlay,getBottomOverlay:t.getBottomOverlay,getInlineStartOverlay:t.getInlineStartOverlay,getScrollableElement:()=>e.scrollableElement,refreshAll:()=>e.refreshAll(),applyToDOM:()=>e.applyToDOM()}}(t,e),makeResizeMonitorDeps:()=>function(t){return{wtSettings:t.wtSettings,wtTable:t.getWtTable()}}(t),makeSpreaderSizeDeps:e=>function(t,e){return{wtSettings:t.wtSettings,rootWindow:t.rootWindow,geometryReader:t.geometryReader,wtTable:t.getWtTable(),getWtViewport:t.getWtViewport,getTopOverlay:t.getTopOverlay,getInlineStartOverlay:t.getInlineStartOverlay,getBottomOverlay:t.getBottomOverlay,getScrollableElement:()=>e.scrollableElement}}(t,e),makeScrollSyncDeps:(e,o)=>function(t,e,o){return{wtSettings:t.wtSettings,rootWindow:t.rootWindow,geometryReader:t.geometryReader,wtTable:t.getWtTable(),getWtViewport:t.getWtViewport,getTopOverlay:()=>e.topOverlay,getInlineStartOverlay:()=>e.inlineStartOverlay,getBottomOverlay:()=>e.bottomOverlay,eventManager:e.eventManager,getDestroyed:()=>e.destroyed,refreshAll:()=>e.refreshAll(),registerListeners:()=>e.registerListeners(),tryActivateStickyScroll:(t,e)=>o.tryActivate(t,e),syncStickyScrollOffsets:()=>o.syncOffsets()}}(t,e,o),makeNativeScrollInputDeps:(e,o,n)=>function(t,e,o,n){return{wtSettings:t.wtSettings,rootDocument:t.rootDocument,rootWindow:t.rootWindow,geometryReader:t.geometryReader,wtTable:t.getWtTable(),eventManager:e.eventManager,getTopOverlay:()=>e.topOverlay,getInlineStartOverlay:()=>e.inlineStartOverlay,getCloneableOverlays:()=>[e.topOverlay,e.bottomOverlay,e.inlineStartOverlay,e.topInlineStartCornerOverlay,e.bottomInlineStartCornerOverlay],getScrollableElement:()=>e.scrollableElement,syncScrollPositions:()=>e.syncScrollPositions(),scrollVertically:t=>e.scrollVertically(t),scrollHorizontally:t=>e.scrollHorizontally(t),registerStickyScrollListeners:()=>o.registerListeners(),resetResizeCount:()=>n.resetResizeCount(),observeResize:()=>n.observe()}}(t,e,o,n)}}(this.engineContext)),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}}class mp{_initFromSettings(t){t.facade=t=>{const e=new mp(t);return()=>e},this._wot=new fp(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,o){return this._wot.createCellRange(t,e,o)}draw(t=!1){return this._wot.draw(t),this}getCell(t,e=!1){return this._wot.getCell(t,e)}scrollViewport(t,e,o){return this._wot.scrollViewport(t,e,o)}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(){this._wot.exportSettingsAsClassNames()}update(t,e){return this._wot.wtSettings.update(t,e),this}getSetting(t,e,o,n,i){return this._wot.wtSettings.getSetting(t,e,o,n,i)}hasSetting(t){return this._wot.wtSettings.has(t)}destroy(){this._wot.destroy()}constructor(t){t instanceof mh?this._wot=t:this._initFromSettings(t)}}function wp({isShiftKey:t,isLeftClick:e,isRightClick:o,coords:n,selection:i,controller:s,cellCoordsFactory:r}){const l=i,a=l.isSelected()?l.getSelectedRange().current():null,h=l.isSelectedByCorner(),c=l.isSelectedByRowHeader();l.markSource("mouse");const d=n.row??-1,u=n.col??-1;if(t&&a)d>=0&&u>=0&&!s.cell?l.setRangeEnd(n):h&&d<0&&!s.column?l.setRangeEnd(r(a.to.row??0,u)):c&&u<0&&!s.row?l.setRangeEnd(r(d,a.to.col??0)):(!h&&!c&&u<0||h&&u<0)&&!s.row?l.selectRows(Math.max(a.from.row??0,0),d,u):(!h&&!c&&d<0||c&&d<0)&&!s.column&&l.selectColumns(Math.max(a.from.col??0,0),u,d);else{const t=!l.inInSelection(n),i=e||o&&t;d<0&&u>=0&&!s.column?i&&l.selectColumns(u,u,d):u<0&&d>=0&&!s.row?i&&l.selectRows(d,d,u):u>=0&&d>=0&&!s.cell?i&&l.setRangeStart(n):u<0&&d<0&&l.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}l.markEndSource()}function bp({isLeftClick:t,coords:e,selection:o,controller:n,cellCoordsFactory:i}){if(!t)return;const s=o,r=s.isSelectedByRowHeader(),l=s.isSelectedByColumnHeader(),a=s.tableProps.countCols(),h=s.tableProps.countRows();s.markSource("mouse"),l&&!n.column?s.setRangeEnd(i(h-1,e.col??0)):r&&!n.row?s.setRangeEnd(i(e.row??0,a-1)):n.cell||s.setRangeEnd(e),s.markEndSource()}function vp({isLeftClick:t,selection:e,cellRangeMapper:o}){const n=e;if(!t||"multiple"!==n.settings.selectionMode)return;const i=n.getSelectedRange(),s=i.clone().map(t=>o.toRenderable(t)),r=s.current();if(r&&s.size()>1&&!r.isHeader()&&!n.isMultiple(r)){const t=s.findAll(r).filter(({layer:t})=>i.peekByIndex(t)?.isSingleCell()).map(({layer:t})=>t);if(t.length>=2)return void(t.length>=i.size()?e.deselect():(i.removeLayers(t),e.markSource("deselect"),e.refresh(),e.markEndSource()));e.markSource("deselect"),e.refresh(),e.markEndSource()}}const Cp=new Map([["touchstart",wp],["touchend",vp],["mousedown",wp],["mouseover",bp],["mousemove",bp],["mouseup",vp]]);function yp(t,e){const o=Cp.get(t.type);o&&o({isShiftKey:t.shiftKey,isLeftClick:wn(t)||"touchstart"===t.type,isRightClick:mn(t),...e})}const Sp=new WeakMap,kp=Symbol("rootInstance");function Rp(t){return t===kp}function Ep(t){return Sp.has(t)}function xp(t){return t.getSettings().sanitizer??!0}function Mp(t,e,o){if(!e)return e;const{sanitizer:n}=t.getSettings();return"function"==typeof n?n(e,o)??"":(Co.test(e)&&Ze(t.rootElement,yo,So(o)),e)}function Tp(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hp(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ip(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Hp(t,e,"get"))}function _p(t,e,o){Tp(t,e),e.set(t,o)}function Ap(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Hp(t,e,"set"),o),o}function Wp(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Op(t,e){Tp(t,e),e.add(t)}function Np(t){return null==t||"number"==typeof t}var Pp=new WeakMap,Dp=new WeakMap,Lp=new WeakMap,zp=new WeakMap,Bp=new WeakMap,Vp=new WeakMap,Fp=new WeakMap,$p=new WeakMap,Up=new WeakMap,jp=new WeakMap,qp=new WeakMap,Gp=new WeakMap,Yp=new WeakSet,Xp=new WeakSet,Kp=new WeakSet,Zp=new WeakSet,Qp=new WeakSet,Jp=new WeakSet;class tf{render(){if(!this.hot.isRenderSuspended()){const t=this.hot.forceFullRender;this.hot.runHooks("beforeRender",t),Wp(this,Kp,nf).call(this),this._wt.draw(!t),Wp(this,Jp,lf).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 o=this._wt.getCell(t,e);return"number"==typeof o&&o<0?null:o}scrollViewport(t,e,o){return this._wt.scrollViewport(t,e,o)}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,o=t.getAttribute("style");o&&(t.dataset.originalstyle=o),po(t,"handsontable"),Ap(this,Fp,e.createElement("table")),po(Ip(this,Fp),"htCore"),this.hot.getSettings().tableClassName&&po(Ip(this,Fp),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(mo(Ip(this,Fp),[["role","presentation"]]),mo(t,[["role","treegrid"],I(-1),_(this.hot.countCols()),["aria-multiselectable","true"]])),this.THEAD=e.createElement("thead"),Ip(this,Fp).appendChild(this.THEAD),this.TBODY=e.createElement("tbody"),Ip(this,Fp).appendChild(this.TBODY),this.hot.table=Ip(this,Fp),this.hot.container.insertBefore(Ip(this,Fp),this.hot.container.firstChild)}registerEvents(){const{rootWrapperElement:t,rootElement:e,rootDocument:o,selection:n,rootWindow:i}=this.hot,s=o.documentElement;this.eventManager.addEventListener(e,"mousedown",t=>{Wp(this,Yp,ef).call(this,t)||function(t){return 1===t.button}(t)||(Ap(this,zp,!0),this.isTextSelectionAllowed(no(t))||(Vo(i),t.preventDefault(),i.focus()))}),this.eventManager.addEventListener(e,"mouseup",t=>{Wp(this,Yp,ef).call(this,t)||Ap(this,zp,!1)}),this.eventManager.addEventListener(e,"mousemove",t=>{Ip(this,zp)&&!this.isTextSelectionAllowed(no(t))&&(this.settings.fragmentSelection&&Vo(i),t.preventDefault())}),this.eventManager.addEventListener(s,"keyup",t=>{n.isInProgress()&&!t.shiftKey&&n.finish()}),this.eventManager.addEventListener(s,"mouseup",i=>{n.isInProgress()&&wn(i)&&n.finish();const s=Ip(this,Bp),r=Ip(this,Vp);if(Ap(this,Bp,!1),Ap(this,Vp,!1),Wp(this,Yp,ef).call(this,i))return;const l=rn(o),a=en(l)?l:null,h=null!==a&&Zo(a);if(null!==a&&Ko(a)&&!h)return;const c=i.composedPath(),d=c.includes(t??e)||this.hot.rootPortalElement&&c.includes(this.hot.rootPortalElement),u=this.hot.getFocusManager().isForeignFocusTarget(a)||!s&&!this.hot.getFocusManager().hasBrowserFocus()&&!d;if(!h&&!u&&(n.isSelected()||n.isSelectedByAnyHeader()||Wp(this,Xp,of).call(this,c)||mn(i))||this.hot.unlisten(),!r&&null!==a&&u&&n.isSelected()&&!Wp(this,Xp,of).call(this,c)&&!mn(i)){const t=c.length>0?c[0]:i.target,e=en(t)?t:a;("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(e):this.settings.outsideClickDeselects)&&this.hot.deselectCell()}}),this.eventManager.addEventListener(s,"contextmenu",t=>{n.isInProgress()&&mn(t)&&(n.finish(),Ap(this,Bp,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{n.isInProgress()&&n.finish(),Ap(this,Bp,!1),Ap(this,qp,!0),null!==Ip(this,Gp)&&clearTimeout(Ip(this,Gp)),Ap(this,Gp,this.hot._registerTimeout(()=>{Ap(this,qp,!1),Ap(this,Gp,null)},500))}),this.eventManager.addEventListener(s,"mousedown",t=>{const n=t.composedPath(),i=n.length>0?n[0]:t.target,s=t.clientX,r=t.clientY;if(Ap(this,Vp,!1),Ip(this,Bp)||!e||!this.hot.view)return;if(Wp(this,Yp,ef).call(this,t))return;const{holder:l}=this._wt.wtTable;if(i===l){const t=jo(o),n=e.getRootNode(),i=nn(n)?n:o;if(i.elementFromPoint(s+t,r)!==l||i.elementFromPoint(s,r+t)!==l)return}else if(Wp(this,Xp,of).call(this,n))return;Ap(this,Vp,!0);("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let r=io(i);for(;null!==r;)this.eventManager.addEventListener(r.document.documentElement,"click",()=>{this.hot.unlisten()}),r=io(r);this.eventManager.addEventListener(Ip(this,Fp),"selectstart",t=>{this.settings.fragmentSelection||Ko(no(t))||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){const o=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t,n=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;return[null===o?t:o,null===n?e:n]}countRenderableIndexes(t,e){const o=Math.min(t.getNotTrimmedIndexesLength(),e),n=t.getNearestNotHiddenIndex(o-1,-1);return null===n?0:(t.getRenderableFromVisualIndex(n)??0)+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,o,n){if(isNaN(t)||t<0)return 0;const i=e<0?-1:1,s=o.getNearestNotHiddenIndex(t,i),r=o.getRenderableFromVisualIndex(s);if(null===r||!Number.isInteger(r))return 0;let l=0;return e<0?l=r+1:e>0&&(l=n-r),l}countNotHiddenFixedColumnsStart(){const t=this.hot.countCols(),e=Math.min(Number(this.settings.fixedColumnsStart)||0,t)-1;return this.countNotHiddenColumnIndexes(e,-1)}countNotHiddenFixedRowsTop(){const t=this.hot.countRows(),e=Math.min(Number(this.settings.fixedRowsTop)||0,t)-1;return this.countNotHiddenRowIndexes(e,-1)}countNotHiddenFixedRowsBottom(){const t=this.hot.countRows(),e=Math.max(t-(Number(this.settings.fixedRowsBottom)||0),0);return this.countNotHiddenRowIndexes(e,1)}countRenderableColumnsInRange(t,e){let o=0;for(let n=t;n<=e;n++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(n)&&(o+=1);return o}countRenderableRowsInRange(t,e){let o=0;for(let n=t;n<=e;n++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(n)&&(o+=1);return o}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(),singlePassLayout:()=>this.hot.runHooks("modifySinglePassLayout",!0),table:Ip(this,Fp),isDataViewInstance:()=>Ep(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,viewportColumnRenderingOffsetIsAuto:()=>"auto"===this.settings.viewportColumnRenderingOffset,viewportRowRenderingOffsetIsAuto:()=>"auto"===this.settings.viewportRowRenderingOffset,data:(t,e)=>{const[o,n]=this.translateFromRenderableToVisualIndex(t,e);return this.hot.getDataAtCell(o,n)},totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>(this.settings.fixedColumnsStart??0)>0||t.rowHeaders().length>0,shouldRenderTopOverlay:()=>(this.settings.fixedRowsTop??0)>0||t.columnHeaders().length>0,shouldRenderBottomOverlay:()=>(this.settings.fixedRowsBottom??0)>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 o=t>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(t):t;this.appendRowHeader(o,e)}),this.hot.runHooks("afterGetRowHeaderRenderers",t),Ap(this,Dp,t.length),this.hot.getSettings().ariaTags&&Wp(this,Zp,sf).call(this)===this.hot.countCols()&&Wp(this,Qp,rf).call(this,Ip(this,Dp)),t},columnHeaders:()=>{const t=[];return this.hot.hasColHeaders()&&t.push((t,e)=>{const o=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;this.appendColHeader(o,e)}),this.hot.runHooks("afterGetColumnHeaderRenderers",t),Ap(this,Pp,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 o=this.hot.rowIndexMapper.getVisualFromRenderableIndex(t),n=null===o?t:o;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(n),n,e)},rowHeightsUniform:()=>{const{rowHeights:t,minRowHeights:e}=this.hot.getSettings();return Np(t)&&Np(e)&&!this.hot.hasHook("modifyRowHeight")},columnWidthsUniform:()=>Np(this.hot.getSettings().colWidths)&&!this.hot.hasHook("modifyColWidth"),cellRenderer:(t,e,o)=>{const[n,i]=this.translateFromRenderableToVisualIndex(t,e),s=this.hot.runHooks("modifyGetCellCoords",n,i,!1,"meta");let r=n,l=i;Array.isArray(s)&&([r,l]=s);const a=this.hot.getCellMeta(r,l),h=this.hot.colToProp(l);let c=this.hot.getDataAtRowProp(r,h);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,a));const d=this.hot.getCellRenderer(a),u=Vs(c,a,d);this.hot.runHooks("beforeRenderer",o,n,i,h,c,a);Fs(d,[this.hot,o,n,i,h,u,a]),this.hot.runHooks("afterRenderer",o,n,i,h,c,a)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&xo(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e),s={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=n,Ap(this,Bp,!0),Ap(this,jp,{row:t.clientX,col:t.clientY}),this.hot.runHooks("beforeOnCellMouseDown",t,i,o,s),fn(t)||(yp(t,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseDown",t,i,o),this.activeWt=this._wt)},onCellContextMenu:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=n,Ap(this,Bp,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",t,i,o),fn(t)||(this.hot.runHooks("afterOnCellContextMenu",t,i,o),this.activeWt=this._wt)},onCellMouseOut:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOut",t,i,o),fn(t)||(this.hot.runHooks("afterOnCellMouseOut",t,i,o),this.activeWt=this._wt)},onCellMouseOver:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e),s={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOver",t,i,o,s),fn(t)||(!Ip(this,Bp)||Ip(this,jp)&&Ip(this,jp).row===t.clientX&&Ip(this,jp).col===t.clientY||yp(t,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseOver",t,i,o),this.activeWt=this._wt,Ap(this,jp,null))},onCellMouseOverOutside:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e),s={row:!1,column:!1,cell:!1};this.activeWt=n,this.hot.runHooks("beforeOnCellMouseOverOutside",t,i,o,s),fn(t)||(yp(t,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(t,e)=>this.hot._createCellCoords(t,e)}),this.hot.runHooks("afterOnCellMouseOverOutside",t,i,o),this.activeWt=this._wt,Ap(this,jp,null))},onCellMouseUp:(t,e,o,n)=>{const i=this.translateFromRenderableToVisualCoords(e);var s,r;(this.activeWt=n,this.hot.runHooks("beforeOnCellMouseUp",t,i,o),fn(t)||this.hot.isDestroyed)||(yp(t,{coords:i,selection:this.hot.selection,cellRangeMapper:(s=this.hot,r="cellRangeMapper",ei?.get(s.guid)?.get(r))}),this.hot.runHooks("afterOnCellMouseUp",t,i,o),this.activeWt=this._wt)},onCellCornerMouseDown:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",t)},onCellCornerDblClick:t=>{t.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",t)},onSelectionHandleMouseDown:(t,e)=>{this.hot.runHooks("afterOnSelectionHandleMouseDown",t,e)},onSelectionEdgeMouseDown:(t,e)=>{this.hot.runHooks("afterOnSelectionEdgeMouseDown",t,e)},beforeDraw:(t,e)=>this.beforeRender(t,e),onDraw:t=>this.afterRender(t),onBeforeViewportScrollVertically:(t,e)=>{const o=this.hot.rowIndexMapper,n=t<0;let i=t;if(!n){const e=o.getVisualFromRenderableIndex(t);if(null===e)return t;i=e}return i=this.hot.runHooks("beforeViewportScrollVertically",i,e),this.hot.runHooks("beforeViewportScroll"),n?i:o.getRenderableFromVisualIndex(i)},onBeforeViewportScrollHorizontally:(t,e)=>{const o=this.hot.columnIndexMapper,n=t<0;let i=t;if(!n){const e=o.getVisualFromRenderableIndex(t);if(null===e)return t;i=e}return i=this.hot.runHooks("beforeViewportScrollHorizontally",i,e),this.hot.runHooks("beforeViewportScroll"),n?i:o.getRenderableFromVisualIndex(i)},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,o)=>{const n=this.hot.rowIndexMapper,i=t<0;let s=t;i||(s=n.getVisualFromRenderableIndex(t)??t);const r=this.hot.runHooks("beforeHighlightingRowHeader",s,e,o);return i?r:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,1))},onBeforeHighlightingColumnHeader:(t,e,o)=>{const n=this.hot.columnIndexMapper,i=t<0;let s=t;i||(s=n.getVisualFromRenderableIndex(t)??t);const r=this.hot.runHooks("beforeHighlightingColumnHeader",s,e,o);return i?r:n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,1))},onAfterDrawSelection:(t,e,o)=>{let n;const[i,s]=this.translateFromRenderableToVisualIndex(t,e),r=this.hot.selection.getSelectedRange();if(r.size()>0){const t=r.peekByIndex(o??0);n=[t.from.row,t.from.col,t.to.row,t.to.col]}return this.hot.runHooks("afterDrawSelection",i,s,n,o)},onBeforeDrawBorders:(t,e)=>{const[o,n,i,s]=t,r=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),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,o,n)=>{const i=this.hot.rowIndexMapper,s=this.hot.columnIndexMapper,r=e>=0?s.getVisualFromRenderableIndex(e):e,l=t>=0?i.getVisualFromRenderableIndex(t):t,a=this.hot.runHooks("modifyGetCellCoords",l,r,o,n);if(Array.isArray(a)){const[t,e,o,n]=a;return[t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,o>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(o,-1)):o,n>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(n,-1)):n]}},onModifyGetCoordsElement:(t,e)=>{const o=this.hot.rowIndexMapper,n=this.hot.columnIndexMapper,i=e>=0?n.getVisualFromRenderableIndex(e):e,s=t>=0?o.getVisualFromRenderableIndex(t):t,r=this.hot.runHooks("modifyGetCoordsElement",s,i);if(Array.isArray(r)){const[t,e]=r;return[t>=0?o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(t,1)):t,e>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(e,1)):e]}},viewportRowCalculatorOverride:t=>{const e="auto"===this.settings.viewportRowRenderingOffset?1:this.settings.viewportRowRenderingOffset;if((e??0)>0){const o=this.countRenderableRows(),n=t.startRow,i=t.endRow;t.startRow=Math.max(n-(e??0),0),t.endRow=Math.min(i+(e??0),o-1)}this.hot.runHooks("afterViewportRowCalculatorOverride",t)},viewportColumnCalculatorOverride:t=>{const e="auto"===this.settings.viewportColumnRenderingOffset?1:this.settings.viewportColumnRenderingOffset;if((e??0)>0){const o=this.countRenderableColumns(),n=t.startColumn,i=t.endColumn;t.startColumn=Math.max(n-(e??0),0),t.endColumn=Math.min(i+(e??0),o-1)}this.hot.runHooks("afterViewportColumnCalculatorOverride",t)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const t=this.hot.runHooks("modifyColumnHeaderHeight"),e=this.settings.columnHeaderHeight,o=this.renderSizeProbe.columnHeaderHeights,n=Math.max(Array.isArray(e)?e.length:0,o.size?Math.max(...o.keys())+1:0);if(0===n)return e||t;const i=[];for(let s=0;s<n;s++){const n=Array.isArray(e)?e[s]:e;let r;"number"==typeof n?r=n:"number"==typeof t&&(r=t);const l=o.get(s),a=[];"number"==typeof r&&a.push(r),"number"==typeof l&&a.push(l),i[s]=a.length?Math.max(...a):void 0}return i},stylesHandler:()=>this.hot.stylesHandler};this.hot.runHooks("beforeInitWalkontable",t),this._wt=new mp(t),this.activeWt=this._wt;const e=this._wt.wtTable.spreader,{width:o,height:n}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,n),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(Ko(t))return!0;const e=lo(t,this._wt.wtTable.spreader);if(!0===this.settings.fragmentSelection&&e)return!0;const o=this.hot.getSelectedRangeActive()?.isSingleCell()??!1;return!("cell"!==this.settings.fragmentSelection||!o||!e)||!(this.settings.fragmentSelection||!this.isCellEdited()||!o)}isMouseDown(){return Ip(this,Bp)}isCellEdited(){const t=this.hot.getActiveEditor();return t?.isOpened()}beforeRender(t,e){t&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,e)}afterRender(t){if(Ap(this,Lp,!1),t){this.renderSizeProbe.measure(this._wt);const t=this.hot.stylesHandler.getDefaultRowHeight()??0;this.renderSizeProbe.hasColumnHeaderTallerThan(t)&&this._wt.wtOverlays.refreshColumnHeaderHeights(),this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}}appendRowHeader(t,e){if(e.firstChild){const o=e.firstChild;if(!go(o,"relative"))return vo(e),void this.appendRowHeader(t,e);this.updateCellHeader(o.querySelector(".rowHeader"),t,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:n}=this.hot,i=o.createElement("div"),s=o.createElement("span");i.className="relative",s.className="rowHeader",this.updateCellHeader(s,t,n),i.appendChild(s),e.appendChild(i)}this.hot.runHooks("afterGetRowHeader",t,e)}appendColHeader(t,e,o=this.hot.getColHeader,n=0){const i=()=>{const e=t>=0?this.hot.getColumnMeta(t).headerClassName:null;if(!e)return[];return(Array.isArray(e)?e:e.split(" ")).flatMap(t=>t.split(" ")).filter(t=>t.length>0)};if(e.firstChild){const s=e.firstChild;go(s,"relative")?(this.updateCellHeader(s.querySelector(".colHeader"),t,o,n),s.className="",po(s,["relative",...i()])):(vo(e),this.appendColHeader(t,e,o,n))}else{const{rootDocument:s}=this.hot,r=s.createElement("div"),l=s.createElement("span"),a=i();r.classList.add("relative",...a),l.className="colHeader",this.settings.ariaTags&&(mo(r,[["role","presentation"]]),mo(l,[["role","presentation"]])),this.updateCellHeader(l,t,o,n),r.appendChild(l),e.appendChild(r)}this.hot.runHooks("afterGetColHeader",t,e,n)}updateCellHeader(t,e,o,n=0){let i=e;const s=this._wt.wtOverlays.getParentOverlay(t)||this._wt;t.parentNode&&(go(t,"colHeader")?i=s.wtTable.columnFilter.sourceToRendered(e):go(t,"rowHeader")&&(i=s.wtTable.rowFilter.sourceToRendered(e))),i>-1?Ro(t,String(o(e,n)),xp(this.hot),"header",this.hot.rootElement):(Eo(t,String.fromCharCode(160)),po(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){Ap(this,$p,t),Ap(this,Up,e)}getLastSize(){return{width:Ip(this,$p),height:Ip(this,Up)}}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 Ip(this,Pp)}getRowHeadersCount(){return Ip(this,Dp)}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){Op(this,Yp),Op(this,Xp),Op(this,Kp),Op(this,Zp),Op(this,Qp),Op(this,Jp),_p(this,Pp,{writable:!0,value:void 0}),_p(this,Dp,{writable:!0,value:void 0}),_p(this,Lp,{writable:!0,value:void 0}),_p(this,zp,{writable:!0,value:void 0}),_p(this,Bp,{writable:!0,value:void 0}),_p(this,Vp,{writable:!0,value:void 0}),_p(this,Fp,{writable:!0,value:void 0}),_p(this,$p,{writable:!0,value:void 0}),_p(this,Up,{writable:!0,value:void 0}),_p(this,jp,{writable:!0,value:void 0}),_p(this,qp,{writable:!0,value:void 0}),_p(this,Gp,{writable:!0,value:void 0}),Ap(this,Pp,0),Ap(this,Dp,0),this.postponedAdjustElementsSize=!1,this.renderSizeProbe=new Gs,Ap(this,Lp,!1),Ap(this,zp,!1),Ap(this,Bp,!1),Ap(this,Vp,!1),Ap(this,Fp,null),Ap(this,$p,0),Ap(this,Up,0),Ap(this,jp,null),Ap(this,qp,!1),Ap(this,Gp,null),this.hot=t,this.eventManager=new _i(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}}function ef(t){return Ks(t)??Ip(this,qp)}function of(t){const{rootElement:e,rootPortalElement:o}=this.hot;return!!(t.includes(e)||o&&t.includes(o))||!t.some(t=>nn(t))&&sn(e).some(e=>t.includes(e))}function nf(){this.hot.stylesHandler.recacheValuesMeasuredWithoutStyles()&&Ap(this,Lp,!0),Ip(this,Lp)&&(this._wt.wtViewport.resetAllOversizedRows(),this.invalidateColumnWidthCache())}function sf(){return parseInt(this.hot.rootElement.getAttribute("aria-colcount")??"0",10)}function rf(t){const e=Wp(this,Zp,sf).call(this)+t;mo(this.hot.rootElement,[_(e)])}function lf(){const t=this.hot.rootElement;this.hasVerticalScroll()?po(t,"htHasScrollY"):fo(t,"htHasScrollY"),this.isVerticallyScrollableByWindow()?po(t,"htVerticallyScrollableByWindow"):fo(t,"htVerticallyScrollableByWindow"),this.hasHorizontalScroll()?po(t,"htHasScrollX"):fo(t,"htHasScrollX"),this.isHorizontallyScrollableByWindow()?po(t,"htHorizontallyScrollableByWindow"):fo(t,"htHorizontallyScrollableByWindow"),0===jo()?po(t,"htScrollbarHidden"):fo(t,"htScrollbarHidden")}function af(t,e=0){let o=t;const n=[];return Array.isArray(t)&&Array.isArray(t[0])||(o=[t]),o.forEach((t,o)=>{Array.isArray(t)?t.forEach((t,i)=>{n.push([o+e,i,t])}):Object.keys(t).forEach(i=>{n.push([o+e,i,t[i]])})}),n}function hf(t){let e=0;return Array.isArray(t)&&(t[0]&&Array.isArray(t[0])?e=t[0].length:t[0]&&Ce(t[0])&&(e=xe(t[0]))),e}function cf(t){return Array.isArray(t)?t.slice():null!==t&&"object"==typeof t?{...t}:t}function df(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function uf(t,e,o){!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,o)}function gf(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,df(t,e,"set"),o),o}var pf=new WeakMap;class ff{get skipUnchangedWrites(){return function(t,e){return e.get?e.get.call(t):e.value}(t=this,df(t,pf,"get"));var t}getValues(t){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.skipUnchangedWrites&&this.indexedValues[t]===e||(this.indexedValues[t]=e,this.runLocalHooks("change")),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(t=this.indexedValues.length){if(ln(this.initValueOrFn)){const e=new Array(t),o=this.initValueOrFn;for(let n=0;n<t;n+=1)e[n]=o(n);this.indexedValues=e}else this.indexedValues=new Array(t).fill(this.initValueOrFn);this.runLocalHooks("change")}init(t){return this.setDefaultValues(t),this.runLocalHooks("init"),this}insert(t,e){this.runLocalHooks("change")}remove(t){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=[],this.initValueOrFn=null}constructor(t=null,{skipUnchangedWrites:e=!1}={}){uf(this,pf,{writable:!0,value:void 0}),this.indexedValues=[],this.initValueOrFn=t,gf(this,pf,e)}}function mf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wf(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function bf(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,wf(t,e,"get"))}function vf(t,e,o){mf(t,e),e.set(t,o)}function Cf(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,wf(t,e,"set"),o),o}function yf(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Sf(t,e){mf(t,e),e.add(t)}be(ff,Wh);var kf=new WeakMap,Rf=new WeakMap,Ef=new WeakMap,xf=new WeakMap,Mf=new WeakMap,Tf=new WeakSet,Hf=new WeakSet;class If extends ff{getValues(){return bf(this,kf)?new Array(bf(this,Rf)).fill(bf(this,xf)):bf(this,Ef)}getValueAtIndex(t){if(!(t<0||t>=bf(this,Rf)))return bf(this,kf)?bf(this,xf):bf(this,Ef)[t]}getLength(){return bf(this,Rf)}setValues(t){Cf(this,Rf,t.length);let e=!0;for(let o=0;o<t.length;o+=1)if(!0===t[o]!==bf(this,xf)){e=!1;break}if(e)Cf(this,kf,!0),Cf(this,Ef,null);else{const e=new Array(t.length);for(let o=0;o<t.length;o+=1)e[o]=!0===t[o];Cf(this,kf,!1),Cf(this,Ef,e)}this.runLocalHooks("change")}setValueAtIndex(t,e){if(t<0||t>=bf(this,Rf))return!1;const o=!0===e;if(bf(this,kf)){if(o===bf(this,xf))return this.skipUnchangedWrites||this.runLocalHooks("change"),!0;yf(this,Hf,Af).call(this)}return this.skipUnchangedWrites&&bf(this,Ef)[t]===o||(bf(this,Ef)[t]=o,this.runLocalHooks("change")),!0}setDefaultValues(t=bf(this,Rf)){if(Cf(this,Rf,t),null!==bf(this,Mf)){const e=new Array(t);for(let o=0;o<t;o+=1)e[o]=yf(this,Tf,_f).call(this,o,o);Cf(this,Ef,e),Cf(this,kf,!1)}else Cf(this,kf,!0),Cf(this,Ef,null);this.runLocalHooks("change")}insert(t,e){const o=e.length;if(o>0)if(bf(this,kf))Cf(this,Rf,bf(this,Rf)+o);else{const t=e[0],n=new Array(o);for(let t=0;t<o;t+=1)n[t]=yf(this,Tf,_f).call(this,e[t],t);const i=bf(this,Ef);Cf(this,Ef,i.slice(0,t).concat(n,i.slice(t))),Cf(this,Rf,bf(this,Rf)+o)}super.insert(t,e)}remove(t){if(bf(this,kf)){const e=new Set;for(let o=0;o<t.length;o+=1){const n=t[o];n>=0&&n<bf(this,Rf)&&e.add(n)}Cf(this,Rf,bf(this,Rf)-e.size)}else{const e=new Set(t),o=bf(this,Ef),n=[];for(let t=0;t<bf(this,Rf);t+=1)!1===e.has(t)&&n.push(o[t]);Cf(this,Ef,n),Cf(this,Rf,n.length)}super.remove(t)}destroy(){Cf(this,kf,!0),Cf(this,Rf,0),Cf(this,Ef,null),super.destroy()}constructor(t=!1,e={}){super(t,e),Sf(this,Tf),Sf(this,Hf),vf(this,kf,{writable:!0,value:void 0}),vf(this,Rf,{writable:!0,value:void 0}),vf(this,Ef,{writable:!0,value:void 0}),vf(this,xf,{writable:!0,value:void 0}),vf(this,Mf,{writable:!0,value:void 0}),Cf(this,kf,!0),Cf(this,Rf,0),Cf(this,Ef,null),Cf(this,Mf,"function"==typeof t?t:null),Cf(this,xf,!0===t)}}function _f(t,e){return null!==bf(this,Mf)?!0===bf(this,Mf).call(this,t,e):bf(this,xf)}function Af(){bf(this,kf)&&(Cf(this,Ef,new Array(bf(this,Rf)).fill(bf(this,xf))),Cf(this,kf,!1))}class Wf extends If{getHiddenIndexes(){return B(this.getValues(),(t,e,o)=>(e&&t.push(o),t),[])}constructor(t=!1){super(t,{skipUnchangedWrites:!0})}}function Of(t,e,o){return[...t.slice(0,e),...o,...t.slice(e)]}function Nf(t,e){if(e.length<=16)return V(t,t=>!1===e.includes(t));const o=new Set(e);return V(t,t=>!1===o.has(t))}function Pf(t,e){if(0===e.length)return t.slice();const o=Int32Array.from(e).sort();return F(t,t=>{let e=0,n=o.length;for(;e<n;){const i=Math.floor((e+n)/2);o[i]<t?e=i+1:n=i}return t-e})}function Df(t,e){const o=e[0],n=e.length;return F(t,t=>t>=o?t+n:t)}function Lf(t,e,o,n){const i=o.length?o[0]:void 0;return[...t.slice(0,i),...o.map((t,e)=>ln(n)?n(t,e):n),...void 0===i?[]:t.slice(i)]}function zf(t,e){if(e.length<=16)return V(t,(t,o)=>!1===e.includes(o));const o=new Set(e);return V(t,(t,e)=>!1===o.has(e))}function Bf(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vf(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ff(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Vf(t,e,"get"))}function $f(t,e,o){Bf(t,e),e.set(t,o)}function Uf(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Vf(t,e,"set"),o),o}function jf(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function qf(t,e){Bf(t,e),e.add(t)}var Gf=new WeakMap,Yf=new WeakMap,Xf=new WeakSet,Kf=new WeakSet,Zf=new WeakSet,Qf=new WeakSet;class Jf extends ff{getValues(){if(Ff(this,Gf)){const t=new Array(Ff(this,Yf));for(let e=0;e<Ff(this,Yf);e+=1)t[e]=e;return t}return this.indexedValues}getValueAtIndex(t){return Ff(this,Gf)?t>=0&&t<Ff(this,Yf)?t:void 0:super.getValueAtIndex(t)}getLength(){return Ff(this,Gf)?Ff(this,Yf):this.indexedValues.length}setValues(t){jf(this,Kf,em).call(this,t)?(Uf(this,Gf,!0),Uf(this,Yf,t.length),this.indexedValues=[]):(Uf(this,Gf,!1),this.indexedValues=t.slice()),this.runLocalHooks("change")}setValueAtIndex(t,e){return t<this.getLength()&&(!(!this.skipUnchangedWrites||this.getValueAtIndex(t)!==e)||(jf(this,Xf,tm).call(this),super.setValueAtIndex(t,e)))}setDefaultValues(t=this.getLength()){Uf(this,Gf,!0),Uf(this,Yf,t),this.indexedValues=[],this.runLocalHooks("change")}insert(t,e){if(Ff(this,Gf)&&jf(this,Zf,om).call(this,t,e))return Uf(this,Yf,Ff(this,Yf)+e.length),void super.insert(t,e);jf(this,Xf,tm).call(this);const o=Df(this.getValues(),e);this.indexedValues=Of(o,t,e),super.insert(t,e)}remove(t){if(Ff(this,Gf))return Uf(this,Yf,Ff(this,Yf)-jf(this,Qf,nm).call(this,t)),void super.remove(t);const e=Nf(this.getValues(),t);this.indexedValues=Pf(e,t),super.remove(t)}destroy(){Uf(this,Gf,!0),Uf(this,Yf,0),super.destroy()}constructor(){super(t=>t,{skipUnchangedWrites:!0}),qf(this,Xf),qf(this,Kf),qf(this,Zf),qf(this,Qf),$f(this,Gf,{writable:!0,value:void 0}),$f(this,Yf,{writable:!0,value:void 0}),Uf(this,Gf,!0),Uf(this,Yf,0)}}function tm(){Ff(this,Gf)&&(this.indexedValues=this.getValues(),Uf(this,Gf,!1))}function em(t){for(let e=0;e<t.length;e+=1)if(t[e]!==e)return!1;return!0}function om(t,e){for(let o=0;o<e.length;o+=1)if(e[o]!==t+o)return!1;return!0}function nm(t){const e=new Set;for(let o=0;o<t.length;o+=1){const n=t[o];n>=0&&n<Ff(this,Yf)&&e.add(n)}return e.size}class im extends ff{getValues(){return this.orderOfIndexes.map(t=>this.indexedValues[t])}setValues(t){this.orderOfIndexes=[...Array(t.length).keys()],super.setValues(t)}setValueAtIndex(t,e,o=this.orderOfIndexes.length){return t<this.indexedValues.length&&(this.indexedValues[t]=e,!1===this.orderOfIndexes.includes(t)&&this.orderOfIndexes.splice(o,0,t),this.runLocalHooks("change"),!0)}clearValue(t){this.orderOfIndexes=Nf(this.orderOfIndexes,[t]),ln(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=Lf(this.indexedValues,0,e,this.initValueOrFn),this.orderOfIndexes=Df(this.orderOfIndexes,e),super.insert(t,e)}remove(t){this.indexedValues=zf(this.indexedValues,t),this.orderOfIndexes=Nf(this.orderOfIndexes,t),this.orderOfIndexes=Pf(this.orderOfIndexes,t),super.remove(t)}getEntries(){return this.orderOfIndexes.map(t=>[t,this.getValueAtIndex(t)])}constructor(...t){super(...t),this.orderOfIndexes=[]}}class sm extends If{getTrimmedIndexes(){return B(this.getValues(),(t,e,o)=>(e&&t.push(o),t),[])}constructor(t=!1){super(t,{skipUnchangedWrites:!0})}}const rm=new Map([["hiding",Wf],["index",ff],["indexesSequence",Jf],["linkedPhysicalIndexToValue",im],["physicalIndexToValue",class extends ff{insert(t,e){this.indexedValues=Lf(this.indexedValues,0,e,this.initValueOrFn),super.insert(t,e)}remove(t){this.indexedValues=zf(this.indexedValues,t),super.remove(t)}}],["trimming",sm]]);class lm{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);void 0!==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 Wt(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(o=>{o.insert(t,e)})}initEvery(t){this.collection.forEach(e=>{e.init(t)})}constructor(){this.collection=new Map}}be(lm,Wh);class am extends lm{getMergedValues(t=!0){if(!0===t)return this.mergedValuesCache;const e=this.get(),o=e.length;if(0===o)return[];const n=F(e,t=>t.getValues()),i=At(n[0])&&n[0].length||0,s=new Array(i),r=new Array(o);for(let t=0;t<i;t+=1){for(let e=0;e<o;e+=1)r[e]=n[e][t];s[t]=this.aggregationFunction(r)}return s}getMergedValueAtIndex(t,e){const o=this.getMergedValues(e)[t];return At(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}constructor(t,e){super(),this.mergedValuesCache=[],this.aggregationFunction=t,this.fallbackValue=e}}function hm(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function cm(t,e,o){!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,o)}function dm(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,hm(t,e,"set"),o),o}var um=new WeakMap;class gm{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,hm(e,um,"get"))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(t){return t.length>0&&this.runLocalHooks("change",t),this}_writeInitialChanges(t){dm(this,um,t)}constructor(){cm(this,um,{writable:!0,value:void 0}),dm(this,um,[])}}function pm(t,e){const o=[];let n=0,i=0;for(;n<t.length&&i<e.length;n++,i++)t[n]!==e[i]&&o.push({op:"replace",index:i,oldValue:t[n],newValue:e[i]});for(;n<e.length;n++)o.push({op:"insert",index:n,oldValue:void 0,newValue:e[n]});for(;i<t.length;i++)o.push({op:"remove",index:i,oldValue:t[i],newValue:void 0});return o}function fm(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,fm(t,e,"get"))}function wm(t,e,o){!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,o)}function bm(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,fm(t,e,"set"),o),o}be(gm,Wh);var vm=new WeakMap,Cm=new WeakMap,ym=new WeakMap,Sm=new WeakMap,km=new WeakMap;class Rm{createObserver(){const t=new gm;return mm(this,vm).add(t),t.addLocalHook("unsubscribe",()=>{mm(this,vm).delete(t)}),t._writeInitialChanges(pm(mm(this,Cm),mm(this,ym))),t}emit(t){let e=mm(this,ym);mm(this,Sm)&&mm(this,Cm).length===t.length||(0===t.length?t=new Array(e.length).fill(mm(this,km)):bm(this,Cm,new Array(t.length).fill(mm(this,km))),mm(this,Sm)||(bm(this,Sm,!0),e=mm(this,Cm)));const o=pm(e,t);mm(this,vm).forEach(t=>t._write(o)),bm(this,ym,t)}constructor({initialIndexValue:t}={}){wm(this,vm,{writable:!0,value:void 0}),wm(this,Cm,{writable:!0,value:void 0}),wm(this,ym,{writable:!0,value:void 0}),wm(this,Sm,{writable:!0,value:void 0}),wm(this,km,{writable:!0,value:void 0}),bm(this,vm,new Set),bm(this,Cm,[]),bm(this,ym,[]),bm(this,Sm,!1),bm(this,km,!1),bm(this,km,t??!1)}}function Em(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xm(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,xm(t,e,"get"))}function Tm(t,e,o){Em(t,e),e.set(t,o)}function Hm(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,xm(t,e,"set"),o),o}function Im(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function _m(t,e){Em(t,e),e.add(t)}var Am=new WeakMap,Wm=new WeakMap,Om=new WeakSet,Nm=new WeakSet,Pm=new WeakSet,Dm=new WeakSet;class Lm{suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache(),Im(this,Pm,Vm).call(this)}createChangesObserver(t){return"hiding"!==t&&ce(`Unsupported index map type "${t}".`),this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(t,e,o,n){return this.registerMap(t,function(t,e=null,o={}){return rm.has(t)||ce(`The provided map type ("${t}") does not exist.`),new(rm.get(t))(e,o)}(e,o,n))}registerMap(t,e){(this.trimmingMapsCollection.get(t)||this.hidingMapsCollection.get(t)||this.variousMapsCollection.get(t))&&ce(`Map with name "${t}" has been already registered.`),e instanceof sm?this.trimmingMapsCollection.register(t,e):e instanceof Wf?this.hidingMapsCollection.register(t,e):this.variousMapsCollection.register(t,e);const o=this.getNumberOfIndexes();return o>0&&e.init(o),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 At(e)?e:null}getPhysicalFromRenderableIndex(t){const e=this.renderablePhysicalIndexesCache[t];return At(e)?e:null}getVisualFromPhysicalIndex(t){if(!Number.isInteger(t))return null;const e=this.fromPhysicalToVisualIndexesCache[t];return void 0===e||-1===e?null:e}getVisualFromRenderableIndex(t){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(t))}getRenderableFromVisualIndex(t){if(!Number.isInteger(t))return null;const e=this.fromVisualToRenderableIndexesCache[t];return void 0===e||-1===e?null:e}getNearestNotHiddenIndex(t,e,o=!1){if(null===this.getPhysicalFromVisualIndex(t))return null;const n=this.fromVisualToRenderableIndexesCache,i=n[t];if("number"==typeof i&&-1!==i)return t;const s=n.length;for(let o=t+e;o>=0&&o<s;o+=e)if(-1!==n[o])return o;return o?this.getNearestNotHiddenIndex(t,-e,!1):null}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;const e=this.getIndexesSequence(),o=this.trimmingMapsCollection.getMergedValues(),n=[];for(let t=0;t<e.length;t+=1){const i=e[t];!0!==o[i]&&n.push(i)}return n}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(t=!0){if(!0===t)return this.notHiddenIndexesCache;const e=this.getIndexesSequence(),o=this.hidingMapsCollection.getMergedValues(),n=[];for(let t=0;t<e.length;t+=1){const i=e[t];!0!==o[i]&&n.push(i)}return n}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(t=!0){if(!0===t)return this.renderablePhysicalIndexesCache;const e=this.getNotTrimmedIndexes(),o=this.hidingMapsCollection.getMergedValues(),n=[];for(let t=0;t<e.length;t+=1){const i=e[t];!0!==o[i]&&n.push(i)}return n}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(t,e){"number"==typeof t&&(t=[t]);const o=F(t,t=>this.getPhysicalFromVisualIndex(t)).filter(t=>null!==t),n=this.getNotTrimmedIndexesLength(),i=t.length,s=Nf(this.getIndexesSequence(),o),r=s.filter(t=>!1===this.isTrimmed(t));let l=s.indexOf(r[r.length-1])+1;if(e+i<n){const t=r[e];l=s.indexOf(t)}this.indexesChangeSource="move",this.setIndexesSequence(Of(s,l,o)),this.indexesChangeSource=void 0}isTrimmed(t){return this.trimmingMapsCollection.getMergedValueAtIndex(t)}isHidden(t){return this.hidingMapsCollection.getMergedValueAtIndex(t)}insertIndexes(t,e,o="start"){const n=this.getNotTrimmedIndexes()[t],i=At(n)?n:this.getNumberOfIndexes(),s=this.getIndexesSequence().includes(n)?this.getIndexesSequence().indexOf(n):this.getNumberOfIndexes(),r=F(new Array(e).fill(i),(t,e)=>t+e);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(s,r),this.indexesChangeSource=void 0;const l="end"===o?r.map(t=>t+1):r;this.trimmingMapsCollection.insertToEvery(s,l),this.hidingMapsCollection.insertToEvery(s,l),this.variousMapsCollection.insertToEvery(s,l),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 sm||t instanceof Wf)&&ce('The "observeMapChange" method does not support trimming or hiding maps.'),Mm(this,Am).has(t)||Mm(this,Am).set(t,new Set),Mm(this,Am).get(t).add(e),()=>{const o=Mm(this,Am).get(t);o&&(o.delete(e),0===o.size&&Mm(this,Am).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(),e=Im(this,Dm,Fm).call(this,this.fromPhysicalToVisualIndexesCache,this.getNumberOfIndexes());for(let o=0;o<t;o+=1){const t=this.getPhysicalFromVisualIndex(o);null!==t&&(e[t]=o)}this.fromPhysicalToVisualIndexesCache=e}cacheFromVisualToRenderableIndexes(){const t=this.getRenderableIndexesLength(),e=Im(this,Dm,Fm).call(this,this.fromVisualToRenderableIndexesCache,this.getNotTrimmedIndexesLength());for(let o=0;o<t;o+=1){const t=this.getPhysicalFromRenderableIndex(o),n=this.getVisualFromPhysicalIndex(t);null!==n&&(e[n]=o)}this.fromVisualToRenderableIndexesCache=e}destroy(){Hm(this,Am,new WeakMap),Mm(this,Wm).clear(),this.unregisterAll()}constructor(){_m(this,Om),_m(this,Nm),_m(this,Pm),_m(this,Dm),Tm(this,Am,{writable:!0,value:void 0}),Tm(this,Wm,{writable:!0,value:void 0}),this.indexesSequence=new Jf,this.trimmingMapsCollection=new am(t=>t.some(t=>!0===t),!1),this.hidingMapsCollection=new am(t=>t.some(t=>!0===t),!1),this.variousMapsCollection=new lm,this.hidingChangesObservable=new Rm({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 Int32Array(0),this.fromVisualToRenderableIndexesCache=new Int32Array(0),Hm(this,Am,new WeakMap),Hm(this,Wm,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=>{Im(this,Om,zm).call(this,t),this.runLocalHooks("change",t,this.variousMapsCollection)})}}function zm(t){Mm(this,Am).has(t)&&(this.isBatched?Mm(this,Wm).add(t):Im(this,Nm,Bm).call(this,t))}function Bm(t){const e=Mm(this,Am).get(t);e&&e.forEach(e=>e(t))}function Vm(){Mm(this,Wm).size>0&&(Mm(this,Wm).forEach(t=>Im(this,Nm,Bm).call(this,t)),Mm(this,Wm).clear())}function Fm(t,e){return t.length===e?(t.fill(-1),t):new Int32Array(e).fill(-1)}function $m(t){const e=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(t);return e?`${e[1].toLowerCase()}-${e[2].toUpperCase()}`:t}function Um(t){At(t)&&eo(X`Language with code "${t}" was not found. You should register particular language\x20
|
|
49
|
+
before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}be(Lm,Wh);const{register:jm,getValues:qm}=oi("phraseFormatters");function Gm(t,e){jm(t,e)}Gm("pluralize",function(t,e){return Array.isArray(t)&&Number.isInteger(e)?t[e]:t}),Gm("substitute",function t(e,o){return Array.isArray(e)?e.map(e=>t(e,o)):Ge(e,o)});const Ym="Common:",Xm=`${Ym}ok`,Km=`${Ym}cancel`,Zm="ContextMenu:items",Qm=`${Zm}.noItems`,Jm=`${Zm}.insertRowAbove`,tw=`${Zm}.insertRowBelow`,ew=`${Zm}.insertColumnOnTheLeft`,ow=`${Zm}.insertColumnOnTheRight`,nw=`${Zm}.removeRow`,iw=`${Zm}.removeColumn`,sw=`${Zm}.undo`,rw=`${Zm}.redo`,lw=`${Zm}.readOnly`,aw=`${Zm}.clearColumn`,hw=`${Zm}.copy`,cw=`${Zm}.copyWithHeaders`,dw=`${Zm}.copyWithGroupHeaders`,uw=`${Zm}.copyHeadersOnly`,gw=`${Zm}.cut`,pw=`${Zm}.export`,fw=`${Zm}.exportFileCsv`,mw=`${Zm}.exportFileXlsx`,ww=`${Zm}.freezeColumn`,bw=`${Zm}.unfreezeColumn`,vw=`${Zm}.mergeCells`,Cw=`${Zm}.unmergeCells`,yw=`${Zm}.addComment`,Sw=`${Zm}.editComment`,kw=`${Zm}.removeComment`,Rw=`${Zm}.readOnlyComment`,Ew=`${Zm}.align`,xw=`${Zm}.align.left`,Mw=`${Zm}.align.center`,Tw=`${Zm}.align.right`,Hw=`${Zm}.align.justify`,Iw=`${Zm}.align.top`,_w=`${Zm}.align.middle`,Aw=`${Zm}.align.bottom`,Ww=`${Zm}.borders`,Ow=`${Zm}.borders.top`,Nw=`${Zm}.borders.right`,Pw=`${Zm}.borders.bottom`,Dw=`${Zm}.borders.left`,Lw=`${Zm}.borders.remove`,zw=`${Zm}.nestedHeaders.insertChildRow`,Bw=`${Zm}.nestedHeaders.detachFromParent`,Vw=`${Zm}.hideColumn`,Fw=`${Zm}.showColumn`,$w=`${Zm}.hideRow`,Uw=`${Zm}.showRow`,jw="Filters:",qw=`${jw}conditions`,Gw=`${qw}.none`,Yw=`${qw}.isEmpty`,Xw=`${qw}.isNotEmpty`,Kw=`${qw}.isEqualTo`,Zw=`${qw}.isNotEqualTo`,Qw=`${qw}.beginsWith`,Jw=`${qw}.endsWith`,tb=`${qw}.contains`,eb=`${qw}.doesNotContain`,ob=`${qw}.byValue`,nb=`${qw}.greaterThan`,ib=`${qw}.greaterThanOrEqualTo`,sb=`${qw}.lessThan`,rb=`${qw}.lessThanOrEqualTo`,lb=`${qw}.isBetween`,ab=`${qw}.isNotBetween`,hb=`${qw}.after`,cb=`${qw}.afterOrEqual`,db=`${qw}.before`,ub=`${qw}.beforeOrEqual`,gb=`${qw}.today`,pb=`${qw}.tomorrow`,fb=`${qw}.yesterday`,mb=`${jw}labels.filterByCondition`,wb=`${jw}labels.filterByValue`,bb=`${jw}labels.conjunction`,vb=`${jw}labels.disjunction`,Cb=`${jw}values.blankCells`,yb=`${jw}buttons.selectAll`,Sb=`${jw}buttons.clear`,kb=`${jw}buttons.ok`,Rb=`${jw}buttons.cancel`,Eb=`${jw}buttons.placeholder.search`,xb=`${jw}buttons.placeholder.value`,Mb=`${jw}buttons.placeholder.secondValue`,Tb="Pagination:",Hb=`${Tb}section.pagination`,Ib=`${Tb}.pageSize.auto`,_b=`${Tb}section.pageSize`,Ab=`${Tb}section.counter`,Wb=`${Tb}section.navigation`,Ob=`${Tb}firstPage`,Nb=`${Tb}prevPage`,Pb=`${Tb}nextPage`,Db=`${Tb}lastPage`,Lb="CheckboxRenderer:",zb=`${Lb}checked`,Bb=`${Lb}unchecked`,Vb="Loading:",Fb=`${Vb}title`,$b="Notification:",Ub=`${$b}buttons.close`,jb="ExportFile:",qb=`${jb}dialog.title`,Gb="EmptyDataState:",Yb=`${Gb}title`,Xb=`${Gb}description`,Kb=`${Gb}title.filters`,Zb=`${Gb}description.filters`,Qb=`${Gb}buttons.filters.reset`,Jb=`${Gb}title.loading`,tv=`${Gb}description.loading`,ev="DataProvider:",ov=`${ev}errors.fetch`,nv=`${ev}errors.create`,iv=`${ev}errors.update`,sv=`${ev}errors.remove`,rv=`${ev}errors.requestFailed`,lv=`${ev}buttons.refetch`;var av=Object.freeze({__proto__:null,CANCEL:Km,CHECKBOX_CHECKED:zb,CHECKBOX_RENDERER_NAMESPACE:Lb,CHECKBOX_UNCHECKED:Bb,COMMON_NAMESPACE:Ym,CONTEXTMENU_ITEMS_ADD_COMMENT:yw,CONTEXTMENU_ITEMS_ALIGNMENT:Ew,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:Aw,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:Mw,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:Hw,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:xw,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:_w,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:Tw,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:Iw,CONTEXTMENU_ITEMS_BORDERS:Ww,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:Pw,CONTEXTMENU_ITEMS_BORDERS_LEFT:Dw,CONTEXTMENU_ITEMS_BORDERS_RIGHT:Nw,CONTEXTMENU_ITEMS_BORDERS_TOP:Ow,CONTEXTMENU_ITEMS_CLEAR_COLUMN:aw,CONTEXTMENU_ITEMS_COPY:hw,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:uw,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:dw,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:cw,CONTEXTMENU_ITEMS_CUT:gw,CONTEXTMENU_ITEMS_EDIT_COMMENT:Sw,CONTEXTMENU_ITEMS_EXPORT:pw,CONTEXTMENU_ITEMS_EXPORT_FILE_CSV:fw,CONTEXTMENU_ITEMS_EXPORT_FILE_XLSX:mw,CONTEXTMENU_ITEMS_FREEZE_COLUMN:ww,CONTEXTMENU_ITEMS_HIDE_COLUMN:Vw,CONTEXTMENU_ITEMS_HIDE_ROW:$w,CONTEXTMENU_ITEMS_INSERT_LEFT:ew,CONTEXTMENU_ITEMS_INSERT_RIGHT:ow,CONTEXTMENU_ITEMS_MERGE_CELLS:vw,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:Bw,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:zw,CONTEXTMENU_ITEMS_NO_ITEMS:Qm,CONTEXTMENU_ITEMS_READ_ONLY:lw,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:Rw,CONTEXTMENU_ITEMS_REDO:rw,CONTEXTMENU_ITEMS_REMOVE_BORDERS:Lw,CONTEXTMENU_ITEMS_REMOVE_COLUMN:iw,CONTEXTMENU_ITEMS_REMOVE_COMMENT:kw,CONTEXTMENU_ITEMS_REMOVE_ROW:nw,CONTEXTMENU_ITEMS_ROW_ABOVE:Jm,CONTEXTMENU_ITEMS_ROW_BELOW:tw,CONTEXTMENU_ITEMS_SHOW_COLUMN:Fw,CONTEXTMENU_ITEMS_SHOW_ROW:Uw,CONTEXTMENU_ITEMS_UNDO:sw,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:bw,CONTEXTMENU_ITEMS_UNMERGE_CELLS:Cw,CONTEXT_MENU_ITEMS_NAMESPACE:Zm,DATA_PROVIDER_BUTTONS_REFETCH:lv,DATA_PROVIDER_ERRORS_CREATE:nv,DATA_PROVIDER_ERRORS_FETCH:ov,DATA_PROVIDER_ERRORS_REMOVE:sv,DATA_PROVIDER_ERRORS_REQUEST_FAILED:rv,DATA_PROVIDER_ERRORS_UPDATE:iv,DATA_PROVIDER_NAMESPACE:ev,EMPTY_DATA_STATE_BUTTONS_FILTERS_RESET:Qb,EMPTY_DATA_STATE_DESCRIPTION:Xb,EMPTY_DATA_STATE_DESCRIPTION_FILTERS:Zb,EMPTY_DATA_STATE_DESCRIPTION_LOADING:tv,EMPTY_DATA_STATE_NAMESPACE:Gb,EMPTY_DATA_STATE_TITLE:Yb,EMPTY_DATA_STATE_TITLE_FILTERS:Kb,EMPTY_DATA_STATE_TITLE_LOADING:Jb,EXPORT_FILE_DIALOG_TITLE:qb,EXPORT_FILE_NAMESPACE:jb,FILTERS_BUTTONS_CANCEL:Rb,FILTERS_BUTTONS_CLEAR:Sb,FILTERS_BUTTONS_OK:kb,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:Eb,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:Mb,FILTERS_BUTTONS_PLACEHOLDER_VALUE:xb,FILTERS_BUTTONS_SELECT_ALL:yb,FILTERS_CONDITIONS_AFTER:hb,FILTERS_CONDITIONS_AFTER_OR_EQUAL:cb,FILTERS_CONDITIONS_BEFORE:db,FILTERS_CONDITIONS_BEFORE_OR_EQUAL:ub,FILTERS_CONDITIONS_BEGINS_WITH:Qw,FILTERS_CONDITIONS_BETWEEN:lb,FILTERS_CONDITIONS_BY_VALUE:ob,FILTERS_CONDITIONS_CONTAINS:tb,FILTERS_CONDITIONS_EMPTY:Yw,FILTERS_CONDITIONS_ENDS_WITH:Jw,FILTERS_CONDITIONS_EQUAL:Kw,FILTERS_CONDITIONS_GREATER_THAN:nb,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:ib,FILTERS_CONDITIONS_LESS_THAN:sb,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:rb,FILTERS_CONDITIONS_NAMESPACE:qw,FILTERS_CONDITIONS_NONE:Gw,FILTERS_CONDITIONS_NOT_BETWEEN:ab,FILTERS_CONDITIONS_NOT_CONTAIN:eb,FILTERS_CONDITIONS_NOT_EMPTY:Xw,FILTERS_CONDITIONS_NOT_EQUAL:Zw,FILTERS_CONDITIONS_TODAY:gb,FILTERS_CONDITIONS_TOMORROW:pb,FILTERS_CONDITIONS_YESTERDAY:fb,FILTERS_DIVS_FILTER_BY_CONDITION:mb,FILTERS_DIVS_FILTER_BY_VALUE:wb,FILTERS_LABELS_CONJUNCTION:bb,FILTERS_LABELS_DISJUNCTION:vb,FILTERS_NAMESPACE:jw,FILTERS_VALUES_BLANK_CELLS:Cb,LOADING_NAMESPACE:Vb,LOADING_TITLE:Fb,NOTIFICATION_BUTTONS_CLOSE:Ub,NOTIFICATION_NAMESPACE:$b,OK:Xm,PAGINATION_COUNTER_SECTION:Ab,PAGINATION_FIRST_PAGE:Ob,PAGINATION_LAST_PAGE:Db,PAGINATION_NAMESPACE:Tb,PAGINATION_NAV_SECTION:Wb,PAGINATION_NEXT_PAGE:Pb,PAGINATION_PAGE_SIZE_AUTO:Ib,PAGINATION_PAGE_SIZE_SECTION:_b,PAGINATION_PREV_PAGE:Nb,PAGINATION_SECTION:Hb});const hv={languageCode:"en-US",[Xm]:"OK",[Km]:"Cancel",[Qm]:"No available options",[Jm]:"Insert row above",[tw]:"Insert row below",[ew]:"Insert column left",[ow]:"Insert column right",[nw]:["Remove row","Remove rows"],[iw]:["Remove column","Remove columns"],[sw]:"Undo",[rw]:"Redo",[lw]:"Read only",[aw]:"Clear column",[Ew]:"Alignment",[xw]:"Left",[Mw]:"Center",[Tw]:"Right",[Hw]:"Justify",[Iw]:"Top",[_w]:"Middle",[Aw]:"Bottom",[ww]:"Freeze column",[bw]:"Unfreeze column",[Ww]:"Borders",[Ow]:"Top",[Nw]:"Right",[Pw]:"Bottom",[Dw]:"Left",[Lw]:"Remove border(s)",[yw]:"Add comment",[Sw]:"Edit comment",[kw]:"Delete comment",[Rw]:"Read-only comment",[vw]:"Merge cells",[Cw]:"Unmerge cells",[hw]:"Copy",[cw]:["Copy with header","Copy with headers"],[dw]:["Copy with group header","Copy with group headers"],[uw]:["Copy header only","Copy headers only"],[gw]:"Cut",[pw]:"Export",[fw]:"To CSV",[mw]:"To Excel",[qb]:"Exporting…",[zw]:"Insert child row",[Bw]:"Detach from parent",[Vw]:["Hide column","Hide columns"],[Fw]:["Show column","Show columns"],[$w]:["Hide row","Hide rows"],[Uw]:["Show row","Show rows"],[Gw]:"None",[Yw]:"Is empty",[Xw]:"Is not empty",[Kw]:"Is equal to",[Zw]:"Is not equal to",[Qw]:"Begins with",[Jw]:"Ends with",[tb]:"Contains",[eb]:"Does not contain",[nb]:"Greater than",[ib]:"Greater than or equal to",[sb]:"Less than",[rb]:"Less than or equal to",[lb]:"Is between",[ab]:"Is not between",[hb]:"After",[cb]:"After or equal to",[db]:"Before",[ub]:"Before or equal to",[gb]:"Today",[pb]:"Tomorrow",[fb]:"Yesterday",[Cb]:"Blank cells",[mb]:"Filter by condition",[wb]:"Filter by value",[bb]:"And",[vb]:"Or",[yb]:"Select all",[Sb]:"Clear",[kb]:"OK",[Rb]:"Cancel",[Eb]:"Search",[xb]:"Value",[Mb]:"Second value",[Hb]:"Pagination",[_b]:"Page size",[Ib]:"Auto",[Ab]:"[start] - [end] of [total]",[Wb]:"Page [currentPage] of [totalPages]",[Ob]:"Go to first page",[Nb]:"Go to previous page",[Pb]:"Go to next page",[Db]:"Go to last page",[zb]:"Checked",[Bb]:"Unchecked",[Fb]:"Loading...",[Ub]:"Close",[Yb]:"No data available",[Xb]:"There’s nothing to display yet.",[Kb]:"No results found",[Zb]:"It looks like your current filters are hiding all results.",[Qb]:"Reset filters",[Jb]:"Loading data",[tv]:"Please wait.",[ov]:"Could not load data",[nv]:"Could not create rows",[iv]:"Could not update rows",[sv]:"Could not remove rows",[rv]:"Request failed",[lv]:"Refetch"},cv=hv.languageCode,{register:dv,getItem:uv,hasItem:gv,getValues:pv}=oi("languagesDictionaries");function fv(t,e){let o=t,n=e;return Ce(t)&&(n=t,o=String(n.languageCode)),function(t,e){t!==cv&&(o=e,ke(uv(cv),(t,e)=>{Wt(o[e])&&(o[e]=t)}));var o}(o,n),dv(o,pe(n)),pe(n)}function mv(t){return wv(t)?pe(uv(t)):null}function wv(t){return gv(t)}function bv(t,e,o){const n=mv(t);if(null===n)return null;const i=n[e];if(Wt(i))return null;const s=function(t,e){return qm().reduce((t,o)=>o(t,e),t)}(i,o);return Array.isArray(s)?s[0]:s}fv(hv);class vv extends Oh{add(t){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(t):this.visualCellRange.expand(t),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(t){const{from:e,to:o}=t,n="N-S"===t.getVerticalDirection()?1:-1,i="start-end"===t.getInlineDirection()?1:-1,s=this.getNearestNotHiddenCoords(e,n,i),r=this.getNearestNotHiddenCoords(o,-n,-i);if(null===s||null===r)return null;const l=s.row??0,a=r.row??0,h=s.col??0,c=r.col??0;return 1===n&&l>a||-1===n&&l<a||(1===i&&h>c||-1===i&&h<c)?null:this.settings.createCellRange(s,s,r)}getNearestNotHiddenCoords(t,e,o=e){if(null===t.row||null===t.col)return null;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,t.row,e);if(null===n)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,t.col,o);return null===i?null:this.settings.createCellCoords(n,i)}getNearestNotHiddenIndex(t,e,o){return e<0?e:t.getNearestNotHiddenIndex(e,o)}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(),o="N-S"===t.getVerticalDirection()?1:-1,n="W-E"===t.getHorizontalDirection()?1:-1,i=this.visualCellRange?this.settings.visualToRenderableCoords(this.visualCellRange.highlight):null;let s=null;if(null!==i&&null!==i.col&&null!==i.row||(s=this.getNearestNotHiddenCoords(e,o,n)),null!==s&&t.includes(s)){const e=t.highlight.clone();if((e.row??-1)>=0&&(e.row=s.row),(e.col??-1)>=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&&null!==this.visualCellRange&&t.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:t,to:e}=this.cellRange;return[Math.min(t.row??0,e.row??0),Math.min(t.col??0,e.col??0),Math.max(t.row??0,e.row??0),Math.max(t.col??0,e.col??0)]}getVisualCorners(){const t=this.cellRange,e=this.settings.renderableToVisualCoords(t.getTopStartCorner()),o=this.settings.renderableToVisualCoords(t.getBottomEndCorner());return[e.row,e.col,o.row,o.col]}createRenderableCellRange(t,e){const o=this.settings.visualToRenderableCoords(t),n=this.settings.visualToRenderableCoords(e);return null===o.row||null===o.col||null===n.row||null===n.col?null:this.settings.createCellRange(o,o,n)}constructor(t,e){super(t,null),this.visualCellRange=null,this.visualCellRange=e||null,this.commit()}}function Cv({activeHeaderClassName:t,...e}){return new vv({className:t,...e,selectionType:Nh})}function yv({areaCornerVisible:t,adjustHandlesVisible:e,moveEnabled:o,...n}){return new vv({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t,adjustHandlesVisible:e,moveEnabled:o},...n,selectionType:Dh})}function Sv({...t}){return new vv({className:"highlight",...t,selectionType:Dh})}function kv({columnClassName:t,...e}){return new vv({className:t,...e,selectionType:"column"})}function Rv({headerClassName:t,...e}){return new vv({className:t,...e,selectionType:Ph})}function Ev({rowClassName:t,...e}){return new vv({className:t,...e,selectionType:"row"})}function xv(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Mv(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 Tv=new WeakSet;class Hv{isEnabledFor(t,e){let o=t;t===Lh&&(o="current");const n=this.options.disabledCellSelection;if("function"!=typeof n)return!0;let i=n(e.row,e.col);return"string"==typeof i&&(i=[i]),!i||Array.isArray(i)&&!i.includes(o)}useLayerLevel(t=0){return this.layerLevel=t,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return xv(this,Tv,Iv).call(this,this.layeredAreas,yv)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return xv(this,Tv,Iv).call(this,this.areas,Sv)}getAreas(){return[...this.areas.values()]}createRowHeader(){return xv(this,Tv,Iv).call(this,this.rowHeaders,Rv)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return xv(this,Tv,Iv).call(this,this.columnHeaders,Rv)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return xv(this,Tv,Iv).call(this,this.activeRowHeaders,Cv)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return xv(this,Tv,Iv).call(this,this.activeColumnHeaders,Cv)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return xv(this,Tv,Iv).call(this,this.activeCornerHeaders,Cv)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return xv(this,Tv,Iv).call(this,this.rowHighlights,Ev)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return xv(this,Tv,Iv).call(this,this.columnHighlights,kv)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(t){this.customSelections.push(function({border:t,visualCellRange:e,...o}){return new vv({...t,...o,selectionType:zh},e)}({...this.options,...t}))}updateHighlightClassNames(t){"rowClassName"in t&&(this.options.rowClassName=t.rowClassName,$(this.rowHighlights.values(),e=>{e.settings.className=t.rowClassName})),"columnClassName"in t&&(this.options.columnClassName=t.columnClassName,$(this.columnHighlights.values(),e=>{e.settings.className=t.columnClassName})),"headerClassName"in t&&(this.options.headerClassName=t.headerClassName,$(this.rowHeaders.values(),e=>{e.settings.className=t.headerClassName}),$(this.columnHeaders.values(),e=>{e.settings.className=t.headerClassName})),"activeHeaderClassName"in t&&(this.options.activeHeaderClassName=t.activeHeaderClassName,$(this.activeRowHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}),$(this.activeColumnHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}),$(this.activeCornerHeaders.values(),e=>{e.settings.className=t.activeHeaderClassName}))}clear(){this.focus.clear(),this.fill.clear(),this.areas.forEach(t=>t.clear()),this.layeredAreas.forEach(t=>t.clear()),this.rowHeaders.forEach(t=>t.clear()),this.columnHeaders.forEach(t=>t.clear()),this.activeRowHeaders.forEach(t=>t.clear()),this.activeColumnHeaders.forEach(t=>t.clear()),this.activeCornerHeaders.forEach(t=>t.clear()),this.rowHighlights.forEach(t=>t.clear()),this.columnHighlights.forEach(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){Mv(this,Tv),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,cellMoveEnabled:e,...o}){return new vv({className:"current",headerAttributes:[["aria-selected","true"]],border:{width:2,color:"#4b89ff",cornerVisible:t,moveEnabled:e},...o,selectionType:Lh})}(t),this.fill=function({...t}){return new vv({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:"fill"})}(t)}}function Iv(t,e){const o=this.layerLevel;if(t.has(o))return t.get(o);const n=e({layerLevel:o,...this.options});return t.set(o,n),n}class _v{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((o,n)=>o.includes(t)&&e(o,n))}findAll(t){const e=[];return this.ranges.forEach((o,n)=>{o.isEqual(t)&&e.push({range:o,layer:n})}),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,o)=>!t.includes(o)),this}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}clone(){const t=new _v(this.createCellRange);return t.ranges=this.ranges.map(t=>t.clone()),t}map(t){return this.ranges=this.ranges.map((e,o)=>t(e,o)),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 Av(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Wv(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Ov(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Wv(t,e,"get"))}function Nv(t,e,o){Av(t,e),e.set(t,o)}function Pv(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Wv(t,e,"set"),o),o}function Dv(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Lv(t,e){Av(t,e),e.add(t)}var zv=new WeakMap,Bv=new WeakMap,Vv=new WeakMap,Fv=new WeakSet,$v=new WeakSet,Uv=new WeakSet,jv=new WeakSet,qv=new WeakSet,Gv=new WeakSet,Yv=new WeakSet,Xv=new WeakSet,Kv=new WeakSet;class Zv{setActiveLayerIndex(t){Pv(this,Bv,t)}getCurrentSelection(){return Ov(this,zv).peekByIndex(Ov(this,Bv))}transformStart(t,e,o=!1){Pv(this,Vv,this.calculateOffset());const n=this.tableApi.createCellCoords(t,e);let i=this.getCurrentSelection().highlight;const s=this.tableApi.visualToRenderableCoords(i);let r=0,l=0;if(this.runLocalHooks("beforeTransformStart",n),null!==s.row&&null!==s.col){let{width:t,height:e}=Dv(this,jv,eC).call(this);const{row:s,col:a}=Dv(this,Xv,sC).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??0)+(n.row??0),(a??0)+(n.col??0));if((p.row??0)>=e){const n=Me(o&&c>0&&0===h),i=(p.col??0)+1,s=i>=t,r=this.tableApi.createCellCoords((p.row??0)-e,s?i-t:i);if(this.runLocalHooks("beforeColumnWrap",n,Dv(this,Kv,rC).call(this,r),s),n.value)this.runLocalHooks("insertRowRequire",this.countRenderableRows());else if(g){if(this.shouldSwitchSelectionLayer()&&s&&Ov(this,zv).size()>1){Dv(this,Fv,Qv).call(this);const t=Dv(this,qv,oC).call(this,"forward");null!==t&&r.assign(t)}p.assign(r)}}else if((p.row??0)<0){const o=Me(g),n=(p.col??0)-1,i=n<0,s=this.tableApi.createCellCoords(e+(p.row??0),i?t+n:n);if(this.runLocalHooks("beforeColumnWrap",o,Dv(this,Kv,rC).call(this,s),i),g){if(this.shouldSwitchSelectionLayer()&&i&&Ov(this,zv).size()>1){Dv(this,$v,Jv).call(this);const t=Dv(this,qv,oC).call(this,"backward");null!==t&&s.assign(t)}p.assign(s)}}if(({width:t,height:e}=Dv(this,jv,eC).call(this)),(p.col??0)>=t){const n=Me(o&&d>0),i=(p.row??0)+1,s=i>=e,r=this.tableApi.createCellCoords(s?i-e:i,(p.col??0)-t);if(this.runLocalHooks("beforeRowWrap",n,Dv(this,Kv,rC).call(this,r),s),n.value)this.runLocalHooks("insertColRequire",this.countRenderableColumns());else if(u){if(this.shouldSwitchSelectionLayer()&&s&&Ov(this,zv).size()>1){Dv(this,Fv,Qv).call(this);const t=Dv(this,qv,oC).call(this,"forward");null!==t&&r.assign(t)}p.assign(r)}}else if((p.col??0)<0){const o=Me(u),n=(p.row??0)-1,i=n<0,s=this.tableApi.createCellCoords(i?e+n:n,t+(p.col??0));if(this.runLocalHooks("beforeRowWrap",o,Dv(this,Kv,rC).call(this,s),i),u){if(this.shouldSwitchSelectionLayer()&&i&&Ov(this,zv).size()>1){Dv(this,$v,Jv).call(this);const t=Dv(this,qv,oC).call(this,"backward");null!==t&&s.assign(t)}p.assign(s)}}const{rowDir:f,colDir:m}=Dv(this,Uv,tC).call(this,p);r=f,l=m,i=Dv(this,Kv,rC).call(this,p)}return this.runLocalHooks("afterTransformStart",i,r,l),{selectionLayer:Ov(this,Bv),visualCoords:i}}transformEnd(t,e){Pv(this,Vv,this.calculateOffset());const o=this.tableApi.createCellCoords(t,e),n=this.getCurrentSelection(),i=this.tableApi.visualToRenderableCoords(n.highlight),s=Dv(this,Gv,nC).call(this,n.to.row??0,n.from.row??0),r=Dv(this,Yv,iC).call(this,n.to.col??0,n.from.col??0),l=n.to.clone();let a=0,h=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==i.row&&null!==i.col&&null!==s&&null!==r){const{row:t,col:e}=Dv(this,Xv,sC).call(this,n.highlight),i=this.tableApi.createCellCoords(s+(o.row??0),r+(o.col??0)),c=n.getTopStartCorner(),d=n.getTopEndCorner(),u=n.getBottomEndCorner();if((o.col??0)<0&&r>=(e??0)&&(i.col??0)<(e??0)){const t=(i.col??0)-(e??0),o=Dv(this,Yv,iC).call(this,c.col??0,d.col??0);i.col=(o??0)+t}else if((o.col??0)>0&&r<=(e??0)&&(i.col??0)>(e??0)){const t=Dv(this,Yv,iC).call(this,d.col??0,c.col??0),e=Math.max((i.col??0)-(t??0),1);i.col=(t??0)+e}if((o.row??0)<0&&s>=(t??0)&&(i.row??0)<(t??0)){const e=(i.row??0)-(t??0),o=Dv(this,Gv,nC).call(this,c.row??0,u.row??0);i.row=(o??0)+e}else if((o.row??0)>0&&s<=(t??0)&&(i.row??0)>(t??0)){const t=Dv(this,Gv,nC).call(this,u.row??0,c.row??0),e=Math.max((i.row??0)-(t??0),1);i.row=(t??0)+e}const{rowDir:g,colDir:p}=Dv(this,Uv,tC).call(this,i);a=g,h=p;const f=Dv(this,Kv,rC).call(this,i);0===o.row&&0!==o.col?l.col=f.col:0!==o.row&&0===o.col?l.row=f.row:(l.row=f.row,l.col=f.col)}return this.runLocalHooks("afterTransformEnd",l,a,h),{selectionLayer:Ov(this,Bv),visualCoords:l}}calculateOffset(){ce("`calculateOffset` is not implemented")}countRenderableRows(){ce("`countRenderableRows` is not implemented")}countRenderableColumns(){ce("`countRenderableColumns` is not implemented")}shouldSwitchSelectionLayer(){ce("`shouldSwitchSelectionLayer` is not implemented")}constructor(t,e){Lv(this,Fv),Lv(this,$v),Lv(this,Uv),Lv(this,jv),Lv(this,qv),Lv(this,Gv),Lv(this,Yv),Lv(this,Xv),Lv(this,Kv),Nv(this,zv,{writable:!0,value:void 0}),Nv(this,Bv,{writable:!0,value:void 0}),Nv(this,Vv,{writable:!0,value:void 0}),Pv(this,Bv,0),Pv(this,Vv,{x:0,y:0}),Pv(this,zv,t),this.tableApi=e}}function Qv(){const t=Ov(this,Bv)+1;this.setActiveLayerIndex(t>=Ov(this,zv).size()?0:t),Pv(this,Vv,this.calculateOffset())}function Jv(){const t=Ov(this,Bv)-1;this.setActiveLayerIndex(t<0?Ov(this,zv).size()-1:t),Pv(this,Vv,this.calculateOffset())}function tC(t){const{width:e,height:o}=Dv(this,jv,eC).call(this);let n=0,i=0;return(t.row??0)<0?(n=-1,t.row=0):(t.row??0)>0&&(t.row??0)>=o&&(n=1,t.row=o-1),(t.col??0)<0?(i=-1,t.col=0):(t.col??0)>0&&(t.col??0)>=e&&(i=1,t.col=e-1),{rowDir:n,colDir:i}}function eC(){return{width:Ov(this,Vv).x+this.countRenderableColumns(),height:Ov(this,Vv).y+this.countRenderableRows()}}function oC(t){if(!["forward","backward"].includes(t))return null;const e=this.getCurrentSelection().getTopStartCorner(),o=this.getCurrentSelection().getBottomEndCorner(),[n,i,s,r]="forward"===t?[e.row,o.row,e.col,o.col]:[o.row,e.row,o.col,e.col],l=Dv(this,Gv,nC).call(this,n??0,i??0),a=Dv(this,Yv,iC).call(this,s??0,r??0);return null===l||null===a?null:this.tableApi.createCellCoords(l,a)}function nC(t,e){const o=this.tableApi.findFirstNonHiddenRenderableRow(t,e);return null===o?null:Ov(this,Vv).y+o}function iC(t,e){const o=this.tableApi.findFirstNonHiddenRenderableColumn(t,e);return null===o?null:Ov(this,Vv).x+o}function sC(t){const{row:e,col:o}=this.tableApi.visualToRenderableCoords(t);return null!==e&&null!==o||ce("Renderable coords are not visible."),this.tableApi.createCellCoords(Ov(this,Vv).y+e,Ov(this,Vv).x+o)}function rC(t){const e=t.clone();return e.col=(t.col??0)-Ov(this,Vv).x,e.row=(t.row??0)-Ov(this,Vv).y,this.tableApi.renderableToVisualCoords(e)}be(Zv,Wh);class lC extends Zv{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 aC extends Zv{calculateOffset(){const t=this.getCurrentSelection(),{row:e,col:o}=t.getOuterTopStartCorner(),n=e??0,i=o??0,s=this.tableApi.countRenderableColumnsInRange(0,i-1),r=this.tableApi.countRenderableRowsInRange(0,n-1),l=t.highlight.isHeader(),a=l?Math.abs(i):0,h=l?Math.abs(n):0;return{x:i<0?a:-s,y:n<0?h:-r}}countRenderableRows(){const t=this.getCurrentSelection();return this.tableApi.countRenderableRowsInRange(0,t.getOuterBottomEndCorner().row??0)}countRenderableColumns(){const t=this.getCurrentSelection();return this.tableApi.countRenderableColumnsInRange(0,t.getOuterBottomEndCorner().col??0)}transformEnd(t,e){ce("`transformEnd` is not valid for focus selection use `transformStart` instead")}shouldSwitchSelectionLayer(){return!0}}const hC=[3,2],cC=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],dC=Symbol("root"),uC=Symbol("child");function gC(t,e=dC){e!==dC&&e!==uC&&ce("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(t),n=e===dC;let i=0;if(o){const e=t[0];if(0===t.length)i=1;else if(n&&e instanceof Sr)i=3;else if(n&&Array.isArray(e))i=gC(e,uC);else if(t.length>=2&&t.length<=4){const e=!t.some((t,e)=>!cC[e].includes(typeof t));e&&(i=2)}}return i}function pC(t,{createCellCoords:e,createCellRange:o,keepDirection:n=!1,propToCol:i}={}){return hC.includes(t)||ce("Unsupported selection ranges schema type was provided."),function(s){const r=3===t,l=s;let a=r?s.from.row:l[0],h=r?s.from.col:l[1],c=r?s.to.row:l[2],d=r?s.to.col:l[3];"function"==typeof i&&("string"==typeof h&&(h=i(h)),"string"==typeof d&&(d=i(d))),Wt(c)&&(c=a),Wt(d)&&(d=h);let u=h,g=d;if(!n){const t=a,e=c,o=u,n=g;a=Math.min(t??0,e??0),u=Math.min(o??0,n??0),c=Math.max(t??0,e??0),g=Math.max(o??0,n??0)}const p=r?s.highlight.clone():e(a??0,u??0),f=e(a??0,u??0),m=e(c??0,g??0);return o(p,f,m)}}function fC(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mC(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function wC(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,mC(t,e,"get"))}function bC(t,e,o){fC(t,e),e.set(t,o)}function vC(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,mC(t,e,"set"),o),o}function CC(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function yC(t,e){fC(t,e),e.add(t)}function SC(t){return"object"==typeof t&&null!==t&&Number.isInteger(t.row)&&Number.isInteger(t.col)}function kC(t,e,o){if(!o||e<0)return e;const n=t.getNearestNotHiddenIndex(e,1,!0);return null===n?e:n}var RC=new WeakMap,EC=new WeakMap,xC=new WeakMap,MC=new WeakMap,TC=new WeakMap,HC=new WeakMap,IC=new WeakMap,_C=new WeakMap,AC=new WeakSet,WC=new WeakSet;class OC{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(wC(this,IC))}getActiveSelectionLayerIndex(){return wC(this,IC)}setActiveSelectionLayerIndex(t){vC(this,IC,t)}markSource(t){vC(this,TC,t)}markEndSource(){vC(this,TC,"unknown")}getSelectionSource(){return wC(this,TC)}setExpectedLayers(t){vC(this,HC,t)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,vC(this,HC,-1)}isInProgress(){return this.inProgress}setRangeStart(t,e,o=!1,n=t){const i="multiple"===this.settings.selectionMode,s=Wt(e)?this.tableProps.getShortcutManager().isCtrlPressed():e,r=t.clone();vC(this,MC,!1),vC(this,xC,!1),this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),r),(!i||i&&!s&&Wt(e))&&(this.selectedRange.clear(),this.highlight.getAreas().forEach(t=>t.clear()),this.highlight.getLayeredAreas().forEach(t=>t.clear()),this.highlight.getRowHeaders().forEach(t=>t.clear()),this.highlight.getColumnHeaders().forEach(t=>t.clear()),this.highlight.getActiveRowHeaders().forEach(t=>t.clear()),this.highlight.getActiveColumnHeaders().forEach(t=>t.clear()),this.highlight.getActiveCornerHeaders().forEach(t=>t.clear()),this.highlight.getRowHighlights().forEach(t=>t.clear()),this.highlight.getColumnHighlights().forEach(t=>t.clear())),this.selectedRange.add(r).current()?.setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(t)}setRangeStartOnly(t,e,o=t){this.setRangeStart(t,e,!0,o)}setRangeEnd(t,e=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e);const o=t.clone(),n=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.getActiveSelectedRange()?.clone().setTo(t).isSingleHeader();if((n>0||i>0)&&(0===n&&(o.col??0)<0&&!s||0===i&&(o.row??0)<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",o),this.begin();const r=this.getActiveSelectedRange();if(!r)return;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(),n=this.isMultiple();r.setTo(o),n&&(t!==r.getHorizontalDirection()||1===r.getWidth()&&!r.includes(r.highlight))&&r.from.assign({col:r.highlight.col??void 0}),n&&(e!==r.getVerticalDirection()||1===r.getHeight()&&!r.includes(r.highlight))&&r.from.assign({row:r.highlight.row??void 0})}n>0&&i>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.getActiveSelectedRange()?.highlight??r.highlight,e),this.applyAndCommit(this.getActiveSelectedRange()??r,e);const l=-1===wC(this,HC)||this.selectedRange.size()===wC(this,HC);this.runLocalHooks("afterSetRangeEnd",t,l)}applyAndCommit(t=this.getActiveSelectedRange(),e=this.getLayerLevel()){if(!t)return;const o=this.tableProps.countRows(),n=this.tableProps.countCols();this.highlight.useLayerLevel(e);const i=this.highlight.createArea(),s=this.highlight.createLayeredArea(),r=this.highlight.createRowHeader(),l=this.highlight.createColumnHeader(),a=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(),l?.clear(),a?.clear(),h?.clear(),c?.clear(),d?.clear(),u?.clear(),this.highlight.isEnabledFor(Dh,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);t&&(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))}this.highlight.isEnabledFor(Ph,t.highlight)&&CC(this,AC,NC).call(this,t,o,n,r,l,a,h,c,d,u)}setRangeFocus(t,e=this.getLayerLevel()){if(this.selectedRange.isEmpty())return;this.setActiveSelectionLayerIndex(e),wC(this,RC).setActiveLayerIndex(e),wC(this,EC).setActiveLayerIndex(e);const o=this.getActiveSelectedRange();if(this.inProgress||this.runLocalHooks("beforeSetFocus",t),!o)return;const n=this.highlight.getFocus();n.clear(),o.setHighlight(t),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(Lh,o.highlight)&&n.add(o.highlight).commit().syncWith(o),this.inProgress||(vC(this,xC,!0),this.runLocalHooks("afterSetFocus",o.highlight))}transformStart(t,e,o=!1){if(!this.isSelected())return;const{visualCoords:n}=wC(this,RC).transformStart(t,e,o);this.setRangeStart(n,void 0,!1,n)}transformEnd(t,e){if(!this.isSelected())return;const{visualCoords:o,selectionLayer:n}=wC(this,RC).transformEnd(t,e);this.setRangeEnd(o,n)}transformFocus(t,e){if(!this.isSelected())return;const{selectionLayer:o,visualCoords:n}=wC(this,EC).transformStart(t,e);this.setRangeFocus(n.normalize(),o)}shiftRows(t,e){if(!this.isSelected())return;const o=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(o&&(this.isSelectedByColumnHeader()||(o.getOuterTopStartCorner().row??0)>=t)){const{from:n,to:i,highlight:s}=o,r=this.tableProps.countRows(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),h=a?-1:0,c=a?0:e,d=n.row===i.row,u=t=>kC(this.tableProps.rowIndexMapper,t,d);this.getSelectedRange().pop();const g=this.tableProps.createCellCoords(u(ds((n.row??0)+c,h,r-1)),n.col??0),p=this.tableProps.createCellCoords(u(ds((i.row??0)+e,h,r-1)),i.col??0);this.markSource("shift"),(s.row??0)>=t?this.setRangeStartOnly(g,!0,this.tableProps.createCellCoords(u(ds((s.row??0)+e,0,r-1)),s.col??0)):this.setRangeStartOnly(g,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.markEndSource()}}shiftColumns(t,e){if(!this.isSelected())return;const o=this.getActiveSelectedRange();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(o&&(this.isSelectedByRowHeader()||(o.getOuterTopStartCorner().col??0)>=t)){const{from:n,to:i,highlight:s}=o,r=this.tableProps.countCols(),l=this.isSelectedByRowHeader(),a=this.isSelectedByColumnHeader(),h=l?-1:0,c=l?0:e,d=n.col===i.col,u=t=>kC(this.tableProps.columnIndexMapper,t,d);this.getSelectedRange().pop();const g=this.tableProps.createCellCoords(n.row??0,u(ds((n.col??0)+c,h,r-1))),p=this.tableProps.createCellCoords(i.row??0,u(ds((i.col??0)+e,h,r-1)));this.markSource("shift"),(s.col??0)>=t?this.setRangeStartOnly(g,!0,this.tableProps.createCellCoords(s.row??0,u(ds((s.col??0)+e,0,r-1)))):this.setRangeStartOnly(g,!0),l&&this.selectedByRowHeader.add(this.getLayerLevel()),a&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(t=this.getActiveSelectedRange()){if(!this.isSelected()||!t)return!1;const e=Me(!t.isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isRangeMovable(){const t=this.getActiveSelectedRange();return CC(this,WC,PC).call(this)&&!!t&&!t.isSingle()}isSingleCellMovable(){const t=this.getActiveSelectedRange();return CC(this,WC,PC).call(this)&&!!t&&t.isSingle()}isFocusSelectionChanged(){return this.isSelected()&&wC(this,xC)}isSelectedByRowHeader(t=this.getLayerLevel()){return!this.isSelectedByCorner()&&(-1===t?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(t))}isEntireRowSelected(t=this.getLayerLevel()){const e=t=>{const{col:e}=t.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(o>0&&(e??0)<0||0===o)&&t.getWidth()===n};if(-1===t)return Array.from(this.selectedRange).some(t=>e(t));const o=this.selectedRange.peekByIndex(t);return!!o&&e(o)}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(),o=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(o>0&&(e??0)<0||0===o)&&t.getHeight()===n};if(-1===t)return Array.from(this.selectedRange).some(t=>e(t));const o=this.selectedRange.peekByIndex(t);return!!o&&e(o)}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)}getLayerContaining(t){if(this.selectedRange.isEmpty())return null;for(let e=this.selectedRange.size()-1;e>=0;e--)if(this.selectedRange.peekByIndex(e)?.includes(t))return e;return null}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())}isAdjustHandlesVisibleFor(t){return!(!0!==this.settings.selectionHandles||this.tableProps.isEditorOpened()||!this.tableProps.isPluginEnabled("selectionHandles"))&&("single"!==this.settings.selectionMode&&(wC(this,_C)===t&&(!this.isEntireRowSelected(t)&&!this.isEntireColumnSelected(t))))}getHandlesHoveredLayer(){return wC(this,_C)}setHandlesHoveredLayer(t){wC(this,_C)!==t&&(vC(this,_C,t),this.refresh())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(t=!1,e=!1,o={focusPosition:!1,disableHeadersHighlight:!1}){const n=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),r=this.tableProps.countColHeaders(),l=e?-r:0,a=t?-s:0;if(0===l&&0===a&&(0===n||0===i))return;let h=this.getActiveSelectedRange()?.highlight;const{focusPosition:c,disableHeadersHighlight:d}=o;SC(c)&&(h=this.tableProps.createCellCoords(ds(c.row,l,n-1),ds(c.col,a,i-1)));const u=this.tableProps.createCellCoords(l,a),g=this.tableProps.createCellCoords(n-1,i-1);this.clear(),this.runLocalHooks("beforeSelectAll",u,g,h),this.setRangeStartOnly(u,void 0,h),vC(this,MC,d??!1),a<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(g),this.runLocalHooks("afterSelectAll",u,g,h),this.finish()}selectCells(t){const e=gC(t);if(1===e)return!1;0===e&&ce(X`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
|
50
|
+
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
|
|
51
|
+
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=pC(e,{createCellCoords:(...t)=>this.tableProps.createCellCoords(...t),createCellRange:(...t)=>this.tableProps.createCellRange(...t),propToCol:t=>this.tableProps.propToCol(t),keepDirection:!0}),n=this.settings.navigableHeaders,i={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:n?this.tableProps.countRowHeaders():0,countColHeaders:n?this.tableProps.countColHeaders():0},s=!t.some(t=>{const e=o(t),n=e.isValid(i);return!(n&&!e.containsHeaders()||n&&e.containsHeaders()&&e.isSingleHeader())});return s&&(this.clear(),this.setExpectedLayers(t.length),t.forEach(t=>{const{from:e,to:n}=o(t);this.setRangeStartOnly(e.clone(),!1),this.setRangeEnd(n.clone())}),this.finish()),s}selectColumns(t,e=t,o=0){const n="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(),l=this.tableProps.countColHeaders(),a=0===l?0:-l,h=this.tableProps.createCellCoords(a,n),c=this.tableProps.createCellCoords(s-1,i),d=this.tableProps.createCellRange(h,h,c).isValid({countRows:s,countCols:r,countRowHeaders:0,countColHeaders:l});if(d){let t=0,e=0;SC(o)?(t=ds(o.row??0,a,s-1),e=ds(o.col??0,Math.min(n,i),Math.max(n,i))):(t=ds("number"==typeof o?o:0,a,s-1),e=n);const r=this.tableProps.createCellCoords(t,e),h=0===l?0:ds(r.row??0,a,-1),c=s-1,d=this.tableProps.createCellCoords(h,n),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),"mouse"!==this.getSelectionSource()&&this.finish()}return d}selectRows(t,e=t,o=0){const n=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),r=0===s?0:-s,l=this.tableProps.createCellCoords(t,r),a=this.tableProps.createCellCoords(e,i-1),h=this.tableProps.createCellRange(l,l,a).isValid({countRows:n,countCols:i,countRowHeaders:s,countColHeaders:0});if(h){let n=0,l=0;SC(o)?(n=ds(o.row??0,Math.min(t,e),Math.max(t,e)),l=ds(o.col??0,r,i-1)):(n=t,l=ds("number"==typeof o?o:0,r,i-1));const a=this.tableProps.createCellCoords(n,l),h=0===s?0:ds(a.col??0,r,-1),c=i-1,d=this.tableProps.createCellCoords(t,h),u=this.tableProps.createCellCoords(e,c);this.runLocalHooks("beforeSelectRows",d,u,a),this.setRangeStartOnly(d,void 0,a),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",d,u,a),"mouse"!==this.getSelectionSource()&&this.finish()}return h}importSelection({ranges:t,activeRange:e,activeSelectionLayer:o,selectedByRowHeader:n,selectedByColumnHeader:i,disableHeadersHighlight:s}){0!==t.length&&(this.selectedRange.clear(),this.highlight.clear(),this.inProgress=!1,vC(this,MC,s),this.selectedByRowHeader=new Set(n),this.selectedByColumnHeader=new Set(i),this.setActiveSelectionLayerIndex(0),t.forEach((t,e)=>{this.selectedRange.push(t),this.applyAndCommit(t,e)}),this.setRangeFocus(e.highlight,o),vC(this,MC,!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:wC(this,MC)}}refresh(){if(!this.isSelected())return;const t=this.tableProps.countRows(),e=this.tableProps.countCols();if(0===t||0===e)return void this.deselect();const o=this.selectedRange.ranges.map(t=>t.clone());"unknown"===this.getSelectionSource()&&this.markSource("refresh");const n=new Set(this.selectedByRowHeader),i=new Set(this.selectedByColumnHeader);this.clear(),this.setExpectedLayers(o.length),o.forEach(o=>{const{from:n,to:i,highlight:s}=o,r=t-1,l=e-1;s.assign({row:ds(s.row??0,this.settings.navigableHeaders?-1/0:0,r),col:ds(s.col??0,this.settings.navigableHeaders?-1/0:0,l)}),n.assign({row:ds(n.row??0,-1/0,r),col:ds(n.col??0,-1/0,l)}),i.assign({row:ds(i.row??0,-1/0,r),col:ds(i.col??0,-1/0,l)}),this.setRangeStartOnly(n,!0,s),this.setRangeEnd(i)}),this.selectedByRowHeader=n,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();e&&this.highlight.isEnabledFor(Lh,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(),o=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),s=this.highlight.createActiveRowHeader(),r=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();e?.commit(),o?.commit(),n?.commit(),i?.commit(),s?.commit(),r?.commit(),l?.commit(),a?.commit(),h?.commit()}this.highlight.useLayerLevel(t)}constructor(t,e){yC(this,AC),yC(this,WC),bC(this,RC,{writable:!0,value:void 0}),bC(this,EC,{writable:!0,value:void 0}),bC(this,xC,{writable:!0,value:void 0}),bC(this,MC,{writable:!0,value:void 0}),bC(this,TC,{writable:!0,value:void 0}),bC(this,HC,{writable:!0,value:void 0}),bC(this,IC,{writable:!0,value:void 0}),bC(this,_C,{writable:!0,value:void 0}),this.inProgress=!1,this.selectedRange=new _v((t,e,o)=>this.tableProps.createCellRange(t,e,o)),this.selectedByRowHeader=new Set,this.selectedByColumnHeader=new Set,vC(this,xC,!1),vC(this,MC,!1),vC(this,TC,"unknown"),vC(this,HC,-1),vC(this,IC,0),vC(this,_C,null),this.settings=t,this.tableProps=e,this.highlight=new Hv({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:()=>this.isCellCornerVisible(),areaCornerVisible:t=>this.isAreaCornerVisible(t),adjustHandlesVisible:t=>this.isAdjustHandlesVisibleFor(t),moveEnabled:()=>this.isRangeMovable(),cellMoveEnabled:()=>this.isSingleCellMovable(),visualToRenderableCoords:t=>this.tableProps.visualToRenderableCoords(t),renderableToVisualCoords:t=>this.tableProps.renderableToVisualCoords(t),createCellCoords:(t,e)=>this.tableProps.createCellCoords(t,e),createCellRange:(t,e,o)=>this.tableProps.createCellRange(t,e,o)}),vC(this,RC,new lC(this.selectedRange,{...this.tableProps,navigableHeaders:()=>!!t.navigableHeaders,fixedRowsBottom:()=>Number(t.fixedRowsBottom),minSpareRows:()=>Number(t.minSpareRows),minSpareCols:()=>Number(t.minSpareCols),autoWrapRow:()=>!!t.autoWrapRow,autoWrapCol:()=>!!t.autoWrapCol})),vC(this,EC,new aC(this.selectedRange,{...this.tableProps,navigableHeaders:()=>!!t.navigableHeaders,fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),wC(this,RC).addLocalHook("beforeTransformStart",(...t)=>this.runLocalHooks("beforeModifyTransformStart",...t)),wC(this,RC).addLocalHook("afterTransformStart",(...t)=>this.runLocalHooks("afterModifyTransformStart",...t)),wC(this,RC).addLocalHook("beforeTransformEnd",(...t)=>this.runLocalHooks("beforeModifyTransformEnd",...t)),wC(this,RC).addLocalHook("afterTransformEnd",(...t)=>this.runLocalHooks("afterModifyTransformEnd",...t)),wC(this,RC).addLocalHook("insertRowRequire",(...t)=>this.runLocalHooks("insertRowRequire",...t)),wC(this,RC).addLocalHook("insertColRequire",(...t)=>this.runLocalHooks("insertColRequire",...t)),wC(this,RC).addLocalHook("beforeRowWrap",(...t)=>this.runLocalHooks("beforeRowWrap",...t)),wC(this,RC).addLocalHook("beforeColumnWrap",(...t)=>this.runLocalHooks("beforeColumnWrap",...t)),wC(this,EC).addLocalHook("beforeTransformStart",(...t)=>this.runLocalHooks("beforeModifyTransformFocus",...t)),wC(this,EC).addLocalHook("afterTransformStart",(...t)=>this.runLocalHooks("afterModifyTransformFocus",...t))}}function NC(t,e,o,n,i,s,r,l,a,h){if(!t.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(t.from.row??0,0),-1),o=this.tableProps.createCellCoords(t.to.row??0,-1),s=this.tableProps.createCellCoords(-1,Math.max(t.from.col??0,0)),r=this.tableProps.createCellCoords(-1,t.to.col??0);"single"===this.settings.selectionMode?(n?.add(e).commit(),i?.add(s).commit(),a?.add(e).commit(),h?.add(s).commit()):(n?.add(e).add(o).commit(),i?.add(s).add(r).commit(),a?.add(e).add(o).commit(),h?.add(s).add(r).commit())}const c=!wC(this,MC)&&this.isEntireRowSelected()&&(o>0&&o===t.getWidth()||0===o&&this.isSelectedByRowHeader()),d=!wC(this,MC)&&this.isEntireColumnSelected()&&(e>0&&e===t.getHeight()||0===e&&this.isSelectedByColumnHeader());c&&s?.add(this.tableProps.createCellCoords(Math.max(t.from.row??0,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(t.to.row??0,0),-1)).commit(),d&&r?.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(t.from.col??0,0))).add(this.tableProps.createCellCoords(-1,Math.max(t.to.col??0,0))).commit(),c&&d&&l?.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}function PC(){return!(!0!==this.settings.moveCells||this.settings.disableVisualSelection||this.tableProps.isEditorOpened()||!this.tableProps.isPluginEnabled("moveCells"))&&function({rangeCount:t,isEntireRow:e,isEntireColumn:o,isHeader:n}){return 1===t&&!e&&!o&&!n}({rangeCount:this.getSelectedRange().size(),isEntireRow:this.isEntireRowSelected(),isEntireColumn:this.isEntireColumnSelected(),isHeader:this.isSelectedByRowHeader()||this.isSelectedByColumnHeader()})}be(OC,Wh);const DC=/^(\r\n|\n\r|\r|\n)/,LC=/^[^\t\r\n]+/,zC=/^\t/;function BC(t){let e=0;for(;e<t.length;){if('"'===t[e]){if('"'===t[e+1]){e+=2;continue}const o=t[e+1];if(void 0===o||"\t"===o||"\r"===o||"\n"===o)return e}e+=1}return-1}function VC(t){let e,o,n,i,s,r="";for(e=0,o=t.length;e<o;e+=1){for(i=t[e].length,n=0;n<i;n+=1)n>0&&(r+="\t"),s=t[e][n],"string"==typeof s?s.indexOf("\n")>-1?r+=`"${s.replaceAll('"','""')}"`:r+=s:r+=null==s?"":s;e!==o-1&&(r+="\n")}return r}function FC(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function $C(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 UC=new WeakSet,jC=new WeakSet,qC=new WeakSet,GC=new WeakSet;class YC{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}createMap(){const t=this.getSchema();void 0===t&&ce("trying to create `columns` definition but you didn't provide `schema` nor `data`");const e=this.tableMeta.columns;this.colToPropCache=[],this.propToColCache=new Map,e?FC(this,UC,XC).call(this,e,t):this.recursiveDuckColumns(t)}countFirstRowKeys(){return hf(this.dataSource??[])}recursiveDuckColumns(t,e,o){let n=e??0;const i=o??"";let s;return"object"!=typeof t||null===t||Array.isArray(t)||ke(t,(t,e)=>{null===t?(s=i+e,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):"object"==typeof t&&null!==t&&(n=this.recursiveDuckColumns(t,n,`${e}.`))}),n}colToProp(t){if(!1===Number.isInteger(t))return t;const e=this.hot.toPhysicalColumn(t);return null===e?t:this.colToPropCache&&At(this.colToPropCache[e])?this.colToPropCache[e]:e}propToCol(t){const e=this.propToColCache.get(t);if(void 0!==e)return this.hot.toVisualColumn(e);if("number"!=typeof t)return t;const o=this.hot.toVisualColumn(t);return null!==o?o:t}getSchema(){const t=this.tableMeta.dataSchema;return t?"function"==typeof t?t():t:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?de(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(t,e=1,{source:o,mode:n="above"}={}){const i=this.hot.countSourceRows();let s=i,r=0,l=t;("number"!=typeof l||l>=i)&&(l=i),l<this.hot.countRows()&&(s=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,e,o)||null===s)return{delta:0};const a=this.tableMeta.maxRows,h=this.getSchema().length,c=[];for(;r<e&&i+r<(a??1/0);){let t=null;if("array"===this.hot.dataType)this.tableMeta.dataSchema?t=pe(this.getSchema()):(t=[],as(h-1,()=>t.push(null)));else if("function"===this.hot.dataType){const e=this.tableMeta.dataSchema;"function"!=typeof e&&ce("`dataSchema` must be a function when `dataType` is `function`"),t=e(l+r)}else t={},ge(t,this.getSchema());c.push(t),r+=1}this.hot.rowIndexMapper.insertIndexes(l,r),"below"===n&&(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"!==o&&this.metaManager.createRow(s,e)),this.hot.runHooks("afterCreateRow",d,r,o),{delta:r,startPhysicalIndex:s}}createCol(t,e=1,{source:o,mode:n="start"}={}){this.hot.isColumnModificationAllowed()||ce("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(),l=this.hot.countCols(),a=this.hot.countSourceRows(),h="number"==typeof t&&t<=r?t:l;if(!1===this.hot.runHooks("beforeCreateCol",h,e,o))return{delta:0};const c=h<l?this.hot.toPhysicalColumn(h):r,d="end"===n?Math.min(c+1,r):c,u=Math.max(0,Math.min(e,(s??1/0)-l));return FC(this,jC,KC).call(this,i,d,h,l,a,u),u>0&&(null==t?this.metaManager.createColumn(null,u):"auto"!==o&&this.metaManager.createColumn(d,e)),this.hot.columnIndexMapper.insertIndexes(h,u,n),this.hot.runHooks("afterCreateCol",this.hot.toVisualColumn(d),u,o),this.refreshDuckSchema(),{delta:u,startPhysicalIndex:d}}removeRow(t,e=1,o){let n=Number.isInteger(t)?t:-e;const i=this.visualRowsToPhysical(n,e),s=this.hot.countRows();n=(s+n)%s;if(!1===this.hot.runHooks("beforeRemoveRow",n,i.length,i,o))return!1;const r=i.length;if(this.filterData(n,r,i),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const t=At(this.tableMeta.columns)||At(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||t||this.hot.columnIndexMapper.setIndexesSequence([])}const l=i.slice(0).sort((t,e)=>e-t);return FC(this,GC,QC).call(this,l,(t,e)=>{this.metaManager.removeRow(t,e)}),this.hot.runHooks("afterRemoveRow",n,r,i,o),!0}removeCol(t,e=1,o){("object"===this.hot.dataType||this.tableMeta.columns)&&ce("cannot remove column with object data source or columns option specified");let n="number"!=typeof t?-e:t;n=(this.hot.countCols()+n)%this.hot.countCols();const i=this.visualColumnsToPhysical(n,e),s=i.slice(0).sort((t,e)=>e-t);if(!1===this.hot.runHooks("beforeRemoveCol",n,e,i,o))return!1;let r=!0;const l=s.length,a=this.dataSource??[];for(let t=0;t<l;t++)r&&i[0]!==i[t]-t&&(r=!1);return FC(this,qC,ZC).call(this,a,r,i,s,e),n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,e,i,o),this.refreshDuckSchema(),!0}spliceCol(t,e,o,...n){const i=this.hot.getDataAtCol(t),s=i.slice(e,e+o);L(n,i.slice(e+o));let r=0;for(;r<o;)n.push(null),r+=1;return function(t){const e=t.length;let o=0;for(;o<e;)t[o]=[t[o]],o+=1}(n),this.hot.populateFromArray(e,t,n,void 0,void 0,"spliceCol"),s}spliceRow(t,e,o,...n){const i=this.hot.getSourceDataAtRow(t),s=i.slice(e,e+o);L(n,i.slice(e+o));let r=0;for(;r<o;)n.push(null),r+=1;return this.hot.populateFromArray(t,e,[n],void 0,void 0,"spliceRow"),s}spliceData(t,e,o){if(!1!==this.hot.runHooks("beforeDataSplice",t,e,o)){const e=[...this.dataSource.slice(0,t),...o,...this.dataSource.slice(t)];this.dataSource.length=0,e.forEach(t=>this.dataSource.push(t))}}filterData(t,e,o){const n=this.hot.runHooks("filterData",t,e,o);Array.isArray(n)?(this.dataSource.length=0,n.forEach(t=>{this.dataSource.push(t)})):U(this.dataSource,new Set(o))}get(t,e){const o=this.hot.toPhysicalRow(t);let n=this.dataSource[o];const i=this.hot.runHooks("modifyRowData",o);n="number"!=typeof i?i:n;const{dataDotNotation:s}=this.hot.getSettings();let r=null;if(n&&Te(n,e))r=n[e];else if(s&&"string"==typeof e&&e.indexOf(".")>-1){let t=n;if(!t)return null;const o=e.split(".");for(let e=0,n=o.length;e<n;e++)if(t=t[o[e]],void 0===t)return null;r=t}else"function"==typeof e&&(r=e(this.dataSource.slice(o,o+1)[0]));const l=this.propToCol(e),a="number"==typeof l?this.hot.toPhysicalColumn(l):null;if("number"==typeof l&&gs(o)&&gs(a)&&(r=Si(r,this.metaManager.getCellMetaUncached(o,a,{visualRow:t,visualColumn:l}))),this.hot.hasHook("modifyData")){const e=Me(r);this.hot.runHooks("modifyData",t,l,e,"get"),e.isTouched()&&(r=e.value)}return r}getCopyable(t,e){const o=this.propToCol(e);return"number"==typeof o&&this.hot.getCellMetaTransient(t,o).copyable?this.get(t,e):""}set(t,e,o){const n=this.hot.toPhysicalRow(t);let i=o,s=this.dataSource[n];const r=this.hot.runHooks("modifyRowData",n);if(s="number"!=typeof r?r:s,this.hot.hasHook("modifyData")){const o=Me(i);this.hot.runHooks("modifyData",t,this.propToCol(e),o,"set"),o.isTouched()&&(i=o.value)}const{dataDotNotation:l}=this.hot.getSettings();if(s&&Te(s,e))s[e]=i;else if(l&&"string"==typeof e&&e.indexOf(".")>-1){let t,o=s,n=0;const r=e.split(".");for(n=0,t=r.length-1;n<t;n++){if("__proto__"===r[n]||"constructor"===r[n]||"prototype"===r[n])return;void 0===o[r[n]]&&(o[r[n]]={}),o=o[r[n]]}o[r[n]]=i}else if("function"==typeof e)e(this.dataSource.slice(n,n+1)[0],i);else{if("__proto__"===e||"constructor"===e||"prototype"===e)return;s[e]=i}}visualRowsToPhysical(t,e){const o=this.hot.countRows(),n=[];let i,s=(o+t)%o,r=e;for(;s<o&&r;)i=this.hot.toPhysicalRow(s),n.push(i),r-=1,s+=1;return n}visualColumnsToPhysical(t,e){const o=this.hot.countCols(),n=[];let i=(o+t)%o,s=e;for(;i<o&&s;){const t=this.hot.toPhysicalColumn(i);n.push(t),s-=1,i+=1}return n}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||0===t?0:t||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,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,YC.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(t,e,o){const n=[];let i,s,r;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const h=o===YC.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max((l??1/0)-1,0),Math.max(t.row,e.row)),d=Math.min(Math.max((a??1/0)-1,0),Math.max(t.col,e.col));for(i=Math.min(t.row,e.row);i<=c;i++){r=[];const o=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(t.col,e.col);s<=d&&null!==o;s++)r.push(h.call(this,i,this.colToProp(s)));null!==o&&n.push(r)}return n}getText(t,e){return VC(this.getRange(t,e,YC.DESTINATION_RENDERER))}getCopyableText(t,e){return VC(this.getRange(t,e,YC.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,o){$C(this,UC),$C(this,jC),$C(this,qC),$C(this,GC),this.hot=t,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=e,this.colToPropCache=[],this.propToColCache=new Map,this.refreshDuckSchema(),this.createMap()}}function XC(t,e){let o=0,n=0;const i="function"==typeof t;if(i){const t=xe(e);o=t>0?t:this.countFirstRowKeys()}else{const e=this.tableMeta.maxCols;o=Math.min(e??1/0,t.length)}for(let e=0;e<o;e++){const o=i?t(e):t[e];if(Ce(o)){if(void 0!==o.data){const t=i?n:e,s=o.data;this.colToPropCache[t]=s,this.propToColCache.set(s,t)}n+=1}}}function KC(t,e,o,n,i,s){if(s<=0)return;let r=s;"number"==typeof o&&(r=Math.max(0,Math.min(s,o-n+1)));const l=s-r;if(r>0)if(i>0)for(let e=0;e<i;e++){void 0===t[e]&&(t[e]=[]);for(let o=0;o<r;o++)t[e].push(null)}else for(let e=0;e<r;e++)t.push([null]);if(l>0)for(let o=0;o<i;o++)j(t[o],e+r,l,null)}function ZC(t,e,o,n,i){if(e)for(let e=0,n=this.hot.countSourceRows();e<n;e++)t[e].splice(o[0],i),0===e&&this.metaManager.removeColumn(o[0],i);else{const e=new Set(o),i=this.hot.countSourceRows();for(let o=0;o<i;o++)U(t[o],e);i>0&&FC(this,GC,QC).call(this,n,(t,e)=>{this.metaManager.removeColumn(t,e)})}}function QC(t,e){let o=0;for(let n=0;n<t.length;n++){(n+1>=t.length||t[n+1]!==t[n]-1)&&(e(t[n],n-o+1),o=n+1)}}class JC{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?.length?t||this.hot.hasHook("modifySourceData")||this.hot.hasHook("modifyRowData")?this.getByRange(null,null,t):this.data.map(cf):this.data}setData(t){this.data=t}getAtColumn(t){const e=[];return $(this.data,(o,n)=>{const i=this.getAtCell(n,t);e.push(i)}),e}getAtRow(t,e,o,n=!1){const i=void 0===e&&void 0===o,{dataDotNotation:s}=this.hot.getSettings();let r=null,l=null;if(r=this.modifyRowData(t),Array.isArray(r))l=[],i?r.forEach((e,o)=>{l[o]=this.getAtPhysicalCell(t,o,r)}):as(e,o,o=>{l[o-e]=this.getAtPhysicalCell(t,o,r)});else if(Ce(r)||ln(r))if(l=n?[]:{},!i||n){const i=0,a=this.countFirstRowKeys()-1;as(i,a,h=>{const c=this.colToProp(h);if(h>=(e||i)&&h<=(o||a)&&!Number.isInteger(c)){const e=this.getAtPhysicalCell(t,c,r);n?l.push(e):s?null!==l&&Ee(l,c,e):l[c]=e}})}else ke(r,(e,o)=>{const n=this.getAtPhysicalCell(t,o,r);s?null!==l&&Ee(l,o,n):l[o]=n});return l}setAtCell(t,e,o){let n;if("string"==typeof t){const e=Number(t);if(Number.isNaN(e)||!Number.isInteger(e)||e<0)return;n=e}else{if("number"!=typeof t||!Number.isInteger(t)||t<0)return;n=t}if(n>=this.countRows()||"number"==typeof e&&e>=this.countFirstRowKeys())return;if(this.hot.hasHook("modifySourceData")){const t=Me(o);this.hot.runHooks("modifySourceData",n,e,t,"set"),t.isTouched()&&(o=t.value)}const i=this.modifyRowData(n);if(Number.isInteger(e))Array.isArray(i)?i[e]=o:Ce(i)&&Ee(i,String(e),o);else if(Array.isArray(i)){const t=Number(e);!Number.isNaN(t)&&Number.isInteger(t)&&t>=0&&t<this.countFirstRowKeys()&&(i[t]=o)}else Ce(i)&&Ee(i,String(e),o)}getAtPhysicalCell(t,e,o){let n=null;if(o)if("string"==typeof e){const{dataDotNotation:t}=this.hot.getSettings();n=t?Re(o,e):o[e]}else n="function"==typeof e?e(o):o[e];if(this.hot.hasHook("modifySourceData")){const o=Me(n);this.hot.runHooks("modifySourceData",t,e,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(t,e){const o=this.modifyRowData(t);return this.getAtPhysicalCell(t,this.colToProp(e),o)}getByRange(t=null,e=null,o=!1){let n=!1,i=null,s=null,r=null,l=null;null===t||null===e?(n=!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),l=Math.max(t.col,e.col));const a=[];return as(i,r,t=>{a.push(n?this.getAtRow(t,void 0,void 0,o):this.getAtRow(t,s,l,o))}),a}getCopyable(t,e){const o=this.propToCol(e);return"number"==typeof o&&this.hot.getCellMetaTransient(t,o).copyable?this.getAtCell(this.hot.toPhysicalRow(t),o):""}countRows(){if(this.hot.hasHook("modifySourceLength")){const t=this.hot.runHooks("modifySourceLength");if("number"==typeof t&&Number.isInteger(t))return t}return this.data.length}countFirstRowKeys(){return hf(this.data??[])}destroy(){this.data=null,this.hot=null}constructor(t,e=[]){this.dataType="array",this.colToProp=t=>{},this.propToCol=t=>{},this.hot=t,this.data=e}}const{register:ty,getItem:ey,hasItem:oy,getNames:ny,getValues:iy}=oi("cellTypes");function sy(t,e){"string"!=typeof t&&(t=(e=t).CELL_TYPE);const{editor:o,renderer:n,validator:i}=e;o&&vi(t,o),n&&Os(t,n),i&&Bs(t,i),ty(t,e)}function ry(t,e,o=t){const n="string"==typeof e.type?(i=e.type,oy(i)||ce(`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`),ey(i)):e.type;var i;if(t._automaticallyAssignedMetaProps&&ke(e,(e,o)=>{t._automaticallyAssignedMetaProps.delete(o)}),!Ce(n))return;o!==t||t._automaticallyAssignedMetaProps||(t._automaticallyAssignedMetaProps=new Set);const s={};ke(n,(e,n)=>{(function(t,e){return"CELL_TYPE"!==t&&(e._automaticallyAssignedMetaProps?.has(t)||!Te(e,t))})(n,o)&&(s[n]=e,t._automaticallyAssignedMetaProps?.add(n))}),ue(t,s)}function ly(t){return null==t}var ay=()=>({_automaticallyAssignedMetaProps:void 0,_userDefinedMetaProps:void 0,_persistedMetaProps: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,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,customBordersProgressive:!1,data:void 0,dataProvider:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:{year:"numeric",month:"2-digit",day:"2-digit"},timeFormat:{hour:"2-digit",minute:"2-digit"},dateTimeFormat:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},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,hashLength:void 0,hashRevealDelay:void 0,hashSymbol:"*",headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,initialState:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(t){let e,o;const n=!!this.getSettings().dataSchema,i=this.getSchema(),s=this.colToProp(t),r=this.countRows();for(e=0;e<r;e++)if(o=this.getDataAtCell(e,t),!1===Ot(o)){if("object"==typeof o){if(!1===ve(i[s],o))return!1;continue}if(n&&i[s]===o)continue;return!1}return!0},isEmptyRow(t){let e,o;const n=!!this.getSettings().dataSchema,i=this.getSchema(),s=this.countCols();for(e=0;e<s;e++)if(o=this.getDataAtCell(t,e),!1===Ot(o)){const t=this.colToProp(e);if("object"==typeof o){if(!1===ve(i[t],o))return!1;continue}if(n&&i[t]===o)continue;return!1}return!0},label:void 0,language:"en-US",layoutDirection:"inherit",layout:void 0,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,preserveNumericLiteral:!1,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",selectionHandles:!1,moveCells:!1,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,colorScheme:void 0,density: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 hy{getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(t){ue(this.meta,t),ry(this.meta,{...t,type:t.type??this.meta.type},t)}constructor(t){this.metaCtor=class{},this.meta=this.metaCtor.prototype,ue(this.meta,ay()),this.meta.instance=t}}class cy{getMeta(){return this.meta}updateMeta(t){ue(this.meta,t),ry(this.meta,t,t)}constructor(t){const e=t.getMetaConstructor();this.meta=new e}}function dy(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function uy(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,uy(t,e,"get"))}function py(t,e,o){dy(t,e),e.set(t,o)}function fy(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,uy(t,e,"set"),o),o}function my(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function wy(t,e){dy(t,e),e.add(t)}function by(t){gs(t)||ly(t)||ce("Assertion failed: Expecting an unsigned number or null/undefined argument.")}var vy=new WeakMap,Cy=new WeakMap,yy=new WeakMap,Sy=new WeakMap,ky=new WeakMap,Ry=new WeakMap,Ey=new WeakMap,xy=new WeakSet,My=new WeakSet,Ty=new WeakSet,Hy=new WeakSet,Iy=new WeakSet,_y=new WeakSet;class Ay{obtain(t){!function(t){gs(t)||ce("Assertion failed: Expecting an unsigned number.")}(t);let e=t;gy(this,yy).length>0&&(e=my(this,Ty,Ny).call(this,t),-1===e&&(my(this,Hy,Py).call(this),e=t));let o=gy(this,vy).get(e);if(void 0===o){o=this.valueFactory(t),gy(this,vy).set(e,o),t>=gy(this,Cy)&&fy(this,Cy,t+1);const n=e>t?e:t;n>=gy(this,Sy)&&fy(this,Sy,n+1),e>gy(this,ky)?fy(this,ky,e):fy(this,Ry,!1)}return o}has(t){return void 0!==this.getIfExists(t)}insert(t,e=1){by(t);const o=ly(t)?gy(this,Cy):t;fy(this,Cy,gy(this,Cy)+e),o>=gy(this,Sy)||(fy(this,Sy,gy(this,Sy)+e),my(this,xy,Wy).call(this,{start:o,amount:e,isInsert:!0}))}remove(t,e=1){let o;if(by(t),ly(t)){const t=gy(this,Cy)-e;o=t<0?Math.max(gy(this,Cy)+t,0):t}else o=t;const n=Math.max(Math.min(gy(this,Cy)-o,e),0),i=o>=gy(this,Sy);fy(this,Cy,gy(this,Cy)-n),gy(this,Sy)>gy(this,Cy)&&fy(this,Sy,gy(this,Cy)),i||my(this,xy,Wy).call(this,{start:o,amount:e,isInsert:!1})}size(){return gy(this,yy).length>0&&my(this,Hy,Py).call(this),gy(this,vy).size}values(){return gy(this,yy).length>0&&my(this,Hy,Py).call(this),fy(this,Ey,!0),gy(this,vy).values()}entries(){return gy(this,yy).length>0&&my(this,Hy,Py).call(this),fy(this,Ey,!0),gy(this,vy).entries()}evict(t){if(gy(this,yy).length>0){const e=my(this,Ty,Ny).call(this,t);return void(-1!==e&&gy(this,vy).delete(e))}gy(this,vy).delete(t)}getIfExists(t){if(gy(this,yy).length>0){const e=my(this,Ty,Ny).call(this,t);return-1===e?void 0:gy(this,vy).get(e)}return gy(this,vy).get(t)}clear(){gy(this,vy).clear(),fy(this,yy,[]),fy(this,Cy,0),fy(this,Sy,0),fy(this,ky,-1),fy(this,Ry,!0),fy(this,Ey,!1)}[Symbol.iterator](){return this.entries()}constructor(t){wy(this,xy),wy(this,My),wy(this,Ty),wy(this,Hy),wy(this,Iy),wy(this,_y),py(this,vy,{writable:!0,value:void 0}),py(this,Cy,{writable:!0,value:void 0}),py(this,yy,{writable:!0,value:void 0}),py(this,Sy,{writable:!0,value:void 0}),py(this,ky,{writable:!0,value:void 0}),py(this,Ry,{writable:!0,value:void 0}),py(this,Ey,{writable:!0,value:void 0}),fy(this,vy,new Map),fy(this,Cy,0),fy(this,yy,[]),fy(this,Sy,0),fy(this,ky,-1),fy(this,Ry,!0),fy(this,Ey,!1),this.valueFactory=t}}function Wy(t){const e=gy(this,yy),o=e.length>0?e[e.length-1]:void 0;void 0!==o&&o.isInsert===t.isInsert&&my(this,My,Oy).call(this,o,t)||(e.push(t),e.length>=1024&&my(this,Hy,Py).call(this))}function Oy(t,e){return e.isInsert?e.start>=t.start&&e.start<=t.start+t.amount&&(t.amount+=e.amount,!0):e.start===t.start?(t.amount+=e.amount,!0):e.start+e.amount===t.start&&(t.start=e.start,t.amount+=e.amount,!0)}function Ny(t){const e=gy(this,yy);let o=t;for(let t=e.length-1;t>=0;t--){const{start:n,amount:i,isInsert:s}=e[t];if(s){if(o>=n+i)o-=i;else if(o>=n)return-1}else o>=n&&(o+=i)}return o}function Py(){const t=gy(this,yy);if(fy(this,yy,[]),1===t.length&&!t[0].isInsert&&!gy(this,Ey)&&gy(this,Ry)&&gy(this,ky)===gy(this,vy).size-1)return void my(this,Iy,Dy).call(this,t[0].start,t[0].amount);const e=new Array(t.length);let o=1/0;for(let n=t.length-1;n>=0;n--)t[n].start<o&&(o=t[n].start),e[n]=o;let n=!1;for(const t of gy(this,vy).keys())if(t>=o){n=!0;break}if(!n)return;const i=new Map;let s=-1,r=!0,l=-1;for(const[o,n]of gy(this,vy)){const a=my(this,_y,Ly).call(this,o,t,e);-1!==a&&(i.set(a,n),a>s&&(s=a),a<=l&&(r=!1),l=a)}fy(this,vy,i),fy(this,Ey,!1),fy(this,Sy,s+1),fy(this,ky,s),fy(this,Ry,r)}function Dy(t,e){const o=gy(this,vy),n=o.size,i=Math.max(n-e,t);for(let n=t;n<i;n++)o.set(n,o.get(n+e));for(let t=i;t<n;t++)o.delete(t);fy(this,ky,i-1),fy(this,Sy,i)}function Ly(t,e,o){let n=t;for(let t=0;t<e.length;t++){if(n<o[t])return n;const{start:i,amount:s,isInsert:r}=e[t];if(r)n>=i&&(n+=s);else if(n>=i+s)n-=s;else if(n>=i)return-1}return n}const zy=["data","width"];class By{updateMeta(t,e){const o=this.getMeta(t);ue(o,e),ry(o,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(){const t=function(t,e=[]){function o(){}var n,i;n=o,(i=t).prototype.constructor=i,n.prototype=new i,n.prototype.constructor=n;for(let t=0;t<e.length;t++)o.prototype[e[t]]=void 0;return o}(this.globalMeta.getMetaConstructor(),zy);return t.prototype}constructor(t){this.metas=new Ay(()=>this._createMeta()),this.globalMeta=t,this.metas=new Ay(()=>this._createMeta())}}function Vy(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Fy(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Vy(t,e,"get"))}function $y(t,e,o){!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,o)}function Uy(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Vy(t,e,"set"),o),o}var jy=new WeakMap;class qy{enableUserDefinedMetaRecording(){Fy(this,jy)>0&&Uy(this,jy,Fy(this,jy)-1)}disableUserDefinedMetaRecording(){Uy(this,jy,Fy(this,jy)+1)}updateMeta(t,e,o){const n=this.getMeta(t,e);ue(n,o),ry(n,o)}createRow(t,e){this.metas.insert(t,e)}createColumn(t,e){for(const[,o]of this.metas)o.insert(t,e)}removeRow(t,e){this.metas.remove(t,e)}removeColumn(t,e){for(const[,o]of this.metas)o.remove(t,e)}getMeta(t,e,o){const n=this.metas.obtain(t).obtain(e);return void 0===o?n:n[o]}hasMeta(t,e){return this.metas.has(t)&&this.metas.obtain(t).has(e)}getMetaIfExists(t,e){return this.metas.getIfExists(t)?.getIfExists(e)}createTransientMeta(t){return this._createMeta(t)}setMeta(t,e,o,n){const i=this.metas.obtain(t).obtain(e);i._automaticallyAssignedMetaProps?.delete(o),i[o]=n,void 0===i._persistedMetaProps&&(i._persistedMetaProps=new Set),i._persistedMetaProps.add(o),0===Fy(this,jy)?(void 0===i._userDefinedMetaProps&&(i._userDefinedMetaProps=new Set),i._userDefinedMetaProps.add(o)):i._userDefinedMetaProps?.delete(o)}removeMeta(t,e,o){const n=this.metas.getIfExists(t)?.getIfExists(e);void 0!==n&&(delete n[o],n._userDefinedMetaProps?.delete(o),n._persistedMetaProps?.delete(o))}getMetas(){const t=[],e=Array.from(this.metas.values());for(let o=0;o<e.length;o++)At(e[o])&&t.push(...Array.from(e[o].values()));return t}getMetasAtRow(t){!function(t,e){t()||ce(`Assertion failed: ${e}`)}(()=>gs(t),"Expecting an unsigned number.");const e=this.metas.getIfExists(t);return void 0===e?[]:Array.from(e).sort(([t],[e])=>t-e).map(([,t])=>t)}getUserDefinedMetas(){const t=[];for(const[e,o]of this.metas)for(const[n,i]of o){const o=i._userDefinedMetaProps;void 0!==o&&o.forEach(o=>{Te(i,o)&&t.push({physicalRow:e,physicalColumn:n,key:o,value:i[o]})})}return t}evictRow(t){const e=this.metas.getIfExists(t);if(void 0===e)return[];let o=!1;const n=[];for(const[t,i]of e){const s=i._persistedMetaProps,r=void 0!==s&&s.size>0,l=!1===i.valid;r||l?o=!0:(e.evict(t),n.push(t))}return o||this.metas.evict(t),n}clearCache(){this.metas.clear()}_createRow(){return new Ay(t=>this._createMeta(t))}_createMeta(t){return new(this.columnMeta.getMetaConstructor(t))}constructor(t){$y(this,jy,{writable:!0,value:void 0}),this.metas=new Ay(()=>this._createRow()),Uy(this,jy,0),this.columnMeta=t}}class Gy{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,o){const n=this.cellMeta.getMeta(t,e);return n.visualRow=o.visualRow,n.visualCol=o.visualColumn,n.row=t,n.col=e,o.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",n),n}getCellMetaUncached(t,e,o){const n=this.cellMeta.getMetaIfExists(t,e)??this.cellMeta.createTransientMeta(e);return n.visualRow=o.visualRow,n.visualCol=o.visualColumn,n.row=t,n.col=e,n}getCellMetaTransient(t,e,o){const n=this.cellMeta.getMetaIfExists(t,e);if(void 0!==n)return n.visualRow=o.visualRow,n.visualCol=o.visualColumn,n.row=t,n.col=e,this.runLocalHooks("afterGetCellMeta",n),n;const i=this.cellMeta.createTransientMeta(e);return i.visualRow=o.visualRow,i.visualCol=o.visualColumn,i.row=t,i.col=e,this.runLocalHooks("extendTransientCellMeta",i),i}getCellMetaKeyValue(t,e,o){return"string"!=typeof o&&ce("The passed cell meta object key is not a string"),this.cellMeta.getMeta(t,e,o)}setCellMeta(t,e,o,n){this.cellMeta.setMeta(t,e,o,n)}updateCellMeta(t,e,o){this.cellMeta.updateMeta(t,e,o)}removeCellMeta(t,e,o){this.cellMeta.removeMeta(t,e,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(t){return this.cellMeta.getMetasAtRow(t)}getUserDefinedCellMetas(){return this.cellMeta.getUserDefinedMetas()}enableUserDefinedMetaRecording(){this.cellMeta.enableUserDefinedMetaRecording()}disableUserDefinedMetaRecording(){this.cellMeta.disableUserDefinedMetaRecording()}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={},o=[]){this.hot=t,this.globalMeta=new hy(t),this.tableMeta=new cy(this.globalMeta),this.columnMeta=new By(this.globalMeta),this.cellMeta=new qy(this.columnMeta),o.forEach(t=>new t(this)),this.globalMeta.updateMeta(e)}}function Yy(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Xy(t,e,o){!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,o)}function Ky(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Yy(t,e,"set"),o),o}be(Gy,Wh);var Zy=new WeakMap;class Qy{extendMetaProps(){this.propDescriptors.forEach((t,e)=>{const{initOnly:o,target:n,onChange:i}=t,s="string"==typeof n,r=s?n:e,l=`_${r}`;var a;this.metaManager.globalMeta.meta[l]=this.metaManager.globalMeta.meta[r],i?(this.installPropWatcher(e,l,i),s&&this.installPropWatcher(n,l,i)):o&&(this.installPropWatcher(e,l,function(t,e){return e.get?e.get.call(t):e.value}(a=this,Yy(a,Zy,"get"))),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(e))})}installPropWatcher(t,e,o){const{usageTracker:n}=this,i=o.bind(this);Object.defineProperty(this.metaManager.globalMeta.meta,t,{get(){return this[e]},set(o){const s=!n.has(t);n.add(t),i(t,o,s),this[e]=o},enumerable:!0,configurable:!0})}constructor(t){Xy(this,Zy,{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&&ce("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`."),this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart")&&ce("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]]),Ky(this,Zy,(t,e,o)=>{o||ce(`The \`${t}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=t,this.extendMetaProps()}}function Jy(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tS(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function eS(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,tS(t,e,"get"))}function oS(t,e,o){Jy(t,e),e.set(t,o)}function nS(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,tS(t,e,"set"),o),o}function iS(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function sS(t,e){Jy(t,e),e.add(t)}var rS=new WeakMap,lS=new WeakMap,aS=new WeakMap,hS=new WeakSet,cS=new WeakSet,dS=new WeakSet,uS=new WeakSet;class gS{extendCellMeta(t){const e=t.row,o=t.col;if(this.metaSyncMemo.get(e)?.has(o))return;iS(this,hS,pS).call(this,t,t=>{this.metaManager.updateCellMeta(e,o,t)});let n=this.metaSyncMemo.get(e);void 0===n&&(n=new Set,this.metaSyncMemo.set(e,n)),n.add(o)}extendTransientCellMeta(t){iS(this,hS,pS).call(this,t,e=>{ue(t,e),ry(t,e)})}constructor(t){sS(this,hS),sS(this,cS),sS(this,dS),sS(this,uS),oS(this,rS,{writable:!0,value:void 0}),oS(this,lS,{writable:!0,value:void 0}),oS(this,aS,{writable:!0,value:void 0}),this.metaSyncMemo=new Map,nS(this,rS,0),nS(this,lS,0),nS(this,aS,!1),this.metaManager=t,t.addLocalHook("afterGetCellMeta",t=>{this.extendCellMeta(t)}),t.addLocalHook("extendTransientCellMeta",t=>{this.extendTransientCellMeta(t)}),Qn.getSingleton().add("beforeRender",t=>{t&&this.metaSyncMemo.clear()},this.metaManager.hot);const e=()=>iS(this,cS,fS).call(this);Qn.getSingleton().add("afterScrollVertically",e,this.metaManager.hot),Qn.getSingleton().add("afterViewRender",e,this.metaManager.hot)}}function pS(t,e){const o=t.row,n=t.col,i=t.visualRow,s=t.visualCol,r=this.metaManager.hot,l=r.colToProp(s);t.prop=l,r.runHooks("beforeGetCellMeta",i,s,t);const a=Te(t,"type")?t.type:null;let h=ln(t.cells)?t.cells(o,n,l):null;a&&(h?h.type=h.type??a:h={type:a}),h&&e(h),r.runHooks("afterGetCellMeta",i,s,t)}function fS(){const t=this.metaManager.hot,e=t.getFirstRenderedVisibleRow(),o=t.getLastRenderedVisibleRow();if(!Number.isInteger(e)||!Number.isInteger(o)||o<e)return;const n=o-e+1,i=e-n,s=o+n,r=eS(this,rS),l=eS(this,lS);eS(this,aS)&&(iS(this,dS,mS).call(this,r,Math.min(l,i-1)),iS(this,dS,mS).call(this,Math.max(r,s+1),l)),nS(this,rS,i),nS(this,lS,s),nS(this,aS,!0)}function mS(t,e){if(t>e)return;const o=this.metaManager.hot,n=o.getSelectedRangeLast(),i=n?n.highlight.row:null;for(let n=t;n<=e;n++){const t=o.toPhysicalRow(n);n!==i&&Number.isInteger(t)&&iS(this,uS,wS).call(this,t)}}function wS(t){const e=this.metaManager.cellMeta.evictRow(t);if(0===e.length)return;const o=this.metaSyncMemo.get(t);if(void 0!==o){for(let t=0;t<e.length;t++)o.delete(e[t]);0===o.size&&this.metaSyncMemo.delete(t)}}function bS(t,e,o,n,i,s,r){const l=t.sourceDataValidator;if(!ln(l))return;if(!0===l(e,t,r))return;!1===t.allowInvalid&&i.setAtCell(o,n,null);const a=t.sourceDataWarningMessage;if(a){const t=s.get(a)??[];t.push({row:o,col:n,value:e,message:a}),s.set(a,t)}}function vS(t,e){const o=t.countSourceRows(),n=t.countSourceCols();if(0===o||0===n)return;const i=t.getSettings(),s=t._getDataSource(),r=new Map,{fullScan:l,columns:a}=function(t,e){const o=t._getMetaManager(),n=[];for(let i=0;i<e;i+=1){const e=t.columnIndexMapper.getVisualFromPhysicalIndex(i);if(null===e)continue;const s=o.getCellMetaUncached(0,i,{visualRow:0,visualColumn:e}),r=s.sourceDataValidator;if(ln(r)){if(!0!==r.rowIndependent)return{fullScan:!0,columns:[]};n.push({physicalColumn:i,cellMeta:s})}}return{fullScan:!1,columns:n}}(t,n),h=function(t,e){return Array.isArray(e.cell)&&e.cell.length>0||t._getMetaManager().getUserDefinedCellMetas().length>0}(t,i);if(l||0!==a.length||h){if(l||h)!function(t,e,o,n,i,s){const{rowIndexMapper:r,columnIndexMapper:l}=t,a=t._getMetaManager();for(let t=0;t<o;t+=1)for(let o=0;o<n;o+=1){const n=r.getVisualFromPhysicalIndex(t),h=l.getVisualFromPhysicalIndex(o);if(null===n||null===h)continue;const c=a.getCellMetaUncached(t,o,{visualRow:n,visualColumn:h});ln(c.sourceDataValidator)&&bS(c,e.getAtCell(t,o),t,o,e,i,s)}}(t,s,o,n,r,e);else{!function(t,e,o,n,i,s){for(let r=0;r<o;r+=1)if(null!==n(r))for(let o=0;o<t.length;o+=1){const{physicalColumn:n,cellMeta:l}=t[o];bS(l,e.getAtCell(r,n),r,n,e,i,s)}}(a,s,o,e=>t.rowIndexMapper.getVisualFromPhysicalIndex(e),r,e)}r.forEach((t,e)=>{CS(e,t)})}}function CS(t,e){!function({logFunction:t=Ye,message:e="",items:o=[],maxSample:n=5,itemFormatter:i=t=>`${t}`}={}){if(!Array.isArray(o)||0===o.length)return;const s=o.length,r=s>n?` - ...and ${s-n} more`:"";t(Ge(e,{itemsCount:`${s} cell${s>1?"s":""}`,affectedCells:["Affected cells:",...o.slice(0,n).map(t=>` - ${i(t)}`),...r?[r]:[]].join("\n")}))}({logFunction:Xe,message:t,items:e,itemFormatter:t=>{const{row:e,col:o,value:n}=t,i=_t(n);return`row ${e}, col ${o}, value: "${i.length>64?`${i.slice(0,64)}...`:i}"`}})}function yS(t,e,o,n){const{hotInstance:i,dataMap:s,dataSource:r,internalSource:l,source:a,metaManager:h,firstRun:c}=n,d=yn(l),u=i.getSettings();Array.isArray(u.dataSchema)?i.dataType="array":ln(u.dataSchema)?i.dataType="function":i.dataType="object",s&&s.destroy(),t=i.runHooks(`before${d}`,t,c,a);const g=new YC(i,t,h);e(g),"object"==typeof t&&null!==t?t.push&&t.splice||(t=[t]):null===t?t=function(t,e,o){const n=e.getSchema(),i=[];for(let e=0,s=o.startRows;e<s;e++){let e;if("object"!==t.dataType&&"function"!==t.dataType||!o.dataSchema)if("array"===t.dataType)e=pe(n[0]);else{e=[];for(let t=0,n=o.startCols;t<n;t++)e.push(null)}else e=pe(n);i.push(e)}return i}(i,g,u):ce(`${l} 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=t=>g.colToProp(t),r.propToCol=t=>g.propToCol(t),r.countCachedColumns=g.countCachedColumns.bind(g),o(g),c||vS(i,l),i.runHooks(`after${d}`,t,c,a),c||(i.runHooks("afterChange",null,l),i.view.adjustElementsSize(),i.render()),i.getSettings().ariaTags&&mo(i.rootElement,[I(-1),_(i.countCols()+(i.view?i.countRowHeaders():0))])}function SS(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kS(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function RS(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,kS(t,e,"get"))}function ES(t,e,o){SS(t,e),e.set(t,o)}function xS(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,kS(t,e,"set"),o),o}function MS(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function TS(t,e){SS(t,e),e.add(t)}var HS=new WeakMap,IS=new WeakMap,_S=new WeakSet,AS=new WeakSet;class WS{toRenderable(t){const e="N-S"===t.getVerticalDirection()?1:-1,o="W-E"===t.getHorizontalDirection()?1:-1,n=MS(this,_S,OS).call(this,t.from,e,o);if(null===n)return null;const i=MS(this,_S,OS).call(this,t.to,-e,-o);if(null===i)return null;const s=t.clone();return s.from=n,s.to=i,s.includes(t.highlight)||(s.highlight=n),s}constructor({rowIndexMapper:t,columnIndexMapper:e}){TS(this,_S),TS(this,AS),ES(this,HS,{writable:!0,value:void 0}),ES(this,IS,{writable:!0,value:void 0}),xS(this,HS,t),xS(this,IS,e)}}function OS(t,e,o=e){if(null===t.row||null===t.col)return null;const n=MS(this,AS,NS).call(this,RS(this,HS),t.row,e);if(null===n)return null;const i=MS(this,AS,NS).call(this,RS(this,IS),t.col,o);return null===i?null:t.clone().assign({row:n,col:i})}function NS(t,e,o){return e<0?e:t.getNearestNotHiddenIndex(e,o)}function PS(t){en(t)&&t.scrollIntoView({block:"nearest",inline:"nearest"})}function DS(t){const{selection:e,view:o}=t,n=t.getSelectedRangeActive(),i=e.getSelectionSource(),s=o.getFirstFullyVisibleColumn()??-1,r=o.getLastFullyVisibleColumn()??-1,l=n?.getTopStartCorner().col??-1,a=n?.getBottomEndCorner().col??-1,h=l<=s,c=a>=r,d=o.getFirstFullyVisibleRow()??-1,u=o.getLastFullyVisibleRow()??-1,g=n?.getTopStartCorner().row??-1,p=n?.getBottomEndCorner().row??-1,f=g<=d,m=p>=u;return{getComputedColumnTarget:t=>"mouse"===i||"keyboard"===i?t.col??-1:h&&c?n?.highlight.col??-1:h?l:c?a:t.col??-1,getComputedRowTarget:t=>"mouse"===i||"keyboard"===i?t.row??-1:f&&m?n?.highlight.row??-1:f?g:m?p:t.row??-1}}function LS(t){const{selection:e}=t;let o=!1,n=!1;return{resume(){n=!1},suspend(){n=!0},skipNextScrollCycle(){o=!0},scrollTo(i){if(o||n)return void(o=!1);let s;e.isFocusSelectionChanged()?s=function(t){return e=>{t.scrollViewportTo(e.toObject(),()=>{const e=t.getSelectedRangeActive();if(!e)return;const{row:o,col:n}=e.highlight;null!==o&&null!==n&&PS(t.getCell(o,n,!0))})}}(t):e.isSelectedByCorner()?s=()=>{}:e.isSelectedByRowHeader()?s=function(t){return e=>{const o=DS(t).getComputedRowTarget(e);t.scrollViewportTo({row:o},()=>{const e=!!t.getSettings().rowHeaders;PS(t.getCell(o,e?-1:0,!0))})}}(t):e.isSelectedByColumnHeader()?s=function(t){return e=>{const o=DS(t).getComputedColumnTarget(e);t.scrollViewportTo({col:o},()=>{const e=!!t.getSettings().colHeaders;PS(t.getCell(e?-1:0,o,!0))})}}(t):1===e.getSelectedRange().size()&&e.isMultiple()?s=function(t){return e=>{const o=DS(t),n={row:o.getComputedRowTarget(e),col:o.getComputedColumnTarget(e)};t.scrollViewportTo(n,()=>{const{row:e,col:o}=n;PS(t.getCell(e,o,!0))})}}(t):1!==e.getSelectedRange().size()||e.isMultiple()?e.getSelectedRange().size()>1&&(s=function(t){return e=>{const o=DS(t),n={row:o.getComputedRowTarget(e),col:o.getComputedColumnTarget(e)};t.scrollViewportTo(n,()=>{const{row:e,col:o}=n;PS(t.getCell(e,o,!0))})}}(t)):s=function(t){return e=>{const o=t.selection.getSelectionSource(),{row:n,col:i}=e,s=()=>{PS(t.getCell(n,i,!0))};if(n<0&&i>=0)t.scrollViewportTo({col:i},s);else if(i<0&&n>=0)t.scrollViewportTo({row:n},s);else{if("mouse"===o&&(i===t.view.getLastPartiallyVisibleColumn()||n===t.view.getLastPartiallyVisibleRow()))return;t.scrollViewportTo({row:n,col:i},s)}}}(t),s?.(i)}}}const zS=Object.freeze({INLINE:"inline",MODAL:"modal"}),BS=Object.freeze({UNKNOWN:"unknown",CLICK:"click",TAB_FROM_ABOVE:"tab_from_above",TAB_FROM_BELOW:"tab_from_below"});function VS(t,e){const o=t.rootDocument.createElement("div");return o.style.display="none",o.classList.add("htFocusCatcher"),o.dataset.htFocusSource=e,o}function FS(t,e,o={}){const n={shortcutsContextName:"grid",type:zS.INLINE,contains:t=>t===e||e.contains(t),runOnlyIf:()=>!0,enableFocusCatchers:!0,...o},i=!1===n.enableFocusCatchers?null:function(t,e){const o=VS(t,BS.TAB_FROM_ABOVE),n=VS(t,BS.TAB_FROM_BELOW);return e.prepend(o),e.append(n),{activate(){o.tabIndex=0,n.tabIndex=0},deactivate(){o.tabIndex=-1,n.tabIndex=-1},destroy(){o.remove(),n.remove()}}}(t,e);return{getType:()=>n.type,hasContainerDetached:()=>!t.rootWrapperElement.contains(e),getShortcutsContextName:()=>n.shortcutsContextName,runOnlyIf:()=>n.runOnlyIf(),contains:t=>n.contains(t),activate:(t=BS.UNKNOWN)=>{n.onActivate?.(t)},deactivate:()=>{n.onDeactivate?.()},activateFocusCatchers:()=>{i?.activate()},deactivateFocusCatchers:()=>{i?.deactivate()},enable:()=>{e.removeAttribute("inert")},disable:()=>{e.setAttribute("inert","true")},destroy:()=>{i?.destroy()}}}function $S(t){const e=vs({errorIdExists:t=>`The "${t}" focus scope is already registered.`}),o=t.getShortcutManager();let n=null;function i(t,e=BS.UNKNOWN){n!==t&&(null!==n&&s(n),n=t,n.activate(e),o.setActiveContextName(t.getShortcutsContextName()))}function s(t){r(),n===t&&(n=null,t.deactivate())}function r(){const o=e.getValues(),i=o.filter(t=>t.runOnlyIf()&&"modal"===t.getType());o.forEach(e=>{i.length>0&&i.includes(e)||0===i.length||e.hasContainerDetached()?e.enable():e.disable(),e===n?e.contains(rn(t.rootDocument))?e.deactivateFocusCatchers():e.activateFocusCatchers():e.runOnlyIf()?e.activateFocusCatchers():e.deactivateFocusCatchers()})}function l(o,r){if(!o.isConnected||!xo(o))return;const l=e.getValues().filter(t=>t.runOnlyIf());let a=!1;l.forEach(e=>{!a&&e.contains(o)&&(a=!0,r!==BS.UNKNOWN&&t.listen(),i(e,r))}),!a&&n&&(s(n),t.unlisten())}const a=function(t,e={}){let o=!1;function n(t){o||e.onFocus?.(t)}function i(t){e.onClick?.(t)}function s(t){"Tab"===t.key&&e.onTabKeyDown?.(t)}function r(){o=!0}function l(){o=!1}return{mount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document;t.addEventListener("focusin",n),t.addEventListener("click",i),t.addEventListener("keydown",s),t.addEventListener("mousedown",r),t.addEventListener("mouseup",l),e=io(e)}},unmount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document;t.removeEventListener("focusin",n),t.removeEventListener("click",i),t.removeEventListener("keydown",s),t.removeEventListener("mousedown",r),t.removeEventListener("mouseup",l),e=io(e)}}}}(t.rootWindow,{onFocus:t=>{l(no(t),no(t).dataset.htFocusSource??BS.UNKNOWN)},onClick:t=>{l(no(t),BS.CLICK)},onTabKeyDown:()=>{r()}});return a.mount(),{getActiveScopeId:function(){return n?e.getId(n):null},registerScope:function(n,i,s={}){e.hasItem(n)&&ce(`Scope with id "${n}" already registered`);const r=FS(t,i,s);e.addItem(n,r),o.getOrCreateContext(r.getShortcutsContextName())},unregisterScope:function(t){e.hasItem(t)||ce(`Scope with id "${t}" not found`),e.getItem(t).destroy(),e.removeItem(t)},activateScope:(t,o)=>function(t,o=BS.UNKNOWN){e.hasItem(t)||ce(`Scope with id "${t}" not found`);const n=o??BS.UNKNOWN;i(e.getItem(t),n)}(t,o),deactivateScope:t=>function(t){e.hasItem(t)||ce(`Scope with id "${t}" not found`),s(e.getItem(t))}(t),destroy:()=>a.unmount()}}function US(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jS(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function qS(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,jS(t,e,"get"))}function GS(t,e,o){US(t,e),e.set(t,o)}function YS(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,jS(t,e,"set"),o),o}function XS(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function KS(t,e){US(t,e),e.add(t)}const ZS=Object.freeze({CELL:"cell",MIXED:"mixed"});var QS=new WeakMap,JS=new WeakMap,tk=new WeakMap,ek=new WeakMap,ok=new WeakMap,nk=new WeakMap,ik=new WeakMap,sk=new WeakMap,rk=new WeakMap,lk=new WeakSet,ak=new WeakSet,hk=new WeakSet,ck=new WeakSet,dk=new WeakSet,uk=new WeakSet;class gk{init(){const t=qS(this,QS).getSettings();YS(this,ek,t.imeFastEdit?ZS.MIXED:ZS.CELL),qS(this,QS).addHook("afterUpdateSettings",(...t)=>XS(this,uk,vk).call(this,t[0])),qS(this,QS).addHook("afterSelection",(...t)=>XS(this,ck,wk).call(this)),qS(this,QS).addHook("afterSelectionFocusSet",(...t)=>XS(this,ck,wk).call(this)),qS(this,QS).addHook("afterSelectionEnd",(...t)=>XS(this,hk,mk).call(this)),qS(this,QS).addHook("afterRender",(...t)=>XS(this,dk,bk).call(this)),YS(this,JS,new _i(qS(this,QS)));const e=[qS(this,QS).rootWrapperElement??qS(this,QS).rootElement,qS(this,QS).rootPortalElement].filter(t=>en(t));e.forEach(t=>{qS(this,JS).addEventListener(t,"focusin",()=>{YS(this,tk,!0)}),qS(this,JS).addEventListener(t,"focusout",t=>{const o=t.relatedTarget;YS(this,tk,en(o)&&e.some(t=>t.contains(o)))})})}hasBrowserFocus(){return qS(this,tk)}isForeignFocusTarget(t){const{rootElement:e,rootWrapperElement:o,rootPortalElement:n,rootDocument:i}=qS(this,QS),s=!!o&&o.contains(t)&&!e.contains(t);return!(null===t||t===i.body||t===i.documentElement||oo(t,e)||s||n&&n.contains(t))&&!sn(e).includes(t)}getFocusMode(){return qS(this,ek)}setFocusMode(t){Object.values(ZS).includes(t)?YS(this,ek,t):Xe(`"${t}" is not a valid focus mode.`)}getRefocusDelay(){return qS(this,ok)}setRefocusDelay(t){YS(this,ok,t)}setRefocusElementGetter(t){YS(this,nk,t)}suspend(){YS(this,rk,!0)}resume(){YS(this,rk,!1)}getRefocusElement(){return"function"==typeof qS(this,nk)?qS(this,nk).call(this):qS(this,QS).getActiveEditor()?.TEXTAREA}focusElement(t,e){return!(!en(t)||!t.isConnected)&&(t.focus(e),!0)}focusOnHighlightedCell(t){const e=t=>{const e=qS(this,QS).getSelectedRangeActive()?.highlight;if(!e)return;let o=qS(this,QS).runHooks("modifyFocusedElement",e.row,e.col,t);en(o)||(o=t),o&&!qS(this,QS).getActiveEditor()?.isOpened?.()&&this.focusElement(o,{preventScroll:!0})};t?e(t):XS(this,lk,pk).call(this,t=>e(t))}refocusToEditorTextarea(t=qS(this,ok)){qS(this,QS).getSettings().imeFastEdit&&!qS(this,QS).getActiveEditor()?.isOpened?.()&&(qS(this,QS).getActiveEditor()?.refreshValue?.(),qS(this,ik).has(t)||qS(this,ik).set(t,an(()=>{qS(this,QS).isDestroyed||this.getRefocusElement()?.select()},t)),qS(this,ik).get(t)())}constructor(t){KS(this,lk),KS(this,ak),KS(this,hk),KS(this,ck),KS(this,dk),KS(this,uk),GS(this,QS,{writable:!0,value:void 0}),GS(this,JS,{writable:!0,value:void 0}),GS(this,tk,{writable:!0,value:void 0}),GS(this,ek,{writable:!0,value:void 0}),GS(this,ok,{writable:!0,value:void 0}),GS(this,nk,{writable:!0,value:void 0}),GS(this,ik,{writable:!0,value:void 0}),GS(this,sk,{writable:!0,value:void 0}),GS(this,rk,{writable:!0,value:void 0}),YS(this,JS,null),YS(this,tk,!1),YS(this,ok,1),YS(this,nk,null),YS(this,ik,new Map),YS(this,sk,!1),YS(this,rk,!1),YS(this,QS,t)}}function pk(t){const e=qS(this,QS).getSelectedRangeActive()?.highlight;if(!e||!qS(this,QS).selection.isCellVisible(e))return void t(null);if(null===e.row||null===e.col)return void t(null);const{row:o,col:n}=e,i=qS(this,QS).getCell(o,n,!0);null===i?qS(this,QS).addHookOnce("afterScroll",()=>{t(qS(this,QS).getCell(o,n,!0))}):t(i)}function fk(){const t=qS(this,rk);XS(this,lk,pk).call(this,e=>{const o=rn(qS(this,QS).rootDocument),n=en(o)?o:null;t&&n&&Zo(n)||(n&&Zo(n)&&n.blur(),this.focusOnHighlightedCell(e))})}function mk(){if(qS(this,rk)){const t=rn(qS(this,QS).rootDocument),e=en(t)?t:null;if(e&&Zo(e))return}XS(this,lk,pk).call(this,t=>{this.getFocusMode()===ZS.MIXED&&"TD"===t?.nodeName&&this.refocusToEditorTextarea()})}function wk(){YS(this,sk,!0)}function bk(){qS(this,sk)&&(YS(this,sk,!1),XS(this,ak,fk).call(this))}function vk(t){"boolean"==typeof t.imeFastEdit&&this.setFocusMode(t.imeFastEdit?ZS.MIXED:ZS.CELL)}function Ck(t){const{rowIndexMapper:e,columnIndexMapper:o}=t,{navigableHeaders:n}=t.getSettings(),i=n&&t.countColHeaders()>0?-t.countColHeaders():0,s=n&&t.countRowHeaders()>0?-t.countRowHeaders():0,r=0===i?e.getVisualFromRenderableIndex(i):i,l=0===s?o.getVisualFromRenderableIndex(s):s;return null===r||null===l?null:t._createCellCoords(r,l)}function yk(t){const{rowIndexMapper:e,columnIndexMapper:o}=t,{navigableHeaders:n}=t.getSettings();let i=e.getRenderableIndexesLength()-1,s=o.getRenderableIndexesLength()-1;if(i<0){if(!n||0===t.countColHeaders())return null;i=-1}if(s<0){if(!n||0===t.countColHeaders())return null;s=-1}return t._createCellCoords(e.getVisualFromRenderableIndex(i)??i,o.getVisualFromRenderableIndex(s)??s)}const Sk="gridDefault",kk="grid",Rk="grid.tabNavigation",Ek="editorManager.handlingEditor";const xk=[{name:"editorCloseAndSave",callback(t){t._getEditorManager().closeEditorAndSaveChanges()}},{name:"editorCloseAndSaveByArrowKeys",callback(t,e,o){const n=t._getEditorManager(),i=n.getActiveEditor();i?.isInFullEditMode()&&i?.state===Ei.EDITING||(n.closeEditorAndSaveChanges(),t.getSelected()&&(o.includes("arrowdown")?t.selection.transformStart(1,0):o.includes("arrowup")?t.selection.transformStart(-1,0):o.includes("arrowleft")?t.selection.transformStart(0,-1*t.getDirectionFactor()):o.includes("arrowright")&&t.selection.transformStart(0,t.getDirectionFactor())),e.preventDefault())}},{name:"editorCloseAndSaveByEnter",callback(t,e){const o=t._getEditorManager();o.closeEditorAndSaveChanges(e.ctrlKey||e.metaKey),o.moveSelectionAfterEnter(e)}},{name:"editorCloseWithoutSaving",callback(t){const e=t._getEditorManager();e.closeEditorAndRestoreOriginalValue(t.getShortcutManager().isCtrlPressed()),e.activeEditor?.focus()}},{name:"editorFastOpen",callback(t,e){const o=t.getSelectedRangeActive()?.highlight;o?.isHeader()||t._getEditorManager().openEditor(null,e,!0)}},{name:"editorOpen",callback(t,e,o){const{selection:n}=t,i=t._getEditorManager(),s=t.getSelectedRange(),r=t.getSelectedRangeActive(),l=r?.highlight;if((s?.some(t=>n.isMultiple(t))||(s?.length??0)>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(o.includes("shift")?n.transformFocus(-(s?.row??0),-(s?.col??0)):n.transformFocus(s?.row??0,s?.col??0))}l?.isHeader()||(t.getSettings().enterBeginsEditing?i.cellProperties.readOnly?i.moveSelectionAfterEnter(e):i.openEditor(null,e,!0):i.moveSelectionAfterEnter(e),pn(e))}},{name:"extendCellsSelectionDown",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive()?.highlight;e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(o?.isCell()||o?.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(1,0),e.markEndSource())}},{name:"extendCellsSelectionDownByViewportHeight",callback(t){const{selection:e,rowIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{to:i}=n,s=i.row??0,r=Math.min(s+t.countVisibleRows(),t.countRows()-1),l=o.getNearestNotHiddenIndex(r,-1);if(null!==l){const o=t._createCellCoords(l,i.col??0),n=s-(t.getFirstFullyVisibleRow()??0),r=Math.min((o.row??0)-n,t.countRows()-1);e.markSource("keyboard"),e.setRangeEnd(o,t.getActiveSelectionLayerIndex()),e.markEndSource(),t.scrollViewportTo({row:r,verticalSnap:"top",horizontalSnap:"start"})}}},{name:"extendCellsSelectionLeft",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive()?.highlight;e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(o?.isCell()||o?.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,-1*t.getDirectionFactor()),e.markEndSource())}},{name:"extendCellsSelectionRight",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive()?.highlight;e.isSelectedByRowHeader()||e.isSelectedByCorner()||!(o?.isCell()||o?.isHeader()&&e.isSelectedByColumnHeader())||(e.markSource("keyboard"),e.transformEnd(0,t.getDirectionFactor()),e.markEndSource())}},{name:"extendCellsSelectionToColumns",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive();if(!o)return;const{highlight:n,from:i,to:s}=o;e.markSource("keyboard"),e.isSelectedByRowHeader()?e.selectAll(!0,!0):t.selectColumns(i.col??0,s.col??0,n),e.markEndSource()}},{name:"extendCellsSelectionToMostBottom",callback(t){const{selection:e,rowIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n,l=i.isHeader()&&e.isSelectedByRowHeader();if(i.isCell()||l){const n=o.getNearestNotHiddenIndex(t.countRows()-1,-1),a=s.clone();a.row=i.row,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,i.clone()),l&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(n??0,r.col??0)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n;if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&i.isCell()){const n=o.getNearestNotHiddenIndex(t.countCols()-1,-1),l=s.clone();l.col=i.col,e.markSource("keyboard"),e.setRangeStart(l,void 0,!1,i.clone()),e.setRangeEnd(t._createCellCoords(r.row??0,n??0)),e.markEndSource()}}},{name:"extendCellsSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n;if(!e.isSelectedByRowHeader()&&!e.isSelectedByCorner()&&i.isCell()){const n=Number(t.getSettings().fixedColumnsStart)||0,l=o.getNearestNotHiddenIndex(n,1),a=s.clone();a.col=i.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,i.clone()),e.setRangeEnd(t._createCellCoords(r.row??0,l??0)),e.markEndSource()}}},{name:"extendCellsSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n,l=i.isHeader()&&e.isSelectedByColumnHeader();if(i.isCell()||l){const n=t.isRtl()?o.getNearestNotHiddenIndex(t.countCols()-1,-1):o.getNearestNotHiddenIndex(0,1),a=s.clone();a.col=i.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,i.clone()),l&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row??0,n??0)),e.markEndSource()}}},{name:"extendCellsSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n,l=i.isHeader()&&e.isSelectedByColumnHeader();if(i.isCell()||l){const n=t.isRtl()?o.getNearestNotHiddenIndex(0,1):o.getNearestNotHiddenIndex(t.countCols()-1,-1),a=s.clone();a.col=i.col,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,i.clone()),l&&e.selectedByColumnHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(r.row??0,n??0)),e.markEndSource()}}},{name:"extendCellsSelectionToMostTop",callback(t){const{selection:e,rowIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{highlight:i,from:s,to:r}=n,l=i.isHeader()&&e.isSelectedByRowHeader();if(i.isCell()||l){const n=o.getNearestNotHiddenIndex(0,1),a=s.clone();a.row=i.row,e.markSource("keyboard"),e.setRangeStart(a,void 0,!1,i.clone()),l&&e.selectedByRowHeader.add(e.getLayerLevel()),e.setRangeEnd(t._createCellCoords(n??0,r.col??0)),e.markEndSource()}}},{name:"extendCellsSelectionToRows",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive();if(!o)return void e.markEndSource();const{highlight:n,from:i,to:s}=o;e.markSource("keyboard"),e.isSelectedByColumnHeader()?e.selectAll(!0,!0):t.selectRows(i.row??0,s.row??0,n),e.markEndSource()}},{name:"extendCellsSelectionUp",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive()?.highlight;e.isSelectedByColumnHeader()||e.isSelectedByCorner()||!(o?.isCell()||o?.isHeader()&&e.isSelectedByRowHeader())||(e.markSource("keyboard"),e.transformEnd(-1,0),e.markEndSource())}},{name:"extendCellsSelectionUpByViewportHeight",callback(t){const{selection:e,rowIndexMapper:o}=t,n=t.getSelectedRangeActive();if(!n)return;const{to:i}=n,s=i.row??0,r=Math.max(s-t.countVisibleRows(),0),l=o.getNearestNotHiddenIndex(r,1);if(null!==l){const o=t._createCellCoords(l,i.col??0),n=s-(t.getFirstFullyVisibleRow()??0),r=Math.max((o.row??0)-n,0);e.markSource("keyboard"),e.setRangeEnd(o,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:o}=t.getSettings(),n=o?t.countColHeaders():0,i=t.getSelectedRangeActive()?.highlight.row??0;let s=t.countVisibleRows()+n;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();const r=t.getSettings().fixedRowsBottom??0,l=t.countRows(),a=t.getSelectedRangeActive()?.highlight.row??0;a<0?t.scrollViewportTo({row:0}):r>0&&a>=l-r&&t.scrollViewportTo({row:l-r-1,verticalSnap:"bottom"})}},{name:"moveCellSelectionInlineEnd",callback(t,e){const{selection:o}=t,n=t.getSettings(),i=t.getSelectedRange(),s=t.getSelectedRangeActive(),r="function"==typeof n.tabMoves?n.tabMoves(e):n.tabMoves;o.markSource("keyboard"),(i?.some(t=>o.isMultiple(t))||(i?.length??0)>1)&&!s?.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?o.transformFocus(-(r?.row??0),-(r?.col??0)):o.transformStart(-(r?.row??0),-(r?.col??0)),o.markEndSource()}},{name:"moveCellSelectionInlineStart",callback(t,e){const{selection:o}=t,n=t.getSettings(),i=t.getSelectedRange(),s=t.getSelectedRangeActive(),r="function"==typeof n.tabMoves?n.tabMoves(e):n.tabMoves;o.markSource("keyboard"),(i?.some(t=>o.isMultiple(t))||(i?.length??0)>1)&&!s?.isHeader()&&t.countRenderedCols()>0&&t.countRenderedRows()>0?o.transformFocus(r?.row??0,r?.col??0):o.transformStart(r?.row??0,r?.col??0),o.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,o=t.getSelectedRangeActive()?.highlight.col??0;let n=t.rowIndexMapper.getNearestNotHiddenIndex(t.countRows()-1,-1);null===n&&(n=-1),e.setRangeStart(t._createCellCoords(n,o))}},{name:"moveCellSelectionToMostBottomInlineEnd",callback(t){const{selection:e,rowIndexMapper:o,columnIndexMapper:n}=t,i=Number(t.getSettings().fixedRowsBottom)||0,s=o.getNearestNotHiddenIndex(t.countRows()-i-1,-1),r=n.getNearestNotHiddenIndex(t.countCols()-1,-1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(s??-1,r??-1)),e.markEndSource()}},{name:"moveCellSelectionToMostInlineEnd",callback(t){const{selection:e,columnIndexMapper:o}=t;e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(t.getSelectedRangeActive()?.highlight.row??0,o.getNearestNotHiddenIndex(t.countCols()-1,-1)??0)),e.markEndSource()}},{name:"moveCellSelectionToMostInlineStart",callback(t){const{selection:e,columnIndexMapper:o}=t,n=Number(t.getSettings().fixedColumnsStart)||0,i=t.getSelectedRangeActive()?.highlight.row??0,s=o.getNearestNotHiddenIndex(n,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(i,s??0)),e.markEndSource()}},{name:"moveCellSelectionToMostLeft",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive()?.highlight.row??0;let i=t.isRtl()?o.getNearestNotHiddenIndex(t.countCols()-1,-1):o.getNearestNotHiddenIndex(0,1);null===i&&(i=t.isRtl()?-1:-t.countRowHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,i)),e.markEndSource()}},{name:"moveCellSelectionToMostRight",callback(t){const{selection:e,columnIndexMapper:o}=t,n=t.getSelectedRangeActive()?.highlight.row??0;let i=t.isRtl()?o.getNearestNotHiddenIndex(0,1):o.getNearestNotHiddenIndex(t.countCols()-1,-1);null===i&&(i=t.isRtl()?-t.countRowHeaders():-1),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,i)),e.markEndSource()}},{name:"moveCellSelectionToMostTop",callback(t){const{selection:e}=t,o=t.getSelectedRangeActive()?.highlight.col??0;let n=t.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-t.countColHeaders()),e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(n,o)),e.markEndSource()}},{name:"moveCellSelectionToMostTopInlineStart",callback(t){const{selection:e,rowIndexMapper:o,columnIndexMapper:n}=t,i=Number(t.getSettings().fixedRowsTop)||0,s=Number(t.getSettings().fixedColumnsStart)||0,r=o.getNearestNotHiddenIndex(i,1),l=n.getNearestNotHiddenIndex(s,1);e.markSource("keyboard"),e.setRangeStart(t._createCellCoords(r??0,l??0)),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:o}=t.getSettings(),n=o?t.countColHeaders():0,i=t.getSelectedRangeActive()?.highlight.row??0;let s=t.countVisibleRows()+n;s=0===s?-1:-s,i===-n?s=-1:i+s<n&&(s=-(i+n)),e.markSource("keyboard"),e.transformStart(s,0),e.markEndSource();const r=t.getSettings().fixedRowsTop??0;(t.getSelectedRangeActive()?.highlight.row??0)<r&&t.scrollViewportTo({row:r,verticalSnap:"top"})}},{name:"emptySelectedCells",callback(t){t.emptySelectedCells(),t._getEditorManager().prepareEditor()}},{name:"scrollToFocusedCell",callback(t){const e=t.getSelectedRangeActive()?.highlight;if(!e)return;const o=t.getFirstFullyVisibleRow()-1,n=t.getFirstFullyVisibleColumn()-1,i=t.getLastFullyVisibleRow()+1,s=t.getLastFullyVisibleColumn()+1,r=t._createCellCoords(o,n),l=t._createCellCoords(i,s);if(!t._createCellRange(r,r,l).includes(e)&&((e.row??-1)>=0||(e.col??-1)>=0)){const o={};if((e.col??-1)>=0){const n=Math.floor(t.countVisibleCols()/2);o.col=Math.max((e.col??0)-n,0)}if((e.row??-1)>=0){const n=Math.floor(t.countVisibleRows()/2);o.row=Math.max((e.row??0)-n,0)}t.scrollViewportTo({...o,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();if(!e)return;const o=e[e.length-1].highlight.normalize(),n=o.row??0,i=o.col??0,s=t.getDataAtCell(n,i),r=new Map;for(let o=0;o<e.length;o++)e[o].forAll((e,o)=>{if(e>=0&&o>=0&&(e!==n||o!==i)){const{readOnly:n}=t.getCellMetaTransient(e,o);n||r.set(`${e}x${o}`,[e,o,s])}});t.setDataAtCell(Array.from(r.values()))}},{name:"tabNavigation",callback(t){const e={wrapped:!1,flipped:!1};let o=!1,n=!1;return t.addHook("afterSelection",(t,i,s,r,l)=>{o&&(e.wrapped&&e.flipped||n)&&(n=!1,l.value=!0)}),t.addHook("beforeRowWrap",(t,o,n)=>{e.wrapped=!0,e.flipped=n}),{before(){const{tabNavigation:e}=t.getSettings();o=!0,e||(n=!0)},after(n){const{tabNavigation:i,autoWrapRow:s}=t.getSettings();if(o=!1,!i||!t.selection.isSelected()||s&&e.wrapped&&e.flipped||!s&&e.wrapped)return e.wrapped=!1,e.flipped=!1,t.deselectCell(),!1;n.preventDefault()}}}}];function Mk(t){const e={};return xk.forEach(({name:o,callback:n})=>{e[o]=(...e)=>n(t,...e)}),e}function Tk(t){const e=t.getShortcutManager().addContext("editor"),o=Mk(t),n={group:Ek};e.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>o.editorCloseAndSaveByEnter(t,e)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(t,e)=>o.editorCloseAndSaveByEnter(t,e)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:t.getShortcutManager().getContext(kk),callback:(t,e)=>o.editorCloseAndSave(t,e)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(t,e)=>o.editorCloseAndSaveByArrowKeys(t,e)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],n)}function Hk(t){const e=t.getShortcutManager().addContext(kk),o=Mk(t),n={runOnlyIf:()=>{const{navigableHeaders:e}=t.getSettings();return At(t.getSelected())&&(e||!e&&t.countRenderedRows()>0&&t.countRenderedCols()>0)},group:Sk};e.addShortcuts([{keys:[["F2"]],callback:t=>o.editorFastOpen(t)},{keys:[["Enter"],["Enter","Shift"]],callback:(t,e)=>o.editorOpen(t,e)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:Ek,runOnlyIf:()=>At(t.getSelected())}),e.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>o.selectAllCells(),runOnlyIf:()=>At(t.getSelected())&&!t.getSelectedRangeActive()?.highlight.isHeader()},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>!(!At(t.getSelected())||!t.getSelectedRangeActive()?.highlight.isHeader()),preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>o.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>At(t.getSelected())&&!t.getSelectedRangeActive()?.highlight.isHeader()&&(t.getSelectedRangeActive()?.getCellsCount()??0)>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>At(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>At(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>At(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>At(t.getSelected())&&!(t.selection.isSelectedByCorner()||t.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>At(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>At(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>At(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>At(t.getSelected())&&t.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:t=>o.moveCellSelectionInlineStart(t)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:t=>o.moveCellSelectionInlineEnd(t)},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],n);const i=o.tabNavigation();e.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Sk,group:Rk,position:"before",callback:t=>i.before(t)},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Sk,group:Rk,callback:t=>i.after(t),position:"after"}])}function Ik(t){const e=function(t){return e=>{if(!e)return null;const{rowIndexMapper:o,columnIndexMapper:n}=t;if(o.isHidden(e.row)||n.isHidden(e.col))return null;const i=Ck(t),s=yk(t);return null===i||null===s?null:(e.row=ds(e.row,i.row??e.row,s.row??e.row),e.col=ds(e.col,i.col??e.col,s.col??e.col),e)}}(t),o={wrapped:!1,flipped:!1};let n,i=!0,s=!1;t.addHook("afterSelection",()=>{i&&(n=t.getSelectedRangeActive()?.highlight)}),t.addHook("beforeRowWrap",(t,e,n)=>{o.wrapped=!0,o.flipped=n}),t.addHook("beforeEmptyDataStateShow",()=>{s=!0}),t.addHook("beforeEmptyDataStateHide",()=>{s=!1});const r=t.getShortcutManager().getContext(kk);r?.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Sk,group:Rk,position:"before",callback(){const{tabNavigation:e}=t.getSettings();t.getSelectedRangeActive()&&!e&&(i=!1)}},{keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Sk,group:Rk,callback(e){const{tabNavigation:s,autoWrapRow:r}=t.getSettings();if(i=!0,!s||!t.selection.isSelected()||r&&o.wrapped&&o.flipped||!r&&o.wrapped){if(r&&o.wrapped&&o.flipped){const o=e.shiftKey?Ck(t):yk(t);n=o}o.wrapped=!1,o.flipped=!1}},position:"after"}]);const l=t.rootGridContentElement??t.rootElement;t.getFocusScopeManager().registerScope("grid",l,{contains:e=>!(l!==e&&!l.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:o=>{if("tab_from_above"===o){const o=e(n)??Ck(t);if(o){const e=t.runHooks("modifyFocusOnTabNavigation","from_above",o),{row:n,col:i}=o;!1!==e&&null!==n&&null!==i&&(t.selectCell(n,i),t.getFocusManager().focusOnHighlightedCell())}}else if("tab_from_below"===o){const o=e(n)??yk(t);if(o){const e=t.runHooks("modifyFocusOnTabNavigation","from_below",o),{row:n,col:i}=o;!1!==e&&null!==n&&null!==i&&t.selectCell(n,i)}}}})}const _k=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"]]),Ak=t=>t.map(t=>{const e=t.toLowerCase();return _k.has(e)?_k.get(e)??e:e}).sort((t,e)=>t.localeCompare(e)).join("+"),Wk=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"]]),Ok=({which:t,key:e})=>{if(Wk.has(t))return Wk.get(t)??e.toLowerCase();const o=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(o)?o:e.toLowerCase()},Nk=["meta","alt","shift","control"],Pk=t=>Nk.includes(t),Dk=(t,e=!1)=>{const o=[];return t.altKey&&o.push("alt"),e&&(t.ctrlKey||t.metaKey)?o.push("control/meta"):(t.ctrlKey&&o.push("control"),t.metaKey&&o.push("meta")),t.shiftKey&&o.push("shift"),o},Lk=Symbol("shortcut-context");function zk(t){return Ce(t)&&t.__kindOf===Lk}const Bk=function(){const t=new Set;return{press(e){t.add(e)},release(e){t.delete(e)},releaseAll(){t.clear()},isPressed:e=>t.has(e)}}(),Vk=new WeakMap,Fk=t=>{if("string"==typeof t.key){const e=Ok(t);Pk(e)&&Bk.press(e)}},$k=t=>{if("string"==typeof t.key){const e=Ok(t);Pk(e)&&Bk.release(e)}};const Uk=({ownerWindow:t,handleEvent:e,beforeKeyDown:o,afterKeyDown:n})=>{const i=vs({errorIdExists:t=>`The "${t}" context name is already registered.`});let s="grid";const r=(t,e="table")=>{const o=((t,e="table")=>{const o=vs({errorIdExists:e=>`The "${e}" shortcut is already registered in the "${t}" context.`}),n=({keys:t,callback:e,group:n,runOnlyIf:i=()=>!0,captureCtrl:s=!1,preventDefault:r=!0,stopPropagation:l=!1,relativeToGroup:a,position:h,forwardToContext:c}={})=>{Wt(n)&&ce("You need to define the shortcut's group."),!1===ln(e)&&ce("The shortcut's callback needs to be a function."),!1===Array.isArray(t)&&ce(X`Pass the shortcut\'s keys as an array of arrays,\x20
|
|
52
|
+
using the KeyboardEvent.key properties:\x20
|
|
53
|
+
declare https: //developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const d={callback:e,group:n,runOnlyIf:i,captureCtrl:s,preventDefault:r,stopPropagation:l};At(a)&&(d.relativeToGroup=a,d.position=h),zk(c)&&(d.forwardToContext=c),t.forEach(t=>{const e=Ak(t);if(o.hasItem(e)){const t=o.getItem(e);let n=t.findIndex(t=>t.group===a);-1!==n?"before"===h?n-=1:n+=1:n=t.length,t.splice(n,0,d)}else o.addItem(e,[d])})},i=t=>{const e=Ak(t);o.removeItem(e)};return{__kindOf:Lk,scope:e,addShortcut:n,addShortcuts:(t,e={})=>{t.forEach(t=>{ke(e,(o,n)=>{!1===Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=e[n])}),n(t)})},getShortcuts:t=>{const e=Ak(t),n=o.getItem(e);return At(n)?n.slice():[]},hasShortcut:t=>{const e=Ak(t);return o.hasItem(e)},removeShortcutsByKeys:i,removeShortcutsByGroup:t=>{o.getItems().forEach(([e,o])=>{const n=o,s=n.filter(e=>e.group!==t);0===s.length?i((t=>t.split("+"))(e)):(n.length=0,n.push(...s))})}}})(t,e);return i.addItem(t,o),o},l=()=>s,a=t=>i.getItem(t);let h=!1;const c=(t,e,o=l())=>{const n=zk(o)?o:a(o);let i=!1;if(!n?.hasShortcut(e))return i;const s=n?.getShortcuts(e)??[];for(let o=0;o<s.length;o++){const{callback:n,runOnlyIf:r,preventDefault:l,stopPropagation:a,captureCtrl:d,forwardToContext:u}=s[o];if(!0===r?.(t)){if(h=d??!1,i=!1===n(t,e),h=!1,l&&t.preventDefault(),a&&(pn(t),t.stopPropagation()),i)break;u&&c(t,e,u)}}return i},d=function(t,e,o,n,i,s=null){const r=t=>{if(!1!==e(t)){if(!1===o(t)||229===t.keyCode||"string"!=typeof t.key||fn(t))return;const e=Ok(t);let s=[];Pk(e)||(s=Dk(t));const r=[e].concat(s);let l=i(t,r);return!l&&(qe()&&s.includes("meta")||!qe()&&s.includes("control"))&&(l=i(t,[e].concat(Dk(t,!0)))),void n(t)}if(!1===ln(s))return;if(229===t.keyCode||"string"!=typeof t.key||fn(t))return;const r=Ok(t);let l=[];Pk(r)||(l=Dk(t));const a=[r].concat(l);let h=s(t,a);!h&&(qe()&&l.includes("meta")||!qe()&&l.includes("control"))&&(h=s(t,[r].concat(Dk(t,!0)))),n(t)},l=()=>{Bk.releaseAll()};return{mount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document,o=Vk.get(t)??0;0===o&&(t.addEventListener("keydown",Fk),t.addEventListener("keyup",$k)),Vk.set(t,o+1),t.addEventListener("keydown",r),t.addEventListener("blur",l),e=io(e)}},unmount:()=>{let e=t;for(;e;){const{documentElement:t}=e.document,o=Vk.get(t)??0;o<=1?(t.removeEventListener("keydown",Fk),t.removeEventListener("keyup",$k),Vk.delete(t)):Vk.set(t,o-1),t.removeEventListener("keydown",r),t.removeEventListener("blur",l),e=io(e)}},isPressed:t=>Bk.isPressed(t),releasePressedKeys:()=>Bk.releaseAll()}}(t,t=>{const o=l(),n=a(o);return e(t,n?.scope??"table")},o,n,c,(t,e)=>{const o=i.getItems();for(let n=0;n<o.length;n+=1){const[,i]=o[n];if("global"===i.scope&&c(t,e,i))return!0}return!1});d.mount();return{addContext:r,getActiveContextName:l,getContext:a,getOrCreateContext:(t,e="table")=>a(t)??r(t,e),setActiveContextName:t=>{i.hasItem(t)||ce(X`You've tried to activate the "${t}" shortcut context\x20
|
|
54
|
+
that does not exist. Before activation, register the context using the "addContext" method.`),s=t},hasEventShortcut:(t,e)=>{const o=a(t);if(!o)return!1;const n=((t,e)=>{if("string"!=typeof t.key)return[];const o=Ok(t),n=Pk(o),i=n?[]:Dk(t),s=[[o].concat(i)];n||("function"==typeof e&&e()?i.includes("meta"):i.includes("control"))&&s.push([o].concat(Dk(t,!0)));return s})(e,qe);return n.some(t=>o.hasShortcut(t))},isCtrlPressed:()=>!h&&(d.isPressed("control")||d.isPressed("meta")),releasePressedKeys:()=>d.releasePressedKeys(),destroy:()=>d.unmount()}};function jk(t){const{classNames:e}=function(t,e){const o={element:void 0,classNames:[]};let n=t;for(;null!==n&&n!==t.ownerDocument.documentElement&&!o.element;){if("string"==typeof e&&n.classList.contains(e))o.element=n,o.classNames.push(e);else if(e instanceof RegExp){const t=Array.from(n.classList).filter(t=>e.test(t));t.length&&(o.element=n,o.classNames.push(...t))}n=n.parentElement}return o}(t,/ht-theme-[a-zA-Z0-9_-]+/);return e.pop()}function qk(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gk(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Yk(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Gk(t,e,"get"))}function Xk(t,e,o){qk(t,e),e.set(t,o)}function Kk(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Gk(t,e,"set"),o),o}function Zk(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Qk(t,e){qk(t,e),e.add(t)}const Jk="handsontable-core-styles";var tR=new WeakMap,eR=new WeakMap,oR=new WeakMap,nR=new WeakMap,iR=new WeakMap,sR=new WeakMap,rR=new WeakMap,lR=new WeakMap,aR=new WeakMap,hR=new WeakSet,cR=new WeakSet,dR=new WeakSet,uR=new WeakSet,gR=new WeakSet,pR=new WeakSet,fR=new WeakSet,mR=new WeakSet;class wR{getCSSVariableValue(t){if(Yk(this,rR)[`--ht-${t}`])return Yk(this,rR)[`--ht-${t}`];const e=Zk(this,gR,SR).call(this,`--ht-${t}`)??Zk(this,pR,kR).call(this,`--ht-${t}`);return null!==e?(Yk(this,rR)[`--ht-${t}`]=e,e):void 0}getStyleForTD(t){return Yk(this,lR)?.td?.[t]}getDefaultRowHeight(t){const e=Zk(this,cR,vR).call(this);return void 0!==t&&t===Yk(this,tR).view.getFirstRenderedVisibleRow()?(e??0)+1:e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(t){"string"==typeof t&&/ht-theme-.*/.test(t)?(Zk(this,fR,RR).call(this),t!==Yk(this,eR)&&Kk(this,eR,t),Yk(this,aR).call(this,Yk(this,eR)),Zk(this,dR,CR).call(this)):Xe(`${t} isn't a valid theme name. Please ensure it follows the format ht-theme-<theme-name>.`)}getThemeName(){return Yk(this,eR)}recacheValuesMeasuredWithoutStyles(){return!(!Yk(this,iR)||!Zk(this,mR,ER).call(this))&&(this.clearCache(),!0)}clearCache(){Zk(this,fR,RR).call(this),Zk(this,dR,CR).call(this)}constructor({hot:t,rootElement:e,rootDocument:o,onThemeChange:n=t=>{},injectCoreCss:i=!0}){Qk(this,hR),Qk(this,cR),Qk(this,dR),Qk(this,uR),Qk(this,gR),Qk(this,pR),Qk(this,fR),Qk(this,mR),Xk(this,tR,{writable:!0,value:void 0}),Xk(this,eR,{writable:!0,value:void 0}),Xk(this,oR,{writable:!0,value:void 0}),Xk(this,nR,{writable:!0,value:void 0}),Xk(this,iR,{writable:!0,value:void 0}),Xk(this,sR,{writable:!0,value:void 0}),Xk(this,rR,{writable:!0,value:void 0}),Xk(this,lR,{writable:!0,value:void 0}),Xk(this,aR,{writable:!0,value:void 0}),Kk(this,nR,null),Kk(this,iR,!1),Kk(this,rR,{}),Kk(this,lR,{}),Kk(this,tR,t),Kk(this,oR,e),Kk(this,sR,o),Kk(this,aR,n),i&&Zk(this,hR,bR).call(this)}}function bR(){if(!Yk(this,tR)||!Yk(this,sR)||!Yk(this,sR).head)return;const t=Yk(this,sR).getElementById(Jk);if(t&&t instanceof HTMLStyleElement)return;const e=Yk(this,sR).createElement("style");e.id=Jk,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 67,200.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: 18.1.2\n * Release date: 07/10/2026 (built at 07/10/2026 10:00:18)\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}.ht-root-wrapper.ht-shadow-dom{isolation:isolate}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htHorizontallyScrollableByWindow) .ht_master .wtHolder,.ht-root-wrapper.ht-slot-top-filled .ht-wrapper:not(.htVerticallyScrollableByWindow) .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.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;position:relative}.ht-grid-content{height:100%}.ht-slot-top,.ht-slot-bottom{flex:none;overflow-x:auto}.ht-slot-element{box-sizing:border-box;border:1px solid var(--ht-border-color);width:100%}.ht-slot-top>.ht-slot-element:not(:first-of-type){border-top-width:0}.ht-slot-top>.ht-slot-element:last-of-type,.ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-bottom-width:0}.ht-slot-bottom>.ht-slot-element:first-of-type{border-top-width: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{width:100%;height:100%}.handsontable.ht-wrapper:not(.htFirstDatasetColumnNotRendered) :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.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:not(.htHorizontallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htHorizontallyScrollableByWindow).htHasScrollY .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollX .ht_master .wtHolder,.handsontable:not(.htVerticallyScrollableByWindow).htHasScrollY .ht_master .wtHolder{background-color:var(--ht-background-color);box-shadow:inset 0 0 0 1px var(--ht-border-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>th{background-color:var(--ht-row-header-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_even>td{background-color:var(--ht-row-cell-even-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>th{background-color:var(--ht-row-header-odd-background-color)}.handsontable :where(table.htCore>tbody,.htGhostTable>table>tbody)>tr.ht__row_odd>td{background-color:var(--ht-row-cell-odd-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection{outline:none}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.invisibleSelection::selection,.handsontable :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td.invisibleSelection::selection{background:0 0}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child{border-inline-width:0 1px;border-bottom-width:1px;border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:last-child.ht__active_highlight{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child.ht__active_highlight{border-inline-start-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:first-child,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th:nth-child(2){border-inline-start-width:1px}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.current{box-shadow:inset 0 0 0 1px var(--ht-cell-selection-border-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.active{color:var(--ht-header-active-foreground-color);background-color:var(--ht-header-active-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__highlight{color:var(--ht-header-highlighted-foreground-color);background-color:var(--ht-header-highlighted-background-color)}.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>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 :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-prev,.handsontable :where(table.htCore>thead>tr,.htGhostTable>table>thead>tr,table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>th.ht__active_highlight-seam{border-inline-end-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr.ht__row_odd>th.ht__active_highlight,.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>th:first-child:empty:after,.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr:first-of-type>td:first-child:empty:after{content:"";min-height:var(--ht-line-height);display:block}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th{color:var(--ht-header-row-foreground-color);background-color:var(--ht-header-row-background-color);padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th .relative{padding:var(--ht-cell-vertical-padding)var(--ht-cell-horizontal-padding);min-height:100%}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:first-child{border-inline-start-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>td:last-child{border-inline-end-color:var(--ht-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>tbody>tr>th.ht__active_highlight-prev-row{border-bottom-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th{padding:0}.handsontable :where(table.htCore,.htGhostTable>table)>thead>tr>th.ht__active_highlight{box-shadow:-1px 0 0 0 var(--ht-header-active-border-color)}.handsontable :where(table.htCore,.htGhostTable>table)>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 :where(table.htCore,.htGhostTable>table)>thead>tr>th .relative .colHeader{text-overflow:ellipsis;vertical-align:top;flex:auto;min-width:0;overflow:hidden}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td{border-top-color:var(--ht-border-color);border-top-width:1px}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>th.ht__active_highlight-row-seam-bottom,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:first-child>td.ht__active_highlight-row-seam-bottom{border-top-color:var(--ht-header-active-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td{border-bottom-color:var(--ht-border-color)}.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>th.ht__active_highlight-row-seam-top,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr:last-child>td.ht__active_highlight-row-seam-top{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] :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td:first-of-type{border-inline-start-width:1px}.handsontable :where(table.htCore,.htGhostTable>table)>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.htCore,.handsontable:where(.htGhostTable)>table,.handsontable :where(table.htCore,.htGhostTable>table)>thead,.handsontable :where(table.htCore,.htGhostTable>table)>tbody,.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable div:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){box-sizing:content-box}.handsontable input:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))),.handsontable textarea:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){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 :where(table.htCore,.htGhostTable>table)>colgroup>col,.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>col.rowHeader{width:64px}.handsontable :where(table.htCore,.htGhostTable>table)>colgroup>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 :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>td,.handsontable :where(table.htCore>thead,table.htCore>tbody,.htGhostTable>table>thead,.htGhostTable>table>tbody)>tr.hidden>th{display:none}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))){color:var(--ht-link-color)}.handsontable a:not(:where(table.htCore>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput),.htGhostTable>table>tbody>tr>td:not(.htCustomMenuRenderer) :not(.htCheckboxRendererInput))):hover{color:var(--ht-link-hover-color)}.handsontable .ht_clone_top :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .ht_clone_top_inline_start_corner :where(table.htCore>thead>tr)>th:nth-child(2){border-inline-width:0 1px}.handsontable.htRowHeaders :where(table.htCore)>thead>tr>th:nth-child(2){border-inline-start-width:1px}.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns) :where(table.htCore)>thead>tr>th:first-child,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) :where(table.htCore)>tbody>tr>th,.handsontable .ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) :where(table.htCore)>thead>tr>th:first-child{border-inline-width:1px 0}.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr:last-child>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom) :where(table.htCore)>thead>tr.lastChild>th,.handsontable .ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable :where(table.htCore)>thead>tr.lastChild>th{border-bottom-width:0}.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop :where(table.htCore)>tbody>tr:first-child>td,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>tbody>tr:first-child>th,.handsontable.htAutoRowSize .ht_master.innerBorderTop~.ht_clone_inline_start :where(table.htCore)>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 :where(table.htCore>tbody>tr,.htGhostTable>table>tbody>tr)>td[dir=ltr]{border-inline-width:1px 0}[dir=rtl].handsontable :where(table.htCore,.htGhostTable>table)>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{border-radius:var(--ht-border-radius)}.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-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-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-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-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-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-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-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-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-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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .wtHolder,.handsontable.ht-wrapper .ht_master .htCore{border-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_master .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-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-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-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-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-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-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-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-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-border-radius);border-top-right-radius:var(--ht-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-border-radius);border-top-left-radius:var(--ht-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-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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-border-radius)}.handsontable.ht-wrapper .ht_clone_top .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-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-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-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-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-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-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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom_inline_start_corner .htCore>:where(thead,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_bottom_inline_start_corner .htCore>:where(thead,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-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-border-radius);border-bottom-left-radius:var(--ht-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-border-radius);border-bottom-right-radius:var(--ht-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}:is(.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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)),.handsontable.ht-wrapper .ht_clone_bottom .htCore>:where(thead,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-border-radius)}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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:0}.handsontable.ht-wrapper.htHasScrollX:not(.htHorizontallyScrollableByWindow) .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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-top-left-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.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)){border-bottom-right-radius:0}.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}.handsontable.ht-wrapper.htHasScrollY:not(.htVerticallyScrollableByWindow) .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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>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:0}.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}.ht-root-wrapper{border-radius:var(--ht-border-radius)}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-wrapper: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}.ht-root-wrapper.ht-slot-bottom-filled .ht_master .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)){border-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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(.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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)),.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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}.ht-root-wrapper.ht-slot-bottom-filled .htCore>thead>tr:last-child>th:not(.hiddenHeader).htLastVisibleHeader: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-root-wrapper.ht-slot-bottom-filled .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:0}.ht-root-wrapper.ht-slot-bottom-filled .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-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .ht-wrapper: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-root-wrapper.ht-slot-top-filled .ht_master .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)){border-top-left-radius:0;border-top-right-radius:0}.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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-top-right-radius:0}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}:is(.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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)),.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper.ht-slot-top-filled .htCore>thead>tr:first-child>th:not(.hiddenHeader).htLastVisibleHeader: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}.ht-root-wrapper.ht-slot-top-filled .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:0}.ht-root-wrapper.ht-slot-top-filled .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}.ht-root-wrapper .ht-slot-element{border-radius:var(--ht-border-radius)}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:not(:last-of-type){border-radius:0}.ht-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-bottom>.ht-slot-element:last-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:not(:first-of-type){border-radius:0}.ht-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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-root-wrapper .ht-slot-top>.ht-slot-element:first-of-type: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.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 .wtSelectionHandle{box-sizing:border-box;z-index:115;background:var(--ht-cell-selection-handle-background-color);border:var(--ht-cell-selection-handle-border-width)solid var(--ht-cell-selection-handle-border-color);border-radius:var(--ht-cell-selection-handle-border-radius);animation:ht-selection-handle-fade-in var(--ht-table-transition)ease-in-out backwards;position:absolute}.handsontable .wtSelectionHandle:hover{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}@media (prefers-reduced-motion:reduce){.handsontable .wtSelectionHandle{animation:none}}.handsontable .wtSelectionHandle--top,.handsontable .wtSelectionHandle--bottom{width:var(--ht-cell-selection-handle-length);height:var(--ht-cell-selection-handle-size);cursor:ns-resize}.handsontable .wtSelectionHandle--start,.handsontable .wtSelectionHandle--end{width:var(--ht-cell-selection-handle-size);height:var(--ht-cell-selection-handle-length);cursor:ew-resize}.handsontable.ht__resizing-selection--top .wtSelectionHandle:not(.wtSelectionHandle--top),.handsontable.ht__resizing-selection--bottom .wtSelectionHandle:not(.wtSelectionHandle--bottom),.handsontable.ht__resizing-selection--start .wtSelectionHandle:not(.wtSelectionHandle--start),.handsontable.ht__resizing-selection--end .wtSelectionHandle:not(.wtSelectionHandle--end){display:none!important}.handsontable.ht__resizing-selection--top,.handsontable.ht__resizing-selection--top *,.handsontable.ht__resizing-selection--bottom,.handsontable.ht__resizing-selection--bottom *{cursor:ns-resize!important}.handsontable.ht__resizing-selection--start,.handsontable.ht__resizing-selection--start *,.handsontable.ht__resizing-selection--end,.handsontable.ht__resizing-selection--end *{cursor:ew-resize!important}.handsontable.ht__resizing-selection--top .wtSelectionHandle--top,.handsontable.ht__resizing-selection--bottom .wtSelectionHandle--bottom,.handsontable.ht__resizing-selection--start .wtSelectionHandle--start,.handsontable.ht__resizing-selection--end .wtSelectionHandle--end{background:color-mix(in srgb,var(--ht-cell-selection-handle-border-color)30%,var(--ht-cell-selection-handle-background-color))}.handsontable .wtMoveZone{cursor:grab}.handsontable .wtMoveZone:active,.handsontable.ht__moving{cursor:grabbing}.handsontable.ht__moving *{cursor:grabbing!important}.handsontable.ht__moving .wtBorder.area,.handsontable.ht__moving .wtBorder.current{display:none!important}.handsontable.ht__moving .wtSelectionHandle,.handsontable.ht__moving .wtMoveZone{visibility:hidden!important}.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:110;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}@keyframes ht-selection-handle-fade-in{0%{opacity:0}to{opacity:1}}.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;min-width:300px}.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)}.ht-license-badge-wrapper{z-index:1050;pointer-events:none;position:absolute;inset:0;overflow:hidden}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{content:"";inline-size:min(var(--ht-license-badge-size,16px),100%);block-size:min(var(--ht-license-badge-size,16px),100%);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));pointer-events:none;margin:auto;position:absolute;inset:0;inset-inline-start:clamp(0px,100% - var(--ht-license-badge-size,16px),6px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-position:50%;mask-position:50%;-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:hover:after{background-color:var(--ht-license-badge-hover-color,var(--ht-read-only-color,#68696c))}[dir=rtl] .ht-license-badge-on .ht-license-badge-corner thead tr:first-child th:first-child:after{inset-inline-start:0;inset-inline-end:clamp(0px,100% - var(--ht-license-badge-size,16px),6px)}.ht-license-badge{clip-path:inset(50%);white-space:nowrap;color:#0000;background:0 0;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}.ht-license-popover{font-family:var(--ht-font-family),-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;z-index:1051;inline-size:auto;max-inline-size:min(var(--ht-license-popover-width,320px),100vw - 32px);border-radius:var(--ht-border-radius,8px);background-color:var(--ht-license-popover-background-color,#16171a);max-block-size:100%;color:var(--ht-license-popover-foreground-color,#fff);font-size:var(--ht-font-size-small,12px);line-height:var(--ht-line-height-small,18px);text-align:start;pointer-events:auto;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);flex-direction:column;padding:16px;display:none;position:absolute;inset-block-start:0;inset-inline-start:var(--ht-license-badge-area-width,50px);inset-inline-end:0;overflow:visible}.ht-license-popover: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}.ht-license-popover: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}.ht-license-popover:before{content:"";border-block-start:var(--ht-license-popover-tail-size,5px)solid var(--ht-license-popover-background-color,#16171a);border-inline-start:var(--ht-license-popover-tail-size,5px)solid #0000;block-size:0;inline-size:0;position:absolute;inset-block-start:0;inset-inline-end:100%}.ht-license-popover__content{min-block-size:0;overflow-y:auto}.ht-license-badge-wrapper.is-corner-hover:not(.is-dismissed) .ht-license-popover,.ht-license-badge-wrapper:not(.is-dismissed):hover .ht-license-popover,.ht-license-popover.is-open{display:flex}.ht-license-badge-wrapper.is-cornerless .ht-license-badge{display:none}.ht-license-badge-wrapper.is-cornerless .ht-license-popover{inset-inline-start:0}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover: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-border-radius,8px)}.ht-license-badge-wrapper.is-cornerless .ht-license-popover:before{display:none}.ht-license-popover__title{margin-block-end:8px;padding-inline-end:16px;font-weight:700}.ht-license-popover__body{color:var(--ht-license-popover-body-color,#d5d6d8);margin:0 0 12px}.ht-license-popover__link{color:var(--ht-license-popover-link-color,#3ba0ff);text-decoration:none}.ht-license-popover__link:hover{text-decoration:underline}.ht-license-popover__close{block-size:20px;inline-size:20px;color:inherit;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;line-height:1;display:flex;position:absolute;inset-block-start:12px;inset-inline-end:12px}.ht-license-popover__close:before{content:"✕";font-size:14px}.ht-dialog.ht-license-lock{z-index:1070}.ht-dialog.ht-license-lock:before{content:"";block-size:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2);background-color:var(--ht-header-background-color);border-block-end:1px solid var(--ht-cell-horizontal-border-color,var(--ht-border-color));position:absolute;inset-block-start:0;inset-inline:0}.ht-dialog.ht-license-lock:after{content:"";inline-size:var(--ht-license-badge-size,16px);block-size:var(--ht-license-badge-size,16px);background-color:var(--ht-license-badge-color,var(--ht-disabled-color,#a3a3a3));position:absolute;inset-block-start:calc(var(--ht-density-cell-vertical,4px) + (var(--ht-line-height,20px) - var(--ht-license-badge-size,16px))/2);inset-inline-start:var(--ht-cell-horizontal-padding,8px);-webkit-mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf-8,%3Csvg width=%2714.8626%27 height=%2716%27 viewBox=%270 0 14.8626 16%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Cpath d=%27M0 0H3.28665V4.35577H7.03576V0H10.306V11.407H7.03576V6.90834H3.28665V11.407H0V0Z%27 fill=%27%23000%27/%3E%3Cpath d=%27M11.0991 12.236H14.8633V16.0001H11.0991V12.236Z%27 fill=%27%23000%27/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper{padding-block-start:calc(var(--ht-line-height,20px) + var(--ht-density-cell-vertical,4px)*2)}.ht-dialog.ht-license-lock .ht-dialog__content-wrapper-inner,.ht-dialog.ht-license-lock .ht-dialog__content{min-inline-size:0}.ht-dialog.ht-license-lock a.ht-button{text-decoration:none;display:inline-block}.ht-dialog.ht-license-lock .ht-dialog__title,.ht-dialog.ht-license-lock .ht-dialog__description{word-break:break-word;overflow-wrap:break-word}.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}.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 :where(table.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:0}.handsontable.htRowHeaders.htHasRowspanHeaders :where(table.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: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;box-shadow:none!important;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);--ht-cell-vertical-padding:4px;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:var(--ht-cell-vertical-padding)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 td a.ht-hyperlink{color:var(--ht-link-color);text-decoration:underline}.handsontable td a.ht-hyperlink:hover{color:var(--ht-link-hover-color)}.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 .colHeader.columnSorting.sortAction{box-sizing:border-box;min-width:min(var(--ht-icon-size,16px) + 8px,100%);flex-grow:0;max-width:100%;margin-inline:auto;position:static}.handsontable .colHeader.columnSorting.sortAction:before,.handsontable .colHeader.columnSorting.sortAction:after{margin-inline:var(--ht-sort-indicator-offset);margin-inline-end:var(--ht-sort-indicator-offset-end)}.handsontable .htLeft .colHeader.columnSorting.sortAction{margin-left:0;margin-right:auto}.handsontable .htRight .colHeader.columnSorting.sortAction{margin-left:auto;margin-right:0}.handsontable th .relative{--ht-sort-indicator-offset:var(--ht-cell-horizontal-padding);--ht-sort-indicator-offset-end:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-sort-indicator-reserve);--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px)}.handsontable .relative.has-header-button{--ht-sort-indicator-offset-end:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + (var(--ht-icon-button-hit-area-size,24px) - var(--ht-icon-size,16px))*.5);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.handsontable .relative.has-sort-indicator.has-header-button{column-gap:calc(2px + var(--ht-header-button-slot))}.handsontable .relative.has-sort-indicator{--ht-sort-indicator-reserve:calc(var(--ht-cell-horizontal-padding) + var(--ht-icon-size,16px) + 2px);padding-inline-end:var(--ht-sort-indicator-reserve-end)}.handsontable .relative.htRight.has-sort-indicator,.handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}.handsontable .columnSorting:not(.indicatorDisabled){position:relative}.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:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .relative.htRight.has-sort-indicator,[dir=rtl] .handsontable .htRight .relative.has-sort-indicator{--ht-header-button-slot:calc(var(--ht-icon-size,16px) + 2px);padding-inline-start:var(--ht-cell-horizontal-padding);padding-inline-end:var(--ht-sort-indicator-reserve-end)}[dir=rtl] .handsontable .relative.htLeft.has-sort-indicator,[dir=rtl] .handsontable .htLeft .relative.has-sort-indicator{--ht-header-button-slot:0px;padding-inline-start:var(--ht-sort-indicator-reserve);padding-inline-end:var(--ht-cell-horizontal-padding)}[dir=rtl] .handsontable .columnSorting.sortAction:before{text-align:left;left:2px;right:auto}[dir=rtl] .handsontable .htLeft .columnSorting.sortAction:before{text-align:right;left:auto;right:2px}.htGhostTable .htCore .relative{--ht-sort-indicator-offset:0px;--ht-sort-indicator-offset-end:0px;--ht-header-button-slot:0px}.htGhostTable .htCore .relative.has-header-button{--ht-sort-indicator-reserve:var(--ht-cell-horizontal-padding);--ht-sort-indicator-reserve-end:var(--ht-cell-horizontal-padding)}.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 :where(table.htCore>thead>tr)>th:nth-child(2),.handsontable .htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start :where(table.htCore>tbody>tr)>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__active_highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight,.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__active_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-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-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-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-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-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{width:100%;color:var(--ht-pagination-bar-foreground-color);background:var(--ht-pagination-bar-background-color);font-size:var(--ht-font-size);line-height:var(--ht-line-height);box-sizing:border-box;overflow-x:auto}.handsontable.ht-pagination:not(.ht-slot-element){border:1px solid var(--ht-border-color);border-radius:var(--ht-border-radius)}.handsontable.ht-pagination .ht-pagination__inner{justify-content:space-between;align-items:center;gap:calc(var(--ht-gap-size)*4);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}.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-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-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-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}.ht-empty-data-state--disable-bottom-border{border-bottom-width:0}.ht-empty-data-state--disable-bottom-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-bottom-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-bottom-right-radius:0;border-bottom-left-radius:0}.ht-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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-root-wrapper.ht-slot-bottom-filled .ht-empty-data-state: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)}}',Yk(this,sR).head.appendChild(e)}function vR(){const t=this.getCSSVariableValue("line-height"),e=this.getCSSVariableValue("cell-vertical-padding"),o=Math.round(Number.parseFloat(this.getStyleForTD("border-bottom-width")??""));return null===t||null===e||isNaN(o)?null:t+2*e+o}function CR(){Kk(this,iR,!Zk(this,mR,ER).call(this)),Kk(this,nR,getComputedStyle(Yk(this,oR)));const t=Zk(this,uR,yR).call(this,["box-sizing","border-bottom-width"]);Yk(this,lR).td={...Yk(this,lR).td,"box-sizing":t["box-sizing"],"border-bottom-width":t["border-bottom-width"]}}function yR(t){const e=Yk(this,sR),o=Yk(this,oR),n=e.createElement("table"),i=e.createElement("tbody"),s=e.createElement("tr"),r=e.createElement("tr"),l=e.createElement("td");n.className="htCore",r.appendChild(l),i.appendChild(s),i.appendChild(r),n.appendChild(i),o.appendChild(n);const a=getComputedStyle(l),h={};return t.forEach(t=>{h[t]=a.getPropertyValue(t)}),o.removeChild(n),h}function SR(t){const e=Math.ceil(Number.parseFloat(Zk(this,pR,kR).call(this,t)??""));return Number.isNaN(e)?null:e}function kR(t){const e=Yk(this,nR)?.getPropertyValue(t)??null;return""===e?null:e}function RR(){Kk(this,lR,{}),Kk(this,rR,{})}function ER(){if(!Yk(this,oR).isConnected)return!1;const t=Yk(this,oR).ownerDocument.defaultView;return null!==t&&""!==t.getComputedStyle(Yk(this,oR)).display}let xR=null,MR=0;const TR={TOP:"top",BOTTOM:"bottom"},HR="ht-slot-element";function IR(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _R(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,_R(t,e,"get"))}function WR(t,e,o){IR(t,e),e.set(t,o)}function OR(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,_R(t,e,"set"),o),o}function NR(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function PR(t,e){IR(t,e),e.add(t)}var DR=new WeakMap,LR=new WeakMap,zR=new WeakMap,BR=new WeakMap,VR=new WeakMap,FR=new WeakMap,$R=new WeakSet,UR=new WeakSet;class jR{getElement(){return AR(this,DR)}has(t){return AR(this,LR).has(t)}add(t,e,o=0){const n=AR(this,LR).get(t),i=n?n.seq:AR(this,zR);n&&n.element.remove(),AR(this,VR)&&e.classList.add(AR(this,VR)),AR(this,LR).set(t,{element:e,weight:o,seq:i}),n||OR(this,zR,AR(this,zR)+1),NR(this,UR,GR).call(this),AR(this,FR).call(this)}remove(t){const e=AR(this,LR).get(t);e&&(AR(this,VR)&&e.element.classList.remove(AR(this,VR)),e.element.remove(),AR(this,LR).delete(t),AR(this,FR).call(this))}setOrder(t){OR(this,BR,Array.isArray(t)?t.slice():[]),NR(this,UR,GR).call(this)}getOrder(){return NR(this,$R,qR).call(this)}clear(){AR(this,LR).forEach(t=>t.element.remove()),AR(this,LR).clear(),AR(this,FR).call(this)}constructor(t,{itemClass:e="",onContentChange:o=()=>{}}={}){PR(this,$R),PR(this,UR),WR(this,DR,{writable:!0,value:void 0}),WR(this,LR,{writable:!0,value:void 0}),WR(this,zR,{writable:!0,value:void 0}),WR(this,BR,{writable:!0,value:void 0}),WR(this,VR,{writable:!0,value:void 0}),WR(this,FR,{writable:!0,value:void 0}),OR(this,LR,new Map),OR(this,zR,0),OR(this,BR,[]),OR(this,DR,t),OR(this,VR,e),OR(this,FR,o)}}function qR(){const t=AR(this,BR);return Array.from(AR(this,LR).keys()).sort((e,o)=>{const n=t.indexOf(e),i=t.indexOf(o);if(-1!==n||-1!==i)return(-1===n?1/0:n)-(-1===i?1/0:i);const s=AR(this,LR).get(e),r=AR(this,LR).get(o);return s.weight!==r.weight?s.weight-r.weight:s.seq-r.seq})}function GR(){let t=AR(this,DR).firstChild;NR(this,$R,qR).call(this).forEach(e=>{const o=AR(this,LR).get(e).element;o===t?t=t.nextSibling:AR(this,DR).insertBefore(o,t)})}function YR(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function XR(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,YR(t,e,"get"))}function KR(t,e,o){!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,o)}function ZR(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,YR(t,e,"set"),o),o}function QR(t,e){const o=e.parentElement;if(!o)return;const n=null!==e.querySelector(`:scope > .${HR}`);o.classList.toggle(function(t){return`ht-slot-${t}-filled`}(t),n)}var JR=new WeakMap;class tE{getSlot(t){const e=XR(this,JR).get(t);return e||ce(`Unknown layout slot "${t}".`),e}register(t,e,{side:o,weight:n=0}){this.getSlot(o).add(t,e,n)}unregister(t,e){this.getSlot(e).remove(t)}applyConfig(t={}){Object.values(TR).forEach(e=>this.getSlot(e).setOrder(t?.[e]??[]))}destroy(){XR(this,JR).forEach(t=>t.clear())}constructor(t){KR(this,JR,{writable:!0,value:void 0}),ZR(this,JR,new Map(Object.keys(t).map(e=>[e,new jR(t[e],{itemClass:HR,onContentChange:()=>QR(e,t[e])})])))}}const eE="licenseNotification",oE=`plugin:${eE}`,nE="hot-display-license-info";function iE(t){return t.rootSlotBottomElement?.querySelector(`.${nE}`)??null}function sE(t,e){const o=t.rootSlotBottomElement;o&&(e.classList.add(HR),o.appendChild(e),QR(TR.BOTTOM,o),t.getFocusScopeManager().registerScope(eE,e,{shortcutsContextName:oE,runOnlyIf:()=>null!==iE(t),onActivate:e=>{const o=function(t){const e=iE(t);return e?Array.from(e.querySelectorAll("a[href]")):[]}(t);o.length>0&&("tab_from_above"===e?o[0]?.focus():"tab_from_below"===e&&o[o.length-1]?.focus())}}))}const rE="mailto:sales@handsontable.com",lE="mailto:support@handsontable.com",aE="https://handsontable.com/docs/tutorial-license-key.html",hE={trial_valid:{title:"Handsontable Trial",body:({daysRemaining:t})=>`Your Handsontable license key ${Gt(t)}. ${Kt}`,linkText:"Contact Sales",linkHref:rE,dismissible:!1},trial_notice:{title:"Handsontable Trial",body:({daysRemaining:t})=>`Your Handsontable license key ${Gt(t)}. ${Kt}`,linkText:"Contact Sales",linkHref:rE,dismissible:!1},trial_soft_stop:{title:"Handsontable Trial Expired",body:()=>`${Xt} ${Kt}`,linkText:"Contact Sales",linkHref:rE,dismissible:!0}},cE={trial_hard_stop:({licensedUntil:t})=>({title:`Your Handsontable trial license key expired on ${t}.`,description:"You may no longer use Handsontable under the trial license. To continue using the software, contact sales@handsontable.com to purchase a valid license.",action:{text:"Contact Sales",href:rE}}),invalid:()=>({title:"The license key for Handsontable is invalid.",description:"",action:{text:"Contact Support",href:lE},docsLink:{text:"Read more",href:aE,trailingText:" on how to install it properly, or contact us at support@handsontable.com."}}),missing:()=>({title:"The license key for Handsontable is missing.",description:"Use your purchased key to activate the product. Alternatively, you can activate Handsontable to use for non-commercial purposes by passing the key: 'non-commercial-and-evaluation'. ",action:{text:"Contact Support",href:lE},docsLink:{text:"Read more",href:aE,trailingText:" about it in the documentation, or contact us at support@handsontable.com."}})},dE="ht-license-popover",uE="is-open",gE="is-dismissed",pE="is-corner-hover",fE="is-cornerless";function mE(t){const e=t.view?.getOverlayByName(Ba),o=e?.clone?.wtTable;return o?.TABLE?{table:o.TABLE,thead:o.THEAD??null}:null}function wE(t,e){const o=hE[e.state],n=t.rootOverlaysElement;if(!o||!n)return;const i=`${t.guid}-license-popover`,{refs:s}=K`
|
|
55
|
+
<div data-ref="wrapper" class="${"ht-license-badge-wrapper"}">
|
|
56
|
+
<button data-ref="badge" type="button" class="${"ht-license-badge"}"
|
|
57
|
+
aria-label="Handsontable license information"></button>
|
|
58
|
+
<div data-ref="popover" id="${i}" class="${dE}"
|
|
59
|
+
role="${o.dismissible?"dialog":"tooltip"}" aria-labelledby="${i}-title">
|
|
60
|
+
<div class="${dE}__content">
|
|
61
|
+
<div data-ref="popoverTitle" id="${i}-title" class="${dE}__title"></div>
|
|
62
|
+
<p data-ref="popoverBody" class="${dE}__body"></p>
|
|
63
|
+
<a data-ref="popoverLink" class="${dE}__link" target="_blank" rel="noopener noreferrer"></a>
|
|
64
|
+
</div>
|
|
65
|
+
${o.dismissible?`<button data-ref="closeButton" type="button" class="${dE}__close" aria-label="Close"></button>`:""}
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
`,r=s.wrapper,l=s.badge,a=()=>t.hasRowHeaders()&&t.hasColHeaders(),h=()=>{const e=a();r.classList.toggle(fE,!e),t.rootElement?.classList.toggle("ht-license-badge-on",e),mE(t)?.table.classList.toggle("ht-license-badge-corner",e)};h(),t.addHook("afterRender",()=>h());let c=0;const d=()=>{const e=mE(t);if(!e||!a())return;const o=e.table.offsetWidth;o>0&&Math.abs(o-c)>1&&(c=o,r.style.setProperty("--ht-license-badge-area-width",`${o}px`))},u=t.rootWindow;if("function"==typeof u.ResizeObserver){const e=new u.ResizeObserver(()=>d());let o=null;const n=()=>{const n=mE(t)?.table??null;n!==o&&(e.disconnect(),o=n,n&&e.observe(n))};n(),t.addHook("afterRender",()=>n()),t.addHook("afterDestroy",()=>e.disconnect())}else d(),t.addHook("afterRender",()=>d());l.tabIndex=-1;const g=s.popover;s.popoverTitle.textContent=o.title,s.popoverBody.textContent=o.body(e),s.popoverLink.href=o.linkHref,s.popoverLink.textContent=o.linkText,s.popoverLink.tabIndex=-1;let p=!1;g.addEventListener("mouseenter",()=>{p=!0}),g.addEventListener("mouseleave",()=>{p=!1}),function(t,e,o){const n=t.rootElement;n&&(n.addEventListener("mouseover",n=>{const i=n.target instanceof t.rootWindow.Element?n.target:null,s=mE(t)?.thead??null,r=!e.classList.contains(fE)&&null!==i&&null!==s&&s.contains(i);e.classList.toggle(pE,r),o()}),n.addEventListener("mouseleave",()=>{e.classList.remove(pE),o()}))}(t,r,()=>{p||r.classList.contains(pE)||r.classList.remove(gE)}),o.dismissible&&(g.classList.add(uE),s.closeButton.tabIndex=-1,s.closeButton.addEventListener("click",()=>{g.classList.remove(uE),r.classList.add(gE)})),n.appendChild(r)}const bE="ht-dialog",vE="licenseLock",CE=`plugin:${vE}`,yE=vE;function SE(t,e){const{lifecycle:o,channels:n}=e,i=cE[o.state];i?function(t,e){const o=t.rootOverlaysElement;if(!o)return;const n=t.getFocusScopeManager(),i=t.getShortcutManager(),s=t.isRtl(),r=`${t.guid}-license-lock-title`,l=`${t.guid}-license-lock-description`,a=`${bE} ${bE}--confirm handsontable ht-license-lock ${bE}--background-solid ${bE}--show`,{refs:h}=K`
|
|
69
|
+
<div data-ref="lock" class="${a}"
|
|
70
|
+
role="alertdialog" aria-modal="true"
|
|
71
|
+
aria-labelledby="${r}" aria-describedby="${l}"
|
|
72
|
+
tabindex="-1" dir="${s?"rtl":"ltr"}" style="display: block;">
|
|
73
|
+
<div class="${bE}__content-wrapper">
|
|
74
|
+
<div data-ref="inner" tabindex="-1" class="${bE}__content-wrapper-inner">
|
|
75
|
+
<div class="${bE}__content">
|
|
76
|
+
<h2 data-ref="title" id="${r}" class="${bE}__title"></h2>
|
|
77
|
+
<p data-ref="description" id="${l}" class="${bE}__description"></p>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="${bE}__buttons">
|
|
80
|
+
<a data-ref="contactButton" class="ht-button ht-button--secondary" rel="noopener"></a>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`,c=h.lock;if(h.title.textContent=e.title,h.description.textContent=e.description,h.contactButton.textContent=e.action.text,h.contactButton.setAttribute("href",e.action.href),e.docsLink){const o=t.rootDocument.createElement("a");o.href=e.docsLink.href,o.target="_blank",o.rel="noopener",o.textContent=e.docsLink.text,h.description.appendChild(o),h.description.appendChild(t.rootDocument.createTextNode(e.docsLink.trailingText))}const d=()=>Array.from(c.querySelectorAll("a[href], button")),u=()=>{const{view:e}=t,o=e.isHorizontallyScrollableByWindow()?e.getTotalTableWidth():e.getWorkspaceWidth();c.style.width=`${o}px`};t.addHook("afterViewRender",u),(i.getContext(CE)??i.addContext(CE)).addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{const o=d(),n=o.indexOf(t.rootDocument.activeElement),i=e.shiftKey?-1:1;o[(n+i+o.length)%o.length]?.focus()},group:yE}),n.registerScope(vE,c,{shortcutsContextName:CE,type:"modal",onActivate:t=>{const e=d();"tab_from_below"===t?e[e.length-1]?.focus():h.contactButton.focus()}}),o.appendChild(c),t.addHookOnce("afterInit",()=>{u(),t.deselectCell()})}(t,i(o)):n.ui&&wE(t,o)}const kE={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"},RE={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"}},EE=new Set(["name","sizing","density","icons","colors","tokens","colorScheme"]),xE=new Set(["light","dark","auto"]),ME=new Set(["default","compact","comfortable"]),TE=new Set(["arrowRight","arrowRightWithBar","arrowLeft","arrowLeftWithBar","arrowDown","menu","selectArrow","arrowNarrowUp","arrowNarrowDown","check","checkbox","caretHiddenLeft","caretHiddenRight","caretHiddenUp","caretHiddenDown","collapseOff","collapseOn","radio","chipClose","search"]),HE=new Set(["fontFamily","fontSize","fontSizeSmall","lineHeight","lineHeightSmall","fontWeight","letterSpacing","gapSize","iconSize","tableTransition","borderRadius","borderColor","accentColor","foregroundColor","foregroundSecondaryColor","backgroundColor","backgroundSecondaryColor","placeholderColor","readOnlyColor","disabledColor","shadowColor","shadowX","shadowY","shadowBlur","shadowOpacity","barForegroundColor","barBackgroundColor","barHorizontalPadding","barVerticalPadding","cellHorizontalBorderColor","cellVerticalBorderColor","cellHorizontalPadding","cellVerticalPadding","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","cellSelectionHandleSize","cellSelectionHandleLength","cellSelectionHandleBorderWidth","cellSelectionHandleBorderRadius","cellSelectionHandleBorderColor","cellSelectionHandleBackgroundColor","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 IE(t){if(!xE.has(t)){ce(`[ThemeBuilder] Invalid color scheme: "${t}". Must be one of: ${[...xE].join(", ")}.`)}return t}function _E(t){if(!ME.has(t)){ce(`[ThemeBuilder] Invalid density: "${t}". Must be one of: ${[...ME].join(", ")}.`)}return t}function AE(t,e){if(Ce(t)){const o=t;o.type&&o.sizes||ce(`[ThemeBuilder] ${e} must be a string or an object with a 'type' and 'sizes' property.`),_E(String(o.type)),function(t,e){Ce(t)&&"object"==typeof t&&null!==t?Object.keys(t).forEach(t=>{ME.has(t)||Xe(`[ThemeBuilder] Unknown density size key: "${t}" in ${e}.sizes. This may be a custom density size or a typo.`)}):ce(`[ThemeBuilder] ${e}.sizes must be an object.`)}(o.sizes,`${e}.sizes`)}else"string"==typeof t&&_E(t)}function WE(t,e){Object.entries(t).forEach(([t,o])=>{const n=`${e}.${t}`;"string"!=typeof o&&(Ce(o)?WE(o,n):ce(`[ThemeBuilder] ${n} must be a string or an object.`))})}function OE(t,e,o,n={}){const{type:i="key",warnMissing:s=!1}=n;if(!t)return void(s&&Xe(`[ThemeBuilder] No ${i}s provided in ${o}. All ${i}s are missing.`));if(Object.keys(t).forEach(t=>{e.has(t)||Xe(`[ThemeBuilder] Unknown ${i} key: "${t}" in ${o}. This may be a custom ${i} or a typo.`)}),s){const n=[];e.forEach(e=>{e in t||n.push(e)}),n.length>0&&Xe(`[ThemeBuilder] Missing ${i}(s) in ${o}: ${n.join(", ")}`)}}function NE(t,e,o={}){const{requiredFields:n=[]}=o;"object"==typeof t&&null!==t||ce(`[ThemeBuilder] ${e} must be an object.`);const i=t,{name:s,sizing:r,density:l,icons:a,colors:h,tokens:c,colorScheme:d}=i;OE(i,EE,e,{type:"param"}),n.forEach(t=>{void 0===i[t]&&ce(`[ThemeBuilder] ${e}.${t} is required.`)}),void 0!==s&&function(t,e){"string"==typeof t&&""!==t.trim()||ce(`[ThemeBuilder] ${e}.name must be a non-empty string.`)}(s,e),void 0!==r&&(Ce(r)||ce(`[ThemeBuilder] ${e}.sizing must be an object.`)),void 0!==l&&(Ce(l)||"string"==typeof l||ce(`[ThemeBuilder] ${e}.density must be a string or an object.`),AE(l,`${e}.density`)),void 0!==a&&(Ce(a)||ce(`[ThemeBuilder] ${e}.icons must be an object.`),OE(a,TE,`${e}.icons`,{type:"icon",warnMissing:n.includes("icons")})),void 0!==h&&(Ce(h)||ce(`[ThemeBuilder] ${e}.colors must be an object.`),WE(h,`${e}.colors`)),void 0!==c&&(Ce(c)||ce(`[ThemeBuilder] ${e}.tokens must be an object.`),OE(c,HE,`${e}.tokens`,{type:"token",warnMissing:n.includes("tokens")})),void 0!==d&&IE(String(d))}function PE(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DE(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function LE(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,DE(t,e,"get"))}function zE(t,e,o){PE(t,e),e.set(t,o)}function BE(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,DE(t,e,"set"),o),o}function VE(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function FE(t,e){PE(t,e),e.add(t)}const $E=["sizing","icons","colors","tokens"],UE=["name","icons","colors","tokens"];var jE=new WeakMap,qE=new WeakMap,GE=new WeakMap,YE=new WeakMap,XE=new WeakMap,KE=new WeakSet,ZE=new WeakSet,QE=new WeakSet;class JE{subscribe(t){return"function"!=typeof t&&ce("[ThemeBuilder] listener must be a function."),LE(this,GE).add(t),()=>LE(this,GE).delete(t)}params(t){return NE(t,"params"),VE(this,QE,ox).call(this,t),VE(this,KE,tx).call(this),this}setColorScheme(t){return BE(this,YE,IE(t)),LE(this,qE).colorScheme=LE(this,YE),LE(this,jE).colorScheme=LE(this,YE),VE(this,KE,tx).call(this),this}setDensityType(t){return BE(this,XE,_E(t)),LE(this,qE).density.type=LE(this,XE),LE(this,jE).density.type=LE(this,XE),VE(this,KE,tx).call(this),this}getThemeConfig(){return LE(this,qE)}constructor(t){FE(this,KE),FE(this,ZE),FE(this,QE),zE(this,jE,{writable:!0,value:void 0}),zE(this,qE,{writable:!0,value:void 0}),zE(this,GE,{writable:!0,value:void 0}),zE(this,YE,{writable:!0,value:void 0}),zE(this,XE,{writable:!0,value:void 0}),BE(this,GE,new Set),BE(this,YE,"auto"),BE(this,XE,"default"),NE(t,"themeConfig",{requiredFields:UE}),BE(this,jE,{name:void 0,sizing:kE,density:{type:LE(this,XE),sizes:RE},icons:{},colors:{},tokens:{},colorScheme:LE(this,YE)}),VE(this,QE,ox).call(this,t),BE(this,jE,LE(this,qE))}}function tx(){const t=this.getThemeConfig();LE(this,GE).forEach(e=>e(t))}function ex(t,e){if("string"!=typeof e){const o=Ie(t.density,e);t.density=o,void 0!==e.type&&(BE(this,XE,e.type),LE(this,jE)?.density&&(LE(this,jE).density.type=e.type))}else t.density.type=e,BE(this,XE,e),LE(this,jE)?.density&&(LE(this,jE).density.type=e)}function ox(t){const e=pe(LE(this,jE)),o=t;void 0!==t.name&&(void 0!==LE(this,jE).name?Xe('[ThemeBuilder] The "name" property can only be set during `registerTheme()` and cannot be updated via `params()`.'):e.name=t.name),$E.forEach(t=>{void 0!==o[t]&&Ce(o[t])&&(e[t]=Ie(e[t],o[t]))}),void 0!==t.density&&VE(this,ZE,ex).call(this,e,t.density),void 0!==t.colorScheme&&(e.colorScheme=t.colorScheme,BE(this,YE,t.colorScheme),LE(this,jE)?.colorScheme&&(LE(this,jE).colorScheme=t.colorScheme)),BE(this,qE,e)}function nx(t){return new JE(t)}const ix=(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;`,sx="--ht-",rx=["font-family"],lx=["tokens.","colors.","sizing.","density."];function ax(t,e,o={}){if("string"==typeof t&&function(t){return"string"==typeof t&&lx.some(e=>t.includes(e))}(t))return(n=t).includes("tokens.")?`var(${sx}${Tn(n.split(".").slice(1).join("-"))})`:`var(${sx}${Tn(n.split(".").join("-"))})`;var n;if(Array.isArray(t)){if(t.length>=2){const[n,i]=t;return"string"==typeof n&&"string"==typeof i?"light"===o.resolveScheme?ax(n,e,o):"dark"===o.resolveScheme?ax(i,e,o):`light-dark(${ax(n,e,o)}, ${ax(i,e,o)})`:"string"==typeof n?ax(n,e,o):"string"==typeof i?ax(i,e,o):""}return ax(t[0],e,o)}return e&&rx.includes(e)?String(t):Tn(String(t))}function hx(t,e,o,n={}){return`${function(t,e){return`${sx}${t?`${t}-`:""}${Tn(e)}`}(t,e)}: ${ax(o,e,n)};`}function cx(t,e="",o="",n={}){let i="";return Object.entries(t).forEach(([t,s])=>{const r=Tn(t),l=o?`${o}-${r}`:r;Ce(s)?i+=cx(s,e,l,n):n.lightDarkOnly&&!function(t){return Array.isArray(t)&&t.length>=2&&"string"==typeof t[0]&&"string"==typeof t[1]}(s)||(i+=`${hx(e,l,s,n)}\n`)}),i}function dx(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ux(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function gx(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,ux(t,e,"get"))}function px(t,e,o){dx(t,e),e.set(t,o)}function fx(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,ux(t,e,"set"),o),o}function mx(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function wx(t,e){dx(t,e),e.add(t)}function bx(t){return null==t||!1===t||""===t}function vx(t){return"auto"===t?"light dark":t}var Cx=new WeakMap,yx=new WeakMap,Sx=new WeakMap,kx=new WeakSet,Rx=new WeakSet,Ex=new WeakSet,xx=new WeakSet,Mx=new WeakSet,Tx=new WeakSet,Hx=new WeakSet;class Ix{getClassName(){return this.themeClassName}getOverrides(){return{...gx(this,yx)}}getColorScheme(){return gx(this,yx).colorScheme??this.themeConfig?.colorScheme}getDensityType(){return gx(this,yx).density??this.themeConfig?.density?.type}setOverrides(t){return!!mx(this,Rx,Ax).call(this,t)&&(mx(this,Mx,Nx).call(this),!0)}update(t){var e;this.hot&&(void 0===t.getThemeConfig&&ce('[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=gx(this,Cx))||void 0===e||e.call(this),fx(this,Cx,t.subscribe(t=>{this.hot?.stylesHandler&&(this.themeConfig=t,mx(this,Mx,Nx).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(){mx(this,Tx,Px).call(this),mx(this,Mx,Nx).call(this)}unmount(){mx(this,Hx,Dx).call(this),this.themeStyles&&this.themeStyles.remove()}destroy(){var t;null===(t=gx(this,Cx))||void 0===t||t.call(this),this.unmount(),this.hot.themeManager=null}constructor({hot:t,themeObject:e,overrides:o}){wx(this,kx),wx(this,Rx),wx(this,Ex),wx(this,xx),wx(this,Mx),wx(this,Tx),wx(this,Hx),px(this,Cx,{writable:!0,value:void 0}),px(this,yx,{writable:!0,value:void 0}),px(this,Sx,{writable:!0,value:void 0}),this.themeStyles=null,this.themeClassName="",this.themeConfig=null,fx(this,Cx,null),fx(this,yx,{}),fx(this,Sx,null),this.hot=t,this.scopeClassName=`ht-scope-${t.guid}`,o&&mx(this,Rx,Ax).call(this,o),this.update(e)}}function _x(t,e,o,n){if(!bx(t))try{return o(String(t))}catch{return Xe(`[ThemeManager] Ignoring the \`${e}\` option: ${JSON.stringify(t)} is not a supported value.`),n}}function Ax(t){const e={...gx(this,yx)};Object.prototype.hasOwnProperty.call(t,"colorScheme")&&(e.colorScheme=mx(this,kx,_x).call(this,t.colorScheme,"colorScheme",IE,gx(this,yx).colorScheme)),Object.prototype.hasOwnProperty.call(t,"density")&&(e.density=mx(this,kx,_x).call(this,t.density,"density",_E,gx(this,yx).density));const o=e.colorScheme!==gx(this,yx).colorScheme||e.density!==gx(this,yx).density;return fx(this,yx,e),o}function Wx(t){if(!this.themeConfig)return"";const e={resolveScheme:t,lightDarkOnly:!0};let o="";return this.themeConfig.colors&&(o+=cx(this.themeConfig.colors,"colors","",e)),this.themeConfig.tokens&&(o+=cx(this.themeConfig.tokens,"","",e)),o}function Ox(){const{colorScheme:t,density:e}=gx(this,yx);if(!t&&!e)return"";const o=`.${this.themeClassName}.${this.scopeClassName}`,n=e?this.themeConfig?.density?.sizes?.[e]:void 0;let i="";if(n)i+=`${o} {\n${cx(n,"density")}}\n`;else if(e){const t=`${this.themeConfig?.name}:${e}`;gx(this,Sx)!==t&&(fx(this,Sx,t),Xe(`[ThemeManager] The "${this.themeConfig?.name}" theme has no "${e}" density sizes, so the \`density\` option has no effect. Add the sizes to the theme configuration.`))}return t&&(i+=`${o} {\ncolor-scheme: ${vx(t)};\n`,i+=mx(this,Ex,Wx).call(this,"dark"===t?"dark":"light"),i+="}\n","auto"===t&&(i+=`@media (prefers-color-scheme: dark) {\n${o} {\n${mx(this,Ex,Wx).call(this,"dark")}}\n}\n`)),i}function Nx(){if(!(this.themeConfig&&this.hot&&this.hot.rootDocument&&this.hot.rootWrapperElement))return;const t=vx(this.themeConfig.colorScheme);var e;this.themeStyles||(this.themeStyles=this.hot.rootDocument.createElement("style"),this.themeStyles.setAttribute("data-hot-theme-style","true")),this.themeStyles.textContent=`:where(.${this.themeClassName}) {\n`,this.themeConfig.sizing&&(this.themeStyles.textContent+=cx(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+=cx(this.themeConfig.density.sizes[this.themeConfig.density.type],"density")),this.themeConfig.colors&&(this.themeStyles.textContent+=cx(this.themeConfig.colors,"colors")),this.themeConfig.tokens&&(this.themeStyles.textContent+=cx(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 ${ix(e,"arrowRight")}\n}\n\n.ht-page-size-section__select-wrapper::after {\n ${ix(e,"arrowDown")}\n}\n\n.changeType::before {\n ${ix(e,"menu")}\n}\n\n.htUISelectCaption::after,\n.htAutocompleteArrow::after {\n ${ix(e,"selectArrow")}\n}\n\n.columnSorting.sortAction.ascending::before {\n ${ix(e,"arrowNarrowUp")}\n}\n\n.columnSorting.sortAction.descending::before {\n ${ix(e,"arrowNarrowDown")}\n}\n\n.ht-page-navigation-section .ht-page-first::before {\n ${ix(e,"arrowLeftWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-first::before {\n ${ix(e,"arrowRightWithBar")}\n}\n\n.ht-page-navigation-section .ht-page-prev::before {\n ${ix(e,"arrowLeft")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-prev::before {\n ${ix(e,"arrowRight")}\n}\n\n.ht-page-navigation-section .ht-page-next::before {\n ${ix(e,"arrowRight")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-next::before {\n ${ix(e,"arrowLeft")}\n}\n\n.ht-page-navigation-section .ht-page-last::before {\n ${ix(e,"arrowRightWithBar")}\n}\n\n[dir="rtl"] .ht-page-navigation-section .ht-page-last::before {\n ${ix(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 ${ix(e,"check")}\n}\n\n.htCheckboxRendererInput {\n appearance: none;\n}\n\n.htCheckboxRendererInput::after {\n ${ix(e,"checkbox")}\n}\n\nth.beforeHiddenColumn::after {\n ${ix(e,"caretHiddenLeft")}\n}\n\nth.afterHiddenColumn::before {\n ${ix(e,"caretHiddenRight")}\n}\n\nth.beforeHiddenRow::after {\n ${ix(e,"caretHiddenUp")}\n}\n\nth.afterHiddenRow::before {\n ${ix(e,"caretHiddenDown")}\n}\n\n.collapsibleIndicator::before,\n.ht_nestingButton::before {\n ${ix(e,"collapseOff")}\n}\n\n.collapsibleIndicator.collapsed::before,\n.ht_nestingButton.ht_nestingExpand::before {\n ${ix(e,"collapseOn")}\n}\n\n.htUIRadio > input[type="radio"]::after {\n ${ix(e,"radio")}\n}\n\n.ht-multi-select-chip-remove::before {\n ${ix(e,"chipClose")}\n}\n\n.ht-notification__close::before {\n ${ix(e,"chipClose")}\n}\n\n.ht-multi-select-editor-search-icon {\n ${ix(e,"search")}\n}\n\n.ht-multi-select-editor-item-selected input::after {\n ${ix(e,"checkbox")}\n}`)),this.themeStyles.textContent+="}\n",this.themeStyles.textContent+=`.${this.themeClassName} {\ncolor-scheme: ${t};\n}\n`,this.themeStyles.textContent+=mx(this,xx,Ox).call(this),this.themeStyles.parentNode!==this.hot.rootWrapperElement&&this.hot.rootWrapperElement.prepend(this.themeStyles)}function Px(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(t=>{t&&po(t,this.scopeClassName)})}function Dx(){[this.hot?.rootWrapperElement,this.hot?.rootPortalElement].forEach(t=>{t&&fo(t,this.scopeClassName)})}const Lx={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",borderRadius:"sizing.size_1",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%",cellSelectionHandleSize:"sizing.size_2",cellSelectionHandleLength:"sizing.size_4",cellSelectionHandleBorderWidth:"sizing.size_0_25",cellSelectionHandleBorderRadius:"sizing.size_3",cellSelectionHandleBorderColor:"tokens.accentColor",cellSelectionHandleBackgroundColor:"tokens.backgroundColor",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:zx,getItem:Bx,getNames:Vx,getValues:Fx,register:$x}=oi("themes");function Ux(t){return zx(t)}function jx(t){if(Ux(t))return Bx(t);Xe(`Theme "${t}" is not registered. Please ensure it is registered before using it.`)}function qx(t,e){let o=t,n=pe(e);return"string"==typeof t&&Ce(e)?n.name=t:"string"!=typeof t&&Ce(t)&&(n=pe(t),o=n.name??""),{themeName:o,themeConfigObject:n}}function Gx(t,e){const{themeName:o,themeConfigObject:n}=qx(t,e),i=nx(n);return Ux(o)?(Xe(`Theme "${o}" is already registered. Registration skipped.`),jx(o)):($x(o,i),i)}let Yx=null;function Xx(t){if(0===t.length)return[];const e=[...t];e.sort(([t],[e])=>t===e?0:t>e?1:-1);return B(e,(t,[e,o])=>{const n=t[t.length-1],[i,s]=n,r=i+s;if(e<=r){const t=Math.max(o-(r-e),0);n[1]+=t}else t.push([e,o]);return t},[e[0]])}const Kx=new Map,Zx=[{name:"persistentState",version:"17.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/changelog-17/"},{name:"correctFormat",version:"18.0.0",migrationUrl:"https://handsontable.com/docs/javascript-data-grid/migration-from-17.1-to-18.0/"}];function Qx(t){const e=[t,...Array.isArray(t.columns)?t.columns:[],...Array.isArray(t.cell)?t.cell:[]];Zx.forEach(({name:t,version:o,migrationUrl:n})=>{e.some(e=>Ce(e)&&At(e[t]))&&Je(`Core.removedOption.${t}`,`The "${t}" setting was removed in Handsontable ${o} and is ignored. See ${n} for the migration path.`)})}function Jx(t,e,o,n,i,s,r){const l=r.ariaTags,a=[],h=[],c=[],d=[];r._isBaseRendererCalled=!0,r.className&&po(e,r.className),r.readOnly?(a.push(r.readOnlyCellClassName),l&&d.push(["aria-readonly","true"])):l&&c.push("aria-readonly"),!1===r.valid&&r.invalidCellClassName?(a.push(r.invalidCellClassName),l&&d.push(["aria-invalid","true"])):(h.push(r.invalidCellClassName),l&&c.push("aria-invalid")),!1===r.wordWrap&&r.noWordWrapClassName&&a.push(r.noWordWrapClassName),Ot(s)&&r.placeholder&&a.push(r.placeholderCellClassName),r.textEllipsis&&a.push("htTextEllipsis"),fo(e,h),po(e,a),wo(e,c),mo(e,d)}function tM(t,e,o){t.addEventListener(e,o,!1)}function eM(t,e,o){t.removeEventListener(e,o,!1)}function oM(t){return t.ownerDocument.defaultView.getComputedStyle(t)}function nM(t,e={}){const o={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:t=>t.value,...e},n=t.body,i=t.createTextNode(""),s=t.createElement("span");let r;function l(){i.textContent=o.textContent(r),s.style.position="absolute",s.style.fontSize=oM(r).fontSize,s.style.fontFamily=oM(r).fontFamily,s.style.whiteSpace="pre",n.appendChild(s);const t=Number.parseInt(oM(r)?.paddingInlineStart||"0",10),e=Number.parseInt(oM(r)?.paddingInlineEnd||"0",10),l=s.clientWidth+t+e+1;n.removeChild(s);const a=r.style;a.height=`${o.minHeight}px`,o.minWidth>l?a.width=`${o.minWidth}px`:l>o.maxWidth?a.width=`${o.maxWidth}px`:a.width=`${l}px`;const h=r.scrollHeight?r.scrollHeight-1:0;o.minHeight>h?a.height=`${o.minHeight}px`:o.maxHeight<h?(a.height=`${o.maxHeight}px`,a.overflowY="visible"):a.height=`${h}px`}function a(){t.defaultView.setTimeout(l,0)}function h(t,e){if("inherit"===t)return e;const o=Number.parseInt(String(t),10);return isNaN(o)?void 0:o}return{init:function(t,e,n=!1){r=t,function(t){if(t&&t.minHeight){const e=h(t.minHeight,r.clientHeight);void 0!==e&&(o.minHeight=e)}if(t&&t.maxHeight){const e=h(t.maxHeight,r.clientHeight);void 0!==e&&(o.maxHeight=e)}if(t&&t.minWidth){const e=h(t.minWidth,r.clientWidth);void 0!==e&&(o.minWidth=e)}if(t&&t.maxWidth){const e=h(t.maxWidth,r.clientWidth);void 0!==e&&(o.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=`${o.minHeight}px`,r.style.minWidth=`${o.minWidth}px`,r.style.maxWidth=`${o.maxWidth}px`,r.style.overflowY="hidden"),n&&(tM(r,"input",l),tM(r,"keydown",a)),l()},resize:l,unObserve(){eM(r,"input",l),eM(r,"keydown",a)}}}function iM(t,e){const o=Bo(e),n=e.value.split("\n");let i=o,s=0;for(let e=0;e<n.length;e++){const r=n[e];0!==e&&(s+=n[e-1].length+1);const l=s+r.length;if("home"===t?i=s:"end"===t&&(i=l),o<=l)break}Fo(e,i,i)}Jx.RENDERER_TYPE="base";const sM="ht_editor_hidden",rM="textEditor";class lM extends Ti{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(),oo(rn(this.hot.rootDocument),this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(t,e,o,n,i,s){const r=this.state;if(super.prepare(t,e,o,n,i,s),!s.readOnly){this.refreshDimensions(!0);const{allowInvalid:t}=s;t&&!this.isOpened()&&(this.TEXTAREA.value=""),r===Ei.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(t,e){this.state===Ei.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(t,e))}focus(){this.TEXTAREA.select(),Fo(this.TEXTAREA,this.TEXTAREA.value.length,this.TEXTAREA.value.length)}createElements(t="textarea"){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement(t),mo(this.TEXTAREA,[["data-hot-input",""],b(-1)]),po(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"),po(this.TEXTAREA_PARENT,"handsontableInputHolder"),go(this.TEXTAREA_PARENT,this.layerClass)&&fo(this.TEXTAREA_PARENT,this.layerClass),po(this.TEXTAREA_PARENT,sM),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){Le.edge.value&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",fo(this.TEXTAREA_PARENT,this.layerClass),po(this.TEXTAREA_PARENT,sM)}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;as(t.length-1,o=>{if(go(t[o],"handsontableEditor"))return e=!0,!1}),go(this.TEXTAREA_PARENT,sM)&&fo(this.TEXTAREA_PARENT,sM),e?(this.layerClass="ht_editor_visible",po(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),po(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!==Ei.EDITING&&!t)return;if(this.TD=this.getEditedCell(),!this.TD)return void(t||this.close());const e=this.getEditedCellRect();if(!e)return;const{top:o,start:n,width:i,maxWidth:s,height:r,maxHeight:l}=e;this.textareaParentStyle.top=`${o}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(i,s),minHeight:Math.min(r,l),maxWidth:s,maxHeight:l},!0)}bindEvents(){$e()&&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===Ei.EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===Ei.EDITING&&this.focus()})}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={runOnlyIf:()=>At(this.hot.getSelected()),group:rM},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:t=>!this.hot.selection.isMultiple()&&!t?.altKey},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(o(),!1)},{keys:[["Home"]],callback:(t,e)=>{iM(e?.[0]??"",this.TEXTAREA)}},{keys:[["End"]],callback:(t,e)=>{iM(e?.[0]??"",this.TEXTAREA)}}],e)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(rM)}constructor(t){super(t),this.eventManager=new _i(this),this.autoResize=nM(this.hot.rootDocument),this.eventManager=new _i(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}}function aM(t,e,o,n,i,s,r){let l=s;Ot(l)&&r.placeholder&&(l=r.placeholder);const a=_t(l);let h=a;r.trimWhitespace&&(h=a.trim()),Eo(e,h)}aM.RENDERER_TYPE="text";const hM={CELL_TYPE:"text",editor:lM,renderer:aM},cM=function(t,e,o=!1){let n=this;const i=new _i(n);let s,r,l,a,h,c,d=!0,u=!1,g=null;const p={...e.initialState,...e};var f;Rp(o)&&(f=this,Sp.set(f,!0)),this.rootContainer=t,this.rootWrapperElement=null,this.rootGridElement=null,this.rootGridContentElement=null,this.rootSlotTopElement=null,this.rootSlotBottomElement=null,this.rootOverlaysElement=null,this.rootPortalElement=null,this.rootElement=Ep(this)?t.ownerDocument.createElement("div"):t,this.rootDocument=t.ownerDocument,this.rootWindow=this.rootDocument.defaultView,Ep(this)&&(this.rootWrapperElement=this.rootDocument.createElement("div"),this.rootSlotTopElement=this.rootDocument.createElement("div"),this.rootGridElement=this.rootDocument.createElement("div"),this.rootGridContentElement=this.rootDocument.createElement("div"),this.rootOverlaysElement=this.rootDocument.createElement("div"),this.rootSlotBottomElement=this.rootDocument.createElement("div"),this.rootPortalElement=this.rootDocument.createElement("div"),po(this.rootElement,["ht-wrapper","handsontable"]),po(this.rootWrapperElement,"ht-root-wrapper"),nn(this.rootContainer.getRootNode())&&po(this.rootWrapperElement,"ht-shadow-dom"),po(this.rootSlotTopElement,"ht-slot-top"),po(this.rootGridElement,"ht-grid"),po(this.rootGridContentElement,"ht-grid-content"),po(this.rootOverlaysElement,"ht-overlay"),po(this.rootSlotBottomElement,"ht-slot-bottom"),this.rootGridContentElement.appendChild(this.rootElement),this.rootGridElement.appendChild(this.rootGridContentElement),this.rootWrapperElement.appendChild(this.rootSlotTopElement),this.rootWrapperElement.appendChild(this.rootGridElement),this.rootWrapperElement.appendChild(this.rootSlotBottomElement),this.rootWrapperElement.appendChild(this.rootOverlaysElement),this.rootContainer.appendChild(this.rootWrapperElement),this.rootWrapperElement.__hotInstance=this,po(this.rootPortalElement,"ht-portal"),this.rootDocument.body.appendChild(this.rootPortalElement)),this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const m=p?.layoutDirection??"inherit",w=["rtl","ltr"].includes(m)?m:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",w),this.rootWrapperElement?.setAttribute("dir",w),this.isRtl=function(){return"rtl"===w},this.isLtr=function(){return!n.isRtl()},this.getDirectionFactor=function(){return n.isLtr()?1:-1},this.stylesHandler=new wR({hot:n,rootElement:n.rootElement,rootDocument:n.rootDocument,onThemeChange:t=>{Ep(this)&&(fo(this.rootWrapperElement,/ht-theme-.*/g),fo(this.rootPortalElement,/ht-theme-.*/g),t&&(po(this.rootWrapperElement,t),po(this.rootPortalElement,t),getComputedStyle(this.rootWrapperElement).getPropertyValue("--ht-line-height")||Xe(`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,p.language=function(t){let e=$m(t);return wv(e)||(e=cv,Um(t)),e}(p.language);const b=Object.fromEntries(Object.entries(p).filter(([t])=>!(Qn.getSingleton().isRegistered(t)||Qn.getSingleton().isDeprecated(t)))),v=new Gy(n,b,[gS,Qy]),C=v.getTableMeta(),y=v.getGlobalMeta(),S=vs();this.container=this.rootDocument.createElement("div"),this.rootElement.insertBefore(this.container,this.rootElement.firstChild),this.guid=`ht_${Sn()}`,Kx.set(this.guid,this),this.columnIndexMapper=new Lm,this.rowIndexMapper=new Lm,this.columnIndexMapper.addLocalHook("indexesSequenceChange",t=>{n.runHooks("afterColumnSequenceChange",t)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",t=>{n.runHooks("afterRowSequenceChange",t)}),i.addEventListener(this.rootDocument.documentElement,"compositionstart",t=>{n.runHooks("beforeCompositionStart",t)}),r=new JC(n);const k=oi(this.guid);k.register("cellRangeMapper",new WS({rowIndexMapper:this.rowIndexMapper,columnIndexMapper:this.columnIndexMapper})),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let R=new OC(C,{rowIndexMapper:n.rowIndexMapper,columnIndexMapper:n.columnIndexMapper,countCols:()=>n.countCols(),countRows:()=>n.countRows(),propToCol:t=>s.propToCol(t),isEditorOpened:()=>{const t=n.getActiveEditor();return!!t&&t.isOpened()},isPluginEnabled:t=>!0===n.getPlugin(t)?.enabled,countRenderableColumns:()=>n.view.countRenderableColumns(),countRenderableRows:()=>n.view.countRenderableRows(),countRowHeaders:()=>n.countRowHeaders(),countColHeaders:()=>n.countColHeaders(),countRenderableRowsInRange:(t,e)=>n.view.countRenderableRowsInRange(t,e),countRenderableColumnsInRange:(t,e)=>n.view.countRenderableColumnsInRange(t,e),getShortcutManager:()=>n.getShortcutManager(),createCellCoords:(t,e)=>n._createCellCoords(t,e),createCellRange:(t,e,o)=>n._createCellRange(t,e,o),visualToRenderableCoords:t=>{const{row:e,col:o}=t;return n._createCellCoords(e>=0?n.rowIndexMapper.getRenderableFromVisualIndex(e):e,o>=0?n.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:t=>{const{row:e,col:o}=t;return n._createCellCoords(e>=0?n.rowIndexMapper.getVisualFromRenderableIndex(e):e,o>=0?n.columnIndexMapper.getVisualFromRenderableIndex(o):o)},findFirstNonHiddenRenderableRow:(t,e)=>{const o=e>t?1:-1,i=Math.min(t,e),s=Math.max(t,e),r=n.rowIndexMapper.getNearestNotHiddenIndex(t,o);return null===r||1===o&&r>s||-1===o&&r<i?null:r>=0?n.rowIndexMapper.getRenderableFromVisualIndex(r):r},findFirstNonHiddenRenderableColumn:(t,e)=>{const o=e>t?1:-1,i=Math.min(t,e),s=Math.max(t,e),r=n.columnIndexMapper.getNearestNotHiddenIndex(t,o);return null===r||1===o&&r>s||-1===o&&r<i?null:r>=0?n.columnIndexMapper.getRenderableFromVisualIndex(r):r},isDisabledCellSelection:(t,e)=>t<0||e<0?n.getSettings().disableVisualSelection:n.getCellMeta(t,e).disableVisualSelection});this.selection=R;const E=({hiddenIndexesChanged:t})=>{this.forceFullRender=!0,t&&this.selection.commit()};function x(t,e){const o="className"===t?n.rootElement:n.table;if(d)void 0!==e&&po(o,e);else{let n=[],i=[];if(y[t]){const e=y[t];n=Array.isArray(e)?e:Y(String(e))}e&&(i=Array.isArray(e)?e:Y(e));const s=G(n,i),r=G(i,n);s.length&&fo(o,s),r.length&&po(o,r)}y[t]=e}function M(t){const e={};return Te(t,"colorScheme")&&(e.colorScheme=t.colorScheme),Te(t,"density")&&(e.density=t.density),e}function T(){return{colorScheme:C.colorScheme,density:C.density}}function H(t,e){let o;n.themeManager?.destroy(),void 0===t?(o=Ux("main")?jx("main"):Gx(Lx),o=jx("main")):o="function"!=typeof t.getThemeConfig?Gx(t):t,n.themeManager=function({hot:t,themeObject:e,overrides:o}){return new Ix({hot:t,themeObject:e,overrides:o})}({hot:n,themeObject:o,overrides:e})}function I(){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(t){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===t&&(t=!0,this.onQueueEmpty(this.valid))}}}function _(t,e){return!!e?.isOpened()&&function(t,e,o){return t.some(([t,n])=>t===e&&n===o)}(t,e.row,e.prop)}function A(t,e,o){if(!t.length)return void o();const i=n.getActiveEditor(),r=I();let l=!0;const a=([e,o,,n])=>{const i=t.findIndex(([t,n])=>t===e&&n===o);-1!==i&&(t[i][3]=n)},h=(t,e)=>{"string"==typeof e&&e.endsWith("Validator")&&t?.forEach(a)};n.addHook("afterChange",h),r.onQueueEmpty=()=>{n.removeHook("afterChange",h),i&&l&&i._closeAfterDataChange&&_(t,i)&&i.cancelChanges(),o()};for(let o=t.length-1;o>=0;o--){const[i,a,,h]=t[o],c=s.propToCol(a);let d;Number.isInteger(c)?(d=n.getCellMetaTransient(i,c),n.getCellValidator(d)&&(d=n.getCellMeta(i,c))):d={...Object.getPrototypeOf(C),...C},n.getCellValidator(d)&&(r.addValidatorToQueue(),n.validateCell(h,d,function(e,o){return function(n){"boolean"!=typeof n&&ce("Validation error: result is not boolean"),!1===n&&!1===o.allowInvalid&&(l=!1,t.splice(e,1),o.valid=!0),r.removeValidatorFormQueue()}}(o,d),e))}r.checkIfQueueIsEmpty()}function W(t,e){for(let e=t.length-1;e>=0;e--){let o=!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(C.allowInsertRow)for(;t[e][0]>n.countRows()-1;){const i=t[e][0]-(n.countRows()-1),{delta:r}=s.createRow(void 0,i,{source:"auto"});if(0===r){o=!0;break}}if("array"===n.dataType&&(!C.columns||0===C.columns.length)&&C.allowInsertColumn)for(;Number(s.propToCol(t[e][1]))>n.countCols()-1;){const i=Number(s.propToCol(t[e][1]))-(n.countCols()-1),{delta:r}=s.createCol(void 0,i,{source:"auto"});if(0===r){o=!0;break}}o||s.set(t[e][0],t[e][1],t[e][3])}}else t.splice(e,1)}const o=t.length>0,i=a.getActiveEditor(),r=i?._closeAfterDataChange,h=_(t,i);o?(l.adjustRowsAndCols(),n.runHooks("beforeChangeRender",t,e),i?.isOpened()&&r&&h&&a.closeEditor(),n.view.adjustElementsSize(),n.render(),(i?.isOpened()&&r&&h||!i?.isOpened())&&a.prepareEditor(),n.runHooks("afterChange",t,e||"edit"),!i||void 0===i.refreshValue||i.isOpened()&&!h||i.refreshValue()):n.render()}function O(t,e,o){return Array.isArray(t)?t:[[t,e,o]]}function N(t,e){const o=n.runHooks("beforeChange",t,e||"edit"),i=t.filter(t=>null!==t);if(!1===o||0===i.length)return n.getActiveEditor()?.cancelChanges(),[];for(let t=i.length-1;t>=0;t--){const[e,o,,r]=i[t],l=s.propToCol(o);let a;a=Number.isInteger(l)?n.getCellMetaTransient(e,l):{...Object.getPrototypeOf(C),...C},i[t][3]=yi(r,a)}return i}this.columnIndexMapper.addLocalHook("cacheUpdated",t=>{E(t),this.runHooks("afterColumnSequenceCacheUpdate",t)}),this.rowIndexMapper.addLocalHook("cacheUpdated",t=>{E(t),this.runHooks("afterRowSequenceCacheUpdate",t)}),this.selection.addLocalHook("afterSetRangeEnd",(t,e)=>{const o=Me(!1),i=this.selection.getSelectedRange(),{from:s,to:r}=i.current(),l=i.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,o,l),this.runHooks("afterSelectionByProp",s.row,n.colToProp(s.col),r.row,n.colToProp(r.col),o,l);const h=R.getSelectionSource();!e||["loadData","updateData","deselect","shift"].includes(h)||o.isTouched()&&(!o.isTouched()||o.value)||c.scrollTo(t);const d=R.isSelectedByRowHeader(),u=R.isSelectedByColumnHeader();d&&u?po(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?(fo(this.rootElement,"ht__selection--columns"),po(this.rootElement,"ht__selection--rows")):u?(fo(this.rootElement,"ht__selection--rows"),po(this.rootElement,"ht__selection--columns")):fo(this.rootElement,["ht__selection--rows","ht__selection--columns"]),["shift","refresh","loadData","updateData","deselect"].includes(h)||a.closeEditor(),["refresh","loadData","updateData","deselect"].includes(h)||(n.view.render(),a.prepareEditor())}),this.selection.addLocalHook("beforeSetFocus",t=>{this.runHooks("beforeSelectionFocusSet",t.row,t.col)}),this.selection.addLocalHook("afterSetFocus",t=>{const e=Me(!1);this.runHooks("afterSelectionFocusSet",t.row,t.col,e),(!e.isTouched()||e.isTouched()&&!e.value)&&c.scrollTo(t),a.closeEditor(),n.view.render(),a.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",t=>{const e=t.length-1,{from:o,to:i}=t[e];this.runHooks("afterSelectionEnd",o.row,o.col,i.row,i.col,e),this.runHooks("afterSelectionEndByProp",o.row,n.colToProp(o.col),i.row,n.colToProp(i.col),e),["refresh","deselect"].includes(R.getSelectionSource())&&(n.view.render(),a.prepareEditor())}),this.selection.addLocalHook("afterIsMultipleSelection",t=>{const e=this.runHooks("afterIsMultipleSelection",t.value);t.value&&(t.value=e)}),this.selection.addLocalHook("afterDeselect",()=>{a.closeEditor(),n.view.render(),fo(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>n.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(...t)=>n.runHooks("beforeSetRangeStart",...t)).addLocalHook("beforeSetRangeStartOnly",(...t)=>n.runHooks("beforeSetRangeStartOnly",...t)).addLocalHook("beforeSetRangeEnd",(...t)=>n.runHooks("beforeSetRangeEnd",...t)).addLocalHook("beforeSelectColumns",(...t)=>n.runHooks("beforeSelectColumns",...t)).addLocalHook("afterSelectColumns",(...t)=>n.runHooks("afterSelectColumns",...t)).addLocalHook("beforeSelectRows",(...t)=>n.runHooks("beforeSelectRows",...t)).addLocalHook("afterSelectRows",(...t)=>n.runHooks("afterSelectRows",...t)).addLocalHook("beforeSelectAll",(...t)=>n.runHooks("beforeSelectAll",...t)).addLocalHook("afterSelectAll",(...t)=>n.runHooks("afterSelectAll",...t)).addLocalHook("beforeModifyTransformStart",(...t)=>n.runHooks("modifyTransformStart",...t)).addLocalHook("afterModifyTransformStart",(...t)=>n.runHooks("afterModifyTransformStart",...t)).addLocalHook("beforeModifyTransformFocus",(...t)=>n.runHooks("modifyTransformFocus",...t)).addLocalHook("afterModifyTransformFocus",(...t)=>n.runHooks("afterModifyTransformFocus",...t)).addLocalHook("beforeModifyTransformEnd",(...t)=>n.runHooks("modifyTransformEnd",...t)).addLocalHook("afterModifyTransformEnd",(...t)=>n.runHooks("afterModifyTransformEnd",...t)).addLocalHook("beforeRowWrap",(...t)=>n.runHooks("beforeRowWrap",...t)).addLocalHook("beforeColumnWrap",(...t)=>n.runHooks("beforeColumnWrap",...t)).addLocalHook("insertRowRequire",t=>n.alter("insert_row_above",t,1,"auto")).addLocalHook("insertColRequire",t=>n.alter("insert_col_start",t,1,"auto")),l={alter(t,e,o=1,i,r){if(!1!==n.runHooks("beforeAlter",t,e,o,i,r)){switch(t){case"insert_row_below":case"insert_row_above":const r=n.countSourceRows();if(C.maxRows===r)return;const l="insert_row_below"===t?"below":"above",h="number"==typeof e?e:"below"===l?r:0,{delta:c,startPhysicalIndex:d}=s.createRow(h,o,{source:i,mode:l});R.shiftRows(n.toVisualRow(d),c);break;case"insert_col_start":case"insert_col_end":const u="insert_col_end"===t?"end":"start",g="end"===u?n.countSourceCols():0,p="number"==typeof e?e:g,{delta:f,startPhysicalIndex:m}=s.createCol(p,o,{source:i,mode:u});if(f){if(Array.isArray(C.colHeaders)){const t=[n.toVisualColumn(m),0];t.length+=f,Array.prototype.splice.apply(C.colHeaders,t)}R.shiftColumns(n.toVisualColumn(m),f)}break;case"remove_row":const w=t=>{let e=0;$(t,([t,o])=>{const r=Ot(t)?n.countRows()-1:Math.max(t-e,0);Number.isInteger(t)&&(t=Math.max(t-e,0));const l=n.countRows();if(!s.removeRow(t,o,i))return;if(R.isSelected()){const{row:e}=n.getSelectedRangeActive().highlight;e>=t&&e<=t+o-1&&a.closeEditor(!0)}const h=n.countRows(),c=C.fixedRowsTop;c>=r+1&&(C.fixedRowsTop-=Math.min(o,c-r));const d=C.fixedRowsBottom;if(d){const e=l-h,o=Number.isInteger(t)?r:Math.max(l-e,0),n=l-d,i=Math.min(o+e-1,l-1)-Math.max(o,n)+1;i>0&&(C.fixedRowsBottom-=Math.min(i,d))}if(0===h)R.deselect();else if("ContextMenu.removeRow"===i){const t=R.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),R.refresh()}else R.shiftRows(t,-o);e+=o})};Array.isArray(e)?w(Xx(e)):w([[e,o]]);break;case"remove_col":const b=t=>{let e=0;$(t,([t,o])=>{const r=Ot(t)?n.countCols()-1:Math.max(t-e,0);let l=n.toPhysicalColumn(r);Number.isInteger(t)&&(t=Math.max(t-e,0));if(!s.removeCol(t,o,i))return;if(R.isSelected()){const{col:e}=n.getSelectedRangeActive().highlight;e>=t&&e<=t+o-1&&a.closeEditor(!0)}if(0===n.countCols())R.deselect();else if("ContextMenu.removeColumn"===i){const t=R.getSelectedRange(),e=t.pop();t.clear().set(e.from).current().setTo(e.to),R.refresh()}else R.shiftColumns(t,-o);const h=C.fixedColumnsStart;h>=r+1&&(C._fixedColumnsStart-=Math.min(o,h-r)),Array.isArray(C.colHeaders)&&(void 0===l&&(l=-1),C.colHeaders.splice(l,o)),e+=o})};Array.isArray(e)?b(Xx(e)):b([[e,o]]);break;default:ce(`There is no such action "${t}"`)}r||l.adjustRowsAndCols(),n.view.adjustElementsSize(),n.view.render()}},adjustRowsAndCols(){const t=C.minRows,e=C.minSpareRows,o=C.minCols,i=C.minSpareCols;if(t){const e=n.countRows();e<t&&s.createRow(e,t-e,{source:"auto"})}if(e){const t=n.countEmptyRows(!0);if(t<e){const o=e-t,i=Math.min(o,C.maxRows-n.countSourceRows());s.createRow(n.countRows(),i,{source:"auto"})}}{let t=0;const e=i>0&&!C.columns&&"array"===n.dataType;if(e)for(let e=n.countCols()-1;e>=0&&n.isEmptyCol(e)&&(t+=1,!(t>=i));e--);let r=n.countCols();if(o&&!C.columns&&r<o){const e=o-r;t+=e,s.createCol(r,e,{source:"auto"})}if(e&&t<i){r=n.countCols();const e=i-t,o=Math.min(e,C.maxCols-r);s.createCol(r,o,{source:"auto"})}}},populateFromArray(t,e,o,i,s){let r,l,a,h;const c=[],d={},u=[],g=t.row,p=t.col;if(l=e.length,0===l)return!1;let f=0,m=0;switch(Ce(o)&&(f=o.col-p+1,m=o.row-g+1),s){case"shift_down":const s=z(e),w=s.length,b=Math.max(w,f),v=n.getData().slice(g),y=z(v).slice(p,p+b);for(a=0;a<b;a+=1)if(a<w){for(r=0,l=s[a].length;r<m-l;r+=1)s[a].push(s[a][r%l]);a<y.length?u.push(s[a].concat(y[a])):u.push(s[a].concat(new Array(v.length).fill(null)))}else u.push(s[a%w].concat(y[a]));n.populateFromArray(g,p,z(u));break;case"shift_right":const S=e.length,k=Math.max(S,m),R=n.getData().slice(g).map(t=>t.slice(p));for(r=0;r<k;r+=1)if(r<S){for(a=0,h=e[r].length;a<f-h;a+=1)e[r].push(e[r][a%h]);if(r<R.length)for(let t=0;t<R[r].length;t+=1)e[r].push(R[r][t]);else e[r].push(...new Array(R[0].length).fill(null))}else e.push(e[r%l].slice(0,k).concat(R[r]));n.populateFromArray(g,p,e);break;default:d.row=t.row,d.col=t.col;let E,x=0,M=0,T=!0;const H="Autofill.fill"===i||"autofill.fill"===i,I=function(t,o=null){const n=e[t%e.length];return null!==o?n[o%n.length]:n},_=e.length,A=o?o.row-t.row+1:0;for(l=o?A:Math.max(_,A),r=0;r<l&&!(o&&d.row>o.row&&A>_||!C.allowInsertRow&&d.row>n.countRows()-1||d.row>=C.maxRows);r++){const e=H?r:r-x,s=I(e).length,u=o?o.col-t.col+1:0;if(h=o?u:Math.max(s,u),d.col=t.col,E=n.getCellMetaTransient(d.row,d.col),"CopyPaste.paste"!==i&&"Autofill.fill"!==i&&"autofill.fill"!==i||!E.skipRowOnPaste){for(M=0,a=0;a<h&&!(o&&d.col>o.col&&u>s||!C.allowInsertColumn&&d.col>n.countCols()-1||d.col>=C.maxCols);a++){if(E=n.getCellMetaTransient(d.row,d.col),("CopyPaste.paste"===i||"Autofill.fill"===i||"autofill.fill"===i)&&E.skipColumnOnPaste){M+=1,d.col+=1,"CopyPaste.paste"===i&&(h+=1);continue}if(E.readOnly&&"UndoRedo.undo"!==i){d.col+=1;continue}const t=H?a:a-M,o=!!E.valueSetter;let s=I(e,t),r=n.getSourceDataAtCell(d.row,d.col)??null;if(null!==s&&"object"==typeof s)if(Array.isArray(s)&&null===r&&(r=[]),o||"object"==typeof r&&null!==r){if(null!==r){const t=de(Array.isArray(r)?r:r[0]||r),e=de(Array.isArray(s)?s:s[0]||s);o||"edit"===i||ve(t,e)||Array.isArray(t)&&Array.isArray(e)?s=pe(s):T=!1}}else T=!1,E.parsePastedValue&&"CopyPaste.paste"===i&&(T=!0),"edit"===i&&(T=!0,s=pe(s));else o||null===r||"object"!=typeof r||(T=!1);T&&c.push([d.row,d.col,s]),T=!0,d.col+=1}d.row+=1}else x+=1,d.row+=1,"CopyPaste.paste"===i&&(l+=1)}n.setDataAtCell(c,null,null,i||"populateFromArray")}}},this.init=function(){const t=C.theme,e=C.themeName,o=jk(n.rootContainer);if(!Ep(n)||o||!Ce(t)&&(t||e)||H(t,T()),r.setData(C.data),n.runHooks("beforeInit"),(Fe()||Ue())&&po(n.rootElement,"mobile"),this.updateSettings(p,!0),this.view=new tf(this),a=$i.getInstance(n,C,R),c=LS(n),h.init(),Ep(this)){!function(t){const e=t.ownerDocument;if(!xR){xR=e.createElement("div"),xR.setAttribute("role","status"),xR.setAttribute("aria-live","assertive"),xR.setAttribute("aria-atomic","true");const o=xR.style;o.position="absolute",o.width="1px",o.height="1px",o.margin="-1px",o.overflow="hidden",o.clipPath="rect(0 0 0 0)",o.whiteSpace="nowrap",t.appendChild(xR)}MR+=1}(n.rootPortalElement),function(t){const e=t.rootSlotBottomElement;if(!e)return;const o=t.getSettings().licenseKey,n=ne({className:nE,key:o,element:e,releaseDate:"07/10/2026"});n&&sE(t,n)}(n),SE(i=n,ae(i.getSettings().licenseKey,"07/10/2026"));const t={top:-1,bottom:-1},e=()=>{if(n.isDestroyed)return;const{view:e}=n;if(!e)return;let o=e.isHorizontallyScrollableByWindow()?e.getTotalTableWidth():e.getWorkspaceWidth();0===o&&n.rootWrapperElement&&(o=n.rootWrapperElement.offsetWidth),n.rootSlotBottomElement&&o!==t.bottom&&(t.bottom=o,n.rootSlotBottomElement.style.width=`${o}px`),n.rootSlotTopElement&&o!==t.top&&(t.top=o,n.rootSlotTopElement.style.width=`${o}px`)};this.addHook("afterRender",e)}var i;n.runHooks("init"),this.render(),d&&null===n.rootElement.offsetParent&&(g=function(t,e){const o=new IntersectionObserver((t,o)=>{t.forEach(t=>{t.isIntersecting&&(e(),o.disconnect())})});return o.observe(t),o}(n.rootElement,()=>{n&&!n.isDestroyed&&n.view&&(n.view._wt.wtOverlays.updateLastSpreaderSize(),n.view.adjustElementsSize(),n.render())})),"object"==typeof d&&(n.runHooks("afterChange",d[0],d[1]),d=!1),n.runHooks("afterInit")},this._createCellCoords=function(t,e){return n.view._wt.createCellCoords(t,e)},this._createCellRange=function(t,e,o){return n.view._wt.createCellRange(t,e,o)},this.validateCell=function(t,e,o,i){let s=n.getCellValidator(e);function r(t,i=!0){if(!i||!0===e.hidden)return void o(t);const s=e.visualCol,r=e.visualRow,l=n.getCell(r,s,!0);if(l&&"TH"!==l.nodeName){const t=n.rowIndexMapper.getRenderableFromVisualIndex(r),e=n.columnIndexMapper.getRenderableFromVisualIndex(s);n.view._wt.getSetting("cellRenderer",t,e,l)}o(t)}var l,a;if(a=s,"[object RegExp]"===Object.prototype.toString.call(a)&&(l=s,s=function(t,e){e(l.test(t))}),ln(s)){const o=ln(e.prop)?e.visualCol:e.prop;t=n.runHooks("beforeValidate",t,e.visualRow,o,i),n._registerMicrotask(()=>{s.call(e,t,s=>{n&&(s=n.runHooks("afterValidate",s,t,e.visualRow,o,i),e.valid=s,r(s),n.runHooks("postAfterValidate",s,t,e.visualRow,o,i))})})}else n._registerMicrotask(()=>{e.valid=!0,r(e.valid,!1)})},this.setDataAtCell=function(t,e,o,i){const l=O(t,e,o),a=[];let h,c,d,u=i;for(h=0,c=l.length;h<c;h++){const[t,e,o]=l[h];"object"!=typeof l[h]&&ce("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter"),"number"!=typeof l[h][1]&&ce("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");const n="number"==typeof e?e:0;d=n>=this.countCols()?n:s.colToProp(n),a.push([t,d,r.getAtCell(this.toPhysicalRow(t),e),o])}u||"object"!=typeof t||(u=e);const g=N(a,u);n.runHooks("afterSetDataAtCell",g,u),A(g,u,()=>{W(g,u)})},this.setDataAtRowProp=function(t,e,o,i){const s=O(t,e,o),l=[];let a,h,c=i;for(a=0,h=s.length;a<h;a++){const[t,e,o]=s[a];l.push([t,e,r.getAtCell(this.toPhysicalRow(t),e),o])}c||"object"!=typeof t||(c=e);const d=N(l,c);n.runHooks("afterSetDataAtRowProp",d,c),A(d,c,()=>{W(d,c)})},this.listen=function(){n&&!n.isListening()&&(Kx.forEach(t=>{n!==t&&t.unlisten()}),Yx=n.guid,n.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(Yx=null,n.runHooks("afterUnlisten"))},this.isListening=function(){return Yx===n.guid},this.destroyEditor=function(t=!1,e=!0){a.closeEditor(t),n.view.render(),e&&R.isSelected()&&a.prepareEditor()},this.populateFromArray=function(t,e,o,i,s,r,a){"object"==typeof o&&"object"==typeof o[0]||ce("populateFromArray parameter `input` must be an array of arrays");const h="number"==typeof i?n._createCellCoords(i,s):void 0;return l.populateFromArray(n._createCellCoords(t,e),o,h,r,a)},this.spliceCol=function(t,e,o,...n){return s.spliceCol(t,e,o,...n)},this.spliceRow=function(t,e,o,...n){return s.spliceRow(t,e,o,...n)},this.getSelected=function(){if(R.isSelected())return F(R.getSelectedRange().ranges,({from:t,to:e})=>[t.row,t.col,e.row,e.col])},this.getSelectedLast=function(){const t=n.getSelected();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedActive=function(){const t=n.getSelectedRangeActive();if(!t)return;const{from:e,to:o}=t;return[e.row,e.col,o.row,o.col]},this.getSelectedRange=function(){if(R.isSelected())return Array.from(R.getSelectedRange())},this.getSelectedRangeLast=function(){const t=n.getSelectedRange();let e;return t&&t.length>0&&(e=t[t.length-1]),e},this.getSelectedRangeActive=function(){return R.getActiveSelectedRange()},this.getActiveSelectionLayerIndex=function(){return R.getActiveSelectionLayerIndex()},this.emptySelectedCells=function(t){if(!R.isSelected()||0===this.countRows()||0===this.countCols())return;const e=[];$(R.getSelectedRange(),t=>{if(t.isSingleHeader())return;const o=t.getTopStartCorner(),n=t.getBottomEndCorner(),i=Math.max(o.row,0),s=Math.min(n.row,this.countRows()-1),r=Math.max(o.col,0),l=Math.min(n.col,this.countCols()-1);if(i>s||r>l)return;as(i,s,t=>{as(r,l,o=>{this.getCellMetaTransient(t,o).readOnly||e.push([t,o,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||n.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||n.view.render())},this.batchRender=function(t){n.suspendRender();const e=t();return n.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){n.suspendExecution();const o=t();return n.resumeExecution(e),o},this.batch=function(t){n.suspendRender(),n.suspendExecution();const e=t();return n.resumeExecution(),n.resumeRender(),e},this.refreshDimensions=function(){if(!n.view)return;const t=n.view,{width:e,height:o}=t.getLastSize(),{width:i,height:s}=n.rootElement.getBoundingClientRect(),r=i!==e||s!==o;!1===n.runHooks("beforeRefreshDimensions",{width:e,height:o},{width:i,height:s},r)||((r||t._wt.wtOverlays.scrollableElement===n.rootWindow)&&(t.setLastSize(i,s),t.adjustElementsSize(),n.render()),n.runHooks("afterRefreshDimensions",{width:e,height:o},{width:i,height:s},r))},this.updateData=function(t,e){yS(t,t=>{s=t},t=>{s=t,n.columnIndexMapper.fitToLength(this.getInitialColumnCount()),n.rowIndexMapper.fitToLength(this.countSourceRows()),l.adjustRowsAndCols(),R.markSource("updateData"),R.refresh(),R.markEndSource()},{hotInstance:n,dataMap:s,dataSource:r,internalSource:"updateData",source:e,metaManager:v,firstRun:d})},this.loadData=function(t,e){yS(t,t=>{s=t},()=>{v.clearCellsCache(),n.initIndexMappers(),l.adjustRowsAndCols(),R.markSource("loadData"),R.refresh(),R.markEndSource(),d&&(d=[null,"loadData"])},{hotInstance:n,dataMap:s,dataSource:r,internalSource:"loadData",source:e,metaManager:v,firstRun:d})},this.getInitialColumnCount=function(){const t=C.columns;let e=0;if(Array.isArray(t))e=t.length;else if(ln(t))if("array"===n.dataType){const o=n.countSourceCols();for(let n=0;n<o;n+=1)t(n)&&(e+=1)}else"object"!==n.dataType&&"function"!==n.dataType||(e=s.colToPropCache.length);else if(At(C.dataSchema)){const t=s.getSchema();e=Array.isArray(t)?t.length:xe(t)}else e=n.countSourceCols();return e},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(t,e,o,i){return Wt(t)?s.getAll():s.getRange(n._createCellCoords(t,e),n._createCellCoords(o,i),YC.DESTINATION_RENDERER)},this.getCopyableText=function(t,e,o,i){return s.getCopyableText(n._createCellCoords(t,e),n._createCellCoords(o,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 o=(d?n.loadData:n.updateData).bind(this);let i,r;for(i in At(t.rows)&&ce('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?'),At(t.cols)&&ce('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?'),At(t.ganttChart)&&ce('Since 8.0.0 the "ganttChart" setting is no longer supported.'),Qx(t),P=null,At(t.rowHeights)&&At(t.minRowHeights)&&Xe("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)x("className",t.className);else if("tableClassName"===i&&n.table)x("tableClassName",t.tableClassName),n.view._wt.wtOverlays.syncOverlayTableClassNames();else if(Qn.getSingleton().isRegistered(i)||Qn.getSingleton().isDeprecated(i)){const e=t[i];ln(e)?(Qn.getSingleton().addAsFixed(i,e,n),C[i]=e):Array.isArray(e)&&(Qn.getSingleton().add(i,e,n),C[i]=e)}else!e&&Te(t,i)&&(y[i]=t[i]);const a=jk(n.rootContainer),h=Te(t,"themeName"),c=Te(t,"theme");if(h&&c&&Xe("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;c&&"string"==typeof t.theme?e=t.theme:h&&"string"==typeof t.themeName&&t.themeName&&!c?(e=t.themeName,C.theme=t.themeName,C.themeName=void 0):a?e=a:n.themeManager&&(e=n.themeManager.getClassName()),n.useTheme(e??null)}else{const e=n.getCurrentThemeName();if(c&&"string"==typeof t.theme&&e!==t.theme)n.themeManager?.destroy(),n.useTheme(t.theme);else if(h&&!c&&e!==t.themeName)n.themeManager?.destroy(),C.theme=t.themeName,C.themeName=void 0,n.useTheme(t.themeName);else if(Ep(n)&&!a&&Ce(t.theme))if(null===n.themeManager)H(t.theme,T()),n.useTheme(n.themeManager.getClassName());else{let e;e="function"!=typeof t.theme.getThemeConfig?Gx(t.theme):t.theme,n.themeManager.update(e),n.useTheme(n.themeManager.getClassName())}}const g=function(t,e){const o=M(t);if(!Te(o,"colorScheme")&&!Te(o,"density"))return!1;if(!n.themeManager)return(!bx(o.colorScheme)||!bx(o.density))&&!u&&(u=!0,Xe("The `colorScheme` and `density` options require the theme engine, so they have no effect when the theme is enabled by a CSS class name. Pass a theme config object or a `ThemeBuilder` instance to the `theme` option, or remove the `ht-theme-*` class from the container element to use the default theme.")),!1;return!(!n.themeManager.setOverrides(o)||e||(n.stylesHandler.clearCache(),0))}(t,e);if(!0===n.runHooks("hasExternalDataSource")){t.data&&Xe('The "data" setting is ignored when "hasExternalDataSource" returns `true`.');e||Te(t,"data")||Te(t,"dataProvider")?o([],"updateSettings"):void 0!==t.columns&&(s.createMap(),n.initIndexMappers())}else void 0===t.data&&void 0===C.data?o(null,"updateSettings"):void 0!==t.data?o(t.data,"updateSettings"):void 0!==t.columns&&(s.createMap(),n.initIndexMappers());!d&&t.language&&function(t){const e=$m(t);wv(e)?(n.runHooks("beforeLanguageChange",e),y.language=e,n.runHooks("afterLanguageChange",e)):Um(t)}(t.language);const p=n.countCols(),f=C.columns;if(void 0!==t.cell||void 0!==t.cells||void 0!==t.columns){const t=v.getUserDefinedCellMetas();v.clearCache(),t.forEach(({physicalRow:t,physicalColumn:e,key:o,value:n})=>{v.setCellMeta(t,e,o,n)})}if(p>0)for(i=0,r=0;i<p;i++){if(f){const t=ln(f)?f(i):f[r];t&&v.updateColumnMeta(r,t)}r+=1}if(At(t.cell)){v.disableUserDefinedMetaRecording();try{t.cell.forEach(t=>{n.setCellMetaObject(t.row,t.col,t)})}finally{v.enableUserDefinedMetaRecording()}}n.runHooks("afterCellMetaReset"),d&&vS(n,"init");let m=n.rootElement.style.height;if(""!==m&&(m=parseInt(n.rootElement.style.height,10)),e){n.rootElement.getAttribute("style")&&(n.rootElement.dataset.initialstyle=n.rootElement.getAttribute("style")??"")}let w=t.height;if(void 0!==t.height)if(ln(w)&&(w=w()),w=n.runHooks("beforeHeightChange",w),null===w){const t=n.rootElement.dataset.initialstyle;t&&(t.indexOf("height")>-1||t.indexOf("overflow")>-1)?n.rootElement.setAttribute("style",t):(n.rootElement.style.height="",n.rootElement.style.overflow="")}else void 0!==w&&(n.rootElement.style.height=isNaN(w)?`${w}`:`${w}px`,n.rootElement.style.overflow="clip");if(void 0!==t.width){let e=t.width;ln(e)&&(e=e()),e=n.runHooks("beforeWidthChange",e),n.rootElement.style.width=isNaN(e)?`${e}`:`${e}px`}if(void 0!==t.height||void 0!==t.width){const t=n.rootElement.style.height,e=n.rootElement.style.width,o=/%|v(?:w|h|min|max)/i.test(e),i=""!==e&&"auto"!==e&&!o;if(!t){const t=n.rootElement.style.overflowX;""!==t&&"clip"!==t||(n.rootElement.style.overflowX=i?"clip":"")}}e||(n.view&&(n.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),n.view._wt.exportSettingsAsClassNames(),n.view.invalidateIndexSizesCache()),R.updateHighlightClassNames(),n.runHooks("afterUpdateSettings",t)),l.adjustRowsAndCols(),n.view&&!d&&(n.render(),n.view._wt.wtOverlays.adjustElementsSize()),g&&n.themeManager&&n.runHooks("afterSetTheme",n.themeManager.getClassName(),!1),e||!n.view||""!==m&&""!==w&&void 0!==w||m===w||n.view._wt.wtOverlays.updateMainScrollableElements(),Ep(n)&&V?.applyConfig(C.layout)},this.getValue=function(){const t=n.getSelectedRangeActive();if(C.getValue){if(ln(C.getValue))return C.getValue.call(n);if(t&&"string"==typeof C.getValue){const e=t.highlight.row??0;return n.getData()[e][C.getValue]}}else if(t)return n.getDataAtCell(t.highlight.row,t.highlight.col);return null},this.getSettings=function(){return C},this.clear=function(){this.selectAll(),this.emptySelectedCells(),this.deselectCell()},this.alter=function(t,e,o,n,i){l.alter(t,e,o,n,i)},this.getCell=function(t,e,o=!1){let i=e,s=t;if(e>=0){if(n.columnIndexMapper.isHidden(n.toPhysicalColumn(e)))return null;i=n.columnIndexMapper.getRenderableFromVisualIndex(e)}if(t>=0){if(n.rowIndexMapper.isHidden(n.toPhysicalRow(t)))return null;s=n.rowIndexMapper.getRenderableFromVisualIndex(t)}return null===s||null===i||void 0===s||void 0===i?null:n.view.getCellAtCoords(n._createCellCoords(s,i),o)},this.getCoords=function(t){const e=n.view._wt.wtTable.getCoords(t);if(null===e)return null;const{row:o,col:i}=e;let s=o,r=i;return null!==o&&o>=0&&(s=n.rowIndexMapper.getVisualFromRenderableIndex(o)),null!==i&&i>=0&&(r=n.columnIndexMapper.getVisualFromRenderableIndex(i)),n._createCellCoords(s,r)},this.colToProp=function(t){return s.colToProp(t)},this.propToCol=function(t){return s.propToCol(t)},this.toVisualRow=t=>n.rowIndexMapper.getVisualFromPhysicalIndex(t),this.toVisualColumn=t=>n.columnIndexMapper.getVisualFromPhysicalIndex(t),this.toPhysicalRow=t=>n.rowIndexMapper.getPhysicalFromVisualIndex(t),this.toPhysicalColumn=t=>n.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=[],o=s.getRange(n._createCellCoords(0,t),n._createCellCoords(C.data.length-1,t),YC.DESTINATION_RENDERER);for(let t=0;t<o.length;t+=1)for(let n=0;n<o[t].length;n+=1)e.push(o[t][n]);return e},this.getDataAtProp=function(t){const e=[],o=s.getRange(n._createCellCoords(0,s.propToCol(t)),n._createCellCoords(C.data.length-1,s.propToCol(t)),YC.DESTINATION_RENDERER);for(let t=0;t<o.length;t+=1)for(let n=0;n<o[t].length;n+=1)e.push(o[t][n]);return e},this.getSourceData=function(t,e,o,i){let s;return s=void 0===t?r.getData():r.getByRange(n._createCellCoords(t,e??null),n._createCellCoords(o??null,i??null)),s},this.getSourceDataArray=function(t,e,o,i){let s;return s=void 0===t?r.getData(!0):r.getByRange(n._createCellCoords(t,e??null),n._createCellCoords(o??null,i??null),!0),s},this.getSourceDataAtCol=function(t){return r.getAtColumn(t)},this.setSourceDataAtCell=function(t,e,o,i){const s=O(t,e,o),l=n.hasHook("afterSetSourceDataAtCell"),a=[],h=(t,e)=>{const o=n.toVisualRow(t),i=n.toVisualColumn(e);return Number.isInteger(i)?n.getCellMetaTransient(o,i):{...Object.getPrototypeOf(C),...C}};l&&$(s,([t,e,o])=>{const n=yi(o,h(t,e));a.push([t,e,r.getAtCell(t,e),n])}),$(s,([t,e,o])=>{const n=h(t,e),s=yi(o,n);(function(t,e,o){const n=e.sourceDataValidator;if(!ln(n))return!0;if(!0===n(t,e,o))return!0;const{row:i,col:s,sourceDataWarningMessage:r,allowInvalid:l}=e;return r&&CS(r,[{row:i,col:s,value:t}]),!0===l})(s,n,i??"setSourceDataAtCell")&&r.setAtCell(t,e,s)}),l&&this.runHooks("afterSetSourceDataAtCell",a,i),this.render();const c=n.getActiveEditor();c&&At(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(n._createCellCoords(t,0),n._createCellCoords(t,this.countCols()-1),YC.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(t,e,o,i){const s=void 0===t?[0,0,n.countRows(),n.countCols()]:[t,e,o,i],[r,l]=s;let[,,a,h]=s,c=null,d=null;void 0===a&&(a=r),void 0===h&&(h=l);let u="mixed";return as(Math.max(Math.min(r,a),0),Math.max(r,a),t=>{let e=!0;return as(Math.max(Math.min(l,h),0),Math.max(l,h),o=>{const i=n.getCellMetaTransient(t,o);return d=i.type??null,c?e=c===d:c=d,e}),u=e?d??"mixed":"mixed",e}),u},this.removeCellMeta=function(t,e,o){const[i,s]=[n.toPhysicalRow(t),n.toPhysicalColumn(e)];let r=v.getCellMetaKeyValue(i,s,o);!1!==n.runHooks("beforeRemoveCellMeta",t,e,o,r)&&(v.removeCellMeta(i,s,o),n.runHooks("afterRemoveCellMeta",t,e,o,r)),r=null},this.spliceCellsMeta=function(t,e=0,...o){o.length>0&&!Array.isArray(o[0])&&ce("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array."),e>0&&v.removeRow(n.toPhysicalRow(t),e),o.length>0&&$(o.reverse(),e=>{v.createRow(n.toPhysicalRow(t)),$(e,(e,o)=>{this.setCellMetaObject(t,o,e)})}),n.render()},this.setCellMetaObject=function(t,e,o){"object"==typeof o&&ke(o,(o,n)=>{this.setCellMeta(t,e,n,o)})},this._setCellMetaDeclarative=function(t,e,o,i){let s=t,r=e;t<n.countRows()&&(s=n.toPhysicalRow(t)),e<n.countCols()&&(r=n.toPhysicalColumn(e)),v.disableUserDefinedMetaRecording();try{v.setCellMeta(s,r,o,i)}finally{v.enableUserDefinedMetaRecording()}},this.setCellMeta=function(t,e,o,i){if(!1===n.runHooks("beforeSetCellMeta",t,e,o,i))return;let s=t,r=e;t<n.countRows()&&(s=n.toPhysicalRow(t)),e<n.countCols()&&(r=n.toPhysicalColumn(e)),v.setCellMeta(s,r,o,i),n.runHooks("afterSetCellMeta",t,e,o,i)},this.getCellsMeta=function(){return v.getCellsMeta()},this.getCellMeta=function(t,e,o={skipMetaExtension:!1}){let i=n.toPhysicalRow(t),s=n.toPhysicalColumn(e);return null===i&&(i=t),null===s&&(s=e),v.getCellMeta(i,s,{visualRow:t,visualColumn:e,...o})},this.getCellMetaTransient=function(t,e){let o=n.toPhysicalRow(t),i=n.toPhysicalColumn(e);return null===o&&(o=t),null===i&&(i=e),v.getCellMetaTransient(o,i,{visualRow:t,visualColumn:e})},this.getColumnMeta=function(t){return v.getColumnMeta(n.toPhysicalColumn(t))},this.getCellMetaAtRow=function(t){return v.getCellsMetaAtRow(t)},this.isColumnModificationAllowed=function(){return!("object"===n.dataType||C.columns)},this.getCellRenderer=function(t,e){const o="number"==typeof t?n.getCellMeta(t,e).renderer:t.renderer;return"string"==typeof o?Ws(o):Wt(o)?Ws("text"):o},this.getCellEditor=function(t,e){const o="number"==typeof t?n.getCellMeta(t,e).editor:t.editor;return"string"==typeof o?bi(o):Wt(o)?bi("text"):o},this.getCellValidator=function(t,e){const o="number"==typeof t?n.getCellMeta(t,e).validator:t.validator;return"string"==typeof o?"function"==typeof(i=o)?i:(Ds(i)||ce(`No registered validator found under "${i}" name`),Ps(i)):o;var i},this.validateCells=function(t){this._validateCells(t)},this.validateRows=function(t,e){Array.isArray(t)||ce("validateRows parameter `rows` must be an array"),this._validateCells(e,t)},this.validateColumns=function(t,e){Array.isArray(t)||ce("validateColumns parameter `columns` must be an array"),this._validateCells(e,void 0,t)},this._validateCells=function(t,e,o){const i=I();t&&(i.onQueueEmpty=t);let s=n.countRows()-1;for(;s>=0;){if(void 0!==e&&-1===e.indexOf(s)){s-=1;continue}let t=n.countCols()-1;for(;t>=0;){if(void 0!==o&&-1===o.indexOf(t)){t-=1;continue}i.addValidatorToQueue();const e=s,r=t,l=n.getCellMetaTransient(e,r);n.validateCell(n.getDataAtCell(e,r),l,t=>{"boolean"!=typeof t&&ce("Validation error: result is not boolean"),!1===t&&(i.valid=!1,n.getCellMeta(e,r,{skipMetaExtension:!0}).valid=!1),i.removeValidatorFormQueue()},"validateCells"),t-=1}s-=1}i.checkIfQueueIsEmpty()},this.getRowHeader=function(t){let e=C.rowHeaders,o=t;if(void 0!==o&&(o=n.runHooks("modifyRowHeader",o)),void 0===o){const t=[];as(n.countRows()-1,e=>{t.push(n.getRowHeader(e))}),e=t}else Array.isArray(e)&&void 0!==e[o]?e=e[o]:ln(e)?e=e(o):e&&"string"!=typeof e&&"number"!=typeof e&&(e=o+1);return e},this.hasRowHeaders=function(){return!!C.rowHeaders},this.hasColHeaders=function(){if(void 0!==C.colHeaders&&null!==C.colHeaders)return!!C.colHeaders;for(let t=0,e=n.countCols();t<e;t++)if(n.getColHeader(t))return!0;return!1};let P=null;this.getColHeader=function(t,e=-1){const o=n.runHooks("modifyColHeader",t);if(void 0===o){const t=[],e=n.countCols();for(let o=0;o<e;o++)t.push(n.getColHeader(o));return t}let i=C.colHeaders;const s=C.columns,r="function"==typeof s?s:null,l=n.toPhysicalColumn(o);let a=null;if(null!==r){const t=n.countCols();if(null===P||P.columns!==r||P.columnsLen!==t){const e=[];for(let o=0;o<t;o++)r(o)&&e.push(o);P={columns:r,columnsLen:t,indexes:e}}a=r(P.indexes[l])??null}return!1===C.colHeaders?i=null:a&&a.title?i=a.title:s&&!ln(s)&&s[l]&&s[l].title?i=s[l].title:Array.isArray(C.colHeaders)&&void 0!==C.colHeaders[l]?i=C.colHeaders[l]:ln(C.colHeaders)?i=C.colHeaders(l):C.colHeaders&&"string"!=typeof C.colHeaders&&"number"!=typeof C.colHeaders&&(i=function(t){let e,o=t+1,n="";for(;o>0;)e=(o-1)%26,n=String.fromCharCode(65+e)+n,o=parseInt(String((o-e)/26),10);return n}(o)),i=n.runHooks("modifyColumnHeaderValue",i,t,e),i},this._getColWidthFromSettings=function(t){let e;if(t>=0){e=n.getCellMeta(0,t).width}if(void 0!==e&&e!==C.width||(e=C.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 o=n._getColWidthFromSettings(t);return o=n.runHooks("modifyColWidth",o,t,e),void 0===o&&(o=50),o},this._getRowHeightFromSettings=function(t){const e=n.stylesHandler.getDefaultRowHeight(t);let o=C.rowHeights??C.minRowHeights;if(null!=o){switch(typeof o){case"object":o=o[t];break;case"function":o=o(t)}"string"==typeof o&&(o=Number.parseInt(o,10))}return null!=o&&null!==e&&o<e?e:o},this.getRowHeight=function(t,e){let o=n._getRowHeightFromSettings(t);return o=n.runHooks("modifyRowHeight",o,t,e),o},this.countSourceRows=function(){return r.countRows()},this.countSourceCols=function(){return r.countFirstRowKeys()},this.countRows=function(){return s.getLength()},this.countCols=function(){const t=C.maxCols,e=n.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(t,e)},this.countRenderedRows=function(){const t=n.view;return t?._wt.drawn?t._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){const t=n.view;return t?._wt.drawn?t._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){const t=n.view;return t?._wt.drawn?t._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){const t=n.view;return t?._wt.drawn?t._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){const t=n.view;return t?t.getRowHeadersCount():0},this.countColHeaders=function(){const t=n.view;return t?t.getColumnHeadersCount():0},this.countEmptyRows=function(t=!1){let e=0;return hs(n.countRows()-1,o=>{if(n.isEmptyRow(o))e+=1;else if(!0===t)return!1}),e},this.countEmptyCols=function(t=!1){let e=0;return hs(n.countCols()-1,o=>{if(n.isEmptyCol(o))e+=1;else if(!0===t)return!1}),e},this.isEmptyRow=function(t){return C.isEmptyRow.call(n,t)},this.isEmptyCol=function(t){return C.isEmptyCol.call(n,t)},this.selectCell=function(t,e,o,i,s=!0,r=!0){if(Wt(t)||Wt(e))return!1;const l=[[null==t||Number.isNaN(Number(t))?0:Number(t),null==e||"number"==typeof e&&Number.isNaN(e)?0:e,Wt(o)?void 0:o,Wt(i)?void 0:i]];return n.selectCells(l,s,r)},this.selectCells=function(t=[[]],e=!0,o=!0){let i;!1===e&&c.suspend(),!1===o&&h.suspend();try{i=R.selectCells(t)}finally{c.resume(),h.resume()}return i&&o&&n.listen(),i},this.selectColumns=function(t,e=t,o){return R.selectColumns(t,e,o)},this.selectRows=function(t,e=t,o){return R.selectRows(t,e,o)},this.deselectCell=function(){R.deselect()},this.selectAll=function(t=!0,e=t,o){c.skipNextScrollCycle(),R.selectAll(t,e,o)};const D=(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:o,col:i,considerHiddenIndexes:s}=t??{};let r=o,l=i;if(ln(e)&&this.addHookOnce("afterScroll",e),void 0===s||s){const t=((t,e)=>{const o=void 0!==t&&Number.isInteger(t)&&t>=0,i=void 0!==e&&Number.isInteger(e)&&e>=0,s=o?D(n.rowIndexMapper,t):void 0,r=i?D(n.columnIndexMapper,e):void 0;return null!==s&&null!==r&&{renderableRow:o?n.rowIndexMapper.getRenderableFromVisualIndex(s)??void 0:t,renderableColumn:i?n.columnIndexMapper.getRenderableFromVisualIndex(r)??void 0:e}})(o,i);if(!1===t)return!1;r=t.renderableRow,l=t.renderableColumn}const a=Number.isInteger(r),h=Number.isInteger(l);let c=!1;return a&&r>=0&&h&&l>=0?c=n.view.scrollViewport(n._createCellCoords(r,l),t.horizontalSnap,t.verticalSnap):a&&r>=0&&(h&&l<0||!h)?c=n.view.scrollViewportVertically(r,t.verticalSnap):h&&l>=0&&(a&&r<0||!a)&&(c=n.view.scrollViewportHorizontally(l,t.horizontalSnap)),ln(e)&&(c?this.view.render():(this.removeHook("afterScroll",e),this._registerMicrotask(()=>e()))),c},this.scrollToFocusedCell=function(t){if(!n.selection.isSelected())return!1;ln(t)&&n.addHookOnce("afterScroll",t);const{highlight:e}=n.getSelectedRangeActive(),o=n.scrollViewportTo(e.toObject());return o?n.view.render():ln(t)&&(n.removeHook("afterScroll",t),n._registerMicrotask(()=>t())),o},this.destroy=function(){n._clearTimeouts(),n._clearMicrotasks(),g?.disconnect(),g=null,n.view&&n.view.destroy(),r&&r.destroy(),r=null,Ep(this)&&(0!==MR&&(1===MR&&(xR.remove(),xR=null),MR-=1),this.getFocusScopeManager().destroy(),V?.destroy(),n.themeManager?.destroy()),this.getShortcutManager().destroy(),k.clear(),v.clearCache(),Kx.delete(this.guid),i.destroy(),a&&a.destroy(),n.rootContainer&&vo(n.rootContainer),n.rootPortalElement&&n.rootPortalElement.remove(),n.batchExecution(()=>{n.rowIndexMapper.destroy(),n.columnIndexMapper.destroy(),S.getItems().forEach(([,t])=>{t.destroy()}),S.clear(),n.runHooks("afterDestroy")},!0),Qn.getSingleton().destroy(n),ke(n,(t,e,o)=>{var n;ln(t)?o[e]=(n=e,()=>{ce(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==e&&(o[e]=null)}),n.isDestroyed=!0,s&&s.destroy(),s=null,l=null,R=null,a=null,n=null},this.getActiveEditor=function(){return a?.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return n.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return n.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return n.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return n.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return n.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return n.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return n.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return n.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return n.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return n.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return n.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return n.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(t){return S.getItem(yn(t))},this.getPluginName=function(t){return S.getId(t)},this.getInstance=function(){return n},this.addHook=function(t,e,o){Qn.getSingleton().add(t,e,n,o)},this.hasHook=function(t){return Qn.getSingleton().has(t,n)||Qn.getSingleton().has(t)},this.addHookOnce=function(t,e,o){Qn.getSingleton().once(t,e,n,o)},this.removeHook=function(t,e){Qn.getSingleton().remove(t,e,n)},this.runHooks=function(t,e,o,i,s,r,l){return Qn.getSingleton().run(n,t,e,o,i,s,r,l)},this.getTranslatedPhrase=function(t,e){return bv(C.language,t,e)},this.toHTML=()=>Zi(this),this.toTableElement=()=>{const t=n.rootDocument.createElement("div");return t.insertAdjacentHTML("afterbegin",Zi(n)),t.firstElementChild},this.timeouts=[],this.useTheme=t=>{const e=!!d;this.stylesHandler.useTheme(t??void 0);const o=this.stylesHandler.getThemeName();!e&&o&&(jk(this.rootContainer)&&(fo(this.rootContainer,/ht-theme-.*/g),po(this.rootContainer,o)),n.render(),n.scrollViewportTo(0,0)),this.runHooks("afterSetTheme",o,e)},this.getCurrentThemeName=()=>n.stylesHandler.getThemeName()??null,this.getTableHeight=()=>n.rootElement.offsetHeight,this.getTableWidth=()=>n.rootElement.offsetWidth,this._registerTimeout=function(t,e=0){let o=t;return"function"==typeof o&&(o=setTimeout(o,e)),this.timeouts.push(o),o},this._clearTimeouts=function(){$(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(){$(this.microtasks,t=>{t.cancelled=!0}),this.microtasks.length=0},this._getEditorManager=function(){return a},this._getDataSource=function(){return r},this._getMetaManager=function(){return v};const L=Uk({handleEvent:(t,e)=>"global"===e||n.isListening(),beforeKeyDown:t=>n.runHooks("beforeKeyDown",t),afterKeyDown:t=>{this.isDestroyed||n.runHooks("afterDocumentKeyDown",t)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",t=>{!1===t.ctrlKey&&!1===t.metaKey&&L.releasePressedKeys()}),this.getShortcutManager=function(){return L},h=new gk(n);const B=Ep(this)?$S(n):null,V=Ep(this)?new tE({top:n.rootSlotTopElement,bottom:n.rootSlotBottomElement}):null;this.getFocusManager=function(){return h},this.getFocusScopeManager=function(){return Ep(n)||ce("The FocusScopeManager is only available for the main Handsontable instance."),B},this.getLayoutManager=function(){return Ep(n)||ce("The LayoutManager is only available for the main Handsontable instance."),V};const U=p.theme,j=p.themeName,q=jk(n.rootContainer);var X;!Ep(n)||q||!Ce(U)&&(U||j)||H(U,M(p)),Es().forEach(t=>{const e=xs(t);e&&S.addItem(t,new e(this))}),X=n,[Hk,Tk].forEach(t=>t(X)),Ep(this)&&function(t){[Ik].forEach(e=>e(t))}(n),L.setActiveContextName("grid"),Qn.getSingleton().run(n,"construct")};sy(hM),Os(Jx);const dM=function(t,e){const o=new cM(t,e||{},kp);return o.init(),o};function uM(t,e){(null==e||e>t.length)&&(e=t.length);for(var o=0,n=Array(e);o<e;o++)n[o]=t[o];return n}function gM(t,e,o){return e=vM(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,CM()?Reflect.construct(e,o||[],vM(t).constructor):e.apply(t,o))}function pM(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fM(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,xM(n.key),n)}}function mM(t,e,o){return e&&fM(t.prototype,e),o&&fM(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function wM(t,e,o){return(e=xM(e))in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}function bM(){return bM=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},bM.apply(null,arguments)}function vM(t){return vM=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vM(t)}function CM(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(CM=function(){return!!t})()}function yM(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,n)}return o}function SM(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?yM(Object(o),!0).forEach(function(e){wM(t,e,o[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):yM(Object(o)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))})}return t}function kM(t,e){return kM=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kM(t,e)}function RM(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var n,i,s,r,l=[],a=!0,h=!1;try{if(s=(o=o.call(t)).next,0===e);else for(;!(a=(n=s.call(o)).done)&&(l.push(n.value),l.length!==e);a=!0);}catch(t){h=!0,i=t}finally{try{if(!a&&null!=o.return&&(r=o.return(),Object(r)!==r))return}finally{if(h)throw i}}return l}}(t,e)||TM(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 EM(t){return function(t){if(Array.isArray(t))return uM(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||TM(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 xM(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var n=o.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}function MM(t){return MM="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},MM(t)}function TM(t,e){if(t){if("string"==typeof t)return uM(t,e);var o={}.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?uM(t,e):void 0}}dM.editors={BaseEditor:Ti,TextEditor:lM},dM.dom={empty:vo},dM.helper={},dM.Core=function(t,e={}){return new cM(t,e,kp)},dM.DefaultSettings=ay(),dM.hooks=Qn.getSingleton(),dM.CellCoords=pr,dM.CellRange=Sr,dM.packageName="handsontable",dM.buildDate="07/10/2026 10:00:20",dM.version="18.1.2",dM.languages={dictionaryKeys:av,getLanguageDictionary:mv,getLanguagesDictionaries:function(){return pv()},registerLanguageDictionary:fv,getTranslatedPhrase:bv},dM.themes={hasTheme:Ux,getTheme:jx,getThemeNames:function(){return Vx()},getThemes:function(){return Fx()},registerTheme:Gx,reinitTheme:function(t,e){const{themeName:o,themeConfigObject:n}=qx(t,e);if(!Ux(o))return void Xe(`Theme "${o}" is not registered. Cannot reinitialize a non-existent theme.`);const i=nx(n);return $x(o,i),i}};var HM=null;function IM(){var t;"undefined"!=typeof console&&(t=console).warn.apply(t,arguments)}function _M(t){return AM(t,"hot-renderer")?(IM("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):!!AM(t,"hot-editor")&&(IM("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 AM(t,o){return e.Children.toArray(t).some(function(t){return void 0!==t.props[o]})}function WM(t,o){if(!t||!o||"boolean"==typeof o)return null;var n=e.createElement(o,null),i=OM({},!1);return i.className="".concat("hot-wrapper-editor-container"," ").concat(i.className),f.createPortal(e.createElement("div",i,n),t.body)}function OM(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 NM(t){return"object"===MM(t)&&null!==t}function PM(t){if(!NM(t))return!1;var e=Object.getPrototypeOf(t);return e===Object.prototype||null===e}function DM(t){return Array.isArray(t)}function LM(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(DM(t)&&DM(e)){if(t.length!==e.length)return!1;for(var o=0;o<t.length;o++)if(!LM(t[o],e[o]))return!1;return!0}if(DM(t)||DM(e))return!1;if(!NM(t)||!NM(e))return!1;if(!PM(t)||!PM(e))return!1;var n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(var s=0,r=n;s<r.length;s++){var l=r[s];if(!Object.prototype.hasOwnProperty.call(e,l))return!1;if(!LM(t[l],e[l]))return!1}return!0}var zM=["dataSchema","columns"],BM=function(){return mM(function t(){pM(this,t)},null,[{key:"getSettings",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.prevProps,n=void 0===o?{}:o,i=e.isInit,s=void 0!==i&&i,r=e.initOnlySettingKeys,l=void 0===r?[]:r,a=function(e){return!s&&zM.includes(e)?LM(n[e],t[e]):!(s||!l.includes(e))},h={};for(var c in t)"children"!==c&&!a(c)&&t.hasOwnProperty(c)&&(h[c]=t[c]);return h}}])}(),VM=d(void 0),FM=function(t){var o=t.children,n=i([]),l=s(function(t,e){n.current[e]=t},[]),a=s(function(t){n.current.length=t},[]),h=i(new Map),c=i(new Map),d=s(function(){return c.current.clear()},[]),u=i(new Map),g=i(new Map),p=i(new Set),m=s(function(){u.current.clear(),p.current.clear()},[]),w=s(function(){return g.current.size},[]),b=s(function(t){return function(o,n,i,s,r,l,a){var h="".concat(i,"-").concat(s),d=o.guid,m="".concat(d,"-").concat(h),w="".concat(h,"-").concat(d);if(n&&!n.getAttribute("ghost-table")){var b=g.current.get(m),v=!!b&&b.parentNode===n,C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,o=arguments.length>2?arguments[2]:void 0;e||(e=document);var n=arguments.length>3?arguments[3]:void 0;return n||(HM||(HM=e.createDocumentFragment()),n=e.createElement("DIV"),HM.appendChild(n)),{portal:f.createPortal(t,n,o),portalContainer:n}}(e.createElement(t,{instance:o,TD:n,row:i,col:s,prop:r,value:l,cellProperties:a}),n.ownerDocument,w,b),y=C.portal,S=C.portalContainer;if(!v){for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(S)}g.current.set(m,S),p.current.add(m),u.current.set(w,y)}return c.current.set(h,n),n}},[]),v=i(function(){}),C=s(function(t){v.current=t},[]),y=s(function(){var t=p.current;g.current.forEach(function(e,o){t.has(o)||g.current.delete(o)}),v.current(EM(u.current.values()))},[]),S=r(function(){return{componentRendererColumns:h.current,columnsSettings:n.current,emitColumnSettings:l,trimColumnSettings:a,getRendererWrapper:b,clearPortalCache:m,clearRenderedCellCache:d,getPortalContainerCacheSize:w,setRenderersPortalManagerRef:C,pushCellPortalsIntoPortalManager:y}},[l,a,b,d,w,C,y]);return e.createElement(VM.Provider,{value:S},o)};function $M(){return u(VM)}var UM=d(void 0),jM=function(t){var o=t.columnIndex,n=t.getOwnerDocument,i=t.children,s=r(function(){return{columnIndex:o,getOwnerDocument:n}},[o,n]);return e.createElement(UM.Provider,{value:s},i)},qM=["close","focus","open"],GM=["getValue","setValue"],YM={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function XM(t,e){return function(){function o(n){var i;return pM(this,o),i=gM(this,o,[n]),e.current=i,Object.getOwnPropertyNames(dM.editors.BaseEditor.prototype).forEach(function(e){if("constructor"!==e&&!GM.includes(e)){var n=dM.editors.BaseEditor.prototype[e];o.prototype[e]=function(){for(var o,i,s,r,l=arguments.length,a=new Array(l),h=0;h<l;h++)a[h]=arguments[h];qM.includes(e)||(i=(s=n).call.apply(s,[this].concat(a)));YM[e]&&null!==(o=t.current)&&void 0!==o&&o[YM[e]]&&(i=(r=t.current[YM[e]]).call.apply(r,[this].concat(a)));return i}.bind(i)}}),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kM(t,e)}(o,dM.editors.BaseEditor),mM(o,[{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 KM=d(void 0),ZM=function(t){var o=t.hooksRef,n=t.hotCustomEditorInstanceRef,i=t.children;return e.createElement(KM.Provider,{value:{hooksRef:o,hotCustomEditorInstanceRef:n}},i)},QM=function(t){return t.type===tT},JM=["_columnIndex","_getOwnerDocument","children"],tT=function(t){var o=$M(),n=o.componentRendererColumns,s=o.emitColumnSettings,r=o.getRendererWrapper,a=u(UM),h=a.columnIndex,c=a.getOwnerDocument,d=i(null),g=i(null);l(function(){var o,i=function(){var e=BM.getSettings(Object.keys(t).filter(function(t){return!JM.includes(t)}).reduce(function(e,o){return e[o]=t[o],e},{}));return t.renderer?(e.renderer=r(t.renderer),n.set(h,!0)):t.hotRenderer&&(e.renderer=t.hotRenderer),t.editor?e.editor=XM(d,g):t.hotEditor&&(e.editor=t.hotEditor),e}();s(i,h),_M(t.children)||(o=t.children,e.Children.toArray(o).length&&IM("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children."))});var p=WM(c(),t.editor);return e.createElement(ZM,{hooksRef:d,hotCustomEditorInstanceRef:g},p)},eT=o(function(t,o){var n=RM(g([]),2),i=n[0],s=n[1];return h(o,function(){return s}),e.createElement(c,null,i)});function oT(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var nT,iT={exports:{}},sT={exports:{}},rT={};var lT,aT,hT,cT,dT,uT,gT,pT,fT,mT,wT,bT,vT,CT,yT={};function ST(){return aT||(aT=1,"production"===process.env.NODE_ENV?sT.exports=function(){if(nT)return rT;nT=1;var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,n=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,l=t?Symbol.for("react.context"):60110,a=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"===MM(t)&&null!==t){var u=t.$$typeof;switch(u){case e:switch(t=t.type){case a:case h:case n:case s:case i:case d:return t;default:switch(t=t&&t.$$typeof){case l:case c:case p:case g:case r:return t;default:return u}}case o:return u}}}function C(t){return v(t)===h}return rT.AsyncMode=a,rT.ConcurrentMode=h,rT.ContextConsumer=l,rT.ContextProvider=r,rT.Element=e,rT.ForwardRef=c,rT.Fragment=n,rT.Lazy=p,rT.Memo=g,rT.Portal=o,rT.Profiler=s,rT.StrictMode=i,rT.Suspense=d,rT.isAsyncMode=function(t){return C(t)||v(t)===a},rT.isConcurrentMode=C,rT.isContextConsumer=function(t){return v(t)===l},rT.isContextProvider=function(t){return v(t)===r},rT.isElement=function(t){return"object"===MM(t)&&null!==t&&t.$$typeof===e},rT.isForwardRef=function(t){return v(t)===c},rT.isFragment=function(t){return v(t)===n},rT.isLazy=function(t){return v(t)===p},rT.isMemo=function(t){return v(t)===g},rT.isPortal=function(t){return v(t)===o},rT.isProfiler=function(t){return v(t)===s},rT.isStrictMode=function(t){return v(t)===i},rT.isSuspense=function(t){return v(t)===d},rT.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===h||t===s||t===i||t===d||t===u||"object"===MM(t)&&null!==t&&(t.$$typeof===p||t.$$typeof===g||t.$$typeof===r||t.$$typeof===l||t.$$typeof===c||t.$$typeof===m||t.$$typeof===w||t.$$typeof===b||t.$$typeof===f)},rT.typeOf=v,rT}():sT.exports=(lT||(lT=1,"production"!==process.env.NODE_ENV&&function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,o=t?Symbol.for("react.portal"):60106,n=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,l=t?Symbol.for("react.context"):60110,a=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"===MM(t)&&null!==t){var u=t.$$typeof;switch(u){case e:var f=t.type;switch(f){case a:case h:case n:case s:case i:case d:return f;default:var m=f&&f.$$typeof;switch(m){case l:case c:case p:case g:case r:return m;default:return u}}case o:return u}}}var C=a,y=h,S=l,k=r,R=e,E=c,x=n,M=p,T=g,H=o,I=s,_=i,A=d,W=!1;function O(t){return v(t)===h}yT.AsyncMode=C,yT.ConcurrentMode=y,yT.ContextConsumer=S,yT.ContextProvider=k,yT.Element=R,yT.ForwardRef=E,yT.Fragment=x,yT.Lazy=M,yT.Memo=T,yT.Portal=H,yT.Profiler=I,yT.StrictMode=_,yT.Suspense=A,yT.isAsyncMode=function(t){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),O(t)||v(t)===a},yT.isConcurrentMode=O,yT.isContextConsumer=function(t){return v(t)===l},yT.isContextProvider=function(t){return v(t)===r},yT.isElement=function(t){return"object"===MM(t)&&null!==t&&t.$$typeof===e},yT.isForwardRef=function(t){return v(t)===c},yT.isFragment=function(t){return v(t)===n},yT.isLazy=function(t){return v(t)===p},yT.isMemo=function(t){return v(t)===g},yT.isPortal=function(t){return v(t)===o},yT.isProfiler=function(t){return v(t)===s},yT.isStrictMode=function(t){return v(t)===i},yT.isSuspense=function(t){return v(t)===d},yT.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===n||t===h||t===s||t===i||t===d||t===u||"object"===MM(t)&&null!==t&&(t.$$typeof===p||t.$$typeof===g||t.$$typeof===r||t.$$typeof===l||t.$$typeof===c||t.$$typeof===m||t.$$typeof===w||t.$$typeof===b||t.$$typeof===f)},yT.typeOf=v}()),yT)),sT.exports}
|
|
86
|
+
/*
|
|
87
|
+
object-assign
|
|
88
|
+
(c) Sindre Sorhus
|
|
89
|
+
@license MIT
|
|
90
|
+
*/function kT(){if(cT)return hT;cT=1;var t=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;return hT=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={},o=0;o<10;o++)e["_"+String.fromCharCode(o)]=o;var n=Object.getOwnPropertyNames(e).map(function(t){return e[t]});if("0123456789"!==n.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}()?Object.assign:function(n,i){for(var s,r,l=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(n),a=1;a<arguments.length;a++){for(var h in s=Object(arguments[a]))e.call(s,h)&&(l[h]=s[h]);if(t){r=t(s);for(var c=0;c<r.length;c++)o.call(s,r[c])&&(l[r[c]]=s[r[c]])}}return l},hT}function RT(){if(uT)return dT;uT=1;return dT="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ET(){return pT?gT:(pT=1,gT=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var xT=ST();iT.exports=function(){if(bT)return wT;bT=1;var t=ST(),e=kT(),o=RT(),n=ET(),i=function(){if(mT)return fT;mT=1;var t=function(){};if("production"!==process.env.NODE_ENV){var e=RT(),o={},n=ET();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,l,a){if("production"!==process.env.NODE_ENV)for(var h in i)if(n(i,h)){var c;try{if("function"!=typeof i[h]){var d=Error((l||"React class")+": "+r+" type `"+h+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+MM(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,l,r,null,e)}catch(t){c=t}if(!c||c instanceof Error||t((l||"React class")+": type specification of "+r+" `"+h+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+MM(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 o)){o[c.message]=!0;var u=a?a():"";t("Failed "+r+" type: "+c.message+(null!=u?u:""))}}}return i.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(o={})},fT=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){}}),wT=function(l,a){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,n,i,s,r){if("function"!=typeof t)return new g("Property `"+r+"` of component `"+i+"` has invalid PropType notation inside arrayOf.");var l=e[n];if(!Array.isArray(l))return new g("Invalid "+s+" `"+r+"` of type `"+b(l)+"` supplied to `"+i+"`, expected an array.");for(var a=0;a<l.length;a++){var h=t(l,a,i,s,r+"["+a+"]",o);if(h instanceof Error)return h}return null})},element:p(function(t,e,o,n,i){var s=t[e];return l(s)?null:new g("Invalid "+n+" `"+i+"` of type `"+b(s)+"` supplied to `"+o+"`, expected a single ReactElement.")}),elementType:p(function(e,o,n,i,s){var r=e[o];return t.isValidElementType(r)?null:new g("Invalid "+i+" `"+s+"` of type `"+b(r)+"` supplied to `"+n+"`, expected a single ReactElement type.")}),instanceOf:function(t){return p(function(e,o,n,i,s){if(!(e[o]instanceof t)){var r=t.name||c;return new g("Invalid "+i+" `"+s+"` of type `"+((l=e[o]).constructor&&l.constructor.name?l.constructor.name:c)+"` supplied to `"+n+"`, expected instance of `"+r+"`.")}var l;return null})},node:p(function(t,e,o,n,i){return w(t[e])?null:new g("Invalid "+n+" `"+i+"` supplied to `"+o+"`, expected a ReactNode.")}),objectOf:function(t){return p(function(e,i,s,r,l){if("function"!=typeof t)return new g("Property `"+l+"` of component `"+s+"` has invalid PropType notation inside objectOf.");var a=e[i],h=b(a);if("object"!==h)return new g("Invalid "+r+" `"+l+"` of type `"+h+"` supplied to `"+s+"`, expected an object.");for(var c in a)if(n(a,c)){var d=t(a,c,s,r,l+"."+c,o);if(d instanceof Error)return d}return null})},oneOf:function(t){return Array.isArray(t)?p(function(e,o,n,i,s){for(var r=e[o],l=0;l<t.length;l++)if(u(r,t[l]))return null;var a=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 `"+n+"`, expected one of "+a+".")}):("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,l){for(var a=[],h=0;h<t.length;h++){var c=(0,t[h])(e,i,s,r,l,o);if(null==c)return null;c.data&&n(c.data,"expectedType")&&a.push(c.data.expectedType)}return new g("Invalid "+r+" `"+l+"` supplied to `"+s+"`"+(a.length>0?", expected one of type ["+a.join(", ")+"]":"")+".")})},shape:function(t){return p(function(e,n,i,s,r){var l=e[n],a=b(l);if("object"!==a)return new g("Invalid "+s+" `"+r+"` of type `"+a+"` 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(l,h,i,s,r+"."+h,o);if(d)return d}return null})},exact:function(t){return p(function(i,s,r,l,a){var h=i[s],c=b(h);if("object"!==c)return new g("Invalid "+l+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var d=e({},i[s],t);for(var u in d){var p=t[u];if(n(t,u)&&"function"!=typeof p)return m(r,l,a,u,v(p));if(!p)return new g("Invalid "+l+" `"+a+"` 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,l,a+"."+u,o);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"===MM(e)?e:{},this.stack=""}function p(t){if("production"!==process.env.NODE_ENV)var e={},n=0;function i(i,r,l,h,d,u,p){if(h=h||c,u=u||l,p!==o){if(a){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+":"+l;!e[m]&&n<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,n++)}}return null==r[l]?i?null===r[l]?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,l,h,d,u)}var r=i.bind(null,!1);return r.isRequired=i.bind(null,!0),r}function f(t){return p(function(e,o,n,i,s,r){var l=e[o];return b(l)!==t?new g("Invalid "+i+" `"+s+"` of type `"+v(l)+"` supplied to `"+n+"`, expected `"+t+"`.",{expectedType:t}):null})}function m(t,e,o,n,i){return new g((t||"React class")+": "+e+" type `"+o+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function w(t){switch(MM(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||l(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 o,n=e.call(t);if(e!==t.entries){for(;!(o=n.next()).done;)if(!w(o.value))return!1}else for(;!(o=n.next()).done;){var i=o.value;if(i&&!w(i[1]))return!1}return!0;default:return!1}}function b(t){var e=MM(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},wT}()(xT.isElement,!0)}else iT.exports=function(){if(CT)return vT;CT=1;var t=RT();function e(){}function o(){}return o.resetWarningCache=e,vT=function(){function n(e,o,n,i,s,r){if(r!==t){var l=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 l.name="Invariant Violation",l}}function i(){return n}n.isRequired=n;var s={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:i,element:n,elementType:n,instanceOf:i,node:n,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:o,resetWarningCache:e};return s.PropTypes=s,s}}()();var MT=oT(iT.exports),TT=o(function(t,o){var n,r,d,u=i(null),g=i(null),p=i(null),f=i(null),m=i(),w=$M(),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,o=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=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=BM.getSettings(t,{prevProps:n,isInit:o,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||Ws("text"),t.editor?s.editor=XM(p,f):s.editor=t.hotEditor||bi("text"),s},k=function(t){var e,o;t&&(null!==(e=t.getPlugin("autoRowSize"))&&void 0!==e&&e.enabled||null!==(o=t.getPlugin("autoColumnSize"))&&void 0!==o&&o.enabled)&&w.componentRendererColumns.size>0&&IM("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.")};l(function(){var o=a.toArray(t.children).filter(QM).length;w.trimColumnSettings(o);var n,i,s=S(!0);return m.current=t,u.current=new dM.Core(g.current,s),u.current.addHook("beforeViewRender",function(){w.clearPortalCache(),w.clearRenderedCellCache()}),u.current.addHook("afterViewRender",function(){w.pushCellPortalsIntoPortalManager()}),u.current.init(),k(u.current),_M(t.children)||(n=t.children,i=tT,e.Children.toArray(n).some(function(t){return t.type!==i})&&IM("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var t;C(),null===(t=b())||void 0===t||t.destroy()}},[]),n=function(){C();var e=b(),o=a.toArray(t.children).filter(QM).length;w.trimColumnSettings(o);var n=S(!1,m.current);m.current=t,null==e||e.updateSettings(n,!1),k(e),_M(t.children)},d=e.useRef(!1),l(function(){if(d.current)return n();d.current=!0},r),h(o,function(){return{get hotElementRef(){return g.current},get hotInstance(){return b()}}});var R=a.toArray(t.children).filter(QM).map(function(t,o){return e.createElement(jM,{columnIndex:o,getOwnerDocument:y,key:o},t)}),E=OM(t),x=WM(y(),t.editor);return e.createElement(c,null,e.createElement("div",bM({ref:g},E,{style:SM({height:"100%"},E.style)}),R),e.createElement(eT,{ref:w.setRenderersPortalManagerRef}),e.createElement(ZM,{hooksRef:p,hotCustomEditorInstanceRef:f},x))});TT.propTypes={style:MT.object,id:MT.string,className:MT.string};var HT=["children"],IT=o(function(t,o){var i,s=t.children,r=function(t,e){if(null==t)return{};var o,n,i=function(t,e){if(null==t)return{};var o={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(-1!==e.indexOf(n))continue;o[n]=t[n]}return o}(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(n=0;n<s.length;n++)o=s[n],-1===e.indexOf(o)&&{}.propertyIsEnumerable.call(t,o)&&(i[o]=t[o])}return i}(t,HT),l=null!==(i=r.id)&&void 0!==i?i:n();return e.createElement(FM,null,e.createElement(TT,bM({id:l},r,{ref:o}),s))});IT.version="18.1.2";const _T="handsontableEditor";class AT extends lM{static get EDITOR_TYPE(){return"handsontable"}open(){super.open();const t=this.htContainer.style;this.htEditor&&(this.htEditor.rootPortalElement=null,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.rootPortalElement=this.hot.rootPortalElement,this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Fo(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,o,n,i,s){super.prepare(t,e,o,n,i,s);const{hot:r}=this,l=this.setValue.bind(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){if(e.row<0||e.col<0)return;const o=this.getDataAtCell(e.row,e.col);void 0!==o&&l(o),r.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&ue(a,s.handsontable),this.htOptions=a}beginEditing(t,e){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||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,o){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,o)}flipDropdownVerticallyIfNeeded(){const{view:t}=this.hot,e=this.getEditedCellRect();if(!e)return{isFlipped:!1,spaceAbove:0,spaceBelow:0};let o=e.top;if(t.isVerticallyScrollableByWindow()){const e=t.getTableOffset().top-this.hot.rootWindow.scrollY;o=Math.max(o+e,0)}const n=this.getDropdownHeight(),i=t.getWorkspaceHeight()-o-e.height,s=n>i&&o>i+e.height;return s?this.flipDropdownVertically():this.unflipDropdownVertically(),{isFlipped:s,spaceAbove:o,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();if(!e)return{isFlipped:!1,spaceInlineStart:0,spaceInlineEnd:0};let o=e.start+e.width,n=t.getWorkspaceWidth();if(t.isHorizontallyScrollableByWindow()){const e=t.getTableOffset().left-this.hot.rootWindow.scrollX;o=Math.max(o+e,0),n=this.hot.rootDocument.documentElement.clientWidth}const i=this.getDropdownWidth(),s=n-o+e.width,r=i>s&&o>s;return r?this.flipDropdownHorizontally():this.unflipDropdownHorizontally(),{isFlipped:r,spaceInlineStart:o,spaceInlineEnd:s}}flipDropdownHorizontally(){const t=this.htEditor.rootElement.style,{width:e}=this.getEditedCellRect()??{width:0};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&&(this.htEditor.rootPortalElement=null,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:_T,relativeToGroup:Ek,position:"before"},o=(t,e)=>{const o=this.htEditor;if(void 0!==t&&(t<0||this.isFlippedVertically&&t>o.countRows()-1?o.deselectCell():o.selectCell(t,0),o.getData().length))return e.preventDefault(),pn(e),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:t=>{const e=this.htEditor;let n,i;if(!e.getSelectedActive()&&this.isFlippedVertically)n=e.countRows()-1;else if(e.getSelectedActive()){const t=e.getSelectedActive();this.isFlippedVertically?(i=t[0],n=Math.max(0,i-1)):(i=t[0],n=i-1)}return o(n,t)},preventDefault:!1},{keys:[["ArrowDown"]],callback:t=>{const e=this.htEditor;let n,i;if(e.getSelectedActive()||this.isFlippedVertically){if(e.getSelectedActive()){const t=e.getSelectedActive();if(this.isFlippedVertically)n=t[0]+1;else if(!this.isFlippedVertically){const o=e.countRows()-1;i=t[0],n=Math.min(o,i+1)}}}else n=0;return o(n,t)},preventDefault:!1}],e)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(_T)}constructor(...t){super(...t),this.isFlippedVertically=!1,this.isFlippedHorizontally=!1}}function WT(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function OT(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function NT(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,OT(t,e,"get"))}function PT(t,e,o){WT(t,e),e.set(t,o)}function DT(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,OT(t,e,"set"),o),o}function LT(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function zT(t,e){WT(t,e),e.add(t)}var BT=new WeakMap,VT=new WeakMap,FT=new WeakSet,$T=new WeakSet;class UT extends AT{static get EDITOR_TYPE(){return"autocomplete"}getValue(){const t=this.rawChoices.find(t=>{const e=this.stripValueIfNeeded(t);return(LT(this,$T,qT).call(this,e)?e.value:e)===this.TEXTAREA.value});return At(t)?t:this.TEXTAREA.value}createElements(){super.createElements(),po(this.htContainer,"autocompleteEditor"),po(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&mo(this.TEXTAREA,[["type","text"],["role","combobox"],H("listbox"),["aria-autocomplete","list"]])}prepare(t,e,o,n,i,s){var r;super.prepare(t,e,o,n,i,s),this.hot.getSettings().ariaTags&&mo(this.TEXTAREA,[O("false"),(r=`${NT(this,BT)}-listbox-${t}-${e}`,["aria-controls",r])]),this.htOptions={...this.htOptions,valueGetter:t=>LT(this,$T,qT).call(this,t)?t.value:t}}open(){super.open();const t=this.cellProperties.trimDropdown,e=void 0===t||t,o=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,i=n?.length,{row:s,col:r}=this;if(this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",t=>this.onBeforeKeyDown(t)),this.htEditor.addHook("afterScroll",NT(this,VT)),this.htEditor.updateSettings({colWidths:e?[Do(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,modifyColWidth:e?void 0:t=>Math.max(t??0,Do(this.TEXTAREA)-2),renderer:(t,e,s,r,l,a,h)=>{aM(0,e,0,0,0,a,h);const{filteringCaseSensitive:c,allowHtml:d}=this.cellProperties,u=this.cellProperties.locale,g=this.query,p=_t(a);if(d)Ro(e,p,!1,"html",this.hot.rootElement);else if(p&&g&&g.length>0){const o=!0===c?p.indexOf(g):An(p,u).indexOf(An(g,u));if(-1!==o){const n=p.slice(o,o+g.length),{rootDocument:i}=t;e.innerHTML="",e.appendChild(i.createTextNode(p.slice(0,o)));const s=i.createElement("strong");s.textContent=n,e.appendChild(s),e.appendChild(i.createTextNode(p.slice(o+g.length)))}}var f;o&&mo(e,[["role","option"],...n?[(f=i??0,["aria-setsize",f])]:[],...n?[D(n.indexOf(a)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${r}`]])},afterSelectionEnd:(t,e)=>{if(o){const o=t=>{var e;mo(t,[["aria-selected","true"]]),mo(this.TEXTAREA,...(e=t.id,["aria-activedescendant",e]))},n=this.htEditor.getCell(t,e,!0);null!==n?o(n):this.htEditor.addHookOnce("afterScrollVertically",()=>{const n=this.htEditor.getCell(t,e,!0);null!==n&&o(n)})}}}),o){const t=["role","presentation"];mo(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,t[0],t[1]),mo(this.htEditor.rootElement,[["role","listbox"],(l="polite",["aria-live",l]),P("text"),["id",`${NT(this,BT)}-listbox-${s}-${r}`]]),mo(this.TEXTAREA,...O("true"))}var l;this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&mo(this.TEXTAREA,[O("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=Bo(this.TEXTAREA),o=(n=this.TEXTAREA).selectionEnd?n.selectionEnd:0;var n;const i=this.cellProperties.sortByRelevance,s=this.cellProperties.filter,r=this.stripValueIfNeeded(this.getValue()),l=LT(this,$T,qT).call(this,r)?r.value:r;let a=null,h=t;i||(h=[...h].sort((t,e)=>_t(t).localeCompare(_t(e))));const c=[],d=this.cellProperties.locale,u=this.cellProperties.filteringCaseSensitive,g=u?l:An(String(l),d);for(let t=0;t<h.length;t++){const e=LT(this,$T,qT).call(this,h[t])?En(_t(h[t].value)):En(_t(h[t]));if(-1!==(u?e:An(e,d)).indexOf(String(g))&&(c.push(t),!1===s))break}!1===s?String(r).length>0&&(a=c[0]):(h=c.map(t=>h[t]),a=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(z([h])),h.length>0&&(this.updateDropdownDimensions(),this.flipDropdownVerticallyIfNeeded(),this.flipDropdownHorizontallyIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a??void 0)),this.hot.listen(),Fo(this.TEXTAREA,e,e===o?void 0:o)}flipDropdownVerticallyIfNeeded(){const t=super.flipDropdownVerticallyIfNeeded(),{isFlipped:e,spaceAbove:o,spaceBelow:n}=t;return this.limitDropdownIfNeeded(e?o:n),t}limitDropdownIfNeeded(t){const e=this.getDropdownHeight();if(e>t){const o=this.htEditor.stylesHandler.getDefaultRowHeight()??0;if(0===o)return;const n=Math.max(Math.ceil(t/o)-1,1)*o;this.isFlippedVertically&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+e-n+"px"),this.setDropdownHeight(n)}}updateDropdownDimensions(){const t=function(t=document){return je()?Number.isInteger(t.defaultView?.devicePixelRatio||1)?0:2:0}(),e=this.getTargetEditorWidth()+t,o=this.getTargetEditorHeight()+t;this.htEditor.updateSettings({width:e,height:o}),LT(this,FT,jT).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(t){this.htEditor.updateSettings({height:t}),LT(this,FT,jT).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.htContainer.querySelector(".htCore");if(e){const o=this.hot.rootWindow.getComputedStyle(e);t=parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)}}const e=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length),o=Array.from({length:e},(t,e)=>e).reduce((t,e)=>t+((this.hot.stylesHandler.getDefaultRowHeight()??0)+(0===e?1:0)),0);return o+t}getTargetEditorWidth(){let t=0;if(!this.hot.getCurrentThemeName()){const e=this.htContainer.querySelector(".htCore");if(e){const o=this.hot.rootWindow.getComputedStyle(e);t=parseInt(o.borderInlineStartWidth,10)+parseInt(o.borderInlineEndWidth,10)}}return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(t){return this.stripValuesIfNeeded([t])[0]}stripValuesIfNeeded(t){const{allowHtml:e}=this.cellProperties,o=t=>_t(e?t:En(String(t)));return t.every(t=>_e(t))?t.map(t=>{const e=t;return{key:o(e.key),value:o(e.value)}}):t.map(t=>o(t))}onBeforeKeyDown(t){if(un(t.keyCode)||t.keyCode===cn.BACKSPACE||t.keyCode===cn.DELETE||t.keyCode===cn.INSERT){let e=10;if(t.keyCode===cn.C&&(t.ctrlKey||t.metaKey))return;this.isOpened()||(e+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},e)}}constructor(...t){super(...t),zT(this,FT),zT(this,$T),PT(this,BT,{writable:!0,value:void 0}),PT(this,VT,{writable:!0,value:void 0}),this.query=null,this.strippedChoices=[],this.rawChoices=[],DT(this,BT,this.hot.guid.slice(0,9)),DT(this,VT,an(()=>{this.focus()},100))}}function jT(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getTargetEditorWidth()+jo(this.hot.rootDocument)})}function qT(t){const e=t;return Ce(t)&&At(e.key)&&At(e.value)}class GT extends Ti{static get EDITOR_TYPE(){return"checkbox"}beginEditing(t,e){if(e&&"mouseup"===e.type&&"TD"===no(e).nodeName){const t=this.TD.querySelector('input[type="checkbox"]');go(t,"htBadValue")||t.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}const YT=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$/;function XT(t){if(Ot(t))return null;if("string"==typeof t&&YT.test(t)){const[e,o,n]=t.split("-").map(Number);return new Date(e,o-1,n)}return null}const KT=[31,28,31,30,31,30,31,31,30,31,30,31];function ZT(t){return t%4==0&&t%100!=0||t%400==0}function QT(t){if("string"!=typeof t||!YT.test(t))return!1;const e=+t.slice(0,4),o=+t.slice(5,7);return+t.slice(8,10)<=(2===o&&ZT(e)?29:KT[o-1])}const JT=/^([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?$/;function tH(t){if(Ot(t))return null;if("string"!=typeof t)return null;const e=JT.exec(t);if(!e)return null;const o=Number(e[1]),n=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,o,n,i,r)}function eH(t){return"string"==typeof t&&JT.test(t)}const oH=/^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.(\d{1,3}))?)?)?$/;function nH(t){if(Ot(t))return null;if("string"!=typeof t)return null;const e=oH.exec(t);if(!e)return null;const[o]=t.split(/[T ]/),[n,i,s]=o.split("-").map(Number),r=void 0!==e[3]?Number(e[3]):0,l=void 0!==e[4]?Number(e[4]):0,a=void 0!==e[5]?Number(e[5]):0,h=void 0!==e[6]?Number(e[6].padEnd(3,"0").slice(0,3)):0;return new Date(n,i-1,s,r,l,a,h)}function iH(t){if("string"!=typeof t)return!1;const e=oH.exec(t);if(!e)return!1;const o=+t.slice(0,4),n=+e[1];return+e[2]<=(2===n&&ZT(o)?29:KT[n-1])}function sH(){const t=new Date;return new Date(t.getFullYear(),t.getMonth(),t.getDate())}function rH(t){const e=sH();return e.setDate(e.getDate()+t),e}function lH(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}class aH extends lM{static get EDITOR_TYPE(){return"date"}init(){super.init(),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}prepare(t,e,o,n,i,s){super.prepare(t,e,o,n,i,s),void 0!==s.datePickerConfig&&Ze(this.hot.rootElement,"datePickerConfig",'The "datePickerConfig" option is not supported. The native date input is used instead of Pikaday.');const r=this.hot.toPhysicalRow(t);this.originalValue=this.hot.getSourceDataAtCell(r,e)}createElements(t){super.createElements("input"),this.TEXTAREA.setAttribute("type","date")}setValue(t){if(Ot(t)&&(t=this.cellProperties.defaultDate),!QT(t))return Xe(X`DateEditor: value must be in ISO date format ("YYYY-MM-DD")\x20
|
|
91
|
+
required by the native date input. Received:`,t),void super.setValue("");super.setValue(t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class hH extends UT{static get EDITOR_TYPE(){return"dropdown"}prepare(t,e,o,n,i,s){s.filter=!1,s.strict=!0,super.prepare(t,e,o,n,i,s)}finishEditing(t,e,o){if(this.isOpened()){const e=this.hot.getSelectedRangeActive();(Wt(e)||At(e)&&!e.includes(this.hot._createCellCoords(this.row,this.col)))&&(t=!0)}super.finishEditing(t,e,o)}}class cH extends aH{static get EDITOR_TYPE(){return"intl-date"}}const dH=/^\d{4}-\d{2}-\d{2}$/,uH=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/;class gH extends lM{static get EDITOR_TYPE(){return"intl-datetime"}init(){super.init(),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}prepare(t,e,o,n,i,s){super.prepare(t,e,o,n,i,s);const r=this.hot.toPhysicalRow(t);this.originalValue=this.hot.getSourceDataAtCell(r,e)}createElements(t){super.createElements("input"),this.TEXTAREA.setAttribute("type","datetime-local"),this.TEXTAREA.setAttribute("step","1"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(t){if(Ot(t))return void super.setValue("");if(!iH(t))return Xe(X`IntlDatetimeEditor: value must be in ISO date-time format ("YYYY-MM-DDTHH:mm:ss")\x20
|
|
92
|
+
required by the native datetime-local input. Received:`,t),void super.setValue("");let e=String(t).replace(" ","T").replace(/\.\d+$/,"");dH.test(e)?e+="T00:00:00":uH.test(e)&&(e+=":00"),super.setValue(e)}getValue(){const t=super.getValue();return t&&uH.test(t)?`${t}:00`:t}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class pH extends lM{static get EDITOR_TYPE(){return"time"}init(){super.init(),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.close()})}createElements(t){super.createElements("input"),this.TEXTAREA.setAttribute("type","time"),this.TEXTAREA.setAttribute("dir","ltr")}setValue(t){if(!eH(t))return Xe(X`TimeEditor: value must be in 24-hour time format ("HH:mm", "HH:mm:ss" or "HH:mm:ss.SSS")\x20
|
|
93
|
+
required by the native time input. Received:`,t),void super.setValue("");super.setValue(t)}focus(){this.TEXTAREA.select()}open(){super.open();try{this.TEXTAREA.showPicker()}catch{}}}class fH extends pH{static get EDITOR_TYPE(){return"intl-time"}}class mH extends lM{static get EDITOR_TYPE(){return"numeric"}}function wH(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bH(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function vH(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,bH(t,e,"get"))}function CH(t,e,o){wH(t,e),e.set(t,o)}function yH(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,bH(t,e,"set"),o),o}var SH=new WeakMap,kH=new WeakMap,RH=new WeakMap,EH=new WeakMap,xH=new WeakSet;class MH extends lM{static get EDITOR_TYPE(){return"password"}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.dataset.hotInput="",this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width="0",this.textareaStyle.height="0",vo(this.TEXTAREA_PARENT);const t=b(-1);this.TEXTAREA.setAttribute(t[0],String(t[1])),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}open(){super.open();const t=this.cellProperties.hashRevealDelay,e=String(this.cellProperties.hashSymbol||"*");if(t>0){yH(this,EH,!0);const o=e[0];this.TEXTAREA.setAttribute("type","text"),this.TEXTAREA.setAttribute("autocomplete","off"),this.TEXTAREA.setAttribute("spellcheck","false"),this.TEXTAREA.setAttribute("autocapitalize","off"),this.TEXTAREA.setAttribute("autocorrect","off"),this.TEXTAREA.value=o.repeat(vH(this,SH).length),yH(this,RH,e=>function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,xH,TH).call(this,e,o,t)),this.TEXTAREA.addEventListener("input",vH(this,RH))}}close(){vH(this,RH)&&(this.TEXTAREA.removeEventListener("input",vH(this,RH)),yH(this,RH,null)),null!==vH(this,kH)&&(clearTimeout(vH(this,kH)),yH(this,kH,null)),yH(this,EH,!1),yH(this,SH,""),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.removeAttribute("autocomplete"),this.TEXTAREA.removeAttribute("spellcheck"),this.TEXTAREA.removeAttribute("autocapitalize"),this.TEXTAREA.removeAttribute("autocorrect"),super.close()}getValue(){return vH(this,EH)?vH(this,SH):super.getValue()}setValue(t){if(vH(this,EH)){yH(this,SH,t??"");const e=String(this.cellProperties.hashSymbol||"*")[0];this.TEXTAREA.value=e.repeat(vH(this,SH).length)}else this.cellProperties?.hashRevealDelay>0?yH(this,SH,t??""):super.setValue(t)}constructor(...t){var e,o;super(...t),wH(e=this,o=xH),o.add(e),CH(this,SH,{writable:!0,value:void 0}),CH(this,kH,{writable:!0,value:void 0}),CH(this,RH,{writable:!0,value:void 0}),CH(this,EH,{writable:!0,value:void 0}),this.autoResize=nM(this.hot.rootDocument,{textContent:t=>"•".repeat(t.value.length)}),yH(this,SH,""),yH(this,kH,null),yH(this,RH,null),yH(this,EH,!1)}}function TH(t,e,o){const{inputType:n,data:i}=t;if(i&&("insertText"===n||"insertFromPaste"===n||"insertFromDrop"===n||"insertReplacementText"===n||"insertCompositionText"===n)){const t=this.TEXTAREA.selectionStart??0,n=t-i.length,s=this.TEXTAREA.value.length-t;yH(this,SH,vH(this,SH).slice(0,n)+i+vH(this,SH).slice(vH(this,SH).length-s)),this.TEXTAREA.value=e.repeat(n)+i+e.repeat(s),this.TEXTAREA.setSelectionRange(t,t),null!==vH(this,kH)&&clearTimeout(vH(this,kH)),yH(this,kH,this.hot._registerTimeout(()=>{const t=this.TEXTAREA.selectionStart;this.TEXTAREA.value=e.repeat(vH(this,SH).length),this.TEXTAREA.setSelectionRange(t,t),yH(this,kH,null)},o))}else if(n?.startsWith("delete")){const t=vH(this,SH).length,o=this.TEXTAREA.selectionStart??0,n=t-this.TEXTAREA.value.length;yH(this,SH,vH(this,SH).slice(0,o)+vH(this,SH).slice(o+n)),this.TEXTAREA.value=e.repeat(vH(this,SH).length),this.TEXTAREA.setSelectionRange(o,o),null!==vH(this,kH)&&(clearTimeout(vH(this,kH)),yH(this,kH,null))}else{const t=vH(this,SH).length,n=this.TEXTAREA.value;if(n.length>t){const i=n.slice(t);yH(this,SH,vH(this,SH)+i),this.TEXTAREA.value=e.repeat(t)+i,null!==vH(this,kH)&&clearTimeout(vH(this,kH)),yH(this,kH,this.hot._registerTimeout(()=>{this.TEXTAREA.value=e.repeat(vH(this,SH).length),yH(this,kH,null)},o))}else yH(this,SH,vH(this,SH).slice(0,n.length)),this.TEXTAREA.value=e.repeat(vH(this,SH).length),null!==vH(this,kH)&&(clearTimeout(vH(this,kH)),yH(this,kH,null))}}const HH="ht_editor_visible",IH="selectEditor";class _H extends Ti{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.dataset.hotInput="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))),po(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(t,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.select.value}setValue(t){this.select.value=null==t?"":String(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",go(this.selectWrapper,HH)&&fo(this.selectWrapper,HH),this.unregisterShortcuts(),this.removeHooksByKey("beforeDialogShow")}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,o,n,i,s){super.prepare(t,e,o,n,i,s);const r=this.cellProperties.selectOptions;let l;l="function"==typeof r?this.prepareOptions(r(this.row,this.col,this.prop)):this.prepareOptions(r),vo(this.select);const a=xp(this.hot);if(Array.isArray(l))for(let t=0;t<l.length;t++){const e=this.hot.rootDocument.createElement("OPTION");e.value=String(l[t]),Ro(e,String(l[t]),a,"selectEditor",this.hot.rootElement),this.select.appendChild(e)}else ke(l,(t,e)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=e,Ro(o,String(t),a,"selectEditor",this.hot.rootElement),this.select.appendChild(o)})}prepareOptions(t){return Array.isArray(t)||"object"==typeof t?t:{}}refreshValue(){const t=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){if(this.state!==Ei.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const t=this.getEditedCellRect();if(!t)return;const{top:e,start:o,width:n,height:i}=t,s=this.selectWrapper.style;s.height=`${i}px`,s.width=`${n}px`,s.top=`${e}px`,s[this.hot.isRtl()?"right":"left"]=`${o}px`,s.margin="0px",po(this.selectWrapper,HH)}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("editor"),e={group:IH};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(IH)}destroy(){this.clearHooks()}}function AH(t){return t.querySelector('input[type="checkbox"]')}function WH(t,e){return function(...t){const e=[];let o;$(t,(n,i)=>{"function"==typeof n?i===t.length-1&&(o=n):e.push(n)});const[n,...i]=e;let s=n;return $(i,t=>{if(o)s=s.filter(e=>t.some(t=>o(e,t)));else{const e=new Set(t);s=s.filter(t=>e.has(t))}}),s}(t,e,(t,e)=>JSON.stringify(t)===JSON.stringify(e))}function OH(t,e){return _e(e)?Array.isArray(t)&&t.some(t=>_e(t)?ve(t,e):t===e):t.includes(e)}function NH(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 PH=new WeakSet;class DH{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,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o})(this,PH,LH).call(this,this.input.value)}constructor({input:t,eventManager:e}){NH(this,PH),this.onInput=this._onInput.bind(this),this.input=t,this.eventManager=e,this.enabled=!0}}function LH(t){this.runLocalHooks("triggerFilter",t)}be(DH,Wh);const zH="ht-multi-select-editor",BH=`${zH}-search-input-wrapper`,VH=`${zH}-search-icon`,FH=`${zH}-search-input`,$H=`${zH}-separator`,UH=`${zH}-item-`,jH=`${zH}-item-selected`;function qH(t){const e=AH(t);po(t,jH),e&&!e.checked&&(e.checked=!0)}function GH(t){const e=AH(t);fo(t,jH),e&&e.checked&&(e.checked=!1)}function YH({dropdownListElement:t,index:e}){const o=t.children[e];if(o){const t=AH(o);t&&t.blur()}}function XH(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KH(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ZH(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,KH(t,e,"get"))}function QH(t,e,o){XH(t,e),e.set(t,o)}function JH(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,KH(t,e,"set"),o),o}function tI(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function eI(t,e){XH(t,e),e.add(t)}var oI=new WeakMap,nI=new WeakMap,iI=new WeakMap,sI=new WeakMap,rI=new WeakMap,lI=new WeakMap,aI=new WeakMap,hI=new WeakMap,cI=new WeakMap,dI=new WeakMap,uI=new WeakSet,gI=new WeakSet,pI=new WeakSet,fI=new WeakSet,mI=new WeakSet,wI=new WeakSet,bI=new WeakSet,vI=new WeakSet,CI=new WeakSet,yI=new WeakSet;class SI{init(){if(!ZH(this,hI)||!ZH(this,nI))return;JH(this,iI,function({root:t}){return t.createElement("ul")}({root:ZH(this,hI)})),JH(this,sI,function({root:t}){const e=t.createElement("input");return mo(e,[x("Search options"),["type","text"],["size",3],["placeholder","Search..."],["id",FH]]),po(e,FH),e}({root:ZH(this,hI)}));const t=function({root:t}){const e=t.createElement("div");return po(e,VH),mo(e,[["aria-hidden","true"]]),e}({root:ZH(this,hI)});JH(this,lI,function({root:t}){const e=t.createElement("div");return e.className=BH,e}({root:ZH(this,hI)})),JH(this,rI,function({root:t}){const e=t.createElement("div");return e.className=$H,e}({root:ZH(this,hI)})),ZH(this,lI).appendChild(t),ZH(this,lI).appendChild(ZH(this,sI)),ZH(this,nI).appendChild(ZH(this,lI)),ZH(this,nI).appendChild(ZH(this,rI)),ZH(this,nI).appendChild(ZH(this,iI)),JH(this,aI,new DH({input:ZH(this,sI),eventManager:ZH(this,cI)}))}setVisibleRowsNumberSetting(t){ZH(this,dI).visibleRowsNumberSetting=t}setSourceSortFunction(t){ZH(this,dI).sourceSortFunction=t??null}setSearchInputVisibility(t=!0){ZH(this,lI)&&ZH(this,rI)&&ZH(this,aI)&&(ZH(this,lI).style.display=t?"":"none",ZH(this,rI).style.display=t?"":"none",ZH(this,aI).toggle(t))}fillDropdown(t,e=[]){this.removeAllDropdownItems(),ZH(this,dI).currentlySelectedItemIndex=0,Array.isArray(e)||(e=[]);let o=t;ZH(this,dI).sourceSortFunction&&(o=ZH(this,dI).sourceSortFunction(t.slice())),ZH(this,hI)&&ZH(this,iI)&&null!==ZH(this,oI)&&(o.forEach((t,o)=>{const n="object"==typeof t&&null!==t&&"value"in t?t.value:t;tI(this,bI,HI).call(this,{rootDocument:ZH(this,hI),itemKey:"object"==typeof t&&null!==t&&"key"in t?t.key:void 0,itemValue:String(n??t),indexWithinList:o,checked:OH(e,t),disabled:ZH(this,dI).areCheckboxesDisabled})}),ZH(this,dI).entriesCount=o.length,this.runLocalHooks("afterDropdownFill"))}updateDimensions(t,e=!1){const o=tI(this,fI,xI).call(this),n=tI(this,gI,RI).call(this,t),i=n?t.spaceAbove:t.spaceBelow;if(!e&&n&&(ZH(this,dI).flippedVertically=!0),ZH(this,dI).entriesCount>0&&i<this.getHeight(!0)){const t=Math.max(Math.floor((i-tI(this,wI,TI).call(this))/o)-1,1);ZH(this,dI).actualRenderedItemsCount=ZH(this,dI).visibleRowsNumberSetting?Math.min(t,ZH(this,dI).visibleRowsNumberSetting):t}else ZH(this,dI).actualRenderedItemsCount=Math.min(ZH(this,dI).entriesCount,ZH(this,dI).visibleRowsNumberSetting??ZH(this,dI).entriesCount);ZH(this,nI)&&(ZH(this,dI).actualRenderedItemsCount&&ZH(this,dI).entriesCount>ZH(this,dI).actualRenderedItemsCount?ZH(this,nI).style.height=`${this.getHeight()}px`:ZH(this,nI).style.height="",tI(this,pI,EI).call(this,t),ZH(this,nI).scrollTop=0)}getDropdownWidth(){return ZH(this,iI)?function({dropdownListElement:t}){return t.offsetWidth}({dropdownListElement:ZH(this,iI)}):0}deselectAllItems(){ZH(this,iI)&&function({dropdownListElement:t}){t.querySelectorAll(`.${jH}`).forEach(t=>GH(t))}({dropdownListElement:ZH(this,iI)})}focusFirstItem(){ZH(this,dI).entriesCount>0&&tI(this,uI,kI).call(this,0)}focusItem(t){tI(this,uI,kI).call(this,t)}focusPreviousItem(){ZH(this,iI)&&(0!==ZH(this,dI).currentlySelectedItemIndex?(YH({dropdownListElement:ZH(this,iI),index:ZH(this,dI).currentlySelectedItemIndex}),tI(this,uI,kI).call(this,ZH(this,dI).currentlySelectedItemIndex-1)):this.focusSearchInput())}focusNextItem(){ZH(this,iI)&&ZH(this,dI).currentlySelectedItemIndex!==ZH(this,dI).entriesCount-1&&(YH({dropdownListElement:ZH(this,iI),index:ZH(this,dI).currentlySelectedItemIndex}),tI(this,uI,kI).call(this,ZH(this,dI).currentlySelectedItemIndex+1))}focusSearchInput(){ZH(this,sI)&&ZH(this,sI).focus()}reset(){this.removeAllDropdownItems(),tI(this,yI,AI).call(this),ZH(this,sI)&&(ZH(this,sI).value=""),ZH(this,nI)&&(ZH(this,nI).style.position="",ZH(this,nI).style.top="",ZH(this,nI).style.height="",ZH(this,nI).scrollTop=0)}isFlippedVertically(){return ZH(this,dI).flippedVertically}getHeight(t=!1,e=!1){if(!ZH(this,hI)||!ZH(this,nI))return 0;const o=ZH(this,hI).defaultView.getComputedStyle(ZH(this,nI));return tI(this,mI,MI).call(this,t)+tI(this,wI,TI).call(this)+(!0===e?2*parseInt(o.getPropertyValue("--ht-menu-vertical-padding"),10):0)}getInputController(){return ZH(this,aI)}removeAllDropdownItems(){ZH(this,iI)&&(Array.from(ZH(this,iI).children).forEach(t=>tI(this,CI,_I).call(this,t)),ZH(this,dI).checkboxChangeListeners.clear(),ZH(this,iI).innerHTML="")}disableCheckboxes(){ZH(this,dI).areCheckboxesDisabled=!0,ZH(this,iI)&&function({dropdownListElement:t}){t.querySelectorAll('input[type="checkbox"]:not(:checked)').forEach(t=>{t.dataset.disabled="true"})}({dropdownListElement:ZH(this,iI)})}enableCheckboxes(){ZH(this,dI).areCheckboxesDisabled=!1,ZH(this,iI)&&function({dropdownListElement:t}){t.querySelectorAll('input[type="checkbox"]').forEach(t=>{t.dataset.disabled="false"})}({dropdownListElement:ZH(this,iI)})}constructor(t,e){eI(this,uI),eI(this,gI),eI(this,pI),eI(this,fI),eI(this,mI),eI(this,wI),eI(this,bI),eI(this,vI),eI(this,CI),eI(this,yI),QH(this,oI,{writable:!0,value:void 0}),QH(this,nI,{writable:!0,value:void 0}),QH(this,iI,{writable:!0,value:void 0}),QH(this,sI,{writable:!0,value:void 0}),QH(this,rI,{writable:!0,value:void 0}),QH(this,lI,{writable:!0,value:void 0}),QH(this,aI,{writable:!0,value:void 0}),QH(this,hI,{writable:!0,value:void 0}),QH(this,cI,{writable:!0,value:void 0}),QH(this,dI,{writable:!0,value:void 0}),JH(this,oI,null),JH(this,nI,null),JH(this,iI,null),JH(this,sI,null),JH(this,rI,null),JH(this,lI,null),JH(this,aI,null),JH(this,hI,null),JH(this,cI,new _i(this)),JH(this,dI,{visibleRowsNumberSetting:null,entriesCount:0,flippedVertically:!1,currentlySelectedItemIndex:0,checkboxChangeListeners:new Map,areCheckboxesDisabled:!1,sourceSortFunction:null}),JH(this,nI,t),JH(this,hI,ZH(this,nI).ownerDocument),JH(this,oI,e),this.init()}}function kI(t){ZH(this,dI).currentlySelectedItemIndex=t,ZH(this,iI)&&function({dropdownListElement:t,index:e}){const o=t.children[e];if(o){const t=AH(o);t&&t.focus()}}({dropdownListElement:ZH(this,iI),index:t})}function RI(t){const{spaceAbove:e,spaceBelow:o,cellHeight:n}=t;return this.getHeight(!0)>o&&e>o+n}function EI(t){if(!ZH(this,nI))return;const{cellHeight:e}=t;ZH(this,dI).flippedVertically?(ZH(this,nI).style.position="absolute",ZH(this,nI).style.top=-this.getHeight(!1,!0)-e-2+"px"):(ZH(this,nI).style.position="",ZH(this,nI).style.top="")}function xI(){if(!ZH(this,hI)||!ZH(this,nI))return 0;const t=ZH(this,hI).defaultView.getComputedStyle(ZH(this,nI));return 2*parseInt(t.getPropertyValue("--ht-menu-item-vertical-padding"),10)+parseInt(t.getPropertyValue("--ht-line-height"),10)}function MI(t){const e=ZH(this,dI).entriesCount;return(t?e:ZH(this,dI).actualRenderedItemsCount??e)*tI(this,fI,xI).call(this)}function TI(){if(!(ZH(this,aI)?.enabled&&ZH(this,lI)&&ZH(this,rI)&&ZH(this,hI)&&ZH(this,nI)))return 0;const t=ZH(this,hI).defaultView.getComputedStyle(ZH(this,nI));return ZH(this,lI).offsetHeight+(ZH(this,rI).offsetHeight+2*parseInt(t.getPropertyValue("--ht-menu-vertical-padding"),10))}function HI({rootDocument:t,itemKey:e,itemValue:o,indexWithinList:n,checked:i=!1,disabled:s=!1}){if(!ZH(this,iI)||null===ZH(this,oI))return;const r=function({rootDocument:t,instanceId:e,itemKey:o,itemValue:n,indexWithinList:i,checked:s=!1,disabled:r=!1}){const l=t.createElement("li"),a=t.createElement("div"),h=t.createElement("input"),c=t.createElement("label");return h.id=`${e}-${UH}${i}`,h.type="checkbox",h.dataset.value=n,h.dataset.index=String(i),h.dataset.disabled=r&&!s?"true":"false",o&&(h.dataset.key=o),c.htmlFor=h.id,c.textContent=n,a.appendChild(h),a.appendChild(c),l.appendChild(a),l}({rootDocument:t,instanceId:ZH(this,oI),itemKey:e,itemValue:o,indexWithinList:n,checked:i,disabled:s});i&&qH(r),tI(this,vI,II).call(this,r),ZH(this,iI).appendChild(r)}function II(t){const e=AH(t);if(!e||!ZH(this,iI))return;const o=()=>{"true"===e.dataset.disabled&&e.checked?e.checked=!1:e.checked?(qH(t),this.runLocalHooks("afterDropdownItemChecked",e.dataset.key,e.dataset.value)):(GH(t),this.runLocalHooks("afterDropdownItemUnchecked",e.dataset.key,e.dataset.value))},n=t=>{const o=no(t);o!==e&&"true"!==e.dataset.disabled&&"LABEL"!==o.tagName&&(e.checked=!e.checked,e.dispatchEvent(new Event("change")))};ZH(this,dI).checkboxChangeListeners.set(e,{change:o,click:n}),ZH(this,cI).addEventListener(e,"change",o),ZH(this,cI).addEventListener(t,"click",n)}function _I(t){const e=AH(t);if(!e)return;const o=ZH(this,dI).checkboxChangeListeners.get(e);o&&(ZH(this,cI).removeEventListener(e,"change",o.change),ZH(this,cI).removeEventListener(t,"click",o.click),ZH(this,dI).checkboxChangeListeners.delete(e))}function AI(){ZH(this,dI).visibleRowsNumberSetting=null,ZH(this,dI).entriesCount=0,ZH(this,dI).flippedVertically=!1,ZH(this,dI).currentlySelectedItemIndex=0,ZH(this,dI).checkboxChangeListeners.clear(),ZH(this,dI).areCheckboxesDisabled=!1,ZH(this,dI).sourceSortFunction=null}be(SI,Wh);class WI{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(!_e(t))return this.selectedItems.delete(t);{const e=Array.from(this.selectedItems).find(e=>ve(e,t));if(void 0!==e)return this.selectedItems.delete(e),!0}return!1}has(t){return OH(this.getItemsArray(),t)}clear(){this.selectedItems.clear()}getSize(){return this.selectedItems.size}getItemsArray(){return Array.from(this.selectedItems)}constructor(t){Array.isArray(t)?this.selectedItems=new Set(t):this.selectedItems=new Set,this.maxSelectionsCount=1/0}}function OI(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function NI(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function PI(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,NI(t,e,"get"))}function DI(t,e,o){OI(t,e),e.set(t,o)}function LI(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,NI(t,e,"set"),o),o}function zI(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function BI(t,e){OI(t,e),e.add(t)}const VI="multiselect",FI="multiselectEditor";var $I=new WeakMap,UI=new WeakMap,jI=new WeakSet,qI=new WeakSet,GI=new WeakSet,YI=new WeakSet,XI=new WeakSet,KI=new WeakSet,ZI=new WeakSet,QI=new WeakSet,JI=new WeakSet,t_=new WeakSet,e_=new WeakSet,o_=new WeakSet,n_=new WeakSet,i_=new WeakSet,s_=new WeakSet;class r_ extends Ti{static get EDITOR_TYPE(){return VI}createElements(){const{rootDocument:t}=this.hot;LI(this,UI,t.createElement("div")),PI(this,UI).style.display="none",po(PI(this,UI),"handsontableEditor"),this.dropdownContainerElement=this.hot.rootDocument.createElement("div"),po(this.dropdownContainerElement,"ht-multi-select-editor handsontableEditor"),mo(this.dropdownContainerElement,[x("Select options"),["role","group"]]),PI(this,UI).appendChild(this.dropdownContainerElement),this.hot.rootElement.appendChild(PI(this,UI)),this.dropdownController=new SI(this.dropdownContainerElement,this.hot.guid)}prepare(t,e,o,n,i,s){super.prepare(t,e,o,n,i,s);const r=function(t){return"string"==typeof t&&kn(t)?JSON.parse(t):t}(i),l=WH(Array.isArray(r)?r:[r],zI(this,jI,l_).call(this));this.dropdownController.reset(),l.length>=zI(this,i_,C_).call(this,"maxSelections")&&zI(this,KI,u_).call(this),zI(this,n_,v_).call(this,l),this.dropdownController.setSourceSortFunction(zI(this,i_,C_).call(this,"sourceSortFunction")??null),this.dropdownController.fillDropdown(zI(this,jI,l_).call(this),l),this.dropdownController.setVisibleRowsNumberSetting(zI(this,i_,C_).call(this,"visibleRows")),this.dropdownController.setSearchInputVisibility(zI(this,i_,C_).call(this,"searchInput")),void 0!==s.maxSelections&&PI(this,$I).setMaxSelectionCount(zI(this,i_,C_).call(this,"maxSelections"))}finishEditing(t,e,o){super.finishEditing(t,e,o)}bindEvents(){this.dropdownController.addLocalHook("afterDropdownItemChecked",(t,e)=>{zI(this,e_,w_).call(this,t,e),PI(this,$I).getSize()>=zI(this,i_,C_).call(this,"maxSelections")&&zI(this,KI,u_).call(this)}),this.dropdownController.addLocalHook("afterDropdownItemUnchecked",(t,e)=>{zI(this,o_,b_).call(this,t,e),PI(this,$I).getSize()<zI(this,i_,C_).call(this,"maxSelections")&&zI(this,ZI,g_).call(this)}),this.addHook("afterDestroy",()=>this.destroy()),this.addHook("afterChange",(t,e)=>zI(this,s_,y_).call(this,t,e)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.dropdownController.getInputController().addLocalHook("triggerFilter",t=>zI(this,QI,p_).call(this,t))}open(t){const e=t&&"keyCode"in t?t.keyCode:0,o=t&&"key"in t?t.key:"";if(e&&un(e)){const n=1===o.length?o:String.fromCharCode(e);this.dropdownController.getInputController().enabled&&(this.dropdownController.getInputController().setValue(n),zI(this,QI,p_).call(this,n)),t?.preventDefault(),this.enableFullEditMode()}zI(this,YI,c_).call(this),this.refreshDimensions(),this.hot.getShortcutManager().setActiveContextName("editor"),zI(this,qI,a_).call(this),this.dropdownController.getInputController().listen(),this.dropdownController.updateDimensions(zI(this,JI,f_).call(this))}close(){zI(this,XI,d_).call(this),zI(this,GI,h_).call(this),this.dropdownController.getInputController().unlisten()}getValue(){return PI(this,$I).getItemsArray()}setValue(){}refreshDimensions(){if(!this.getEditedCell())return void this.close();const{top:t,start:e,height:o}=this.getEditedCellRect(),n=PI(this,UI).style;n.top=`${t+o}px`,n[this.hot.isRtl()?"right":"left"]=`${e}px`,po(PI(this,UI),"ht_editor_visible")}focus(){!1===zI(this,i_,C_).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),BI(this,jI),BI(this,qI),BI(this,GI),BI(this,YI),BI(this,XI),BI(this,KI),BI(this,ZI),BI(this,QI),BI(this,JI),BI(this,t_),BI(this,e_),BI(this,o_),BI(this,n_),BI(this,i_),BI(this,s_),DI(this,$I,{writable:!0,value:void 0}),DI(this,UI,{writable:!0,value:void 0}),this._closeAfterDataChange=!1,LI(this,$I,new WI),LI(this,UI,null),this.dropdownContainerElement=null,this.dropdownController=null,this.eventManager=new _i(this),this.createElements(),this.bindEvents()}}function l_(){return this.cellProperties.source??[]}function a_(){const t=this.hot.getShortcutManager().getContext("editor");t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.dropdownController.focusPreviousItem()}},{keys:[["ArrowDown"]],callback:()=>{rn(this.hot.rootDocument)===this.getInputElement()?this.dropdownController.focusFirstItem():this.dropdownController.focusNextItem()}}],{group:FI}),t.addShortcuts([{keys:[["enter"],["shift","enter"],["control/meta","enter"],["control/meta","shift","enter"]],runOnlyIf:()=>!zI(this,i_,C_).call(this,"enterCommits"),callback:t=>{const e=rn(this.hot.rootDocument);return e instanceof HTMLInputElement&&"checkbox"===e.type&&(e.checked=!e.checked,e.dispatchEvent(new Event("change"))),t.preventDefault(),!1}},{keys:[["space"]],runOnlyIf:()=>!zI(this,i_,C_).call(this,"enterCommits"),callback:t=>{t.preventDefault()}}],{group:FI,relativeToGroup:Ek,position:"before"})}function h_(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(FI)}function c_(){PI(this,UI).style.display=""}function d_(){PI(this,UI).style.display="none"}function u_(){this.dropdownController.disableCheckboxes()}function g_(){this.dropdownController.enableCheckboxes()}function p_(t,e=zI(this,i_,C_).call(this,"filterSelectedItems")??!0){const o=this.cellProperties.locale,n=zI(this,jI,l_).call(this).filter(n=>{const i="object"==typeof n&&null!==n&&"value"in n?n.value:n;return!(e||!PI(this,$I).has(n))||(this.cellProperties.filteringCaseSensitive?String(i).includes(t):An(String(i),o).includes(An(t,o)))});this.dropdownController.fillDropdown(n,PI(this,$I).getItemsArray()),this.dropdownController.updateDimensions(zI(this,JI,f_).call(this),!0)}function f_(){const t=this.getEditedCellRect(),e=this.hot.view.isVerticallyScrollableByWindow(),o=this.hot.view.getWorkspaceHeight();let n=t.top;if(e){const t=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;n=Math.max(n+t,0)}return{spaceAbove:n,spaceBelow:o-n-t.height,cellHeight:t.height}}function m_(){const t=PI(this,$I).getItemsArray();this.saveValue([[t]])}function w_(t,e){t?PI(this,$I).add({key:t,value:e}):PI(this,$I).add(e),zI(this,t_,m_).call(this),this.refreshDimensions()}function b_(t,e){t?PI(this,$I).remove({key:t,value:e}):PI(this,$I).remove(e),zI(this,t_,m_).call(this),this.refreshDimensions()}function v_(t){t.length>0?LI(this,$I,new WI(t)):LI(this,$I,new WI)}function C_(t){return this.cellProperties[t]}function y_(t,e){this.isOpened()&&e===`${VI}-renderer`&&Array.isArray(t)&&t.length>0&&t[0][0]===this.cellProperties.visualRow&&this.hot.propToCol(t[0][1])===this.cellProperties.visualCol&&(zI(this,n_,v_).call(this,t[0][3]),this.dropdownController.fillDropdown(zI(this,jI,l_).call(this),PI(this,$I).getItemsArray()),this.dropdownController.focusItem(0),PI(this,$I).getSize()>=zI(this,i_,C_).call(this,"maxSelections")?zI(this,KI,u_).call(this):zI(this,ZI,g_).call(this))}function S_(t,e,o,n,i,s,r){Ro(e,null==s?"":s,!1)}S_.RENDERER_TYPE="html";function k_(t,e,o,n,i,s,r){const{rootDocument:l}=t,a=r.allowHtml?S_:aM,h=l.createElement("DIV"),c=t.getSettings().ariaTags;if(h.className="htAutocompleteArrow",c&&h.setAttribute("aria-hidden","true"),h.appendChild(l.createTextNode(String.fromCharCode(9660))),a.apply(this,[t,e,o,n,i,s,r]),e.firstChild||e.appendChild(l.createTextNode(String.fromCharCode(160))),e.insertBefore(h,e.firstChild),po(e,"htAutocomplete"),!t.acArrowListener){const i=new _i(t);t.acArrowListener=function(i){go(no(i),"htAutocompleteArrow")&&t.view._wt.getSetting("onCellDblClick",null,t._createCellCoords(o,n),e)},i.addEventListener(t.rootElement,"mousedown",t.acArrowListener),t.addHookOnce("afterDestroy",()=>{i.destroy()})}}k_.RENDERER_TYPE="autocomplete";function R_(t,e,o,n,i,s,r){k_.apply(this,[t,e,o,n,i,s,r])}R_.RENDERER_TYPE="dropdown";const E_="#bad-value#",x_="ht-loading",M_=new WeakMap,T_=new WeakMap,H_="data-row",I_="data-col",__="checkboxRenderer",A_="checkbox";function W_(t,e,o,n,i,s,r){const{rootDocument:l}=t,a=t.getSettings().ariaTags;!function(t){let e=T_.get(t);if(!e){const{rootElement:o}=t;e=new _i(t),e.addEventListener(o,"click",e=>function(t,e){const o=no(t);if(!O_(o))return;if(!o.hasAttribute(H_)||!o.hasAttribute(I_))return;const n=Number.parseInt(o.getAttribute(H_),10),i=Number.parseInt(o.getAttribute(I_),10),s=e.getCellMetaTransient(n,i);s.readOnly&&t.preventDefault()}(e,t)),e.addEventListener(o,"mouseup",e=>function(t,e){const o=no(t);if(!O_(o))return;if(!o.hasAttribute(H_)||!o.hasAttribute(I_))return;setTimeout(e.listen,10)}(e,t)),e.addEventListener(o,"change",e=>function(t,e){const o=no(t);if(!O_(o))return;if(!o.hasAttribute(H_)||!o.hasAttribute(I_))return;const n=Number.parseInt(o.getAttribute(H_),10),i=Number.parseInt(o.getAttribute(I_),10),s=e.getCellMetaTransient(n,i);if(!s.readOnly){let t=null;t=o.checked?void 0===s.uncheckedTemplate||s.checkedTemplate:void 0!==s.uncheckedTemplate&&s.uncheckedTemplate,e.setDataAtCell(n,i,t)}}(e,t)),T_.set(t,e)}}(t);const h=function(t){const e=t.createElement("input");return e.className="htCheckboxRendererInput",e.type="checkbox",e.setAttribute("tabindex","-1"),e.cloneNode(!1)}(l);let c=h;const d=r.label;let u=!1;void 0===r.checkedTemplate&&(r.checkedTemplate=!0),void 0===r.uncheckedTemplate&&(r.uncheckedTemplate=!1),vo(e);const g=r.locale;function p(e=!1){const o=t.getSelectedRange(),n=[],i=new Map;let s=[],r=0;if(o){for(let l=0;l<o.length;l++){const{row:a,col:h}=o[l].getTopStartCorner(),{row:c,col:d}=o[l].getBottomEndCorner();if(null!==a&&null!==h&&null!==c&&null!==d){for(let o=a;o<=c;o+=1)for(let l=h;l<=d;l+=1){const a=t.getCellMetaTransient(o,l);if(a.hidden)continue;const h={checkedTemplate:a.checkedTemplate,uncheckedTemplate:a.uncheckedTemplate};if("checkbox"!==a.type){!0!==e||a.readOnly||(i.has(n.length)?i.set(n.length,[...i.get(n.length),[o,l,null]]):i.set(n.length,[[o,l,null]]));continue}if(!0===a.readOnly)continue;void 0===a.checkedTemplate&&(a.checkedTemplate=!0),void 0===a.uncheckedTemplate&&(a.uncheckedTemplate=!1);const c=t.getDataAtCell(o,l);!1===e?[a.checkedTemplate,String(a.checkedTemplate)].includes(c)?s.push([o,l,a.uncheckedTemplate,h]):[a.uncheckedTemplate,String(a.uncheckedTemplate),null,void 0].includes(c)&&s.push([o,l,a.checkedTemplate,h]):s.push([o,l,a.uncheckedTemplate,h]),r+=1}n.push(r),r=0}}if(s=s.every(([,,t])=>t===s[0][2])?s.map(([t,e,o])=>[t,e,o]):s.map(([t,e,,o])=>[t,e,o?.checkedTemplate]),s.length>0){const o=[];if(n.forEach((t,e)=>{let n=s.splice(0,t);if(i.size&&i.has(e)){const t=i.get(e)??[];n=[...n,...t]}o.push(n)}),e){const e=[];o.forEach(t=>{t.forEach(t=>{e.push(t)})}),e.length>0&&t.setDataAtCell(e)}else o.forEach(e=>{e.length>0&&t.setDataAtCell(e)})}}}function f(){const e=t.getSelectedRange();if(e){for(let o=0;o<e.length;o++){const n=e[o].getTopStartCorner(),i=e[o].getBottomEndCorner();if(null!==n.row&&null!==n.col&&null!==i.row&&null!==i.col)for(let e=n.row;e<=i.row;e++)for(let o=n.col;o<=i.col;o++){if(t.getCellMetaTransient(e,o).readOnly)continue;const n=t.getCell(e,o);if(en(n)){if(n.querySelectorAll("input[type=checkbox]").length>0)return!0}}}return!1}}!function(){s===r.checkedTemplate||An(_t(s),g)===An(_t(r.checkedTemplate),g)?h.checked=!0:s===r.uncheckedTemplate||An(_t(s),g)===An(_t(r.uncheckedTemplate),g)?h.checked=!1:Ot(s)?po(h,"noValue"):(h.style.display="none",po(h,"htBadValue"),u=!0);mo(h,[[H_,o],[I_,n]]),a&&mo(h,[x(h.checked?t.getTranslatedPhrase(zb):t.getTranslatedPhrase(Bb)),N(h.checked),["role","checkbox"]])}(),function(){if(!u&&d){let r="";if(d.value){const t=d.value;r="function"==typeof d.value?String(t(o,n,i,s)):String(d.value)}else if(d.property){const e=t.getDataAtRowProp(o,String(d.property));r=null!==e?String(e):""}const a=function(t,e,o){const n=t.createElement("label");n.className="htCheckboxRendererLabel "+(o?"fullWidth":"");const i=t.createTextNode(e);if(o){const e=t.createElement("span");e.appendChild(i),n.appendChild(e)}else n.appendChild(i);return n.cloneNode(!0)}(l,r,!0!==d.separated);"before"===d.position?d.separated?(e.appendChild(a),e.appendChild(h)):(a.appendChild(h),c=a):d.position&&"after"!==d.position||(d.separated?(e.appendChild(h),e.appendChild(a)):(a.insertBefore(h,a.firstChild),c=a))}}(),(!d||d&&!d.separated)&&e.appendChild(c),u&&e.appendChild(l.createTextNode(E_)),M_.has(t)||(M_.set(t,!0),function(){const e=t.getShortcutManager().getContext("grid"),o={group:__,relativeToGroup:Ek,position:"before"};e?.addShortcuts([{keys:[["space"]],callback:()=>(p(),!f()),runOnlyIf:()=>!!t.getSelectedRangeActive()?.highlight.isCell()},{keys:[["enter"]],callback:()=>(p(),!f()),runOnlyIf:()=>{const e=t.getSelectedRangeActive();return!(!t.getSettings().enterBeginsEditing||!e?.highlight.isCell()||t.selection.isMultiple())}},{keys:[["delete"],["backspace"]],callback:()=>(p(!0),!f()),runOnlyIf:()=>!!t.getSelectedRangeActive()?.highlight.isCell()}],o)}())}function O_(t){return"INPUT"===t.tagName&&"checkbox"===t.getAttribute("type")}Qn.getSingleton().add("modifyAutoColumnSizeSeed",function(t,e,o){const{label:n,type:i,row:s,column:r,prop:l}=e;if(i!==A_||!n)return;const a=n,{value:h,property:c}=a;let d=o;if(h)d="function"==typeof h?h(s,r,l,o):h;else if(c){const t=this.getDataAtRowProp(s,String(c));d=null!==t?t:o}return`${_t(d).length}`}),W_.RENDERER_TYPE=A_;function N_(t,e,o,n,i,s,r){k_.apply(this,[t,e,o,n,i,s,r])}N_.RENDERER_TYPE="handsontable";const P_={year:"numeric",month:"2-digit",day:"2-digit"},D_=new WeakSet;function L_(t,e){const{dateFormat:o,locale:n,allowEmpty:i,instance:s}=e;if(Ot(t))return i?t:E_;if("string"==typeof o)return s&&!D_.has(s)&&(D_.add(s),Xe("The dateFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),t;const r=XT(t);if(null===r)return E_;const l=Ce(o)?o:P_;return new Intl.DateTimeFormat(n,l).format(r)}function z_(t,e,o,n,i,s,r){aM.apply(this,[t,e,o,n,i,s,r])}z_.valueFormatter=L_,z_.RENDERER_TYPE="date";const B_=z_;function V_(t,e,o,n,i,s,r){B_.apply(this,[t,e,o,n,i,s,r])}V_.valueFormatter=L_,V_.RENDERER_TYPE="intl-date";const F_=V_,$_={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1},U_=new WeakSet;function j_(t,e){const{dateTimeFormat:o,locale:n,allowEmpty:i,instance:s}=e;if(Ot(t))return i?t:E_;if("string"==typeof o)return s&&!U_.has(s)&&(U_.add(s),Xe("The dateTimeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead.")),t;const r=nH(t);if(null===r)return E_;const l=Ce(o)?o:$_;return new Intl.DateTimeFormat(n,l).format(r)}function q_(t,e,o,n,i,s,r){aM.apply(this,[t,e,o,n,i,s,r])}q_.valueFormatter=j_,q_.RENDERER_TYPE="intl-datetime";const G_=q_,Y_={hour:"numeric",minute:"2-digit"},X_=new WeakSet;function K_(t,e){const{timeFormat:o,locale:n,allowEmpty:i,instance:s}=e;if(Ot(t))return i?t:E_;const r=tH(t);if(null===r)return E_;"string"==typeof o&&s&&!X_.has(s)&&(X_.add(s),Xe("The timeFormat option as a string is not supported. Use an Intl.DateTimeFormatOptions object instead."));const l=Ce(o)?o:Y_;return new Intl.DateTimeFormat(n,l).format(r)}function Z_(t,e,o,n,i,s,r){aM.apply(this,[t,e,o,n,i,s,r]),e.dir="ltr"}Z_.valueFormatter=K_,Z_.RENDERER_TYPE="time";const Q_=Z_;function J_(t,e,o,n,i,s,r){Q_.apply(this,[t,e,o,n,i,s,r])}J_.RENDERER_TYPE="intl-time";const tA=J_,eA={useGrouping:!1,maximumFractionDigits:20},oA=new Map;const nA=new WeakSet;function iA(t,e){return is(t)&&(t=function(t,e){const{numericFormat:o,locale:n}=e,i=o??eA,s=`${n??""}:${JSON.stringify(i)}`;let r=oA.get(s);return void 0===r&&(r=new Intl.NumberFormat(n,i),oA.set(s,r)),r.format(t)}(t,e)),t}function sA(t,e,o,n,i,s,r){const l=r.numericFormat;if(void 0!==l?.pattern||void 0!==l?.culture){const t=r.instance;nA.has(t)||(nA.add(t),Xe("The numericFormat.pattern and numericFormat.culture options are not supported. Use Intl.NumberFormat options instead (numericFormat: { style, currency, ... })."))}if(is(t.getDataAtCell(o,n))){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"}aM.apply(this,[t,e,o,n,i,s,r])}sA.valueFormatter=iA,sA.RENDERER_TYPE="numeric";function rA(t,e,o,n,i,s){Ro(e,s,xp(t),"password",t.rootElement)}rA.valueFormatter=function(t,e){const o=e.hashLength||_t(t).length,n=String(e.hashSymbol??"*");let i="";for(let t=0;t<o;t++)i+=n;return i},rA.RENDERER_TYPE="password";function lA(t,e,o,n,i,s,r){aM.apply(this,[t,e,o,n,i,s,r])}lA.RENDERER_TYPE="select";function aA(t,e){const o=t=>{if((t=>{const e=t;return Ce(t)&&At(e.key)&&At(e.value)})(t)){const e=t;return o(e.key)&&o(e.value)}return null==t};let n=t;o(n)&&(n=""),""!==n?this.strict&&this.source?"function"==typeof this.source?this.source(n,hA(n,e)):hA(n,e)(this.source):e(!0):e(!!this.allowEmpty)}function hA(t,e){const o=t;return function(t){let n=!1;for(let e=0,i=t.length;e<i;e++)if(ve(o,t[e])){n=!0;break}e(n)}}aA.VALIDATOR_TYPE="autocomplete";function cA(t,e){return!(!e.allowEmpty||!Ot(t))||(!("string"!=typeof t||!t.startsWith("="))||QT(t))}function dA(t,e){this.allowEmpty&&Ot(t)?e(!0):e(QT(t))}cA.rowIndependent=!0,dA.VALIDATOR_TYPE="date";function uA(t,e){aA.apply(this,[t,e])}uA.VALIDATOR_TYPE="dropdown";function gA(t,e){dA.call(this,t,e)}gA.VALIDATOR_TYPE="intl-date";function pA(t,e){return!(!e.allowEmpty||!Ot(t))||(!("string"!=typeof t||!t.startsWith("="))||iH(t))}function fA(t,e){this.allowEmpty&&Ot(t)?e(!0):e(iH(t))}pA.rowIndependent=!0,fA.VALIDATOR_TYPE="intl-datetime";function mA(t,e){return!(!e.allowEmpty||!Ot(t))||(!("string"!=typeof t||!t.startsWith("="))||eH(t))}function wA(t,e){this.allowEmpty&&Ot(t)?e(!0):e(eH(t))}mA.rowIndependent=!0,wA.VALIDATOR_TYPE="time";function bA(t,e){wA.call(this,t,e)}bA.VALIDATOR_TYPE="intl-time";function vA(t,e){let o=t;null==o&&(o=""),this.allowEmpty&&""===o?e(!0):(this.allowEmpty||""!==o)&&Array.isArray(o)?0!==o.length&&this.source?"function"==typeof this.source?this.source(o,CA(o,e)):CA(o,e)(this.source):e(!0):e(!1)}function CA(t,e){const o=t;return function(t){let n=!0;for(let e=0,i=o.length;e<i;e++){let i=!1;for(let n=0,s=t.length;n<s;n++){if(_e(o[e])&&!_e(t[n])||!_e(o[e])&&_e(t[n])){i=!1;break}(_e(o[e])&&_e(t[n])&&ve(o[e],t[n])||"string"==typeof o[e]&&"string"==typeof t[n]&&o[e]===t[n])&&(i=!0)}if(!i){n=!1;break}}e(n)}}vA.VALIDATOR_TYPE="multiselect";function yA(t,e){let o=t;null==o&&(o=""),this.allowEmpty&&""===o?e(!0):e(""!==o&&is(t))}function SA(t){const e=t;return Ce(t)&&void 0!==e.value?e.value:t}function kA(t,e,o){return _e(this.getSourceDataAtCell(this.toPhysicalRow(e),this.toPhysicalColumn(o)))?_e(t)?t:{key:t,value:t}:t}yA.VALIDATOR_TYPE="numeric";const RA={CELL_TYPE:"autocomplete",editor:UT,renderer:k_,validator:aA,valueGetter:SA,valueSetter:kA,parsePastedValue:!0};const EA={CELL_TYPE:"checkbox",editor:GT,renderer:W_,valueSetter:function(t,e,o){const{checkedTemplate:n,uncheckedTemplate:i}=this.getCellMetaTransient(e,o),s=_t(t),r=s===_t(n),l=s===_t(i);return r||l?r?n:i:t}},xA={CELL_TYPE:"date",editor:aH,renderer:B_,validator:dA,sourceDataValidator:cA,sourceDataWarningMessage:'Source data warning ([itemsCount]). Invalid value for "date" cell type.\n\n[affectedCells]\n\nExpected a value compatible with the ISO 8601 date format ("YYYY-MM-DD").',valueFormatter:L_};const MA={CELL_TYPE:"dropdown",editor:hH,renderer:R_,validator:uA,filter:!1,strict:!0,valueGetter:function(t){return SA.call(this,t)},valueSetter:function(t,e,o,n){return kA.call(this,t,e,o)},parsePastedValue:!0},TA={CELL_TYPE:"handsontable",editor:AT,renderer:N_},HA={CELL_TYPE:"intl-date",editor:cH,renderer:F_,validator:gA,sourceDataValidator:cA,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:L_},IA={CELL_TYPE:"intl-datetime",editor:gH,renderer:G_,validator:fA,sourceDataValidator:pA,sourceDataWarningMessage:'Source data warning ([itemsCount]). Invalid value for "intl-datetime" cell type.\n\n[affectedCells]\n\nExpected a value compatible with the ISO 8601 date-time format ("YYYY-MM-DDTHH:mm:ss").',valueFormatter:j_},_A={CELL_TYPE:"intl-time",editor:fH,renderer:tA,validator:bA,sourceDataValidator:mA,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:K_},AA="ht-multi-select",WA=`${AA}-chip`,OA=`${AA}-chip-remove`,NA=`${AA}-chip-label`,PA=`${AA}-overflow`,DA=new WeakSet,LA=new WeakMap,zA=new WeakMap;function BA(t,e){return _e(t)?t[e]:t}function VA(t){if(null==t||""===t)return[];if(Array.isArray(t))return t;if("string"==typeof t)try{const e=JSON.parse(t),o=e;return Array.isArray(e)?o:[e]}catch{return t.trim()?[t]:[]}return[t]}function FA(t,e){if(zA.has(t))return;zA.set(t,new _i(t));zA.get(t).addEventListener(t.rootElement,"click",o=>{if(!go(no(o),OA))return;o.preventDefault(),o.stopPropagation();const n=no(o).closest(`.${WA}`);if(!n)return;const i=Number(n.dataset.row??0),s=Number(n.dataset.col??0),r=t.toPhysicalRow(i),l=t.getSourceDataAtCell(r,s),a=n.dataset.key,h=function(t,e){return t.filter(t=>BA(t,"key")!==e)}(VA(l),a);t.setDataAtCell(i,s,h,`${e}-renderer`)}),t.addHook("beforeOnCellMouseDown",(...t)=>{const e=t[0];go(no(e),OA)&&pn(e)})}function $A(t,e,o){const n=t,i=e.querySelectorAll(`.${WA}`);for(let t=0;t<i.length;t++)i[t].style.display="";if(null===n||0===i.length)return;let s=e.querySelector(`.${PA}`);s?(s.style.display="",s.style.visibility="hidden"):(s=function(t,e){const o=t.createElement("span");return po(o,PA),o.textContent=`+${e}`,o}(o,i.length),s.style.visibility="hidden",e.appendChild(s));const r=o.defaultView.getComputedStyle(e),l=parseFloat(r.gap)||0,a=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?l:0);if(!(e<=n-(t<i.length-1?a+l: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"}function UA(t){return Array.isArray(t)?function(t,e=" "){return t.join(e)}(t.map(t=>_e(t)?t.value:t),", "):t}const jA={CELL_TYPE:"multiselect",_complexDataFormat:!0,editor:r_,renderer:function(t,e,o,n,i,s,r){Jx(0,e,0,0,0,s,r);let l=s;if(Ot(l)&&r.placeholder)return l=r.placeholder,l=_t(l),void Eo(e,l);const{rootDocument:a}=t,h=t.getSettings().ariaTags,c=t.toPhysicalRow(o),d=VA(t.getSourceDataAtCell(c,n));if(vo(e),po(e,"ht-multi-select-renderer"),0===d.length)return void e.appendChild(a.createTextNode(""));const u=a.createElement("div");u.className="ht-multi-select-chips-container",d.forEach(t=>{const e=function(t,e,o,n,i,s){const r=t.createElement("span"),l=BA(e,"value");po(r,WA),r.dataset.row=String(n),r.dataset.col=String(i),r.dataset.prop=String(s),r.title=l;const a=t.createElement("span");po(a,NA),a.textContent=l,r.appendChild(a);const h=t.createElement("span");return po(h,OA),o&&h.setAttribute("aria-hidden","true"),r.dataset.key=BA(e,"key"),r.appendChild(h),r}(a,t,h??!1,o,n,i);u.appendChild(e)}),e.appendChild(u),FA(t,"multiselect");!function(t,e,o){$A(t,e,o)}(function(t,e){const o=t.getColWidth(e);if(LA.has(t)){const n=LA.get(t);n[e]?.width!==o&&LA.set(t,{...n,[e]:{width:o}})}else LA.set(t,{[e]:{width:o}});return DA.has(t)||(t.addHook("beforeColumnResize",(...e)=>{const o=e[0],n=e[1],i=LA.get(t);i?.[n]?.width!==o&&LA.set(t,{...i,[n]:{width:o}})}),DA.add(t)),LA.get(t)?.[e]?.width??o}(t,n),u,a)},validator:vA,valueGetter:UA,valueSetter:function(t,e,o){if(Array.isArray(t)){const n=this.getSourceDataAtCell(this.toPhysicalRow(e),o);if(Array.isArray(n)&&n.length>0&&_e(n[0]))return t.map(t=>_e(t)?t:{key:t,value:t})}return t},parsePastedValue:!0};const qA={CELL_TYPE:"numeric",editor:mH,renderer:sA,validator:yA,dataType:"number",valueSetter:function(t,e,o,n){if("string"!=typeof t)return t;const i=function(t){const e=t?.numericFormat,o=e?.culture??t?.locale;if("string"==typeof o&&o.length>0)try{const t=new Intl.NumberFormat(o).formatToParts(1.1).find(({type:t})=>"decimal"===t);if("."===t?.value||","===t?.value)return t.value}catch{}const n=e?.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"."}}(n),s=ss(t,i),r=rs(t,i),l=ls(t,i);if(is(t,[","])||s||r||l){const e=function(t,e={}){const{decimalSeparator:o}=e,n=t.trim();if(ss(t,o))return Number.parseFloat(n.replaceAll(",",""));if(rs(t,o))return Number.parseFloat(n.replaceAll(".",""));if(ls(t,o))return Number.parseFloat(n.replaceAll(".","").replace(",","."));const i=n.replace(",",".");return!1===isNaN(Number.parseFloat(i))?Number.parseFloat(i):null}(t,{decimalSeparator:i});if(ly(e))return t;const o=s||r||l,a=/^[+-]?0x/i.test(t.trim()),h=t.trim().replace(/e[+-]?\d+$/i,""),c=!Number.isFinite(e)||0===e&&/[1-9]/.test(h);return!0!==n.preserveNumericLiteral||o||a||c||!is(t)||!function(t,e){const o=Object.is(e,-0)?"-0":String(e);return us(t.replace(",","."))!==us(o)}(t,e)?e:t.trim()}return t},valueFormatter:iA},GA={CELL_TYPE:"password",editor:MH,renderer:rA,copyable:!1},YA={CELL_TYPE:"select",editor:_H,renderer:lA},XA={CELL_TYPE:"time",editor:pH,renderer:Q_,validator:wA,sourceDataValidator:mA,sourceDataWarningMessage:'Source data warning ([itemsCount]). Invalid value for "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:K_};const KA=[];function ZA(t,e){return!!t[e]}function QA(t,e){if(Array.isArray(t)){"string"!=typeof e&&ce("registerConflict(blockedTargetKeys[], incompatibleSettingKeys) expects incompatibleSettingKeys to be a string.");for(let o=0;o<t.length;o+=1)KA.push({blockedKey:t[o],incompatibleSettingKey:e});return}"string"!=typeof t&&ce("registerConflict expects a string blocked target key when the first argument is not an array.");const o=t;if(Array.isArray(e))for(let t=0;t<e.length;t+=1){const n=e[t];"string"!=typeof n&&ce("registerConflict(blockedTargetKey, incompatibleSettingKeys) expects incompatibleSettingKeys to be a string array."),KA.push({blockedKey:o,incompatibleSettingKey:n})}else"string"!=typeof e?ce("Invalid registerConflict arguments."):KA.push({blockedKey:o,incompatibleSettingKey:e})}function JA(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tW(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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 oW(t,e,o){JA(t,e),e.set(t,o)}function nW(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,tW(t,e,"set"),o),o}function iW(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function sW(t,e){JA(t,e),e.add(t)}const rW=new Map([["plugin",function(t){return!!xs(t)}],["cell-type",oy],["editor",hi],["renderer",Is],["validator",Ds]]),lW=Symbol("mainSetting"),aW=[];let hW=null;var cW=new WeakMap,dW=new WeakMap,uW=new WeakSet,gW=new WeakSet;class pW{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[o,n]=e.split(":");rW.has(o)||ce(`Unknown plugin dependency type "${o}" was found.`),rW.get(o)(n)||t.push(` - ${n} (${o})`)}),t.length>0){const e=[`The ${this.pluginName} plugin requires the following modules:\n`,`${t.join("\n")}\n`].join("");aW.push(e)}}hW||(hW=Es()),hW.indexOf(this.pluginName)>=0&&hW.splice(hW.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===hW.length){if(aW.length>0){const t=[`${aW.join("\n")}\n`,"You have to import and register them manually."].join("");aW.length=0,ce(t)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}isHardConflictBlocked(){const t=this.constructor.PLUGIN_KEY,e=function(t,e){for(let o=0;o<KA.length;o+=1){const n=KA[o];if(n.blockedKey===e&&ZA(t,n.incompatibleSettingKey))return n}return null}(this.hot.getSettings(),t);if(e){const{incompatibleSettingKey:o}=e;return Xe(X`The \`${t}\` plugin cannot be used with the \`${o}\` option.\x20
|
|
94
|
+
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,o=this.constructor.SETTINGS_VALIDATORS;if(void 0===t)return ye(eW(this,cW))?He(eW(this,cW),e):eW(this,cW);let n;if((Array.isArray(eW(this,cW))||ye(eW(this,cW)))&&e[lW]===t)n=Array.isArray(eW(this,cW))?eW(this,cW):eW(this,cW)[t]??e[t];else if(t.includes(".")){const o=ye(eW(this,cW))?Re(eW(this,cW),t):void 0,i=Re(e,t);n=ye(o)?He(o,ye(i)?i:{}):void 0!==o?o:i}else n=ye(eW(this,cW))?He(eW(this,cW),e)[t]:e[t];if("function"==typeof n&&o&&"object"==typeof o){const e=o[t];if(e&&"function"==typeof e){const o=n;return iW(this,uW,fW).call(this,o,e,t)}}return n}updatePluginSettings(t){const e=this.constructor.SETTINGS_VALIDATORS;if(e&&"function"==typeof e&&"object"!=typeof t){return!1===e(t)?void Xe(`${this.pluginName} Plugin: option is not valid and it will be ignored.`):(nW(this,cW,t),eW(this,cW))}if(e&&"object"==typeof e&&ye(t)){ye(eW(this,cW))||nW(this,cW,{...this.constructor.DEFAULT_SETTINGS});const o=ye(eW(this,cW))?eW(this,cW):{};return Object.keys(e).forEach(n=>{if(!(n in t))return;const i=e[n];!1!==(!i||i(t[n]))?o[n]=t[n]:Xe(`${this.pluginName} Plugin: "${n}" option is not valid and it will be ignored.`)}),eW(this,cW)}return nW(this,cW,t),t}addHook(t,e,o){eW(this,dW)[t]=eW(this,dW)[t]||[];const n=eW(this,dW)[t];this.hot.addHook(t,e,o),n.push(e),eW(this,dW)[t]=n}removeHooks(t){$(eW(this,dW)[t]||[],e=>{this.hot.removeHook(t,e)})}clearHooks(){const t=eW(this,dW);ke(t,(t,e)=>this.removeHooks(e)),Object.keys(t).forEach(e=>delete t[e])}callOnPluginsReady(t){this.isPluginsReady?t():this.pluginsInitializedCallbacks.push(t)}onAfterPluginsInitialized(){$(this.pluginsInitializedCallbacks,t=>t()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(t){if(!this.isEnabled)return;const e=iW(this,gW,mW).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(t){}destroy(){nW(this,cW,null),this.eventManager?.destroy(),this.clearHooks(),ke(this,(t,e)=>{"hot"!==e&&Reflect.set(this,e,null)}),delete this.t,Reflect.deleteProperty(this,"hot")}constructor(t){sW(this,uW),sW(this,gW),oW(this,cW,{writable:!0,value:void 0}),oW(this,dW,{writable:!0,value:void 0}),nW(this,cW,null),this.eventManager=new _i(this),this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,nW(this,dW,{}),Se(this,"hot",t,{writable:!1}),hW=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",t=>{this.onUpdateSettings(t)}),this.hot.addHook("beforeInit",()=>this.init())}}function fW(t,e,o){return(...n)=>{const i=t(...n);if(!1===e(i)){const t=n.map(t=>"string"==typeof t?`"${t}"`:"").join(", "),e=n.length>0?t:"";return void Xe(`${this.pluginName} Plugin: "${o}" function (${e}) result is not valid and will be ignored.`)}return i}}function mW(t){if(!t)return!1;const e=this.constructor.SETTING_KEYS;if("boolean"==typeof e)return e;for(let o=0;o<e.length;o++)if(void 0!==t[e[o]])return!0;return!1}function wW(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}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;let CW=class{addRow(t,e){this.columns.length&&ce("Doesn't support multi-dimensional table"),this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:t};this.rows.push(o),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),o.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&&ce("Doesn't support multi-dimensional table"),this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:t};this.columns.push(o),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),o.table=this.table.table}getHeights(t){this.injected||this.injectTable(),$(this.rows,e=>{const{height:o}=e.table.getBoundingClientRect();t(e.row,Math.round(o))})}getWidths(t){this.injected||this.injectTable(),$(this.columns,e=>{const{width:o}=e.table.getBoundingClientRect();t(e.col,Math.ceil(o))})}setSettings(t){this.settings=t}setSetting(t,e){this.settings||(this.settings={useHeaders:!0}),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(o=>{$(o.strings,o=>{e.appendChild(this.createColElement(o.col,t))})}),e}createRow(t){const e=this.hot.rootDocument,o=e.createDocumentFragment(),n=e.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(t,n),o.appendChild(n)),this.samples.forEach(n=>{$(n.strings,n=>{const i=n.col,s=this.hot.getCellMetaTransient(t,i),r=e.createElement("td");r.setAttribute("ghost-table","1"),wW(this,vW,yW).call(this,r,t,i,n.value,s),o.appendChild(r)})}),o}appendColumnHeadersRow(){const t=this.hot.rootDocument,e=t.createElement("tr"),o=[];if(this.hot.hasRowHeaders()){const n=t.createElement("th");o.push([-1,n]),e.appendChild(n)}this.samples.forEach(n=>{$(n.strings,n=>{const i=n.col,s=t.createElement("th");o.push([i,s]),e.appendChild(s)})}),this.table.tHead.appendChild(e),$(o,t=>{const[e,o]=t;this.hot.view.appendColHeader(e,o)})}createCol(t){const e=this.hot.rootDocument,o=e.createDocumentFragment();return this.samples.forEach(n=>{$(n.strings,n=>{const i=n.row,s=this.hot.getCellMetaTransient(i,t),r=e.createElement("td"),l=e.createElement("tr");r.setAttribute("ghost-table","1"),wW(this,vW,yW).call(this,r,i,t,n.value,s),l.appendChild(r),o.appendChild(l)})}),o}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 o=this.hot.rootDocument.createElement("col");let n=0;e>=0&&t>=0&&(n=Number(this.hot.getCellMetaTransient(e,t).colspan));let i=this.hot.getColWidth(t);if(n>1)for(let e=t+1;e<t+n;e++)i+=this.hot.getColWidth(e);return o.style.width=`${i}px`,o}createTable(t=""){const e=this.hot.rootDocument,o=e.createDocumentFragment(),n=e.createElement("table"),i=e.createElement("thead"),s=e.createElement("tbody"),r=e.createElement("colgroup"),l=e.createElement("tr"),a=e.createElement("th");return this.isVertical()&&n.appendChild(r),this.isHorizontal()&&(l.appendChild(a),i.appendChild(l),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(i),this.isVertical()&&s.appendChild(l),n.appendChild(s),po(n,t),o.appendChild(n),{fragment:o,table:n,tHead:i,tBody:s,colGroup:r,tr:l,th:a}}createContainer(t=""){const e=this.hot.rootDocument,o=e.createDocumentFragment(),n=e.createElement("div");return po(n,`htGhostTable htAutoSize ${t.trim()}`),o.appendChild(n),{fragment:o,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}constructor(t){bW(this,vW),this.hot=null,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0},this.table=null,this.hot=t}};function yW(t,e,o,n,i){const s=[this.hot,t,e,o,this.hot.colToProp(o),n,i];Fs(this.hot.getCellRenderer(i),s)}function SW(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function kW(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 RW=new WeakSet,EW=new WeakSet;class xW{static get SAMPLE_COUNT(){return 3}getSampleCount(){return this.customSampleCount?this.customSampleCount:xW.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,o){const n=new Map,{from:i,to:s}="number"==typeof o?{from:o,to:o}:o;return as(i,s,o=>{const i=this.generateSample(t,e,o);n.set(o,i)}),n}generateSample(t,e,o,n){SW(this,RW,MW).call(this,t);const i=n??new Map,s="row"===t?"col":"row",r=[];n&&n.forEach(t=>{t.strings.forEach(({value:t})=>r.push(t))});const l=e=>{const n="row"===t?this.dataFactory(o,e,this):this.dataFactory(e,o,this);!1!==n&&SW(this,EW,TW).call(this,i,r,s,e,n.value,n.bundleSeed)};return Array.isArray(e)?e.forEach(l):as(e.from,e.to,l),i}generateSampleFromValues(t,e){SW(this,RW,MW).call(this,t);const o=new Map,n="row"===t?"col":"row",i=[];return e.forEach(({index:t,value:e})=>{SW(this,EW,TW).call(this,o,i,n,t,e,void 0)}),o}constructor(t){kW(this,RW),kW(this,EW),this.samples=null,this.dataFactory=null,this.customSampleCount=null,this.allowDuplicates=!1,this.includeHidden=!1,this.dataFactory=t}}function MW(t){"row"!==t&&"col"!==t&&ce("Unsupported sample type")}function TW(t,e,o,n,i,s){const r="string"==typeof s&&s.length>0?s:null,l=null!==r;let a;a=null!==r?r:ye(i)?`${Object.keys(i).length}`:Array.isArray(i)?`${i.length}`:`${_t(i).length}`,t.has(a)||t.set(a,{needed:this.getSampleCount(),strings:[]});const h=t.get(a);if(h&&h.needed){(!(e.indexOf(i)>-1)||this.allowDuplicates||l)&&(h.strings.push({value:i,[o]:n}),e.push(i),h.needed-=1)}}function HW(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function IW(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function _W(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,IW(t,e,"get"))}function AW(t,e,o){HW(t,e),e.set(t,o)}function WW(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,IW(t,e,"set"),o),o}function OW(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function NW(t,e){HW(t,e),e.add(t)}Qn.getSingleton().register("modifyAutoColumnSizeSeed");const PW="autoColumnSize";var DW=new WeakMap,LW=new WeakMap,zW=new WeakMap,BW=new WeakMap,VW=new WeakMap,FW=new WeakSet,$W=new WeakSet,UW=new WeakSet,jW=new WeakSet,qW=new WeakSet,GW=new WeakSet,YW=new WeakSet,XW=new WeakSet,KW=new WeakMap,ZW=new WeakMap,QW=new WeakMap,JW=new WeakMap,tO=new WeakMap,eO=new WeakMap,oO=new WeakMap,nO=new WeakMap,iO=new WeakMap,sO=new WeakMap;class rO extends pW{static get PLUGIN_KEY(){return PW}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}static get CALCULATION_CELLS_BUDGET(){return 1e5}isEnabled(){return!1!==this.hot.getSettings()[PW]&&!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(String(t),10)),this.addHook("afterLoadData",_W(this,ZW)),this.addHook("beforeChangeRender",_W(this,QW)),this.addHook("afterSetCellMeta",_W(this,tO)),this.addHook("afterSetSourceDataAtCell",_W(this,JW)),this.addHook("afterFormulasValuesUpdate",_W(this,sO)),this.addHook("beforeRender",_W(this,KW)),this.addHook("modifyColWidth",(t,e)=>this.getColumnWidth(e,t),-10),this.addHook("init",_W(this,iO)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",_W(this,eO)),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",_W(this,oO)),WW(this,VW,this.hot.columnIndexMapper.observeMapChange(this.columnWidthsMap,()=>{this.hot.view?.invalidateColumnWidthCache()})),super.enablePlugin()}updatePlugin(){this.findColumnsWhereHeaderWasChanged().forEach(t=>{_W(this,zW).set(t,null)}),_W(this,BW).clear(),super.updatePlugin()}disablePlugin(){_W(this,VW)&&(_W(this,VW).call(this),WW(this,VW,null)),this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",_W(this,eO)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",_W(this,oO)),super.disablePlugin(),this.addHook("beforeColumnResize",_W(this,nO))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const t=this.getFirstVisibleColumn(),e=this.getLastVisibleColumn();if(-1===t||-1===e)return;const o=this.hot.forceFullRender;this.calculateColumnsWidth({from:t,to:e},void 0,o)}calculateColumnsWidth(t={from:0,to:this.hot.countCols()-1},e={from:0,to:this.hot.countRows()-1},o=!1){const n="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;as(n.from,n.to,t=>{let e=this.hot.toPhysicalColumn(t);if(null===e&&(e=t),o||null===this.columnWidthsMap.getValueAtIndex(e)&&!this.hot._getColWidthFromSettings(e)){const n=o?_W(this,BW).get(e):void 0;void 0!==n?OW(this,YW,gO).call(this,t,n):OW(this,GW,uO).call(this,t,i)}}),this.ghostTable.columns.length&&(OW(this,XW,pO).call(this),this.measuredColumns=n.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(t={from:0,to:this.hot.countRows()-1},e=!1){const o="number"==typeof t?{from:t,to:t}:t,n=this.hot.countCols()-1;let i=0,s=o.from,r=null,l=0;this.inProgress=!0;const a=t=>{let o=this.hot.toPhysicalColumn(t);return null===o&&(o=t),e||null===this.columnWidthsMap.getValueAtIndex(o)&&!this.hot._getColWidthFromSettings(o)},h=(t,e)=>{let l=t,h=e;for(;l>0&&i<=n;){if(null===r){if(!a(i)){i+=1,l-=1;continue}r=new Map,s=o.from}if(s<=o.to){if(h<=0)return!1;const t=Math.min(o.to,s+h-1);this.samplesGenerator.generateSample("col",{from:s,to:t},i,r),h-=t-s+1,s=t+1}if(s>o.to){const t=this.hot.toPhysicalColumn(i);OW(this,YW,gO).call(this,i,r),_W(this,BW).set(null===t?i:t,r),r=null,i+=1,l-=1}}return i>n},c=()=>{this.ghostTable.columns.length&&(OW(this,XW,pO).call(this),this.measuredColumns=i,this.ghostTable.clean())},d=()=>{if(!this.hot)return Oe(l),void(this.inProgress=!1);const t=h(rO.CALCULATION_STEP+1,rO.CALCULATION_CELLS_BUDGET);c(),t?(Oe(l),this.inProgress=!1,this.hot.view.adjustElementsSize()):l=We(d)},u=this.getSyncCalculationLimit();u>=0&&(h(u+1,1/0),c()),i<=n?d():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&(_W(this,zW).clear(),this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0),_W(this,BW).clear())}getSyncCalculationLimit(){const t=this.hot.getSettings()[PW];let e=rO.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;if(Ce(t)){const n=t.syncLimit;if("string"==typeof n&&Rn(n))e=cs(o,n);else{const t=Number(n);e=Number.isFinite(t)?Math.trunc(t):0}}return Math.min(e,o)}getColumnWidth(t,e,o=!0){let n=e;return void 0===n&&(n=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t)),o&&"number"==typeof n&&(n=Math.max(n,50))),n}getFirstVisibleColumn(){return this.hot.getFirstRenderedVisibleColumn()??-1}getLastVisibleColumn(){return this.hot.getLastRenderedVisibleColumn()??-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce((t,e,o)=>{const n=_W(this,LW).length;if(n-1<o||_W(this,LW)[o]!==e){const e=this.hot.toVisualColumn(o);null!==e&&t.push(e)}return n-1<o?_W(this,LW).push(e):_W(this,LW)[o]=e,t},[])}clearCache(t){Array.isArray(t)?this.hot.batchExecution(()=>{t.forEach(t=>{this.columnWidthsMap.setValueAtIndex(t,null),_W(this,BW).delete(t)})},!0):(this.columnWidthsMap.clear(),_W(this,BW).clear())}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(t=>null===t).length}destroy(){this.hot?.rowIndexMapper.removeLocalHook("cacheUpdated",_W(this,eO)),this.hot?.columnIndexMapper.removeLocalHook("cacheUpdated",_W(this,oO)),this.ghostTable.clean(),super.destroy()}constructor(t){super(t),NW(this,FW),NW(this,$W),NW(this,UW),NW(this,jW),NW(this,qW),NW(this,GW),NW(this,YW),NW(this,XW),AW(this,DW,{writable:!0,value:void 0}),AW(this,LW,{writable:!0,value:void 0}),AW(this,zW,{writable:!0,value:void 0}),AW(this,BW,{writable:!0,value:void 0}),AW(this,VW,{writable:!0,value:void 0}),AW(this,KW,{writable:!0,value:void 0}),AW(this,ZW,{writable:!0,value:void 0}),AW(this,QW,{writable:!0,value:void 0}),AW(this,JW,{writable:!0,value:void 0}),AW(this,tO,{writable:!0,value:void 0}),AW(this,eO,{writable:!0,value:void 0}),AW(this,oO,{writable:!0,value:void 0}),AW(this,nO,{writable:!0,value:void 0}),AW(this,iO,{writable:!0,value:void 0}),AW(this,sO,{writable:!0,value:void 0}),this.ghostTable=new CW(this.hot),this.samplesGenerator=new xW((t,e)=>{const o=this.hot.toPhysicalRow(t),n=this.hot.toPhysicalColumn(e);if(this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(n))return!1;const i=this.hot.getCellMetaTransient(t,e);let s="",r="";if(i.hidden)return!1;i.spanned||(s=Vs(this.hot.getDataAtCell(t,e),i,this.hot.getCellRenderer(i)),r=s);let l="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(l=String(this.hot.runHooks("modifyAutoColumnSizeSeed",l,i,r)??l)),{value:s,bundleSeed:l}}),this.inProgress=!1,this.measuredColumns=0,WW(this,DW,!1),WW(this,LW,[]),WW(this,zW,new Map),WW(this,BW,new Map),WW(this,VW,null),WW(this,KW,()=>{this.calculateVisibleColumnsWidth(),this.inProgress||OW(this,FW,lO).call(this)}),WW(this,ZW,(t,e)=>{_W(this,zW).clear(),e||this.recalculateAllColumnsWidth()}),WW(this,QW,t=>{t.forEach(([t,e,o])=>{if("function"==typeof e)return;const n=this.hot.propToCol(e);if(null===n||!Number.isInteger(n))return;const i=_W(this,zW).get(n);if(null===i)return;const s={row:t,oldValue:o,hasOldValue:!0};void 0===i?_W(this,zW).set(n,[s]):i.push(s)})}),WW(this,JW,()=>{_W(this,BW).clear()}),WW(this,tO,(t,e)=>{const o=this.hot.toPhysicalColumn(e);null!==o&&_W(this,BW).delete(o)}),WW(this,eO,t=>{const{indexesSequenceChanged:e,trimmedIndexesChanged:o,hiddenIndexesChanged:n}=t;(e||o||n)&&_W(this,BW).clear()}),WW(this,oO,t=>{t.indexesSequenceChanged&&_W(this,BW).clear()}),WW(this,nO,(t,e,o)=>{let n=t;return o&&(this.calculateColumnsWidth(e,void 0,!0),n=this.getColumnWidth(e,void 0,!1)??n),n}),WW(this,iO,()=>{WW(this,LW,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),WW(this,DW,!0)}),WW(this,sO,t=>{if(!_W(this,DW))return;const e=this.hot.getPlugin("formulas"),o=e?.sheetId;t.forEach(t=>{const e=t.address;if(null!=o&&e?.sheet!==o)return;const n=Number(e?.col),i=Number(e?.row);if(!Number.isInteger(n))return;const s=this.hot.toVisualColumn(n);if(null===s)return;const r=_W(this,zW).get(s);if(null===r)return;const l=Number.isInteger(i)?this.hot.toVisualRow(i):null;if(null===l)return void _W(this,zW).set(s,null);const a={row:l,oldValue:void 0,hasOldValue:!1};void 0===r?_W(this,zW).set(s,[a]):r.push(a)})}),this.columnWidthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("autoColumnSize","physicalIndexToValue",null,{skipUnchangedWrites:!0}),this.addHook("beforeColumnResize",_W(this,nO))}}function lO(){if(0===_W(this,zW).size)return;const t=_W(this,zW);WW(this,zW,new Map);const e=this.hot.countRows(),o=[],n=[];if(t.forEach((t,i)=>{const s=this.hot.toPhysicalColumn(i);if(null===s||this.hot._getColWidthFromSettings(s))return;const r=this.columnWidthsMap.getValueAtIndex(s);null===t||null==r||2*t.length>=e?o.push(i):n.push({visualColumn:i,cells:t,cachedWidth:r})}),OW(this,$W,aO).call(this,n,o),o.length>0){const t={from:0,to:e-1};o.forEach(e=>{OW(this,GW,uO).call(this,e,t)})}this.ghostTable.columns.length&&(OW(this,XW,pO).call(this),this.ghostTable.clean())}function aO(t,e){if(0===t.length)return;const o=new Map,n=[],i=t.map(({visualColumn:t,cells:e})=>({visualColumn:t,samples:this.samplesGenerator.generateSample("col",e.map(t=>t.row),t)})),s=new Map(i.map(({visualColumn:t,samples:e})=>[t,e])),r=OW(this,jW,cO).call(this,i);if(t.forEach(t=>{const i=r.get(t.visualColumn);void 0!==i&&i>t.cachedWidth?(o.set(t.visualColumn,i),OW(this,UW,hO).call(this,t,s.get(t.visualColumn))):t.cells.some(t=>!t.hasOldValue)?e.push(t.visualColumn):(n.push(t),OW(this,UW,hO).call(this,t,s.get(t.visualColumn)))}),n.length>0){const t=OW(this,jW,cO).call(this,n.map(({visualColumn:t,cells:e})=>({visualColumn:t,samples:this.samplesGenerator.generateSampleFromValues("col",e.map(e=>({index:e.row,value:OW(this,qW,dO).call(this,e.row,t,e.oldValue)})))})));n.forEach(({visualColumn:o,cachedWidth:n})=>{const i=t.get(o);void 0!==i&&i>=n&&e.push(o)})}o.size>0&&this.hot.batchExecution(()=>{o.forEach((t,e)=>{this.columnWidthsMap.setValueAtIndex(this.hot.toPhysicalColumn(e),t)})},!0)}function hO(t,e){const o=this.hot.toPhysicalColumn(t.visualColumn),n=null===o?void 0:_W(this,BW).get(o);if(void 0===n)return;const i=new Set(t.cells.map(t=>t.row));if(n.forEach((t,e)=>{const o=t.strings.filter(({row:t})=>void 0===t||!i.has(t));0===o.length?n.delete(e):t.strings=o}),void 0===e)return;const s=this.samplesGenerator.getSampleCount();let r=!1;e.forEach((t,e)=>{const o=n.get(e);void 0!==o?(o.strings.push(...t.strings),o.strings.length>2*s&&(r=!0)):n.set(e,t)}),r&&null!==o&&_W(this,BW).delete(o)}function cO(t){const e=new Map,o=t.filter(({samples:t})=>t.size>0);if(0===o.length)return e;const n=this.ghostTable.getSetting("useHeaders");this.ghostTable.setSetting("useHeaders",!1);try{o.forEach(({visualColumn:t,samples:e})=>{OW(this,YW,gO).call(this,t,e)}),this.ghostTable.getWidths((t,o)=>{e.set(t,o)})}finally{this.ghostTable.clean(),this.ghostTable.setSetting("useHeaders",n)}return e}function dO(t,e,o){const n=this.hot.getCellMetaTransient(t,e);return Vs(o,n,this.hot.getCellRenderer(n))}function uO(t,e){this.samplesGenerator.generateColumnSamples(t,e).forEach((t,e)=>{const o=this.hot.toPhysicalColumn(e);OW(this,YW,gO).call(this,e,t),_W(this,BW).set(null===o?e:o,t)})}function gO(t,e){this.ghostTable.addColumn(t,new Map(e))}function pO(){this.hot.batchExecution(()=>{this.ghostTable.getWidths((t,e)=>{const o=this.hot.toPhysicalColumn(t);this.columnWidthsMap.setValueAtIndex(o,e)})},!0)}function fO(t,e,o,n,i){let s=0;for(let r=o;r<=n;r++){const o=t.getCell(e,r,!0);if(!o)continue;const n=o.offsetWidth;if(i<s+n)return r;s+=n;const{colspan:l}=t.getCellMetaTransient(e,r);void 0!==l&&l>1&&(r+=l-1)}return null}function mO(t,e,o,n,i){let s=0;for(let r=o;r<=n;r++){const o=t.getCell(r,e,!0);if(!o)continue;const n=o.offsetHeight;if(i<s+n)return r;s+=n;const{rowspan:l}=t.getCellMetaTransient(r,e);void 0!==l&&l>1&&(r+=l-1)}return null}function wO(t,e,o,n,i){for(let s=e;s<=o;s++){let e=!1,o=!1,r=null;for(let l=n;l<=i;l++){const n=t.getCell(l,s,!0),{rowspan:i}=t.getCellMetaTransient(l,s);if(void 0!==i&&i>1||null!==n&&n===r){e=!0;break}null!==n&&(r=n,o=!0)}if(!e&&o)return s}return e}function bO(t,e,o,n,i){for(let s=e;s<=o;s++){let e=!1,o=!1,r=null;for(let l=n;l<=i;l++){const n=t.getCell(s,l,!0),{colspan:i}=t.getCellMetaTransient(s,l);if(void 0!==i&&i>1||null!==n&&n===r){e=!0;break}null!==n&&(r=n,o=!0)}if(!e&&o)return s}return e}function vO(t,e,o){const{view:n,columnIndexMapper:i,rowIndexMapper:s}=t,r=t.isRtl(),l=n.countNotHiddenFixedColumnsStart(),a=n.countNotHiddenFixedRowsTop(),h=n.countNotHiddenFixedRowsBottom(),c=t.getFirstPartiallyVisibleRow(),d=t.getLastPartiallyVisibleRow(),u=t.getFirstPartiallyVisibleColumn(),g=t.getLastPartiallyVisibleColumn(),p=t.rootElement.getBoundingClientRect(),f=t.hasColHeaders()?n.getColumnHeaderHeight():0,m=t.hasRowHeaders()?n.getRowHeaderWidth():0,{rootWindow:w}=t,b=n.isHorizontallyScrollableByWindow()?Math.min(0,p.left):p.left,v=n.isVerticallyScrollableByWindow()?Math.min(0,p.top):p.top,C=n.isHorizontallyScrollableByWindow()?w.innerWidth:p.left+n.getViewportWidth()+m,y=n.isVerticallyScrollableByWindow()?w.innerHeight:p.top+n.getViewportHeight()+f,S=ds(e,b,C),k=ds(o,v,y),R=c??0,E=d??R;let x=null;if(l>0){const e=i.getVisualFromRenderableIndex(0),o=i.getVisualFromRenderableIndex(l-1),n=null!==e?i.getNearestNotHiddenIndex(e,1):null;if(null!==n&&null!==o){const e=bO(t,R,E,n,o),i=t.getCell(e,n,!0);if(i instanceof HTMLElement){const s=i.getBoundingClientRect();x=fO(t,e,n,o,r?s.right-S:S-s.left)}}}if(null===x){const e=bO(t,R,E,u,g),o=t.getCell(e,u,!0);if(o instanceof HTMLElement){const n=o.getBoundingClientRect(),i=r?n.right-S:S-n.left;x=fO(t,e,u,g,i),null===x&&(x=i<0?u??0:g??t.countCols()-1)}else x=u??0}null===x&&ce("Failed to resolve cell coordinates from mouse position.");const M=u??0,T=g??M;let H=null;if(a>0){const e=s.getVisualFromRenderableIndex(0),o=s.getVisualFromRenderableIndex(a-1),n=null!==e?s.getNearestNotHiddenIndex(e,1):null;if(null!==n&&null!==o){const e=wO(t,M,T,n,o),i=t.getCell(n,e,!0);if(i instanceof HTMLElement){H=mO(t,e,n,o,k-i.getBoundingClientRect().top)}}}if(null===H&&h>0){const e=s.getNotHiddenIndexesLength(),o=s.getVisualFromRenderableIndex(e-h),n=s.getVisualFromRenderableIndex(e-1),i=null!==o?s.getNearestNotHiddenIndex(o,1):null,r=null!==n?s.getNearestNotHiddenIndex(n,-1):null;if(null!==i&&null!==r){const e=wO(t,M,T,i,r),o=t.getCell(i,e,!0);if(o instanceof HTMLElement){const n=k-o.getBoundingClientRect().top;n>=0&&(H=mO(t,e,i,r,n),null===H&&(H=r))}}}if(null===H){const e=c??0,o=wO(t,M,T,e,d??e),n=t.getCell(c,o,!0);if(n instanceof HTMLElement){const e=k-n.getBoundingClientRect().top;H=mO(t,o,c,d,e),null===H&&(H=e<0?c??0:d??t.countRows()-1)}else H=c??0}return null===H&&ce("Failed to resolve cell coordinates from mouse position."),t._createCellCoords(H,x)}const CO=Object.freeze({horizontal:"horizontal",vertical:"vertical"});function yO(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function SO(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function kO(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,SO(t,e,"get"))}function RO(t,e,o){yO(t,e),e.set(t,o)}function EO(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,SO(t,e,"set"),o),o}function xO(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function MO(t,e){yO(t,e),e.add(t)}Qn.getSingleton().register("modifyAutofillRange"),Qn.getSingleton().register("beforeAutofill"),Qn.getSingleton().register("afterAutofill");const TO="fillHandle";var HO=new WeakMap,IO=new WeakMap,_O=new WeakSet,AO=new WeakSet,WO=new WeakSet,OO=new WeakMap,NO=new WeakMap,PO=new WeakSet,DO=new WeakSet,LO=new WeakSet,zO=new WeakMap;class BO extends pW{static get PLUGIN_KEY(){return"autofill"}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[TO]}static get DEFAULT_SETTINGS(){return{direction:void 0,autoInsertRow:!0}}static get SETTINGS_VALIDATORS(){return{direction:t=>void 0===t||"string"==typeof t&&Object.values(CO).includes(t),autoInsertRow:t=>"boolean"==typeof t}}isEnabled(){return!!this.hot.getSettings()[TO]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[TO],e={};"string"==typeof t?e.direction=t:t&&"object"==typeof t&&Object.assign(e,t),this.updatePluginSettings(e),this.getSetting("direction")?this.directions=[this.getSetting("direction")]:this.directions=Object.values(CO),this.autoInsertRow=this.getSetting("autoInsertRow"),1===this.directions.length&&this.directions.includes("horizontal")&&(this.autoInsertRow=!1),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",kO(this,NO)),this.addHook("afterOnCellCornerDblClick",kO(this,OO)),this.addHook("beforeOnCellMouseOver",(t,e)=>xO(this,PO,UO).call(this,e)),this.addHook("afterScroll",kO(this,zO)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}getSelectionData(t=!1){const e=this.hot.getSelectedRangeLast();if(!e)return[];const{row:o,col:n}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:o,startCol:n,endRow:i,endCol:s}]),l=[],a=[],h=new Set,c=new Set,d=[];return $(r,t=>{for(let e=t.startRow;e<=t.endRow;e+=1)h.has(e)||(h.add(e),l.push(e));for(let e=t.startCol;e<=t.endCol;e+=1)c.has(e)||(c.add(e),a.push(e))}),$(l,e=>{const o=[];$(a,n=>{const i=e,s=n,r=t?this.hot.getSourceDataAtCell(i,s):null;t&&(Ce(r)||Array.isArray(r))?o.push(this.hot.getCopyableSourceData(i,s)):o.push(this.hot.getCopyableData(i,s))}),d.push(o)}),d}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[t,e,o,n]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast();if(!i)return!1;const s=i.getTopStartCorner(),r=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const l=[s.row??0,s.col??0,r.row??0,r.col??0],a=this.hot.runHooks("modifyAutofillRange",[Math.min(s.row??0,t??0),Math.min(s.col??0,e??0),Math.max(r.row??0,o??0),Math.max(r.col??0,n??0)],l),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=function(t,e,o){let n,i,s;return e[0]===t[0]&&e[1]<t[1]?(s="left",n=o(e[0],e[1]),i=o(e[2],t[1]-1)):e[2]===t[2]&&e[0]===t[0]&&e[3]>t[3]?(s="right",n=o(e[0],t[3]+1),i=o(e[2],e[3])):e[0]<t[0]&&e[1]===t[1]?(s="up",n=o(e[0],e[1]),i=o(t[0]-1,e[3])):e[2]>t[2]&&e[1]===t[1]&&(s="down",n=o(t[2]+1,e[1]),i=o(e[2],e[3])),n&&n.normalize(),i&&i.normalize(),{directionOfDrag:s,startOfDragCoords:n,endOfDragCoords:i}}(l,a,(t,e)=>this.hot._createCellCoords(t,e));if(c&&d&&null!==c.row&&null!==c.col&&null!==d.row&&null!==d.col&&c.row>-1&&c.col>-1){const t=c.row,e=c.col,o=d.row,n=d.col,s={row:t,col:e},r={row:o,col:n},l=this.getSelectionData(),u=this.getSelectionData(!0),g=i.clone(),p=this.hot._createCellRange(c,c,d),f=this.hot.runHooks("beforeAutofill",l,g,p,h);if(!1===f)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let m=f;const w=f;m=xO(this,_O,VO).call(this,w,m,h,t,o,e,n),m=xO(this,AO,FO).call(this,m,u,s,r,h),this.hot.populateFromArray(t,e,m,o,n,`${this.pluginName}.fill`,void 0),this.setSelection(a,g),this.hot.runHooks("afterAutofill",m,g,p,h),this.hot.render()}else this.hot.view.render();return!0}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.getSelectedRangeLast()?.getBottomEndCorner().row??null,e=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();null!==t&&t<o-1&&e[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(t){const e=this.hot.getData(),o=this.hot.countRows();let n;for(let i=t[2]+1;i<o;i++){for(let o=t[1];o<=t[3];o++){if(!Ot(e[i][o]))return-1}const o=e[i][t[1]-1],s=e[i][t[3]+1];Ot(o)&&Ot(s)||(n=i)}return n}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,e){const o=F(t,t=>Math.max(t,0)),n=o[0],i=o[1],s=o[2],r=o[3];let l=n,a=i,h=s,c=r;if(e){const{row:t,col:o}=e.getTopStartCorner(),{row:d,col:u}=e.getBottomEndCorner(),g=t??0,p=o??0,f=u??0;l=n<g?s:s>(d??0)||e.from.row===g?n:s,a=i<p?r:r>f||e.from.col===p?i:r,h=l===n?s:n,c=a===i?r:i}this.hot.selectCell(l,a,h,c,!1,!1)}selectAdjacent(){const t=this.hot.getSelectedRangeLast();if(!t)return!1;const e=t.getTopStartCorner(),o=t.getBottomEndCorner(),n=[e.row??0,e.col??0,o.row??0,o.col??0],i=this.getIndexOfLastAdjacentFilledInRow(n);return-1!==i&&void 0!==i&&(this.addSelectionFromStartAreaToSpecificRowIndex(n,i),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(t){const e=this.directions,o=this.hot.getSelectedRangeLast();if(!o||!t||null===t.row||null===t.col)return;const n=this.hot._createCellCoords(t.row,t.col),i=o.getBottomEndCorner(),s=o.getTopStartCorner(),r=o.getBottomEndCorner(),l=(n.row??0)<(s.row??0)||(n.row??0)>(r.row??0),a=(n.col??0)<(s.col??0)||(n.col??0)>(r.col??0);o.includes(n)&&EO(this,HO,null),"vertical"===kO(this,HO)&&!l&&a?e.includes("horizontal")&&EO(this,HO,"horizontal"):"horizontal"===kO(this,HO)&&!a&&l&&e.includes("vertical")&&EO(this,HO,"vertical");let h=i.row,c=i.col;null===kO(this,HO)&&(l&&!a&&e.includes("vertical")?EO(this,HO,"vertical"):a&&!l&&e.includes("horizontal")&&EO(this,HO,"horizontal")),"vertical"===kO(this,HO)&&e.includes("vertical")?(h=n.row??0,c=s.col??0):"horizontal"===kO(this,HO)&&e.includes("horizontal")&&(h=s.row??0,c=n.col??0);const d=this.hot._createCellCoords(h??0,c??0);this.hot.selection.highlight.getFill().clear().add(o.from).add(o.to).add(d).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(t){const{documentElement:e}=this.hot.rootDocument,o=Mo(this.hot.table).top-(this.hot.rootWindow.pageYOffset||e.scrollTop)+Lo(this.hot.table),n=Mo(this.hot.table).left-(this.hot.rootWindow.pageXOffset||e.scrollLeft)+Do(this.hot.table);return t.clientY>o&&t.clientX<=n}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mouseup",()=>xO(this,DO,jO).call(this)),this.eventManager.addEventListener(t,"mousemove",t=>xO(this,LO,qO).call(this,t))}destroy(){super.destroy()}constructor(...t){super(...t),MO(this,_O),MO(this,AO),MO(this,WO),MO(this,PO),MO(this,DO),MO(this,LO),RO(this,HO,{writable:!0,value:void 0}),RO(this,IO,{writable:!0,value:void 0}),RO(this,OO,{writable:!0,value:void 0}),RO(this,NO,{writable:!0,value:void 0}),RO(this,zO,{writable:!0,value:void 0}),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1,EO(this,HO,null),EO(this,IO,null),EO(this,OO,()=>{this.selectAdjacent()&&this.fillIn()}),EO(this,NO,()=>{this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0,EO(this,HO,null),EO(this,IO,null)}),EO(this,zO,()=>{this.mouseDownOnCellCorner&&kO(this,IO)&&xO(this,LO,qO).call(this,kO(this,IO),!1)})}}function VO(t,e,o,n,i,s,r){if("up"!==o&&"left"!==o||1===t.length&&0===t[0].length)return e;const l=[];if("up"===o){const e=i-n+1,o=e%t.length;for(let n=0;n<e;n++)l.push(t[(n+(t.length-o))%t.length])}else{const e=r-s+1,o=e%t[0].length;for(let n=0;n<t.length;n++){l.push([]);for(let i=0;i<e;i++)l[n].push(t[n][(i+(t[n].length-o))%t[n].length])}}return l}function FO(t,e,o,n,i){if(!e.some(t=>t.some(t=>Ce(t)||Array.isArray(t))))return t;const s=xO(this,WO,$O).call(this,t,e,o,n,i);return s.length?s:t}function $O(t,e,o,n,i){const s=[];for(let i=Math.min(o.row,n.row);i<=Math.max(o.row,n.row);i+=1){s.push([]);for(let r=Math.min(o.col,n.col);r<=Math.max(o.col,n.col);r+=1){const l=this.hot.getSourceDataAtCell(i,r),a=this.hot.getCellMetaTransient(i,r),h=a.source,c=Array.isArray(h)?h[0]:void 0,d=a._complexDataFormat||Ce(c)||Array.isArray(c),u=i-Math.min(o.row,n.row),g=r-Math.min(o.col,n.col),p=u%e.length,f=g%e[0].length;Ce(l)||Array.isArray(l)||d?s[u][g]=e[p][f]:s[u][g]=t[p][f]}}return s}function UO(t){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.hot.selection.highlight.getFill().isEmpty()&&this.redrawBorders(t),this.addNewRowIfNeeded())}function jO(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1,EO(this,HO,null))}function qO(t,e=!0){if(this.mouseDownOnCellCorner){const{clientX:o,clientY:n}=t,i=vO(this.hot,o,n),s=this.hot.getSelectedRangeLast();EO(this,IO,{clientX:o,clientY:n}),e&&this.handleDraggedCells>0&&s&&!s.includes(i)&&(this.handleDraggedCells+=1),this.redrawBorders(i)}const o=this.getIfMouseWasDraggedOutside(t);!1===this.addingStarted&&this.handleDraggedCells>0&&o?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function GO(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function YO(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function XO(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,YO(t,e,"get"))}function KO(t,e,o){GO(t,e),e.set(t,o)}function ZO(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,YO(t,e,"set"),o),o}function QO(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function JO(t,e){GO(t,e),e.add(t)}const tN="autoRowSize",eN="htFirstDatasetColumnNotRendered",oN="htAutoRowSize";var nN=new WeakMap,iN=new WeakMap,sN=new WeakMap,rN=new WeakMap,lN=new WeakSet,aN=new WeakSet,hN=new WeakMap,cN=new WeakMap,dN=new WeakMap,uN=new WeakMap,gN=new WeakMap,pN=new WeakMap,fN=new WeakMap,mN=new WeakMap;class wN extends pW{static get PLUGIN_KEY(){return tN}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()[tN];return!0===t||Ce(t)}enablePlugin(){if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(t),this.addHook("afterLoadData",XO(this,gN)),this.addHook("beforeChangeRender",XO(this,pN)),this.addHook("beforeColumnResize",XO(this,dN)),this.addHook("afterFormulasValuesUpdate",XO(this,mN)),this.addHook("beforeViewRender",XO(this,hN)),this.addHook("beforeRender",XO(this,cN)),this.addHook("modifyRowHeight",(t,e)=>this.getRowHeight(e,t)),this.addHook("init",XO(this,fN)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),ZO(this,iN,this.hot.rowIndexMapper.observeMapChange(this.rowHeightsMap,()=>{this.hot.view?.invalidateRowHeightCache()})),po(this.hot.rootElement,oN),super.enablePlugin()}disablePlugin(){XO(this,iN)&&(XO(this,iN).call(this),ZO(this,iN,null)),this.headerHeight=null,fo(this.hot.rootElement,oN),super.disablePlugin(),QO(this,aN,vN).call(this,!1),this.addHook("beforeRowResize",XO(this,uN))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const t=this.getFirstVisibleRow(),e=this.getLastVisibleRow();if(-1===t||-1===e)return;const o=this.hot.forceFullRender;this.calculateRowsHeight({from:t,to:e},void 0,o)}calculateRowsHeight(t={from:0,to:this.hot.countRows()-1},e={from:0,to:this.hot.countCols()-1},o=!1){const n="number"==typeof t?{from:t,to:t}:t,i="number"==typeof e?{from:e,to:e}:e;if((o||null===this.headerHeight)&&null!==this.hot.getColHeader(0)){const t=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(t.get(-1))}as(n.from,n.to,t=>{let e=this.hot.toPhysicalRow(t);if(null===e&&(e=t),o||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=n.to+1,this.ghostTable.clean())}calculateAllRowsHeight(t={from:0,to:this.hot.countCols()-1},e=!1){let o=0;const n=this.hot.countRows()-1;let i=0;this.inProgress=!0;const s=()=>{if(!this.hot)return Oe(i),void(this.inProgress=!1);this.calculateRowsHeight({from:o,to:Math.min(o+wN.CALCULATION_STEP,n)},t,e),o=o+wN.CALCULATION_STEP+1,o<n?i=We(s):(Oe(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();r>=0&&(this.calculateRowsHeight({from:0,to:r},t,e),o=r+1),o<n?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()[tN];let e=wN.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;if(Ce(t))if(e=this.getSetting("syncLimit"),Rn(e))e=cs(o,e);else{const t=Number(e);e=Number.isFinite(t)?Math.trunc(t):0}return Math.min(e,o)}getRowHeight(t,e=this.hot.stylesHandler.getDefaultRowHeight(t)??0){if(t<0)return this.headerHeight??e;const o=this.hot.toPhysicalRow(t);if(this.hot.rowIndexMapper.isHidden(o))return e;const n=this.rowHeightsMap.getValueAtIndex(o);let i=e;return null!=n&&n>e&&(i=n,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:o}="number"==typeof t?{from:t,to:t}:t;this.hot.batchExecution(()=>{as(Math.min(e,o),Math.max(e,o),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),JO(this,lN),JO(this,aN),KO(this,nN,{writable:!0,value:void 0}),KO(this,iN,{writable:!0,value:void 0}),KO(this,sN,{writable:!0,value:void 0}),KO(this,rN,{writable:!0,value:void 0}),KO(this,hN,{writable:!0,value:void 0}),KO(this,cN,{writable:!0,value:void 0}),KO(this,dN,{writable:!0,value:void 0}),KO(this,uN,{writable:!0,value:void 0}),KO(this,gN,{writable:!0,value:void 0}),KO(this,pN,{writable:!0,value:void 0}),KO(this,fN,{writable:!0,value:void 0}),KO(this,mN,{writable:!0,value:void 0}),this.headerHeight=null,this.ghostTable=new CW(this.hot),this.samplesGenerator=new xW((t,e)=>{const o=this.hot.toPhysicalColumn(e);if(this.hot.columnIndexMapper.isHidden(o))return!1;let n,i;return!(t>=0&&e>=0&&(n=this.hot.getCellMetaTransient(t,e),n.hidden))&&(t>=0?(i=this.hot.getDataAtCell(t,e),n&&(i=Vs(i,n,this.hot.getCellRenderer(n)))):-1===t&&(i=this.hot.getColHeader(e)),{value:i})}),this.inProgress=!1,this.measuredRows=0,ZO(this,nN,[]),ZO(this,iN,null),ZO(this,sN,!1),ZO(this,rN,!1),ZO(this,hN,()=>{QO(this,aN,vN).call(this)}),ZO(this,cN,()=>{this.calculateVisibleRowsHeight(),this.inProgress||(QO(this,lN,bN).call(this,XO(this,nN)),ZO(this,nN,[]))}),ZO(this,dN,()=>{XO(this,rN)||(ZO(this,rN,!0),this.hot._registerTimeout(()=>{ZO(this,rN,!1),this.recalculateAllRowsHeight()},0))}),ZO(this,uN,(t,e,o)=>{let n=t;return o&&(this.calculateRowsHeight(e,void 0,!0),n=this.getRowHeight(e)),n}),ZO(this,gN,(t,e)=>{e||this.recalculateAllRowsHeight()}),ZO(this,pN,t=>{const e=new Set;t.forEach(([t])=>{e.add(Number(t))}),e.forEach(t=>{XO(this,nN).push(t)})}),ZO(this,fN,()=>{this.recalculateAllRowsHeight(),ZO(this,sN,!0)}),ZO(this,mN,t=>{if(!XO(this,sN))return;const e=this.hot.getPlugin("formulas"),o=e?.sheetId,n=t.reduce((t,e)=>{const n=e;if(null!=o&&n.address?.sheet!==o)return t;const i=Number(n.address?.row);if(Number.isInteger(i)){const e=this.hot.toVisualRow(i);null!==e&&-1===t.indexOf(e)&&t.push(e)}return t},[]);XO(this,nN).push(...n)}),this.rowHeightsMap=this.hot.rowIndexMapper.createAndRegisterIndexMap("autoRowSize","physicalIndexToValue",null,{skipUnchangedWrites:!0}),this.addHook("beforeRowResize",XO(this,uN))}}function bN(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 o=this.hot.toPhysicalRow(t);this.rowHeightsMap.setValueAtIndex(o,e)})},!0),this.ghostTable.clean())}function vN(t){const e=this.hot.getFirstRenderedVisibleColumn(),o=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(e);!1===t||o===this.hot.columnIndexMapper.getPhysicalFromRenderableIndex(0)?fo(this.hot.rootElement,eN):po(this.hot.rootElement,eN)}function CN(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function yN(t,e,o){!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,o)}function SN(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,CN(t,e,"set"),o),o}const kN="bindRowsWithHeaders",RN=new Map([["loose",class extends ff{insert(t,e){const o=Df(this.indexedValues,e);this.indexedValues=Lf(o,0,e,this.initValueOrFn),super.insert(t,e)}remove(t){const e=zf(this.indexedValues,t);this.indexedValues=Pf(e,t),super.remove(t)}constructor(){super(t=>t)}}],["strict",class extends ff{insert(t,e){this.indexedValues=Lf(this.indexedValues,0,e,(t,e)=>this.getNextValue(e)),super.insert(t,e)}remove(t){this.indexedValues=zf(this.indexedValues,t),super.remove(t)}getNextValue(t){return Math.max(...this.getValues())+1+t}constructor(){super(t=>t)}}]]);var EN=new WeakMap;class xN extends pW{static get PLUGIN_KEY(){return kN}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[kN]}enablePlugin(){if(this.enabled)return;const t=RN.get(this.getSetting())??RN.get("loose");var e;t&&(this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",function(t,e){return e.get?e.get.call(t):e.value}(e=this,CN(e,EN,"get"))),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}constructor(...t){super(...t),yN(this,EN,{writable:!0,value:void 0}),this.headerIndexes=null,SN(this,EN,t=>this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(t)))}}function MN(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function TN(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function HN(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,TN(t,e,"get"))}function IN(t,e,o){MN(t,e),e.set(t,o)}function _N(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,TN(t,e,"set"),o),o}function AN(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function WN(t,e){MN(t,e),e.add(t)}const ON="collapsibleColumns",NN=["nestedHeaders"],PN="collapsibleIndicator",DN="collapsibleColumns.visibleWhen",LN=ON,zN=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var BN=new WeakMap,VN=new WeakMap,FN=new WeakSet,$N=new WeakSet,UN=new WeakSet,jN=new WeakMap,qN=new WeakMap,GN=new WeakSet,YN=new WeakSet,XN=new WeakMap,KN=new WeakMap,ZN=new WeakMap,QN=new WeakMap;class JN extends pW{static get PLUGIN_KEY(){return ON}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[ON,...NN]}isEnabled(){return!!this.hot.getSettings()[ON]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Xe("You need to configure the Nested Headers plugin in order to use collapsible headers."),this.pluginName&&_N(this,BN,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),_N(this,VN,this.hot.columnIndexMapper.createAndRegisterIndexMap(DN,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",HN(this,ZN)),this.addHook("afterLoadData",HN(this,QN)),this.addHook("afterGetColHeader",HN(this,XN)),this.addHook("beforeOnCellMouseDown",HN(this,KN)),this.addHook("afterCreateCol",HN(this,jN)),this.addHook("afterRemoveCol",HN(this,jN)),this.addHook("beforeColumnMove",HN(this,qN)),this.addHook("afterColumnMove",HN(this,jN)),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:Number(t.origColspan)>1})):Array.isArray(t)&&(this.headerStateManager?.mapState(()=>({collapsible:!1})),this.headerStateManager?.mergeStateWith(t))}AN(this,UN,oP).call(this),super.updatePlugin()}}disablePlugin(){this.pluginName&&this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.hot.columnIndexMapper.unregisterMap(DN),_N(this,BN,null),_N(this,VN,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid")?.addShortcut({keys:[["Enter"]],callback:()=>{const t=this.hot.getSelectedRangeActive();if(!t)return;const{row:e,col:o}=t.highlight;if(null===e||null===o)return;const n=this.headerStateManager?.getHeaderTreeNodeData(e,o)??{collapsible:!1,isCollapsed:!1,columnIndex:0},{collapsible:i,isCollapsed:s,columnIndex:r}=n;return i?(s?this.expandSection({row:e,col:r}):this.collapseSection({row:e,col:r}),!1):void 0},runOnlyIf:()=>!(!this.hot.getSelectedRangeActive()?.isSingle()||!this.hot.getSelectedRangeActive()?.highlight.isHeader()),group:LN,relativeToGroup:Ek,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(LN)}clearButtons(){if(!this.hot.view)return;const t=this.hot.view._wt.getSetting("columnHeaders").length,e=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay?.clone?.wtTable.THEAD??null,n=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone?.wtTable.THEAD??null:null,i=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)};e&&o&&as(0,t-1,t=>{const s=e.childNodes[t],r=o.childNodes[t],l=n?n.childNodes[t]:null;as(0,s.childNodes.length-1,t=>{let e=s.childNodes[t].querySelector(`.${PN}`);i(e),r&&r.childNodes[t]&&(e=r.childNodes[t].querySelector(`.${PN}`),i(e)),n&&l&&l.childNodes[t]&&(e=l.childNodes[t].querySelector(`.${PN}`),i(e))})})}expandSection(t){this.toggleCollapsibleSection([t],"expand")}collapseSection(t){this.toggleCollapsibleSection([t],"collapse")}toggleAllCollapsibleSections(t){const e=this.headerStateManager?.mapNodes(e=>{const{collapsible:o,origColspan:n,headerLevel:i,columnIndex:s,isCollapsed:r}=e;if(!0===o&&Number(n)>1&&(r&&"expand"===t||!r&&"collapse"===t))return{row:this.headerStateManager?.levelToRowCoords(Number(i))??0,col:s}});this.toggleCollapsibleSection(e,t)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(t,e){if(void 0!==e&&zN.has(e)||ce(`Unsupported action is passed (${e}).`),!Array.isArray(t))return;const o=V(t,({row:t})=>t<0),n=AN(this,FN,tP).call(this,o,e),i=[],s=[],r=this.headerStateManager?.getVisibleWhenHiddenColumns()??[];n&&$(o,({row:t,col:o})=>{const{affectedColumns:n,rollbackModification:r}=this.headerStateManager?.triggerNodeModification(e,t,o)??{affectedColumns:[],rollbackModification:()=>{}};i.push(r),n.length>0&&s.push(...n)});const l=this.getCollapsedColumns();let a=[];"collapse"===e?a=q([...l,...s]):"expand"===e&&(a=V(l,t=>!s.includes(t)));const h=zN.get(e);if(!1===this.hot.runHooks(h.beforeHook,l,a,n))return void $(i,t=>{t()});this.hot.batchExecution(()=>{$(s,t=>{HN(this,BN)?.setValueAtIndex(this.hot.toPhysicalColumn(t),h.hideColumn)})},!0);const c=this.headerStateManager?.getVisibleWhenHiddenColumns()??[],d=G(c,r),u=d.length>0||c.length!==r.length;u&&AN(this,UN,oP).call(this,c);const g=this.getCollapsedColumns().length!==l.length||u,p="collapse"===e?q([...s,...d]):d;g&&p.length>0&&AN(this,$N,eP).call(this,p),this.hot.runHooks(h.afterHook,l,a,n,g),this.hot.view.adjustElementsSize(),this.hot.render()}getCollapsedColumns(){return HN(this,BN)?.getHiddenIndexes()??[]}destroy(){_N(this,BN,null),_N(this,VN,null),super.destroy()}constructor(...t){super(...t),WN(this,FN),WN(this,$N),WN(this,UN),WN(this,GN),WN(this,YN),IN(this,BN,{writable:!0,value:void 0}),IN(this,VN,{writable:!0,value:void 0}),IN(this,jN,{writable:!0,value:void 0}),IN(this,qN,{writable:!0,value:void 0}),IN(this,XN,{writable:!0,value:void 0}),IN(this,KN,{writable:!0,value:void 0}),IN(this,ZN,{writable:!0,value:void 0}),IN(this,QN,{writable:!0,value:void 0}),this.nestedHeadersPlugin=null,this.headerStateManager=null,_N(this,BN,null),_N(this,VN,null),_N(this,jN,()=>{AN(this,UN,oP).call(this)}),_N(this,qN,(t,e,o,n)=>{const i=this.headerStateManager;if(!1===n||!i)return;const s=AN(this,GN,nP).call(this,t,e),r=new Map(s.map((t,e)=>[t,e]));i.getCollapsedGroups().forEach(({headerLevel:t,columnIndex:e,origColspan:o})=>{if(AN(this,YN,iP).call(this,e,o,r)){const o=i.levelToRowCoords(t);null!==o&&this.toggleCollapsibleSection([{row:o,col:e}],"expand")}})}),_N(this,XN,(t,e,o)=>{const n=this.headerStateManager?.getHeaderSettings(o,t),{collapsible:i,origColspan:s,isCollapsed:r}=n??{},l=!0===i&&(s??0)>1&&t>=(this.hot.getSettings().fixedColumnsStart??0),a=this.hot.getSettings().ariaTags;let h=e.querySelector(`.${PN}`);if(wo(e,[O("")[0]]),l){h||(h=this.hot.rootDocument.createElement("div"),po(h,PN),e.querySelector("div:first-child")?.appendChild(h));const t=h;fo(t,["collapsed","expanded"]),r?(po(t,"collapsed"),Eo(t,"+"),a&&mo(e,...O(!1))):(po(t,"expanded"),Eo(t,"-"),a&&mo(e,...O(!0))),a&&mo(t,"aria-hidden","true")}else h?.remove()}),_N(this,KN,(t,e)=>{const o=no(t);go(o,PN)&&(go(o,"expanded")?(this.eventManager.fireEvent(o,"mouseup"),this.toggleCollapsibleSection([e],"collapse")):go(o,"collapsed")&&(this.eventManager.fireEvent(o,"mouseup"),this.toggleCollapsibleSection([e],"expand")),pn(t))}),_N(this,ZN,()=>{this.updatePlugin()}),_N(this,QN,(t,e)=>{e||this.updatePlugin()})}}function tP(t,e){if(0===t.length)return!1;let o=!0;return $(t,({row:t,col:n})=>{const{collapsible:i,isCollapsed:s}=this.headerStateManager?.getHeaderTreeNodeData(t,n)??{};if(!i||s&&"collapse"===e||!s&&"expand"===e)return o=!1,!1}),o}function eP(t){const e=this.hot.getSelectedRangeActive();if(!e)return;const{row:o,col:n}=e.highlight;if(null===o||null===n)return;if((this.hot.rowIndexMapper.isHidden(o)||this.hot.columnIndexMapper.isHidden(n))&&t.includes(n)){const t=o>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(o,1,!0):o,e=n>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1,!0):n;null!==t&&null!==e&&this.hot.selectCell(t,e)}}function oP(t=this.headerStateManager?.getVisibleWhenHiddenColumns()??[]){if(!HN(this,VN))return;const e=HN(this,VN),o=F(t,t=>this.hot.toPhysicalColumn(t)),n=e.getHiddenIndexes();o.length===n.length&&0===G(o,n).length||this.hot.batchExecution(()=>{e.clear(),$(o,t=>{e.setValueAtIndex(t,!0)})},!0)}function nP(t,e){const o=new Set(t),n=[];for(let t=0,e=this.hot.countCols();t<e;t++)o.has(t)||n.push(t);return[...n.slice(0,e),...t,...n.slice(e)]}function iP(t,e,o){let n=1/0,i=-1/0,s=0;for(let r=t;r<t+e;r++){const t=o.get(r);void 0!==t&&(n=Math.min(n,t),i=Math.max(i,t),s+=1)}return s>0&&i-n!==s-1}const sP=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class rP{updateAllColumnsProperties(t){Ce(t)&&ke(t,(t,e)=>{sP.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 Ce(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(void 0!==e)return{column:t,sortOrder:e}}setSortStates(t){this.sortingStates.clear();for(let e=0;e<t.length;e+=1){const o=t[e];this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(o.column),{sortOrder:o.sortOrder})}}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),Reflect.set(this,"sortingStates",null)}constructor(t,e){this.sortEmptyCells=false,this.indicator=true,this.headerAction=true,this.hot=t,this.mapName=e,this.sortingStates=this.hot.columnIndexMapper.createAndRegisterIndexMap(e,"linkedPhysicalIndexToValue")}}function lP(t,e,o){if("boolean"==typeof t)return Number(t);if("string"==typeof t){let n=o.get(t);return void 0===n&&(n=An(t,e),o.set(t,n)),n}return t}function aP(t,e,o){const n=e.locale,i=new Map;return function(e,s){const{sortEmptyCells:r}=o,l=lP(e,n,i),a=lP(s,n,i);return l===a?mP:Ot(l)?Ot(a)?mP:r&&"asc"===t?wP:bP:Ot(a)?r&&"asc"===t?bP:wP:function(t,e,o){const n=isNaN(t),i=isNaN(e);if(n&&!i)return"asc"===o?bP:wP;if(!n&&i)return"asc"===o?wP:bP;let s=t,r=e;return n||i||(s=parseFloat(String(t)),r=parseFloat(String(e))),s<r?"asc"===o?wP:bP:s>r?"asc"===o?bP:wP:mP}(l,a,t)}}const hP="default";const{register:cP,getItem:dP,hasItem:uP}=oi("sorting.compareFunctionFactory"),{register:gP,getItem:pP}=oi("sorting.mainSortComparator");function fP(t){return uP(t)?dP(t):dP(hP)}cP("checkbox",function(t,e,o){const n=e.checkedTemplate,i=e.uncheckedTemplate,{sortEmptyCells:s}=o,r=aP(t,e,o);return function(e,o){const l=Ot(e),a=Ot(o),h=l?i:e,c=a?i:o;if(!1===s){if(l&&!1===a)return bP;if(!1===l&&a)return wP}const d=function(t,e,o,n,i,s){return!1===t&&e?"asc"===o?wP:bP:t&&!1===e?"asc"===o?bP:wP:!1===t&&!1===e?n(i,s):null}(h===i||h===n,c===i||c===n,t,r,e,o);return null!==d?d:function(t,e,o,n,i){return t===n&&e===o?"asc"===i?wP:bP:t===o&&e===n?"asc"===i?bP:wP:mP}(h,c,n,i,t)}}),cP("date",function(t,e,o){return TP(t,o)}),cP("intl-date",function(t,e,o){return TP(t,o)}),cP(hP,aP),cP("numeric",function(t,e,o){return function(e,n){const i=parseFloat(e),s=parseFloat(n),{sortEmptyCells:r}=o;if(i===s||isNaN(i)&&isNaN(s))return mP;if(r){if(Ot(e))return"asc"===t?wP:bP;if(Ot(n))return"asc"===t?bP:wP}return isNaN(i)?bP:isNaN(s)?wP:i<s?"asc"===t?wP:bP:i>s?"asc"===t?bP:wP:mP}}),cP("time",function(t,e,o){return HP(t,o)}),cP("intl-time",function(t,e,o){return HP(t,o)}),cP("intl-datetime",function(t,e,o){return function(t,e){return MP(nH,t,e)}(t,o)});const mP=0,wP=-1,bP=1;const vP="asc",CP="desc",yP="colHeader";function SP(t){if(!1===Ce(t))return!1;const{column:e,sortOrder:o}=t;return Number.isInteger(e)&&[vP,CP].includes(o)}function kP(t){if(t!==CP)return t===vP?CP:vP}function RP(t){return t.querySelector(`.${yP}`)}function EP(t,e){return!(t<0)&&ho(e)}function xP(t,e,o){if(e<0||t>=0||mn(o))return!1;if(-1===t)return!0;const n="function"==typeof no(o)?.closest?no(o).closest("th"):null;return null!==n&&ho(n)}function MP(t,e,o){const n=new Map,i=e=>{let o=n.get(e);return void 0===o&&(o=t(e)?.getTime()??null,n.set(e,o)),o};return function(t,n){const{sortEmptyCells:s}=o;if(t===n)return mP;if(Ot(t))return Ot(n)?mP:s&&"asc"===e?wP:bP;if(Ot(n))return s&&"asc"===e?bP:wP;const r=i(t),l=i(n);return null===r?bP:null===l?wP:l>r?"asc"===e?wP:bP:l<r?"asc"===e?bP:wP:mP}}function TP(t,e){return MP(XT,t,e)}function HP(t,e){return MP(tH,t,e)}const IP="ascending",_P="descending",AP="indicatorDisabled",WP="columnSorting",OP="sortAction",NP=new Map([[vP,IP],[CP,_P]]);function PP(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DP(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,DP(t,e,"get"))}function zP(t,e,o){PP(t,e),e.set(t,o)}function BP(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,DP(t,e,"set"),o),o}function VP(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function FP(t,e){PP(t,e),e.add(t)}const $P="columnSorting",UP="append",jP=$P,qP="has-sort-indicator";gP($P,function(t,e){const o=function(t,e){const o=e,n=o.columnSorting;return(n?.compareFunctionFactory?n.compareFunctionFactory:fP(o.type??""))(t,e,n)}(t[0],e[0]);return function(t,e){return o(t[1],e[1])}}),Qn.getSingleton().register("beforeColumnSort"),Qn.getSingleton().register("afterColumnSort");const GP=new WeakMap;var YP=new WeakMap,XP=new WeakMap,KP=new WeakMap,ZP=new WeakSet,QP=new WeakMap,JP=new WeakMap,tD=new WeakMap,eD=new WeakMap,oD=new WeakMap,nD=new WeakSet;class iD extends pW{static get PLUGIN_KEY(){return $P}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){if(GP.has(this.hot)&&GP.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),t=GP.get(this.hot),e=this.pluginKey,void Xe(X`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
|
|
95
|
+
Only \`${t}\` will work. The \`${e}\` plugin will remain disabled.`);var t,e;this.enabled||(GP.set(this.hot,this.pluginKey),this.columnStatesManager=new rP(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=this.hot.columnIndexMapper.createAndRegisterIndexMap(`${this.pluginKey}.columnMeta`,"physicalIndexToValue",t=>{let e=this.hot.toVisualColumn(t);return null===e&&(e=t),this.getMergedPluginSettings(e)}),this.addHook("afterGetColHeader",LP(this,KP)),this.addHook("beforeOnCellMouseDown",LP(this,tD)),this.addHook("afterOnCellMouseDown",(t,e)=>this.onAfterOnCellMouseDown(t,e)),this.addHook("afterOnCellMouseUp",LP(this,eD)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mouseup",()=>LP(this,eD).call(this)),this.addHook("afterColumnMove",LP(this,oD)),this.addHook("afterInit",LP(this,XP)),this.addHook("afterLoadData",LP(this,QP)),this.addHook("afterDataProviderFetch",LP(this,JP),-1),this.hot.view&&LP(this,XP).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const t=(t,e)=>{const o=RP(e);!1!==EP(t,e)&&null!==o&&(this.updateHeaderClasses(o),VP(this,ZP,sD).call(this,o))};GP.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,BP(this,YP,null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid")?.addShortcut({keys:[["Enter"]],callback:()=>{const t=this.hot.getSelectedRangeActive();if(!t)return!1;const{highlight:e}=t;return this.sort(this.getColumnNextConfig(e.col??0)),!1},runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight,e=t&&null!==t.row&&null!==t.col?this.hot.getCell(t.row,t.col,!0):null;return!!(t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&null!==t.row&&t.row<0&&null!==t.col&&t.col>=0&&e&&ho(e))},relativeToGroup:Ek,position:"before",group:jP})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(jP)}sort(t){const e=this.columnStatesManager.getSortStates(),o=this.getNormalizedSortConfigs(t),n=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",e,o,n)&&(0===e.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginKey,"indexesSequence"),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),n&&(this.columnStatesManager?.setSortStates(o),this.sortByPresetSortStates(o)),this.hot.runHooks("afterColumnSort",e,n?o:e,n),n&&this.hot.render())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager?.isListOfSortedColumnsEmpty()}getSortConfig(t){return void 0!==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 function(t){if(t.some(t=>!1===SP(t)))return!1;const e=t.filter(SP).map(t=>t.column);return new Set(e).size===e.length}(t)&&t.every(({column:t})=>t<=e&&t>=0)}getColumnNextConfig(t){const e=this.columnStatesManager?.getSortOrderOfColumn(t);if(At(e)){const o=kP(e);return void 0!==o?{column:t,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(t)&&t>=0&&t<o)return{column:t,sortOrder:kP()??"asc"}}getNextSortConfig(t,e=UP){const o=this.columnStatesManager.getIndexOfColumnInSortQueue(t),n=-1!==o,i=this.columnStatesManager.getSortStates(),s=this.getColumnNextConfig(t);if(n){if(Wt(s))return[...i.slice(0,o),...i.slice(o+1)];if(e===UP)return[...i.slice(0,o),...i.slice(o+1),s];if("replace"===e)return[...i.slice(0,o),s,...i.slice(o+1)]}return void 0!==s?i.concat(s):i}getPluginColumnConfig(t){if(Ce(t)){const e=t[this.pluginKey];if(Ce(e))return e}return{}}getMergedPluginSettings(t){const e=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager?.getAllColumnsProperties()??{},n=this.hot.getCellMetaTransient(0,t),i=Object.getPrototypeOf(n);if(Array.isArray(i.columns))return Object.assign(o,e,this.getPluginColumnConfig(i.columns[t]));if(ln(i.columns)){const n=i.columns(t);return Object.assign(o,e,this.getPluginColumnConfig(n))}return Object.assign(o,e)}getFirstCellSettings(t){const e=this.hot.getCellMetaTransient(0,t),o=Object.create(e);return o[this.pluginKey]=this.columnMetaCache?.getValueAtIndex(this.hot.toPhysicalColumn(t)),o}getNumberOfRowsToSort(t){const e=this.hot.getSettings(),o=e.fixedRowsBottom||0;return(e.maxRows??1/0)<=t?Math.max(0,(e.maxRows??0)-o):Math.max(0,t-(e.minSpareRows??0)-o)}sortByPresetSortStates(t){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===t.length)return;const e=[],o=this.hot.countRows(),n=this.hot.getSettings().fixedRowsTop||0,i=this.getNumberOfRowsToSort(o),s=e=>F(t,t=>this.hot.getDataAtCell(e,t.column));for(let t=n;t<i;t+=1)e.push([this.hot.toPhysicalRow(t),...s(t)]);const r=F(e,t=>t[0]);!function(t,e,...o){const n=pP(e);t.sort(n(...o))}(e,this.pluginKey,F(t,t=>t.sortOrder),F(t,t=>this.getFirstCellSettings(t.column)));for(let t=i;t<o;t+=1)e.push([t,...s(t)]);const l=F(e,t=>t[0]),a=new Map(F(r,(t,e)=>[t,l[e]])),h=F(this.hot.rowIndexMapper.getIndexesSequence(),t=>a.get(t)??t);this.hot.rowIndexMapper.setIndexesSequence(h)}sortBySettings(t){if(ye(t)){this.columnStatesManager.updateAllColumnsProperties(t);const{initialConfig:e}=t;(Array.isArray(e)||ye(e))&&this.sort(e)}else this.hot.render()}updateHeaderClasses(t,e,o,n,i){fo(t,Array.from(NP.values()).concat(OP,AP,WP)),!1!==this.enabled&&void 0!==e&&void 0!==o&&po(t,function(t,e,o,n){const i=[WP];if(n&&i.push(OP),!1===o)return i.push(AP),i;const s=t.getSortOrderOfColumn(e);if(void 0!==s){const t=NP.get(s);void 0!==t&&i.push(t)}return i}(e,o,n??!1,i??!1))}onUpdateSettings(t){super.onUpdateSettings(t),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes());const e=t[this.pluginKey];At(e)&&this.sortBySettings(e)}wasClickableHeaderClicked(t,e){return this.getFirstCellSettings(e)[this.pluginKey].headerAction&&go(no(t),yP)}onAfterOnCellMouseDown(t,e){if(!1===xP(e.row,e.col,t))return;if(!1===this.wasClickableHeaderClicked(t,e.col))return;const o=this.hot.getShortcutManager().isCtrlPressed();o&&(this.hot.deselectCell(),this.hot.selectColumns(e.col));const n=this.hot.getActiveEditor(),i=!(!n?.isOpened()||!this.hot.getCellValidator(n.row,n.col));BP(this,YP,{column:e.col,isCtrlPressed:o,validation:i?new Promise(t=>{this.hot.addHookOnce("postAfterValidate",()=>t())}):null,consumedByMove:!1})}applyHeaderClickSort(t){this.sort(this.getColumnNextConfig(t.column))}destroy(){BP(this,YP,null),this.columnStatesManager?.destroy(),super.destroy()}constructor(...t){super(...t),FP(this,ZP),FP(this,nD),zP(this,YP,{writable:!0,value:void 0}),zP(this,XP,{writable:!0,value:void 0}),zP(this,KP,{writable:!0,value:void 0}),zP(this,QP,{writable:!0,value:void 0}),zP(this,JP,{writable:!0,value:void 0}),zP(this,tD,{writable:!0,value:void 0}),zP(this,eD,{writable:!0,value:void 0}),zP(this,oD,{writable:!0,value:void 0}),this.columnStatesManager=null,this.columnMetaCache=null,BP(this,YP,null),this.pluginKey=$P,this.indexesSequenceCache=null,BP(this,XP,()=>{const t=this.hot.getSettings()[this.pluginKey];this.sortBySettings(t)}),BP(this,KP,(t,e)=>{const o=RP(e);if(!1===EP(t,e)||null===o)return;const n=this.getFirstCellSettings(t)[this.pluginKey],i=n.indicator,s=n.headerAction;if(this.updateHeaderClasses(o,this.columnStatesManager??void 0,t,i,s),VP(this,ZP,sD).call(this,o),this.hot.getSettings().ariaTags){const o=this.columnStatesManager?.getSortOrderOfColumn(t);mo(e,...(r=o?`${o}ending`:"none",["aria-sort",r]))}var r}),BP(this,QP,t=>{!0===t&&this.hot.view&&LP(this,XP).call(this)}),BP(this,JP,t=>{this.setSortConfig(t?.columnSortConfig??[])}),BP(this,tD,(t,e,o,n)=>{BP(this,YP,null),!1!==xP(e.row,e.col,t)&&this.wasClickableHeaderClicked(t,e.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(n.column=!0)}),BP(this,eD,()=>{const t=LP(this,YP);null!==t&&(BP(this,YP,null),t.consumedByMove||VP(this,nD,rD).call(this)||(null!==t.validation?t.validation.then(()=>this.applyHeaderClickSort(t)):this.applyHeaderClickSort(t)))}),BP(this,oD,()=>{null!==LP(this,YP)&&(LP(this,YP).consumedByMove=!0)})}}function sD(t){const e=t.parentElement;if(null===e)return;go(t,OP)&&(go(t,IP)||go(t,_P))?po(e,qP):fo(e,qP)}function rD(){const t=this.hot.getPlugin("manualColumnMove");return!0===t?.isDragging()}function lD(t){return null==t||isNaN(t)}function aD(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function hD(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,aD(t,e,"get"))}function cD(t,e,o){!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,o)}function dD(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,aD(t,e,"set"),o),o}var uD=new WeakMap;class gD{initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(t){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[t]:this.endpoints[t]}countPhysicalRows(){return this.hot.rowIndexMapper.getNumberOfIndexes()}countAddressableRows(){const t=this.hot.getSettings().maxRows;let e;return e=(t??0)<0||0===t?0:t||1/0,Math.min(this.countPhysicalRows(),e)}isEndpointOutOfBounds(t,e=0,o=0){const n=t.destinationRow+e,i=this.hot.toVisualRow(n);return n>=this.countPhysicalRows()||t.destinationColumn+o>=this.hot.countCols()||null!==i&&i>=this.hot.countRows()}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}cacheSummaryDestinations(t){dD(this,uD,new Map),$(t,t=>{let e=hD(this,uD).get(t.destinationRow);void 0===e&&(e=new Set,hD(this,uD).set(t.destinationRow,e)),e.add(t.destinationColumn)})}isSummaryDestination(t,e){return null===hD(this,uD)&&this.cacheSummaryDestinations(this.getAllEndpoints()),!0===hD(this,uD).get(t)?.has(e)}fillMissingEndpointData(t){return this.parseSettings(t.call(this))}parseSettings(t){const e=[];let o=t;if(o||"function"!=typeof this.settings)return o||(o=this.settings),$(o,t=>{const o={};this.assignSetting(t,o,"ranges",[[0,this.countAddressableRows()-1]]),this.assignSetting(t,o,"reversedRowCoords",!1),this.assignSetting(t,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(t,o,"sourceColumn",t.destinationColumn),this.assignSetting(t,o,"type","sum"),this.assignSetting(t,o,"forceNumeric",!1),this.assignSetting(t,o,"suppressDataTypeErrors",!0),this.assignSetting(t,o,"customFunction",null),this.assignSetting(t,o,"readOnly",!0),this.assignSetting(t,o,"roundFloat",!1),e.push(o)}),e;this.settingsType="function"}assignSetting(t,e,o,n){if("ranges"!==o||void 0!==t[o]){if("ranges"!==o||0!==t[o].length)if(void 0===t[o]){if(n instanceof Error)throw n;e[o]=n}else"destinationRow"===o&&e.reversedRowCoords?e[o]=this.countAddressableRows()-t[o]-1:e[o]=t[o]}else e[o]=n}resetSetupBeforeStructureAlteration(t,e,o){if("function"!==this.settingsType)return;const n=t.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();$(i,i=>{"row"===n&&i.destinationRow>=e&&("insert_row"===t?i.alterRowOffset=o:"remove_row"===t&&(i.alterRowOffset=-1*o)),"col"===n&&i.destinationColumn>=e&&("insert_col"===t?i.alterColumnOffset=o:"remove_col"===t&&(i.alterColumnOffset=-1*o))}),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(t,e,o,n,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",l=t.indexOf("remove")>-1?-1:1,a=this.getAllEndpoints(),h=0===t.indexOf("move_row"),c=e;$(a,t=>{"row"===r&&t.destinationRow>=c&&(t.alterRowOffset=l*o),"col"===r&&t.destinationColumn>=c&&(t.alterColumnOffset=l*o)}),this.resetAllEndpoints(a,!h),$(a,h?t=>{this.extendEndpointRanges(t,c,n?.[0]??0,n?.length??0),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,o,n){$(t.ranges,t=>{t[1]&&(e>=t[0]&&e<=t[1]?o>t[1]?t[1]+=n:o<t[0]&&(t[0]-=n):o>=t[0]&&o<=t[1]&&(t[1]-=n,e<=t[0]&&(t[0]+=1,t[1]+=1)))})}recreatePhysicalRanges(t){const e=t.ranges,o=[],n=[];$(e,t=>{const e=[];if(t[1])for(let o=t[0];o<=t[1];o++)e.push(this.hot.toPhysicalRow(o));else e.push(this.hot.toPhysicalRow(t[0]));n.push(e)}),$(n,t=>{let e=[];$(t,(n,i)=>{0===i?e.push(n):t[i]!==t[i-1]+1&&(e.push(t[i-1]),o.push(e),e=[],e.push(n)),i===t.length-1&&(e.push(n),o.push(e))})}),t.ranges=o}shiftEndpointCoordinates(t,e){t.alterRowOffset&&0!==t.alterRowOffset?(t.destinationRow+=t.alterRowOffset||0,$(t.ranges,o=>{$(o,(n,i)=>{n>=e&&(o[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=>this.isEndpointOutOfBounds(t,t.alterRowOffset||0,t.alterColumnOffset||0))||(this.cellsToSetCache=[],$(t,t=>{this.resetEndpointValue(t,e)}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,null,void 0,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){const t=this.getAllEndpoints();this.cellsToSetCache=[],this.cacheSummaryDestinations(t),$(t,t=>{this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t,"init")}),this.currentEndpoint=null,this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,null,void 0,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(t){const e=this.getAllEndpoints(),o=[];this.cellsToSetCache=[],this.cacheSummaryDestinations(e),$(t,(t,n,i)=>{const s=t;`${s[2]||""}`!=`${s[3]}`&&$(e,(t,e)=>{this.hot.propToCol(i[n][1])===t.sourceColumn&&-1===o.indexOf(e)&&o.push(e)})}),$(o,t=>{this.refreshEndpoint(e[t])}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,null,void 0,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpointsBySourceColumns(t){const e=t instanceof Set?t:new Set(t),o=this.getAllEndpoints(),n=o.filter(t=>e.has(t.sourceColumn));0!==n.length&&(this.cellsToSetCache=[],this.cacheSummaryDestinations(o),$(n,t=>{this.refreshEndpoint(t)}),this.cellsToSetCache.length&&this.hot.setDataAtCell(this.cellsToSetCache,null,void 0,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshCellMetas(){this.endpoints.forEach(t=>{const e=this.hot.toVisualRow(t.destinationRow),o=t.destinationColumn;null!==e&&(this.hot._setCellMetaDeclarative(e,o,"readOnly",t.readOnly),this.hot._setCellMetaDeclarative(e,o,"className","columnSummaryResult"))})}refreshEndpoint(t){this.currentEndpoint=t,this.plugin.calculate(t),this.setEndpointValue(t,void 0),this.currentEndpoint=null}resetEndpointValue(t,e=!0){const o=t.alterRowOffset||0,n=t.alterColumnOffset||0,i=this.hot.toVisualRow(t.destinationRow+(e?o:0));null!==i&&this.cellsToSetCache.push([i,this.hot.toVisualColumn(t.destinationColumn+(e?n:0)),""])}setEndpointValue(t,e,o=!1){if(this.isEndpointOutOfBounds(t))return void this.throwOutOfBoundsWarning();const n=this.hot.toVisualRow(t.destinationRow);if(null!==n){const o=t.destinationColumn,i=this.hot.getCellMetaTransient(n,o);"init"!==e&&i.readOnly===t.readOnly||(this.hot._setCellMetaDeclarative(n,o,"readOnly",t.readOnly),this.hot._setCellMetaDeclarative(n,o,"className","columnSummaryResult"))}t.result=function(t,e){if("number"!=typeof t)return t;switch(typeof e){case"number":return t.toFixed(Math.min(Math.max(0,e),100));case"boolean":return e?Math.round(t).toString():t;case"string":if("auto"===e){const e=Math.round(t).toString().length;return t.toFixed(8-e)}return t;default:return t}}(t.result,t.roundFloat),null!==n&&(o?this.hot.setDataAtCell(n,t.destinationColumn,t.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,t.destinationColumn,t.result])),t.alterRowOffset=void 0,t.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Xe("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}constructor(t,e){cD(this,uD,{writable:!0,value:void 0}),this.endpoints=[],this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[],dD(this,uD,null),this.plugin=t,this.hot=this.plugin.hot,this.settings=e}}function pD(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function fD(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,pD(t,e,"get"))}function mD(t,e,o){!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,o)}function wD(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,pD(t,e,"set"),o),o}const bD="columnSummary";var vD=new WeakMap,CD=new WeakMap,yD=new WeakMap,SD=new WeakMap,kD=new WeakMap,RD=new WeakMap,ED=new WeakMap,xD=new WeakMap;class MD extends pW{static get PLUGIN_KEY(){return bD}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[bD]}enablePlugin(){this.enabled||(this.settings=this.hot.getSettings()[bD],this.endpoints=new gD(this,this.settings),this.addHook("afterInit",fD(this,CD)),this.addHook("afterChange",fD(this,SD)),this.addHook("afterUpdateSettings",fD(this,yD)),this.addHook("afterLoadData",fD(this,kD)),this.addHook("afterUpdateData",fD(this,RD)),this.addHook("beforeCreateRow",(t,e)=>{this.endpoints.resetSetupBeforeStructureAlteration("insert_row",t,e)}),this.addHook("beforeCreateCol",(t,e)=>{this.endpoints.resetSetupBeforeStructureAlteration("insert_col",t,e)}),this.addHook("beforeRemoveRow",(t,e)=>{this.endpoints.resetSetupBeforeStructureAlteration("remove_row",t,e)}),this.addHook("beforeRemoveCol",(t,e)=>{this.endpoints.resetSetupBeforeStructureAlteration("remove_col",t,e)}),this.addHook("afterCreateRow",(t,e,o)=>{this.endpoints.resetSetupAfterStructureAlteration("insert_row",t,e,null,o)}),this.addHook("afterCreateCol",(t,e,o)=>{this.endpoints.resetSetupAfterStructureAlteration("insert_col",t,e,null,o)}),this.addHook("afterRemoveRow",(t,e,o,n)=>this.endpoints.resetSetupAfterStructureAlteration("remove_row",t,e,o,n)),this.addHook("afterRemoveCol",(t,e,o,n)=>this.endpoints.resetSetupAfterStructureAlteration("remove_col",t,e,o,n)),this.addHook("afterRowMove",fD(this,xD)),this.addHook("afterFormulasValuesUpdate",fD(this,ED)),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;for(const o of t.ranges)e+=this.getPartialSum(o,t.sourceColumn);return e}getPartialSum(t,e){let o=0,n=t[1]||t[0],i=null,s=0;do{const t=this.getCellValue(n,e);if(i=lD(t)?null:Number(t),null!==i){const t=(`${i}`.split(".")[1]||[]).length||1;t>s&&(s=t)}o+=i??0,n-=1}while(n>=t[0]);return Math.round(o*10**s)/10**s}calculateMinMax(t,e){let o=null;for(const n of t.ranges){const i=this.getPartialMinMax(n,t.sourceColumn,e);if(null===o&&null!==i&&(o=i),null!==i)switch(e){case"min":o=Math.min(o,i);break;case"max":o=Math.max(o,i)}}return null===o?"Not enough data":o}getPartialMinMax(t,e,o){let n,i=null,s=t[1]||t[0];do{const t=this.getCellValue(s,e);if(n=lD(t)?null:Number(t),null===i)i=n;else if(null!==n)switch(o){case"min":i=Math.min(i,n);break;case"max":i=Math.max(i,n)}s-=1}while(s>=t[0]);return i}countEmpty(t,e){let o,n=0,i=t[1]||t[0];do{o=this.getCellValue(i,e),o=lD(o)?null:o,null===o&&(n+=1),i-=1}while(i>=t[0]);return n}countEntries(t){let e=0;const o=t.ranges;for(const n of o){e+=void 0===n[1]?1:n[1]-n[0]+1,e-=this.countEmpty(n,t.sourceColumn)}return e}calculateAverage(t){return this.calculateSum(t)/this.countEntries(t)}getCellValue(t,e){const o=this.hot.toVisualRow(t);let n=null!==o?this.hot.getDataAtCell(o,e):this.hot.getSourceDataAtCell(t,e);return(null!==o?(this.hot.getCellMetaTransient(o,e).className||"").indexOf("columnSummaryResult")>-1:this.endpoints.isSummaryDestination(t,e))?null:(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof n&&(n=n.replace(/,/,".")),n=parseFloat(n)),isNaN(Number(n))&&(this.endpoints.currentEndpoint.suppressDataTypeErrors||ce(X`ColumnSummary plugin: cell at (${t}, ${e}) is not in a\x20
|
|
96
|
+
numeric format. Cannot do the calculation.`)),n)}constructor(...t){super(...t),mD(this,vD,{writable:!0,value:void 0}),mD(this,CD,{writable:!0,value:void 0}),mD(this,yD,{writable:!0,value:void 0}),mD(this,SD,{writable:!0,value:void 0}),mD(this,kD,{writable:!0,value:void 0}),mD(this,RD,{writable:!0,value:void 0}),mD(this,ED,{writable:!0,value:void 0}),mD(this,xD,{writable:!0,value:void 0}),this.endpoints=null,wD(this,vD,!1),wD(this,CD,()=>{this.endpoints.initEndpoints()}),wD(this,yD,t=>{void 0!==t.columns&&this.endpoints.refreshCellMetas()}),wD(this,SD,(t,e)=>{t&&"ColumnSummary.reset"!==e&&"ColumnSummary.set"!==e&&"loadData"!==e&&this.endpoints.refreshChangedEndpoints(t)}),wD(this,kD,(t,e)=>{e||this.endpoints.refreshAllEndpoints()}),wD(this,RD,(t,e)=>{e||this.endpoints.refreshAllEndpoints()}),wD(this,ED,t=>{if(fD(this,vD)||!this.endpoints||!t?.length)return;const e=this.hot.getPlugin("formulas");if(!e?.enabled)return;const o=e.sheetId,n=new Set;if(t.forEach(t=>{t?.address?.sheet===o&&n.add(t.address.col)}),0===n.size)return;const i=new Set;if(this.endpoints.getAllEndpoints().forEach(t=>{const o=e.columnAxisSyncer.getHfIndexFromVisualIndex(t.sourceColumn??0);n.has(o)&&i.add(t.sourceColumn??0)}),0!==i.size){wD(this,vD,!0);try{this.endpoints.refreshEndpointsBySourceColumns(i)}finally{wD(this,vD,!1)}}}),wD(this,xD,(t,e)=>{this.endpoints.resetSetupBeforeStructureAlteration("move_row",t[0],t.length),this.endpoints.resetSetupAfterStructureAlteration("move_row",e,t.length,t,this.pluginName)})}}function TD(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function HD(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ID(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,HD(t,e,"get"))}function _D(t,e,o){TD(t,e),e.set(t,o)}function AD(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,HD(t,e,"set"),o),o}var WD=new WeakMap,OD=new WeakMap,ND=new WeakMap,PD=new WeakSet;class DD{setObservedElement(t){AD(this,OD,t)}unobserve(){ID(this,OD)&&ID(this,ND).unobserve(ID(this,OD))}observe(){AD(this,WD,!0),ID(this,OD)&&ID(this,ND).observe(ID(this,OD))}destroy(){ID(this,ND).disconnect()}constructor(){var t,e;TD(t=this,e=PD),e.add(t),_D(this,WD,{writable:!0,value:void 0}),_D(this,OD,{writable:!0,value:void 0}),_D(this,ND,{writable:!0,value:void 0}),AD(this,WD,!0),AD(this,OD,null),AD(this,ND,new ResizeObserver(t=>function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,PD,LD).call(this,t)))}}function LD(t){!ID(this,WD)&&Array.isArray(t)&&t.length?t.forEach(({borderBoxSize:t})=>{const{inlineSize:e,blockSize:o}=t[0];this.runLocalHooks("resize",e,o)}):AD(this,WD,!1)}function zD(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function BD(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,zD(t,e,"get"))}function VD(t,e,o){!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,o)}function FD(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,zD(t,e,"set"),o),o}be(DD,Wh);var $D=new WeakMap,UD=new WeakMap,jD=new WeakMap,qD=new WeakMap,GD=new WeakMap,YD=new WeakMap,XD=new WeakMap,KD=new WeakMap;class ZD{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){BD(this,YD)&&(BD(this,YD).left=`${t}px`,BD(this,YD).top=`${e}px`)}setSize(t,e){if(t&&e){const o=this.getInputElement();o.style.width=`${t}px`,o.style.height=`${e}px`}}getSize(){return{width:Do(this.getInputElement()),height:Lo(this.getInputElement())}}observeSize(){BD(this,KD).observe()}resetSize(){const t=this.getInputElement();t.style.width="",t.style.height=""}setReadOnlyState(t){this.getInputElement().readOnly=t}show(){BD(this,YD)&&(BD(this,YD).display="block"),FD(this,XD,!1)}hide(){BD(this,KD).unobserve(),BD(this,XD)||BD(this,YD)&&(BD(this,YD).display="none"),FD(this,XD,!0)}isVisible(){return"block"===BD(this,YD)?.display}setValue(t=""){const e=t||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return rn(BD(this,$D))===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const t=BD(this,$D).createElement("div"),e=BD(this,$D).createElement("textarea");return t.style.display="none",FD(this,qD,BD(this,$D).createElement("div")),BD(this,qD).setAttribute("dir",BD(this,jD)?"rtl":"ltr"),po(BD(this,qD),ZD.CLASS_EDITOR_CONTAINER),BD(this,UD).appendChild(BD(this,qD)),po(t,ZD.CLASS_EDITOR),po(e,ZD.CLASS_INPUT),e.dataset.hotInput="true",t.appendChild(e),BD(this,qD).appendChild(t),t}getInputElement(){return BD(this,GD)?.querySelector(`.${ZD.CLASS_INPUT}`)??null}getEditorElement(){return BD(this,GD)}destroy(){const t=BD(this,qD)?BD(this,qD).parentNode:null;BD(this,GD)?.parentNode?.removeChild(BD(this,GD)),FD(this,GD,null),FD(this,YD,null),BD(this,KD).destroy(),t&&BD(this,qD)&&t.removeChild(BD(this,qD))}constructor(t,e,o){VD(this,$D,{writable:!0,value:void 0}),VD(this,UD,{writable:!0,value:void 0}),VD(this,jD,{writable:!0,value:void 0}),VD(this,qD,{writable:!0,value:void 0}),VD(this,GD,{writable:!0,value:void 0}),VD(this,YD,{writable:!0,value:void 0}),VD(this,XD,{writable:!0,value:void 0}),VD(this,KD,{writable:!0,value:void 0}),FD(this,jD,!1),FD(this,qD,null),FD(this,GD,null),FD(this,YD,null),FD(this,XD,!0),FD(this,KD,new DD),FD(this,$D,t),FD(this,UD,o),FD(this,jD,e),FD(this,GD,this.createEditor()),FD(this,YD,BD(this,GD).style),BD(this,KD).setObservedElement(this.getInputElement()),BD(this,KD).addLocalHook("resize",(...t)=>{this.runLocalHooks("resize",...t)}),this.hide()}}be(ZD,Wh);class QD{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??void 0),this.hidingTimer=null}updateDelay(t=250){this.showDebounced=an(t=>{if(this.wasLastActionShow){const e=t;this.runLocalHooks("show",e.from.row,e.from.col)}},t)}destroy(){this.clearLocalHooks()}constructor(t){this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(t)}}be(QD,Wh);function JD(t,e){const o={};return $(t,t=>{t.forAll((t,n)=>{t>=0&&n>=0&&(o[t]||(o[t]=[]),o[t][n]=e(t,n))})}),o}function tL(t,e,o,n,i){$(t,t=>{t.forAll((t,s)=>{t>=0&&s>=0&&function(t,e,o,n,i,s){const r=i(t,e);let l=n;r.className&&(l="vertical"===o?function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${e}`}(r.className,n):function(t,e){return-1!==t.indexOf(e)?t:`${t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${e}`}(r.className,n));s(t,e,"className",l)}(t,s,e,o,n,i)})})}function eL(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}function oL(t,e){let o=!1;return Array.isArray(t)&&$(t,t=>(t.forAll((t,n)=>{if(t>=0&&n>=0&&e(t,n))return o=!0,!1}),o)),o}function nL(t,e){const o={top:0,left:0};if(e!==t.ownerDocument){const{frameElement:t}=e.defaultView,{top:n,left:i}=t.getBoundingClientRect();o.top=n,o.left=i}return o}const iL="---------";const sL="alignment";const rL="clear_column";const lL="col_left";const aL="col_right";const hL="make_read_only";const cL="redo";const dL="remove_col";const uL="remove_row";const gL="row_above";const pL="row_below";const fL="no_items";const mL="undo";const wL=[gL,pL,lL,aL,rL,uL,dL,mL,cL,hL,sL,iL,fL],bL={[iL]:function(){return{name:iL}},[fL]:function(){return{key:fL,name(){return this.getTranslatedPhrase(Qm)},disabled:!0,isCommand:!1}},[gL]:function(){return{key:gL,name(){return this.getTranslatedPhrase(Jm)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const e=t.getTopLeftCorner();null!==e.row&&this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&null!==t.highlight.row&&t.highlight.row<0||this.countSourceRows()>=(this.getSettings().maxRows??1/0))||!!this.selection.isSelectedByCorner()&&0===this.countRows()},hidden(){return!this.getSettings().allowInsertRow}}},[pL]:function(){return{key:pL,name(){return this.getTranslatedPhrase(tw)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const e=t.getBottomRightCorner();null!==e.row&&this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const t=this.getSelectedRangeActive();return!!(!t||this.selection.isSelectedByColumnHeader()||t.isSingleHeader()&&null!==t.highlight.row&&t.highlight.row<0||this.countSourceRows()>=(this.getSettings().maxRows??1/0))},hidden(){return!this.getSettings().allowInsertRow}}},[lL]:function(){return{key:lL,name(){return this.getTranslatedPhrase(ew)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const e=t.getTopLeftCorner(),o=this.isRtl()?"insert_col_end":"insert_col_start";null!==e.col&&this.alter(o,e.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)<0||this.countSourceCols()>=(this.getSettings().maxCols??1/0))||!!this.selection.isSelectedByCorner()&&0===this.countCols()},hidden(){return!this.getSettings().allowInsertColumn}}},[aL]:function(){return{key:aL,name(){return this.getTranslatedPhrase(ow)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const e=t.getTopRightCorner(),o=this.isRtl()?"insert_col_start":"insert_col_end";null!==e.col&&this.alter(o,e.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)<0||this.countSourceCols()>=(this.getSettings().maxCols??1/0))},hidden(){return!this.getSettings().allowInsertColumn}}},[rL]:function(){return{key:rL,name(){return this.getTranslatedPhrase(aw)},callback(t,e){const o=e[0].start.col,n=e[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(e[0].start.row,e[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const t=this.getSelectedRangeActive();if(!t||t.isSingleHeader()&&(null===t.highlight.col||t.highlight.col<0)||!this.selection.isSelectedByColumnHeader())return!0;let e=!1;return t.forAll((t,o)=>{if(t<0||o<0)return!0;const{readOnly:n}=this.getCellMetaTransient(t,o);return!!n||(e=!0,!1)}),!e}}},[uL]:function(){return{key:uL,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[o,,n]=t[0];o-n!==0&&(e=1)}return this.getTranslatedPhrase(nw,e)},callback(){this.alter("remove_row",function(t){const e=gC(t.getSelected());if(0===e||1===e)return[];const o=pC(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),n=new Set;$(t.getSelected()??[],t=>{const{from:e,to:i}=o(t),s=Math.max(e.row??0,0),r=(i.row??0)-s+1;$(Array.from(new Array(r),(t,e)=>s+e),t=>{n.has(t)||n.add(t)})});const i=B(Array.from(n).sort((t,e)=>t-e),(t,e,o,n)=>(0!==o&&e===n[o-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()&&null!==t.highlight.row&&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}}},[dL]:function(){return{key:dL,name(){const t=this.getSelected();let e=0;if(t)if(t.length>1)e=1;else{const[,o,,n]=t[0];o-n!==0&&(e=1)}return this.getTranslatedPhrase(iw,e)},callback(){this.alter("remove_col",function(t){const e=gC(t.getSelected());if(0===e||1===e)return[];const o=pC(e,{createCellCoords:t._createCellCoords.bind(t),createCellRange:t._createCellRange.bind(t)}),n=new Set;$(t.getSelected()??[],t=>{const{from:e,to:i}=o(t),s=Math.max(e.col??0,0),r=(i.col??0)-s+1;$(Array.from(new Array(r),(t,e)=>s+e),t=>{n.has(t)||n.add(t)})});const i=B(Array.from(n).sort((t,e)=>t-e),(t,e,o,n)=>(0!==o&&e===n[o-1]+1?t[t.length-1][1]+=1:t.push([e,1]),t),[]);return i}(this),void 0,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const t=this.getSelectedRangeActive();if(!t)return!0;if(t.isSingleHeader()&&null!==t.highlight.col&&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}}},[mL]:function(){return{key:mL,name(){return this.getTranslatedPhrase(sw)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[cL]:function(){return{key:cL,name(){return this.getTranslatedPhrase(rw)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const t=this.getPlugin("undoRedo");return!t||!t.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[hL]:function(){return{key:hL,checkable:!0,ariaChecked(){return oL(this.getSelectedRange()??[],(t,e)=>Boolean(this.getCellMetaTransient(t,e).readOnly))},ariaLabel(){return this.getTranslatedPhrase(lw)},name(){let t=this.getTranslatedPhrase(lw);return oL(this.getSelectedRange()??[],(t,e)=>Boolean(this.getCellMetaTransient(t,e).readOnly))&&(t=eL(t)),t},callback(){const t=this.getSelectedRange()??[],e=oL(t,(t,e)=>Boolean(this.getCellMetaTransient(t,e).readOnly));for(const o of t)o.forAll((t,o)=>{t>=0&&o>=0&&this.setCellMeta(t,o,"readOnly",!e)});this.render()},disabled(){const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||!this.getSelectedRange()?.length)))}}},[sL]:function(){return{key:sL,name(){return this.getTranslatedPhrase(Ew)},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:`${sL}:left`,name(){return this.getTranslatedPhrase(xw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="horizontal",n="htLeft";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{key:`${sL}:center`,name(){return this.getTranslatedPhrase(Mw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="horizontal",n="htCenter";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{key:`${sL}:right`,name(){return this.getTranslatedPhrase(Tw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="horizontal",n="htRight";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{key:`${sL}:justify`,name(){return this.getTranslatedPhrase(Hw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="horizontal",n="htJustify";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{name:iL},{key:`${sL}:top`,name(){return this.getTranslatedPhrase(Iw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="vertical",n="htTop";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{key:`${sL}:middle`,name(){return this.getTranslatedPhrase(_w)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="vertical",n="htMiddle";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1},{key:`${sL}:bottom`,name(){return this.getTranslatedPhrase(Aw)},callback(){const t=this.getSelectedRange()??[],e=JD(t,(t,e)=>this.getCellMetaTransient(t,e).className),o="vertical",n="htBottom";this.runHooks("beforeCellAlignment",e,t,o,n),tL(t,o,n,(t,e)=>this.getCellMetaTransient(t,e),(t,e,o,n)=>this.setCellMeta(t,e,o,n)),this.render()},disabled:!1}]}}}};function vL(){const t={};return ke(bL,(e,o)=>{t[o]=e()}),t}function CL(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yL(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,yL(t,e,"get"))}function kL(t,e,o){CL(t,e),e.set(t,o)}function RL(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,yL(t,e,"set"),o),o}function EL(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function xL(t,e){CL(t,e),e.add(t)}const ML="comments",TL="comment",HL="value",IL="style",_L="readOnly";const AL=ML,WL=`plugin:${ML}`;var OL=new WeakMap,NL=new WeakMap,PL=new WeakMap,DL=new WeakMap,LL=new WeakMap,zL=new WeakMap,BL=new WeakMap,VL=new WeakMap,FL=new WeakMap,$L=new WeakMap,UL=new WeakSet,jL=new WeakSet,qL=new WeakSet,GL=new WeakSet,YL=new WeakMap,XL=new WeakSet,KL=new WeakMap,ZL=new WeakMap,QL=new WeakSet;class JL extends pW{static get PLUGIN_KEY(){return ML}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[ML]}enablePlugin(){this.enabled||(SL(this,OL)||(RL(this,OL,new ZD(this.hot.rootDocument,this.hot.isRtl(),this.hot.rootPortalElement)),SL(this,OL)?.addLocalHook("resize",(t,e)=>EL(this,XL,iz).call(this,t,e)),this.hot.addHook("afterSetTheme",(t,e)=>{e||this.hide()})),SL(this,NL)||RL(this,NL,new QD(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",t=>this.addToContextMenu(t)),this.addHook("afterRenderer",(t,e,o,n,i,s)=>EL(this,jL,ez).call(this,t,s)),this.addHook("afterScroll",SL(this,ZL)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",SL(this,KL)),this.addHook("beforeCompositionStart",SL(this,KL)),SL(this,NL)?.addLocalHook("hide",()=>this.hide()),SL(this,NL)?.addLocalHook("show",(t,e)=>this.showAtCell(t,e)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){SL(this,NL)?.updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=this.hot.getShortcutManager(),e=t.getContext("grid"),o=t.addContext(WL);e?.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const e=this.hot.getSelectedRangeActive();RL(this,DL,!0),this.hot.scrollToFocusedCell(()=>{e&&this.setRange(e),this.show(),this.focusEditor(),t.setActiveContextName(WL),this.hot._registerTimeout(()=>{RL(this,DL,!1)})})},stopPropagation:!0,runOnlyIf:()=>!!this.hot.getSelectedRangeActive()?.highlight.isCell(),group:AL}),o.addShortcut({keys:[["Escape"]],callback:()=>{SL(this,OL)?.setValue(SL(this,BL)),this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>!(!SL(this,OL)?.isVisible()||!SL(this,OL)?.isFocused()),group:AL}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),t.setActiveContextName("grid")},runOnlyIf:()=>!(!SL(this,OL)?.isVisible()||!SL(this,OL)?.isFocused()),group:AL}),o.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:t.getContext("grid"),callback:()=>{RL(this,LL,!0),SL(this,OL)?.setValue(SL(this,OL)?.getValue()),this.setComment(),this.hide(),t.setActiveContextName("grid")},group:AL})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(AL)}registerListeners(){const{rootDocument:t}=this.hot,e=this.getEditorInputElement();this.eventManager.addEventListener(t,"mouseover",SL(this,$L)),this.eventManager.addEventListener(t,"mousedown",SL(this,VL)),this.eventManager.addEventListener(t,"mouseup",()=>EL(this,UL,tz).call(this)),e&&(this.eventManager.addEventListener(e,"focus",()=>EL(this,GL,nz).call(this)),this.eventManager.addEventListener(e,"blur",()=>EL(this,qL,oz).call(this)),this.eventManager.addEventListener(e,"keydown",SL(this,YL)));const o=this.getEditorInputElement();o&&this.eventManager.addEventListener(o,"mousedown",SL(this,FL))}setRange(t){this.range=t}clearRange(){this.range={}}targetIsCellWithComment(t){const e=so(no(t),["TD"]);return!!(e&&go(e,"htCommentCell")&&so(e,[this.hot.rootElement]))}targetIsCommentTextArea(t){return this.getEditorInputElement()===t.target}setComment(t){this.range.from||ce('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const e=SL(this,OL)?.getValue();let o="";null!=t?o=t:null!=e&&(o=e);const{row:n,col:i}=EL(this,QL,sz).call(this);this.updateCommentMeta(n,i,{[HL]:o}),this.hot.render()}setCommentAtCell(t,e,o){this.setRange({from:this.hot._createCellCoords(t,e)}),this.setComment(o)}removeComment(t=!0){this.range.from||ce('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:e,col:o}=EL(this,QL,sz).call(this);this.hot.setCellMeta(e,o,TL,void 0),t&&this.hot.render(),this.hide()}removeCommentAtCell(t,e,o=!0){this.setRange({from:this.hot._createCellCoords(t,e)}),this.removeComment(o)}getComment(){const{row:t,col:e}=EL(this,QL,sz).call(this);return this.getCommentMeta(t,e,HL)}getCommentAtCell(t,e){return this.getCommentMeta(t,e,HL)}show(){this.range.from||ce('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{row:t,col:e}=EL(this,QL,sz).call(this);if(t<0||t>this.hot.countRows()-1||e<0||e>this.hot.countCols()-1)return!1;const o=this.hot.getCellMeta(t,e);SL(this,NL)?.cancelHiding();const n=o[TL];return SL(this,OL)?.setValue((n?n[HL]:null)??""),SL(this,OL)?.show(),this.refreshEditor(!0),!0}showAtCell(t,e){return this.setRange({from:this.hot._createCellCoords(t,e)}),this.show()}hide(){SL(this,OL)?.hide()}refreshEditor(t=!1){if(!(t||this.range.from&&SL(this,OL)?.isVisible()))return;if(!SL(this,OL))return;const{rowIndexMapper:e,columnIndexMapper:o}=this.hot,{row:n,col:i}=EL(this,QL,sz).call(this);let s=e.getRenderableFromVisualIndex(n),r=o.getRenderableFromVisualIndex(i);const l=null===s;if(SL(this,OL).setPosition(0,0),null===s){const t=e.getNearestNotHiddenIndex(n,-1);s=null!==t?e.getRenderableFromVisualIndex(t):null}if(null===r){const t=o.getNearestNotHiddenIndex(i,-1);r=null!==t?o.getRenderableFromVisualIndex(t):null}const a=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(n,i).colspan??1,f=this.getCommentMeta(n,i,IL);f?SL(this,OL).setSize(f.width,f.height):SL(this,OL).resetSize();const m=h?0:function(t,e,o){return t>1?Do(e):o}(p,g,u.getColumnWidth(r)),w=l&&!a?Lo(g):0,{left:b,top:v,width:C,height:y}=g.getBoundingClientRect(),{width:S,height:k}=SL(this,OL).getSize(),{innerWidth:R,innerHeight:E}=this.hot.rootWindow,x=this.hot.rootDocument.documentElement,M=jo(this.hot.rootDocument),T=qo(this.hot.rootWindow)?M:0,H=Go(this.hot.rootWindow)?M:0,I=p>1?1:0;let _=b+c.scrollX+m-I,A=v+c.scrollY+w;this.hot.isRtl()&&(_-=S+m),this.hot.isLtr()&&b+C+S>R-T?_=b+c.scrollX-S-1:this.hot.isRtl()&&_<-(x.scrollWidth-x.clientWidth)&&(_=b+c.scrollX+m+1),v+k>E-H&&(A-=k-y+1);const W=function(t,e,o=8){const{innerWidth:n,innerHeight:i,verticalScrollbarWidth:s=0,horizontalScrollbarWidth:r=0}=e,l=Math.max(0,n-s-2*o),a=Math.max(0,i-r-2*o);return{width:Math.min(t.width,l),height:Math.min(t.height,a)}}({width:S,height:k},{innerWidth:R,innerHeight:E,verticalScrollbarWidth:T,horizontalScrollbarWidth:H});W.width===S&&W.height===k||SL(this,OL).setSize(W.width,W.height);const O=function(t,e,o=8){const{innerWidth:n,innerHeight:i,scrollX:s,scrollY:r,verticalScrollbarWidth:l=0,horizontalScrollbarWidth:a=0}=e,h=s,c=r,d=s+n-l,u=r+i-a;let{x:g,y:p}=t;return g<h?g=h+o:g+t.width>d&&(g=Math.max(h+o,d-t.width-o)),p<c?p=c+o:p+t.height>u&&(p=Math.max(c+o,u-t.height-o)),{x:g,y:p}}({x:_,y:A,width:W.width,height:W.height},{innerWidth:R,innerHeight:E,scrollX:c.scrollX,scrollY:c.scrollY,verticalScrollbarWidth:T,horizontalScrollbarWidth:H});SL(this,OL).setPosition(O.x,O.y),SL(this,OL).setReadOnlyState(this.getCommentMeta(n,i,_L)??!1),SL(this,OL).observeSize()}focusEditor(){SL(this,OL)?.focus()}updateCommentMeta(t,e,o){const n=this.hot.getCellMeta(t,e)[TL];let i;n?(i=pe(n),ge(i,o)):i=o,this.hot.setCellMeta(t,e,TL,i)}getCommentMeta(t,e,o){const n=this.hot.getCellMeta(t,e)[TL];if(n)return n[o]}addToContextMenu(t){var e;t.items.push({name:iL},(e=this,{key:"commentsAddEdit",name(){const t=this.getSelectedRangeActive()?.highlight;return t?.isCell()&&null!==t.row&&null!==t.col&&e.getCommentAtCell(t.row,t.col)?this.getTranslatedPhrase(Sw):this.getTranslatedPhrase(yw)},callback(){const t=this.getSelectedRangeActive();t&&e.setRange({from:t.from,to:t.to}),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(kw)},callback(){const e=this.getSelectedRangeActive();e&&(e.forAll((e,o)=>{e>=0&&o>=0&&t.removeCommentAtCell(e,o,!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(Rw);return oL(this.getSelectedRange()??[],(e,o)=>!!t.getCommentMeta(e,o,_L))?eL(e):e},callback(){const e=this.getSelectedRangeActive();e&&e.forAll((e,o)=>{if(e>=0&&o>=0){const n=!!t.getCommentMeta(e,o,_L);t.updateCommentMeta(e,o,{[_L]:!n})}})},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 SL(this,OL)?.getInputElement()??null}destroy(){SL(this,OL)?.destroy(),SL(this,NL)?.destroy(),super.destroy()}constructor(...t){super(...t),xL(this,UL),xL(this,jL),xL(this,qL),xL(this,GL),xL(this,XL),xL(this,QL),kL(this,OL,{writable:!0,value:void 0}),kL(this,NL,{writable:!0,value:void 0}),kL(this,PL,{writable:!0,value:void 0}),kL(this,DL,{writable:!0,value:void 0}),kL(this,LL,{writable:!0,value:void 0}),kL(this,zL,{writable:!0,value:void 0}),kL(this,BL,{writable:!0,value:void 0}),kL(this,VL,{writable:!0,value:void 0}),kL(this,FL,{writable:!0,value:void 0}),kL(this,$L,{writable:!0,value:void 0}),kL(this,YL,{writable:!0,value:void 0}),kL(this,KL,{writable:!0,value:void 0}),kL(this,ZL,{writable:!0,value:void 0}),this.range={},RL(this,OL,null),RL(this,NL,null),RL(this,PL,!1),RL(this,DL,!1),RL(this,LL,!1),RL(this,zL,null),RL(this,BL,""),RL(this,VL,t=>{if(this.hot.view&&this.hot.view._wt&&!SL(this,PL)&&!this.targetIsCommentTextArea(t)){const e=so(no(t),["TD"]);let o=null;e&&(o=this.hot.getCoords(e)),(!e||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}),RL(this,FL,t=>{t.stopPropagation()}),RL(this,$L,t=>{const{rootDocument:e}=this.hot,o=no(t);if(!(SL(this,PL)||SL(this,OL)?.isFocused()||go(o,"wtBorder")||SL(this,zL)===o)&&SL(this,OL))if(RL(this,zL,e.elementFromPoint(t.clientX,t.clientY)),this.targetIsCellWithComment(t)){const t=this.hot.getCoords(o);if(t){const e=this.hot._createCellRange(t);SL(this,NL)?.show(e)}}else lo(o,e)&&!this.targetIsCommentTextArea(t)&&SL(this,NL)?.hide()}),RL(this,YL,t=>{SL(this,OL)?.isVisible()&&(this.hot.getShortcutManager().hasEventShortcut(WL,t)||t.stopPropagation())}),RL(this,KL,t=>{SL(this,OL)?.isFocused()&&pn(t)}),RL(this,ZL,()=>{SL(this,DL)||this.hide()})}}function tz(){RL(this,PL,!1)}function ez(t,e){const o=e[TL];if(null!==(n=o)&&"object"==typeof n&&o[HL]){const o=e.commentedCellClassName;"string"==typeof o&&po(t,o)}var n}function oz(){SL(this,LL)?RL(this,LL,!1):(RL(this,BL,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment())}function nz(){RL(this,BL,this.getComment()??""),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(WL)}function iz(t,e){const{row:o,col:n}=EL(this,QL,sz).call(this);this.updateCommentMeta(o,n,{[IL]:{width:t,height:e}})}function sz(){if(this.range instanceof Sr){const{row:t,col:e}=this.range.highlight;return{row:t??0,col:e??0}}return{row:this.range.from.row??0,col:this.range.from.col??0}}class rz{registerCommand(t,e){this.commands[t]=e}setCommonCallback(t){this.commonCallback=t}execute(t,...e){const o=t.split(":"),n=o[0],i=2===o.length?o[1]:null;let s=this.commands[n];if(s||ce(`Menu command '${n}' not exists.`),i&&s.submenu&&(s=function(t,e){let o;return $(e,e=>{const n=e.key?e.key.split(":"):null;if(Array.isArray(n)&&n[1]===t)return o=e,!1}),o}(i,s.submenu.items)),!0===s.disabled)return;if("function"==typeof s.disabled&&!0===s.disabled.call(this.hot))return;if(Te(s,"submenu"))return;const r=[];"function"==typeof s.callback&&r.push(s.callback),"function"==typeof this.commonCallback&&r.push(this.commonCallback),e.unshift(o.join(":")),$(r,t=>t.apply(this.hot,e))}constructor(t){this.commands={},this.commonCallback=null,this.hot=t}}class lz{setPredefinedItems(t){const e={};this.defaultOrderPattern.length=0,ke(t,(t,o)=>{const n=t;let i="";if(n.name===iL)e[iL]=n,i=iL;else if(isNaN(parseInt(o,10)))n.key=void 0===n.key?o:n.key,e[o]=n,i=String(n.key??"");else{const t=String(n.key??"");if(e[t])return void ue(e[t],n);e[t]=n,i=t}this.defaultOrderPattern.push(i)}),this.predefinedItems=e}getItems(t=null){return function(t=null,e=[],o={}){const n=[];let i=t;i&&i.items?i=i.items:Array.isArray(i)||(i=e);Ce(i)?ke(i,(t,e)=>{let i=o["string"==typeof t?t:e];i||(i=t),Ce(t)?ue(i,t):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=e),n.push(i)}):$(i,(t,e)=>{let i=o[t];!i&&wL.indexOf(t)>=0||(i||(i={name:t,key:`${e}`}),Ce(t)&&ue(i,t),void 0===i.key&&(i.key=e),n.push(i))});return n}(t,this.defaultOrderPattern,this.predefinedItems)}constructor(t,e=null){this.predefinedItems=vL(),this.hot=t,this.defaultOrderPattern=e||[]}}class az{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 o=e.scrollY,n=e.scrollX;let i=0,s=0,r=0,l=0,a=0,h=0;if(this.rootWindow=e,this.type=this.getSourceType(t),"literal"===this.type){const e=t;i=parseInt(String(e.top),10),r=parseInt(String(e.left),10),a=e.height||0,h=e.width||0,s=i,l=r,i+=o,r+=n}else if("event"===this.type){const e=t;i=parseInt(String(e.pageY),10),r=parseInt(String(e.pageX),10),a=no(e).clientHeight,h=no(e).clientWidth,s=i-o,l=r-n}this.top=i,this.topRelative=s,this.left=r,this.leftRelative=l,this.scrollTop=o,this.scrollLeft=n,this.cellHeight=a,this.cellWidth=h}}function hz(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function cz(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,hz(t,e,"get"))}function dz(t,e,o){!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,o)}function uz(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,hz(t,e,"set"),o),o}var gz=new WeakMap,pz=new WeakMap,fz=new WeakMap,mz=new WeakMap,wz=new WeakMap;class bz{setOffset(t,e=0){return cz(this,wz)[t]=e,this}setElement(t){return uz(this,gz,t),this}setParentElement(t){return uz(this,pz,t),this}updatePosition(t){uz(this,fz,new az(t,cz(this,gz).ownerDocument.defaultView)),cz(this,mz)?(cz(this,fz).fitsBelow(cz(this,gz))?this.setPositionBelowCursor():cz(this,fz).fitsAbove(cz(this,gz))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===cz(this,gz).dir?cz(this,fz).fitsOnLeft(cz(this,gz))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():cz(this,fz).fitsOnRight(cz(this,gz))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let t=cz(this,wz).above+cz(this,fz).top-cz(this,gz).offsetHeight;if(cz(this,pz)){const e=cz(this,pz).ownerDocument.defaultView.getComputedStyle(cz(this,pz).querySelector(".ht_master")),o=Number.parseInt(e.paddingTop,10),n=Number.parseInt(e.borderTop,10);t=cz(this,fz).top+cz(this,fz).cellHeight-cz(this,gz).scrollHeight+o+n}cz(this,gz).style.top=`${t}px`}setPositionBelowCursor(){let t=cz(this,wz).below+cz(this,fz).top+1;if(cz(this,pz)){const e=cz(this,pz).ownerDocument.defaultView.getComputedStyle(cz(this,pz).querySelector(".ht_master")),o=Number.parseInt(e.paddingTop,10),n=Number.parseInt(e.borderTop,10);t=cz(this,fz).top-o-n}cz(this,gz).style.top=`${t}px`}setPositionOnRightOfCursor(){let t=cz(this,fz).left;if(cz(this,pz)){const e=cz(this,pz).ownerDocument.defaultView,o=Number.parseInt(e.getComputedStyle(cz(this,pz).querySelector(".htCore")).borderRightWidth,10);t+=cz(this,fz).cellWidth+o}else t+=cz(this,wz).right;cz(this,gz).style.left=`${t}px`}setPositionOnLeftOfCursor(){let t=cz(this,wz).left+cz(this,fz).left-cz(this,gz).offsetWidth;if(cz(this,pz)){const e=cz(this,pz).ownerDocument.defaultView;t-=Number.parseInt(e.getComputedStyle(cz(this,pz).querySelector(".htCore")).borderLeftWidth,10)}cz(this,gz).style.left=`${t}px`}constructor(t){dz(this,gz,{writable:!0,value:void 0}),dz(this,pz,{writable:!0,value:void 0}),dz(this,fz,{writable:!0,value:void 0}),dz(this,mz,{writable:!0,value:void 0}),dz(this,wz,{writable:!0,value:void 0}),uz(this,gz,null),uz(this,pz,null),uz(this,fz,null),uz(this,mz,!1),uz(this,wz,{above:0,below:0,left:0,right:0}),uz(this,mz,t)}}function vz({initialPage:t=-1,size:e=()=>0,onItemSelect:o=()=>{},onClear:n=()=>{}}){const i=new Set;let s=ds(t,-1,l()-1);function r(t,e){const n=l()-1;if(t<0&&(t=n),t>n&&(t=0),i.has(t))return-1;i.add(t);return!1===o(t,!1)&&(t=r(1===e?++t:--t,e)),t}function l(){return Math.max(e(),0)}return{setCurrentPage:function(t){t>-1&&t<l()&&!1!==o(t,!0)&&(s=t)},setPageCursorAt:function(t){t>-1&&t<l()&&(s=t)},getCurrentPage:function(){return s},toFirstItem:function(){l()>0&&(i.clear(),s=r(0,1))},toLastItem:function(){l()>0&&(i.clear(),s=r(l()-1,-1))},toNextItem:function(){l()>0&&(i.clear(),s=r(++s,1))},toPreviousItem:function(){l()>0&&(i.clear(),s=r(--s,-1))},getSize:l,clear:function(){i.clear(),s=t,n()}}}function Cz(t){return Te(t,"submenu")}function yz(t){return new RegExp(iL,"i").test(t.name??"")}function Sz(t,e){return!0===t.disabled||"function"==typeof t.disabled&&!0===t.disabled.call(e)}function kz(t){return Te(t,"disableSelection")}function Rz(t,e){const o=t.slice(0);for(let t=0;t<o.length&&o[t].name===e;)o.shift();return o}function Ez(t,e=iL){let o=t.slice(0);return o=Rz(o,e),o=function(t,e){let o=t.slice(0);return o.reverse(),o=Rz(o,e),o.reverse(),o}(o,e),o=function(t){const e=[];return $(t,(t,o)=>{const n=t;o>0?e[e.length-1].name!==n.name&&e.push(n):e.push(n)}),e}(o),o}function xz(t){return vz({size:()=>t.countRows(),onItemSelect(e,o){const n=t.getCell(e,0);if(!n||function(t){return go(t,"htSeparator")}(n)||function(t){return go(t,"htDisabled")}(n)||function(t){return go(t,"htSelectionDisabled")}(n))return!1;t.selectCell(e,0,...o?[e,0,!1,!1]:[])},onClear(){t.deselectCell()}})}const Mz="menu",Tz=Mz;function Hz(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Iz(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function _z(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Iz(t,e,"get"))}function Az(t,e,o){Hz(t,e),e.set(t,o)}function Wz(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Iz(t,e,"set"),o),o}function Oz(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Nz(t,e){Hz(t,e),e.add(t)}var Pz=new WeakMap,Dz=new WeakMap,Lz=new WeakMap,zz=new WeakMap,Bz=new WeakMap,Vz=new WeakMap,Fz=new WeakMap,$z=new WeakMap,Uz=new WeakSet,jz=new WeakSet,qz=new WeakSet,Gz=new WeakSet,Yz=new WeakSet,Xz=new WeakSet;class Kz{get tableBorderWidth(){return void 0===_z(this,Lz)&&this.hotMenu&&Wz(this,Lz,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),_z(this,Lz)}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=io(t)}setMenuItems(t){this.menuItems=t}getNavigator(){return _z(this,Pz)}getKeyboardShortcutsCtrl(){return _z(this,Dz)}getSelectedItem(){if(!this.hasSelectedItem())return null;const t=this.hotMenu.getSelectedActive()[0];return Oz(this,qz,Jz).call(this,t)}getItemPositionByKey(t){return(this.hotMenu?.getSourceData()??this.menuItems??[]).findIndex(e=>e.key===t)}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=an((...t)=>this.openSubMenu(t[0]),300),e=Number(this.options.minWidth)||215;let o=!1,n=V(this.menuItems,t=>(t.key===fL&&(o=!0),function(t,e){return!t.hidden||!("function"==typeof t.hidden&&t.hidden.call(e))}(t,this.hot)));if(n.length<1&&!o)n.push(vL()[fL]);else if(0===n.length)return;Oz(this,Uz,Zz).call(this),n=Ez(n);let i=!1;const s={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:t=>At(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,o,n,i,s,l)=>{const a=t.getSourceDataAtRow(o),h=r.rootDocument.createElement("div"),c="function"==typeof s?s.call(r):s,d="function"==typeof a.ariaLabel?a.ariaLabel.call(r):a.ariaLabel,u="function"==typeof a.ariaChecked?a.ariaChecked.call(r):a.ariaChecked;if(l.readOnlyCellClassName="",vo(e),po(h,"htItemWrapper"),r.getSettings().ariaTags){const t=!Sz(a,r)&&!kz(a)&&!yz(a);mo(e,[...(g=a,!0===g.checkable?[["role","menuitemcheckbox"],x(d),N(u)]:[["role","menuitem"],x(c)]),...t?[b(-1)]:[],...Sz(a,r)?[T()]:[],...Cz(a)?[O(!1)]:[]])}var g;e.className="",e.appendChild(h),yz(a)?po(e,"htSeparator"):"function"==typeof a.renderer?(po(e,"htCustomMenuRenderer"),e.appendChild(a.renderer(t,h,o,n,i,c))):Ro(h,String(c),xp(r),"contextMenu",r.rootElement),Sz(a,r)?po(e,"htDisabled"):kz(a)?po(e,"htSelectionDisabled"):Cz(a)&&po(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 o=Oz(this,qz,Jz).call(this,e);return o&&o.name===iL?1:t},beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(t,e)=>{_z(this,Vz)||_z(this,Pz).setPageCursorAt(e.row)},afterOnCellMouseOver:(e,o)=>{_z(this,Vz)||(this.isAllSubMenusClosed()?t(o.row):this.openSubMenu(o.row))},afterOnCellContextMenu:t=>{t.preventDefault(),je()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(t,e,o,n,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=>{je()&&mn(t)||!i||!this.hasSelectedItem()||(Fe()||Ue()?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(),Wz(this,Pz,xz(this.hotMenu)),Wz(this,Dz,function(t,e=[]){const o=[];function n(t,e){r(e).addShortcuts(t,{group:Mz})}function i(t,e){const i=r(e);t.forEach(({keys:t})=>{t.forEach(t=>i.removeShortcutsByKeys(t))}),o.push({shortcuts:t,contextName:e??Mz}),n(t,e)}function s(t){return t?`${Tz}:${t}`:Tz}function r(e){const o=t.hotMenu.getShortcutManager(),n=s(e);return o.getContext(n)??o.addContext(n)}return n(function(t){const e=t.hot,o=t.hotMenu,n=e.getShortcutManager().getContext("grid");return[{keys:[["Control/Meta","A"]],...n?{forwardToContext:n}:{},callback:()=>t.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(o,n)=>{const i=e.getSettings(),s="function"==typeof i.tabMoves?i.tabMoves(o):i.tabMoves;s&&(n?.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=o?.getSelectedActive();if(e){const o=t.openSubMenu(e[0]);o&&o.getNavigator()?.toFirstItem()}}},{keys:[[e.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{const e=o?.getSelectedActive();e&&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 n=o?.getSelectedActive();if(n)if(o?.getSourceDataAtRow(n[0])?.submenu){const e=t.openSubMenu(n[0]);e&&e.getNavigator()?.toFirstItem()}else t.executeCommand(e),t.close(!0)}},{keys:[["PageUp"]],callback:()=>{const e=o?.getSelectedActive();e?o?.selection.transformStart(-o.countVisibleRows(),0):t.getNavigator()?.toFirstItem()}},{keys:[["PageDown"]],callback:()=>{const e=o?.getSelectedActive();e?o?.selection.transformStart(o.countVisibleRows(),0):t.getNavigator()?.toLastItem()}}]}(t)),e.forEach(({shortcuts:t,contextName:e})=>{i(t,e)}),{addCustomShortcuts:i,getCustomShortcuts:function(){return[...o]},getContext:r,listen:function(e){t.hotMenu.getShortcutManager().setActiveContextName(s(e))}}}(this)),_z(this,Dz).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(_z(this,Pz).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,Wz(this,zz,null),Wz(this,Bz,null),Oz(this,jz,Qz).call(this),null!==_z(this,Fz)&&(this.hot.rootWindow.cancelAnimationFrame(_z(this,Fz)),Wz(this,Fz,null)),Wz(this,Vz,!1),this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const t=this.parentMenu.hotMenu.getSelectedActive();if(t){const e=this.parentMenu.hotMenu.getCell(t[0],0);e&&mo(e,[O(!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 go(t,"htSubmenu")}(e))return!1;const o=Oz(this,qz,Jz).call(this,t),n=new Kz(this.hot,{parent:this,name:"function"==typeof o.name?o.name.call(this.hot):o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(o.submenu.items),n.open(),n.setPosition(e.getBoundingClientRect(),()=>e.isConnected?e.getBoundingClientRect():null),this.hotSubMenus[o.key]=n,this.hot.getSettings().ariaTags&&mo(e,[O(!0)]),n}closeSubMenu(t){const e=Oz(this,qz,Jz).call(this,t),o=this.hotSubMenus[e.key];if(o){o.destroy(),delete this.hotSubMenus[e.key];const n=this.hotMenu.getCell(t,0);n&&this.hot.getSettings().ariaTags&&mo(n,[O(!1)])}}closeAllSubMenus(){$(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 o=this.hot.getSelectedRange(),n=o?function(t){return F(t,t=>({start:t.getTopStartCorner(),end:t.getBottomEndCorner()}))}(o):[];this.runLocalHooks("executeCommand",e.key,n,t),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",e.key,n,t)}isCommandPassive(t){return!1===t.isCommand||yz(t)||Sz(t,this.hot)||Cz(t)}setOffset(t,e=0){this.positioner.setOffset(t,e)}setPosition(t,e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(t),Wz(this,zz,e??null),Oz(this,Gz,tB).call(this)}updateMenuDimensions(){const{wtTable:t}=this.hotMenu.view._wt,e=this.hotMenu.getSettings().data,o=t.hider.style,n=t.holder.style,i=parseInt(o.width,10),s=B(e??[],(t,e,o)=>{const n=this.hotMenu.getCell(o,0),i=n?Lo(n):0;return t+(function(t){return"object"==typeof t&&null!==t&&"name"in t}(e)&&e.name===iL?1:i)},0);n.width=`${i}px`,n.height=`${s}px`,o.height=n.height}createContainer(t=null){const e=this.options.container,o=e.ownerDocument;let n=t,i=null;return n&&(n=n.replace(/[^A-Za-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,i=o.querySelector(`.${this.options.className}.${n}`)),i||(i=o.createElement("div"),po(i,`htMenu handsontable ${this.options.className}`),n&&po(i,n),e.appendChild(i)),i}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&mo(this.hotMenu.rootElement,[["role","menu"],b(-1)])}onDocumentMouseDown(t){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!lo(no(t),this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||lo(no(t),".htMenu")||this.close(!0))}onDocumentScroll(t){this.isOpened()&&null!==_z(this,Bz)&&en(t.target)&&!lo(t.target,".htMenu")&&Oz(this,Yz,eB).call(this,t.target)}onDocumentContextMenu(t){this.isOpened()&&go(no(t),"htCore")&&lo(no(t),this.hotMenu.rootElement)&&t.preventDefault()}constructor(t,e){Nz(this,Uz),Nz(this,jz),Nz(this,qz),Nz(this,Gz),Nz(this,Yz),Nz(this,Xz),Az(this,Pz,{writable:!0,value:void 0}),Az(this,Dz,{writable:!0,value:void 0}),Az(this,Lz,{writable:!0,value:void 0}),Az(this,zz,{writable:!0,value:void 0}),Az(this,Bz,{writable:!0,value:void 0}),Az(this,Vz,{writable:!0,value:void 0}),Az(this,Fz,{writable:!0,value:void 0}),Az(this,$z,{writable:!0,value:void 0}),this.hotMenu=null,this.hotSubMenus={},this.menuItems=null,this.origOutsideClickDeselects=void 0,Wz(this,Pz,null),Wz(this,Dz,null),Wz(this,zz,null),Wz(this,Bz,null),Wz(this,Vz,!1),Wz(this,Fz,null),Wz(this,$z,[]),this.hot=t,this.options={parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootPortalElement,...e},this.container=this.createContainer(this.options.name),this.positioner=new bz(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.eventManager=new _i(this),this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(...t)=>this.parentMenu.runLocalHooks("afterSelectionChange",...t)),this.hot.addHook("afterSetTheme",(t,e)=>{if(this.options.container!==this.hot.rootPortalElement){const e=this.options.container;fo(e,/ht-theme-.*/g),po(e,t)}e||this.close()})}}function Zz(){Oz(this,jz,Qz).call(this);let t=this.hot.rootWindow;for(;t;)_z(this,$z).push(this.eventManager.addEventListener(t.document,"scroll",t=>this.onDocumentScroll(t),{capture:!0,passive:!0})),t=io(t)}function Qz(){_z(this,$z).forEach(t=>t()),_z(this,$z).length=0}function Jz(t){const e=this.hotMenu?.getSourceDataAtRow(t);return e||null}function tB(){var t;const e=this.container.getBoundingClientRect(),o=(null===(t=_z(this,zz))||void 0===t?void 0:t.call(this))??this.hot.rootElement.getBoundingClientRect();Wz(this,Bz,{offsetLeft:e.left-o.left,offsetTop:e.top-o.top})}function eB(t){let e;if(_z(this,zz))e=_z(this,zz).call(this);else{if(t===this.hot.rootElement||lo(t,this.hot.rootElement))return void this.close(!0);e=this.hot.rootElement.getBoundingClientRect()}if(null===e)return void this.close(!0);const{offsetLeft:o,offsetTop:n}=_z(this,Bz),i=this.container.getBoundingClientRect(),s=e.left+o-i.left,r=e.top+n-i.top;0===s&&0===r||(this.container.style.left=`${(Number.parseFloat(this.container.style.left)||0)+s}px`,this.container.style.top=`${(Number.parseFloat(this.container.style.top)||0)+r}px`,Oz(this,Xz,oB).call(this))}function oB(){Wz(this,Vz,!0),null!==_z(this,Fz)&&this.hot.rootWindow.cancelAnimationFrame(_z(this,Fz)),Wz(this,Fz,this.hot.rootWindow.requestAnimationFrame(()=>{Wz(this,Fz,this.hot.rootWindow.requestAnimationFrame(()=>{Wz(this,Vz,!1),Wz(this,Fz,null)}))}))}function nB(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,nB(t,e,"get"))}function sB(t,e,o){!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,o)}function rB(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,nB(t,e,"set"),o),o}be(Kz,Wh);const lB="contextMenu",aB=lB;Qn.getSingleton().register("afterContextMenuDefaultOptions"),Qn.getSingleton().register("beforeContextMenuShow"),Qn.getSingleton().register("afterContextMenuShow"),Qn.getSingleton().register("afterContextMenuHide"),Qn.getSingleton().register("afterContextMenuExecute");var hB=new WeakMap,cB=new WeakMap,dB=new WeakMap;class uB extends pW{static get PLUGIN_KEY(){return lB}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get SEPARATOR(){return{name:iL}}static get DEFAULT_ITEMS(){return[gL,pL,iL,lL,aL,iL,uL,dL,iL,mL,cL,iL,hL,iL,sL]}isEnabled(){return!!this.hot.getSettings()[lB]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[lB],e="object"!=typeof t||null===t||Array.isArray(t)?null:t;e&&"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.menu=new Kz(this.hot,{className:"htContextMenu",keepInViewport:!0,container:e?.uiContainer||this.hot.rootPortalElement}),this.menu.addLocalHook("afterOpen",iB(this,cB)),this.menu.addLocalHook("afterClose",iB(this,dB)),this.menu.addLocalHook("executeCommand",(...t)=>{this.executeCommand.call(this,...t)}),this.addHook("afterOnCellContextMenu",iB(this,hB)),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 t=this.hot.getSelectedRangeActive();if(!t)return;const{highlight:e}=t;if(null===e.row||null===e.col)return;this.hot.scrollToFocusedCell();const o=this.hot.getCell(e.row,e.col,!0);if(!o)return;const n=o.getBoundingClientRect(),i=nL(this.menu.container,this.hot.rootDocument);this.open({left:n.left+i.left,top:n.top+i.top-1+n.height},{left:n.width,above:-n.height},()=>{const t=this.hot.getCell(e.row,e.col,!0);return t?t.getBoundingClientRect():null}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return!!t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:aB})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(aB)}open(t,e={above:0,below:0,left:0,right:0},o){this.menu?.isOpened()||(this.hot.runHooks("beforeContextMenuShow",this),this.prepareMenuItems(),this.menu.open(),ke(e,(t,e)=>{this.menu.setOffset(e,t)}),this.menu.setPosition(t,o))}close(){this.menu?.close(),this.itemsFactory=null}executeCommand(t,...e){null===this.itemsFactory&&this.prepareMenuItems(),this.commandExecutor.execute(t,...e)}prepareMenuItems(){this.itemsFactory=new lz(this.hot,uB.DEFAULT_ITEMS);const t=this.hot.getSettings()[lB],e={items:this.itemsFactory.getItems(t)};this.hot.runHooks("afterContextMenuDefaultOptions",e),this.itemsFactory.setPredefinedItems(e.items);const o=this.itemsFactory.getItems(t);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),$(o,t=>{this.commandExecutor.registerCommand(String(t.key??""),t)})}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}constructor(...t){super(...t),sB(this,hB,{writable:!0,value:void 0}),sB(this,cB,{writable:!0,value:void 0}),sB(this,dB,{writable:!0,value:void 0}),this.commandExecutor=new rz(this.hot),this.itemsFactory=null,this.menu=null,rB(this,hB,t=>{const e=this.hot.getSettings(),o=e.rowHeaders,n=e.colHeaders;const i=no(t);if(this.close(),go(i,"handsontableInput"))return;if(t.preventDefault(),t.stopPropagation(),!o&&!n&&!(function(t){const e=t.parentNode;return"TD"===t.nodeName||en(e)&&"TD"===e.nodeName}(i)||go(i,"current")&&go(i,"wtBorder")))return;const s=nL(this.menu.container,this.hot.rootDocument),r=i.closest("td, th");let l;if(r){const t=this.hot.getCoords(r);if(t&&null!==t.row&&null!==t.col){const{row:e,col:o}=t;l=()=>{const t=this.hot.getCell(e,o,!0);return t?t.getBoundingClientRect():null}}}this.open({top:t.clientY+s.top,left:t.clientX+s.left},void 0,l)}),rB(this,cB,()=>{this.hot.runHooks("afterContextMenuShow",this)}),rB(this,dB,()=>{this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)})}}class gB{setData(t,e){this.data[t]=e}getData(t){return this.data[t]||void 0}constructor(){this.data={}}}class pB{preventDefault(){}composedPath(){return[]}constructor(){this.clipboardData=new gB}}function fB(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mB(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function wB(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,mB(t,e,"get"))}function bB(t,e,o){fB(t,e),e.set(t,o)}function vB(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,mB(t,e,"set"),o),o}function CB(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function yB(t,e){fB(t,e),e.add(t)}var SB=new WeakMap,kB=new WeakMap,RB=new WeakMap,EB=new WeakMap,xB=new WeakMap,MB=new WeakMap,TB=new WeakSet,HB=new WeakSet;class IB{setSelectedRange(t){vB(this,SB,t)}getCellsRange(){if(0===wB(this,kB).call(this)||0===wB(this,RB).call(this))return null;const{row:t,col:e}=wB(this,SB).getTopStartCorner(),{row:o,col:n}=wB(this,SB).getBottomEndCorner();if(null===t||null===e||null===o||null===n)return null;const i=CB(this,HB,AB).call(this,t,o),s=CB(this,TB,_B).call(this,e,n);return{isRangeTrimmed:o!==i||n!==s,startRow:t,startCol:e,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===wB(this,RB).call(this)||0===wB(this,MB).call(this))return null;const{col:t}=wB(this,SB).getTopStartCorner(),{col:e}=wB(this,SB).getBottomEndCorner();if(null===t||null===e)return null;const o=CB(this,TB,_B).call(this,t,e);return{isRangeTrimmed:e!==o,startRow:-1,startCol:t,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===wB(this,RB).call(this)||0===wB(this,MB).call(this))return null;const{col:t}=wB(this,SB).getTopStartCorner(),{col:e}=wB(this,SB).getBottomEndCorner();if(null===t||null===e)return null;const o=CB(this,TB,_B).call(this,t,e);return{isRangeTrimmed:e!==o,startRow:-wB(this,MB).call(this),startCol:t,endRow:-1,endCol:o}}constructor({countRows:t,countColumns:e,rowsLimit:o,columnsLimit:n,countColumnHeaders:i}){yB(this,TB),yB(this,HB),bB(this,SB,{writable:!0,value:void 0}),bB(this,kB,{writable:!0,value:void 0}),bB(this,RB,{writable:!0,value:void 0}),bB(this,EB,{writable:!0,value:void 0}),bB(this,xB,{writable:!0,value:void 0}),bB(this,MB,{writable:!0,value:void 0}),vB(this,kB,t),vB(this,RB,e),vB(this,EB,o),vB(this,xB,n),vB(this,MB,i)}}function _B(t,e){return Math.min(e,Math.max(t+wB(this,xB).call(this)-1,t))}function AB(t,e){return Math.min(e,Math.max(t+wB(this,EB).call(this)-1,t))}function WB(t){const e=[],o=[],n=new Set,i=new Set;return $(t,t=>{const s=t;as(Math.min(s.startRow,s.endRow),Math.max(s.startRow,s.endRow),t=>{n.has(t)||(n.add(t),e.push(t))});as(Math.min(s.startCol,s.endCol),Math.max(s.startCol,s.endCol),t=>{i.has(t)||(i.add(t),o.push(t))})}),{rows:e,columns:o}}function OB(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function NB(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function PB(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,NB(t,e,"get"))}function DB(t,e,o){OB(t,e),e.set(t,o)}function LB(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,NB(t,e,"set"),o),o}function zB(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function BB(t,e){OB(t,e),e.add(t)}Qn.getSingleton().register("afterCopyLimit"),Qn.getSingleton().register("modifyCopyableRange"),Qn.getSingleton().register("beforeCut"),Qn.getSingleton().register("afterCut"),Qn.getSingleton().register("beforePaste"),Qn.getSingleton().register("afterPaste"),Qn.getSingleton().register("beforeCopy"),Qn.getSingleton().register("afterCopy");const VB="copyPaste",FB=["fragmentSelection"],$B="application/ht-source-data-json-html",UB=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var jB=new WeakMap,qB=new WeakMap,GB=new WeakMap,YB=new WeakMap,XB=new WeakMap,KB=new WeakMap,ZB=new WeakMap,QB=new WeakMap,JB=new WeakMap,tV=new WeakSet,eV=new WeakSet,oV=new WeakSet,nV=new WeakSet,iV=new WeakSet,sV=new WeakSet,rV=new WeakSet,lV=new WeakMap,aV=new WeakMap,hV=new WeakMap,cV=new WeakMap,dV=new WeakMap,uV=new WeakMap;class gV extends pW{static get PLUGIN_KEY(){return VB}static get SETTING_KEYS(){return[VB,...FB]}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()[VB]}enablePlugin(){if(this.enabled)return;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"),LB(this,jB,this.getSetting("copyColumnHeaders")),LB(this,qB,this.getSetting("copyColumnGroupHeaders")),LB(this,GB,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=this.getSetting("uiContainer")??this.uiContainer,this.addHook("afterContextMenuDefaultOptions",PB(this,lV)),this.addHook("afterSelection",PB(this,aV)),this.addHook("afterSelectionEnd",PB(this,hV));const t=t=>e=>{PB(this,XB).has(e)||(PB(this,XB).add(e),t(e))},e=e=>{this.eventManager.addEventListener(e,"copy",t(t=>this.onCopy(t))),this.eventManager.addEventListener(e,"cut",t(t=>this.onCut(t))),this.eventManager.addEventListener(e,"paste",t(t=>this.onPaste(t)))};e(this.hot.rootDocument),e(this.hot.rootElement);const o=this.hot.rootElement.getRootNode();nn(o)&&e(o),Ve()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",PB(this,cV)),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",PB(this,dV)),this.addHook("afterSelection",PB(this,uV))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(t="cells-only"){LB(this,YB,t),LB(this,KB,!0),zB(this,tV,pV).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(){LB(this,ZB,!0),zB(this,tV,pV).call(this,"cut")}getRangedCopyableData(t){return VC(this.getRangedData(t))}getRangedData(t,e=!1){const o=[],{rows:n,columns:i}=WB(t);return $(n,t=>{const n=[];$(i,o=>{if(t<0)n.push(this.hot.getColHeader(o,t));else{let i=e?this.hot.getCopyableSourceData(t,o):this.hot.getCopyableData(t,o);e&&(Ce(i)||Array.isArray(i))&&(i=JSON.stringify(i)),n.push(i)}}),o.push(n)}),o}paste(t="",e=t){if(!t&&!e)return;const o=new pB;t&&o.clipboardData.setData("text/plain",t),e&&o.clipboardData.setData("text/html",e),this.onPaste(o)}setCopyableText(){const t=this.hot.getSelectedRangeActive();if(!t)return;if(t.isSingleHeader())return void(this.copyableRanges=[]);PB(this,QB).setSelectedRange(t);const e=new Map([["headers",null],["cells",null]]);"column-headers-only"===PB(this,YB)?e.set("headers",PB(this,QB).getMostBottomColumnHeadersRange()):("with-column-headers"===PB(this,YB)?e.set("headers",PB(this,QB).getMostBottomColumnHeadersRange()):"with-column-group-headers"===PB(this,YB)&&e.set("headers",PB(this,QB).getAllColumnHeadersRange()),e.set("cells",PB(this,QB).getCellsRange())),this.copyableRanges=Array.from(e.values()).filter(t=>null!==t).map(({startRow:t,startCol:e,endRow:o,endCol:n})=>({startRow:t,startCol:e,endRow:o,endCol:n})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=e.get("cells");if(null!=o&&o.isRangeTrimmed){const{startRow:t,startCol:e,endRow:n,endCol:i}=o;this.hot.runHooks("afterCopyLimit",n-t+1,i-e+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){return this.hot.getActiveEditor()?.isOpened()}populateValues({plainData:t,originalPlainData:e,sourceData:o}){if(!t.length)return[null,null,null,null];const n=this.hot.getSelectedRangeActive(),i=t.length,s=t[0].length,r=[];if(!n)return[null,null,null,null];const{row:l,col:a}=n.getTopStartCorner(),{row:h,col:c}=n.getBottomEndCorner();if(null===l||null===a||null===h||null===c)return[null,null,null,null];let d=l,u=a,g=l,p=a;for(;r.length<i||d<=h;){const{skipRowOnPaste:n,visualRow:l}=this.hot.getCellMeta(d,a);if(d=l+1,!0===n)continue;g=l,u=a;const h=[],f=r.length%i;for(;h.length<s||u<=c;){const{skipColumnOnPaste:n,visualCol:i,parsePastedValue:r}=this.hot.getCellMeta(l,u);this.hot.getSourceDataAtCell(l,u);const a=h.length%s;if(u=i+1,!0===n)continue;p=i;const c=o?.[f]?.[a],d=e?.[f]?.[a];let g=t[f][a];if(r&&o&&kn(c)&&g===d){g=JSON.parse(c)}h.push(g)}r.push(h)}return LB(this,JB,!0),this.hot.populateFromArray(l,a,r,void 0,void 0,"CopyPaste.paste",this.pasteMode),[l,a,g,p]}onCopy(t){const e=zB(this,iV,bV).call(this,t),o=this.hot.getFocusManager().getRefocusElement(),n=en(e)&&"hotInput"in e.dataset;if(!this.hot.isListening()&&!PB(this,KB)||this.isEditorOpened()||en(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!oo(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),LB(this,KB,!1);const i=this.getRangedData(this.copyableRanges),s=this.getRangedData(this.copyableRanges,!0),r=zB(this,eV,fV).call(this,this.copyableRanges);!!this.hot.runHooks("beforeCopy",i,this.copyableRanges,r)&&(zB(this,rV,CV).call(this,t,i,s),this.hot.runHooks("afterCopy",i,this.copyableRanges,r)),LB(this,YB,"cells-only")}onCut(t){const e=zB(this,iV,bV).call(this,t),o=this.hot.getFocusManager().getRefocusElement(),n=en(e)&&"hotInput"in e.dataset;if(!this.hot.isListening()&&!PB(this,ZB)||this.isEditorOpened()||en(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!oo(e,this.hot.rootElement)))return;t.preventDefault(),this.setCopyableText(),LB(this,ZB,!1);const i=this.getRangedData(this.copyableRanges),s=this.getRangedData(this.copyableRanges,!0);!!this.hot.runHooks("beforeCut",i,this.copyableRanges)&&(zB(this,rV,CV).call(this,t,i,s),this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges))}onPaste(t){const e=zB(this,iV,bV).call(this,t),o=this.hot.getFocusManager().getRefocusElement(),n=en(e)&&"hotInput"in e.dataset;if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||en(e)&&(n&&e!==o||!n&&e!==this.hot.rootDocument.body&&!oo(e,this.hot.rootElement)))return;t.preventDefault?.();const i=zB(this,sV,vV).call(this,t),{pastedSourceData:s}=i;let{pastedData:r}=i;if("string"==typeof r&&(r=function(t){const e=[[""]];if(0===t.length)return e;let o,n=0,i=0;for(;t.length>0&&o!==t.length;)if(o=t.length,t.match(zC))t=t.replace(zC,""),n+=1,e[i][n]="";else if(t.match(DC))t=t.replace(DC,""),n=0,i+=1,e[i]=[""];else{let o="";if(t.startsWith('"')){const e=BC(t.slice(1));if(-1!==e){let n=0;const i=t.slice(1);for(;n<e;)'"'===i[n]&&'"'===i[n+1]?(o+='"',n+=2):(o+=i[n],n+=1);t=t.slice(e+2)}else{let e=0,n=!0;for(;n;){const i=t.slice(0,1);'"'===i&&(e+=1),o+=i,(0===(t=t.slice(1)).length||t.match(/^[\t\r\n]/)&&e%2==0)&&(n=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,t=>new Array(Math.floor(t.length/2)).fill('"').join(""))}}else{const e=t.match(LC);o=e?e[0]:"",t=t.slice(o.length)}e[i][n]=o}return e}(r)),void 0===r||Array.isArray(r)&&0===r.length)return;const l=pe(r);if(!1===this.hot.runHooks("beforePaste",r,this.copyableRanges))return;const[a,h,c,d]=this.populateValues({plainData:r,sourceData:s,originalPlainData:l});null!==a&&null!==h&&null!==c&&null!==d&&this.hot.selectCell(a,h,Math.min(this.hot.countRows()-1,c),Math.min(this.hot.countCols()-1,d)),this.hot.runHooks("afterPaste",r,this.copyableRanges)}destroy(){super.destroy()}constructor(...t){super(...t),BB(this,tV),BB(this,eV),BB(this,oV),BB(this,nV),BB(this,iV),BB(this,sV),BB(this,rV),DB(this,jB,{writable:!0,value:void 0}),DB(this,qB,{writable:!0,value:void 0}),DB(this,GB,{writable:!0,value:void 0}),DB(this,YB,{writable:!0,value:void 0}),DB(this,XB,{writable:!0,value:void 0}),DB(this,KB,{writable:!0,value:void 0}),DB(this,ZB,{writable:!0,value:void 0}),DB(this,QB,{writable:!0,value:void 0}),DB(this,JB,{writable:!0,value:void 0}),DB(this,lV,{writable:!0,value:void 0}),DB(this,aV,{writable:!0,value:void 0}),DB(this,hV,{writable:!0,value:void 0}),DB(this,cV,{writable:!0,value:void 0}),DB(this,dV,{writable:!0,value:void 0}),DB(this,uV,{writable:!0,value:void 0}),this.columnsLimit=1/0,this.rowsLimit=1/0,this.pasteMode="overwrite",this.uiContainer=this.hot.rootDocument.body,LB(this,jB,!1),LB(this,qB,!1),LB(this,GB,!1),LB(this,YB,"cells-only"),LB(this,XB,new WeakSet),LB(this,KB,!1),LB(this,ZB,!1),LB(this,QB,new IB({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),LB(this,JB,!1),this.copyableRanges=[],LB(this,lV,t=>{var e;t.items.push({name:"---------"},(e=this,{key:"copy",name(){return this.getTranslatedPhrase(hw)},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})),PB(this,jB)&&t.items.push(function(t){return{key:"copy_with_column_headers",name(){const t=this.getSelectedRangeActive(),e=t?ds(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(cw,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)),PB(this,qB)&&t.items.push(function(t){return{key:"copy_with_column_group_headers",name(){const t=this.getSelectedRangeActive(),e=t?ds(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(dw,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)),PB(this,GB)&&t.items.push(function(t){return{key:"copy_column_headers_only",name(){const t=this.getSelectedRangeActive(),e=t?ds(t.getWidth()-1,0,1):0;return this.getTranslatedPhrase(uw,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(gw)},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))}),LB(this,aV,(t,e,o,n,i)=>{PB(this,JB)&&(i.value=!0),LB(this,JB,!1)}),LB(this,hV,()=>{this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}),LB(this,cV,()=>{zB(this,nV,wV).call(this)}),LB(this,dV,()=>{zB(this,oV,mV).call(this)}),LB(this,uV,()=>{zB(this,nV,wV).call(this)})}}function pV(t){if(Ve()){const e=this.hot.getSelectedRangeActive();if(e){const{row:o,col:n}=e.highlight;if(null!==o&&null!==n){const e=this.hot.getCell(o,n,!0);e&&function(t,e,o=!0){Jo(t,o),e(),tn(t,o)}(e,()=>{this.hot.rootDocument.execCommand(t)})}}}else this.hot.rootDocument.execCommand(t)}function fV(t){const{rows:e}=WB(t);let o=0;for(let t=0;t<e.length&&!(e[t]>=0);t++)o+=1;return{columnHeadersCount:o}}function mV(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeActive();if(t){const{row:e,col:o}=t.highlight;if(null===e||null===o)return;const n=this.hot.getCell(e,o,!0);n&&Jo(n)}}}function wV(){if(this.hot.isListening()){const t=this.hot.getSelectedRangeActive();if(t){const{row:e,col:o}=t.highlight;if(null===e||null===o)return;const n=this.hot.getCell(e,o,!0);n?.hasAttribute("contenteditable")&&tn(n)}}}function bV(t){const e=t.composedPath();if(e.some(t=>nn(t)))return e[0];return("target"in t?t.target:null)??e[0]}function vV(t){let e,o;if(t&&void 0!==t.clipboardData){const n=t.clipboardData,i=Mp(this.hot,n.getData($B)??"","CopyPaste.paste.sourceData");if(i){const t=ns(i,this.hot.rootDocument);o=t?.data}const s=Mp(this.hot,n.getData("text/html")??"","CopyPaste.paste");if(s&&/(<table)|(<TABLE)/g.test(s)){const t=ns(s,this.hot.rootDocument);e=t?.data}else e=n.getData("text/plain"),"string"==typeof e&&(e=e.replace(/(\r\n|\r|\n)$/,""))}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(e=this.hot.rootWindow.clipboardData.getData("Text"));return{pastedData:e,pastedSourceData:o}}function CV(t,e,o){const n=VC(e);if(t&&t.clipboardData){const i=Qi(e),s=Qi(o);t.clipboardData.setData("text/plain",n),t.clipboardData.setData("text/html",[UB,i].join("")),t.clipboardData.setData($B,[UB,s].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n)}function yV(t,e){return`border_row${t}col${e}`}function SV(t,e,o){return t>=e?t+o:t}function kV(t,e,o){return t>=e+o?t-o:t>=e?-1:t}function RV(t,e,o,n,i,s){return!(t<0||t>=s)&&(t<n||t>=s-i||t>=e&&t<=o)}function EV(t){const e=t;return(At(e.start)||At(e.left))&&(e.start=e.start??e.left),(At(e.end)||At(e.right))&&(e.end=e.end??e.right),delete e.left,delete e.right,t}function xV(t){const e=t;return At(e.start)&&(e.left=e.start),At(e.end)&&(e.right=e.end),t}function MV(t,e){return{id:yV(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 TV(t,e,o){Te(e,o)&&At(e[o])&&(e[o]?(Ce(e[o])||(e[o]={width:1,color:"#000"}),t[o]=e[o]):(e[o]={hide:!0},t[o]=e[o]))}function HV(t,e){let o=!1;return $(t.getSelectedRange()??[],n=>{n.forAll((n,i)=>{if(n<0||i<0)return;const s=t.getCellMeta(n,i).borders;if(s){if(!e)return o=!0,!1;{const t=s;if(!Te(t[e],"hide")||!1===t[e].hide)return o=!0,!1}}})}),o}function IV(t){return`<span class="selected">${String.fromCharCode(10003)}</span>${t}`}const _V=new Map([["left","start"],["right","end"]]);function AV(t){return{key:"borders:bottom",name(){let t=this.getTranslatedPhrase(Pw);return HV(this,"bottom")&&(t=IV(t)),t},callback(e,o){const n=HV(this,"bottom");t.prepareBorder(o,"bottom",n)}}}function WV(t){const e=t.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let t=this.getTranslatedPhrase(Dw);return HV(this,e)&&(t=IV(t)),t},callback(o,n){const i=HV(this,e);t.prepareBorder(n,e,i)}}}function OV(t){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Lw)},callback(e,o){t.prepareBorder(o,"noBorders",void 0)},disabled(){return!HV(this)}}}function NV(t){const e=t.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let t=this.getTranslatedPhrase(Nw);return HV(this,e)&&(t=IV(t)),t},callback(o,n){const i=HV(this,e);t.prepareBorder(n,e,i)}}}function PV(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DV(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function LV(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,DV(t,e,"get"))}function zV(t,e,o){PV(t,e),e.set(t,o)}function BV(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,DV(t,e,"set"),o),o}function VV(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function FV(t,e){PV(t,e),e.add(t)}const $V="customBorders";function UV(t){return"object"==typeof t&&null!==t}function jV(t){return UV(t)&&"string"==typeof t.id&&"number"==typeof t.row&&"number"==typeof t.col}function qV(t){return UV(t)&&"number"==typeof t.row&&"number"==typeof t.col}const GV=["dashed","dotted","solid"],YV=5e3;var XV=new WeakMap,KV=new WeakMap,ZV=new WeakMap,QV=new WeakMap,JV=new WeakMap,tF=new WeakMap,eF=new WeakMap,oF=new WeakMap,nF=new WeakMap,iF=new WeakMap,sF=new WeakMap,rF=new WeakMap,lF=new WeakMap,aF=new WeakMap,hF=new WeakSet,cF=new WeakSet,dF=new WeakSet,uF=new WeakSet,gF=new WeakSet,pF=new WeakSet,fF=new WeakSet,mF=new WeakSet,wF=new WeakSet,bF=new WeakSet,vF=new WeakSet,CF=new WeakSet,yF=new WeakSet,SF=new WeakSet,kF=new WeakSet,RF=new WeakSet,EF=new WeakSet,xF=new WeakSet,MF=new WeakSet,TF=new WeakSet,HF=new WeakSet,IF=new WeakSet,_F=new WeakSet,AF=new WeakSet,WF=new WeakSet,OF=new WeakMap,NF=new WeakMap,PF=new WeakSet,DF=new WeakMap,LF=new WeakSet,zF=new WeakMap,BF=new WeakMap,VF=new WeakMap,FF=new WeakMap,$F=new WeakMap,UF=new WeakMap,jF=new WeakMap,qF=new WeakMap,GF=new WeakMap,YF=new WeakMap,XF=new WeakMap,KF=new WeakMap;class ZF extends pW{static get PLUGIN_KEY(){return $V}static get PLUGIN_PRIORITY(){return 90}static get SETTING_KEYS(){return[$V,"customBordersProgressive"]}isEnabled(){return!!this.hot.getSettings()[$V]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>VV(this,AF,y$).call(this,t)),this.addHook("init",()=>VV(this,WF,S$).call(this)),this.addHook("beforeCreateRow",LV(this,zF)),this.addHook("afterCreateRow",LV(this,$F)),this.addHook("beforeRemoveRow",LV(this,BF)),this.addHook("afterRemoveRow",LV(this,UF)),this.addHook("beforeCreateCol",LV(this,VF)),this.addHook("afterCreateCol",LV(this,jF)),this.addHook("beforeRemoveCol",LV(this,FF)),this.addHook("afterRemoveCol",LV(this,qF)),this.addHook("beforeRowMove",LV(this,GF)),this.addHook("afterRowMove",LV(this,YF)),this.addHook("beforeColumnMove",LV(this,XF)),this.addHook("afterColumnMove",LV(this,KF)),this.addHook("beforeViewRender",LV(this,OF)),this.addHook("afterSetCellMeta",LV(this,NF)),this.addHook("afterRemoveCellMeta",LV(this,DF)),super.enablePlugin())}disablePlugin(){VV(this,xF,f$).call(this),this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(t,e){let o=["top","bottom","start","end"],n=null;e&&(this.checkSettingsCohesion([e]),o=Object.keys(e),n=EV(e));const i=pC(gC(t),{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});$(t,t=>{i(t).forAll((t,e)=>($(o,o=>{var i;this.prepareBorderFromCustomAdded(t,e,n,(i=o,_V.get(i)??i))}),!0))}),this.hot.render()}getBorders(t){if(!Array.isArray(t))return this.savedBorders;const e=pC(gC(t),{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),o=[];return $(t,t=>{e(t).forAll((t,e)=>($(this.savedBorders,n=>{n.row===t&&n.col===e&&o.push(xV(n))}),!0))}),o}clearBorders(t){t?this.setBorders(t):(VV(this,gF,o$).call(this),this.hot.render())}insertBorderIntoSettings(t,e){this.checkSavedBorders(t)||(this.savedBorders.push(t),LV(this,XV).set(t.id,this.savedBorders.length-1)),VV(this,fF,i$).call(this,t),VV(this,_F,C$).call(this,t.id)}prepareBorderFromCustomAdded(t,e,o,n){const i=this.hot.countRows(),s=this.hot.countCols();if(t>=i||e>=s)return;let r=MV(t,e);if(o){const n=VV(this,hF,QF).call(this,t,e);jV(n)&&(r=EV(pe(n)),r.row=t,r.col=e,r.id=yV(t,e)),l=r,Te(a=o,"border")&&a.border&&(l.border=a.border),TV(l,a,"top"),TV(l,a,"bottom"),TV(l,a,"start"),TV(l,a,"end"),r=l}var l,a;4!==this.countHide(r)?VV(this,cF,JF).call(this,t,e,xV(r))&&this.insertBorderIntoSettings(r,n):this.removeAllBorders(t,e)}prepareBorderFromCustomAddedRange(t,e){const o=Math.min(t.to.row,this.hot.countRows()-1),n=Math.min(t.to.col,this.hot.countCols()-1);as(t.from.row,o,o=>{as(t.from.col,n,n=>{const{border:i,add:s}=VV(this,dF,t$).call(this,o,n,e,t);s>0&&VV(this,cF,JF).call(this,o,n,xV(i))&&this.insertBorderIntoSettings(i,void 0)})})}removeAllBorders(t,e){if(!VV(this,cF,JF).call(this,t,e,null))return;const o=yV(t,e);this.spliceBorder(o),VV(this,mF,s$).call(this,t,o),VV(this,_F,C$).call(this,o)}setBorder(t,e,o,n){const i=this.hot.getCellMeta(t,e).borders;let s;if(s=jV(i)?EV(i):MV(t,e),n){s[o]={hide:!0};4===this.countHide(s)?this.removeAllBorders(t,e):VV(this,cF,JF).call(this,t,e,xV(s))&&this.insertBorderIntoSettings(s,void 0)}else s[o]={width:1,color:"#000"},VV(this,cF,JF).call(this,t,e,xV(s))&&this.insertBorderIntoSettings(s,void 0)}prepareBorder(t,e,o){$(t,t=>{if(!qV(t.start)||!qV(t.end))return;const{start:n,end:i}={start:t.start,end:t.end};if(n.row===i.row&&n.col===i.col)"noBorders"===e?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,e,o);else switch(e){case"noBorders":as(n.col,i.col,t=>{as(n.row,i.row,e=>{this.removeAllBorders(e,t)})});break;case"top":as(n.col,i.col,t=>{this.setBorder(n.row,t,e,o)});break;case"bottom":as(n.col,i.col,t=>{this.setBorder(i.row,t,e,o)});break;case"start":as(n.row,i.row,t=>{this.setBorder(t,n.col,e,o)});break;case"end":as(n.row,i.row,t=>{this.setBorder(t,i.col,e,o)})}}),this.hot.render()}createCustomBorders(t){const e=null===LV(this,JV),o=LV(this,tF);e&&BV(this,JV,new Set),BV(this,tF,!0);try{$(t,t=>{const e=EV(t);e.range?this.prepareBorderFromCustomAddedRange(e.range,e):this.prepareBorderFromCustomAdded(e.row??0,e.col??0,e,void 0)})}finally{BV(this,tF,o),e&&BV(this,JV,null)}}countHide(t){const{top:e,bottom:o,start:n,end:i}=t;return B([e,o,n,i],(t,e)=>{let o=t;return e&&e.hide&&(o+=1),o},0)}hideBorders(){VV(this,uF,e$).call(this)}spliceBorder(t){const e=LV(this,XV).get(t)??-1;e>-1&&(this.savedBorders.splice(e,1),VV(this,vF,a$).call(this))}checkSavedBorders(t){let e=!1;if(4===this.countHide(t))this.spliceBorder(t.id),e=!0;else{const o=LV(this,XV).get(t.id);void 0!==o&&(this.savedBorders[o]=t,e=!0)}return e}changeBorderSettings(t=!0){const e=this.hot.getSettings()[$V];if(Array.isArray(e)){const o=pe(e.filter(UV));this.checkSettingsCohesion(o),VV(this,gF,o$).call(this);const n=VV(this,CF,h$).call(this);if(n.enabled&&o.length>0)return VV(this,yF,c$).call(this,o,n.chunkSize),void(t&&this.hot.render());this.createCustomBorders(o)}else void 0!==e&&this.createCustomBorders(this.savedBorders);t&&this.hot.render(),this.hot.runHooks("afterCustomBordersUpdate")}checkSettingsCohesion(t){const e=t.some(t=>At(t.left)||At(t.right));const o=function(t){return t.some(t=>At(t.start)||At(t.end))}(t);e&&o&&ce('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".'),this.hot.isRtl()&&e&&ce('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".'),VV(this,MF,m$).call(this,t)}destroy(){VV(this,xF,f$).call(this),this.savedBorders=[],LV(this,XV).clear(),LV(this,ZV).clear(),LV(this,KV).clear(),BV(this,lF,null),BV(this,aF,null),super.destroy()}constructor(...t){super(...t),FV(this,hF),FV(this,cF),FV(this,dF),FV(this,uF),FV(this,gF),FV(this,pF),FV(this,fF),FV(this,mF),FV(this,wF),FV(this,bF),FV(this,vF),FV(this,CF),FV(this,yF),FV(this,SF),FV(this,kF),FV(this,RF),FV(this,EF),FV(this,xF),FV(this,MF),FV(this,TF),FV(this,HF),FV(this,IF),FV(this,_F),FV(this,AF),FV(this,WF),FV(this,PF),FV(this,LF),zV(this,XV,{writable:!0,value:void 0}),zV(this,KV,{writable:!0,value:void 0}),zV(this,ZV,{writable:!0,value:void 0}),zV(this,QV,{writable:!0,value:void 0}),zV(this,JV,{writable:!0,value:void 0}),zV(this,tF,{writable:!0,value:void 0}),zV(this,eF,{writable:!0,value:void 0}),zV(this,oF,{writable:!0,value:void 0}),zV(this,nF,{writable:!0,value:void 0}),zV(this,iF,{writable:!0,value:void 0}),zV(this,sF,{writable:!0,value:void 0}),zV(this,rF,{writable:!0,value:void 0}),zV(this,lF,{writable:!0,value:void 0}),zV(this,aF,{writable:!0,value:void 0}),zV(this,OF,{writable:!0,value:void 0}),zV(this,NF,{writable:!0,value:void 0}),zV(this,DF,{writable:!0,value:void 0}),zV(this,zF,{writable:!0,value:void 0}),zV(this,BF,{writable:!0,value:void 0}),zV(this,VF,{writable:!0,value:void 0}),zV(this,FF,{writable:!0,value:void 0}),zV(this,$F,{writable:!0,value:void 0}),zV(this,UF,{writable:!0,value:void 0}),zV(this,jF,{writable:!0,value:void 0}),zV(this,qF,{writable:!0,value:void 0}),zV(this,GF,{writable:!0,value:void 0}),zV(this,YF,{writable:!0,value:void 0}),zV(this,XF,{writable:!0,value:void 0}),zV(this,KF,{writable:!0,value:void 0}),this.savedBorders=[],BV(this,XV,new Map),BV(this,KV,new Map),BV(this,ZV,new Map),BV(this,QV,!0),BV(this,JV,null),BV(this,tF,!1),BV(this,eF,!1),BV(this,oF,!1),BV(this,nF,null),BV(this,iF,0),BV(this,sF,YV),BV(this,rF,0),BV(this,lF,null),BV(this,aF,null),BV(this,OF,()=>{VV(this,wF,r$).call(this)}),BV(this,NF,(t,e,o,n)=>{!LV(this,eF)&&"borders"===o&&UV(n)&&(this.prepareBorderFromCustomAdded(t,e,EV(pe(n)),void 0),VV(this,PF,k$).call(this))}),BV(this,DF,(t,e,o)=>{if(LV(this,eF)||"borders"!==o)return;const n=yV(t,e);this.spliceBorder(n),VV(this,mF,s$).call(this,t,n),VV(this,_F,C$).call(this,n)}),BV(this,zF,(t,e,o)=>{VV(this,LF,R$).call(this,o)}),BV(this,BF,(t,e,o,n)=>{VV(this,LF,R$).call(this,n)}),BV(this,VF,(t,e,o)=>{VV(this,LF,R$).call(this,o)}),BV(this,FF,(t,e,o,n)=>{VV(this,LF,R$).call(this,n)}),BV(this,$F,(t,e,o)=>{"auto"!==o&&VV(this,TF,w$).call(this,"row",o=>SV(o,t,e))}),BV(this,UF,(t,e)=>{VV(this,TF,w$).call(this,"row",o=>kV(o,t,e))}),BV(this,jF,(t,e,o)=>{"auto"!==o&&VV(this,TF,w$).call(this,"col",o=>SV(o,t,e))}),BV(this,qF,(t,e)=>{VV(this,TF,w$).call(this,"col",o=>kV(o,t,e))}),BV(this,GF,(t,e,o,n)=>{VV(this,RF,g$).call(this),BV(this,lF,n?this.savedBorders.map(t=>this.hot.toPhysicalRow(t.row)):null)}),BV(this,YF,(t,e,o,n,i)=>{const s=LV(this,lF);BV(this,lF,null),s&&i&&VV(this,HF,b$).call(this,"row",s,t=>this.hot.toVisualRow(t))}),BV(this,XF,(t,e,o,n)=>{VV(this,RF,g$).call(this),BV(this,aF,n?this.savedBorders.map(t=>this.hot.toPhysicalColumn(t.col)):null)}),BV(this,KF,(t,e,o,n,i)=>{const s=LV(this,aF);BV(this,aF,null),s&&i&&VV(this,HF,b$).call(this,"col",s,t=>this.hot.toVisualColumn(t))})}}function QF(t,e){const o=LV(this,JV);if(null===o||!LV(this,tF))return this.hot.getCellMeta(t,e).borders;const n=`${t},${e}`,i=o.has(n);return o.add(n),i?this.hot.getCellMeta(t,e).borders:void 0}function JF(t,e,o){const n=this.hot.hasHook(null===o?"beforeRemoveCellMeta":"beforeSetCellMeta");BV(this,eF,!0);try{null===o?this.hot.removeCellMeta(t,e,"borders"):this.hot.setCellMeta(t,e,"borders",o)}finally{BV(this,eF,!1)}if(!n)return!0;const i=this.hot.getCellMetaTransient(t,e);return null===o?!Te(i,"borders"):i.borders===o}function t$(t,e,o,n){const i=VV(this,hF,QF).call(this,t,e),s=jV(i)?EV(pe(i)):MV(t,e);let r=0;const l=(t,e)=>{t&&Te(o,e)&&(s[e]=function(t,e){if(t&&Ce(t)&&Object.keys(t).length>0)return t;if(e&&Ce(e)){const t={...e};return delete t.cornerVisible,t}return t}(o[e],o.border),r+=1)};return l(t===n.from.row,"top"),l(t===n.to.row,"bottom"),l(e===n.from.col,"start"),l(e===n.to.col,"end"),UV(o.border)&&(s.border=o.border),{border:s,add:r}}function e$(){const{customSelections:t}=this.hot.selection.highlight,e=new Set(LV(this,KV).values());for(let o=t.length-1;o>=0;o--)e.has(t[o])&&(t[o].destroy(),t.splice(o,1));LV(this,KV).clear()}function o$(){VV(this,xF,f$).call(this);const t=[];$(this.savedBorders,e=>{VV(this,cF,JF).call(this,e.row,e.col,null)||t.push(e)}),this.savedBorders=t,VV(this,vF,a$).call(this),LV(this,ZV).clear(),BV(this,QV,!0),VV(this,uF,e$).call(this)}function n$(){LV(this,ZV).clear(),$(this.savedBorders,t=>{const e=LV(this,ZV).get(t.row);e?e.push(t):LV(this,ZV).set(t.row,[t])}),BV(this,QV,!1)}function i$(t){if(LV(this,QV))return;if(!LV(this,XV).has(t.id))return void VV(this,mF,s$).call(this,t.row,t.id);const e=LV(this,ZV).get(t.row);if(!e)return void LV(this,ZV).set(t.row,[t]);const o=e.findIndex(e=>e.id===t.id);-1===o?e.push(t):e[o]=t}function s$(t,e){if(LV(this,QV))return;const o=LV(this,ZV).get(t);if(!o)return;const n=o.findIndex(t=>t.id===e);-1!==n&&(o.splice(n,1),0===o.length&&LV(this,ZV).delete(t))}function r$(){LV(this,QV)&&VV(this,pF,n$).call(this);const t=this.hot.view,e=t.getFirstRenderedVisibleRow(),o=t.getLastRenderedVisibleRow(),n=t.getFirstRenderedVisibleColumn(),i=t.getLastRenderedVisibleColumn();if(null===e||null===o||null===n||null===i)return void(LV(this,KV).size>0&&VV(this,uF,e$).call(this));const s=this.hot.getSettings(),r=Number(s.fixedRowsTop)||0,l=Number(s.fixedRowsBottom)||0,a=Number(s.fixedColumnsStart)||0,h=this.hot.countRows(),c=this.hot.countCols(),d=function(t,e,o,n,i){const s=[],r=i-n,l=(t,e)=>{t<=e&&s.push([t,e])};return l(0,Math.min(o,i)-1),l(Math.max(t,o),Math.min(e,r-1)),l(Math.max(r,o),i-1),s}(e,o,r,l,h),u=new Set;$(d,([t,e])=>{for(let o=t;o<=e;o++){const t=LV(this,ZV).get(o);t&&$(t,t=>{RV(t.col,n,i,a,0,c)&&(u.add(t.id),LV(this,KV).has(t.id)||VV(this,bF,l$).call(this,t))})}}),$(Array.from(LV(this,KV).keys()),t=>{u.has(t)||VV(this,_F,C$).call(this,t)})}function l$(t){const e=this.hot._createCellCoords(t.row,t.col),o=this.hot._createCellRange(e,e,e),{customSelections:n}=this.hot.selection.highlight;this.hot.selection.highlight.addCustomSelection({border:t,visualCellRange:o}),LV(this,KV).set(t.id,n[n.length-1])}function a$(){LV(this,XV).clear(),$(this.savedBorders,(t,e)=>{LV(this,XV).set(t.id,e)})}function h$(){const t=this.hot.getSettings().customBordersProgressive;if(!0===t)return{enabled:!0,chunkSize:YV};if(UV(t)){return{enabled:!0,chunkSize:"number"==typeof t.chunkSize&&t.chunkSize>0?Math.floor(t.chunkSize):YV}}return{enabled:!1,chunkSize:YV}}function c$(t,e){BV(this,rF,LV(this,rF)+1),BV(this,nF,t),BV(this,iF,0),BV(this,sF,e),BV(this,JV,new Set),VV(this,SF,d$).call(this,LV(this,rF))}function d$(t){this.hot._registerTimeout(()=>VV(this,kF,u$).call(this,t),0)}function u$(t){if(t!==LV(this,rF)||null===LV(this,nF))return;const e=LV(this,nF),o=Math.min(LV(this,iF)+LV(this,sF),e.length);this.createCustomBorders(e.slice(LV(this,iF),o)),BV(this,iF,o),this.hot.render(),LV(this,iF)>=e.length?VV(this,EF,p$).call(this):VV(this,SF,d$).call(this,t)}function g$(){if(null===LV(this,nF))return;const t=LV(this,nF);for(;LV(this,iF)<t.length;){const e=Math.min(LV(this,iF)+LV(this,sF),t.length);this.createCustomBorders(t.slice(LV(this,iF),e)),BV(this,iF,e)}VV(this,EF,p$).call(this)}function p$(){BV(this,rF,LV(this,rF)+1),BV(this,nF,null),BV(this,iF,0),BV(this,JV,null),this.hot.runHooks("afterCustomBordersUpdate")}function f$(){null!==LV(this,nF)&&(BV(this,rF,LV(this,rF)+1),BV(this,nF,null),BV(this,iF,0),BV(this,JV,null))}function m$(t){t.forEach(t=>{Object.keys(t).forEach(e=>{const o=t[e];if(!UV(o))return;const{style:n}=o;At(n)&&"string"==typeof n&&!GV.includes(n)?(Xe(`The "${n}" border style is not supported. Please use one of the following styles: ${GV.join(", ")}.\nThe border style will be ignored.`),delete o.style):At(n)&&"solid"===n&&delete o.style})})}function w$(t,e){const o=[];$(this.savedBorders,n=>{const i=e(n[t]);-1!==i&&(n[t]=i,n.id=yV(n.row,n.col),o.push(n))}),this.savedBorders.length=0,$(o,t=>this.savedBorders.push(t)),VV(this,IF,v$).call(this,!1)}function b$(t,e,o){$(this.savedBorders,(n,i)=>{const s=e[i];if("number"!=typeof s)return;const r=o(s);"number"==typeof r&&(n[t]=r,n.id=yV(n.row,n.col))}),VV(this,IF,v$).call(this)}function v$(t=!0){VV(this,vF,a$).call(this),BV(this,QV,!0),VV(this,uF,e$).call(this),t&&this.hot.render()}function C$(t){const e=LV(this,KV).get(t);if(!e)return;const{customSelections:o}=this.hot.selection.highlight,n=o.indexOf(e);n>-1&&o.splice(n,1),e.destroy(),LV(this,KV).delete(t)}function y$(t){if(!this.hot.getSettings()[$V])return;if("object"!=typeof t||null===t)return;const e=t,{items:o}=e;var n;Array.isArray(o)&&o.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Ww)},disabled(){const t=this.getSelectedRangeActive();return!t||(!!t.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(n=this,{key:"borders:top",name(){let t=this.getTranslatedPhrase(Ow);return HV(this,"top")&&(t=IV(t)),t},callback(t,e){const o=HV(this,"top");n.prepareBorder(e,"top",o)}}),NV(this),AV(this),WV(this),OV(this)]}})}function S$(){this.changeBorderSettings(!1),this.savedBorders.length>0&&this.hot.addHookOnce("afterInit",()=>this.hot.render())}function k$(){LV(this,oF)||(BV(this,oF,!0),this.hot._registerMicrotask(()=>{BV(this,oF,!1),this.hot.render()}))}function R$(t){"auto"!==t&&VV(this,RF,g$).call(this)}const E$="dataProvider",x$={rowId:void 0,fetchRows:void 0,onRowsCreate:void 0,onRowsUpdate:void 0,onRowsRemove:void 0},M$={rowId:t=>"string"==typeof t||ln(t),fetchRows:t=>ln(t),onRowsCreate:t=>ln(t),onRowsUpdate:t=>ln(t),onRowsRemove:t=>ln(t)},T$=Object.freeze({page:1,pageSize:10,sort:null,filters:null}),H$=new Set(["edit",void 0,"CopyPaste.paste","CopyPaste.cut","Autofill.fill","ContextMenu.clearColumn","DataProvider.revert"]),I$="DataProvider: cannot send row update because `rowId` resolves to null or undefined for that row.";function _$(t){return`DataProvider: cannot remove row at visual index ${t} because \`rowId\` resolves to null or undefined.`}function A$(t,e,o){if(!1===t.runHooks("beforeRowsMutation",e,o))return!1}function W$(t,e,o){t.runHooks("afterRowsMutation",e,o)}function O$(t,e,o,n){t.runHooks("afterRowsMutationError",e,o,n)}function N$(t,e,o){return function(t,e){if(null!=e)return ln(e)?e(t):"string"==typeof e?Re(t,e):void 0}(t.getSourceDataAtRow(t.toPhysicalRow(o)),e)}function P$(t){return null==t}function D$(t,e,o){for(let n=0;n<t.countRows();n+=1)if(N$(t,e,n)===o)return n;return-1}function L$(t,e,o){const n=Object.entries(o);return 0===n.length?Promise.resolve(!0):new Promise(o=>{let i=n.length,s=!0;const r=()=>{i-=1,0===i&&o(s)};n.forEach(([o,n])=>{const i=t.propToCol(o);if(void 0===i||i<0)return void r();const l=t.getCellMeta(e,i);t.getCellValidator(l)?t.validateCell(n,l,t=>{!1===t&&!1===l.allowInvalid&&(s=!1),r()},"DataProvider.updateRows"):r()})})}async function z$(t,e,o){const{getRowIdOption:n,commitRowsUpdate:i}=e,s=new Map;o.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),l=n(),a=r.map(e=>{const{changesObj:o,rowData:n}=function(t,e){const o=e[0][0],n=t.getSourceDataAtRow(t.toPhysicalRow(o)),i=n&&"object"==typeof n&&!Array.isArray(n),s={};let r;return e.forEach(([,e,,o])=>{const n="number"==typeof e?e:t.propToCol(e),r=i?t.colToProp(n):n;s[r]=o}),Array.isArray(n)?(r=[...n],e.forEach(([,e,,o])=>{const n="number"==typeof e?e:t.propToCol(e);r[n]=o})):r=i?{...n,...s}:{...s},{changesObj:s,rowData:r}}(t,s.get(e));return{id:N$(t,l,e),changes:o,rowData:n}}),h={rows:a},c=()=>function(t,e){e?.length&&t.batch(()=>{e.forEach(([e,o,n])=>{t.setDataAtRowProp(e,o,n,"DataProvider.revert")})})}(t,o);if(a.some(t=>P$(t.id)))return c(),O$(t,"update",new Error(I$),h),eo("Row update failed:",I$),void t.render();if(!1===A$(t,"update",h))return void c();if((await Promise.all(r.map((e,o)=>L$(t,e,a[o].changes)))).some(t=>!t))return c(),O$(t,"update",new Error("Row update validation failed"),h),eo("Row update failed: validation failed for one or more cells"),void t.render();await i(a,{revertOptimistic:c})}function B$(t,e,o){const{hot:n,getOnRowsRemove:i,getRowIdOption:s,removeRows:r}=t;if(!ln(i()))return;const l=function(t,e,o,n){const i=[],s=()=>t.countRows(),r=(o,n)=>{for(let r=0;r<n;r+=1){const n=o+r;if(n>=0&&n<s()){const o=N$(t,e,n);P$(o)&&ce(_$(n)),i.push(o)}}};if(Array.isArray(o))o.forEach(([t,e])=>{const o=null==t?Math.max(0,s()-(e??1)):Math.max(0,t);r(o,e??1)});else{const t="number"==typeof n&&n>=1?n:1,e=null==o?Math.max(0,s()-t):Math.max(0,o);r(e,t)}return i}(n,s(),e,o);return 0!==l.length?(r(l),!1):void 0}function V$(t,e,o,n){return"insert_row_above"===e||"insert_row_below"===e?function(t,e,o,n){const{hot:i,getOnRowsCreate:s,getRowId:r,createRows:l}=t;if(!ln(s()))return;const a=i.countSourceRows();if(i.getSettings().maxRows===a)return;const h="insert_row_below"===e?"below":"above",c=o??("below"===h?a:0);return l({position:h,referenceRowId:"number"==typeof c&&c>=0?r(c):void 0,rowsAmount:"number"==typeof n&&n>=1?n:1}),!1}(t,e,o,n):"remove_row"===e?B$(t,o,n):void 0}function F$(t,e){if(!Array.isArray(e)||0===e.length)return null;const o=[];for(let n=0;n<e.length;n++){const i=e[n],s=t.toVisualColumn(i.column),r=t.colToProp(s);null!=r&&o.push({prop:String(r),operation:i.operation,conditions:i.conditions.map(t=>({name:t.name,args:Array.isArray(t.args)?[...t.args]:[]}))})}return 0===o.length?null:o}const $$="pagination";function U$(t,e,o){const{hot:n,getQueryPage:i,getQueryPageSize:s,setPageSize:r}=t,l=n.getPlugin($$);if(!l?.enabled)return;const a=function(t,e){return"auto"===t||"number"!=typeof t||!Number.isFinite(t)||t<1?e:t}(o,10);a===s()&&1===i()||r(a).catch(()=>{const t=n.getPlugin($$);t?.enabled&&t.revertPageSizeTo(e)})}const j$="columnSorting";function q$(t,e){!function(t,e,o){if(!t?.enabled||"function"!=typeof o)return;const n=t.getSortConfig(),i=Array.isArray(n)?n[0]:n;i&&"number"==typeof i.column?e.sort={prop:o(i.column),order:i.sortOrder}:e.sort=null}(t.getPlugin(j$),e,e=>String(t.colToProp(e)))}function G$(t,e){if("string"==typeof e){const o=e.trim();o&&t.push(o)}}function Y$(t,e){if(!t||"object"!=typeof t||Array.isArray(t))return;const o=t;G$(e,o.message),G$(e,o.error),"string"==typeof o.detail&&G$(e,o.detail)}function X$(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function K$(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Z$(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,K$(t,e,"get"))}function Q$(t,e,o){X$(t,e),e.set(t,o)}function J$(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,K$(t,e,"set"),o),o}function tU(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function eU(t,e){X$(t,e),e.add(t)}QA("dataProvider",["manualRowMove","manualColumnMove","trimRows","multiColumnSorting"]);var oU=new WeakMap,nU=new WeakMap,iU=new WeakMap,sU=new WeakSet,rU=new WeakSet,lU=new WeakSet,aU=new WeakSet,hU=new WeakSet,cU=new WeakSet,dU=new WeakSet,uU=new WeakSet,gU=new WeakSet,pU=new WeakSet,fU=new WeakSet,mU=new WeakSet,wU=new WeakSet,bU=new WeakSet,vU=new WeakSet,CU=new WeakSet,yU=new WeakSet,SU=new WeakSet,kU=new WeakMap,RU=new WeakMap,EU=new WeakMap,xU=new WeakMap,MU=new WeakMap,TU=new WeakMap,HU=new WeakMap,IU=new WeakMap,_U=new WeakMap,AU=new WeakMap;let WU=class extends pW{static get PLUGIN_KEY(){return E$}static get PLUGIN_PRIORITY(){return 950}static get SETTING_KEYS(){return[E$]}static get DEFAULT_SETTINGS(){return x$}static get SETTINGS_VALIDATORS(){return M$}isEnabled(){return!!this.hot.getSettings()[E$]}enablePlugin(){this.enabled||(tU(this,uU,VU).call(this),this.addHook("hasExternalDataSource",Z$(this,kU)),this.addHook("afterInit",Z$(this,RU)),this.addHook("modifyRowHeader",Z$(this,HU)),this.addHook("beforeColumnSort",Z$(this,TU)),this.addHook("beforeUndoStackChange",Z$(this,IU)),this.addHook("afterChange",Z$(this,_U)),this.addHook("beforeAlter",Z$(this,AU)),this.addHook("afterPageChange",Z$(this,EU)),this.addHook("afterPageSizeChange",Z$(this,xU)),this.addHook("beforeFilter",Z$(this,MU)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.hot.view&&tU(this,SU,ZU).call(this),super.updatePlugin()}disablePlugin(){tU(this,wU,qU).call(this),J$(this,oU,{...T$}),super.disablePlugin()}getQueryParameters(){return tU(this,dU,BU).call(this,Z$(this,oU))}getRowId(t){return N$(this.hot,tU(this,rU,NU).call(this),t)}async fetchData(t={}){const e=tU(this,lU,PU).call(this);if(!ln(e))return this.hot.render(),null;const o=tU(this,pU,$U).call(this,t),n=tU(this,fU,UU).call(this),{signal:i}=n;if(!1===this.hot.runHooks("beforeDataProviderFetch",o))return J$(this,nU,null),this.hot.render(),null;const s=tU(this,dU,BU).call(this,o);try{const n=await e(s,{signal:i});if(i.aborted)return tU(this,mU,jU).call(this,o,void 0),null;const r=Array.isArray(n?.rows)?n.rows:[],l="number"==typeof n?.totalRows&&n.totalRows>=0?n.totalRows:r.length,a=tU(this,dU,BU).call(this,o),h=function(t,e,o){const n="number"==typeof e&&e>=1?e:10,i=Math.max(1,Math.ceil(o/n));return Math.max(1,Math.min(t,i))}(a.page,a.pageSize,l);if(h!==a.page)return this.fetchData({...t,page:h,skipLoading:t.skipLoading});J$(this,oU,a),this.hot.loadData(r,E$);const c=function(t,e){const o=function(t,e){if(null==t||"object"!=typeof t)return null;const o=t;if("string"!=typeof o.prop)return null;const n=o.order??o.sortOrder;if("asc"!==n&&"desc"!==n)return null;if("function"!=typeof e)return null;const i=e(o.prop);return"number"!=typeof i?null:{column:i,sortOrder:n}}(e,e=>t.propToCol(e));return o&&"object"==typeof o&&"column"in o?o:[]}(this.hot,a.sort??null),d=function(t,e){if(null==e)return[];if(!Array.isArray(e)||0===e.length)return[];const o=[];for(let n=0;n<e.length;n++){const i=e[n],s=t.propToCol(i.prop);if(null==s||s<0)continue;const r=t.toPhysicalColumn(s);o.push({column:r,operation:i.operation,conditions:(i.conditions||[]).map(t=>({name:t.name??"",args:Array.isArray(t.args)?[...t.args]:[]}))})}return o}(this.hot,a.filters??null);return this.hot.runHooks("afterDataProviderFetch",{...n,rows:r,totalRows:l,queryParameters:a,columnSortConfig:c,filtersConditionsStack:d}),this.hot.render(),{rows:r,totalRows:l}}catch(t){if(i.aborted||t instanceof Error&&"AbortError"===t.name)return tU(this,mU,jU).call(this,o,t),null;throw this.hot.runHooks("afterDataProviderFetchError",t,tU(this,dU,BU).call(this,o)),tU(this,vU,YU).call(this,"fetch",t),t}finally{Z$(this,nU)===n&&J$(this,nU,null)}}async createRows(t={}){const e=tU(this,aU,DU).call(this);if(!ln(e))return;const o={position:t.position??"below",referenceRowId:t.referenceRowId,rowsAmount:t.rowsAmount??1},n={rowsCreate:o};return tU(this,yU,KU).call(this,"create",n,()=>Promise.resolve(e(o)),async()=>{await this.fetchData({skipLoading:!0})})}async removeRows(t){const e=tU(this,cU,zU).call(this);if(!ln(e))return;const o=Array.isArray(t)?t:[t];o.forEach(t=>{P$(t)&&ce("DataProvider: `removeRows` requires every id to be non-null.")});const n={rowsRemove:o};return tU(this,yU,KU).call(this,"remove",n,()=>e(o),async()=>{const t=Z$(this,oU).page,e=this.hot.countRows();if(o.length>=e&&e>=1&&t>1)return void await this.fetchData({page:t-1,skipLoading:!0});const n=await this.fetchData({skipLoading:!0});0===n?.rows.length&&t>1&&await this.fetchData({page:t-1,skipLoading:!0})})}async updateRows(t){if(!ln(tU(this,hU,LU).call(this))||!Array.isArray(t)||0===t.length)return;t.forEach(t=>{P$(t.id)&&ce("DataProvider: `updateRows` requires every entry to include a non-null `id`.")});const e=function(t,e,o){return o.map(o=>{const n=D$(t,e,o.id);let i;return i=n>=0?t.getSourceDataAtRow(t.toPhysicalRow(n)):void 0!==o.rowData?o.rowData:{},{id:o.id,changes:o.changes,rowData:i&&"object"==typeof i?i:{}}})}(this.hot,tU(this,rU,NU).call(this),t);return tU(this,bU,GU).call(this,()=>async function(t,e,o){const{getRowIdOption:n,commitRowsUpdate:i}=e,s={rows:o};if(!1===A$(t,"update",s))return;const r=n();if((await Promise.all(o.map(async e=>{const o=D$(t,r,e.id);return o<0||L$(t,o,e.changes??{})}))).some(t=>!t))return O$(t,"update",new Error("Row update validation failed"),s),void eo("Row update failed: validation failed for one or more cells");await i(o)}(this.hot,{getRowIdOption:()=>tU(this,rU,NU).call(this),commitRowsUpdate:t=>tU(this,CU,XU).call(this,t)},e))}destroy(){tU(this,wU,qU).call(this),super.destroy()}constructor(t){super(t),eU(this,sU),eU(this,rU),eU(this,lU),eU(this,aU),eU(this,hU),eU(this,cU),eU(this,dU),eU(this,uU),eU(this,gU),eU(this,pU),eU(this,fU),eU(this,mU),eU(this,wU),eU(this,bU),eU(this,vU),eU(this,CU),eU(this,yU),eU(this,SU),Q$(this,oU,{writable:!0,value:void 0}),Q$(this,nU,{writable:!0,value:void 0}),Q$(this,iU,{writable:!0,value:void 0}),Q$(this,kU,{writable:!0,value:void 0}),Q$(this,RU,{writable:!0,value:void 0}),Q$(this,EU,{writable:!0,value:void 0}),Q$(this,xU,{writable:!0,value:void 0}),Q$(this,MU,{writable:!0,value:void 0}),Q$(this,TU,{writable:!0,value:void 0}),Q$(this,HU,{writable:!0,value:void 0}),Q$(this,IU,{writable:!0,value:void 0}),Q$(this,_U,{writable:!0,value:void 0}),Q$(this,AU,{writable:!0,value:void 0}),J$(this,oU,{...T$}),J$(this,nU,null),J$(this,iU,{tail:Promise.resolve()}),J$(this,kU,()=>function(t){if(!t||"object"!=typeof t||Array.isArray(t))return!1;const e=t;return Object.keys(M$).every(t=>M$[t](e[t]))}(this.hot.getSettings().dataProvider)),J$(this,RU,()=>{tU(this,SU,ZU).call(this)}),J$(this,EU,(t,e)=>{!function(t,e,o){const{hot:n,getQueryPage:i,goToPage:s}=t,r=n.getPlugin($$);r?.enabled&&o!==i()&&s(o).catch(()=>{const t=n.getPlugin($$);t?.enabled&&t.revertPageTo(e)})}({hot:this.hot,getQueryPage:()=>Z$(this,oU).page,goToPage:async t=>{await this.fetchData({page:t})}},t,e)}),J$(this,xU,(t,e)=>{U$({hot:this.hot,getQueryPage:()=>Z$(this,oU).page,getQueryPageSize:()=>Z$(this,oU).pageSize,setPageSize:async t=>{await this.fetchData({pageSize:t,page:1})}},t,e)}),J$(this,MU,t=>function(t,e){const{hot:o,hasFetchFn:n,applyFiltersAndRefetch:i}=t;if(!n())return;return i(F$(o,e)),!1}({hot:this.hot,hasFetchFn:()=>ln(tU(this,lU,PU).call(this)),applyFiltersAndRefetch:t=>{Z$(this,oU).filters=t??null,Z$(this,oU).page=1,tU(this,SU,ZU).call(this)}},t)),J$(this,TU,(t,e,o)=>function(t,e,o,n){const{hot:i,hasFetchFn:s,applyQueryParametersFromPlugins:r,fetchData:l}=t;if(!s()||!n)return;return i.getPlugin(j$).setSortConfig(o),r(),l({skipLoading:!0}),!1}({hot:this.hot,hasFetchFn:()=>ln(tU(this,lU,PU).call(this)),applyQueryParametersFromPlugins:()=>tU(this,uU,VU).call(this),fetchData:t=>tU(this,SU,ZU).call(this,t)},0,e,o)),J$(this,HU,t=>function(t,e,o=10){const{page:n,pageSize:i}=t;return(n-1)*("number"==typeof i&&i>=1?i:o)+e}(Z$(this,oU),t)),J$(this,IU,(t,e)=>{if(ln(tU(this,hU,LU).call(this))&&H$.has(e))return!1}),J$(this,_U,(t,e)=>{if(function(t,e,o){return!t||!e?.length||"DataProvider.revert"===o||!H$.has(o)}(ln(tU(this,hU,LU).call(this)),t,e))return;const o=function(t,e){if(!e)return[];const o=e.filter(t=>t[2]!==t[3]);return 0===o.length?[]:o.filter(e=>{const o=t.propToCol(e[1]);return!(void 0===o||o<0)&&!1!==t.getCellMetaTransient(e[0],o).valid})}(this.hot,t);0!==o.length&&tU(this,bU,GU).call(this,()=>z$(this.hot,{getRowIdOption:()=>tU(this,rU,NU).call(this),commitRowsUpdate:(t,e)=>tU(this,CU,XU).call(this,t,e)},o))}),J$(this,AU,(t,e,o)=>V$({hot:this.hot,getOnRowsCreate:()=>tU(this,aU,DU).call(this),getOnRowsRemove:()=>tU(this,cU,zU).call(this),getRowIdOption:()=>tU(this,rU,NU).call(this),getRowId:t=>this.getRowId(t),createRows:t=>this.createRows(t),removeRows:t=>this.removeRows(t)},t,e,o)),this.addHook("hasExternalDataSource",Z$(this,kU))}};function OU(){const t=this.hot.getSettings()[E$];return t&&"object"==typeof t?t:void 0}function NU(){const t=tU(this,sU,OU).call(this);return t?t.rowId:void 0}function PU(){const t=tU(this,sU,OU).call(this);return t&&ln(t.fetchRows)?t.fetchRows:void 0}function DU(){const t=tU(this,sU,OU).call(this);return t&&ln(t.onRowsCreate)?t.onRowsCreate:void 0}function LU(){const t=tU(this,sU,OU).call(this);return t&&ln(t.onRowsUpdate)?t.onRowsUpdate:void 0}function zU(){const t=tU(this,sU,OU).call(this);return t&&ln(t.onRowsRemove)?t.onRowsRemove:void 0}function BU(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 VU(){var t,e;t=this.hot,e=Z$(this,oU),function(t,e){if(!t?.enabled)return;const o="function"==typeof t.getCurrentPageSize?t.getCurrentPageSize():void 0,n=t.getSetting("pageSize"),i=t.getSetting("initialPage"),s="function"==typeof t.getCurrentPage?t.getCurrentPage():void 0;"number"==typeof o?e.pageSize=o:"number"==typeof n&&(e.pageSize=n),"number"==typeof s&&s>=1?e.page=s:"number"==typeof i&&i>=1&&(e.page=i)}(t.getPlugin($$),e),q$(this.hot,Z$(this,oU)),function(t,e,o){if(!ln(o()))return;const n=t.getPlugin("filters");if(!n||!n.enabled)return;const i=F$(t,n.exportConditions());e.filters=i??null}(this.hot,Z$(this,oU),()=>tU(this,lU,PU).call(this))}function FU(){if(!Z$(this,nU))return;const t=new Error("DataProvider fetch superseded by a newer request");t.name="AbortError",Z$(this,nU).abort(t)}function $U(t){const e={...Z$(this,oU),...t};return function(t,e){t.sort=function(t,e){if(null==t||"object"!=typeof t)return null;const o=t;if("number"==typeof o.column&&"function"==typeof e)return{prop:e(o.column),order:o.sortOrder};const n=o.order??o.sortOrder;return"string"!=typeof o.prop||"asc"!==n&&"desc"!==n?null:{prop:o.prop,order:n}}(t.sort,t=>String(e.colToProp(t)))}(e,this.hot),"number"!=typeof e.page||Number.isNaN(e.page)||(e.page=Math.max(1,e.page)),e}function UU(){tU(this,gU,FU).call(this);const t=new AbortController;return J$(this,nU,t),t}function jU(t,e){const o=tU(this,dU,BU).call(this,t);this.hot.runHooks("afterDataProviderFetchAbort",o,e)}function qU(){Z$(this,nU)?.abort(),J$(this,nU,null)}function GU(t){return function(t,e){const o=t.tail.then(e);return t.tail=o.catch(()=>{}),o}(Z$(this,iU),t)}function YU(t,e){const o=this.hot.getPlugin("notification");if(!o?.enabled)return;const n={fetch:ov,create:nv,update:iv,remove:sv},i=this.hot.getTranslatedPhrase(n[t]??rv),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 o=t,n=o.response,i=n?.data??o.data??o.body;if(null!=i)if("string"==typeof i)try{Y$(JSON.parse(i),e)}catch{G$(e,i)}else Y$(i,e);"string"==typeof o.error&&G$(e,o.error),"string"==typeof o.message&&G$(e,o.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 l={variant:"error",title:i,message:s};"fetch"===t&&(l.duration=0,l.actions=[{label:this.hot.getTranslatedPhrase(lv),type:"primary",callback:()=>{r&&o.hide(r),tU(this,SU,ZU).call(this)}}]),r=o.showMessage(l)}function XU(t,e={}){return async function(t,e,o,n={}){const i=e.getOnRowsUpdate();if(!ln(i))return;const s={rows:o},{revertOptimistic:r}=n,{onRequestFailed:l}=e;try{await i(o)}catch(o){return O$(t,"update",o,s),e.logError("Row update failed:",o),ln(r)&&r(),t.render(),void l?.("update",o)}try{W$(t,"update",s),await e.fetchData()}catch(o){O$(t,"update",o,s),e.logError("Data reload failed:",o),ln(r)&&r(),t.render()}}(this.hot,{getOnRowsUpdate:()=>tU(this,hU,LU).call(this),fetchData:()=>this.fetchData({skipLoading:!0}),logError:eo,onRequestFailed:(t,e)=>tU(this,vU,YU).call(this,t,e)},t,e)}function KU(t,e,o,n){return function(t,e,o,n,i){const{enqueueMutation:s,runBeforeRowsMutation:r,runAfterRowsMutation:l,runAfterRowsMutationError:a,logError:h,onRequestFailed:c}=t;return s(async()=>{if(!1===r(e,o))return;const t="create"===e?"Row create":"Row remove";try{await n()}catch(n){return a(e,n,o),h(`${t} failed:`,n),void c?.(e,n)}try{l(e,o),await i()}catch(t){a(e,t,o),h("Data reload failed:",t)}})}({enqueueMutation:t=>tU(this,bU,GU).call(this,t),runBeforeRowsMutation:(t,e)=>A$(this.hot,t,e),runAfterRowsMutation:(t,e)=>W$(this.hot,t,e),runAfterRowsMutationError:(t,e,o)=>O$(this.hot,t,e,o),logError:eo,onRequestFailed:(t,e)=>tU(this,vU,YU).call(this,t,e)},t,e,o,n)}function ZU(t={}){return this.fetchData(t).catch(t=>(eo("Data fetch failed:",t),null))}function QU(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" 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,QU(t,e,"get"))}function tj(t,e,o){!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,o)}function ej(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,QU(t,e,"set"),o),o}var oj=new WeakMap,nj=new WeakMap,ij=new WeakMap,sj=new WeakMap,rj=new WeakMap;class lj{get isActive(){return null!==JU(this,oj)}configure(t){ej(this,ij,t)}update(t){ej(this,nj,t),0===t?this.stop():this.isActive||JU(this,rj).call(this)}stop(){null!==JU(this,oj)&&(clearTimeout(JU(this,oj)),ej(this,oj,null)),ej(this,nj,0)}constructor(t){tj(this,oj,{writable:!0,value:void 0}),tj(this,nj,{writable:!0,value:void 0}),tj(this,ij,{writable:!0,value:void 0}),tj(this,sj,{writable:!0,value:void 0}),tj(this,rj,{writable:!0,value:void 0}),ej(this,oj,null),ej(this,nj,0),ej(this,ij,null),ej(this,rj,()=>{if(this.runLocalHooks("tick",JU(this,nj)),0===JU(this,nj))return;const t=function(t,e,o,n=200){const i=Math.min(Math.abs(t),o)/o,s=e.max-e.min;return Math.round(e.max-Math.log(1+i*n)/Math.log(1+n)*s)}(JU(this,nj),JU(this,ij).intervalRange,JU(this,ij).rampDistance);ej(this,oj,JU(this,sj).call(this,JU(this,rj),t))}),ej(this,sj,t)}}function aj(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function hj(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,aj(t,e,"get"))}function cj(t,e,o){!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,o)}function dj(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,aj(t,e,"set"),o),o}be(lj,Wh);var uj=new WeakMap,gj=new WeakMap;class pj{get isActive(){return hj(this,uj).isActive||hj(this,gj).isActive}get isHorizontalActive(){return hj(this,uj).isActive}get isVerticalActive(){return hj(this,gj).isActive}configure(t){hj(this,uj).configure(t),hj(this,gj).configure(t)}update({x:t,y:e}){hj(this,uj).update(t),hj(this,gj).update(e)}stop(){hj(this,uj).stop(),hj(this,gj).stop()}stopHorizontal(){hj(this,uj).stop()}stopVertical(){hj(this,gj).stop()}destroy(){this.stop(),dj(this,uj,null),dj(this,gj,null)}constructor(t){cj(this,uj,{writable:!0,value:void 0}),cj(this,gj,{writable:!0,value:void 0}),dj(this,uj,new lj(t)),dj(this,gj,new lj(t)),hj(this,uj).addLocalHook("tick",t=>this.runLocalHooks("scrollHorizontal",t)),hj(this,gj).addLocalHook("tick",t=>this.runLocalHooks("scrollVertical",t))}}function fj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mj(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function wj(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,mj(t,e,"get"))}function bj(t,e,o){fj(t,e),e.set(t,o)}function vj(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,mj(t,e,"set"),o),o}function Cj(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function yj(t,e){fj(t,e),e.add(t)}be(pj,Wh);const Sj="dragToScroll";var kj=new WeakMap,Rj=new WeakMap,Ej=new WeakMap,xj=new WeakMap,Mj=new WeakMap,Tj=new WeakMap,Hj=new WeakMap,Ij=new WeakSet,_j=new WeakMap,Aj=new WeakMap,Wj=new WeakMap,Oj=new WeakMap,Nj=new WeakMap,Pj=new WeakSet,Dj=new WeakSet,Lj=new WeakMap,zj=new WeakSet,Bj=new WeakSet,Vj=new WeakMap;class Fj extends pW{static get PLUGIN_KEY(){return Sj}static get PLUGIN_PRIORITY(){return 100}static get DEFAULT_SETTINGS(){return{interval:{min:20,max:500},rampDistance:120}}isEnabled(){return!!this.hot.getSettings()[Sj]}enablePlugin(){this.enabled||(wj(this,kj).configure({intervalRange:this.getSetting("interval"),rampDistance:this.getSetting("rampDistance")}),this.addHook("beforeOnCellMouseDown",(t,e,o,n)=>{const i="object"==typeof n&&null!==n?n:null;Cj(this,Ij,$j).call(this,"cell",t,i)}),this.addHook("afterOnCellCornerMouseDown",t=>Cj(this,Ij,$j).call(this,"corner",t)),this.addHook("afterOnSelectionEdgeMouseDown",wj(this,_j)),this.addHook("afterOnSelectionHandleMouseDown",wj(this,Aj)),this.addHook("afterSelection",wj(this,Lj)),this.addHook("afterScroll",wj(this,Vj)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){wj(this,kj).stop(),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 o=0,n=0;const{boundaries:i}=this;i&&(e<i.top?n=e-i.top:e>i.bottom&&(n=e-i.bottom),t<i.left?o=t-i.left:t>i.right&&(o=t-i.right)),vj(this,Rj,0!==n||0!==o),this.callback&&this.callback(o,n)}listen(){this.listening=!0}unlisten(){this.listening=!1,vj(this,Ej,null),vj(this,Hj,null),vj(this,xj,null),vj(this,Mj,null),vj(this,Rj,!1),vj(this,Tj,null),wj(this,kj).stop()}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,"keydown",t=>{"key"in t&&"Escape"===t.key&&this.unlisten()}),this.eventManager.addEventListener(e.document,"mousemove",t=>{Cj(this,zj,qj).call(this,t)}),this.eventManager.addEventListener(e.document,"touchstart",wj(this,Wj)),this.eventManager.addEventListener(e.document,"touchmove",wj(this,Oj)),this.eventManager.addEventListener(e.document,"touchend",wj(this,Nj)),this.eventManager.addEventListener(e.document,"touchcancel",wj(this,Nj)),e=io(e)}unregisterEvents(){this.eventManager.clear()}destroy(){wj(this,kj).destroy(),super.destroy()}constructor(...t){super(...t),yj(this,Ij),yj(this,Pj),yj(this,Dj),yj(this,zj),yj(this,Bj),bj(this,kj,{writable:!0,value:void 0}),bj(this,Rj,{writable:!0,value:void 0}),bj(this,Ej,{writable:!0,value:void 0}),bj(this,xj,{writable:!0,value:void 0}),bj(this,Mj,{writable:!0,value:void 0}),bj(this,Tj,{writable:!0,value:void 0}),bj(this,Hj,{writable:!0,value:void 0}),bj(this,_j,{writable:!0,value:void 0}),bj(this,Aj,{writable:!0,value:void 0}),bj(this,Wj,{writable:!0,value:void 0}),bj(this,Oj,{writable:!0,value:void 0}),bj(this,Nj,{writable:!0,value:void 0}),bj(this,Lj,{writable:!0,value:void 0}),bj(this,Vj,{writable:!0,value:void 0}),this.boundaries=null,this.callback=null,this.listening=!1,vj(this,kj,new pj((t,e)=>this.hot._registerTimeout(t,e)).addLocalHook("scrollHorizontal",t=>Cj(this,Pj,Uj).call(this,t)).addLocalHook("scrollVertical",t=>Cj(this,Dj,jj).call(this,t))),vj(this,Rj,!1),vj(this,Ej,null),vj(this,xj,null),vj(this,Mj,null),vj(this,Tj,null),vj(this,Hj,null),vj(this,_j,t=>{!0===this.hot.getPlugin("moveCells")?.isDragActive()&&Cj(this,Ij,$j).call(this,"move",t)}),vj(this,Aj,t=>{!0===this.hot.getPlugin("selectionHandles")?.isDragActive()&&Cj(this,Ij,$j).call(this,"handle",t)}),vj(this,Wj,t=>{if(null!==wj(this,Hj))return;const e=vn(t);null!==e&&!0===this.hot.getPlugin("multipleSelectionHandles")?.isDraggedBy(e.identifier)&&(vj(this,Hj,e.identifier),Cj(this,Ij,$j).call(this,"handle",t))}),vj(this,Oj,t=>{if(!this.isListening()||null===wj(this,Hj))return;const e=Cn(t,wj(this,Hj));null!==e&&Cj(this,Bj,Gj).call(this,e.clientX,e.clientY)}),vj(this,Nj,t=>{null!==wj(this,Hj)&&null===Cn(t,wj(this,Hj))&&this.unlisten()}),vj(this,Lj,(t,e,o,n,i)=>{this.listening&&wj(this,Rj)&&(i.value=!0)}),vj(this,Vj,()=>{if("cell"!==wj(this,Ej))return;if(!wj(this,Rj))return;if(null===wj(this,xj)||null===wj(this,Mj))return;if("single"===this.hot.getSettings().selectionMode)return;if(wj(this,Tj)?.row||wj(this,Tj)?.column)return;const{selection:t,view:e}=this.hot,o=vO(this.hot,wj(this,xj),wj(this,Mj));if(!o)return;let n=o.row??0,i=o.col??0;const s=e.getFirstFullyVisibleRow()??0,r=e.getLastFullyVisibleRow()??0,l=e.getFirstFullyVisibleColumn()??0,a=e.getLastFullyVisibleColumn()??0;n>r?n=r:n<s&&(n=s),i>a?i=a:i<l&&(i=l),t.isSelectedByRowHeader()&&(i=this.hot.countCols()-1),t.isSelectedByColumnHeader()&&(n=this.hot.countRows()-1);const h=this.hot._createCellCoords(n,i),c=this.hot.getSelectedRangeLast();c&&c.to.row===h.row&&c.to.col===h.col||t.setRangeEnd(h)})}}function $j(t,e,o=null){if(mn(e))return;if("cell"===t&&"single"===this.hot.getSettings().selectionMode)return;vj(this,Ej,t),vj(this,Tj,o);const n=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;if(n===this.hot.rootWindow)this.setBoundaries();else{const t=n.getBoundingClientRect();this.setBoundaries({left:t.left+this.hot.view.getRowHeaderWidth(),right:t.right,top:t.top+this.hot.view.getColumnHeaderHeight(),bottom:t.bottom})}this.setCallback((t,e)=>{const{selection:o}=this.hot,n=o.isSelectedByRowHeader()?0:t,i=o.isSelectedByColumnHeader()?0:e;wj(this,kj).update({x:n,y:i})}),this.listen()}function Uj(t){const e=(this.hot.isRtl()?t<0:t>0)?this.hot.getLastFullyVisibleColumn()+1:this.hot.getFirstPartiallyVisibleColumn()-1;this.hot.scrollViewportTo({col:e},()=>{})||wj(this,kj).stopHorizontal()}function jj(t){const e=this.hot.getFirstFullyVisibleRow(),o=this.hot.getLastFullyVisibleRow(),n=t>0?o+1:e-1;this.hot.scrollViewportTo({row:n},()=>{})||wj(this,kj).stopVertical()}function qj(t){this.isListening()&&Cj(this,Bj,Gj).call(this,t.clientX,t.clientY)}function Gj(t,e){vj(this,xj,t),vj(this,Mj,e),this.check(t,e)}function Yj(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xj(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Kj(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Xj(t,e,"get"))}function Zj(t,e,o){Yj(t,e),e.set(t,o)}function Qj(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Xj(t,e,"set"),o),o}function Jj(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function tq(t,e){Yj(t,e),e.add(t)}Qn.getSingleton().register("afterDropdownMenuDefaultOptions"),Qn.getSingleton().register("beforeDropdownMenuShow"),Qn.getSingleton().register("afterDropdownMenuShow"),Qn.getSingleton().register("afterDropdownMenuHide"),Qn.getSingleton().register("afterDropdownMenuExecute");const eq="dropdownMenu",oq="changeType",nq="has-header-button",iq=eq;var sq=new WeakMap,rq=new WeakSet,lq=new WeakSet,aq=new WeakSet,hq=new WeakMap,cq=new WeakSet,dq=new WeakSet,uq=new WeakSet,gq=new WeakMap,pq=new WeakMap;class fq extends pW{static get PLUGIN_KEY(){return eq}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[lL,aL,iL,dL,iL,rL,iL,hL,iL,sL]}isEnabled(){return!!this.hot.getSettings()[eq]}enablePlugin(){if(this.enabled)return;this.itemsFactory=new lz(this.hot,fq.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",Kj(this,pq)),this.addHook("beforeViewportScrollHorizontally",Kj(this,gq)),this.addHook("beforeDialogShow",()=>this.close());const t=this.hot.getSettings()[eq],e=t,o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof e.callback&&this.commandExecutor.setCommonCallback(e.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new Kz(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:("object"==typeof t?e.uiContainer:null)||this.hot.rootPortalElement}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("afterOpen",()=>Jj(this,cq,vq).call(this)),this.menu.addLocalHook("afterSubmenuOpen",t=>Jj(this,dq,Cq).call(this,t)),this.menu.addLocalHook("afterClose",()=>Jj(this,uq,yq).call(this)),this.menu.addLocalHook("executeCommand",(t,...e)=>this.executeCommand(t,...e)),$(n,t=>{const e=t;this.commandExecutor.registerCommand(e.key,t)})})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("grid"),e=()=>{const t=this.hot.getSelectedRangeActive();if(!t)return;const{highlight:e}=t,o=e.isHeader()?this.hot.getCell(e.row??0,e.col??0,!0):null,n=e.isHeader()&&(e.col??-1)>=0&&!!o&&ho(o),i=e.isHeader()&&(e.col??-1)>=0&&o&&go(o,"hiddenHeader");if((n||i||e.isCell())&&(e.col??-1)>=0){let t=n||i?e.row??-1:-1;this.hot.selectColumns(e.col??0,e.col??0,t);const o=this.hot.getSelectedRangeActive();if(!o)return;const{from:s}=o,r=nL(this.menu?.container??this.hot.rootElement,this.hot.rootDocument);let l=this.hot.getCell(t,s.col??0,!0)?.querySelector(`.${oq}`);if(!l)for(let o=-this.hot.view.getColumnHeadersCount();o<=-1;o++){const n=this.hot.getCell(o,s.col??0,!0)?.querySelector(`.${oq}`);if(n){l=n,t=o,this.hot.selectColumns(e.col??0,e.col??0,t);break}}if(!l&&i)for(let e=(s.col??0)-1;e>=0;e--){const o=this.hot.getCell(t,e,!0);if(!o||go(o,"hiddenHeader"))continue;const n=o?.querySelector(`.${oq}`);n&&(l=n,this.hot.selectColumns(e,e,t));break}if(!l)return;if(!en(l))return;const a=Jj(this,aq,bq).call(this,l),h=l.closest("th"),c=h&&Number.parseInt(h.getAttribute("rowspan")??"1",10)>1,d=c?h.getBoundingClientRect().top+h.clientHeight:a.bottom,u=h?this.hot.getCoords(h):null,g=u?.row??t,p=u?.col??null;this.open({left:a.left+r.left,top:d+r.top},{left:a.width,right:0,above:0,below:c?-1:3},null===p?void 0:()=>{const t=this.hot.getCell(g,p,!0),e=t?.querySelector(`.${oq}`);return e?e.getBoundingClientRect():null}),this.menu?.getNavigator()?.toFirstItem()}};t?.addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight,e=t?.isHeader()?this.hot.getCell(t.row??0,t.col??0,!0):null,o=t?.isHeader()&&(t.col??-1)>=0&&e&&go(e,"hiddenHeader");return!(!t||this.menu?.isOpened()||!t.isHeader()||!this.hot.selection.isCellVisible(t)&&!o)},captureCtrl:!0,group:iq},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return!(!(t&&this.hot.selection.isCellVisible(t)&&t.isCell())||this.menu?.isOpened())},group:iq}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(iq)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",t=>Jj(this,lq,wq).call(this,t))}open(t,e={above:0,below:0,left:0,right:0},o){this.menu?.isOpened()||(this.hot.runHooks("beforeDropdownMenuShow",this),this.menu?.open(),ke(e,(t,e)=>{this.menu?.setOffset(e,t)}),this.menu?.setPosition(t,o))}close(){this.menu?.close()}executeCommand(t,...e){this.commandExecutor.execute(t,...e)}setListening(t=!0){if(this.menu?.isOpened()){const e=this.menu.hotMenu;t?e.listen():e.unlisten()}}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}constructor(t){super(t),tq(this,rq),tq(this,lq),tq(this,aq),tq(this,cq),tq(this,dq),tq(this,uq),Zj(this,sq,{writable:!0,value:void 0}),Zj(this,hq,{writable:!0,value:void 0}),Zj(this,gq,{writable:!0,value:void 0}),Zj(this,pq,{writable:!0,value:void 0}),this.commandExecutor=new rz(this.hot),this.itemsFactory=null,this.menu=null,Qj(this,sq,!1),Qj(this,hq,(t,e)=>{if(t<0||!ho(e))return;const o=e.querySelector(`.${oq}`);if(this.enabled&&o)return void(en(o.parentNode)&&po(o.parentNode,nq));if(!this.enabled){if(o){const t=o.parentNode;t?.removeChild(o),en(t)&&fo(t,nq)}return}const n=this.hot.rootDocument.createElement("button");n.className=oq,n.type="button",n.tabIndex=-1,this.hot.getSettings().ariaTags&&(mo(n,[["aria-hidden","true"],x(" ")]),mo(e,[H("menu")])),n.onclick=function(){return!1};const i=e.firstChild;if(!i)return;const s=i.querySelector(".colHeader");s?i.insertBefore(n,s.nextSibling):i.appendChild(n),en(i)&&po(i,nq)}),Qj(this,gq,t=>Kj(this,sq)?null:t),Qj(this,pq,t=>{go(no(t),oq)&&Qj(this,sq,!0)}),this.hot.addHook("afterGetColHeader",Kj(this,hq))}}function mq(t){t.getKeyboardShortcutsCtrl()?.addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function wq(t){const e=no(t);if(go(e,oq)){const o=nL(this.menu?.container??this.hot.rootElement,this.hot.rootDocument),n=Jj(this,aq,bq).call(this,e),i=e.closest("th"),s=i?this.hot.getCoords(i):null,r=s?.col??null,l=s?.row??-1;t.stopPropagation(),Qj(this,sq,!1),this.open({left:n.left+o.left,top:n.bottom+o.top},{left:n.width,right:0,above:0,below:3},null===r?void 0:()=>{const t=this.hot.getCell(l,r,!0),e=t?.querySelector(`.${oq}`);return e?e.getBoundingClientRect():null})}}function bq(t){const e=t.getBoundingClientRect(),o=this.hot.rootWindow.getComputedStyle(t,"::before"),n=Number.parseFloat(o.width);if(Number.isFinite(n)&&e.width>=n&&e.height>=n){const t=e.left+(e.width-n)/2,o=e.top+(e.height-n)/2;return{top:o,left:t,right:t+n,bottom:o+n,width:n,height:n}}return{top:e.top,left:e.left,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function vq(){this.hot.runHooks("afterDropdownMenuShow",this),Jj(this,rq,mq).call(this,this.menu)}function Cq(t){Jj(this,rq,mq).call(this,t)}function yq(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Sq(t){return t&&"columnHeaders"in t?(to("ExportFile.columnHeaders","The `columnHeaders` export option is deprecated and will be removed in Handsontable 19.0.0. Use `colHeaders` instead."),"colHeaders"in t?t:{...t,colHeaders:t.columnHeaders}):t}function kq(t){const{fragment:e}=K`
|
|
97
|
+
<div class="${x_}__content">
|
|
98
|
+
<i class="${x_}__icon">
|
|
99
|
+
<svg class="${x_}__icon-svg"
|
|
100
|
+
xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16">
|
|
101
|
+
<path stroke="currentColor" stroke-width="2" d="M15 8a7 7 0 1 1-3.5-6.062"></path>
|
|
102
|
+
</svg>
|
|
103
|
+
</i>
|
|
104
|
+
<div class="${x_}__text">
|
|
105
|
+
<h2 class="${x_}__title">${Mn(t)}</h2>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
`;return e}fq.SEPARATOR={name:iL};class Rq{setOptions(t){this.options=Sq(t)}_extractDataMatrix(t){const{startRow:e,startCol:o,endRow:n,endCol:i}=this._getDataRange(),s=this.options,r=[];for(let l=e;l<=n;l++){if(!1===s.exportHiddenRows&&this._isHiddenRow(l))continue;const e=[];for(let n=o;n<=i;n++)!1===s.exportHiddenColumns&&this._isHiddenColumn(n)||e.push(t(l,n));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:o}=this._getDataRange(),n=this.hot.getRowHeader();for(let i=e;i<=o;i++)!1===this.options.exportHiddenRows&&this._isHiddenRow(i)||t.push(n[i])}return t}getColumnHeaders(){const t=[];if(this.options.colHeaders){const{startCol:e,endCol:o}=this._getDataRange(),n=this.hot.getColHeader();for(let i=e;i<=o;i++)!1===this.options.exportHiddenColumns&&this._isHiddenColumn(i)||t.push(n[i])}return t}_getDataRange(){const t=this.hot.countCols()-1,e=this.hot.countRows()-1;let[o=0,n=0,i=e,s=t]=this.options.range;return o=Math.max(o,0),n=Math.max(n,0),i=Math.min(i,e),s=Math.min(s,t),{startRow:o,startCol:n,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:o}=this._getDataRange();for(let n=e;n<=o;n++)this._isHiddenRow(n)&&t.add(this.hot.toPhysicalRow(n));return t}getExcludedHiddenColumns(){const t=new Set;if(!1!==this.options.exportHiddenColumns)return t;const{startCol:e,endCol:o}=this._getDataRange();for(let n=e;n<=o;n++)this._isHiddenColumn(n)&&t.add(this.hot.toPhysicalColumn(n));return t}getHiddenRowDataIndices(){if("hide"!==this.options.exportHiddenRows)return[];const{startRow:t,endRow:e}=this._getDataRange(),o=[];let n=0;for(let i=t;i<=e;i++)this._isHiddenRow(i)&&o.push(n),n+=1;return o}getHiddenColumnDataIndices(){if("hide"!==this.options.exportHiddenColumns)return[];const{startCol:t,endCol:e}=this._getDataRange(),o=[];let n=0;for(let i=t;i<=e;i++)this._isHiddenColumn(i)&&o.push(n),n+=1;return o}getFormulasSeparator(){const t=this.hot.getPlugin("formulas");return t&&t.isEnabled()?t.engine?.getConfig()?.functionArgSeparator??",":","}getCellsMeta(){return this._extractDataMatrix((t,e)=>this.hot.getCellMetaTransient(t,e))}getCellElements(){return this._extractDataMatrix((t,e)=>this.hot.getCell(t,e))}getMergeCells(){const{startRow:t,startCol:e,endRow:o,endCol:n}=this._getDataRange(),i=this.hot.getPlugin("mergeCells");if(!i||!i.isEnabled())return[];const s=i.mergedCellsCollection.mergedCells,r=[],l=!1===this.options.exportHiddenRows,a=!1===this.options.exportHiddenColumns,h=t=>!l||!this._isHiddenRow(t),c=t=>!a||!this._isHiddenColumn(t);return s.forEach(i=>{const s=i.row+i.rowspan-1,l=i.col+i.colspan-1;if(i.row<t||s>o||i.col<e||l>n)return;if(!h(i.row)||!c(i.col))return;const a=this._countVisibleBefore(i.row,t,h),d=this._countVisibleBefore(i.col,e,c),u=this._countVisibleBefore(s+1,i.row,h),g=this._countVisibleBefore(l+1,i.col,c);u<=1&&g<=1||r.push({row:a,col:d,rowspan:u,colspan:g})}),r}getColumnsWidths(){const{startCol:t,endCol:e}=this._getDataRange(),o=this.options,n=[];for(let i=t;i<=e;i++){if(!1===o.exportHiddenColumns&&this._isHiddenColumn(i))continue;const t=this._isHiddenColumn(i)?this._getNaturalColWidth(i):this.hot.getColWidth(i);n.push(t)}return n}getRowsHeights(){const{startRow:t,endRow:e}=this._getDataRange(),o=this.options,n=[];for(let i=t;i<=e;i++){if(!1===o.exportHiddenRows&&this._isHiddenRow(i))continue;const t=this._isHiddenRow(i)?this._getNaturalRowHeight(i):this.hot.getRowHeight(i);n.push(t)}return n}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:o,endCol:n}=this._getDataRange(),i=!!this.options.exportHiddenColumns,s=[];for(let r=0;r<e;r++){const e=[];let l=o;for(;l<=n;)i||!this._isHiddenColumn(l)?l=i?this._appendNestedHeaderWithHidden(t,r,l,n,e):this._appendNestedHeaderWithoutHidden(t,r,l,n,e):l+=1;s.push(e)}return s}_appendNestedHeaderWithHidden(t,e,o,n,i){const s=t.getStateManager().getHeaderTreeNodeData(e,o);if(!s||s.columnIndex===o){const t=s?.origColspan??1,e=Math.min(t,n-o+1),r=(s?.headerClassNames??[]).join(" ");return i.push({label:s?.label??"",colspan:e,className:r}),o+t}return i.push({label:"",colspan:1,className:""}),o+1}_appendNestedHeaderWithoutHidden(t,e,o,n,i){const s=t.getHeaderSettings(e,o);if(!s||s.isRoot){const t=s?.colspan??1;let e=0;for(let i=o;i<o+t&&i<=n;i++)this._isHiddenColumn(i)||(e+=1);const r=(s?.headerClassNames??[]).join(" ");return i.push({label:s?.label??"",colspan:e,className:r}),o+t}return i.push({label:"",colspan:1,className:""}),o+1}getColumnHeadersClassNames(){if(!this.options.colHeaders)return[];const{startCol:t,endCol:e}=this._getDataRange(),o=this.options,n=[];for(let i=t;i<=e;i++){if(!1===o.exportHiddenColumns&&this._isHiddenColumn(i))continue;const t=this.hot.getColumnMeta(i).headerClassName;let e="";Array.isArray(t)?e=t.join(" "):"string"==typeof t&&(e=t),n.push(e)}return n}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:o,endRow:n,endCol:i}=this._getDataRange(),s=t.endpoints.getAllEndpoints(),r=new Set;s.forEach(t=>{if(void 0===t.destinationRow)return;const o=this._physicalRowToDataIndex(t.destinationRow,e,n);null!==o&&r.add(o)});const l=[];return s.forEach(t=>{const s=this._transformEndpointToSummary(t,e,n,o,i,r);null!==s&&l.push(s)}),l}_transformEndpointToSummary(t,e,o,n,i,s){if(void 0===t.destinationRow||void 0===t.destinationColumn)return null;const r=this._physicalRowToDataIndex(t.destinationRow,e,o),l=this._physicalColToDataIndex(t.destinationColumn,n,i);if(null===r||null===l)return null;const a=t.sourceColumn??t.destinationColumn,h=this._physicalColToDataIndex(a,n,i);if(null===h)return null;const c=t.ranges||[[0,this.hot.countRows()-1]],d=[];return c.forEach(t=>{const n=t[0],i=void 0!==t[1]?t[1]:t[0];for(let t=n;t<=i;t++){const n=this._physicalRowToDataIndex(t,e,o);if(null!==n&&!s.has(n)){if(d.length>0){const t=d[d.length-1];if(t[1]+1===n){t[1]=n;continue}}d.push([n,n])}}}),0===d.length?null:{destRow:r,destCol:l,type:String(t.type||"sum").toLowerCase(),sourceCol:h,sourceRanges:d}}_countVisibleBefore(t,e,o){let n=0;for(let i=e;i<t;i++)o(i)&&(n+=1);return n}_physicalRowToDataIndex(t,e,o){const n=this.hot.toVisualRow(t);return null===n||n<e||n>o||!1===this.options.exportHiddenRows&&this._isHiddenRow(n)?null:this._countVisibleBefore(n,e,t=>!1!==this.options.exportHiddenRows||!this._isHiddenRow(t))}_physicalColToDataIndex(t,e,o){const n=this.hot.toVisualColumn(t);return null===n||n<e||n>o||!1===this.options.exportHiddenColumns&&this._isHiddenColumn(n)?null:this._countVisibleBefore(n,e,t=>!1!==this.options.exportHiddenColumns||!this._isHiddenColumn(t))}_getNaturalColWidth(t){const e=this.hot.getSettings(),o=this.hot.getColumnMeta(t).width;if(null!=o)return o;const{colWidths:n,defaultColumnWidth:i}=e,s=i??50;return Array.isArray(n)?n[t]??s:"function"==typeof n?n(t)??s:"number"==typeof n?n:s}_getNaturalRowHeight(t){const e=this.hot.getSettings(),{rowHeights:o,defaultRowHeight:n}=e,i=n??23;return Array.isArray(o)?o[t]??i:"function"==typeof o?o(t)??i:"number"==typeof o?o: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 Eq{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}isBinary(){return this.binary}isText(){return!this.binary}export(){ce("export() must be implemented by subclass")}_mergeOptions(t){let e=fe(this.constructor.DEFAULT_OPTIONS);const o=new Date;return e=ue(fe(Eq.DEFAULT_OPTIONS),e),e=ue(e,Sq(t)),e.filename=Ge(e.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),e}constructor(t,e){this.dataProvider=t,this.options=this._mergeOptions(e),this.dataProvider.setOptions(this.options)}}function xq(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Mq(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 Tq=String.fromCharCode(13),Hq=String.fromCharCode(34),Iq=String.fromCharCode(10),_q=String.fromCharCode(61),Aq=String.fromCharCode(43),Wq=String.fromCharCode(45),Oq=String.fromCharCode(64),Nq=String.fromCharCode(9);var Pq=new WeakSet,Dq=new WeakSet;function Lq(t){return t.startsWith(_q)||t.startsWith(Aq)||t.startsWith(Wq)||t.startsWith(Oq)||t.startsWith(Nq)||t.startsWith(Tq)?`'${t}`:t}function zq(t,e){return e.test(t)?`'${t}`:t}const Bq={sum:"SUM",min:"MIN",max:"MAX",count:"COUNT",average:"AVERAGE"};function Vq(t){let e="",o=t;for(;o>0;){const t=(o-1)%26;e=String.fromCharCode(65+t)+e,o=Math.floor((o-1)/26)}return e}function Fq(t){let e=0;for(let o=0;o<t.length;o++)e=26*e+(t.charCodeAt(o)-64);return e}function $q(t,e){let o=0;return t.forEach(t=>{t<e&&(o+=1)}),o}function Uq(t,e,o,n,i,s){let r=t.startsWith("=")?t.slice(1):t;const l=(i?.size??0)>0,a=(s?.size??0)>0;return(0!==o||0!==n||l||a)&&(r=r.replace(/("(?:[^"]|"")*"|'[^']*')|(?<!\d)(\$?)([A-Z]{1,3})(\$?)(\d{1,7})(?!\()/g,(t,e,r,h,c,d)=>{if(void 0!==e)return e;const u=Fq(h)-1,g=Number.parseInt(d,10)-1,p=a&&s?$q(s,u):0,f=l&&i?$q(i,g):0,m=Fq(h)+n-p,w=Number.parseInt(d,10)+o-f;return`${r}${Vq(m)}${c}${w}`})),e&&","!==e&&(r=function(t,e,o){let n="",i=!1,s="";for(let r=0;r<t.length;r++){const l=t[r];i?(n+=l,l===s&&(t[r+1]===s?(n+=t[r+1],r+=1):i=!1)):'"'===l||"'"===l?(i=!0,s=l,n+=l):t.startsWith(e,r)?(n+=o,r+=e.length-1):n+=l}return n}(r,e,",")),r}function jq(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 qq=new WeakMap,Gq=new WeakMap;const Yq=new Set(["htLeft","htRight","htCenter","htJustify","htTop","htMiddle","htBottom"]);function Xq(t){if(!t)return null;const e=t.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!e)return null;if(0===(At(e[4])?Number.parseFloat(e[4]):1))return null;return`#${Number.parseInt(e[1],10).toString(16).padStart(2,"0")}${Number.parseInt(e[2],10).toString(16).padStart(2,"0")}${Number.parseInt(e[3],10).toString(16).padStart(2,"0")}`.toUpperCase()}function Kq(t,e,o){const n=e.join(" ");let i=qq.get(t);if(i||(i=new Map,qq.set(t,i)),i.has(n))return i.get(n)??null;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"),l=t.createElement("tbody"),a=t.createElement("tr"),h=t.createElement("td");h.className=n;const c=t.createElement("td");c.className=e.filter(t=>Yq.has(t)).join(" "),a.appendChild(h),a.appendChild(c),l.appendChild(a),r.appendChild(l),s.appendChild(r),t.body.appendChild(s);const d=o.getComputedStyle(h).backgroundColor,u=o.getComputedStyle(c).backgroundColor;t.body.removeChild(s);const g=d!==u?Xq(d):null;return i.set(n,g),g}function Zq(t,e,o=null,n=null){if(!t){if(!o||!n)return null;const t=jq(e);return t.some(t=>!Yq.has(t))?function(t,e,o){const n=o.join(" ");let i=Gq.get(t);if(i||(i=new Map,Gq.set(t,i)),i.has(n))return i.get(n);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"),l=t.createElement("tbody"),a=t.createElement("tr"),h=t.createElement("td");h.className=n;const c=t.createElement("td");c.className=o.filter(t=>Yq.has(t)).join(" "),a.appendChild(h),a.appendChild(c),l.appendChild(a),r.appendChild(l),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:Number.parseInt(d.fontWeight,10)>=700||"bold"===d.fontWeight,fontItalic:"italic"===d.fontStyle,fontUnderline:(d.textDecorationLine||d.textDecoration||"").includes("underline"),fontColor:f!==m?Xq(f):null,backgroundColor:g!==p?Xq(g):null};return i.set(n,w),w}(o,n,t):null}const i=t.ownerDocument?.defaultView;if(!i)return null;const s=i.getComputedStyle(t),r=jq(e),l=r.some(t=>!Yq.has(t));return{fontBold:Number.parseInt(s.fontWeight,10)>=700||"bold"===s.fontWeight,fontItalic:"italic"===s.fontStyle,fontUnderline:(s.textDecorationLine||s.textDecoration||"").includes("underline"),fontColor:l?Xq(s.color):null,backgroundColor:l?Kq(t.ownerDocument,r,i):null}}function Qq(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 Jq(t){return t?tG({className:t}):null}function tG(t){if(!t?.className)return null;const e=jq(t.className),o={};return e.includes("htLeft")?o.horizontal="left":e.includes("htCenter")?o.horizontal="center":e.includes("htRight")?o.horizontal="right":e.includes("htJustify")&&(o.horizontal="justify"),e.includes("htTop")?o.vertical="top":e.includes("htMiddle")?o.vertical="middle":e.includes("htBottom")&&(o.vertical="bottom"),Object.keys(o).length>0?o:null}const eG=Date.UTC(1899,11,30);function oG(t){const e=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.round((e-eG)/864e5)}function nG(t,e){if(!t)return null;const{style:o,currency:n,minimumFractionDigits:i=0,maximumFractionDigits:s,useGrouping:r=!0}=t,l=s??i,a=l>0?`.${"0".repeat(l)}`:"",h=!1!==r?"#,##0":"0";if("percent"===o)return`${h}${a}%`;if("currency"===o&&n){const{symbol:t,isPrefix:o}=function(t,e){try{const o=new Intl.NumberFormat(e||"en",{style:"currency",currency:t,minimumFractionDigits:0,maximumFractionDigits:0}).formatToParts(0),n=o.find(t=>"currency"===t.type)?.value??t,i=o.findIndex(t=>"currency"===t.type);return{symbol:n,isPrefix:i<o.findIndex(t=>"integer"===t.type)}}catch{return{symbol:t,isPrefix:!0}}}(n,e);return o?`${t}${h}${a}`:`${h}${a}${t}`}return`${h}${a}`}function iG(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function sG(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 rG=new WeakSet,lG=new WeakSet,aG=new WeakSet,hG=new WeakSet,cG=new WeakSet,dG=new WeakSet,uG=new WeakSet,gG=new WeakSet,pG=new WeakSet,fG=new WeakSet,mG=new WeakSet,wG=new WeakSet,bG=new WeakSet,vG=new WeakSet,CG=new WeakSet,yG=new WeakSet,SG=new WeakSet,kG=new WeakSet,RG=new WeakSet,EG=new WeakSet,xG=new WeakSet;function MG(t,e,o,n){const i=o.getData(),s=o.getCellsMeta(),r=iG(this,xG,GG).call(this,t,s),l=o.getCellElements(),a=o.getColumnHeaders(),h=o.getColumnHeadersClassNames(),c=o.getRowHeaders(),d=o.getColumnsWidths(),u=o.getRowsHeights(),g=o.getMergeCells(),p=o.getFrozenRows(),f=o.getFrozenColumns(),m=o.getNestedColumnHeaders(),w="rtl"===o.getLayoutDirection(),b=n.exportFormulas??!1,v=new Map;o.getColumnSummaries().forEach(t=>{const e=t;v.set(`${e.destRow}:${e.destCol}`,e)});const C=b?o.getSourceData():null,y=b?o.getFormulasSeparator():",",S=a.length>0,k=c.length>0,R=null!==m&&S;let E=0;R?E=m.length:S&&(E=1);const x=E+1,M=k?2:1,T=b?o.getExcludedHiddenRows():null,H=b?o.getExcludedHiddenColumns():null,I=o.getHiddenRowDataIndices(),_=o.getHiddenColumnDataIndices(),{rootDocument:A,rootWindow:W}=o.hot;iG(this,vG,BG).call(this,e,d,k),_.length>0&&iG(this,CG,VG).call(this,e,_,k),iG(this,SG,$G).call(this,e,p,f,E,k,w);const O=iG(this,pG,NG).call(this,n.headerStyle),N=iG(this,fG,PG).call(this,n.headerStyle);R?(iG(this,RG,jG).call(this,e,m,k,M,O,N),iG(this,EG,qG).call(this,e,m,k,M)):S&&iG(this,kG,UG).call(this,e,a,h,k,M,O,N);const P=!(v.size>0)&&s.some(t=>t.some(t=>!0===t?.readOnly)),D={exportFormulas:b,formulasSeparator:y,dataRowOffset:x,dataColOffset:M,excludedHiddenRows:T,excludedHiddenCols:H,summaryMap:v,sourceData:C,hasRowHeaders:k,headerFill:O,headerBorder:N,hasReadOnlyCells:P,rootDocument:A,rootWindow:W,validationMap:r,cellsMeta:s,cellElements:l,rowHeaders:c,rowsHeights:u};iG(this,lG,TG).call(this,e,i,D),I.length>0&&iG(this,yG,FG).call(this,e,I,x),P&&e.protect("",{selectLockedCells:!0,selectUnlockedCells:!0,formatColumns:!0,formatRows:!0,sort:!0,autoFilter:!0}),g.forEach(t=>{const o=t.row+x,n=t.col+M,i=o+t.rowspan-1,s=n+t.colspan-1;e.mergeCells(o,n,i,s)});const{conditionalFormatting:L}=n;return L&&L.length>0&&iG(this,wG,LG).call(this,e,L,x,M,i.length,i[0]?.length??0),i.length}function TG(t,e,o){for(let n=0;n<e.length;n++){const i=e[n],s=n+o.dataRowOffset,r=t.getRow(s);if(At(o.rowsHeights[n])&&(r.height=.75*o.rowsHeights[n]),o.hasRowHeaders){const t=r.getCell(1);t.value=o.rowHeaders[n]??null,o.headerFill&&(t.fill=o.headerFill),o.headerBorder&&(t.border=o.headerBorder)}iG(this,aG,HG).call(this,r,i,n,o),r.commit()}}function HG(t,e,o,n){for(let i=0;i<e.length;i++){const s=e[i],r=t.getCell(i+n.dataColOffset),l=n.cellsMeta[o][i],a=n.summaryMap.get(`${o}:${i}`),h=n.sourceData?.[o][i],{value:c,numFmt:d}=iG(this,cG,_G).call(this,s,l,h,a,n);r.value=c,d&&(r.numFmt=d);const u=Zq(n.cellElements[o][i],l.className,n.rootDocument,n.rootWindow);iG(this,hG,IG).call(this,r,l,u,n),n.hasReadOnlyCells&&(r.protection={locked:!0===l.readOnly})}}function IG(t,e,o,n){const i=tG(e);i&&(t.alignment=i);const s=function(t){if(!t?.borders)return null;const{borders:e}=t,o={};return["top","bottom","left","right"].forEach(t=>{var n;e[t]&&e[t].width>0&&(o[t]={style:(n=e[t].width,n>=3?"thick":2===n?"medium":"thin"),color:{argb:Qq(e[t].color)}})}),Object.keys(o).length>0?o:null}(e);s&&(t.border=s);const r=function(t,e=null){const o=!0===t?.readOnly,n=e?.fontBold||!1,i=e?.fontItalic||!1,s=e?.fontUnderline||!1,r=e?.fontColor??null;if(!(n||i||s||r||o))return null;const l={};return n&&(l.bold=!0),i&&(l.italic=!0),s&&(l.underline=!0),r?l.color={argb:Qq(r)}:o&&(l.color={argb:"FF808080"}),Object.keys(l).length>0?l:null}(e,o);r&&(t.font=r);const l=function(t,e=null){let o=null;return e?.backgroundColor?o=Qq(e.backgroundColor):!0===t?.readOnly&&(o="FFF0F0F0"),o?{type:"pattern",pattern:"solid",fgColor:{argb:o}}:null}(e,o);l&&(t.fill=l);const a=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)?n.validationMap.get(JSON.stringify(e.source))??null:null);a&&(t.dataValidation=a),e.comment?.value&&(t.note=String(e.comment.value))}function _G(t,e,o,n,i){const{exportFormulas:s,formulasSeparator:r,dataRowOffset:l,dataColOffset:a,excludedHiddenRows:h,excludedHiddenCols:c}=i;if(n&&s){const o=function(t,e,o){const n=Bq[t.type];if(!n)return null;const i=Vq(t.sourceCol+o);return{formula:`${n}(${t.sourceRanges.map(([t,o])=>{const n=t+e,s=o+e;return n===s?`${i}${n}`:`${i}${n}:${i}${s}`}).join(",")})`}}(n,l,a),i=iG(this,dG,AG).call(this,t,e);return{value:o?{...o,result:t}:i,numFmt:null}}if(s&&("string"==typeof(d=o)&&d.startsWith("=")))return{value:{formula:Uq(o,r,l-1,a-1,h??void 0,c??void 0)},numFmt:null};var d;if("intl-datetime"===e.type){const e=function(t){if(!t)return null;const e=String(t).match(/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?:[T ]([01]\d|2[0-3]):([0-5]\d)(?::([0-5]\d)(?:\.\d{1,3})?)?)?$/);if(!e)return null;const o=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10),s=e[4]?parseInt(e[4],10):0,r=e[5]?parseInt(e[5],10):0,l=e[6]?parseInt(e[6],10):0,a=new Date(o,n-1,i);if(Number.isNaN(a.getTime()))return null;const h=(3600*s+60*r+l)/86400;return oG(a)+h}(t);if(null!==e)return{value:e,numFmt:"mm-dd-yy h:mm:ss"}}if("date"===e.type||"intl-date"===e.type){const e=function(t){if(!t)return null;const e=String(t).match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!e)return null;const o=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10),s=new Date(o,n-1,i);return Number.isNaN(s.getTime())?null:oG(s)}(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(),o=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);if(o){const t=parseInt(o[1],10),e=parseInt(o[2],10),n=o[3]?parseInt(o[3],10):0;return t>23||e>59||n>59?null:(3600*t+60*e+n)/86400}const n=e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*(AM|PM)$/i);if(n){let t=parseInt(n[1],10);const e=parseInt(n[2],10),o=n[3]?parseInt(n[3],10):0,i=n[4].toUpperCase();return t>12||e>59||o>59?null:("AM"===i&&12===t?t=0:"PM"===i&&12!==t&&(t+=12),(3600*t+60*e+o)/86400)}return null}(t);if(null!==e)return{value:e,numFmt:"h:mm:ss"}}return"checkbox"===e.type?{value:iG(this,uG,WG).call(this,t,e),numFmt:null}:"multiselect"===e.type?{value:iG(this,gG,OG).call(this,t),numFmt:null}:"numeric"===e.type?{value:iG(this,dG,AG).call(this,t,e),numFmt:nG(e.numericFormat,e.locale)}:{value:iG(this,dG,AG).call(this,t,e),numFmt:null}}function AG(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)?_t(t):e}return _t(t)}function WG(t,e){return t===(e.checkedTemplate??!0)}function OG(t){return Array.isArray(t)?0===t.length?null:t.map(t=>String(null!==t&&"object"==typeof t?t.value:t)).join(", "):null==t?null:_t(t)}function NG(t){return t?.backgroundColor?{type:"pattern",pattern:"solid",fgColor:{argb:Qq(t.backgroundColor)}}:null}function PG(t){if(!t?.border)return null;const{style:e="thin",color:o}=t.border,n=o?{style:e,color:{argb:Qq(o)}}:{style:e};return{top:n,bottom:n,left:n,right:n}}function DG(){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 LG(t,e,o,n,i,s){0!==i&&0!==s&&e.forEach(({rows:e,cols:r,rules:l})=>{if(!l||0===l.length)return;const a=(e?e[0]:0)+o,h=(e?e[1]:i-1)+o,c=(r?r[0]:0)+n,d=(r?r[1]:s-1)+n;t.addConditionalFormatting({ref:iG(this,bG,zG).call(this,a,c,h,d),rules:l})})}function zG(t,e,o,n){return`${Vq(e)}${t}:${Vq(n)}${o}`}function BG(t,e,o){o&&(t.getColumn(1).width=5);const n=o?1:0;for(let o=0;o<e.length;o++)t.getColumn(o+1+n).width=Math.max(e[o]/7,1)}function VG(t,e,o){const n=o?1:0;e.forEach(e=>{t.getColumn(e+1+n).hidden=!0})}function FG(t,e,o){e.forEach(e=>{t.getRow(e+o).hidden=!0})}function $G(t,e,o,n,i,s){const r=e>0||o>0;if(!r&&!s)return;const l={};s&&(l.rightToLeft=!0),r&&(l.state="frozen",l.xSplit=o+(i?1:0),l.ySplit=e+n),t.views=[l]}function UG(t,e,o,n,i,s,r){const l=t.getRow(1);if(n){const t=l.getCell(1);t.value="",s&&(t.fill=s),r&&(t.border=r)}for(let t=0;t<e.length;t++){const n=l.getCell(t+i);n.value=e[t]??null;const a=Jq(o[t]);a&&(n.alignment=a),s&&(n.fill=s),r&&(n.border=r)}l.commit()}function jG(t,e,o,n,i,s){for(let r=0;r<e.length;r++){const l=e[r],a=t.getRow(r+1);if(o&&0===r){const t=a.getCell(1);t.value="",i&&(t.fill=i),s&&(t.border=s)}let h=n;l.forEach(t=>{const e=a.getCell(h);e.value=t.label??null;const o=Jq(t.className);o&&(e.alignment=o),i&&(e.fill=i),s&&(e.border=s),h+=t.colspan}),a.commit()}}function qG(t,e,o,n){o&&e.length>1&&t.mergeCells(1,1,e.length,1);for(let o=0;o<e.length;o++){const i=e[o],s=o+1;let r=n;i.forEach(e=>{e.colspan>1&&t.mergeCells(s,r,s,r+e.colspan-1),r+=e.colspan})}}function GG(t,e){const o=new Map;for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++){const i=e[t][n];if(("dropdown"===i.type||"autocomplete"===i.type)&&Array.isArray(i.source)&&i.source.length>0){const t=JSON.stringify(i.source);o.has(t)||o.set(t,i.source)}}if(0===o.size)return new Map;const n=new Set(t.worksheets.map(t=>t.name));let i="_HotValidation",s=1;for(;n.has(i);)i=`_HotValidation${s}`,s+=1;const r=t.addWorksheet(i);r.state="veryHidden";const l=new Map;let a=1;return o.forEach((t,e)=>{for(let e=0;e<t.length;e++){const o=t[e];r.getCell(e+1,a).value=_e(o)?String(o.value):String(o)}const o=Vq(a),n=`'${i.replaceAll("'","''")}'!$${o}$1:$${o}$${t.length}`;l.set(e,n),a+=1}),l}const YG="csv",XG="xlsx",KG={[YG]:class extends Eq{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),o={};return"hide"===e.exportHiddenRows&&(o.exportHiddenRows=!1),"hide"===e.exportHiddenColumns&&(o.exportHiddenColumns=!1),Object.keys(o).length>0?ue(e,o):e}export(){const t=this.options,e=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const n=o.length>0,i=this.dataProvider.getRowHeaders(),s=i.length>0;let r=t.bom?String.fromCharCode(65279):"";return n&&(o=o.map(e=>this._escapeCell(e,{force:!0,sanitizeValue:t.sanitizeValues})),s&&(r+=t.columnDelimiter),r+=o.join(t.columnDelimiter),r+=t.rowDelimiter),e.forEach((e,o)=>{o>0&&(r+=t.rowDelimiter),s&&(r+=this._escapeCell(i[o],{sanitizeValue:t.sanitizeValues}),r+=t.columnDelimiter);const n=e.map(e=>this._escapeCell(e,{sanitizeValue:t.sanitizeValues})).join(t.columnDelimiter);r+=n}),r}_escapeCell(t,{force:e=!1,sanitizeValue:o=!1}={}){let n=_t(t);return""===n||(o&&(e=!0),o instanceof RegExp?n=xq(this,Dq,zq).call(this,n,o):"function"==typeof o?n=o(n):o&&(n=xq(this,Pq,Lq).call(this,n)),(e||n.indexOf(Tq)>=0||n.indexOf(Hq)>=0||n.indexOf(Iq)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replaceAll('"','""'),n=`"${n}"`)),n}constructor(...t){super(...t),Mq(this,Pq),Mq(this,Dq)}},[XG]:class extends Eq{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 t=this.options.engine;t&&"function"==typeof t.Workbook||ce("Missing or invalid ExcelJS engine. Pass the ExcelJS module via the `engines` option in the exportFile plugin settings: `exportFile: { engines: { xlsx: ExcelJS } }`.");const e=this.options.sheets;(e&&e.length>0?new Set(e.map(t=>t.instance.rootDocument)):new Set([this.dataProvider.hot.rootDocument])).forEach(t=>function(t){qq.delete(t),Gq.delete(t)}(t));const o=new t.Workbook;if(e&&e.length>0){const t=new Set;e.forEach(e=>{const n=new Rq(e.instance),i={...this.options,...Sq(e)};n.setOptions(i);const s=e.name||"Sheet";let r=s,l=1;for(;t.has(r);)r=`${s}${l}`,l+=1;t.add(r);const a=o.addWorksheet(r);iG(this,rG,MG).call(this,o,a,n,i)})}else{const t=o.addWorksheet("Sheet1");iG(this,rG,MG).call(this,o,t,this.dataProvider,this.options)}return o.xlsx.writeBuffer(iG(this,mG,DG).call(this))}constructor(...t){super(...t),sG(this,rG),sG(this,lG),sG(this,aG),sG(this,hG),sG(this,cG),sG(this,dG),sG(this,uG),sG(this,gG),sG(this,pG),sG(this,fG),sG(this,mG),sG(this,wG),sG(this,bG),sG(this,vG),sG(this,CG),sG(this,yG),sG(this,SG),sG(this,kG),sG(this,RG),sG(this,EG),sG(this,xG)}}};function ZG(t){const e=t.getSettings(),o=!(!e.colHeaders&&!e.nestedHeaders),n=!!e.rowHeaders,i=t.getSelectedRangeLast(),s={colHeaders:o,rowHeaders:n};return!i||i.isSingleCell()||(i.from.row??0)<0&&(i.from.col??0)<0?s:{...s,range:[Math.max(0,Math.min(i.from.row??0,i.to.row??0)),Math.max(0,Math.min(i.from.col??0,i.to.col??0)),Math.max(i.from.row??0,i.to.row??0),Math.max(i.from.col??0,i.to.col??0)]}}function QG(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function JG(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function tY(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,JG(t,e,"set"),o),o}function eY(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}const oY="exportFile";function nY(t){return Ce(t)?t:void 0}var iY=new WeakMap,sY=new WeakSet;class rY extends pW{static get PLUGIN_KEY(){return oY}static get PLUGIN_PRIORITY(){return 240}static get SETTING_KEYS(){return[oY]}isEnabled(){return!0}enablePlugin(){var t;this.enabled||(this.addHook("afterContextMenuDefaultOptions",function(t,e){return e.get?e.get.call(t):e.value}(t=this,JG(t,iY,"get"))),super.enablePlugin())}disablePlugin(){super.disablePlugin()}exportAsString(t,e={}){const o=this._createTypeFormatter(t,e);return o.binary&&ce(`Export format type "${t}" cannot be exported as a string (binary format).`),o.export()}exportAsBlob(t,e={}){const o=this._createTypeFormatter(t,e);return o.binary&&ce(`exportAsBlob() does not support binary formats such as "${t}". Use exportAsBlobAsync() instead.`),this._createBlob(o)}async exportAsBlobAsync(t,e={}){return this._createBlob(this._createTypeFormatter(t,e))}downloadFile(t,e={}){const o=this._createTypeFormatter(t,e);o.binary&&ce(`downloadFile() does not support binary formats such as "${t}". Use downloadFileAsync() instead.`);const n=`${o.options.filename}.${o.options.fileExtension}`;eY(this,sY,lY).call(this,this._createBlob(o),n)}async downloadFileAsync(t,e={}){const o=this._createTypeFormatter(t,e),n=this.hot.getPlugin("dialog"),i=n?.isEnabled(),{rootWindow:s}=this.hot,r=`${o.options.filename}.${o.options.fileExtension}`,l=async()=>{const t=await Promise.resolve(this._createBlob(o));eY(this,sY,lY).call(this,t,r)};if(i&&o.binary){n.show({content:kq(this.hot.getTranslatedPhrase(qb)),customClassName:x_,background:"semi-transparent",closable:!1,animation:!1}),await new Promise(t=>{s.requestAnimationFrame(()=>{s.requestAnimationFrame(t)})});try{await l()}finally{n.hide()}}else await l()}supportsExportFormat(t){if(!KG[t])return!1;if("xlsx"===t){const t=nY(this.hot.getSettings()[oY]);return void 0!==t&&Ce(t.engines)&&Boolean(t.engines?.xlsx)}return!0}_createTypeFormatter(t,e={}){KG[t]||ce(`Export format type "${t}" is not supported.`);const o=nY(this.hot.getSettings()[oY]),n=o&&Ce(o.engines)?o.engines:void 0,i=n?.[t],s=void 0!==i?{engine:i,...e}:e,r=function(t,e,o){const n=KG[t];return"function"==typeof n?new n(e,o):null}(t,new Rq(this.hot),s);return null===r&&ce(`Export format type "${t}" is not supported.`),r}_createBlob(t){"undefined"==typeof Blob&&ce("Blob is not available in this environment.");const e=t.export(),{mimeType:o,encoding:n}=t.options;return e instanceof Promise?e.then(t=>new Blob([t],{type:o})):new Blob([e],{type:`${o};charset=${n}`})}constructor(...t){var e,o;super(...t),QG(e=this,o=sY),o.add(e),function(t,e,o){QG(t,e),e.set(t,o)}(this,iY,{writable:!0,value:void 0}),tY(this,iY,t=>{if("object"!=typeof t||null===t)return;var e;t.items.push({name:"---------"},(e=this,{key:"export_file",name(){return this.getTranslatedPhrase(pw)},hidden(){return void 0===this.getSettings()[oY]},submenu:{items:[{key:"export_file:csv",name(){return this.getTranslatedPhrase(fw)},callback(){e.downloadFile("csv",ZG(this))},disabled:!1},{key:"export_file:xlsx",name(){return this.getTranslatedPhrase(mw)},callback(){e.downloadFileAsync("xlsx",ZG(this)).catch(t=>{eo("ExportFile: XLSX export failed.",t)})},hidden:()=>!e.supportsExportFormat("xlsx")}]}}))})}}function lY(t,e){const{rootDocument:o,rootWindow:n}=this.hot,i=n.URL||n.webkitURL,s=i.createObjectURL(t),r=o.createElement("a");r.style.display="none",r.setAttribute("href",s),r.setAttribute("download",e),o.body.appendChild(r),r.dispatchEvent(new MouseEvent("click")),o.body.removeChild(r),this.hot._registerTimeout(()=>{i.revokeObjectURL(s)},100)}class aY{getElements(){return this.elements}reset(){$(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(t){ce("The state setting logic is not implemented")}saveState(t){this.state&&this.state.setValueAtIndex(t,this.getState())}getState(){return ce("The state gathering logic is not implemented"),{}}getMenuItemDescriptor(){return ce("The menu item descriptor logic is not implemented"),{}}destroy(){this.hot?.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),$(this.elements,t=>t.destroy()),this.state=null,this.elements.length=0,this.hot=null}constructor(t,{id:e,stateless:o=!0}){this.elements=[],this.hidden=!1,this.stateId="",this.hot=t,this.id=e,this.stateId=`Filters.component.${this.id}`,this.state=o?null:this.hot.columnIndexMapper.createAndRegisterIndexMap(this.stateId,"linkedPhysicalIndexToValue")}}be(aY,Wh);const hY={};function cY(t,e){hY[t]||ce(`Filter condition "${t}" does not exist.`);const{condition:o,descriptor:n}=hY[t];let i=e;if(n.inputValuesDecorator){const t=n.inputValuesDecorator;i=t(i)}return function(t){return o.apply(t.meta.instance,[t,i])}}function dY(t){return hY[t]||ce(`Filter condition "${t}" does not exist.`),hY[t].descriptor}function uY(t,e,o){o.key=t,hY[t]={condition:e,descriptor:o}}const gY="none";uY(gY,function(){return!0},{name:Gw,inputsCount:0,showOperators:!1});const pY="empty";uY(pY,function(t){return Ot(t.value)},{name:Yw,inputsCount:0,showOperators:!0});const fY="not_empty";uY(fY,function(t,e){return!cY(pY,e)(t)},{name:Xw,inputsCount:0,showOperators:!0});const mY="eq";uY(mY,function(t,[e]){return!0===t.meta.preserveNumericLiteral&&"numeric"===t.meta.type&&is(t.value)&&is(e)?Number(t.value)===Number(e):An(_t(t.value),t.meta.locale)===_t(e)},{name:Kw,inputsCount:1,showOperators:!0});const wY="neq";uY(wY,function(t,e){return!cY(mY,e)(t)},{name:Zw,inputsCount:1,showOperators:!0});uY("gt",function(t,[e]){let o=e;return"numeric"===t.meta.type&&(o=parseFloat(o)),t.value>o},{name:nb,inputsCount:1,showOperators:!0});uY("gte",function(t,[e]){let o=e;return"numeric"===t.meta.type&&(o=parseFloat(o)),t.value>=o},{name:ib,inputsCount:1,showOperators:!0});uY("lt",function(t,[e]){let o=e;return"numeric"===t.meta.type&&(o=parseFloat(o)),t.value<o},{name:sb,inputsCount:1,showOperators:!0});uY("lte",function(t,[e]){let o=e;return"numeric"===t.meta.type&&(o=Number.parseFloat(o)),t.value<=o},{name:rb,inputsCount:1,showOperators:!0});const bY="between";uY(bY,function(t,[e,o]){let n=e,i=o;if("numeric"===t.meta.type){const t=parseFloat(n),e=parseFloat(i);n=Math.min(t,e),i=Math.max(t,e)}else if("date"===t.meta.type){const e=XT(t.value),o=XT(n),s=XT(i);return null!==e&&null!==o&&null!==s&&(e.getTime()>=o.getTime()&&e.getTime()<=s.getTime())}return t.value>=n&&t.value<=i},{name:lb,inputsCount:2,showOperators:!0});const vY="not_between";uY(vY,function(t,e){return!cY(bY,e)(t)},{name:ab,inputsCount:2,showOperators:!0});const CY="begins_with";uY(CY,function(t,[e]){return An(_t(t.value),t.meta.locale).startsWith(_t(e))},{name:Qw,inputsCount:1,showOperators:!0});const yY="ends_with";uY(yY,function(t,[e]){return An(_t(t.value),t.meta.locale).endsWith(_t(e))},{name:Jw,inputsCount:1,showOperators:!0});const SY="contains";uY(SY,function(t,[e]){return An(_t(t.value),t.meta.locale).indexOf(_t(e))>=0},{name:tb,inputsCount:1,showOperators:!0});const kY="not_contains";uY(kY,function(t,e){return!cY(SY,e)(t)},{name:eb,inputsCount:1,showOperators:!0});const RY="date_before";uY(RY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o.getTime()<n.getTime()},{name:db,inputsCount:1,showOperators:!0,inputType:"date"});const EY="date_before_or_equal";uY(EY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o.getTime()<=n.getTime()},{name:ub,inputsCount:1,showOperators:!0,inputType:"date"});const xY="date_after";uY(xY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o.getTime()>n.getTime()},{name:hb,inputsCount:1,showOperators:!0,inputType:"date"});const MY="date_after_or_equal";uY(MY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o.getTime()>=n.getTime()},{name:cb,inputsCount:1,showOperators:!0,inputType:"date"});const TY="date_tomorrow";uY(TY,function(t){const e=XT(t.value);return null!==e&&lH(e,rH(1))},{name:pb,inputsCount:0});const HY="date_today";uY(HY,function(t){const e=XT(t.value);return null!==e&&lH(e,sH())},{name:gb,inputsCount:0});const IY="date_yesterday";uY(IY,function(t){const e=XT(t.value);return null!==e&&lH(e,rH(-1))},{name:fb,inputsCount:0});const _Y="intl_date_before";uY(_Y,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o<n},{name:db,inputsCount:1,showOperators:!0,inputType:"date"});const AY="intl_date_before_or_equal";uY(AY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o<=n},{name:ub,inputsCount:1,showOperators:!0,inputType:"date"});const WY="intl_date_after";uY(WY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o>n},{name:hb,inputsCount:1,showOperators:!0,inputType:"date"});const OY="intl_date_after_or_equal";uY(OY,function(t,[e]){const o=XT(t.value),n=XT(e);return null!==o&&null!==n&&o>=n},{name:cb,inputsCount:1,showOperators:!0,inputType:"date"});const NY="intl_date_between";uY(NY,function(t,[e,o]){const n=XT(t.value),i=XT(e),s=XT(o);return null!==n&&null!==i&&null!==s&&(n>=i&&n<=s)},{name:lb,inputsCount:2,showOperators:!0,inputType:"date"});const PY="intl_date_tomorrow";uY(PY,function(t){const e=XT(t.value);if(null===e)return!1;const o=new Date;return o.setDate(o.getDate()+1),e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:pb,inputsCount:0,inputType:"date"});const DY="intl_date_today";uY(DY,function(t){const e=XT(t.value);if(null===e)return!1;const o=new Date;return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:gb,inputsCount:0,inputType:"date"});const LY="intl_date_yesterday";uY(LY,function(t){const e=XT(t.value);if(null===e)return!1;const o=new Date;return o.setDate(o.getDate()-1),e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:fb,inputsCount:0,inputType:"date"});const zY="intl_time_before";uY(zY,function(t,[e]){const o=tH(t.value),n=tH(e);return null!==o&&null!==n&&o<n},{name:db,inputsCount:1,showOperators:!0,inputType:"time"});const BY="intl_time_before_or_equal";uY(BY,function(t,[e]){const o=tH(t.value),n=tH(e);return null!==o&&null!==n&&o<=n},{name:ub,inputsCount:1,showOperators:!0,inputType:"time"});const VY="intl_time_after";uY(VY,function(t,[e]){const o=tH(t.value),n=tH(e);return null!==o&&null!==n&&o>n},{name:hb,inputsCount:1,showOperators:!0,inputType:"time"});const FY="intl_time_after_or_equal";uY(FY,function(t,[e]){const o=tH(t.value),n=tH(e);return null!==o&&null!==n&&o>=n},{name:cb,inputsCount:1,showOperators:!0,inputType:"time"});const $Y="intl_time_between";uY($Y,function(t,[e,o]){const n=tH(t.value),i=tH(e),s=tH(o);return null!==n&&null!==i&&null!==s&&(n>=i&&n<=s)},{name:lb,inputsCount:2,showOperators:!0,inputType:"time"});const UY="intl_datetime_before";uY(UY,function(t,[e]){const o=nH(t.value),n=nH(e);return null!==o&&null!==n&&o<n},{name:db,inputsCount:1,showOperators:!0,inputType:"datetime-local"});const jY="intl_datetime_before_or_equal";uY(jY,function(t,[e]){const o=nH(t.value),n=nH(e);return null!==o&&null!==n&&o<=n},{name:ub,inputsCount:1,showOperators:!0,inputType:"datetime-local"});const qY="intl_datetime_after";uY(qY,function(t,[e]){const o=nH(t.value),n=nH(e);return null!==o&&null!==n&&o>n},{name:hb,inputsCount:1,showOperators:!0,inputType:"datetime-local"});const GY="intl_datetime_after_or_equal";uY(GY,function(t,[e]){const o=nH(t.value),n=nH(e);return null!==o&&null!==n&&o>=n},{name:cb,inputsCount:1,showOperators:!0,inputType:"datetime-local"});const YY="intl_datetime_between";uY(YY,function(t,[e,o]){const n=nH(t.value),i=nH(e),s=nH(o);return null!==n&&null!==i&&null!==s&&(n>=i&&n<=s)},{name:lb,inputsCount:2,showOperators:!0,inputType:"datetime-local"});const XY="intl_datetime_tomorrow";uY(XY,function(t){const e=nH(t.value);if(null===e)return!1;const o=new Date;return o.setDate(o.getDate()+1),e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:pb,inputsCount:0,inputType:"datetime-local"});const KY="intl_datetime_today";uY(KY,function(t){const e=nH(t.value);if(null===e)return!1;const o=new Date;return e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:gb,inputsCount:0,inputType:"datetime-local"});const ZY="intl_datetime_yesterday";uY(ZY,function(t){const e=nH(t.value);if(null===e)return!1;const o=new Date;return o.setDate(o.getDate()-1),e.getFullYear()===o.getFullYear()&&e.getMonth()===o.getMonth()&&e.getDate()===o.getDate()},{name:fb,inputsCount:0,inputType:"datetime-local"});function QY(t,e){let o=t;return""===o&&(o=`(${e})`),o}function JY(t){const e=new Set(t);return function(t){return e.has(t)}}function tX(t){return null==t?"":t}function eX(t,e){return Array.from(new Set(t)).map(t=>tX(t)).sort(e??((t,e)=>"number"==typeof t&&"number"==typeof e?t-e:t===e?0:t>e?1:-1))}function oX(t,e,o,n){const i=[],s=t===e;let r;return s||(r=JY(e)),t.forEach(t=>{let e=!1;(s||r(t))&&(e=!0);const l={checked:e,value:t,visualValue:QY(t,o)};n&&n(l),i.push(l)}),i}uY("false",function(){return!1},{name:"False"}),function(t,e={}){Pe||(Pe="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 nX="by_value";uY(nX,function(t,[e]){return e(t.value)},{name:"By value",inputsCount:0,inputValuesDecorator:([t])=>[JY(t)],showOperators:!1});uY("true",function(){return!0},{name:"True"});const iX={};function sX(t,e,o){iX[t]={name:e,func:o}}const rX="conjunction";sX(rX,bb,function(t,e){return t.every(t=>t.func(e))});const lX="disjunction";sX(lX,vb,function(t,e){return t.some(t=>t.func(e))});const aX="disjunctionWithExtraCondition";sX(aX,vb,function(t,e){t.length<3&&ce("Operation doesn't work on less then three conditions.");const o=t[t.length-1];return t.slice(0,t.length-1).some(t=>Boolean(t.func(e)))&&Boolean(o.func(e))});const hX="numeric",cX="text",dX="date",uX="intl-date",gX="intl-time",pX="intl-datetime",fX={[hX]:[gY,iL,pY,fY,iL,mY,wY,iL,"gt","gte","lt","lte",bY,vY],[cX]:[gY,iL,pY,fY,iL,mY,wY,iL,CY,yY,iL,SY,kY],[dX]:[gY,iL,pY,fY,iL,mY,wY,iL,RY,EY,xY,MY,bY,iL,TY,HY,IY],[uX]:[gY,iL,pY,fY,iL,mY,wY,iL,_Y,AY,WY,OY,NY,iL,PY,DY,LY],[gX]:[gY,iL,pY,fY,iL,mY,wY,iL,CY,yY,iL,SY,kY,iL,zY,BY,VY,FY,$Y],[pX]:[gY,iL,pY,fY,iL,mY,wY,iL,UY,jY,qY,GY,YY,iL,XY,KY,ZY]};const mX="built",wX="building",bX=["click","input","keydown","keypress","keyup","focus","blur","change"];let vX=class t{static get DEFAULTS(){return fe({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===wX?this._element:this.buildState===mX?(this.update(),this._element):(this.buildState=wX,this.build(),this.buildState=mX,this._element)}isBuilt(){return this.buildState===mX}translateIfPossible(t){return"string"==typeof t&&t.startsWith(jw)?this.hot?.getTranslatedPhrase(t)??t:t}build(){if(!this._element||!this.hot)return;const t=this._element,{eventManager:e}=this,o=(t,o)=>{e?.addEventListener(t,o,t=>this.runLocalHooks(o,t,this))};if(this.buildState||(this.buildState=wX),t.dataset.hotInput="true",void 0!==this.options.tabIndex&&t.setAttribute("tabindex",String(this.options.tabIndex)),void 0!==this.options.role&&t.setAttribute("role",this.options.role),this.options.className&&po(t,this.options.className),this.options.children?.length)$(this.options.children,e=>{const o=e.element;o&&t.appendChild(o)});else if(this.options.wrapIt){const e=this.hot.rootDocument.createElement(this.options.tagName??"div");e.dataset.hotInput="true",ke(this.options,(t,o)=>{void 0!==e[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(e[o]=this.translateIfPossible(t))}),t.appendChild(e),$(bX,t=>o(e,t))}else $(bX,e=>o(t,e))}update(){}reset(){this.options.value="",this.update()}show(){const t=this.element;t&&(t.style.display="")}hide(){const t=this.element;t&&(t.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,o){this.eventManager=new _i(this),this.hot=e,this.options=ue(t.DEFAULTS,o),this._element=e.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName??"div")}};function CX(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function yX(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function SX(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,yX(t,e,"get"))}function kX(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,yX(t,e,"set"),o),o}function RX(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}be(vX,Wh);var EX=new WeakMap,xX=new WeakSet;class MX extends vX{static get DEFAULTS(){return fe({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}registerHooks(){this.addLocalHook("keyup",t=>RX(this,xX,TX).call(this,t)),this.addLocalHook("input",t=>RX(this,xX,TX).call(this,t)),this.addLocalHook("change",t=>RX(this,xX,TX).call(this,t))}build(){if(super.build(),!this._element||!this.hot)return;const t=this.hot.rootDocument.createElement("div");kX(this,EX,this._element.firstChild),po(this._element,"htUIInput"),po(t,"htUIInputIcon"),this._element.appendChild(t),this.update()}update(){this.isBuilt()&&SX(this,EX)&&(SX(this,EX).type=String(this.options.type??"text"),SX(this,EX).placeholder=String(this.translateIfPossible(this.options.placeholder)??""),SX(this,EX).value=String(this.translateIfPossible(this.options.value)??""))}setType(t){this.options.type=t,this.isBuilt()&&this.update()}focus(){this.isBuilt()&&SX(this,EX)?.focus()}constructor(t,e){var o,n;super(t,ue(MX.DEFAULTS,e)),CX(o=this,n=xX),n.add(o),function(t,e,o){CX(t,e),e.set(t,o)}(this,EX,{writable:!0,value:void 0}),kX(this,EX,null),this.registerHooks()}}function TX(t){this.options.value=no(t).value}function HX(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function IX(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function _X(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,IX(t,e,"get"))}function AX(t,e,o){HX(t,e),e.set(t,o)}function WX(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,IX(t,e,"set"),o),o}function OX(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function NX(t,e){HX(t,e),e.add(t)}var PX=new WeakMap,DX=new WeakMap,LX=new WeakMap,zX=new WeakMap,BX=new WeakMap,VX=new WeakSet,FX=new WeakSet,$X=new WeakSet;class UX extends vX{static get DEFAULTS(){return fe({className:"htUISelect",wrapIt:!1,tabIndex:-1})}getMenu(){return _X(this,PX)}registerHooks(){this.addLocalHook("click",()=>OX(this,$X,GX).call(this))}setItems(t){WX(this,DX,this.translateNames(t)),_X(this,PX)&&_X(this,PX).setMenuItems(_X(this,DX))}translateNames(t){return $(t,t=>{const e=t;e.name=this.translateIfPossible(e.name)}),t}build(){if(super.build(),!this.hot||!this._element)return;const t=this.hot,e=this._element;WX(this,PX,new Kz(t,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),_X(this,PX).setMenuItems(_X(this,DX));const o=new vX(t,{className:"htUISelectCaption"}),n=new vX(t,{className:"htUISelectDropdown"});if(WX(this,LX,o),WX(this,zX,o.element),WX(this,BX,n),t.getSettings().ariaTags){const t=n.element;t&&mo(t,[["aria-hidden","true"]]),mo(e,[["role","listbox"]])}$([o,n],t=>{const o=t.element;o&&e.appendChild(o)}),_X(this,PX).addLocalHook("select",t=>OX(this,VX,jX).call(this,t)),_X(this,PX).addLocalHook("afterClose",()=>OX(this,FX,qX).call(this)),this.update()}update(){if(!this.isBuilt())return;let t;t=this.options.value?this.options.value.name:_X(this,PX)?.hot?.getTranslatedPhrase(Gw),_X(this,zX)&&(_X(this,zX).textContent=t??null),super.update()}openOptions(){const t=this.element;if(!t)return;const e=t.getBoundingClientRect();_X(this,PX)&&(_X(this,PX).open(),_X(this,PX).setPosition({left:this.hot?.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height},()=>t.isConnected?t.getBoundingClientRect():null),_X(this,PX)?.getNavigator()?.toFirstItem(),_X(this,PX)?.getKeyboardShortcutsCtrl()?.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{this.closeOptions(),this.runLocalHooks("tabKeydown",t)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){_X(this,PX)&&_X(this,PX).close()}focus(){this.isBuilt()&&this.element?.focus()}destroy(){_X(this,PX)&&(_X(this,PX).destroy(),WX(this,PX,null)),_X(this,LX)&&_X(this,LX).destroy(),_X(this,BX)&&_X(this,BX).destroy(),super.destroy()}constructor(t,e){super(t,ue(UX.DEFAULTS,e)),NX(this,VX),NX(this,FX),NX(this,$X),AX(this,PX,{writable:!0,value:void 0}),AX(this,DX,{writable:!0,value:void 0}),AX(this,LX,{writable:!0,value:void 0}),AX(this,zX,{writable:!0,value:void 0}),AX(this,BX,{writable:!0,value:void 0}),WX(this,PX,null),WX(this,DX,[]),WX(this,LX,null),WX(this,zX,null),WX(this,BX,null),this.registerHooks()}}function jX(t){t.name!==iL&&(this.options.value=t,this.update(),this.runLocalHooks("select",this.options.value))}function qX(){this.runLocalHooks("afterClose")}function GX(){this.openOptions()}function YX(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function XX(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 KX=new WeakSet,ZX=new WeakSet;class QX extends aY{registerHooks(){this.getSelectElement().addLocalHook("select",t=>YX(this,KX,JX).call(this,t)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",t=>this.runLocalHooks("selectTabKeydown",t)),$(this.getInputElements(),t=>{t.addLocalHook("keydown",t=>YX(this,ZX,tK).call(this,t))})}setState(t){if(this.reset(),!t)return;const e=fe(t.command);"string"==typeof e.name&&e.name.startsWith(qw)&&(e.name=this.hot?.getTranslatedPhrase(e.name)??e.name),this.getSelectElement().setValue(e),$(t.args,(t,o)=>{if(o>(e.inputsCount??0)-1)return!1;const n=this.getInputElement(o);n.setType(e.inputType??"text"),n.setValue(t),n[(e.inputsCount??0)>o?"show":"hide"](),o||this.hot?._registerTimeout(()=>n.focus(),10)})}getState(){const t=this.getSelectElement().getValue()||dY(gY),e=[];return $(this.getInputElements(),(o,n)=>{(t.inputsCount??0)>n&&e.push(o.getValue())}),{command:t,args:e}}updateState(t,e){const o=dY(t?t.name:gY);this.state?.setValueAtIndex(e,{command:o,args:t?t.args:[]}),t||$(this.getInputElements(),t=>t.setValue(null))}getSelectElement(){return this.elements.find(t=>t instanceof UX)}getInputElement(t=0){return this.getInputElements()[t]}getInputElements(){return this.elements.filter(t=>t instanceof MX)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e,o,n,i,s)=>{en(e.parentNode)&&(po(e.parentNode,"htFiltersMenuCondition"),this.addSeparator&&po(e.parentNode,"border"));const r=this.hot?.rootDocument.createElement("div")??e.ownerDocument.createElement("div");return po(r,"htFiltersMenuLabel"),r.textContent=s,e.appendChild(r),e.parentElement?.hasAttribute("ghost-table")||$(this.elements,t=>{const o=t.element;o&&e.appendChild(o)}),e}}}reset(){const t=this.hot?.getPlugin("filters").getSelectedColumn()??null;let e=[dY(gY)];if(null!==t){const{visualIndex:o}=t;e=function(t){const e=[];let o=t;return fX[o]||(o=cX),$(fX[o],t=>{let o;o=t===iL?{name:iL}:{...dY(t)},e.push(o)}),e}(this.hot?.getDataType(0,o,this.hot.countRows(),o)??"text")}$(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}),XX(this,KX),XX(this,ZX),this.name="",this.addSeparator=!1,this.name=e.name,this.addSeparator=e.addSeparator,this.elements.push(new UX(t,{menuContainer:e.menuContainer})),this.elements.push(new MX(t,{placeholder:xb})),this.elements.push(new MX(t,{placeholder:Mb})),this.registerHooks()}}function JX(t){$(this.getInputElements(),(e,o)=>{e.setType(t.inputType??"text"),e[(t.inputsCount??0)>o?"show":"hide"](),0===o&&this.hot?._registerTimeout(()=>e.focus(),10)}),this.runLocalHooks("change",t)}function tK(t){gn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),pn(t))}function eK(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function oK(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,eK(t,e,"get"))}function nK(t,e,o){!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,o)}function iK(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,eK(t,e,"set"),o),o}var sK=new WeakMap,rK=new WeakMap;class lK extends vX{static get DEFAULTS(){return fe({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}build(){if(super.build(),!this.hot||!this._element)return;const t=this.hot.rootDocument.createElement("label"),e=this.options.label;t.textContent=String(this.translateIfPossible(e.textContent)??""),t.htmlFor=String(this.translateIfPossible(e.htmlFor)??""),iK(this,rK,t),iK(this,sK,this._element.firstChild),oK(this,sK).checked=this.options.checked,this._element.appendChild(t),this.update()}update(){if(!this.isBuilt())return;const t=this.options.label;oK(this,rK)&&(oK(this,rK).textContent=String(this.translateIfPossible(t.textContent)??""))}isChecked(){return!(!this.isBuilt()||!oK(this,sK))&&oK(this,sK).checked}setChecked(t=!0){this.isBuilt()&&oK(this,sK)&&(oK(this,sK).checked=t)}focus(){this.isBuilt()&&oK(this,sK)?.focus()}constructor(t,e){super(t,ue(lK.DEFAULTS,e)),nK(this,sK,{writable:!0,value:void 0}),nK(this,rK,{writable:!0,value:void 0}),iK(this,sK,null),iK(this,rK,null)}}function aK(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 hK=new WeakSet;class cK extends aY{getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>(en(e.parentNode)&&po(e.parentNode,"htFiltersMenuOperators"),$(this.elements,t=>{const o=t.element;o&&e.appendChild(o)}),e)}}buildOperatorsElement(t){const e=[rX,lX];$(e,o=>{const n=new lK(t,{name:"operator",label:{htmlFor:o,textContent:(i=o,iX[i].name)},value:o,checked:o===e[0],id:o});var i;n.addLocalHook("change",t=>function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,hK,dK).call(this,t)),this.elements.push(n)})}setChecked(t){this.elements.length<t&&ce(X`Radio button with index ${t} doesn't exist.`),$(this.elements,(e,o)=>{e.setChecked(o===t)})}getActiveOperationId(){const t=this.elements.find(t=>t instanceof lK&&t.isChecked());return t?String(t.getValue()??rX):rX}getState(){return this.getActiveOperationId()}setState(t){this.reset(),t&&this.getActiveOperationId()!==t&&$(this.elements,e=>{e.setChecked(e.getValue()===t)})}updateState(t=rX,e){let o=t;o===aX&&(o=lX),this.state?.setValueAtIndex(e,o)}reset(){this.setChecked(0)}constructor(t,e){super(t,{id:e.id,stateless:!1}),aK(this,hK),this.name="",this.name=e.name,this.buildOperatorsElement(t)}}function dK(t){this.setState(no(t).value)}function uK(t){if(null!==t&&"object"==typeof t&&"type"in t)return"date"===t.type||"intl-date"===t.type?(t,e)=>{const o=e;if(""===t&&""===o)return 0;if(""===t)return-1;if(""===o)return 1;const n=XT(t),i=XT(o);return null===n&&null===i?0:null===n?1:null===i?-1:n-i}:"intl-datetime"===t.type?(t,e)=>{const o=e;if(""===t&&""===o)return 0;if(""===t)return-1;if(""===o)return 1;const n=nH(t),i=nH(o);return null===n&&null===i?0:null===n?1:null===i?-1:n-i}:void 0}function gK(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function pK(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,gK(t,e,"get"))}function fK(t,e,o){!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,o)}function mK(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,gK(t,e,"set"),o),o}var wK=new WeakMap;class bK extends vX{static get DEFAULTS(){return fe({href:"#",tagName:"a",tabIndex:-1,role:"button"})}build(){super.build(),this._element&&mK(this,wK,this._element.firstChild)}update(){if(!this.isBuilt())return;const t=this.options.textContent;pK(this,wK)&&(pK(this,wK).textContent=String(this.translateIfPossible(t)))}focus(){this.isBuilt()&&pK(this,wK)&&pK(this,wK).focus()}activate(){pK(this,wK)?.click()}constructor(t,e){super(t,ue(bK.DEFAULTS,e)),fK(this,wK,{writable:!0,value:void 0}),mK(this,wK,null)}}function vK(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function CK(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function yK(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,CK(t,e,"get"))}function SK(t,e,o){vK(t,e),e.set(t,o)}function kK(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,CK(t,e,"set"),o),o}function RK(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function EK(t,e){vK(t,e),e.add(t)}const xK="multipleSelect.itemBox";var MK=new WeakMap,TK=new WeakMap,HK=new WeakMap,IK=new WeakMap,_K=new WeakMap,AK=new WeakMap,WK=new WeakMap,OK=new WeakSet,NK=new WeakSet,PK=new WeakSet,DK=new WeakSet,LK=new WeakSet;class zK extends vX{static get DEFAULTS(){return fe({className:"htUIMultipleSelect",value:[]})}getItemsBox(){return yK(this,TK)}registerHooks(){yK(this,_K)?.addLocalHook("keydown",t=>RK(this,PK,FK).call(this,t)),yK(this,_K)?.addLocalHook("input",t=>RK(this,NK,VK).call(this,t)),yK(this,AK)?.addLocalHook("click",t=>RK(this,DK,$K).call(this,t)),yK(this,WK)?.addLocalHook("click",t=>RK(this,LK,UK).call(this,t))}setItems(t){kK(this,MK,t),kK(this,HK,null),yK(this,TK)?.loadData(yK(this,MK))}setLocale(t){yK(this,IK)!==t&&kK(this,HK,null),kK(this,IK,t)}getLocale(){return yK(this,IK)}getItems(){return[...yK(this,MK)]}getValue(){return function(t){const e=[];return t.forEach(t=>{t.checked&&e.push(t.value)}),e}(yK(this,MK))}getSearchInputElement(){return yK(this,_K)}getSelectAllElement(){return yK(this,AK)}getClearAllElement(){return yK(this,WK)}isSelectedAllValues(){return yK(this,MK).length===this.getValue().length}build(){if(super.build(),!this.hot||!this._element)return;const t=this.hot,e=this._element,{rootDocument:o}=t,n=o.createElement("div"),i=new vX(t,{className:"htUISelectionControls",children:[yK(this,AK),yK(this,WK)].filter(t=>null!==t)}),s=yK(this,_K)?.element,r=i.element;s&&e.appendChild(s),r&&e.appendChild(r),e.appendChild(n),yK(this,TK)?.destroy(),po(n,"htUIMultipleSelectHot"),kK(this,TK,new t.constructor(n,{data:[[]],columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(t,e,o,n,i,s)=>{const r=s;t.title=r.instance.getDataAtRowProp(e,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{yK(this,TK)?.listen()},modifyColWidth:t=>{const e=(yK(this,TK)?.container.scrollWidth??0)-jo(o);return void 0!==t&&t<e?e:t},autoColumnSize:!0,autoRowSize:!1,hiddenRows:!0,maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:t.getCurrentThemeName(),layoutDirection:t.isRtl()?"rtl":"ltr"})),yK(this,TK).init();const l=yK(this,TK).getShortcutManager().getContext("grid");l&&(l.removeShortcutsByKeys(["Tab"]),l.removeShortcutsByKeys(["Shift","Tab"]),l.addShortcut({keys:[["Escape"]],callback:t=>{this.runLocalHooks("keydown",t,this)},group:xK}),l.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{yK(this,TK)?.deselectCell(),this.runLocalHooks("keydown",t,this),this.runLocalHooks("listTabKeydown",t,this)},group:xK}))}focus(){this.isBuilt()&&yK(this,TK)?.listen()}reset(){yK(this,_K)?.reset(),yK(this,AK)?.reset(),yK(this,WK)?.reset()}update(){this.isBuilt()&&yK(this,TK)&&0!==yK(this,TK).rootElement.offsetHeight&&(yK(this,TK).updateSettings({data:jK(yK(this,MK),this.options.value)}),super.update())}destroy(){yK(this,TK)?.destroy(),yK(this,_K)?.destroy(),yK(this,WK)?.destroy(),yK(this,AK)?.destroy(),kK(this,_K,null),kK(this,WK,null),kK(this,AK,null),kK(this,TK,null),yK(this,MK).length=0,kK(this,HK,null),super.destroy()}constructor(t,e){super(t,ue(zK.DEFAULTS,e)),EK(this,OK),EK(this,NK),EK(this,PK),EK(this,DK),EK(this,LK),SK(this,MK,{writable:!0,value:void 0}),SK(this,TK,{writable:!0,value:void 0}),SK(this,HK,{writable:!0,value:void 0}),SK(this,IK,{writable:!0,value:void 0}),SK(this,_K,{writable:!0,value:void 0}),SK(this,AK,{writable:!0,value:void 0}),SK(this,WK,{writable:!0,value:void 0}),kK(this,MK,[]),kK(this,TK,null),kK(this,HK,null),kK(this,IK,""),kK(this,_K,null),kK(this,AK,null),kK(this,WK,null),kK(this,_K,new MX(t,{placeholder:Eb,className:"htUIMultipleSelectSearch"})),kK(this,AK,new bK(t,{textContent:yb,className:"htUISelectAll"})),kK(this,WK,new bK(t,{textContent:Sb,className:"htUIClearAll"})),this.registerHooks()}}function BK(){return null===yK(this,HK)&&kK(this,HK,yK(this,MK).map(t=>An(`${t.value}`,this.getLocale()))),yK(this,HK)}function VK(t){const e=An(no(t).value.trim(),this.getLocale()),o=RK(this,OK,BK).call(this);if("apply"===this.options.searchMode){const t=yK(this,TK)?.getPlugin("hiddenRows"),n=[];t&&t.showRows(t.getHiddenRows()),yK(this,MK).forEach((t,i)=>{t.checked=o[i].indexOf(e)>=0,t.checked||n.push(i)}),t&&t.hideRows(n),yK(this,TK)?.view.adjustElementsSize(),yK(this,TK)?.render()}else{let t;t=""===e?[...yK(this,MK)]:yK(this,MK).filter((t,n)=>o[n].indexOf(e)>=0),yK(this,TK)?.loadData(t)}}function FK(t){this.runLocalHooks("keydown",t,this),gn(t.keyCode,"ARROW_DOWN")&&(t.preventDefault(),pn(t),yK(this,TK)?.listen(),yK(this,TK)?.selectCell(0,0))}function $K(t){const e=[];t.preventDefault(),yK(this,TK)&&(yK(this,TK).getSourceData().forEach((t,o)=>{t.checked=!0,e.push(af(t,o)[0])}),yK(this,TK).setSourceDataAtCell(e))}function UK(t){const e=[];t.preventDefault(),yK(this,TK)&&(yK(this,TK).getSourceData().forEach((t,o)=>{t.checked=!1,e.push(af(t,o)[0])}),yK(this,TK).setSourceDataAtCell(e))}function jK(t,e){const o=JY(e);return t.map(t=>(t.checked=o(t.value),t))}function qK(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function GK(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 YK=new WeakSet,XK=new WeakSet,KK=new WeakSet,ZK=new WeakSet;class QK extends aY{registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",t=>qK(this,XK,tZ).call(this,t)).addLocalHook("listTabKeydown",t=>this.runLocalHooks("listTabKeydown",t)),this.hot?.addHook("modifyFiltersMultiSelectValue",(t,e)=>qK(this,ZK,oZ).call(this,t,e))}getElements(){const t=this.getMultipleSelectElement();return[t.getSearchInputElement(),t.getSelectAllElement(),t.getClearAllElement(),this.getMultipleSelectElement()]}setState(t){if(t&&t.command.key===nX){super.reset();const e=this.getMultipleSelectElement();return e.setItems(t.itemsSnapshot),e.setValue(t.args[0]),void e.setLocale(t.locale)}this.reset()}getState(){const t=this.getMultipleSelectElement(),e=t.getItems();return{command:{key:t.isSelectedAllValues()||!e.length?gY:nX},args:[t.getValue()],itemsSnapshot:e}}updateState(t){const e=(e,o,n,i,s)=>{const[r]=V(o,t=>t.name===nX),l={};if(r){const o=i(e,s);n&&(r.args[0]=n);const{itemsSnapshot:a,selectedValues:h}=qK(this,YK,JK).call(this,e,o,r.args[0]),c=t.editedConditionStack.column;l.locale=this.hot?.getCellMetaTransient(0,c).locale,l.args=[h],l.command=dY(nX),l.itemsSnapshot=a}else l.args=[],l.command=dY(gY);this.state?.setValueAtIndex(e,l)};e(t.editedConditionStack.column,t.editedConditionStack.conditions,t.conditionArgsChange,t.filteredRowsFactory),t.dependentConditionStacks.length&&e(t.dependentConditionStacks[0].column,t.dependentConditionStacks[0].conditions,void 0,t.filteredRowsFactory,t.editedConditionStack)}getMultipleSelectElement(){return this.elements.find(t=>t instanceof zK)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden()||"function"==typeof this.hiddenWhen&&this.hiddenWhen(),renderer:(t,e,o,n,i,s)=>{en(e.parentNode)&&po(e.parentNode,"htFiltersMenuValue");const r=this.hot?.rootDocument.createElement("div")??e.ownerDocument.createElement("div");return po(r,"htFiltersMenuLabel"),r.textContent=s,e.appendChild(r),e.parentElement?.hasAttribute("ghost-table")||$(this.elements,t=>{const o=t.element;o&&e.appendChild(o)}),e}}}reset(){const t=this.hot?.getTranslatedPhrase(Cb)??"",e=this._getColumnVisibleValues(),o=e.map(t=>t.value),n=this.hot?.hasHook("modifyFiltersMultiSelectValue")?new Map(e.map(t=>[t.value,t.meta])):null,i=e[0]?.meta,s=eX(o,uK(i)),r=oX(s,s,t,t=>{qK(this,KK,eZ).call(this,t,n)});this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(s);const l=this.hot?.getPlugin("filters").getSelectedColumn()??null;null!==l&&this.getMultipleSelectElement().setLocale(this.hot?.getCellMetaTransient(0,l.visualIndex).locale)}_getColumnVisibleValues(){const t=this.hot?.getPlugin("filters"),e=t?.getSelectedColumn()??null;return t&&null!==e?t._getValueListDataAtColumn(e.visualIndex):[]}constructor(t,e){super(t,{id:e.id,stateless:!1}),GK(this,YK),GK(this,XK),GK(this,KK),GK(this,ZK),this.name="",this.name=e.name,this.searchMode=e.searchMode,this.hiddenWhen=e.hiddenWhen,this.elements.push(new zK(t,{searchMode:this.searchMode})),this.registerHooks()}}function JK(t,e,o){const n=this.hot?.getTranslatedPhrase(Cb)??"",i=F(e,t=>t.value),s=this.hot?.hasHook("modifyFiltersMultiSelectValue")?new Map(e.map(e=>[e.value,this.hot?.getCellMetaTransient(e.row,t)])):null,r=e[0]?.meta,l=eX(i,uK(r)),a=[];return{itemsSnapshot:oX(l,o,n,t=>{t.checked&&a.push(t.value),qK(this,KK,eZ).call(this,t,s)}),selectedValues:a}}function tZ(t){gn(t.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),pn(t)),gn(t.keyCode,"ENTER")&&("apply"===this.searchMode&&this.runLocalHooks("accept"),pn(t))}function eZ(t,e){e&&this.hot?.hasHook("modifyFiltersMultiSelectValue")&&(t.visualValue=this.hot?.runHooks("modifyFiltersMultiSelectValue",t.visualValue,e.get(t.value)))}function oZ(t,e){return e.valueFormatter?e.valueFormatter(t,e):t}function nZ(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 iZ=new WeakSet;class sZ extends aY{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}registerHooks(){$(this.elements,t=>{t.addLocalHook("click",(t,e)=>function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,iZ,rZ).call(this,t,e))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(t,e)=>(en(e.parentNode)&&po(e.parentNode,"htFiltersMenuActionBar"),$(this.elements,t=>{const o=t.element;o&&e.appendChild(o)}),e)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}constructor(t,e){super(t,{id:e.id,stateless:!0}),nZ(this,iZ),this.name="",this.name=e.name,this.elements.push(new MX(t,{type:"button",value:kb,className:"htUIButton htUIButtonOK",identifier:sZ.BUTTON_OK})),this.elements.push(new MX(t,{type:"button",value:Rb,className:"htUIButton htUIButtonCancel",identifier:sZ.BUTTON_CANCEL})),this.registerHooks()}}function rZ(t,e){e.options.identifier===sZ.BUTTON_OK?this.accept():this.cancel()}const lZ="ConditionCollection.filteringStates";class aZ{isEmpty(){return 0===this.getFilteredColumns().length}isMatch(t,e){const o=this.filteringStates.getValueAtIndex(e),n=o?.conditions??[],i=o?.operation;return this.isMatchInConditions(n,t,i)}isMatchInConditions(t,e,o=rX){return!t.length||function(t){iX[t]||ce(`Operation with id "${t}" does not exist.`);const e=iX[t].func;return function(t,o){return e(t,o)}}(o)(t,e)}addCondition(t,e,o=rX,n){const i=this.hot.getCellMetaTransient(0,t).locale,s=e.args.map(t=>"string"==typeof t?An(t,i):t),r=e.name||e.command.key;this.runLocalHooks("beforeAdd",t);const l=this.getOperation(t);l?l!==o&&ce(X`The column of index ${t} has been already applied with a \`${l}\`\x20
|
|
109
|
+
filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
|
|
110
|
+
Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
|
|
111
|
+
use it consequently for a particular column).`):Wt(iX[o])&&ce(X`Unexpected operation named \`${o}\`. Possible ones are\x20
|
|
112
|
+
\`disjunction\` and \`conjunction\`.`);const a=this.getConditions(t);0===a.length?this.filteringStates.setValueAtIndex(t,{operation:o,conditions:[{name:r,args:s,func:cY(r,s)}]},n):a.push({name:r,args:s,func:cY(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,o])=>{const{operation:n,conditions:i}=o;return t.push({column:e,operation:n,conditions:i.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 o=this.getConditions(t);return e?o.some(t=>t.name===e):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(lZ),this.clearLocalHooks(),this.filteringStates=null}constructor(t,e=!0){this.hot=t,this.isMapRegistrable=e,!0===this.isMapRegistrable?this.filteringStates=this.hot.columnIndexMapper.createAndRegisterIndexMap(lZ,"linkedPhysicalIndexToValue"):(this.filteringStates=new im,this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes()))}}be(aZ,Wh);class hZ{filter(){let t=[];return $(this.conditionCollection.getFilteredColumns(),(e,o)=>{let n;if(o){const o=F(t,t=>t.row);n=this.columnDataFactory(e,o)}else n=this.columnDataFactory(e);t=this.filterByColumn(e,n)}),t}filterByColumn(t,e=[]){const o=[];return $(e,e=>{void 0!==e&&this.conditionCollection.isMatch(e,t)&&o.push(e)}),o}constructor(t,e=()=>[]){this.conditionCollection=t,this.columnDataFactory=e}}function cZ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function dZ(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function uZ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,dZ(t,e,"get"))}function gZ(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,dZ(t,e,"set"),o),o}function pZ(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function fZ(t,e){cZ(t,e),e.add(t)}var mZ=new WeakMap,wZ=new WeakSet,bZ=new WeakSet,vZ=new WeakSet,CZ=new WeakSet,yZ=new WeakSet,SZ=new WeakSet;class kZ{groupChanges(){this.grouping=!0}flush(){this.grouping=!1,pZ(this,wZ,RZ).call(this,()=>{$(this.changes,t=>{this.updateStatesAtColumn(t)})}),this.changes.length=0}updateStatesAtColumn(t,e){this.grouping?-1===this.changes.indexOf(t)&&this.changes.push(t):pZ(this,wZ,RZ).call(this,()=>pZ(this,CZ,MZ).call(this,t,e))}destroy(){this.clearLocalHooks(),ke(this,(t,e)=>{this[e]=null})}constructor(t,e,o=()=>[]){var n,i,s;fZ(this,wZ),fZ(this,bZ),fZ(this,vZ),fZ(this,CZ),fZ(this,yZ),fZ(this,SZ),s={writable:!0,value:void 0},cZ(n=this,i=mZ),i.set(n,s),this.changes=[],this.grouping=!1,this.latestEditedColumnPosition=-1,this.latestOrderStack=[],gZ(this,mZ,null),this.hot=t,this.conditionCollection=e,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",t=>pZ(this,vZ,xZ).call(this,t)),this.conditionCollection.addLocalHook("afterRemove",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("afterAdd",t=>this.updateStatesAtColumn(t)),this.conditionCollection.addLocalHook("beforeClean",()=>pZ(this,yZ,TZ).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>pZ(this,SZ,HZ).call(this))}}function RZ(t){if(null===uZ(this,mZ)){gZ(this,mZ,new Map);try{t()}finally{gZ(this,mZ,null)}}else t()}function EZ(t,e){if(e||null===uZ(this,mZ))return this.columnDataFactory(t,e);let o=uZ(this,mZ).get(t);return o||(o=this.columnDataFactory(t),uZ(this,mZ).set(t,o)),o}function xZ(t){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(t)}function MZ(t,e){const o=this.conditionCollection.exportAllConditions();let n=this.conditionCollection.getColumnStackPosition(t);-1===n&&(n=this.latestEditedColumnPosition);const i=o.slice(0,n),s=o.slice(n);s.length&&s[0].column===t&&s.shift();const r=function(t){const e=t.length;return function o(n){return function(...i){const s=n.concat(i);let r;return r=s.length>=e?t.apply(this,s):o(s),r}}([])}((t,e,o=[])=>{const n=new aZ(this.hot,!1),i=[].concat(t,o);n.importAllConditions(i);const s=pZ(this,bZ,EZ).call(this,Number(e));let r;r=n.isEmpty()?s:new hZ(n,(t,e)=>pZ(this,bZ,EZ).call(this,t,e)).filter(),r=F(r,t=>t.row);const l=JY(r);return n.destroy(),V(s,t=>l(t.row))})(i),l=[...this.conditionCollection.getConditions(t)];this.runLocalHooks("update",{editedConditionStack:{column:t,conditions:l},dependentConditionStacks:s,filteredRowsFactory:r,conditionArgsChange:e})}function TZ(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function HZ(){pZ(this,wZ,RZ).call(this,()=>{$(this.latestOrderStack,t=>{this.updateStatesAtColumn(t)})})}be(kZ,Wh);const IZ="filters";function _Z(t,e){let o,n=-1;const i=(s=e,vz({initialPage:0,size:()=>s.length,onItemSelect:(t,e)=>{const o=s[t];if(o instanceof zK)return e;const n=o;if(en(n.element)&&!xo(n.element))return!1;o.focus()}}));var s;const r=t=>()=>{o.isOpened()&&o.getKeyboardShortcutsCtrl().listen(IZ),i.setCurrentPage(e.indexOf(t))};function l(t){const s=o.getKeyboardShortcutsCtrl(),r=t.getKeyboardShortcutsCtrl();i.clear(),r.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(IZ),callback:()=>{t.isSubMenu()&&t.close(),s.listen(IZ)}}]),t.isSubMenu()||s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const e=o.getNavigator();e.getCurrentPage()>-1&&(n=e.getCurrentPage()),e.clear(),t.shiftKey?i.toPreviousItem():i.toNextItem()}},{keys:[["Escape"]],callback:()=>{o.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:t=>{const o=e[i.getCurrentPage()];o instanceof UX&&(o.openOptions(),t.preventDefault()),o instanceof bK&&(o.activate(),t.preventDefault()),o instanceof vX||t.preventDefault()}}],IZ)}function a(t){t.addLocalHook("afterSelectionChange",t=>{t.key.startsWith("filter_")||i.clear()}),t.addLocalHook("afterSubmenuOpen",l),t.addLocalHook("afterOpen",l),o=t}return e.forEach(t=>{t instanceof vX&&(t.addLocalHook("click",r(t)),t.addLocalHook("focus",r(t)),t.addLocalHook("afterClose",r(t)))}),a(t),{...i,listen:function(){o.focus(),o.getKeyboardShortcutsCtrl().listen(IZ)},setMenu:a,getMenu:function(){return o},getLastMenuPage:function(){return n}}}function AZ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function WZ(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function OZ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,WZ(t,e,"get"))}function NZ(t,e,o){AZ(t,e),e.set(t,o)}function PZ(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,WZ(t,e,"set"),o),o}function DZ(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function LZ(t,e){AZ(t,e),e.add(t)}const zZ="filters",BZ=zZ;var VZ=new WeakMap,FZ=new WeakMap,$Z=new WeakMap,UZ=new WeakMap,jZ=new WeakMap,qZ=new WeakSet,GZ=new WeakSet,YZ=new WeakSet,XZ=new WeakMap,KZ=new WeakMap,ZZ=new WeakMap,QZ=new WeakMap,JZ=new WeakMap,tQ=new WeakMap,eQ=new WeakMap,oQ=new WeakMap,nQ=new WeakSet,iQ=new WeakSet,sQ=new WeakSet,rQ=new WeakMap,lQ=new WeakSet;class aQ extends pW{static get PLUGIN_KEY(){return zZ}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()[zZ]}enablePlugin(){if(this.enabled)return;PZ(this,jZ,!0===this.hot.runHooks("hasExternalDataSource")),this.filtersRowsMap=this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName??"","trimming"),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const t=this.hot.getSettings().dropdownMenu,e="object"==typeof t?t.uiContainer:null,o=en(e)?e:this.hot.rootPortalElement,n=t=>(t.addLocalHook("accept",()=>DZ(this,nQ,uQ).call(this,"accept")),t.addLocalHook("cancel",()=>DZ(this,nQ,uQ).call(this,"cancel")),t.addLocalHook("change",e=>DZ(this,iQ,gQ).call(this,t,e)),t),i=()=>`${this.hot.getTranslatedPhrase(mb)}:`,s=()=>`${this.hot.getTranslatedPhrase(wb)}:`;if(!this.components.get("filter_by_condition")){const t=new QX(this.hot,{id:"filter_by_condition",name:i,addSeparator:!1,menuContainer:o});t.addLocalHook("afterClose",()=>DZ(this,sQ,pQ).call(this)),this.components.set("filter_by_condition",n(t))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new cK(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const t=new QX(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:o});t.addLocalHook("afterClose",()=>DZ(this,sQ,pQ).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 QK(this.hot,{id:"filter_by_value",name:s,searchMode:t,hiddenWhen:()=>OZ(this,jZ)})))}if(this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new sZ(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new aZ(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new kZ(this.hot,this.conditionCollection,(t,e)=>this.getDataMapAtColumn(t,e)),this.conditionUpdateObserver.addLocalHook("update",t=>DZ(this,lQ,fQ).call(this,t))),this.components.forEach(t=>t?.show()),this.addHook("afterDropdownMenuDefaultOptions",OZ(this,oQ)),this.addHook("beforeDropdownMenuShow",OZ(this,eQ)),this.addHook("afterDropdownMenuShow",OZ(this,JZ)),this.addHook("afterDropdownMenuHide",OZ(this,tQ)),this.addHook("afterChange",OZ(this,XZ)),this.addHook("afterUpdateData",OZ(this,KZ)),this.addHook("afterDataProviderFetch",OZ(this,ZZ)),this.addHook("afterDataProviderFetchError",OZ(this,QZ)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!OZ(this,VZ)&&this.dropdownMenuPlugin?.enabled){const t=[{focus:()=>{const t=OZ(this,VZ);if(!t)return;const e=t.getMenu(),o=e.getNavigator(),n=t.getLastMenuPage();e.focus(),n>0?o?.setCurrentPage(n):o?.toFirstItem()}},...Array.from(this.components).map(([,t])=>t?.getElements()??[]).flat()];PZ(this,VZ,_Z(this.dropdownMenuPlugin.menu,t));const e=t=>{OZ(this,VZ)?.listen(),t.preventDefault(),gn(t.keyCode,"TAB")&&(t.shiftKey?OZ(this,VZ)?.toPreviousItem():OZ(this,VZ)?.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.conditionUpdateObserver?.destroy(),this.conditionUpdateObserver=null,this.conditionCollection?.destroy(),this.conditionCollection=null,PZ(this,VZ,void 0),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:BZ})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(BZ)}addCondition(t,e,o,n=rX){if(e===nX&&OZ(this,jZ))return;const i=this.hot.toPhysicalColumn(t);this.conditionCollection?.addCondition(i,{command:{key:e},args:o},n)}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.conditionUpdateObserver?.groupChanges(),this.conditionCollection?.importAllConditions(t),this.conditionUpdateObserver?.flush()}exportConditions(){return this.conditionCollection?.exportAllConditions()??[]}filter(){const{navigableHeaders:t}=this.hot.getSettings(),e=!this.conditionCollection?.isEmpty(),o=this.exportConditions();OZ(this,jZ)&&PZ(this,UZ,pe(OZ(this,$Z)));const n=this.hot.runHooks("beforeFilter",o,OZ(this,$Z));if(!1!==n&&e){const e=F(this._createDataFilter().filter(),t=>t.row),o=JY(e),n=this.hot.countSourceRows(),i=new Array(n);for(let t=0;t<n;t++)i[t]=!o(t);this.hot.batchExecution(()=>{this.filtersRowsMap?.setValues(i)},!0),t||e.length||this.hot.deselectCell(),PZ(this,$Z,this.exportConditions())}else!1===n||e?OZ(this,jZ)?PZ(this,$Z,this.exportConditions()):this.importConditions(OZ(this,$Z)):(PZ(this,$Z,this.exportConditions()),this.filtersRowsMap?.clear());if(this.hot.selection.isSelected()){const e=this.hot.getSelectedRangeActive()?.highlight.col;null!=e&&this.hot.selectCell(t?-1:0,e)}!1!==n&&(this.hot.runHooks("afterFilter",o),this.hot.view.adjustElementsSize(),this.hot.render())}getSelectedColumn(){const t=this.hot.getSelectedRangeActive()?.highlight;return t&&null!==t.col?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(t,e){const o=e?e.length:this.hot.countSourceRows(),n=this.hot.toVisualColumn(t),i=[];for(let s=0;s<o;s++){const o=e?e[s]:s,r=this.hot._getMetaManager().getCellMetaUncached(o,t,{visualRow:o,visualColumn:t});let l=Si(this.hot.getSourceDataAtCell(o,n),r);if(this.hot.hasHook("modifyData")){const e=Me(l);this.hot.runHooks("modifyData",o,t,e,"get"),e.isTouched()&&(l=e.value)}i.push({row:o,meta:r,value:tX(l)})}return i}updateValueComponentCondition(t){const e=this.hot.toVisualColumn(t),o=eX(this.hot.getDataAtCol(e),uK(this.hot.countRows()>0?this.hot.getCellMetaTransient(0,e):null));this.conditionUpdateObserver?.updateStatesAtColumn(t,o)}restoreComponents(t){const e=this.getSelectedColumn()?.physicalIndex??-1;t.forEach(t=>{t.isHidden()||t.restoreState(e)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(t,e,o,n){let i=t;const s=e.command?.key,r=o.command?.key,l=n.command?.key;return i===lX&&s!==gY&&r!==gY&&l!==gY?i=aX:l!==gY&&(s!==gY&&r!==gY||(i=rX)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const t=DZ(this,qZ,hQ).call(this,"filter_by_condition"),e=(t?.getState()??{command:{}}).command,o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")].filter(t=>null!=t);e?.showOperators?this.showComponents(...o):this.hideComponents(...o)}_getValueListDataAtColumn(t){const e=this.hot.toPhysicalColumn(t),o=this.conditionCollection?.getColumnStackPosition(e)??-1;if(-1===o||OZ(this,jZ))return F(this.hot.getDataAtCol(t),(e,o)=>({value:tX(e),meta:this.hot.getCellMetaTransient(o,t)}));const n=this.getDataMapAtColumn(e),i=(this.conditionCollection?.exportAllConditions()??[]).slice(0,o);if(0===i.length)return n;const s=new aZ(this.hot,!1);s.importAllConditions(i);const r=JY(F(this._createDataFilter(s).filter(),t=>t.row));return s.destroy(),V(n,t=>r(t.row))}_createDataFilter(t=this.conditionCollection){return t||(t=new aZ(this.hot,!1)),new hZ(t,(t,e)=>this.getDataMapAtColumn(t,e))}getIndexesOfComponents(...t){const e=this.dropdownMenuPlugin?.menu;return e?t.map(t=>e.getItemPositionByKey(String(t.getMenuItemDescriptor().key))).filter(t=>-1!==t):[]}changeComponentsVisibility(t=!0,...e){if(!this.dropdownMenuPlugin)return;const o=this.dropdownMenuPlugin.menu;if(!o)return;const n=o.hotMenu;if(!n)return;const i=n.getPlugin("hiddenRows"),s=this.getIndexesOfComponents(...e);t?i.showRows(s):i.hideRows(s),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),LZ(this,qZ),LZ(this,GZ),LZ(this,YZ),LZ(this,nQ),LZ(this,iQ),LZ(this,sQ),LZ(this,lQ),NZ(this,VZ,{writable:!0,value:void 0}),NZ(this,FZ,{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,XZ,{writable:!0,value:void 0}),NZ(this,KZ,{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,tQ,{writable:!0,value:void 0}),NZ(this,eQ,{writable:!0,value:void 0}),NZ(this,oQ,{writable:!0,value:void 0}),NZ(this,rQ,{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,PZ(this,FZ,new WeakSet),PZ(this,$Z,[]),PZ(this,UZ,[]),PZ(this,jZ,!1),PZ(this,XZ,t=>{if(t){const e=new Set;$(t,t=>{const[,o]=t,n=this.hot.propToCol(o),i=this.hot.toPhysicalColumn(n);this.conditionCollection?.hasConditions(i)&&e.add(i)}),e.forEach(t=>{this.updateValueComponentCondition(t)})}}),PZ(this,KZ,(t,e)=>{if(e||OZ(this,jZ)||!this.conditionCollection)return;const o=this.conditionCollection?.getFilteredColumns()??[];0!==o.length&&$(o,t=>{this.conditionUpdateObserver?.updateStatesAtColumn(t)})}),PZ(this,ZZ,t=>{this.importConditions(t?.filtersConditionsStack??[])}),PZ(this,QZ,()=>{this.importConditions(OZ(this,UZ))}),PZ(this,JZ,()=>{const t=this.dropdownMenuPlugin?.menu;t&&(this.restoreComponents(Array.from(this.components.values()).filter(t=>null!==t)),t.updateMenuDimensions())}),PZ(this,tQ,()=>{this.components.get("filter_by_condition")?.getSelectElement()?.closeOptions(),this.components.get("filter_by_condition2")?.getSelectElement()?.closeOptions()}),PZ(this,eQ,()=>{const t=this.dropdownMenuPlugin?.menu;t&&(OZ(this,FZ).has(t)||OZ(this,VZ)?.setMenu(t),OZ(this,FZ).add(t))}),PZ(this,oQ,t=>{t.items.push({name:iL}),this.components.forEach(e=>{e&&t.items.push(e.getMenuItemDescriptor())})}),PZ(this,rQ,(t,e)=>{const o=this.hot.toPhysicalColumn(t);this.enabled&&this.conditionCollection?.hasConditions(o)&&ho(e)?po(e,"htFiltersActive"):fo(e,"htFiltersActive")}),this.hot.addHook("afterGetColHeader",OZ(this,rQ))}}function hQ(t){return this.components.get(t)??null}function cQ(){return this.components.get("filter_operators")??null}function dQ(){return this.components.get("filter_by_value")??null}function uQ(t){if("accept"===t){const t=this.getSelectedColumn();if(null===t)return void this.dropdownMenuPlugin?.close();const{physicalIndex:e}=t,o={command:{key:gY},args:[]},n=DZ(this,qZ,hQ).call(this,"filter_by_condition")?.getState()??o,i=DZ(this,qZ,hQ).call(this,"filter_by_condition2")?.getState()??o,s=DZ(this,YZ,dQ).call(this)?.getState()??o,r=this.getOperationBasedOnArguments(DZ(this,GZ,cQ).call(this)?.getActiveOperationId()??rX,n,i,s);this.conditionUpdateObserver?.groupChanges();let l=this.conditionCollection?.getColumnStackPosition(e);void 0!==l&&-1!==l||(l=void 0),this.conditionCollection?.removeConditions(e);const a=n.command?.key,h=i.command?.key,c=s.command?.key;a!==gY&&(this.conditionCollection?.addCondition(e,n,r,l),h!==gY&&this.conditionCollection?.addCondition(e,i,r,l)),c===gY||OZ(this,jZ)||this.conditionCollection?.addCondition(e,s,r,l),this.conditionUpdateObserver?.flush(),this.components.forEach(t=>t?.saveState(e)),this.filter()}this.dropdownMenuPlugin?.close()}function gQ(t,e){const o=this.dropdownMenuPlugin?.menu;this.updateDependentComponentsVisibility(),t.constructor!==QX||e.inputsCount||this.setListeningDropdownMenu(),o?.updateMenuDimensions()}function pQ(){this.setListeningDropdownMenu()}function fQ(t){if(!this.dropdownMenuPlugin?.enabled)return;const e=t.editedConditionStack,o=e.conditions,n=e.column,i=t.conditionArgsChange;Array.isArray(i)&&PZ(this,$Z,OZ(this,$Z).map(t=>(t.column===n&&o.length>0&&t.conditions.forEach(t=>{"by_value"===t.name&&(t.args=[[...i]])}),t)));const s=o.filter(t=>t.name===nX),r=o.filter(t=>t.name!==nX);if(s.length>=2||r.length>=3)Xe(X`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
|
|
113
|
+
The dropdown menu supports at most 2 regular conditions and 1 'filter by value' condition per column,\x20
|
|
114
|
+
but more were provided. For more details see the documentation.`);else{const e=this.conditionCollection?.getOperation(n);DZ(this,qZ,hQ).call(this,"filter_by_condition")?.updateState(r[0],n),DZ(this,qZ,hQ).call(this,"filter_by_condition2")?.updateState(r[1],n),DZ(this,GZ,cQ).call(this)?.updateState(e??rX,n),DZ(this,YZ,dQ).call(this)?.updateState(t)}}const mQ="internal-use-in-handsontable",wQ={licenseKey:mQ,maxRows:1/0,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:["YYYY-MM-DD"],timeFormats:["hh:mm","hh:mm:ss","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"},bQ=["maxRows","maxColumns"];function vQ(t){return Object.keys(t).reduce((e,o)=>(bQ.includes(o)||(e[o]=t[o]),e),{})}function CQ(t){const e=t[RJ];return{language:e?.language?.langCode}}function yQ(t){return Object.keys(t).reduce((e,o)=>("hyperformula"!==o&&(e[o]=t[o]),e),{})}function SQ(){const t="engine_relationship",e=oi(RJ);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function kQ(){const t="shared_engine_usage",e=oi(RJ);return e.hasItem(t)||e.register(t,new Map),e.getItem(t)}function RQ(t,e,o){const n=e[RJ],i=function(t){const e=t[RJ],o=e?.engine,n=vQ(yQ(o?.hyperformula?o:{})),i=CQ(t);return{...wQ,...n,...i}}(e),s=SQ(),r=kQ();!function(t,e){e&&e.forEach(e=>{const{name:o,plugin:n,translations:i}=e;try{t.registerFunction(o,n,i)}catch(t){Xe(t instanceof Error?t.message:String(t))}})}(t,n.functions),function(t,e){if(e){const{langCode:o}=e;try{t.registerLanguage(o,e)}catch(t){Xe(t instanceof Error?t.message:String(t))}}}(t,n.language);const l=t.buildEmpty(i);return s.set(l,[o]),r.set(l,[o.guid]),function(t,e){e&&(t.suspendEvaluation(),e.forEach(e=>{const{name:o,expression:n,scope:i,options:s}=e;try{t.addNamedExpression(o,n,i,s)}catch(t){Xe(t instanceof Error?t.message:String(t))}}),t.resumeEvaluation())}(l,n.namedExpressions),l.on("sheetAdded",()=>{l.rebuildAndRecalculate()}),l.on("sheetRemoved",()=>{l.rebuildAndRecalculate()}),l}function EQ(t){const e=SQ(),o=0===e.size?[]:Array.from(e.get(t)??[]);return new Map(o.map(t=>{const e=t;return[e.getPlugin("formulas").sheetId,e]}))}function xQ(t,e){if(t){const o=SQ(),n=o.get(t),i=kQ(),s=i.get(t);n&&n.includes(e)&&(n.splice(n.indexOf(e),1),0===n.length&&o.delete(t)),s&&s.includes(e.guid)&&(s.splice(s.indexOf(e.guid),1),0===s.length&&(i.delete(t),t.destroy()))}}function MQ(t,e){return"string"==typeof t&&"date"===e}function TQ(t){return QT(t)}function HQ(t){return t}function IQ(t){const e=t-Math.floor(t),o=Math.round(86400*e),n=Math.floor(o/3600),i=Math.floor(o%3600/60),s=o%60,r=`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`;return s>0?`${r}:${String(s).padStart(2,"0")}`:r}function _Q(t){const e=Date.UTC(1899,11,30),o=new Date(e+864e5*t);return`${o.getUTCFullYear()}-${String(o.getUTCMonth()+1).padStart(2,"0")}-${String(o.getUTCDate()).padStart(2,"0")}`}function AQ(t){const e=[...t].sort((t,e)=>t-e),o=[];return e.forEach(t=>{const e=o[o.length-1];void 0===e||t>e[0]+e[1]?o.push([t,1]):t===e[0]+e[1]&&(e[1]+=1)}),o}function WQ(t){return Array.isArray(t)?UA(t):t}const OQ=new Set(["http:","https:","mailto:","tel:"]);function NQ(t,e,o){const n=function(t,e){const o=[];return t.forEach(t=>{const n={from:t,to:e};o.forEach(t=>{const e=t.from>t.to,o=t.to<=n.from;t.from>n.from&&o&&e&&(n.from+=1)}),n.from>=e&&(e+=1),o.push(n)}),o}(t,function(t,e,o){const n=new Set(t),i=Array.from(Array(o).keys()).filter(t=>!1===n.has(t));return 0===e?i[e]??0:i[e-1]+1}(t,e,o));return function(t){return t.forEach((e,o)=>{t.slice(o+1).forEach(t=>{const o=t.from<t.to;t.from>e.from&&o&&(t.from-=1)})}),t}(n)}function PQ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function DQ(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function LQ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,DQ(t,e,"get"))}function zQ(t,e,o){PQ(t,e),e.set(t,o)}function BQ(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,DQ(t,e,"set"),o),o}function VQ(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function FQ(t,e){PQ(t,e),e.add(t)}var $Q=new WeakMap,UQ=new WeakMap,jQ=new WeakMap,qQ=new WeakMap,GQ=new WeakMap,YQ=new WeakMap,XQ=new WeakMap,KQ=new WeakMap,ZQ=new WeakSet,QQ=new WeakSet;class JQ{setRemovedHfIndexes(t){return BQ(this,XQ,t.map(t=>{const e=LQ(this,UQ).getVisualFromPhysicalIndex(t);return this.getHfIndexFromVisualIndex(e??-1)})),LQ(this,XQ)}getRemovedHfIndexes(){return LQ(this,XQ)}getHfIndexFromVisualIndex(t){const e=LQ(this,UQ).getNotTrimmedIndexes()[t];return void 0===e?-1:VQ(this,ZQ,tJ).call(this).hfIndexOfPhysical[e]??-1}getVisualIndexFromHfIndex(t){const{physicalIndexOfHf:e,visualIndexOfPhysical:o}=VQ(this,ZQ,tJ).call(this),n=e[t];return void 0===n?-1:o[n]}syncMoves(t){const e=`move${yn(LQ(this,$Q))}s`,o=LQ(this,jQ).getEngine();o&&o.batch(()=>{t.forEach(t=>{const n=t.from!==t.to,i=t.from+1!==t.to;n&&i&&o[e](LQ(this,jQ).getSheetId(),t.from,1,t.to)})})}storeMovesInformation(t,e,o){!1!==o&&(BQ(this,GQ,t.map(t=>this.getHfIndexFromVisualIndex(t))),BQ(this,YQ,this.getHfIndexFromVisualIndex(e)))}calculateAndSyncMoves(t,e){if(LQ(this,jQ).isPerformingUndoRedo())return;if(!1===t||!1===e)return;const o=NQ(LQ(this,GQ),LQ(this,YQ)??0,LQ(this,UQ).getNumberOfIndexes());null===LQ(this,jQ).getSheetId()?LQ(this,jQ).getPostponeAction(()=>this.syncMoves(o)):this.syncMoves(o)}getIndexesChangeSyncMethod(){const t=`set${yn(LQ(this,$Q))}Order`;return e=>{if(LQ(this,jQ).isPerformingUndoRedo())return;const o=LQ(this,UQ).getIndexesSequence();if("update"===e&&o.length>0){const e=new Array(o.length);for(let t=0;t<o.length;t+=1)e[o[t]]=t;const n=LQ(this,qQ).map(t=>e[t]??-1),i=LQ(this,jQ).getEngine().getSheetDimensions(LQ(this,jQ).getSheetId());let s;s="row"===LQ(this,$Q)?i.height:i.width;for(let t=n.length;t<s;t+=1)n.push(t);LQ(this,jQ).getEngine()[t](LQ(this,jQ).getSheetId(),n)}BQ(this,qQ,o)}}init(){VQ(this,QQ,eJ).call(this),BQ(this,qQ,LQ(this,UQ).getIndexesSequence())}constructor(t,e,o){FQ(this,ZQ),FQ(this,QQ),zQ(this,$Q,{writable:!0,value:void 0}),zQ(this,UQ,{writable:!0,value:void 0}),zQ(this,jQ,{writable:!0,value:void 0}),zQ(this,qQ,{writable:!0,value:void 0}),zQ(this,GQ,{writable:!0,value:void 0}),zQ(this,YQ,{writable:!0,value:void 0}),zQ(this,XQ,{writable:!0,value:void 0}),zQ(this,KQ,{writable:!0,value:void 0}),BQ(this,qQ,[]),BQ(this,GQ,[]),BQ(this,XQ,[]),BQ(this,KQ,null),BQ(this,$Q,t),BQ(this,UQ,e),BQ(this,jQ,o),LQ(this,UQ).addLocalHook("indexesSequenceChange",()=>{BQ(this,KQ,null)}),LQ(this,UQ).addLocalHook("cacheUpdated",t=>{t.trimmedIndexesChanged&&BQ(this,KQ,null)})}}function tJ(){if(null===LQ(this,KQ)){const t=LQ(this,UQ).getIndexesSequence(),e=LQ(this,UQ).getNotTrimmedIndexes(),o=new Array(t.length),n=new Array(t.length).fill(-1);for(let e=0;e<t.length;e+=1)o[t[e]]=e;for(let t=0;t<e.length;t+=1)n[e[t]]=t;BQ(this,KQ,{physicalIndexOfHf:t,hfIndexOfPhysical:o,visualIndexOfPhysical:n})}return LQ(this,KQ)}function eJ(){const t=LQ(this,UQ).getIndexesSequence(),e=t.every((t,e)=>t===e);if(e||0===t.length)return;const o=LQ(this,jQ).getEngine(),n=LQ(this,jQ).getSheetId();if(null===o||null===n)return void LQ(this,jQ).getPostponeAction()(()=>VQ(this,QQ,eJ).call(this));const i=`set${yn(LQ(this,$Q))}Order`,s=o.getSheetDimensions(n),r="row"===LQ(this,$Q)?s.height:s.width,l=new Array(t.length);for(let e=0;e<t.length;e+=1)l[t[e]]=e;for(let t=l.length;t<r;t+=1)l.push(t);o[i](n,l)}function oJ(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function nJ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,oJ(t,e,"get"))}function iJ(t,e,o){!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,o)}function sJ(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,oJ(t,e,"set"),o),o}var rJ=new WeakMap,lJ=new WeakMap,aJ=new WeakMap,hJ=new WeakMap,cJ=new WeakMap,dJ=new WeakMap,uJ=new WeakMap;class gJ{getForAxis(t){return nJ(this,"row"===t?rJ:lJ)}setPerformUndo(t){sJ(this,hJ,t)}setPerformRedo(t){sJ(this,cJ,t)}isPerformingUndoRedo(){return nJ(this,hJ)||nJ(this,cJ)}getSheetId(){return nJ(this,uJ)}getEngine(){return nJ(this,dJ)}getPostponeAction(){return nJ(this,aJ)}setupSyncEndpoint(t,e){sJ(this,dJ,t),sJ(this,uJ,e),nJ(this,rJ).init(),nJ(this,lJ).init()}constructor(t,e,o){iJ(this,rJ,{writable:!0,value:void 0}),iJ(this,lJ,{writable:!0,value:void 0}),iJ(this,aJ,{writable:!0,value:void 0}),iJ(this,hJ,{writable:!0,value:void 0}),iJ(this,cJ,{writable:!0,value:void 0}),iJ(this,dJ,{writable:!0,value:void 0}),iJ(this,uJ,{writable:!0,value:void 0}),sJ(this,hJ,!1),sJ(this,cJ,!1),sJ(this,dJ,null),sJ(this,uJ,null),sJ(this,rJ,new JQ("row",t,this)),sJ(this,lJ,new JQ("column",e,this)),sJ(this,aJ,o)}}function pJ(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fJ(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function mJ(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,fJ(t,e,"get"))}function wJ(t,e,o){pJ(t,e),e.set(t,o)}function bJ(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,fJ(t,e,"set"),o),o}function vJ(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function CJ(t,e){pJ(t,e),e.add(t)}function yJ(t){return"object"==typeof t&&null!==t}function SJ(t){return"object"==typeof t&&null!==t}function kJ(t){return"object"==typeof t&&null!==t&&"value"in t}const RJ="formulas",EJ=["maxRows","maxColumns","language"];Qn.getSingleton().register("afterNamedExpressionAdded"),Qn.getSingleton().register("afterNamedExpressionRemoved"),Qn.getSingleton().register("afterSheetAdded"),Qn.getSingleton().register("afterSheetRemoved"),Qn.getSingleton().register("afterSheetRenamed"),Qn.getSingleton().register("afterFormulasValuesUpdate");const xJ=t=>"UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t,MJ=RJ,TJ="ht-hyperlink";var HJ=new WeakMap,IJ=new WeakMap,_J=new WeakMap,AJ=new WeakMap,WJ=new WeakMap,OJ=new WeakMap,NJ=new WeakMap,PJ=new WeakMap,DJ=new WeakMap,LJ=new WeakMap,zJ=new WeakMap,BJ=new WeakMap,VJ=new WeakSet,FJ=new WeakMap,$J=new WeakMap,UJ=new WeakMap,jJ=new WeakMap,qJ=new WeakMap,GJ=new WeakMap,YJ=new WeakMap,XJ=new WeakSet,KJ=new WeakSet,ZJ=new WeakSet,QJ=new WeakSet,JJ=new WeakSet,t0=new WeakSet,e0=new WeakSet,o0=new WeakSet,n0=new WeakSet,i0=new WeakSet,s0=new WeakMap,r0=new WeakMap,l0=new WeakMap,a0=new WeakMap,h0=new WeakMap,c0=new WeakMap,d0=new WeakMap,u0=new WeakMap,g0=new WeakMap,p0=new WeakMap,f0=new WeakMap,m0=new WeakMap,w0=new WeakMap,b0=new WeakMap,v0=new WeakMap,C0=new WeakMap,y0=new WeakMap,S0=new WeakMap,k0=new WeakSet,R0=new WeakMap,E0=new WeakMap,x0=new WeakSet,M0=new WeakSet,T0=new WeakMap;class H0 extends pW{static get PLUGIN_KEY(){return RJ}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[RJ,...EJ]}isEnabled(){return!!this.hot.getSettings()[RJ]}enablePlugin(){if(!this.enabled)if(this.engine=function(t){const e=t.getSettings(),o=e[RJ];if(!o||!0===o)return null;const n=o?.engine;if(void 0===n)return null;if("function"==typeof n.hyperformula)return RQ(n.hyperformula,e,t);if("function"==typeof n)return RQ(n,e,t);if("object"==typeof n&&Wt(n.hyperformula)){const e=SQ(),o=kQ().get(n);return e.has(n)||e.set(n,[]),e.get(n).push(t),o&&o.push(t.guid),n.getConfig().licenseKey||n.updateConfig({licenseKey:mQ}),n.getConfig().leapYear1900===wQ.leapYear1900&&!1!==ve(n.getConfig().nullDate,wQ.nullDate)||Xe(X`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
|
115
|
+
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),n}return null}(this.hot)??this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const t=this.addSheet(this.sheetName,vJ(this,i0,B0).call(this));"string"==typeof t&&vJ(this,XJ,_0).call(this,t)}this.addHook("beforeLoadData",mJ(this,l0)),this.addHook("afterLoadData",mJ(this,h0)),this.addHook("beforeUpdateData",mJ(this,l0)),this.addHook("afterUpdateData",mJ(this,h0)),this.addHook("modifyData",mJ(this,c0)),this.addHook("modifySourceData",mJ(this,u0)),this.addHook("beforeValidate",mJ(this,s0)),this.addHook("afterSetSourceDataAtCell",mJ(this,p0)),this.addHook("afterSetDataAtCell",mJ(this,g0)),this.addHook("afterSetDataAtRowProp",mJ(this,g0)),this.addHook("beforeCreateRow",mJ(this,f0)),this.addHook("beforeCreateCol",mJ(this,m0)),this.addHook("afterCreateRow",mJ(this,v0)),this.addHook("afterCreateCol",mJ(this,C0)),this.addHook("beforeRemoveRow",mJ(this,w0)),this.addHook("beforeRemoveCol",mJ(this,b0)),this.addHook("afterRemoveRow",mJ(this,y0)),this.addHook("afterRemoveCol",mJ(this,S0)),this.indexSyncer=new gJ(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,o,n)=>{this.rowAxisSyncer.storeMovesInformation(t,e,n)}),this.hot.addHook("beforeColumnMove",(t,e,o,n)=>{this.columnAxisSyncer.storeMovesInformation(t,e,n)}),this.hot.addHook("afterRowMove",(t,e,o,n,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(n,i)}),this.hot.addHook("afterColumnMove",(t,e,o,n,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(n,i)}),this.hot.addHook("beforeColumnFreeze",(t,e)=>{const o=this.hot.getSettings().fixedColumnsStart;this.columnAxisSyncer.storeMovesInformation([t],o,e)}),this.hot.addHook("afterColumnFreeze",(t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)}),this.hot.addHook("beforeColumnUnfreeze",(t,e)=>{const o=this.hot.getSettings().fixedColumnsStart;this.columnAxisSyncer.storeMovesInformation([t],o-1,e)}),this.hot.addHook("afterColumnUnfreeze",(t,e)=>{this.columnAxisSyncer.calculateAndSyncMoves(e,e)}),this.addHook("afterCellMetaReset",mJ(this,a0)),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),bJ(this,zJ,[]),bJ(this,BJ,!1),bJ(this,LJ,this.engine.undo()??[])}),this.addHook("beforeRedo",t=>{if("object"!=typeof t||null===t||!("actionType"in t))return!1;this.indexSyncer.setPerformRedo(!0),bJ(this,OJ,"move_cells"===t.actionType),bJ(this,zJ,[]),bJ(this,BJ,!1),bJ(this,LJ,mJ(this,OJ)?[]:this.engine.redo()??[])}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1),this.indexSyncer.setPerformRedo(!1),bJ(this,OJ,!1),vJ(this,o0,L0).call(this)}),this.addHook("afterRedo",()=>{this.indexSyncer.setPerformRedo(!1),vJ(this,o0,L0).call(this)}),this.addHook("afterRedo",()=>{bJ(this,OJ,!1)}),this.addHook("afterDetachChild",mJ(this,T0)),this.addHook("beforeAutofill",mJ(this,r0)),this.addHook("beforeMoveCells",mJ(this,R0)),this.addHook("afterMoveCells",mJ(this,E0)),this.addHook("afterRenderer",mJ(this,d0)),mJ(this,YJ)?.forEach(([t,e])=>this.engine.on(t,e)),vJ(this,KJ,A0).call(this),this.registerShortcuts(),super.enablePlugin()}else Xe("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){vJ(this,ZJ,W0).call(this),this.unregisterShortcuts(),mJ(this,YJ)?.forEach(([t,e])=>this.engine?.off(t,e)),this.engine&&xQ(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(t){const e=function(t){const e=t[RJ],o=e?.engine;return{...vQ(yQ(o?.hyperformula?o:{})),...CQ(t)}}(this.hot.getSettings());this.engine&&function(t,e){return Object.keys(e).some(o=>void 0!==e[o]&&e[o]!==t[o])}(this.engine.getConfig(),e)&&this.engine.updateConfig(e);const o=this.hot.getSettings()[RJ];if(void 0!==o&&"boolean"!=typeof o&&void 0!==o.sheetName&&this.engine?.getSheetId(o.sheetName)!==this.sheetId&&this.switchSheet(o.sheetName),!t.data&&null===this.sheetName){const t=this.hot.getSettings()[RJ],e=SJ(t)?t.sheetName:void 0;if(e&&this.engine?.doesSheetExist(e))this.switchSheet(e);else{const t=this.addSheet(e??void 0,vJ(this,i0,B0).call(this));"string"==typeof t&&vJ(this,XJ,_0).call(this,t)}}vJ(this,KJ,A0).call(this),super.updatePlugin(t)}destroy(){mJ(this,YJ)?.forEach(([t,e])=>this.engine?.off(t,e)),bJ(this,YJ,null),this.engine&&xQ(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(t,e){if(At(e)&&(o=e,!(Array.isArray(o)&&o.length&&o.every(t=>Array.isArray(t)))))return Xe("The provided data should be an array of arrays."),!1;var o;if(null!=t&&this.engine?.doesSheetExist(t))return Xe("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(t??void 0);return e&&this.engine.setSheetContent(this.engine.getSheetId(o),e),o}catch(t){return Xe(t instanceof Error?t.message:String(t)),!1}}switchSheet(t){if(!this.engine?.doesSheetExist(t))return void eo(`The sheet named \`${t}\` does not exist, switch aborted.`);vJ(this,XJ,_0).call(this,t);const e=this.engine.getSheetSerialized(this.sheetId);e.length>0&&this.hot.loadData(e,`${yn(RJ)}.switchSheet`)}getCellType(t,e,o=this.sheetId){const n=this.hot.toPhysicalRow(t),i=this.hot.toPhysicalColumn(e);return null!==n&&null!==i?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)}):"EMPTY"}isFormulaCellType(t,e,o=this.sheetId){return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)})}registerShortcuts(){this.hot.getShortcutManager().getContext("grid")?.addShortcut({keys:[["Alt","Enter"]],callback:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;if(!t||null===t.row||null===t.col)return;const e=vJ(this,t0,P0).call(this,t.row,t.col);null!==e&&this.hot.rootWindow.open(e,"_blank","noopener,noreferrer")},stopPropagation:!0,runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return mJ(this,IJ)&&!!t?.isCell()&&null!==t.row&&null!==t.col&&null!==vJ(this,t0,P0).call(this,t.row,t.col)},group:MJ})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(MJ)}renderDependentSheets(t,e=!1){const o=new Set;t.forEach(t=>{const e=yJ(t)?t.address?.sheet:void 0;void 0===e||o.has(e)||o.add(e)}),this.engine&&EQ(this.engine).forEach((t,n)=>{(e||n!==this.sheetId)&&o.has(n)&&(t.render(),t.view?.adjustElementsSize())})}validateDependentCells(t,e=[]){const o=t=>{const e=yJ(t)?t.address:void 0,{row:o,col:n,sheet:i}=e??{};return At(i)?`${i}:${o}x${n}`:""},n=new Set(e.map(t=>o(t)));t.forEach(t=>{const e=yJ(t)?t.address:void 0,{row:i,col:s,sheet:r}=e??{};if(void 0===i||void 0===s||i>=this.hot.countRows()||s>=this.hot.countCols())return;const l=o(t);if(void 0!==r&&!n.has(l)&&this.engine){const t=EQ(this.engine).get(r);if(!t)return;t.validateCell(t.getDataAtCell(i,s),t.getCellMeta(i,s),()=>{})}})}syncChangeWithEngine(t,e,o){const n={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e),sheet:this.sheetId};if(!this.engine?.isItPossibleToSetCellContents(n))return void Xe(`Not possible to set cell data at ${JSON.stringify(n)}`);var i;return MQ(o,this.hot.getCellMetaTransient(t,e).type)&&(TQ(o)||!1===("string"==typeof(i=o)&&i.startsWith("="))&&(o=`'${o}`)),this.engine?.setCellContents(n,o)}commitPendingMoveCells(){if(!this.engine||!mJ(this,AJ))return!1;const{source:t,dest:e,isCopy:o,rect:n}=mJ(this,AJ);if(bJ(this,AJ,null),bJ(this,NJ,null),this.indexSyncer?.isPerformingUndoRedo()&&!mJ(this,OJ))return bJ(this,WJ,n),!0;try{o?(this.engine.copy(t),bJ(this,NJ,this.engine.paste(e))):bJ(this,NJ,this.engine.batch(()=>{this.engine.moveCells(t,e)}))}catch(t){return Xe(`Formulas: HyperFormula operation failed during ${o?"copy/paste":"moveCells"}: ${t instanceof Error?t.message:String(t)}`),!1}return bJ(this,WJ,n),!0}constructor(...t){super(...t),CJ(this,VJ),CJ(this,XJ),CJ(this,KJ),CJ(this,ZJ),CJ(this,QJ),CJ(this,JJ),CJ(this,t0),CJ(this,e0),CJ(this,o0),CJ(this,n0),CJ(this,i0),CJ(this,k0),CJ(this,x0),CJ(this,M0),wJ(this,HJ,{writable:!0,value:void 0}),wJ(this,IJ,{writable:!0,value:void 0}),wJ(this,_J,{writable:!0,value:void 0}),wJ(this,AJ,{writable:!0,value:void 0}),wJ(this,WJ,{writable:!0,value:void 0}),wJ(this,OJ,{writable:!0,value:void 0}),wJ(this,NJ,{writable:!0,value:void 0}),wJ(this,PJ,{writable:!0,value:void 0}),wJ(this,DJ,{writable:!0,value:void 0}),wJ(this,LJ,{writable:!0,value:void 0}),wJ(this,zJ,{writable:!0,value:void 0}),wJ(this,BJ,{writable:!0,value:void 0}),wJ(this,FJ,{writable:!0,value:void 0}),wJ(this,$J,{writable:!0,value:void 0}),wJ(this,UJ,{writable:!0,value:void 0}),wJ(this,jJ,{writable:!0,value:void 0}),wJ(this,qJ,{writable:!0,value:void 0}),wJ(this,GJ,{writable:!0,value:void 0}),wJ(this,YJ,{writable:!0,value:void 0}),wJ(this,s0,{writable:!0,value:void 0}),wJ(this,r0,{writable:!0,value:void 0}),wJ(this,l0,{writable:!0,value:void 0}),wJ(this,a0,{writable:!0,value:void 0}),wJ(this,h0,{writable:!0,value:void 0}),wJ(this,c0,{writable:!0,value:void 0}),wJ(this,d0,{writable:!0,value:void 0}),wJ(this,u0,{writable:!0,value:void 0}),wJ(this,g0,{writable:!0,value:void 0}),wJ(this,p0,{writable:!0,value:void 0}),wJ(this,f0,{writable:!0,value:void 0}),wJ(this,m0,{writable:!0,value:void 0}),wJ(this,w0,{writable:!0,value:void 0}),wJ(this,b0,{writable:!0,value:void 0}),wJ(this,v0,{writable:!0,value:void 0}),wJ(this,C0,{writable:!0,value:void 0}),wJ(this,y0,{writable:!0,value:void 0}),wJ(this,S0,{writable:!0,value:void 0}),wJ(this,R0,{writable:!0,value:void 0}),wJ(this,E0,{writable:!0,value:void 0}),wJ(this,T0,{writable:!0,value:void 0}),bJ(this,HJ,!1),bJ(this,IJ,!1),bJ(this,_J,!1),bJ(this,AJ,null),bJ(this,WJ,null),bJ(this,OJ,!1),bJ(this,NJ,null),bJ(this,PJ,!1),bJ(this,DJ,!1),bJ(this,LJ,[]),bJ(this,zJ,[]),bJ(this,BJ,!1),bJ(this,FJ,t=>{const e=t.map(t=>vJ(this,VJ,I0).call(this,t));this.hot.runHooks("afterFormulasValuesUpdate",e)}),bJ(this,$J,(t,e)=>{this.hot.runHooks("afterNamedExpressionAdded",t,e)}),bJ(this,UJ,(t,e)=>{this.hot.runHooks("afterNamedExpressionRemoved",t,e)}),bJ(this,jJ,t=>{this.hot.runHooks("afterSheetAdded",t)}),bJ(this,qJ,(t,e)=>{this.engine?.getSheetId(e)===this.sheetId&&vJ(this,XJ,_0).call(this,e),this.hot.runHooks("afterSheetRenamed",t,e)}),bJ(this,GJ,(t,e)=>{this.hot.runHooks("afterSheetRemoved",t,e)}),bJ(this,YJ,[["valuesUpdated",mJ(this,FJ)],["namedExpressionAdded",mJ(this,$J)],["namedExpressionRemoved",mJ(this,UJ)],["sheetAdded",mJ(this,jJ)],["sheetRenamed",mJ(this,qJ)],["sheetRemoved",mJ(this,GJ)]]),this.staticRegister=oi("formulas"),this.engine=null,this.sheetId=null,this.sheetName=null,this.indexSyncer=null,this.rowAxisSyncer=null,this.columnAxisSyncer=null,bJ(this,s0,(t,e,o)=>{const n=this.hot.propToCol(o);if(this.isFormulaCellType(e,n)){const t={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},o=this.hot.getCellMetaTransient(e,n);let i=this.engine.getCellValue(t);return"date"===o.type&&is(i)?i=_Q(i):"time"===o.type&&is(i)&&(i=IQ(i)),kJ(i)?i.value:i}return t}),bJ(this,r0,(t,e,o)=>{const{row:n,col:i}=e.getTopStartCorner(),{row:s,col:r}=e.getBottomEndCorner(),{row:l,col:a}=o.getTopStartCorner(),{row:h,col:c}=o.getBottomEndCorner();if(null===n||null===i||null===s||null===r||null===l||null===a||null===h||null===c)return;const d=this.rowAxisSyncer.getHfIndexFromVisualIndex(n),u=this.columnAxisSyncer.getHfIndexFromVisualIndex(i),g=this.rowAxisSyncer.getHfIndexFromVisualIndex(s),p=this.columnAxisSyncer.getHfIndexFromVisualIndex(r),f=this.rowAxisSyncer.getHfIndexFromVisualIndex(l),m=this.columnAxisSyncer.getHfIndexFromVisualIndex(a),w=this.rowAxisSyncer.getHfIndexFromVisualIndex(h),b=this.columnAxisSyncer.getHfIndexFromVisualIndex(c);if(null===d||null===u||null===g||null===p||null===f||null===m||null===w||null===b)return;const v={start:{row:d,col:u,sheet:this.sheetId},end:{row:g,col:p,sheet:this.sheetId}},C={start:{row:f,col:m,sheet:this.sheetId},end:{row:w,col:b,sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(C))return!1;const y=this.engine.getFillRangeData(v,C),{row:S,col:k}=v.start,{row:R,col:E}=v.end,x=R-S+1,M=E-k+1;for(let t=0;t<y.length;t+=1)for(let e=0;e<y[t].length;e+=1){const o=y[t][e],n=S+t%x,i=k+e%M;MQ(o,this.hot.getCellMeta(n,i).type)&&(o.startsWith("'")?y[t][e]=o.slice(1):!1===this.isFormulaCellType(n,i,this.sheetId)&&(y[t][e]=HQ(o)))}return y}),bJ(this,l0,(t,e,o="")=>{o.includes(yn(RJ))||bJ(this,_J,Wt(this.hot.getSettings().data))}),bJ(this,a0,()=>{if(mJ(this,_J))return void(null!==this.sheetName&&this.switchSheet(this.sheetName));const t=vJ(this,i0,B0).call(this);t.forEach((e,o)=>{e.forEach((e,n)=>{MQ(e,this.hot._getMetaManager().getCellMetaUncached(this.hot.toPhysicalRow(o)??o,this.hot.toPhysicalColumn(n)??n,{visualRow:o,visualColumn:n}).type)&&(TQ(e)?t[o][n]=e:e.startsWith("=")||(t[o][n]=`'${e}`))})}),bJ(this,HJ,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),bJ(this,HJ,!1)}),bJ(this,h0,(t,e,o="")=>{if(o.includes(yn(RJ)))return;if(!this.engine)return;const n=this.hot.getSettings()[RJ],i=SJ(n)?n.sheetName:void 0,s=function(t,e){return null==e?t.addSheet():t.doesSheetExist(e)?e:t.addSheet(e)}(this.engine,i??this.sheetName);if(vJ(this,XJ,_0).call(this,s),"updateSettings"!==o)if(mJ(this,_J))null!==this.sheetName&&this.switchSheet(this.sheetName);else{const t=vJ(this,i0,B0).call(this);if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,t)){bJ(this,HJ,!0);const e=this.engine.setSheetContent(this.sheetId,t);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(e),bJ(this,HJ,!1)}else{bJ(this,HJ,!0);const t=this.engine.setSheetContent(this.sheetId,[[]]);this.renderDependentSheets(t),bJ(this,HJ,!1),Xe("The loaded data could not be passed to the formula engine, so the formulas were cleared. It most likely exceeds the engine's `maxRows` or `maxColumns` limit.")}}}),bJ(this,c0,(t,e,o,n)=>{if("get"!==n||mJ(this,HJ)||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(o.value=(s=o.value,"string"==typeof s&&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 l=this.engine.getCellValue(r);const a=this.hot._getMetaManager().getCellMetaUncached(this.hot.toPhysicalRow(t)??t,this.hot.toPhysicalColumn(e)??e,{visualRow:t,visualColumn:e});"date"===a.type&&is(l)?l=_Q(l):"time"===a.type&&is(l)&&(l=IQ(l)),o.value=kJ(l)?l.value:l}),bJ(this,d0,(t,e,o)=>{if(!mJ(this,IJ)||mJ(this,HJ))return;vJ(this,JJ,N0).call(this,t);const n=vJ(this,t0,P0).call(this,e,o);if(null===n)return;const i=this.hot.rootDocument.createElement("a");for(i.className=TJ,i.href=n,i.target="_blank",i.rel="noopener noreferrer",i.tabIndex=-1;t.firstChild;)i.appendChild(t.firstChild);t.appendChild(i)}),bJ(this,u0,(t,e,o,n)=>{if("get"!==n||mJ(this,HJ)||mJ(this,DJ)||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 l=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===l.width&&0===l.height)return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};o.value=this.engine.getCellSerialized(a)}),bJ(this,g0,(t,e)=>{if(xJ(e))return void vJ(this,e0,D0).call(this,t,e,!0);if(mJ(this,PJ))return;if(!t?.length)return;const o=[],n=[],i=this.engine.batch(()=>{t.forEach(([t,e,,i])=>{if("string"!=typeof e&&"number"!=typeof e)return;const s=this.hot.propToCol(e),r=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(s),a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};i=vJ(this,n0,z0).call(this,r,l,i),null!==r&&null!==l?this.syncChangeWithEngine(t,s,i):o.push([t,s,i]),n.push({address:a})})});o.length&&this.hot.addHookOnce("afterChange",()=>{const t=this.engine.batch(()=>{o.forEach(([t,e,o])=>{this.syncChangeWithEngine(t,e,o)})});this.renderDependentSheets(t,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,n)}),bJ(this,p0,(t,e)=>{if(xJ(e))return void vJ(this,e0,D0).call(this,t,e,!1);if(mJ(this,PJ))return;const o=[],n=[];t.forEach(([t,e,,i])=>{if("string"!=typeof e&&"number"!=typeof e)return;const s=this.hot.propToCol(e);if(!is(s))return;const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine?.isItPossibleToSetCellContents(r)?(i=WQ(i),n.push({address:r}),o.push(...this.engine.setCellContents(r,i))):Xe(`Not possible to set source cell data at ${JSON.stringify(r)}`)}),this.renderDependentSheets(o),this.validateDependentCells(o,n)}),bJ(this,f0,(t,e)=>{let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countRows()&&(o=t),null===this.sheetId||!this.engine?.doesSheetExist(this.sheetName)||!this.engine?.isItPossibleToAddRows(this.sheetId,[o,e]))return!1}),bJ(this,m0,(t,e)=>{let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(t);if(t>=this.hot.countCols()&&(o=t),null===this.sheetId||!this.engine?.doesSheetExist(this.sheetName)||!this.engine?.isItPossibleToAddColumns(this.sheetId,[o,e]))return!1}),bJ(this,w0,(t,e,o)=>!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every(t=>this.engine?.isItPossibleToRemoveRows(this.sheetId,[t,1]))&&void 0),bJ(this,b0,(t,e,o)=>!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every(t=>this.engine?.isItPossibleToRemoveColumns(this.sheetId,[t,1]))&&void 0),bJ(this,v0,(t,e,o)=>{if(xJ(o))return;const n=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(n)}),bJ(this,C0,(t,e,o)=>{if(xJ(o))return;const n=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(t),e]);this.renderDependentSheets(n)}),bJ(this,y0,(t,e,o,n)=>{if(xJ(n))return;const i=AQ(this.rowAxisSyncer.getRemovedHfIndexes()),s=this.engine.batch(()=>{vJ(this,M0,$0).call(this,i,"removeRows")});this.renderDependentSheets(s)}),bJ(this,S0,(t,e,o,n)=>{if(xJ(n))return;const i=AQ(this.columnAxisSyncer.getRemovedHfIndexes()),s=this.engine.batch(()=>{vJ(this,M0,$0).call(this,i,"removeColumns")});this.renderDependentSheets(s)}),bJ(this,R0,(t,e,o)=>{if(!Rr(t))return bJ(this,AJ,null),!1;if(!this.engine||null===this.sheetId)return;const n=t.getTopStartCorner(),i=t.getBottomEndCorner(),s=n.row,r=n.col,l=i.row,a=i.col,h=e.row,c=e.col;if(!(vJ(this,k0,V0).call(this,this.rowAxisSyncer,s,l)&&vJ(this,k0,V0).call(this,this.columnAxisSyncer,r,a)&&vJ(this,k0,V0).call(this,this.rowAxisSyncer,h,h+(l-s))&&vJ(this,k0,V0).call(this,this.columnAxisSyncer,c,c+(a-r))))return bJ(this,AJ,null),!1;const d=this.rowAxisSyncer.getHfIndexFromVisualIndex(s),u=this.columnAxisSyncer.getHfIndexFromVisualIndex(r),g=this.rowAxisSyncer.getHfIndexFromVisualIndex(l),p=this.columnAxisSyncer.getHfIndexFromVisualIndex(a),f=this.rowAxisSyncer.getHfIndexFromVisualIndex(h),m=this.columnAxisSyncer.getHfIndexFromVisualIndex(c),w={start:{sheet:this.sheetId,row:d,col:u},end:{sheet:this.sheetId,row:g,col:p}},b={sheet:this.sheetId,row:f,col:m};if(!o&&!this.engine.isItPossibleToMoveCells(w,b))return bJ(this,AJ,null),!1;if(o){const t={start:b,end:{sheet:this.sheetId,row:f+(g-d),col:m+(p-u)}};if(!this.engine.isItPossibleToSetCellContents(t))return bJ(this,AJ,null),!1}bJ(this,AJ,{source:w,dest:b,isCopy:o,rect:{fromRow:s,fromCol:r,toRow:l,toCol:a,targetRow:h,targetCol:c,isCopy:o}})}),bJ(this,E0,()=>{const t=mJ(this,WJ),e=mJ(this,NJ);bJ(this,WJ,null),bJ(this,NJ,null),this.engine&&null!==t&&(vJ(this,x0,F0).call(this,t),null!==e&&this.renderDependentSheets(e,!0))}),bJ(this,T0,(t,e,o)=>{bJ(this,HJ,!0);const n=e.__children,i=Array.isArray(n)?n.length:0,s=vJ(this,i0,B0).call(this,o,0,o+i,this.hot.countSourceCols());bJ(this,HJ,!1),s.forEach((t,e)=>{t.forEach((t,n)=>{this.engine?.setCellContents({col:n,row:o+e,sheet:this.sheetId},[[t]])})})})}}function I0(t){if(!t.address||t.address.sheet!==this.sheetId||"number"!=typeof t.newValue)return t;const e=this.rowAxisSyncer.getVisualIndexFromHfIndex(t.address.row),o=this.columnAxisSyncer.getVisualIndexFromHfIndex(t.address.col);if(e<0||o<0)return t;const n=this.hot._getMetaManager().getCellMetaUncached(this.hot.toPhysicalRow(e)??e,this.hot.toPhysicalColumn(o)??o,{visualRow:e,visualColumn:o});let i;if("date"===n.type)i=_Q(t.newValue);else{if("time"!==n.type)return t;i=IQ(t.newValue)}const s=Object.assign(Object.create(Object.getPrototypeOf(t)),t);return s.newValue=i,s}function _0(t){const e=this.engine?.getSheetId(t)??null;this.sheetName=(null===e?null:this.engine?.getSheetName(e))??t,this.sheetId=e}function A0(){const t=this.hot.getSettings()[RJ],e=mJ(this,IJ);bJ(this,IJ,SJ(t)&&!0===t.hyperlinks),e&&!mJ(this,IJ)&&vJ(this,ZJ,W0).call(this)}function W0(){this.hot.rootElement?.querySelectorAll(`a.${TJ}`).forEach(t=>vJ(this,QJ,O0).call(this,t))}function O0(t){const{parentNode:e}=t;for(;t.firstChild;)e?.insertBefore(t.firstChild,t);t.remove()}function N0(t){if(null===t.firstElementChild)return;let e=t.querySelector(`a.${TJ}`);for(;null!==e;)vJ(this,QJ,O0).call(this,e),e=t.querySelector(`a.${TJ}`)}function P0(t,e){if(!(null!==this.sheetName&&this.engine?.doesSheetExist(this.sheetName)&&this.rowAxisSyncer&&this.columnAxisSyncer&&this.isFormulaCellType(t,e)))return null;const o=this.engine.getCellHyperlink({sheet:this.sheetId,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(e)});if(void 0===o)return null;const n=function(t,e){if("string"!=typeof t||""===t.trim())return null;let o;try{o=new URL(t,e)}catch(t){return null}return OQ.has(o.protocol)?o.href:null}(o,this.hot.rootDocument.baseURI);return null===n&&Ze(this,"formulas-hyperlink-refused",`A "HYPERLINK" formula points at a URL that Handsontable refuses to link to ("${o}"). Only the "http", "https", "mailto" and "tel" schemes can be linked.`),n}function D0(t,e,o){"UndoRedo.undo"!==e&&"UndoRedo.redo"!==e||t?.length&&(bJ(this,BJ,!0),o&&t.forEach(([t,e])=>{if("string"!=typeof e&&"number"!=typeof e)return;const o=this.hot.propToCol(e);if(!is(t)||!is(o))return;const n=this.rowAxisSyncer.getHfIndexFromVisualIndex(t),i=this.columnAxisSyncer.getHfIndexFromVisualIndex(o);-1!==n&&-1!==i&&mJ(this,zJ).push({address:{row:n,col:i,sheet:this.sheetId}})}))}function L0(){const t=mJ(this,LJ),e=mJ(this,zJ),o=mJ(this,BJ);bJ(this,LJ,[]),bJ(this,zJ,[]),bJ(this,BJ,!1),o&&t.length&&this.validateDependentCells(t,e)}function z0(t,e,o){if(Ce(o)&&null!==o){const n=this.hot.toVisualRow(t),i=this.hot.toVisualColumn(e);null!=(o=Si(o,this.hot.getCellMetaTransient(n,i)))&&(o=Object(o).toString())}return WQ(o)}function B0(t,e,o,n){const i=mJ(this,DJ);let s;bJ(this,DJ,!0);try{s=this.hot.getSourceDataArray(t,e,o,n)}finally{bJ(this,DJ,i)}const r=this.hot.countCols(),l=this.hot.countSourceCols();if(!(r<l&&Array.isArray(this.hot.getSourceDataAtRow(0))))return s.map((t,e)=>(Array.isArray(t)?t:[]).map((t,o)=>vJ(this,n0,z0).call(this,e,o,t)));const a=e??0;return s.map((t,e)=>{const o=Array.isArray(t)?t:[],n=[];for(let t=0;t<r;t++){const i=this.hot.colToProp(t);if("number"!=typeof i)continue;const s=i-a;s<0||s>=o.length||n.push(vJ(this,n0,z0).call(this,e,t,o[s]))}return n})}function V0(t,e,o){const n=t.getHfIndexFromVisualIndex(e);if(n<0)return!1;for(let i=1;i<=o-e;i++)if(t.getHfIndexFromVisualIndex(e+i)!==n+i)return!1;return!0}function F0(t){const{fromRow:e,fromCol:o,toRow:n,toCol:i,targetRow:s,targetCol:r,isCopy:l}=t,a=n-e+1,h=i-o+1,c=[];for(let t=0;t<a;t++){const e=[];for(let o=0;o<h;o++){const n=this.rowAxisSyncer.getHfIndexFromVisualIndex(s+t),i=this.columnAxisSyncer.getHfIndexFromVisualIndex(r+o),l=this.engine.getCellSerialized({sheet:this.sheetId,row:n,col:i});e.push(l??null)}c.push(e)}bJ(this,PJ,!0);try{if(!l){const t=Array.from({length:h}).fill(null),s=Array.from({length:a},()=>t.slice());this.hot.populateFromArray(e,o,s,n,i,"auto")}this.hot.populateFromArray(s,r,c,s+a-1,r+h-1,"auto")}finally{bJ(this,PJ,!1)}}function $0(t,e){for(let o=t.length;o>0;o-=1e3){const n=t.slice(Math.max(0,o-1e3),o);"removeRows"===e?this.engine.removeRows(this.sheetId,...n):this.engine.removeColumns(this.sheetId,...n)}}function U0(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function j0(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function q0(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,j0(t,e,"get"))}function G0(t,e,o){U0(t,e),e.set(t,o)}function Y0(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,j0(t,e,"set"),o),o}function X0(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}Qn.getSingleton().register("beforeHideColumns"),Qn.getSingleton().register("afterHideColumns"),Qn.getSingleton().register("beforeUnhideColumns"),Qn.getSingleton().register("afterUnhideColumns");const K0="hiddenColumns",Z0=Symbol("skipColumnOnPasteByHiddenColumns");var Q0=new WeakMap,J0=new WeakMap,t1=new WeakMap,e1=new WeakMap,o1=new WeakMap,n1=new WeakMap,i1=new WeakSet;class s1 extends pW{static get PLUGIN_KEY(){return K0}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[K0]}enablePlugin(){this.enabled||(Y0(this,Q0,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName??"","hiding")),q0(this,Q0).addLocalHook("init",()=>X0(this,i1,r1).call(this)),this.hot.columnIndexMapper.getNumberOfIndexes()>0&&X0(this,i1,r1).call(this),this.addHook("afterContextMenuDefaultOptions",q0(this,n1)),this.addHook("afterGetCellMeta",q0(this,t1)),this.addHook("modifyColWidth",q0(this,J0),2),this.addHook("afterGetColHeader",q0(this,o1)),this.addHook("modifyCopyableRange",q0(this,e1)),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(),o=this.isValidConfig(t);let n=e;const i=q0(this,Q0).getValues().slice(),s=t.length>0;if(o&&s){$(t.map(t=>this.hot.toPhysicalColumn(t)),t=>{i[t]=!1}),n=B(i,(t,e,o)=>(e&&t.push(this.hot.toVisualColumn(o)),t),[])}!1!==this.hot.runHooks("beforeUnhideColumns",e,n,o&&s)&&(o&&s&&q0(this,Q0).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",e,n,o&&s,o&&n.length<e.length))}showColumn(...t){this.showColumns(t)}hideColumns(t){const e=this.getHiddenColumns(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeHideColumns",e,n,o)&&(o&&this.hot.batchExecution(()=>{$(t,t=>{q0(this,Q0).setValueAtIndex(this.hot.toPhysicalColumn(t),!0)})},!0),this.hot.runHooks("afterHideColumns",e,n,o,o&&n.length>e.length))}hideColumn(...t){this.hideColumns(t)}getHiddenColumns(){return F(q0(this,Q0).getHiddenIndexes(),t=>this.hot.toVisualColumn(t))}isHidden(t){return q0(this,Q0).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(){$(this.hot.getCellsMeta(),t=>{const e=t;e[Z0]&&(delete e.skipColumnOnPaste,delete e[Z0])})}destroy(){Y0(this,Q0,null),super.destroy()}constructor(...t){var e,o;super(...t),U0(e=this,o=i1),o.add(e),G0(this,Q0,{writable:!0,value:void 0}),G0(this,J0,{writable:!0,value:void 0}),G0(this,t1,{writable:!0,value:void 0}),G0(this,e1,{writable:!0,value:void 0}),G0(this,o1,{writable:!0,value:void 0}),G0(this,n1,{writable:!0,value:void 0}),Y0(this,Q0,null),Y0(this,J0,(t,e)=>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),Y0(this,t1,(t,e,o)=>{if(!1===this.getSetting("copyPasteEnabled")){const t=o;this.isHidden(e)?!0!==o.skipColumnOnPaste&&(o.skipColumnOnPaste=!0,t[Z0]=!0):t[Z0]&&(delete o.skipColumnOnPaste,delete t[Z0])}if(this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const t=o.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenColumn");e>-1&&t.splice(e,1),o.className=t.join(" ")}}}),Y0(this,e1,t=>{if(this.getSetting("copyPasteEnabled"))return t;const e=[],o=(t,o,n,i)=>{e.push({startRow:t,endRow:o,startCol:n,endCol:i})};return $(t,t=>{const e=t;let n=!0,i=0;as(e.startCol,e.endCol,t=>{this.isHidden(t)?(n||o(e.startRow,e.endRow,i,t-1),n=!0):(n&&(i=t),t===e.endCol&&o(e.startRow,e.endRow,i,t),n=!1)})}),e}),Y0(this,o1,(t,e)=>{if(!this.getSetting("indicators")||t<0)return;const o=[];t>=1&&this.isHidden(t-1)&&o.push("afterHiddenColumn"),t<this.hot.countCols()-1&&this.isHidden(t+1)&&o.push("beforeHiddenColumn"),po(e,o)}),Y0(this,n1,t=>{var e;t.items.push({name:iL},(e=this,{key:"hidden_columns_hide",name(){const t=this.getSelectedActive();let e=0;if(Array.isArray(t)){const[,o,,n]=t;o-n!==0&&(e=1)}return this.getTranslatedPhrase(Vw,e)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const{from:o,to:n}=t;if(null===o.col||null===n.col)return;const i=Math.max(Math.min(o.col,n.col),0),s=Math.max(o.col,n.col),r=[];for(let t=i;t<=s;t+=1)r.push(t);e.hideColumns(r);const l=r[r.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(l,1,!0);null!==a&&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(Fw,t)},callback(){if(0===e.length)return;let o=e[0],n=e[e.length-1];o=this.columnIndexMapper.getNearestNotHiddenIndex(o-1,-1)??0,n=this.columnIndexMapper.getNearestNotHiddenIndex(n+1,1)??this.countCols()-1,t.showColumns(e),this.view.adjustElementsSize(),this.render(),n-o+1===this.countCols()||this.selectColumns(o,n)},disabled:!1,hidden(){const o=F(t.getHiddenColumns(),t=>this.toPhysicalColumn(t));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;e.length=0;const n=this.getSelectedRangeActive();if(!n)return!0;const i=n.getTopStartCorner().col,s=n.getBottomEndCorner().col,r=this.columnIndexMapper,l=null!==i?r.getRenderableFromVisualIndex(i):null,a=null!==s?r.getRenderableFromVisualIndex(s):null,h=r.getNotTrimmedIndexes(),c=[];if(i!==s){if(null===i||null===s)return!0;if(s-i+1>(a??0)-(l??0)+1){const t=h.slice(i,s+1),e=new Set(o);t.forEach(t=>{e.has(t)&&c.push(t)})}}else if(0===l&&null!==i&&l<i)c.push(...h.slice(0,i));else if(null===l)c.push(...h.slice(0,this.countCols()));else{const t=this.countCols()-1,e=r.getNearestNotHiddenIndex(t,-1),o=null!==e?r.getRenderableFromVisualIndex(e):null;null!==a&&null!==s&&a===o&&t>s&&c.push(...h.slice(s+1))}return $(c,t=>{e.push(this.toVisualColumn(t))}),0===e.length}}}(this))})}}function r1(){const t=this.getSetting("columns");Array.isArray(t)&&this.hideColumns(t)}function l1(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function a1(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function h1(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,a1(t,e,"get"))}function c1(t,e,o){l1(t,e),e.set(t,o)}function d1(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,a1(t,e,"set"),o),o}function u1(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}Qn.getSingleton().register("beforeHideRows"),Qn.getSingleton().register("afterHideRows"),Qn.getSingleton().register("beforeUnhideRows"),Qn.getSingleton().register("afterUnhideRows");const g1="hiddenRows",p1=Symbol("skipRowOnPasteByHiddenRows");var f1=new WeakMap,m1=new WeakMap,w1=new WeakMap,b1=new WeakMap,v1=new WeakMap,C1=new WeakMap,y1=new WeakSet;class S1 extends pW{static get PLUGIN_KEY(){return g1}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[g1]}enablePlugin(){this.enabled||(d1(this,f1,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),h1(this,f1).addLocalHook("init",()=>u1(this,y1,k1).call(this)),this.hot.rowIndexMapper.getNumberOfIndexes()>0&&u1(this,y1,k1).call(this),this.addHook("afterContextMenuDefaultOptions",h1(this,C1)),this.addHook("afterGetCellMeta",h1(this,w1)),this.addHook("modifyRowHeight",h1(this,m1)),this.addHook("afterGetRowHeader",h1(this,v1)),this.addHook("modifyCopyableRange",h1(this,b1)),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(),o=this.isValidConfig(t);let n=e;const i=h1(this,f1).getValues().slice(),s=t.length>0;if(o&&s){$(t.map(t=>this.hot.toPhysicalRow(t)),t=>{i[t]=!1}),n=B(i,(t,e,o)=>(e&&t.push(this.hot.toVisualRow(o)),t),[])}!1!==this.hot.runHooks("beforeUnhideRows",e,n,o&&s)&&(o&&s&&h1(this,f1).setValues(i),this.hot.runHooks("afterUnhideRows",e,n,o&&s,o&&n.length<e.length))}showRow(...t){this.showRows(t)}hideRows(t){const e=this.getHiddenRows(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeHideRows",e,n,o)&&(o&&this.hot.batchExecution(()=>{$(t,t=>{h1(this,f1).setValueAtIndex(this.hot.toPhysicalRow(t),!0)})},!0),this.hot.runHooks("afterHideRows",e,n,o,o&&n.length>e.length))}hideRow(...t){this.hideRows(t)}getHiddenRows(){return F(h1(this,f1).getHiddenIndexes(),t=>this.hot.toVisualRow(t))}isHidden(t){return h1(this,f1).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(){$(this.hot.getCellsMeta(),t=>{const e=t;e[p1]&&(delete e.skipRowOnPaste,delete e[p1])})}destroy(){d1(this,f1,null),super.destroy()}constructor(...t){var e,o;super(...t),l1(e=this,o=y1),o.add(e),c1(this,f1,{writable:!0,value:void 0}),c1(this,m1,{writable:!0,value:void 0}),c1(this,w1,{writable:!0,value:void 0}),c1(this,b1,{writable:!0,value:void 0}),c1(this,v1,{writable:!0,value:void 0}),c1(this,C1,{writable:!0,value:void 0}),d1(this,f1,null),d1(this,m1,(t,e)=>this.isHidden(e)?0:t),d1(this,w1,(t,e,o)=>{if(!1===this.getSetting("copyPasteEnabled")){const e=o;this.isHidden(t)?!0!==o.skipRowOnPaste&&(o.skipRowOnPaste=!0,e[p1]=!0):e[p1]&&(delete o.skipRowOnPaste,delete e[p1])}if(this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const t=o.className.split(" ");if(t.length>0){const e=t.indexOf("afterHiddenRow");e>-1&&t.splice(e,1),o.className=t.join(" ")}}}),d1(this,b1,t=>{if(this.getSetting("copyPasteEnabled"))return t;const e=[],o=(t,o,n,i)=>{e.push({startRow:t,endRow:o,startCol:n,endCol:i})};return $(t,t=>{const e=t;let n=!0,i=0;as(e.startRow,e.endRow,t=>{this.isHidden(t)?(n||o(i,t-1,e.startCol,e.endCol),n=!0):(n&&(i=t),t===e.endRow&&o(i,t,e.startCol,e.endCol),n=!1)})}),e}),d1(this,v1,(t,e)=>{if(!this.getSetting("indicators")||t<0)return;const o=[];t>=1&&this.isHidden(t-1)&&o.push("afterHiddenRow"),t<this.hot.countRows()-1&&this.isHidden(t+1)&&o.push("beforeHiddenRow"),po(e,o)}),d1(this,C1,t=>{var e;t.items.push({name:iL},(e=this,{key:"hidden_rows_hide",name(){const t=this.getSelectedActive();let e=0;if(Array.isArray(t)){const[o,,n]=t;o-n!==0&&(e=1)}return this.getTranslatedPhrase($w,e)},callback(){const t=this.getSelectedRangeActive();if(!t)return;const{from:o,to:n}=t;if(null===o.row||null===n.row)return;const i=Math.max(Math.min(o.row,n.row),0),s=Math.max(o.row,n.row),r=[];for(let t=i;t<=s;t+=1)r.push(t);e.hideRows(r);const l=r[r.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(l,1,!0);null!==a&&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(Uw,t)},callback(){if(0===e.length)return;let o=e[0],n=e[e.length-1];o=this.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1)??0,n=this.rowIndexMapper.getNearestNotHiddenIndex(n+1,1)??this.countRows()-1,t.showRows(e),this.view.adjustElementsSize(),this.render(),n-o+1===this.countRows()||this.selectRows(o,n)},disabled:!1,hidden(){const o=F(t.getHiddenRows(),t=>this.toPhysicalRow(t));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;e.length=0;const n=this.getSelectedRangeActive();if(!n)return!0;const i=n.getTopStartCorner().row,s=n.getBottomEndCorner().row,r=this.rowIndexMapper,l=null!==i?r.getRenderableFromVisualIndex(i):null,a=null!==s?r.getRenderableFromVisualIndex(s):null,h=r.getNotTrimmedIndexes(),c=[];if(i!==s){if(null===i||null===s)return!0;if(s-i+1>(a??0)-(l??0)+1){const t=h.slice(i,s+1),e=new Set(o);t.forEach(t=>{e.has(t)&&c.push(t)})}}else if(0===l&&null!==i&&l<i)c.push(...h.slice(0,i));else if(null===l)c.push(...h.slice(0,this.countRows()));else{const t=this.countRows()-1,e=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(t,-1)??t);if(null===a)return!0;null!==s&&a===e&&t>s&&c.push(...h.slice(s+1))}return $(c,t=>{e.push(this.toVisualRow(t))}),0===e.length}}}(this))})}}function k1(){const t=this.getSetting("rows");Array.isArray(t)&&this.hideRows(t)}function R1(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E1(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function x1(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,E1(t,e,"get"))}function M1(t,e,o){R1(t,e),e.set(t,o)}function T1(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,E1(t,e,"set"),o),o}Qn.getSingleton().register("beforeColumnFreeze"),Qn.getSingleton().register("afterColumnFreeze"),Qn.getSingleton().register("beforeColumnUnfreeze"),Qn.getSingleton().register("afterColumnUnfreeze");const H1="manualColumnFreeze";var I1=new WeakMap,_1=new WeakSet,A1=new WeakMap;class W1 extends pW{static get PLUGIN_KEY(){return H1}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[H1]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",t=>{(function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o})(this,_1,O1).call(this,t)}),this.addHook("beforeColumnMove",x1(this,A1)),super.enablePlugin())}disablePlugin(){T1(this,I1,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(t){const e=this.hot.getSettings(),o=(e.fixedColumnsStart??0)<this.hot.countCols()&&t>(e.fixedColumnsStart??0)-1;x1(this,I1)||T1(this,I1,!0);!1!==this.hot.runHooks("beforeColumnFreeze",t,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart??0),e._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",t,o))}unfreezeColumn(t){const e=this.hot.getSettings(),o=e.fixedColumnsStart??0,n=o>0&&t<=o-1;x1(this,I1)||T1(this,I1,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",t,n)&&(n&&(e._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(t,e.fixedColumnsStart??0)),this.hot.runHooks("afterColumnUnfreeze",t,n))}constructor(...t){var e,o;super(...t),R1(e=this,o=_1),o.add(e),M1(this,I1,{writable:!0,value:void 0}),M1(this,A1,{writable:!0,value:void 0}),T1(this,I1,!1),T1(this,A1,(t,e)=>{if(x1(this,I1)){const o=this.hot.getSettings().fixedColumnsStart??0;if(e<o)return!1;if(t.some(t=>t<o))return!1}})}}function O1(t){var e;t.items.push({name:"---------"},(e=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(ww)},callback(t,o){const[{start:{col:n}}]=o;e.freezeColumn(n),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??0)-1)&&(e=!0),e}}),function(t){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(bw)},callback(e,o){const[{start:{col:n}}]=o;t.unfreezeColumn(n),this.view.adjustElementsSize(),this.render()},hidden(){const t=this.getSelectedRange();let e=!1;if(void 0===t)e=!0;else if(t.length>1)e=!0;else{const o=t[0].from.col,n=t[0].to.col,i=this.getSettings().fixedColumnsStart??0;(o!==n||null!==o&&o>=i)&&(e=!0)}return e}}}(this))}const N1="px";let P1=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){is(t)&&(this._element.style.top=t+N1),is(e)&&(this._element.style[this.inlineProperty]=e+N1)}getPosition(){const t=this._element.style;return{top:t.top?Number.parseInt(t.top,10):0,start:t[this.inlineProperty]?Number.parseInt(t[this.inlineProperty],10):0}}setSize(t,e){is(t)&&(this._element.style.width=t+N1),is(e)&&(this._element.style.height=e+N1)}getSize(){return{width:this._element.style.width?Number.parseInt(this._element.style.width,10):0,height:this._element.style.height?Number.parseInt(this._element.style.height,10):0}}setOffset(t,e){if(is(t)&&(this._element.style.marginTop=t+N1),is(e)){const t=`margin${yn(this.inlineProperty)}`;this._element.style[t]=e+N1}}getOffset(){const t=this._element.style,e=`margin${yn(this.inlineProperty)}`;return{top:t.marginTop?Number.parseInt(t.marginTop,10):0,start:t[e]?Number.parseInt(t[e],10):0}}constructor(t){this._element=null,this.state=0,this.hot=t,this.inlineProperty=t.isRtl()?"right":"left"}};let D1=class extends P1{build(){super.build(),po(this._element,"ht__manualColumnMove--backlight")}};let L1=class extends P1{build(){super.build(),po(this._element,"ht__manualColumnMove--guideline")}};function z1(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B1(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function V1(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,B1(t,e,"get"))}function F1(t,e,o){z1(t,e),e.set(t,o)}function $1(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,B1(t,e,"set"),o),o}function U1(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function j1(t,e){z1(t,e),e.add(t)}Qn.getSingleton().register("beforeColumnMove"),Qn.getSingleton().register("afterColumnMove");const q1="manualColumnMove",G1="ht__manualColumnMove",Y1="show-ui",X1="on-moving--columns",K1="after-selection--columns";var Z1=new WeakMap,Q1=new WeakMap,J1=new WeakMap,t2=new WeakMap,e2=new WeakMap,o2=new WeakMap,n2=new WeakMap,i2=new WeakMap,s2=new WeakMap,r2=new WeakMap,l2=new WeakMap,a2=new WeakMap,h2=new WeakMap,c2=new WeakMap,d2=new WeakSet,u2=new WeakSet,g2=new WeakSet,p2=new WeakMap,f2=new WeakSet,m2=new WeakMap,w2=new WeakSet,b2=new WeakSet,v2=new WeakMap,C2=new WeakSet,y2=new WeakMap;class S2 extends pW{static get PLUGIN_KEY(){return q1}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[q1]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",V1(this,p2)),this.addHook("beforeOnCellMouseOver",V1(this,m2)),this.addHook("beforeOnCellMouseOverOutside",(t,e,o,n)=>U1(this,w2,M2).call(this,n)),this.addHook("afterScrollVertically",V1(this,v2)),this.addHook("afterLoadData",V1(this,y2)),this.buildPluginUI(),this.registerEvents(),po(this.hot.rootElement,G1),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){fo(this.hot.rootElement,G1),this.unregisterEvents(),V1(this,Z1).destroy(),V1(this,Q1).destroy(),super.disablePlugin()}moveColumn(t,e){return this.moveColumns([t],e)}moveColumns(t,e){const o=V1(this,s2),n=this.isMovePossible(t,e),i=this.hot.runHooks("beforeColumnMove",t,e,o,n);if($1(this,s2,void 0),!1===i)return!1;n&&this.hot.columnIndexMapper.moveIndexes(t,e);const s=n&&this.isColumnOrderChanged(t,e);return this.hot.runHooks("afterColumnMove",t,e,o,n,s),s}dragColumn(t,e){return this.dragColumns([t],e)}dragColumns(t,e){const o=this.countFinalIndex(t,e);return $1(this,s2,e),this.moveColumns(t,o)}isDragging(){return this.enabled&&V1(this,e2)&&V1(this,o2)}isMovePossible(t,e){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),n=t.length+e>o,i=e<0,s=t.some(t=>t<0),r=t.some(t=>t>=o);return!(n||i||s||r)}isColumnOrderChanged(t,e){return t.some((t,o)=>t-o!==e)}countFinalIndex(t,e){const o=B(t,(t,o)=>o<e?t+1:t,0);return e-o}getColumnsWidth(t,e){const o=this.hot.columnIndexMapper;let n=0;for(let i=t;i<=e;i+=1){const t=o.getRenderableFromVisualIndex(i);i<0?n+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==t&&(n+=this.hot.view._wt.wtTable.getColumnWidth(t)||0)}return n}moveBySettingsOrLoad(){const t=this.hot.getSettings()[q1];Array.isArray(t)&&this.moveColumns(t,0)}isFixedColumnsStart(t){return t<(this.hot.getSettings().fixedColumnsStart??0)}prepareColumnsToMoving(t,e){const o=[];return as(t,e,t=>{o.push(t)}),o}refreshPositions(){const t=this.hot.view.getFirstFullyVisibleColumn()??0,e=V1(this,r2)??0,o=V1(this,h2)??0,n=V1(this,l2)??0;this.isFixedColumnsStart(e)&&t>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(t-1,-1)??void 0});const i=this.hot.view._wt.wtTable,s=this.hot.view._wt.wtOverlays.scrollableElement,r=s instanceof Window?s.scrollX:s.scrollLeft;let l=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,e-1);const a=i.hider.offsetWidth,h=i.TBODY?.offsetLeft??0,c=V1(this,Z1).getOffset().start,d=V1(this,Z1).getSize().width;let u=0;const g=U1(this,d2,k2).call(this,s,r,n);if(V1(this,a2)){const t=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone;u=t?.wtTable.getColumnHeader(-1)?.offsetWidth??0}this.isFixedColumnsStart(e)&&(l+=r),l+=u,l=U1(this,u2,R2).call(this,e,l,g,t,o);let p=g,f=l;g+d+c>=a?p=a-d-c:g+c<h+u&&(p=h+u+Math.abs(c)),l>=a-1?f=a-1:0===f?f=1:s instanceof Window&&e<o&&(f-=n<=s.scrollX?n:0),V1(this,Z1).setPosition(void 0,p),V1(this,Q1).setPosition(void 0,f)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>U1(this,f2,x2).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>U1(this,b2,T2).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){V1(this,Z1).build(),V1(this,Q1).build()}destroy(){V1(this,Z1).destroy(),V1(this,Q1).destroy(),super.destroy()}constructor(...t){super(...t),j1(this,d2),j1(this,u2),j1(this,g2),j1(this,f2),j1(this,w2),j1(this,b2),j1(this,C2),F1(this,Z1,{writable:!0,value:void 0}),F1(this,Q1,{writable:!0,value:void 0}),F1(this,J1,{writable:!0,value:void 0}),F1(this,t2,{writable:!0,value:void 0}),F1(this,e2,{writable:!0,value:void 0}),F1(this,o2,{writable:!0,value:void 0}),F1(this,n2,{writable:!0,value:void 0}),F1(this,i2,{writable:!0,value:void 0}),F1(this,s2,{writable:!0,value:void 0}),F1(this,r2,{writable:!0,value:void 0}),F1(this,l2,{writable:!0,value:void 0}),F1(this,a2,{writable:!0,value:void 0}),F1(this,h2,{writable:!0,value:void 0}),F1(this,c2,{writable:!0,value:void 0}),F1(this,p2,{writable:!0,value:void 0}),F1(this,m2,{writable:!0,value:void 0}),F1(this,v2,{writable:!0,value:void 0}),F1(this,y2,{writable:!0,value:void 0}),$1(this,Z1,new D1(this.hot)),$1(this,Q1,new L1(this.hot)),$1(this,J1,[]),$1(this,t2,0),$1(this,e2,!1),$1(this,o2,!1),$1(this,n2,{x:0,y:0}),$1(this,i2,{}),$1(this,c2,0),$1(this,p2,(t,e,o,n)=>{const i=this.hot.view._wt.wtTable,s=this.hot.selection.isSelectedByColumnHeader(),r=this.hot.getSelectedRangeActive();if(!r||!s||V1(this,e2)||0!==t.button)return $1(this,e2,!1),$1(this,o2,!1),V1(this,J1).length=0,void fo(this.hot.rootElement,[X1,Y1]);const l=V1(this,Q1).isBuilt()&&!V1(this,Q1).isAppended(),a=V1(this,Z1).isBuilt()&&!V1(this,Z1).isAppended();l&&a&&(V1(this,Q1).appendTo(i.hider),V1(this,Z1).appendTo(i.hider));const{from:h,to:c}=r,d=Math.min(h.col??0,c.col??0),u=Math.max(h.col??0,c.col??0);if(e.row<0&&e.col>=d&&e.col<=u){n.column=!0,$1(this,e2,!0),$1(this,n2,{x:t.clientX,y:t.clientY});const s=o.firstChild?function(t,e){const o={x:t.offsetX,y:t.offsetY};let n=no(t);if(!en(e)||n!==e&&n.contains(e))return o;for(;n!==e;)o.x+=n.offsetLeft,o.y+=n.offsetTop,n=n.offsetParent;return o}(t,o.firstChild).x:t.offsetX;V1(this,i2).eventPageX=t.pageX,$1(this,r2,e.col),V1(this,i2).TD=o,V1(this,i2).col=e.col,$1(this,J1,this.prepareColumnsToMoving(d,u)),$1(this,a2,!!this.hot.getSettings().rowHeaders),$1(this,t2,this.hot.countCols()),$1(this,h2,this.hot.getSettings().fixedColumnsStart),$1(this,l2,Mo(this.hot.rootElement).left);const r=V1(this,a2)?-1:0;$1(this,c2,U1(this,C2,H2).call(this,e.row+i.getColumnHeadersCount()));const l=i.holder.scrollTop+V1(this,c2)+1,a=e.col<(V1(this,h2)??0),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),c=Math.abs(s-(this.hot.isRtl()?o.offsetWidth:0)),g=this.getColumnsWidth(d,e.col-1)+c,p=this.getColumnsWidth(r,d-1)+(a?h:0)+g;V1(this,Z1).setPosition(l,p),V1(this,Z1).setSize(this.getColumnsWidth(d,u),i.hider.offsetHeight-l),V1(this,Z1).setOffset(0,-g),$1(this,o2,!1),po(this.hot.rootElement,X1)}else fo(this.hot.rootElement,K1),$1(this,e2,!1),$1(this,o2,!1),V1(this,J1).length=0}),$1(this,m2,(t,e,o,n)=>{this.hot.getSelectedRangeActive()&&V1(this,e2)&&(V1(this,J1).indexOf(e.col)>-1?fo(this.hot.rootElement,Y1):po(this.hot.rootElement,Y1),n.row=!0,n.column=!0,n.cell=!0,$1(this,r2,e.col),V1(this,i2).TD=o)}),$1(this,v2,()=>{const t=this.hot.view._wt.wtTable,e=V1(this,c2)+1+t.holder.scrollTop;V1(this,Z1).setPosition(e),V1(this,Z1).setSize(void 0,t.hider.offsetHeight-e)}),$1(this,y2,()=>{this.moveBySettingsOrLoad()})}}function k2(t,e,o){if(this.hot.isRtl()){const n=this.hot.rootWindow,i=Do(this.hot.rootElement),s=n.innerWidth-o-i;return n.innerWidth-V1(this,i2).eventPageX-s-(t instanceof Window?0:e)}return V1(this,i2).eventPageX-(o-(t instanceof Window?0:e))}function R2(t,e,o,n,i){return t<0?(V1(this,i2).col=i>0?0:n>0?n-1:n,e):U1(this,g2,E2).call(this,t,e,o)}function E2(t,e,o){const n=e+V1(this,i2).TD.offsetWidth;let i=e,s=t;for(;s<V1(this,t2);){const t=this.getColumnsWidth(s,s);if(t>0&&o<i+t||i+t>=n){if(t/2+i<=o){let e=s+1;for(;e<V1(this,t2)&&0===this.getColumnsWidth(e,e);)e+=1;return V1(this,i2).col=e,i+t}return V1(this,i2).col=s,i}i+=t,s+=1}return V1(this,i2).col=s,i}function x2(t){V1(this,e2)&&((Math.abs(t.clientX-V1(this,n2).x)>3||Math.abs(t.clientY-V1(this,n2).y)>3)&&$1(this,o2,!0),V1(this,i2).eventPageX=t.pageX,this.refreshPositions())}function M2(t){V1(this,e2)&&(t.row=!0,t.column=!0,t.cell=!0)}function T2(){const t=V1(this,i2).col,e=V1(this,J1).length,o=V1(this,o2);if($1(this,r2,void 0),$1(this,e2,!1),$1(this,o2,!1),fo(this.hot.rootElement,[X1,Y1,K1]),this.hot.selection.isSelectedByColumnHeader()&&po(this.hot.rootElement,K1),!o||e<1||void 0===t)return void(V1(this,J1).length=0);const n=V1(this,J1)[0],i=this.hot.toPhysicalColumn(n),s=this.dragColumns(V1(this,J1),t);if(V1(this,J1).length=0,!0===s){this.hot.view.adjustElementsSize(),this.hot.render();const t=this.hot.toVisualColumn(i),o=t+e-1;this.hot.selectColumns(t,o)}}function H2(t){const e=this.hot.view._wt.wtTable;let o=0;for(let n=0;n<t;n++)o+=e.getColumnHeaderHeight(n);return o}function I2(t,e="horizontal"){const o=t.getBoundingClientRect(),n="vertical"===e?o.height:o.width,i="vertical"===e?t.offsetHeight:t.offsetWidth;if(!Number.isFinite(n)||!Number.isFinite(i)||n<=0||i<=0)return 1;if(n>=i&&n-i<=1)return 1;const s=n/i;return Number.isFinite(s)&&s>0?s:1}function _2(t,e){return!Number.isFinite(e)||e<=0?t:Math.round(t/e)}function A2(t,e){return!t.parentNode||e>1}function W2(t,e){return!!t?.parentNode&&e>=2}function O2(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N2(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function P2(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,N2(t,e,"get"))}function D2(t,e,o){O2(t,e),e.set(t,o)}function L2(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,N2(t,e,"set"),o),o}function z2(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function B2(t,e){O2(t,e),e.add(t)}const V2="manualColumnResize";var F2=new WeakMap,$2=new WeakMap,U2=new WeakMap,j2=new WeakMap,q2=new WeakMap,G2=new WeakMap,Y2=new WeakMap,X2=new WeakMap,K2=new WeakMap,Z2=new WeakMap,Q2=new WeakMap,J2=new WeakMap,t3=new WeakMap,e3=new WeakMap,o3=new WeakMap,n3=new WeakMap,i3=new WeakMap,s3=new WeakMap,r3=new WeakSet,l3=new WeakSet,a3=new WeakSet,h3=new WeakSet,c3=new WeakSet,d3=new WeakSet,u3=new WeakMap,g3=new WeakMap,p3=new WeakMap;class f3 extends pW{static get PLUGIN_KEY(){return V2}static get PLUGIN_PRIORITY(){return 130}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return!!this.hot.getSettings()[V2]}enablePlugin(){this.enabled||(L2(this,n3,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"physicalIndexToValue",null,{skipUnchangedWrites:!0})),P2(this,n3).addLocalHook("init",()=>z2(this,r3,m3).call(this)),this.hot.columnIndexMapper.getNumberOfIndexes()>0&&z2(this,r3,m3).call(this),L2(this,i3,this.hot.columnIndexMapper.observeMapChange(P2(this,n3),()=>{this.hot.view?.invalidateColumnWidthCache()})),this.addHook("modifyColWidth",P2(this,u3),1),this.addHook("beforeStretchingColumnWidth",P2(this,g3),1),this.addHook("beforeColumnResize",P2(this,p3)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){P2(this,i3)&&(P2(this,i3).call(this),L2(this,i3,null)),L2(this,s3,P2(this,n3).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){to("ManualColumnResize.saveManualColumnWidths","`saveManualColumnWidths()` is deprecated and will be removed in Handsontable 19.0.0. The PersistentState plugin has been removed.")}loadManualColumnWidths(){return to("ManualColumnResize.loadManualColumnWidths","`loadManualColumnWidths()` is deprecated and will be removed in Handsontable 19.0.0. The PersistentState plugin has been removed."),[]}setManualSize(t,e){const o=Math.max(e,20),n=this.hot.toPhysicalColumn(t);return P2(this,n3).setValueAtIndex(n,o),o}clearManualSize(t){const e=this.hot.toPhysicalColumn(t);P2(this,n3).setValueAtIndex(e,null)}setupHandlePosition(t){if(A2(t,P2(this,e3)))return;L2(this,F2,t);const{_wt:e}=this.hot.view,o=e.wtTable.getCoords(P2(this,F2));if(!o)return;const n=o.col;if(null===n||n<0)return;const i=Lo(P2(this,F2)),s=n<e.getSetting("fixedColumnsStart");let r;const l=o.row??0,a=o.col??0;s&&(r=e.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(P2(this,F2),l,a)),r||(r=e.wtOverlays.topOverlay.getRelativeCellPosition(P2(this,F2),l,a)),L2(this,$2,this.hot.columnIndexMapper.getVisualFromRenderableIndex(n)),L2(this,U2,[]);const h=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&h){const t=this.hot.getSelectedRange()??[],e=new Set;$(t,t=>{const o=t.getTopStartCorner().col,n=t.getBottomEndCorner().col;null!==o&&null!==n&&as(o,n,t=>{e.has(t)||(e.add(t),P2(this,U2).push(t))})})}null!==P2(this,$2)&&(P2(this,U2).includes(P2(this,$2))||L2(this,U2,[P2(this,$2)]),r&&(L2(this,X2,r.start-6),L2(this,Y2,Do(P2(this,F2))),L2(this,K2,I2(P2(this,F2))),P2(this,Z2).style.top=`${r.top}px`,P2(this,Z2).style[this.inlineDir]=`${P2(this,X2)+P2(this,Y2)}px`,P2(this,Z2).style.height=`${i}px`,this.hot.rootElement.appendChild(P2(this,Z2))))}refreshHandlePosition(){P2(this,Z2).style[this.inlineDir]=`${(P2(this,X2)??0)+(P2(this,j2)??0)}px`}setupGuidePosition(){const t=Lo(P2(this,Z2)),e=Number.parseInt(P2(this,Z2).style.top,10)+t,o=this.hot.view.getTableHeight();po(P2(this,Z2),"active"),po(P2(this,Q2),"active"),P2(this,Q2).style.top=`${e}px`,this.refreshGuidePosition(),P2(this,Q2).style.height=o-t+"px",this.hot.rootElement.appendChild(P2(this,Q2))}refreshGuidePosition(){P2(this,Q2).style[this.inlineDir]=P2(this,Z2).style[this.inlineDir]}hideHandleAndGuide(){fo(P2(this,Z2),"active"),fo(P2(this,Q2),"active")}checkIfColumnHeader(t){const e=so(t,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,n.clone.wtTable.THEAD].includes(e)}getClosestTHParent(t){return"TABLE"!==t.tagName?"TH"===t.tagName?t:this.getClosestTHParent(t.parentNode):null}afterMouseDownTimeout(){const t=W2(P2(this,F2),P2(this,e3)),e=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},o=(t,o)=>{const n=this.hot.runHooks("beforeColumnResize",P2(this,q2),t,!0);!1!==n&&("number"==typeof n&&L2(this,q2,n),this.setManualSize(t,P2(this,q2)??0),this.hot.runHooks("afterColumnResize",P2(this,q2),t,!0),o&&e())};if(P2(this,e3)>=2){P2(this,U2).length>1?($(P2(this,U2),t=>{o(t)}),e()):$(P2(this,U2),t=>{o(t,!0)})}L2(this,o3,null),L2(this,e3,0),t&&P2(this,F2)&&this.setupHandlePosition(P2(this,F2))}bindEvents(){const{rootWindow:t,rootElement:e}=this.hot;this.eventManager.addEventListener(e,"mouseover",t=>z2(this,l3,w3).call(this,t)),this.eventManager.addEventListener(e,"mousedown",t=>z2(this,a3,b3).call(this,t)),this.eventManager.addEventListener(t,"mousemove",t=>z2(this,h3,v3).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>z2(this,c3,C3).call(this)),this.eventManager.addEventListener(P2(this,Z2),"contextmenu",()=>z2(this,d3,y3).call(this))}destroy(){super.destroy()}constructor(t){super(t),B2(this,r3),B2(this,l3),B2(this,a3),B2(this,h3),B2(this,c3),B2(this,d3),D2(this,F2,{writable:!0,value:void 0}),D2(this,$2,{writable:!0,value:void 0}),D2(this,U2,{writable:!0,value:void 0}),D2(this,j2,{writable:!0,value:void 0}),D2(this,q2,{writable:!0,value:void 0}),D2(this,G2,{writable:!0,value:void 0}),D2(this,Y2,{writable:!0,value:void 0}),D2(this,X2,{writable:!0,value:void 0}),D2(this,K2,{writable:!0,value:void 0}),D2(this,Z2,{writable:!0,value:void 0}),D2(this,Q2,{writable:!0,value:void 0}),D2(this,J2,{writable:!0,value:void 0}),D2(this,t3,{writable:!0,value:void 0}),D2(this,e3,{writable:!0,value:void 0}),D2(this,o3,{writable:!0,value:void 0}),D2(this,n3,{writable:!0,value:void 0}),D2(this,i3,{writable:!0,value:void 0}),D2(this,s3,{writable:!0,value:void 0}),D2(this,u3,{writable:!0,value:void 0}),D2(this,g3,{writable:!0,value:void 0}),D2(this,p3,{writable:!0,value:void 0}),L2(this,F2,null),L2(this,$2,null),L2(this,U2,[]),L2(this,j2,null),L2(this,q2,null),L2(this,G2,null),L2(this,Y2,null),L2(this,X2,null),L2(this,K2,1),L2(this,Z2,this.hot.rootDocument.createElement("DIV")),L2(this,Q2,this.hot.rootDocument.createElement("DIV")),L2(this,J2,null),L2(this,t3,!1),L2(this,e3,0),L2(this,o3,null),L2(this,i3,null),L2(this,u3,(t,e)=>{let o=t;if(this.enabled){const t=this.hot.toPhysicalColumn(e),n=P2(this,n3).getValueAtIndex(t);this.hot.getSettings()[V2]&&n&&(o=n)}return o}),L2(this,g3,(t,e)=>{const o=P2(this,n3).getValueAtIndex(this.hot.toPhysicalColumn(e));return"number"==typeof o?o:t}),L2(this,p3,()=>{this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}),po(P2(this,Z2),"manualColumnResizer"),po(P2(this,Q2),"manualColumnResizerGuide")}}function m3(){const t=this.hot.getSettings()[V2];Array.isArray(t)?(this.hot.batchExecution(()=>{t.forEach((t,e)=>{P2(this,n3).setValueAtIndex(e,t)})},!0),L2(this,s3,t)):!0===t&&Array.isArray(P2(this,s3))&&this.hot.batchExecution(()=>{P2(this,s3).forEach((t,e)=>{P2(this,n3).setValueAtIndex(e,t)})},!0)}function w3(t){if(!Qo(no(t))&&!0!==P2(this,t3)&&this.checkIfColumnHeader(no(t))){const e=this.getClosestTHParent(no(t));if(!e)return;const o=e.getAttribute("colspan");!e||null!==o&&"1"!==o||P2(this,J2)||this.setupHandlePosition(e)}}function b3(t){no(t).parentNode===this.hot.rootElement&&go(no(t),"manualColumnResizer")&&P2(this,F2)&&(this.setupHandlePosition(P2(this,F2)),this.setupGuidePosition(),L2(this,J2,!0),null===P2(this,o3)&&L2(this,o3,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),L2(this,e3,P2(this,e3)+1),this.startX=t.pageX,L2(this,q2,P2(this,Y2)))}function v3(t){if(P2(this,J2)){const e=_2((t.pageX-this.startX)*this.hot.getDirectionFactor(),P2(this,K2));L2(this,j2,(P2(this,Y2)??0)+e),$(P2(this,U2),t=>{L2(this,q2,this.setManualSize(t,P2(this,j2)??0))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function C3(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,o)=>{const n=this.hot.runHooks("beforeColumnResize",P2(this,q2),e,!1);!1===n?(this.setManualSize(e,P2(this,Y2)??0),L2(this,q2,P2(this,Y2))):"number"==typeof n&&(L2(this,q2,n),this.setManualSize(e,P2(this,q2))),o&&t(),!1!==n&&this.hot.runHooks("afterColumnResize",P2(this,q2),e,!1)};if(P2(this,J2)){if(this.hideHandleAndGuide(),L2(this,J2,!1),P2(this,q2)!==P2(this,Y2)){P2(this,U2).length>1?($(P2(this,U2),t=>{e(t)}),t()):$(P2(this,U2),t=>{e(t,!0)})}P2(this,F2)&&this.setupHandlePosition(P2(this,F2))}}function y3(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(P2(this,Z2)),this.hot.rootElement.removeChild(P2(this,Q2)),L2(this,J2,!1),L2(this,t3,!0),this.hot._registerMicrotask(()=>{L2(this,t3,!1)})}const S3="px";let k3=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){null!=t&&(this._element.style.top=t+S3),null!=e&&(this._element.style.left=e+S3)}getPosition(){return{top:this._element.style.top?Number.parseInt(this._element.style.top,10):0,left:this._element.style.left?Number.parseInt(this._element.style.left,10):0}}setSize(t,e){t&&(this._element.style.width=t+S3),e&&(this._element.style.height=e+S3)}getSize(){return{width:this._element.style.width?Number.parseInt(this._element.style.width,10):0,height:this._element.style.height?Number.parseInt(this._element.style.height,10):0}}setOffset(t,e){t&&(this._element.style.marginTop=t+S3),e&&(this._element.style.marginLeft=e+S3)}getOffset(){return{top:this._element.style.marginTop?Number.parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?Number.parseInt(this._element.style.marginLeft,10):0}}constructor(t){this._element=null,this.state=0,this.hot=t}};class R3 extends k3{build(){super.build(),po(this._element,"ht__manualRowMove--backlight")}}class E3 extends k3{build(){super.build(),po(this._element,"ht__manualRowMove--guideline")}}function x3(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function M3(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function T3(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,M3(t,e,"get"))}function H3(t,e,o){x3(t,e),e.set(t,o)}function I3(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,M3(t,e,"set"),o),o}function _3(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function A3(t,e){x3(t,e),e.add(t)}Qn.getSingleton().register("beforeRowMove"),Qn.getSingleton().register("afterRowMove");const W3="manualRowMove",O3="ht__manualRowMove",N3="show-ui",P3="on-moving--rows",D3="after-selection--rows";var L3=new WeakMap,z3=new WeakMap,B3=new WeakMap,V3=new WeakMap,F3=new WeakMap,$3=new WeakMap,U3=new WeakMap,j3=new WeakSet,q3=new WeakMap,G3=new WeakSet,Y3=new WeakSet,X3=new WeakMap,K3=new WeakMap;class Z3 extends pW{static get PLUGIN_KEY(){return W3}static get PLUGIN_PRIORITY(){return 140}static get SETTING_KEYS(){return[W3]}isEnabled(){return!!this.hot.getSettings()[W3]}enablePlugin(){this.enabled||(this.addHook("beforeOnCellMouseDown",T3(this,U3)),this.addHook("beforeOnCellMouseOver",T3(this,q3)),this.addHook("beforeOnCellMouseOverOutside",(t,e,o,n)=>_3(this,G3,J3).call(this,n)),this.addHook("afterScrollHorizontally",T3(this,X3)),this.addHook("afterLoadData",T3(this,K3)),this.buildPluginUI(),this.registerEvents(),po(this.hot.rootElement,O3),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){fo(this.hot.rootElement,O3),this.unregisterEvents(),T3(this,L3).destroy(),T3(this,z3).destroy(),super.disablePlugin()}moveRow(t,e){return this.moveRows([t],e)}moveRows(t,e){const o=T3(this,$3),n=this.isMovePossible(t,e),i=this.hot.runHooks("beforeRowMove",t,e,o,n);if(I3(this,$3,void 0),!1===i)return!1;n&&this.hot.rowIndexMapper.moveIndexes(t,e);const s=n&&this.isRowOrderChanged(t,e);return this.hot.runHooks("afterRowMove",t,e,o,n,s),s}dragRow(t,e){return this.dragRows([t],e)}dragRows(t,e){const o=this.countFinalIndex(t,e);return I3(this,$3,e),this.moveRows(t,o)}isMovePossible(t,e){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),n=t.length+e>o,i=e<0,s=t.some(t=>t<0),r=t.some(t=>t>=o);return!(n||i||s||r)}isRowOrderChanged(t,e){return t.some((t,o)=>t-o!==e)}countFinalIndex(t,e){const o=B(t,(t,o)=>o<e?t+1:t,0);return e-o}getRowsHeight(t,e){const o=this.hot.rowIndexMapper;let n=0;for(let i=t;i<=e;i++){const t=o.getRenderableFromVisualIndex(i);if(null!==t){const e=this.hot.view._wt,o=e?.wtTable?.getRowHeight(t);n+=(null!=o?o:0)||(this.hot.stylesHandler.getDefaultRowHeight()??0)}}return n}moveBySettingsOrLoad(){const t=this.hot.getSettings()[W3];Array.isArray(t)&&this.moveRows(t,0)}isFixedRowTop(t){return t<(this.hot.getSettings().fixedRowsTop??0)}isFixedRowBottom(t){return t>this.hot.countRows()-1-(this.hot.getSettings().fixedRowsBottom??0)}prepareRowsToMoving(){const t=this.hot.getSelectedRangeActive(),e=[];if(!t)return e;const{from:o,to:n}=t;return as(Math.min(o.row??0,n.row??0),Math.max(o.row??0,n.row??0),t=>{e.push(t)}),e}refreshPositions(){const t=T3(this,F3).coords,e=T3(this,F3).TD;if(!t||!e)return;const o=this.hot.getFirstFullyVisibleRow(),n=this.hot.getLastFullyVisibleRow(),i=this.hot.countRows();if(this.isFixedRowTop(t.row)&&o>0){const t=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1);null!==t&&this.hot.scrollViewportTo(t)}if(this.isFixedRowBottom(t.row)&&n<i){const t=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1);null!==t&&this.hot.scrollViewportTo(t,void 0,!0)}const s=this.hot.view._wt.wtTable,r=this.hot.rootElement,l=Mo(r),a=No(r),h=s.holder.scrollTop,c=a instanceof HTMLElement?a.scrollTop:0,d=l.top-c,u=(T3(this,F3).eventPageY??0)-d+h,g=s.hider.offsetHeight,p=s.TBODY?.offsetTop??0,f=T3(this,L3).getOffset().top,m=T3(this,L3).getSize().height,w=e.offsetHeight/2,b=e.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?T3(this,F3).row=o>0?o-1:o:C?(T3(this,F3).row=t.row+1,v+=0===t.row?b-1:b):T3(this,F3).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),T3(this,L3).setPosition(y),T3(this,z3).setPosition(S)}registerEvents(){const{documentElement:t}=this.hot.rootDocument;this.eventManager.addEventListener(t,"mousemove",t=>_3(this,j3,Q3).call(this,t)),this.eventManager.addEventListener(t,"mouseup",()=>_3(this,Y3,t6).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){T3(this,L3).build(),T3(this,z3).build()}destroy(){T3(this,L3).destroy(),T3(this,z3).destroy(),super.destroy()}constructor(...t){super(...t),A3(this,j3),A3(this,G3),A3(this,Y3),H3(this,L3,{writable:!0,value:void 0}),H3(this,z3,{writable:!0,value:void 0}),H3(this,B3,{writable:!0,value:void 0}),H3(this,V3,{writable:!0,value:void 0}),H3(this,F3,{writable:!0,value:void 0}),H3(this,$3,{writable:!0,value:void 0}),H3(this,U3,{writable:!0,value:void 0}),H3(this,q3,{writable:!0,value:void 0}),H3(this,X3,{writable:!0,value:void 0}),H3(this,K3,{writable:!0,value:void 0}),I3(this,L3,new R3(this.hot)),I3(this,z3,new E3(this.hot)),I3(this,B3,[]),I3(this,F3,{}),I3(this,U3,(t,e,o,n)=>{const{wtTable:i,wtViewport:s}=this.hot.view._wt,r=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeActive();if(!l||!r||T3(this,V3)||0!==t.button)return I3(this,V3,!1),T3(this,B3).length=0,void fo(this.hot.rootElement,[P3,N3]);const a=T3(this,z3).isBuilt()&&!T3(this,z3).isAppended(),h=T3(this,L3).isBuilt()&&!T3(this,L3).isAppended();a&&h&&(T3(this,z3).appendTo(i.hider),T3(this,L3).appendTo(i.hider));const{from:c,to:d}=l,u=Math.min(c.row??0,d.row??0),g=Math.max(c.row??0,d.row??0);if(e.col<0&&e.row>=u&&e.row<=g){n.row=!0,I3(this,V3,!0),T3(this,F3).eventPageY=t.pageY,T3(this,F3).coords=e,T3(this,F3).TD=o,I3(this,B3,this.prepareRowsToMoving());const r=i.holder.scrollLeft+s.getRowHeaderWidth(),l=this.getRowsHeight(u,e.row-1)+(t.clientY-o.getBoundingClientRect().top);T3(this,L3).setPosition(null,r),T3(this,L3).setSize(i.hider.offsetWidth-r,this.getRowsHeight(u,g)),T3(this,L3).setOffset(-l,null),po(this.hot.rootElement,P3),this.refreshPositions()}else fo(this.hot.rootElement,D3),I3(this,V3,!1),T3(this,B3).length=0}),I3(this,q3,(t,e,o,n)=>{this.hot.getSelectedRangeActive()&&T3(this,V3)&&(T3(this,B3).indexOf(e.row)>-1?fo(this.hot.rootElement,N3):po(this.hot.rootElement,N3),n.row=!0,n.column=!0,n.cell=!0,T3(this,F3).coords=e,T3(this,F3).TD=o)}),I3(this,X3,()=>{const t=this.hot.view._wt.wtTable,e=this.hot.view._wt.wtViewport.getRowHeaderWidth()+t.holder.scrollLeft;T3(this,L3).setPosition(null,e),T3(this,L3).setSize(t.hider.offsetWidth-e)}),I3(this,K3,()=>{this.moveBySettingsOrLoad()})}}function Q3(t){T3(this,V3)&&(T3(this,F3).eventPageY=t.pageY,this.refreshPositions())}function J3(t){T3(this,V3)&&(t.row=!0,t.column=!0,t.cell=!0)}function t6(){const t=T3(this,F3).row,e=T3(this,B3).length;if(I3(this,V3,!1),fo(this.hot.rootElement,[P3,N3,D3]),this.hot.selection.isSelectedByRowHeader()&&po(this.hot.rootElement,D3),e<1||void 0===t)return;const o=T3(this,B3)[0],n=this.hot.toPhysicalRow(o),i=this.dragRows(T3(this,B3),t);if(T3(this,B3).length=0,!0===i){this.hot.view.adjustElementsSize(),this.hot.render();const t=this.hot.toVisualRow(n),o=t+e-1;this.hot.selectRows(t,o)}}function e6(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o6(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function n6(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,o6(t,e,"get"))}function i6(t,e,o){e6(t,e),e.set(t,o)}function s6(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,o6(t,e,"set"),o),o}function r6(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function l6(t,e){e6(t,e),e.add(t)}const a6="manualRowResize";var h6=new WeakMap,c6=new WeakMap,d6=new WeakMap,u6=new WeakMap,g6=new WeakMap,p6=new WeakMap,f6=new WeakMap,m6=new WeakMap,w6=new WeakMap,b6=new WeakMap,v6=new WeakMap,C6=new WeakMap,y6=new WeakMap,S6=new WeakMap,k6=new WeakMap,R6=new WeakMap,E6=new WeakMap,x6=new WeakMap,M6=new WeakSet,T6=new WeakSet,H6=new WeakSet,I6=new WeakSet,_6=new WeakSet,A6=new WeakMap,W6=new WeakSet;class O6 extends pW{static get PLUGIN_KEY(){return a6}static get PLUGIN_PRIORITY(){return 30}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return!!this.hot.getSettings()[a6]}enablePlugin(){this.enabled||(s6(this,R6,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"physicalIndexToValue",null,{skipUnchangedWrites:!0})),n6(this,R6).addLocalHook("init",()=>r6(this,W6,B6).call(this)),this.hot.rowIndexMapper.getNumberOfIndexes()>0&&r6(this,W6,B6).call(this),s6(this,E6,this.hot.rowIndexMapper.observeMapChange(n6(this,R6),()=>{this.hot.view?.invalidateRowHeightCache()})),this.addHook("modifyRowHeight",n6(this,A6)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){n6(this,E6)&&(n6(this,E6).call(this),s6(this,E6,null)),s6(this,x6,n6(this,R6).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){to("ManualRowResize.saveManualRowHeights","`saveManualRowHeights()` is deprecated and will be removed in Handsontable 19.0.0. The PersistentState plugin has been removed.")}loadManualRowHeights(){return to("ManualRowResize.loadManualRowHeights","`loadManualRowHeights()` is deprecated and will be removed in Handsontable 19.0.0. The PersistentState plugin has been removed."),[]}setManualSize(t,e){const o=this.hot.toPhysicalRow(t),n=Math.max(e,this.hot.stylesHandler.getDefaultRowHeight()??0);return null!==o&&n6(this,R6).setValueAtIndex(o,n),n}getLastDesiredRowHeight(){return n6(this,u6)??0}setupHandlePosition(t){if(A2(t,n6(this,S6)))return;s6(this,h6,t);const{view:e}=this.hot,{_wt:o}=e,n=o.wtTable.getCoords(n6(this,h6));if(!n)return;const i=n.row;if(null===i||i<0)return;const s=Do(n6(this,h6)),r=i<o.getSetting("fixedRowsTop"),l=i>=e.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let a;const h=n.row??0,c=n.col??0;r?a=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(n6(this,h6),h,c):l&&(a=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(n6(this,h6),h,c)),a||(a=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition(n6(this,h6),h,c)),s6(this,c6,this.hot.rowIndexMapper.getVisualFromRenderableIndex(i)),s6(this,d6,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const t=this.hot.getSelectedRange()??[],e=new Set;$(t,t=>{const o=t.getTopStartCorner().row,n=t.getBottomStartCorner().row;null!==o&&null!==n&&as(o,n,t=>{e.has(t)||(e.add(t),n6(this,d6).push(t))})})}null!==n6(this,c6)&&(n6(this,d6).includes(n6(this,c6))||s6(this,d6,[n6(this,c6)]),a&&(s6(this,m6,a.top-6),s6(this,f6,Lo(n6(this,h6))),s6(this,w6,I2(n6(this,h6),"vertical")),n6(this,b6).style.top=`${n6(this,m6)+n6(this,f6)}px`,n6(this,b6).style[this.inlineDir]=`${a.start}px`,n6(this,b6).style.width=`${s}px`,this.hot.rootElement.appendChild(n6(this,b6))))}refreshHandlePosition(){n6(this,b6).style.top=`${(n6(this,m6)??0)+(n6(this,u6)??0)}px`}setupGuidePosition(){const t=Do(n6(this,b6)),e=Number.parseInt(n6(this,b6).style[this.inlineDir],10)+t,o=this.hot.view.getTableWidth();po(n6(this,b6),"active"),po(n6(this,v6),"active"),n6(this,v6).style.top=n6(this,b6).style.top,n6(this,v6).style[this.inlineDir]=`${e}px`,n6(this,v6).style.width=o-t+"px",this.hot.rootElement.appendChild(n6(this,v6))}refreshGuidePosition(){n6(this,v6).style.top=n6(this,b6).style.top}hideHandleAndGuide(){fo(n6(this,b6),"active"),fo(n6(this,v6),"active")}checkIfRowHeader(t){const e=so(t,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[o.clone?.wtTable.TBODY,n.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&&null!==n6(this,g6)&&n6(this,g6)<e?e:n6(this,g6)}afterMouseDownTimeout(){const t=W2(n6(this,h6),n6(this,S6)),e=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},o=(t,o)=>{const n=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);!1!==n&&("number"==typeof n&&s6(this,g6,n),this.setManualSize(t,n6(this,g6)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e())};if(n6(this,S6)>=2){n6(this,d6).length>1?($(n6(this,d6),t=>{o(t)}),e()):$(n6(this,d6),t=>{o(t,!0)})}s6(this,k6,null),s6(this,S6,0),t&&n6(this,h6)&&this.setupHandlePosition(n6(this,h6))}bindEvents(){const{rootElement:t,rootWindow:e}=this.hot;this.eventManager.addEventListener(t,"mouseover",t=>r6(this,M6,N6).call(this,t)),this.eventManager.addEventListener(t,"mousedown",t=>r6(this,T6,P6).call(this,t)),this.eventManager.addEventListener(e,"mousemove",t=>r6(this,H6,D6).call(this,t)),this.eventManager.addEventListener(e,"mouseup",()=>r6(this,I6,L6).call(this)),this.eventManager.addEventListener(n6(this,b6),"contextmenu",()=>r6(this,_6,z6).call(this))}destroy(){super.destroy()}constructor(t){super(t),l6(this,M6),l6(this,T6),l6(this,H6),l6(this,I6),l6(this,_6),l6(this,W6),i6(this,h6,{writable:!0,value:void 0}),i6(this,c6,{writable:!0,value:void 0}),i6(this,d6,{writable:!0,value:void 0}),i6(this,u6,{writable:!0,value:void 0}),i6(this,g6,{writable:!0,value:void 0}),i6(this,p6,{writable:!0,value:void 0}),i6(this,f6,{writable:!0,value:void 0}),i6(this,m6,{writable:!0,value:void 0}),i6(this,w6,{writable:!0,value:void 0}),i6(this,b6,{writable:!0,value:void 0}),i6(this,v6,{writable:!0,value:void 0}),i6(this,C6,{writable:!0,value:void 0}),i6(this,y6,{writable:!0,value:void 0}),i6(this,S6,{writable:!0,value:void 0}),i6(this,k6,{writable:!0,value:void 0}),i6(this,R6,{writable:!0,value:void 0}),i6(this,E6,{writable:!0,value:void 0}),i6(this,x6,{writable:!0,value:void 0}),i6(this,A6,{writable:!0,value:void 0}),s6(this,h6,null),s6(this,c6,null),s6(this,d6,[]),s6(this,u6,null),s6(this,g6,null),s6(this,p6,null),s6(this,f6,null),s6(this,m6,null),s6(this,w6,1),s6(this,b6,this.hot.rootDocument.createElement("DIV")),s6(this,v6,this.hot.rootDocument.createElement("DIV")),s6(this,C6,!1),s6(this,y6,!1),s6(this,S6,0),s6(this,k6,null),s6(this,E6,null),s6(this,A6,(t,e)=>{let o=t;if(this.enabled){const t=this.hot.toPhysicalRow(e),n=n6(this,R6).getValueAtIndex(t);this.hot.getSettings()[a6]&&n&&(o=this.hot.getPlugin("autoRowSize")?.isEnabled()?Math.max(n,o??0):n)}return o}),po(n6(this,b6),"manualRowResizer"),po(n6(this,v6),"manualRowResizerGuide")}}function N6(t){if(!Qo(no(t))&&!0!==n6(this,y6)&&this.checkIfRowHeader(no(t))){const e=this.getClosestTHParent(no(t));e&&(n6(this,C6)||this.setupHandlePosition(e))}}function P6(t){no(t).parentNode===this.hot.rootElement&&go(no(t),"manualRowResizer")&&(this.setupHandlePosition(n6(this,h6)),this.setupGuidePosition(),s6(this,C6,!0),null===n6(this,k6)&&s6(this,k6,this.hot._registerTimeout(()=>this.afterMouseDownTimeout(),500)),s6(this,S6,n6(this,S6)+1),s6(this,p6,t.pageY),s6(this,g6,n6(this,f6)))}function D6(t){if(n6(this,C6)){const e=_2(t.pageY-(n6(this,p6)??0),n6(this,w6));s6(this,u6,(n6(this,f6)??0)+e),$(n6(this,d6),t=>{s6(this,g6,this.setManualSize(t,n6(this,u6)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function L6(){const t=()=>{this.hot.view.adjustElementsSize(),this.hot.render()},e=(e,o)=>{const n=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(e),e,!1);!1===n?(this.setManualSize(e,n6(this,f6)),s6(this,g6,n6(this,f6))):"number"==typeof n&&(s6(this,g6,n),this.setManualSize(e,n6(this,g6))),o&&t(),!1!==n&&this.hot.runHooks("afterRowResize",this.getActualRowHeight(e),e,!1)};if(n6(this,C6)){if(this.hideHandleAndGuide(),s6(this,C6,!1),n6(this,g6)!==n6(this,f6)){n6(this,d6).length>1?($(n6(this,d6),t=>{e(t)}),t()):$(n6(this,d6),t=>{e(t,!0)})}this.setupHandlePosition(n6(this,h6))}}function z6(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(n6(this,b6)),this.hot.rootElement.removeChild(n6(this,v6)),s6(this,C6,!1),s6(this,y6,!0),this.hot._registerMicrotask(()=>{s6(this,y6,!1)})}function B6(){const t=this.hot.getSettings()[a6];this.hot.batchExecution(()=>{Array.isArray(t)?(t.forEach((t,e)=>{n6(this,R6).setValueAtIndex(e,t)}),s6(this,x6,t)):!0===t&&Array.isArray(n6(this,x6))&&n6(this,x6).forEach((t,e)=>{n6(this,R6).setValueAtIndex(e,t)})},!0)}function V6(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function F6(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,V6(t,e,"get"))}function $6(t,e,o){!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,o)}function U6(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,V6(t,e,"set"),o),o}var j6=new WeakMap;class q6{static NEGATIVE_VALUES_WARNING({row:t,col:e,rowspan:o,colspan:n}){return X`The merged cell declared with {row: ${t}, col: ${e},\x20
|
|
116
|
+
rowspan: ${o}, colspan: ${n}} contains negative values, which is\x20
|
|
117
|
+
not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING({row:t,col:e}){return X`The merged cell declared at [${t}, ${e}] is positioned\x20
|
|
118
|
+
(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 X`The merged cell declared at [${t}, ${e}] has both "rowspan"\x20
|
|
119
|
+
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 X`The merged cell declared at [${t}, ${e}] has "rowspan"\x20
|
|
120
|
+
or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues({row:t,col:e,rowspan:o,colspan:n}){return t<0||e<0||o<0||n<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,o){return t.row<0||t.col<0||t.row>=e||t.row+t.rowspan-1>=e||t.col>=o||t.col+t.colspan-1>=o}normalize(t){const e=t.countRows(),o=t.countCols();this.row<0?this.row=0:this.row>e-1&&(this.row=e-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>e-1&&(this.rowspan=e-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col),U6(this,j6,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 o=t[0]||t[1],n=e+Math.abs(t[0]||t[1])-1,i=t[0]?"colspan":"rowspan",s=t[0]?"col":"row",r=Math.min(e,n),l=Math.max(e,n),a=this[s],h=this[s]+this[i]-1;if(a>=e&&(this[s]+=o),o>0)e<=h&&e>a&&(this[i]+=o);else if(o<0){if(r<=a&&l>=h)return this.removed=!0,U6(this,j6,null),!1;if(a>=r&&a<=l){const t=l-a+1,e=Math.abs(o)-t;this[s]-=e+o,this[i]-=t}else if(a<=r&&h>=l)this[i]+=o;else if(a<=r&&h>=r&&h<l){const t=h-r+1;this[i]-=t}}return U6(this,j6,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}relocate(t,e){this.row=t,this.col=e,U6(this,j6,null)}getRange(){return F6(this,j6)||U6(this,j6,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),F6(this,j6)}constructor(t,e,o,n,i,s){$6(this,j6,{writable:!0,value:void 0}),this.removed=!1,U6(this,j6,null),this.row=t,this.col=e,this.rowspan=o,this.colspan=n,this.cellCoordsFactory=i,this.cellRangeFactory=s}}function G6(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Y6(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 X6=new WeakSet,K6=new WeakSet,Z6=new WeakSet,Q6=new WeakSet;class J6{static IS_OVERLAPPING_WARNING({row:t,col:e}){return X`The merged cell declared at [${t}, ${e}], overlaps\x20
|
|
121
|
+
with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
|
|
122
|
+
fix your setup.`}get(t,e){return!!this.mergedCellsMatrix.has(t)&&(this.mergedCellsMatrix.get(t).get(e)??!1)}getByRange(t){const{row:e,col:o}=t.getTopStartCorner(),{row:n,col:i}=t.getBottomEndCorner();if(null===e||null===n||null===o||null===i)return!1;const s=this.mergedCells.length;let r=!1;for(let t=0;t<s;t++){const s=this.mergedCells[t],{row:l,col:a,rowspan:h,colspan:c}=s;if(l>=e&&l+h-1<=n&&a>=o&&a+c-1<=i){r=s;break}}return r}getByVisualRow(t){const e=this.mergedCellsMatrix.get(t);return e?Array.from(new Set(e.values())):[]}getByVisualColumn(t){const e=[];for(let o=0;o<this.mergedCells.length;o++){const n=this.mergedCells[o];n.col<=t&&t<=n.col+n.colspan-1&&this.get(n.row,n.col)===n&&e.push(n)}return e}filterOverlappingMergeCells(t){const e=new Set;this.mergedCells.forEach(t=>{const{row:o,col:n,colspan:i,rowspan:s}=t;for(let t=o;t<o+s;t++)for(let o=n;o<n+i;o++)e.add(`r${t},c${o}`)});return t.filter(t=>{const{row:o,col:n,colspan:i,rowspan:s}=t,r=new Set;let l=!1;for(let a=o;a<o+s;a++){for(let o=n;o<n+i;o++){const n=`r${a},c${o}`;if(e.has(n)){Xe(J6.IS_OVERLAPPING_WARNING(t)),l=!0;break}r.add(n)}if(l)break}return l||r.forEach(t=>e.add(t)),!l})}getWithinRange(t,e=!1){const{row:o,col:n}=t.getTopStartCorner(),{row:i,col:s}=t.getBottomEndCorner();if(null===o||null===i||null===n||null===s)return[];const r=[];for(let t=0;t<this.mergedCells.length;t++){const l=this.mergedCells[t],{row:a,col:h,rowspan:c,colspan:d}=l;(e?a<=i&&a+c-1>=o&&h<=s&&h+d-1>=n:a>=o&&a<=i&&h>=n&&h<=s)&&this.get(a,h)===l&&r.push(l)}return r.length>1&&r.sort((t,e)=>Math.max(t.row,o)-Math.max(e.row,o)||Math.max(t.col,n)-Math.max(e.col,n)),r}add(t,e=!1){const o=t.row,n=t.col,i=t.rowspan,s=t.colspan,r=new q6(o,n,i,s,this.hot._createCellCoords,this.hot._createCellRange),l=this.get(o,n),a=!e&&this.isOverlapping(r);return l||a?(a&&Xe(J6.IS_OVERLAPPING_WARNING(r)),!1):(this.hot&&r.normalize(this.hot),this.mergedCells.push(r),G6(this,Z6,o4).call(this,r),r)}remove(t,e){const o=this.get(t,e),n=o?this.mergedCells.indexOf(o):-1;return!(!o||-1===n)&&(this.mergedCells.splice(n,1),G6(this,Q6,n4).call(this,o),o)}clear(){$(this.mergedCells,({row:t,col:e,rowspan:o,colspan:n})=>{as(t,t+o,t=>{as(e,e+n,e=>{const o=this.hot.getCell(t,e);o&&(o.removeAttribute("rowspan"),o.removeAttribute("colspan"),o.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(t){const e=t.getRange();if(!e)return!1;for(let t=0;t<this.mergedCells.length;t++){const o=this.mergedCells[t].getRange();if(o&&o.overlaps(e))return!0}return!1}isFirstRenderableMergedCell(t,e){const o=this.get(t,e);if(!o)return!1;const{row:n,col:i,rowspan:s,colspan:r}=o,l=this.hot.view.getActiveOverlayName(),a=["top","top_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleRow(),h=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(l)?0:this.hot.getFirstRenderedVisibleColumn(),c=ds(a,n,n+s-1),d=ds(h,i,i+r-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(c,1)===t&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(d,1)===e}getFirstRenderableCoords(t,e){const o=this.get(t,e);if(!o||this.isFirstRenderableMergedCell(t,e))return this.hot._createCellCoords(t,e);const n=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)??o.row,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)??o.col;return this.hot._createCellCoords(n,i)}getStartMostColumnIndex(t,e){return G6(this,K6,e4).call(this,t,"col",-1,e)}getEndMostColumnIndex(t,e){return G6(this,K6,e4).call(this,t,"col",1,e)}getTopMostRowIndex(t,e){return G6(this,K6,e4).call(this,t,"row",-1,e)}getBottomMostRowIndex(t,e){return G6(this,K6,e4).call(this,t,"row",1,e)}shiftCollections(t,e,o){const n=[0,0];switch(t){case"right":n[0]+=o;break;case"left":n[0]-=o;break;case"down":n[1]+=o;break;case"up":n[1]-=o}const i=[];this.mergedCells.forEach(t=>{t.shift(n,e),t.removed&&i.push(t)}),i.forEach(t=>{this.mergedCells.splice(this.mergedCells.indexOf(t),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(t=>{G6(this,Z6,o4).call(this,t)})}capturePhysicalSpans(t){const e="column"===t,o=e?"col":"row",n=e?"colspan":"rowspan",i=e?t=>this.hot.toPhysicalColumn(t):t=>this.hot.toPhysicalRow(t),s=new Map;return this.mergedCells.forEach(t=>{const e=[];for(let s=0;s<t[n];s++)e.push(i(t[o]+s));s.set(t,e)}),s}static detectContiguousRuns(t){if(0===t.length)return[];const e=[];let o=t[0],n=1;for(let i=1;i<t.length;i++)t[i]===t[i-1]+1?n+=1:(e.push({start:o,length:n}),o=t[i],n=1);return e.push({start:o,length:n}),e}translateAfterAxisMove(t,e){const o="column"===t,n=o?"col":"row",i=o?"colspan":"rowspan",s=o?"row":"col",r=o?"rowspan":"colspan",l=o?t=>this.hot.toVisualColumn(t):t=>this.hot.toVisualRow(t),a=[];this.mergedCells.forEach(t=>{const o=e.get(t);if(!o)return void a.push({row:t.row,col:t.col,rowspan:t.rowspan,colspan:t.colspan});const h=o.map(l).filter(t=>null!==t&&t>=0).sort((t,e)=>t-e);0!==h.length&&J6.detectContiguousRuns(h).forEach(e=>{const o={[n]:e.start,[i]:e.length,[s]:t[s],[r]:t[r]};1===o.colspan&&1===o.rowspan||a.push(o)})}),this.mergedCells.length=0,this.mergedCellsMatrix.clear(),a.forEach(t=>{this.add(t,!0)})}relocateInMatrix(t){t.forEach(({mergedCell:t})=>G6(this,Q6,n4).call(this,t)),t.forEach(({mergedCell:t,row:e,col:o})=>{t.relocate(e,o),G6(this,Z6,o4).call(this,t)})}removeFromMatrix(t){t.forEach(t=>G6(this,Q6,n4).call(this,t))}constructor(t){Y6(this,X6),Y6(this,K6),Y6(this,Z6),Y6(this,Q6),this.mergedCells=[],this.mergedCellsMatrix=new Map,this.plugin=t,this.hot=t.hot}}function t4(t,e,o){const{row:n,col:i}=t.getTopStartCorner(),{row:s,col:r}=t.getBottomEndCorner(),l=n??0,a=i??0,h=s??0,c=r??0,d="row"===e,u=d?l:a,g=d?h:c,p=d?a:l,f=d?c:h,m=new Map;for(let t=0;t<this.mergedCells.length;t++){const e=this.mergedCells[t],n=d?e.row:e.col,i=n+(d?e.rowspan:e.colspan)-1,s=d?e.col:e.row,r=s+(d?e.colspan:e.rowspan)-1;if(i<u||n>g||r<p||s>f||this.get(e.row,e.col)!==e)continue;const l=1===o?i:n,a=Math.min(r,f)-Math.max(s,p)+1,h=Math.max(n,u),c=Math.min(i,g);for(let t=h;t<=c;t++){let e=m.get(t);e||(e={extents:new Set,coveredCells:0},m.set(t,e)),e.extents.add(l),e.coveredCells+=a}}return m}function e4(t,e,o,n){const{row:i,col:s}=t.getTopStartCorner(),{row:r,col:l}=t.getBottomEndCorner(),a="row"===e,h=(a?i:s)??0,c=(a?r:l)??0,d=a?(l??0)-(s??0)+1:(r??0)-(i??0)+1,u=t=>1===o?t>=n:t<=n,g=G6(this,X6,t4).call(this,t,e,o),p=Array.from(g.keys()).sort((t,e)=>(t-e)*o);let f=null,m=0;for(let t=0;t<p.length;t++){const e=p[t],{extents:o,coveredCells:n}=g.get(e);if(n<d&&o.add(e),1===o.size){const t=o.values().next().value;if(u(t)){f=e,m=t;break}}}let w=1===o?Math.max(h,n):Math.min(c,n);for(;w>=h&&w<=c&&g.has(w);)w+=o;const b=w>=h&&w<=c;return null===f?b?w:n:!b||(f-w)*o<=0?m:w}function o4(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let o=t.col;o<t.col+t.colspan;o++)this.mergedCellsMatrix.has(e)||this.mergedCellsMatrix.set(e,new Map),this.mergedCellsMatrix.get(e).set(o,t)}function n4(t){for(let e=t.row;e<t.row+t.rowspan;e++)for(let o=t.col;o<t.col+t.colspan;o++)this.mergedCellsMatrix.get(e)?.delete(o)}class i4{getDirection(t,e){let o=null;return o=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",o}snapDragArea(t,e,o,n){const i=e.slice(0),s=this.getAutofillSize(t,e,o),[r,l,a,h]=t,c=["up","down"].indexOf(o)>-1?a-r+1:h-l+1,d=s-Math.floor(s/c)*c,u=this.getFarthestCollection(t,e,o,n);if(u)if("down"===o){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"===o){const t=u.col+u.colspan-l-d;i[3]+t>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?t:0}else if("up"===o){const t=a-d-u.row+1;i[0]+t<0?i[0]+=d:i[0]-=d?t:0}else if("left"===o){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:o,foundMergedCells:n,fillSize:s,dragArea:i,cycleLength:c}),i}updateCurrentFillCache(t){this.currentFillData||(this.currentFillData={}),ue(this.currentFillData,t)}getAutofillSize(t,e,o){const[n,i,s,r]=t,[l,a,h,c]=e;switch(o){case"up":return n-l;case"down":return h-s;case"left":return i-a;case"right":return c-r;default:return 0}}getDragArea(t,e,o){const[n,i,s,r]=t,[l,a,h,c]=e;switch(o){case"up":return[l,a,n-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[l,a,s,i-1];case"right":{const t=this.mergedCellsCollection.get(h,r);return[n,r+(t?t.colspan-1:0),h,c]}default:return[0,0,0,0]}}getFarthestCollection(t,e,o,n){const[i,s,r,l]=t,a=["up","down"].indexOf(o)>-1,h=a?r:l,c=a?i:s,d=this.getAutofillSize(t,e,o),u=a?r-i+1:l-s+1,g=d-Math.floor(d/u)*u;let p=null,f=null,m=null;switch(o){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 $(n,t=>{const e=t;e[p](m)&&e.isFarther(f,o)&&(f=e)}),f}recreateAfterDataPopulation(t){if(!this.currentFillData)return;const e=this.getRangeFromChanges(t),o=this.currentFillData.foundMergedCells,n=this.currentFillData.dragDirection,i=(t,o)=>{switch(n){case"up":return t.row-o>=e.from.row;case"down":return t.row+t.rowspan-1+o<=e.to.row;case"left":return t.col-o>=e.from.column;case"right":return t.col+t.colspan-1+o<=e.to.column;default:return null}};let s=0,r=null,l=1;do{for(let t=0;t<o.length;t+=1){if(r=o[t],s=l*this.currentFillData.cycleLength,i(r,s))switch(n){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===o.length-1&&(l+=1)}}while(null!==r&&i(r,s));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(t){let e=null,o=null,n=null,i=null;return $(t,t=>{const s=t,r=s[0],l=this.plugin.hot.propToCol(s[1]);(null===e||r<e)&&(e=r),(null===o||r>o)&&(o=r),(null===n||l<n)&&(n=l),(null===i||l>i)&&(i=l)}),{from:{row:e??0,column:n??0},to:{row:o??0,column:i??0}}}dragAreaOverlapsCollections(t,e,o){const n=this.getDragArea(t,e,o),[i,s,r,l]=n,a=this.plugin.hot._createCellCoords(i,s),h=this.plugin.hot._createCellCoords(r,l),c=this.plugin.hot._createCellRange(a,a,h);if(0===this.mergedCellsCollection.getWithinRange(c,!0).length)return!1;const d=this.mergedCellsCollection.getWithinRange(c,!1);return 0===d.length||("up"===o||"down"===o?!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 s4{getSelectedMergedCellClassName(t,e,o,n){const i=Math.min(o[0],o[2]),s=Math.min(o[1],o[3]),r=Math.max(o[0],o[2]),l=Math.max(o[1],o[3]);if(void 0===n)return;const a=this.plugin.mergedCellsCollection;if(!a.isFirstRenderableMergedCell(t,e))return;const h=a.get(t,e);if(!h)return;const c=h.getLastRow(),d=h.getLastColumn();return i<=h.row&&s<=h.col&&r>=c&&l>=d?`${this.fullySelectedMergedCellClassName}-${n}`:this.isMergeCellFullySelected(h,this.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(t,e){const o=[];if(!e||!t)return!1;for(let e=0;e<t.rowspan;e+=1)for(let n=0;n<t.colspan;n+=1)o.push(this.hot._createCellCoords(t.row+e,t.col+n));for(let t=0;t<o.length;t+=1){const n=[];for(let i=0;i<e.length;i+=1)n[i]=e[i].includes(o[t]);if(!n.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}}function r4(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function l4(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function a4(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,l4(t,e,"get"))}function h4(t,e,o){r4(t,e),e.set(t,o)}function c4(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,l4(t,e,"set"),o),o}function d4(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function u4(t,e){r4(t,e),e.add(t)}var g4=new WeakMap,p4=new WeakMap,f4=new WeakMap,m4=new WeakMap,w4=new WeakMap,b4=new WeakMap,v4=new WeakSet,C4=new WeakSet,y4=new WeakSet,S4=new WeakSet,k4=new WeakSet,R4=new WeakSet,E4=new WeakSet,x4=new WeakSet,M4=new WeakSet,T4=new WeakSet,H4=new WeakSet,I4=new WeakSet;class _4{getCurrentVerticalNode(){return a4(this,f4)??void 0}getFirstVerticalNode(){return d4(this,E4,L4).call(this,"vertical")}getNextVerticalNode(){return d4(this,k4,P4).call(this,a4(this,f4),"vertical",1)}getPrevVerticalNode(){return d4(this,k4,P4).call(this,a4(this,f4),"vertical",-1)}getCurrentHorizontalNode(){return a4(this,p4)??void 0}getFirstHorizontalNode(){return d4(this,E4,L4).call(this,"horizontal")}getNextHorizontalNode(){return d4(this,k4,P4).call(this,a4(this,p4),"horizontal",1)}getPrevHorizontalNode(){return d4(this,k4,P4).call(this,a4(this,p4),"horizontal",-1)}setPrevNodeAsActive(){a4(this,f4)&&c4(this,f4,d4(this,R4,D4).call(this,a4(this,f4),"vertical",-1)),a4(this,p4)&&c4(this,p4,d4(this,R4,D4).call(this,a4(this,p4),"horizontal",-1))}setNextNodeAsActive(){a4(this,f4)&&c4(this,f4,d4(this,R4,D4).call(this,a4(this,f4),"vertical",1)),a4(this,p4)&&c4(this,p4,d4(this,R4,D4).call(this,a4(this,p4),"horizontal",1))}buildFocusOrder(t){c4(this,g4,t.map(t=>{const e=t.getTopStartCorner(),o=t.getBottomEndCorner(),n=t.highlight.clone().normalize();return{rowFrom:e.row??0,rowTo:o.row??0,colFrom:e.col??0,colTo:o.col??0,highlightRow:n.row??0,highlightCol:n.col??0}}));let e=null;for(let t=0;t<a4(this,g4).length;t++){const{highlightRow:o,highlightCol:n}=a4(this,g4)[t],i=d4(this,v4,A4).call(this,t,o,n);i&&(e=i)}c4(this,p4,e),c4(this,f4,e)}setActiveNode(t,e,o){if(void 0===o)return this;const n=d4(this,v4,A4).call(this,o,t,e);return n&&(c4(this,p4,n),c4(this,f4,n)),this}constructor({mergedCellsGetter:t,rowIndexMapper:e,columnIndexMapper:o}){u4(this,v4),u4(this,C4),u4(this,y4),u4(this,S4),u4(this,k4),u4(this,R4),u4(this,E4),u4(this,x4),u4(this,M4),u4(this,T4),u4(this,H4),u4(this,I4),h4(this,g4,{writable:!0,value:void 0}),h4(this,p4,{writable:!0,value:void 0}),h4(this,f4,{writable:!0,value:void 0}),h4(this,m4,{writable:!0,value:void 0}),h4(this,w4,{writable:!0,value:void 0}),h4(this,b4,{writable:!0,value:void 0}),c4(this,g4,[]),c4(this,p4,null),c4(this,f4,null),c4(this,m4,t),c4(this,w4,e),c4(this,b4,o)}}function A4(t,e,o){const n=a4(this,g4)[t];if(!n)return null;const i=a4(this,m4).call(this,e,o);return i?d4(this,C4,W4).call(this,t,i):e<n.rowFrom||e>n.rowTo||o<n.colFrom||o>n.colTo||a4(this,w4).isHidden(e)||a4(this,b4).isHidden(o)?null:{selectionLayer:t,rowStart:e,rowEnd:e,colStart:o,colEnd:o}}function W4(t,e){const o=a4(this,g4)[t],n=e.row,i=e.row+e.rowspan-1,s=e.col,r=e.col+e.colspan-1;return n<o.rowFrom||i>o.rowTo||s<o.colFrom||r>o.colTo||null===d4(this,y4,O4).call(this,n,i,s,r)?null:{selectionLayer:t,rowStart:n,rowEnd:i,colStart:s,colEnd:r}}function O4(t,e,o,n){const i=a4(this,w4).getNearestNotHiddenIndex(t,1),s=a4(this,b4).getNearestNotHiddenIndex(o,1);return null===i||i>e||null===s||s>n?null:{row:i,column:s}}function N4(t){return d4(this,y4,O4).call(this,t.rowStart,t.rowEnd,t.colStart,t.colEnd)??{row:t.rowStart,column:t.colStart}}function P4(t,e,o){if(t)return d4(this,R4,D4).call(this,t,e,o)??void 0}function D4(t,e,o){const n=a4(this,g4).length;if(0===n)return null;const i=a4(this,g4)[t.selectionLayer]?t.selectionLayer:0;let s=d4(this,x4,z4).call(this,i,d4(this,S4,N4).call(this,t),e,o);for(let t=1;null===s&&t<=n;t++){const r=((i+t*o)%n+n)%n;s=d4(this,x4,z4).call(this,r,null,e,o)}return s}function L4(t){for(let e=0;e<a4(this,g4).length;e++){const o=d4(this,x4,z4).call(this,e,null,t,1);if(o)return o}}function z4(t,e,o,n){const i=a4(this,g4)[t];if(!i)return null;let s=null===e?d4(this,H4,F4).call(this,i,n):d4(this,I4,$4).call(this,i,e,o,n);for(;null!==s;){const e=a4(this,m4).call(this,s.row,s.column);if(!e)return{selectionLayer:t,rowStart:s.row,rowEnd:s.row,colStart:s.column,colEnd:s.column};const r=d4(this,C4,W4).call(this,t,e);if(r&&d4(this,M4,B4).call(this,r,s,o,n))return r;s=d4(this,T4,V4).call(this,i,s,e,o,n)}return null}function B4(t,e,o,n){const i=d4(this,y4,O4).call(this,t.rowStart,t.rowEnd,t.colStart,t.colEnd);return null!==i&&(1===n?i.row===e.row&&i.column===e.column:"horizontal"===o?i.row===e.row:i.column===e.column)}function V4(t,e,o,n,i){if("horizontal"===n){const s=1===i?Math.min(o.col+o.colspan-1,t.colTo):Math.max(o.col,t.colFrom);return d4(this,I4,$4).call(this,t,{row:e.row,column:s},n,i)}const s=1===i?Math.min(o.row+o.rowspan-1,t.rowTo):Math.max(o.row,t.rowFrom);return d4(this,I4,$4).call(this,t,{row:s,column:e.column},n,i)}function F4(t,e){const o=1===e?a4(this,w4).getNearestNotHiddenIndex(t.rowFrom,1):a4(this,w4).getNearestNotHiddenIndex(t.rowTo,-1),n=1===e?a4(this,b4).getNearestNotHiddenIndex(t.colFrom,1):a4(this,b4).getNearestNotHiddenIndex(t.colTo,-1);return null===o||o<t.rowFrom||o>t.rowTo||null===n||n<t.colFrom||n>t.colTo?null:{row:o,column:n}}function $4(t,e,o,n){if("horizontal"===o){const o=a4(this,b4).getNearestNotHiddenIndex(e.column+n,n);if(null!==o&&o>=t.colFrom&&o<=t.colTo)return{row:e.row,column:o};const i=a4(this,w4).getNearestNotHiddenIndex(e.row+n,n),s=1===n?a4(this,b4).getNearestNotHiddenIndex(t.colFrom,1):a4(this,b4).getNearestNotHiddenIndex(t.colTo,-1);return null===i||i<t.rowFrom||i>t.rowTo||null===s||s<t.colFrom||s>t.colTo?null:{row:i,column:s}}const i=a4(this,w4).getNearestNotHiddenIndex(e.row+n,n);if(null!==i&&i>=t.rowFrom&&i<=t.rowTo)return{row:i,column:e.column};const s=a4(this,b4).getNearestNotHiddenIndex(e.column+n,n),r=1===n?a4(this,w4).getNearestNotHiddenIndex(t.rowFrom,1):a4(this,w4).getNearestNotHiddenIndex(t.rowTo,-1);return null===s||s<t.colFrom||s>t.colTo||null===r||r<t.rowFrom||r>t.rowTo?null:{row:r,column:s}}function U4(t,e,o){const{rowIndexMapper:n,stylesHandler:i}=t;let s=0;for(let r=e;r<e+o;r++)n.isHidden(r)||(s+=t.getRowHeight(r)??i.getDefaultRowHeight(r));return s}function j4(t){const e=t.hot,{rowIndexMapper:o,columnIndexMapper:n}=e,i=new Map;return{before:function(){},after:function(s,r,l){const a=t.mergedCellsCollection.get(r,l);if(!1===a)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}=a,[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 o=e.stylesHandler.areCellsBorderBox()?0:1;i.set(r,t-o)}else if(Ve()){const t=U4(e,h,u);i.set(r,t/u)}}const m=g-(o.getRenderableFromVisualIndex(r)??0)+1,w=p-(n.getRenderableFromVisualIndex(l)??0)+1;let b=o.getNearestNotHiddenIndex(h,1),v=n.getNearestNotHiddenIndex(c,1);f&&([b,v]=function(t,e,o){const n=t.view.getActiveOverlayName();if(!["top","top_inline_start_corner"].includes(n)){const o=t.getFirstRenderedVisibleRow();null!==e&&null!==o&&(e=Math.max(e,o))}if(!["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(n)){const e=t.getFirstRenderedVisibleColumn();null!==o&&null!==e&&(o=Math.max(o,e))}return[e,o]}(e,b,v));const C=Math.min(u,m),y=Math.min(d,w);b===r&&v===l?(s.setAttribute("rowspan",String(C)),s.setAttribute("colspan",String(y))):(s.removeAttribute("rowspan"),s.removeAttribute("colspan"),s.style.display="none")}}}function q4(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function G4(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Y4(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,G4(t,e,"get"))}function X4(t,e,o){q4(t,e),e.set(t,o)}function K4(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,G4(t,e,"set"),o),o}function Z4(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Q4(t,e){q4(t,e),e.add(t)}Qn.getSingleton().register("beforeMergeCells"),Qn.getSingleton().register("afterMergeCells"),Qn.getSingleton().register("beforeUnmergeCells"),Qn.getSingleton().register("afterUnmergeCells");const J4="mergeCells",t5=J4;var e5=new WeakMap,o5=new WeakMap,n5=new WeakMap,i5=new WeakMap,s5=new WeakMap,r5=new WeakMap,l5=new WeakMap,a5=new WeakMap,h5=new WeakMap,c5=new WeakSet,d5=new WeakMap,u5=new WeakMap,g5=new WeakMap,p5=new WeakSet,f5=new WeakSet,m5=new WeakSet,w5=new WeakSet,b5=new WeakSet,v5=new WeakMap,C5=new WeakMap,y5=new WeakMap,S5=new WeakMap,k5=new WeakMap,R5=new WeakMap,E5=new WeakSet,x5=new WeakMap,M5=new WeakMap,T5=new WeakMap,H5=new WeakMap,I5=new WeakMap,_5=new WeakMap,A5=new WeakMap,W5=new WeakMap,O5=new WeakMap,N5=new WeakMap,P5=new WeakMap,D5=new WeakMap,L5=new WeakMap,z5=new WeakMap,B5=new WeakMap,V5=new WeakMap,F5=new WeakMap,$5=new WeakMap,U5=new WeakMap,j5=new WeakMap,q5=new WeakMap,G5=new WeakMap,Y5=new WeakMap,X5=new WeakMap,K5=new WeakMap;class Z5 extends pW{static get PLUGIN_KEY(){return J4}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[lW]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[J4]}enablePlugin(){this.enabled||(this.mergedCellsCollection=new J6(this),this.autofillCalculations=new i4(this),this.selectionCalculations=new s4(this),this.addHook("afterInit",Y4(this,d5)),this.addHook("modifyTransformFocus",Y4(this,C5)),this.addHook("modifyTransformStart",Y4(this,y5)),this.addHook("modifyTransformEnd",Y4(this,S5)),this.addHook("beforeSelectionHighlightSet",Y4(this,k5)),this.addHook("beforeSetRangeStart",Y4(this,x5)),this.addHook("beforeSetRangeStartOnly",Y4(this,x5)),this.addHook("beforeSelectionFocusSet",Y4(this,M5)),this.addHook("afterSelectionFocusSet",Y4(this,T5)),this.addHook("afterSelectionEnd",Y4(this,H5)),this.addHook("modifyGetCellCoords",Y4(this,R5)),this.addHook("modifyGetCoordsElement",Y4(this,R5)),this.addHook("afterIsMultipleSelection",Y4(this,v5)),this.addHook("afterRenderer",(t,e,o)=>Y4(this,i5).after(t,e,o)),this.addHook("afterContextMenuDefaultOptions",t=>Z4(this,E5,i7).call(this,t)),this.addHook("afterGetCellMeta",Y4(this,I5)),this.addHook("afterViewportRowCalculatorOverride",Y4(this,_5)),this.addHook("afterViewportColumnCalculatorOverride",Y4(this,A5)),this.addHook("modifyAutofillRange",Y4(this,W5)),this.addHook("afterCreateCol",Y4(this,O5)),this.addHook("afterRemoveCol",Y4(this,N5)),this.addHook("afterCreateRow",Y4(this,P5)),this.addHook("afterRemoveRow",Y4(this,D5)),this.addHook("beforeColumnMove",Y4(this,L5)),this.addHook("afterColumnMove",Y4(this,z5)),this.addHook("beforeRowMove",Y4(this,B5)),this.addHook("afterRowMove",Y4(this,V5)),this.addHook("beforeColumnFreeze",Y4(this,F5)),this.addHook("afterColumnFreeze",Y4(this,$5)),this.addHook("beforeColumnUnfreeze",Y4(this,F5)),this.addHook("afterColumnUnfreeze",Y4(this,$5)),this.addHook("afterChange",Y4(this,U5)),this.addHook("beforeDrawBorders",Y4(this,j5)),this.addHook("afterDrawSelection",Y4(this,q5)),this.addHook("beforeRemoveCellClassNames",Y4(this,G5)),this.addHook("beforeBeginEditing",Y4(this,Y5)),this.addHook("modifyRowHeightByOverlayName",Y4(this,K5)),this.addHook("modifySinglePassLayout",Y4(this,X5)),this.addHook("beforeUndoStackChange",(t,e)=>{if("MergeCells"===e)return!1}),this.addHook("afterMergeCells",Y4(this,u5)),this.registerShortcuts(),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",Y4(this,g5)),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",Y4(this,g5)),this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),K4(this,l5,!1),super.disablePlugin()}destroy(){this.hot?.rowIndexMapper.removeLocalHook("cacheUpdated",Y4(this,g5)),super.destroy()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),K4(this,l5,!0),Z4(this,f5,t7).call(this),super.updatePlugin()}ifChromeForceRepaint(){if(!Le.chrome.value)return;const t=[];let e=[];this.mergedCellsCollection.mergedCells.forEach(t=>{const{row:o,rowspan:n}=t;for(let t=o+1;t<o+n;t++)e.push(t)}),e=[...new Set(e)],e.forEach(e=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(e);null!==o&&this.hot.view._wt.wtOverlays.getOverlays(!0).map(t=>"master"===t.name?t:t.clone.wtTable).forEach(e=>{const n=e.getRow(o);n&&(n.style.background=Po(n,"backgroundColor")?.replace(")",", 0.99)")??"",t.push(n))})}),this.hot._registerTimeout(()=>{t.forEach(t=>{t.style.background=Po(t,"backgroundColor")?.replace(", 0.99)","")??""})},1)}validateSetting(t){return!!t&&(q6.containsNegativeValues(t)?(Xe(q6.NEGATIVE_VALUES_WARNING(t)),!1):q6.isOutOfBounds(t,this.hot.countRows(),this.hot.countCols())?(Xe(q6.IS_OUT_OF_BOUNDS_WARNING(t)),!1):q6.isSingleCell(t)?(Xe(q6.IS_SINGLE_CELL(t)),!1):!q6.containsZeroSpan(t)||(Xe(q6.ZERO_SPAN_WARNING(t)),!1))}generateFromSettings(){const t=this.getSetting("cells").filter(t=>this.validateSetting(t)),e=this.mergedCellsCollection.filterOverlappingMergeCells(t),o=[];e.forEach(t=>{const{row:e,col:n,rowspan:i,colspan:s}=t,r=this.hot._createCellCoords(e,n),l=this.hot._createCellCoords(e+i-1,n+s-1),a=this.hot._createCellRange(r,r,l);this.mergeRange(a,!0,!0);for(let t=e;t<e+i;t++)for(let i=n;i<n+s;i++)t===e&&i===n||o.push([t,i,null])}),0!==o.length&&this.hot.setDataAtCell(o,void 0,void 0,this.pluginName??void 0)}clearCollections(){$(this.mergedCellsCollection.mergedCells,t=>{Z4(this,c5,Q5).call(this,t)}),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:o}=t;this.unmergeRange(t,!0),this.mergeRange(t),null!==e.row&&null!==e.col&&null!==o.row&&null!==o.col&&this.hot.selectCell(e.row,e.col,o.row,o.col,!1)}unmergeSelection(t=this.hot.getSelectedRangeActive()){if(!t)return;const{from:e,to:o}=t;this.unmergeRange(t,!0),null!==e.row&&null!==e.col&&null!==o.row&&null!==o.col&&this.hot.selectCell(e.row,e.col,o.row,o.col,!1)}mergeRange(t,e=!1,o=!1){const n=t.getTopStartCorner(),i=t.getBottomEndCorner();if(null===n.row||null===n.col||null===i.row||null===i.col)return!1;const s={row:n.row,col:n.col,rowspan:i.row-n.row+1,colspan:i.col-n.col+1},r=[];let l=null;if(!this.canMergeRange(s,e))return!1;this.hot.runHooks("beforeMergeCells",t,e),as(0,s.rowspan-1,t=>{as(0,s.colspan-1,e=>{let o=null;r[t]||(r[t]=[]),0===t&&0===e?o=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]=o})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0);return!this.mergedCellsCollection.add(s,e)||(o?l=[s.row,s.col,r]:this.hot.populateFromArray(s.row,s.col,r,void 0,void 0,this.pluginName??void 0),e||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",t,s,e),l)}unmergeRange(t,e=!1){const o=this.mergedCellsCollection.getWithinRange(t);0!==o.length&&(this.hot.runHooks("beforeUnmergeCells",t,e),$(o,t=>{this.mergedCellsCollection.remove(t.row,t.col),Z4(this,c5,Q5).call(this,t)}),this.hot.runHooks("afterUnmergeCells",t,e),this.hot.render())}toggleMerge(t){const{from:e,to:o}=t.clone().normalize();if(null===e.row||null===e.col||null===o.row||null===o.col)return;const n=this.mergedCellsCollection.get(e.row,e.col);!1!==n&&n.row===e.row&&n.col===e.col&&n.row+n.rowspan-1===o.row&&n.col+n.colspan-1===o.col?this.unmergeRange(t):this.mergeSelection(t)}merge(t,e,o,n){const i=this.hot._createCellCoords(t,e),s=this.hot._createCellCoords(o,n);this.mergeRange(this.hot._createCellRange(i,i,s))}unmerge(t,e,o,n){const i=this.hot._createCellCoords(t,e),s=this.hot._createCellCoords(o,n);this.unmergeRange(this.hot._createCellRange(i,i,s))}registerShortcuts(){const t=this.hot.getShortcutManager().getContext("grid");t&&t.addShortcut({keys:[["Control","m"]],callback:()=>{const t=this.hot.getSelectedRangeActive();t&&!t.isSingleHeader()&&(this.toggleMerge(t),this.hot.render())},runOnlyIf:t=>!t?.altKey,group:t5})}unregisterShortcuts(){const t=this.hot.getShortcutManager().getContext("grid");t?.removeShortcutsByGroup(t5)}modifyViewportRowStart(t,e){const o=this.hot.rowIndexMapper,n=o.getVisualFromRenderableIndex(t.startRow)??0,i=this.mergedCellsCollection.getByVisualRow(n);for(let n=0;n<i.length;n+=1){const s=i[n],r=o.getNearestNotHiddenIndex(s.row,1),l=null!==r?o.getRenderableFromVisualIndex(r):null;if(null!==l&&l<t.startRow)return t.startRow=l,void this.modifyViewportRowStart(t,e)}}modifyViewportRowEnd(t,e){const o=this.hot.rowIndexMapper,n=o.getVisualFromRenderableIndex(t.endRow)??0,i=this.mergedCellsCollection.getByVisualRow(n);for(let n=0;n<i.length;n+=1){const s=i[n],r=s.row+s.rowspan-1,l=o.getNearestNotHiddenIndex(r,-1);if(null!==l){const n=o.getRenderableFromVisualIndex(l);if(null!==n&&n>t.endRow)return t.endRow=n,void this.modifyViewportRowEnd(t,e)}}}modifyViewportColumnStart(t,e){const o=this.hot.columnIndexMapper,n=o.getVisualFromRenderableIndex(t.startColumn)??0,i=this.mergedCellsCollection.getByVisualColumn(n);for(let n=0;n<i.length;n+=1){const s=i[n],r=o.getNearestNotHiddenIndex(s.col,1);if(null!==r){const n=o.getRenderableFromVisualIndex(r);if(null!==n&&n<t.startColumn)return t.startColumn=n,void this.modifyViewportColumnStart(t,e)}}}modifyViewportColumnEnd(t,e){const o=this.hot.columnIndexMapper,n=o.getVisualFromRenderableIndex(t.endColumn)??0,i=this.mergedCellsCollection.getByVisualColumn(n);for(let n=0;n<i.length;n+=1){const s=i[n],r=s.col+s.colspan-1,l=o.getNearestNotHiddenIndex(r,-1);if(null!==l){const n=o.getRenderableFromVisualIndex(l);if(null!==n&&n>t.endColumn)return t.endColumn=n,void this.modifyViewportColumnEnd(t,e)}}}translateMergedCellToRenderable(t,e,o,n){const{rowIndexMapper:i,columnIndexMapper:s}=this.hot;let r,l;r=0===e?i.getNearestNotHiddenIndex(t,1):i.getNearestNotHiddenIndex(t+e-1,-1),l=0===n?s.getNearestNotHiddenIndex(o,1):s.getNearestNotHiddenIndex(o+n-1,-1);return[t>=0&&null!==r?i.getRenderableFromVisualIndex(r)??t:t,o>=0&&null!==l?s.getRenderableFromVisualIndex(l)??o:o]}constructor(...t){super(...t),Q4(this,c5),Q4(this,p5),Q4(this,f5),Q4(this,m5),Q4(this,w5),Q4(this,b5),Q4(this,E5),X4(this,e5,{writable:!0,value:void 0}),X4(this,o5,{writable:!0,value:void 0}),X4(this,n5,{writable:!0,value:void 0}),X4(this,i5,{writable:!0,value:void 0}),X4(this,s5,{writable:!0,value:void 0}),X4(this,r5,{writable:!0,value:void 0}),X4(this,l5,{writable:!0,value:void 0}),X4(this,a5,{writable:!0,value:void 0}),X4(this,h5,{writable:!0,value:void 0}),X4(this,d5,{writable:!0,value:void 0}),X4(this,u5,{writable:!0,value:void 0}),X4(this,g5,{writable:!0,value:void 0}),X4(this,v5,{writable:!0,value:void 0}),X4(this,C5,{writable:!0,value:void 0}),X4(this,y5,{writable:!0,value:void 0}),X4(this,S5,{writable:!0,value:void 0}),X4(this,k5,{writable:!0,value:void 0}),X4(this,R5,{writable:!0,value:void 0}),X4(this,x5,{writable:!0,value:void 0}),X4(this,M5,{writable:!0,value:void 0}),X4(this,T5,{writable:!0,value:void 0}),X4(this,H5,{writable:!0,value:void 0}),X4(this,I5,{writable:!0,value:void 0}),X4(this,_5,{writable:!0,value:void 0}),X4(this,A5,{writable:!0,value:void 0}),X4(this,W5,{writable:!0,value:void 0}),X4(this,O5,{writable:!0,value:void 0}),X4(this,N5,{writable:!0,value:void 0}),X4(this,P5,{writable:!0,value:void 0}),X4(this,D5,{writable:!0,value:void 0}),X4(this,L5,{writable:!0,value:void 0}),X4(this,z5,{writable:!0,value:void 0}),X4(this,B5,{writable:!0,value:void 0}),X4(this,V5,{writable:!0,value:void 0}),X4(this,F5,{writable:!0,value:void 0}),X4(this,$5,{writable:!0,value:void 0}),X4(this,U5,{writable:!0,value:void 0}),X4(this,j5,{writable:!0,value:void 0}),X4(this,q5,{writable:!0,value:void 0}),X4(this,G5,{writable:!0,value:void 0}),X4(this,Y5,{writable:!0,value:void 0}),X4(this,X5,{writable:!0,value:void 0}),X4(this,K5,{writable:!0,value:void 0}),K4(this,e5,null),K4(this,o5,{row:0,col:0}),K4(this,n5,new _4({mergedCellsGetter:(t,e)=>this.mergedCellsCollection.get(t,e),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),K4(this,i5,j4(this)),K4(this,s5,null),K4(this,r5,null),K4(this,l5,!1),K4(this,a5,new WeakMap),K4(this,h5,new WeakSet),K4(this,d5,()=>{this.generateFromSettings(),this.hot.render(),K4(this,l5,!0),Z4(this,f5,t7).call(this)}),K4(this,u5,(t,e)=>{const o=this.mergedCellsCollection.get(e.row,e.col);o&&Z4(this,p5,J5).call(this,o)}),K4(this,g5,({trimmedIndexesChanged:t,hiddenIndexesChanged:e,indexesSequenceChanged:o})=>{this.hot&&Y4(this,l5)&&(t||e||o)&&Z4(this,b5,n7).call(this)}),K4(this,v5,t=>{if(t){const e=this.mergedCellsCollection.mergedCells,o=this.hot.getSelectedRangeActive();if(!o)return t;const n=o.getTopStartCorner(),i=o.getBottomEndCorner();for(let t=0;t<e.length;t+=1)if(n.row===e[t].row&&n.col===e[t].col&&i.row===e[t].row+e[t].rowspan-1&&i.col===e[t].col+e[t].colspan-1)return!1}return t}),K4(this,C5,t=>{Y4(this,o5).row=t.row,Y4(this,o5).col=t.col}),K4(this,y5,t=>{const e=this.hot.getSelectedRangeActive();if(!e)return;const{highlight:o}=e,{columnIndexMapper:n,rowIndexMapper:i}=this.hot;if(Y4(this,e5)&&(null!==Y4(this,e5).row&&null!==i.getRenderableFromVisualIndex(Y4(this,e5).row)&&(o.row=Y4(this,e5).row),null!==Y4(this,e5).col&&null!==n.getRenderableFromVisualIndex(Y4(this,e5).col)&&(o.col=Y4(this,e5).col),K4(this,e5,null)),null===o.row||null===o.col)return;const s=this.mergedCellsCollection.get(o.row,o.col);if(!s)return;const r=s.col,l=s.col+s.colspan-1;if(t.col<0){const e=o.col>=r&&o.col<=l?r-1:l,i=n.getNearestNotHiddenIndex(e,-1);t.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,o.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,o.col)-1,1)}else if(t.col>0){const e=o.col>=r&&o.col<=l?l+1:r,i=n.getNearestNotHiddenIndex(e,1);t.col=null===i?this.hot.view.countRenderableColumnsInRange(o.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(o.col,i)-1,1)}const a=s.row,h=s.row+s.rowspan-1;if(t.row<0){const e=o.row>=a&&o.row<=h?a-1:h,n=i.getNearestNotHiddenIndex(e,-1);t.row=null===n?-this.hot.view.countRenderableRowsInRange(0,o.row):-Math.max(this.hot.view.countRenderableRowsInRange(n,o.row)-1,1)}else if(t.row>0){const e=o.row>=a&&o.row<=h?h+1:a,n=i.getNearestNotHiddenIndex(e,1);t.row=null===n?this.hot.view.countRenderableRowsInRange(o.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(o.row,n)-1,1)}}),K4(this,S5,t=>{const e=this.hot.getSelectedRangeActive();if(!e)return;const o=e.clone(),{to:n}=e,i=n.row??0,s=n.col??0,{columnIndexMapper:r,rowIndexMapper:l}=this.hot,a=(t,e)=>{o.expand(this.hot._createCellCoords(t,e));for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1){const e=this.mergedCellsCollection.mergedCells[t].getRange();e&&o.expandByRange(e)}};if(t.col<0){let n=this.mergedCellsCollection.getStartMostColumnIndex(e,s)+t.col;a(i,n),"E-W"===e.getHorizontalDirection()&&"E-W"===o.getHorizontalDirection()&&(n=o.getTopStartCorner().col??n);const l=r.getNearestNotHiddenIndex(n,1);null!==l&&(t.col=-Math.max(this.hot.view.countRenderableColumnsInRange(l,s)-1,1))}else if(t.col>0){let n=this.mergedCellsCollection.getEndMostColumnIndex(e,s)+t.col;a(i,n),"W-E"===e.getHorizontalDirection()&&"W-E"===o.getHorizontalDirection()&&(n=o.getBottomEndCorner().col??n);const l=r.getNearestNotHiddenIndex(n,-1);null!==l&&(t.col=Math.max(this.hot.view.countRenderableColumnsInRange(s,l)-1,1))}if(t.row<0){let n=this.mergedCellsCollection.getTopMostRowIndex(e,i)+t.row;a(n,s),"S-N"===e.getVerticalDirection()&&"S-N"===o.getVerticalDirection()&&(n=o.getTopStartCorner().row??n);const r=l.getNearestNotHiddenIndex(n,1);null!==r&&(t.row=-Math.max(this.hot.view.countRenderableRowsInRange(r,i)-1,1))}else if(t.row>0){let n=this.mergedCellsCollection.getBottomMostRowIndex(e,i)+t.row;a(n,s),"N-S"===e.getVerticalDirection()&&"N-S"===o.getVerticalDirection()&&(n=o.getBottomStartCorner().row??n);const r=l.getNearestNotHiddenIndex(n,-1);null!==r&&(t.row=Math.max(this.hot.view.countRenderableRowsInRange(i,r)-1,1))}}),K4(this,k5,()=>{const t=this.hot.getSelectedRangeLast();if(!t)return;const{highlight:e}=t;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void K4(this,e5,e.clone());for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1){const o=this.mergedCellsCollection.mergedCells[e].getRange();o&&t.expandByRange(o,!1)}for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1){const o=this.mergedCellsCollection.mergedCells[e].getRange();o&&t.expandByRange(o,!1)}if(null===e.row||null===e.col)return;const o=this.mergedCellsCollection.get(e.row,e.col);K4(this,e5,e.clone()),o&&e.assign(o)}),K4(this,R5,(t,e,o,n)=>{if(t<0||e<0)return;const i=this.mergedCellsCollection.get(t,e);if(!i)return;const{row:s,col:r,colspan:l,rowspan:a}=i,h=s,c=r,d=s+a-1,u=r+l-1;if("render"===n&&this.getSetting("virtualized")){const t=this.hot.view.getActiveOverlayName(),e=["top","top_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleRow(),o=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(t)?0:this.hot.getFirstRenderedVisibleColumn();return[ds(e,h,d),ds(o,c,u),ds(this.hot.getLastRenderedVisibleRow(),h,d),ds(this.hot.getLastRenderedVisibleColumn(),c,u)]}return[h,c,d,u]}),K4(this,x5,()=>{K4(this,e5,null)}),K4(this,M5,()=>{if(!Y4(this,e5)||Y4(this,e5).isCell())return;const t=this.hot.getSelectedRangeActive();if(!t)return;const e=t.getVerticalDirection(),o=t.getHorizontalDirection(),n=Y4(this,e5).clone().normalize();null!==n.row&&null!==n.col&&(Y4(this,n5).setActiveNode(n.row,n.col),Y4(this,o5).row>0||Y4(this,o5).col>0?Y4(this,n5).setPrevNodeAsActive():("E-W"===o&&Y4(this,o5).col<0||"S-N"===e&&Y4(this,o5).row<0)&&Y4(this,n5).setNextNodeAsActive())}),K4(this,T5,(t,e)=>{const{columnIndexMapper:o,rowIndexMapper:n}=this.hot;let i=this.hot.getActiveSelectionLayerIndex(),s=null,r=null;if(Y4(this,o5).col<0){const{rowEnd:t,colEnd:e,selectionLayer:l}=Y4(this,n5).getPrevHorizontalNode();r=o.getNearestNotHiddenIndex(e,-1),s=n.getNearestNotHiddenIndex(t,-1),i=l}else if(Y4(this,o5).col>0){const{rowStart:t,colStart:e,selectionLayer:l}=Y4(this,n5).getNextHorizontalNode();r=o.getNearestNotHiddenIndex(e,1),s=n.getNearestNotHiddenIndex(t,1),i=l}else if(Y4(this,o5).row<0){const{rowEnd:t,colEnd:e,selectionLayer:l}=Y4(this,n5).getPrevVerticalNode();r=o.getNearestNotHiddenIndex(e,-1),s=n.getNearestNotHiddenIndex(t,-1),i=l}else if(Y4(this,o5).row>0){const{rowStart:t,colStart:e,selectionLayer:l}=Y4(this,n5).getNextVerticalNode();r=o.getNearestNotHiddenIndex(e,1),s=n.getNearestNotHiddenIndex(t,1),i=l}if(null!==s||null!==r){this.hot.selection.setActiveSelectionLayerIndex(i);const o=this.hot.getSelectedRangeActive(),n=s??0,l=r??0,a=this.hot._createCellCoords(n,l),h=this.mergedCellsCollection.get(n,l),c=this.hot.selection.highlight.getFocus();t=n,e=l,o&&(h?o.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(h.row,1)??void 0,col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(h.col,1)??void 0}):o.highlight.assign(a)),c.clear(),c.add(a).commit()}Y4(this,n5).setActiveNode(t,e,i),K4(this,o5,{row:0,col:0})}),K4(this,H5,()=>{const t=this.hot.getSelectedRange();t&&Y4(this,n5).buildFocusOrder(t)}),K4(this,I5,(t,e,o)=>{const n=this.mergedCellsCollection.get(t,e);n&&(n.row!==t||n.col!==e?(o.copyable=!1,o.hidden=!0):(o.rowspan=n.rowspan,o.colspan=n.colspan,o.spanned=!0))}),K4(this,_5,t=>{if(this.getSetting("virtualized"))return;const e=this.hot.countCols();this.modifyViewportRowStart(t,e),this.modifyViewportRowEnd(t,e)}),K4(this,A5,t=>{if(this.getSetting("virtualized"))return;const e=this.hot.countRows();this.modifyViewportColumnStart(t,e),this.modifyViewportColumnEnd(t,e)}),K4(this,W5,(t,e)=>{const o=this.autofillCalculations.getDirection(e,t);if(this.autofillCalculations.dragAreaOverlapsCollections(e,t,o))return e;const n=this.hot._createCellCoords(e[0],e[1]),i=this.hot._createCellCoords(e[2],e[3]),s=this.hot._createCellRange(n,n,i),r=this.mergedCellsCollection.getWithinRange(s);return 0===r.length?t:this.autofillCalculations.snapDragArea(e,t,o,r)}),K4(this,O5,(t,e)=>{this.mergedCellsCollection.shiftCollections("right",t,e),Z4(this,f5,t7).call(this),Z4(this,b5,n7).call(this)}),K4(this,N5,(t,e)=>{this.mergedCellsCollection.shiftCollections("left",t,e),Z4(this,f5,t7).call(this),Z4(this,b5,n7).call(this)}),K4(this,P5,(t,e,o)=>{if("auto"!==o){if(this.mergedCellsCollection.shiftCollections("down",t,e),Z4(this,w5,o7).call(this)){const o=this.hot.toPhysicalRow(t);null!==o&&Z4(this,m5,e7).call(this,t=>t>=o?t+e:t)}Z4(this,f5,t7).call(this),Z4(this,b5,n7).call(this)}}),K4(this,D5,(t,e,o)=>{this.mergedCellsCollection.shiftCollections("up",t,e),Z4(this,w5,o7).call(this)&&Array.isArray(o)&&Z4(this,m5,e7).call(this,t=>t-o.reduce((e,o)=>e+(o<t?1:0),0)),Z4(this,f5,t7).call(this),Z4(this,b5,n7).call(this)}),K4(this,L5,(t,e,o,n)=>{n&&Y4(this,l5)?K4(this,s5,this.mergedCellsCollection.capturePhysicalSpans("column")):K4(this,s5,null)}),K4(this,z5,(t,e,o,n,i)=>{const s=Y4(this,s5);K4(this,s5,null),i&&s&&(this.mergedCellsCollection.translateAfterAxisMove("column",s),Z4(this,f5,t7).call(this),this.hot.render())}),K4(this,B5,(t,e,o,n)=>{n&&Y4(this,l5)?K4(this,r5,this.mergedCellsCollection.capturePhysicalSpans("row")):K4(this,r5,null)}),K4(this,V5,(t,e,o,n,i)=>{const s=Y4(this,r5);K4(this,r5,null),i&&s&&(this.mergedCellsCollection.translateAfterAxisMove("row",s),Z4(this,f5,t7).call(this),this.hot.render())}),K4(this,F5,(t,e)=>{e&&Y4(this,l5)?K4(this,s5,this.mergedCellsCollection.capturePhysicalSpans("column")):K4(this,s5,null)}),K4(this,$5,(t,e)=>{const o=Y4(this,s5);K4(this,s5,null),e&&o&&(this.mergedCellsCollection.translateAfterAxisMove("column",o),Z4(this,f5,t7).call(this),this.hot.render())}),K4(this,U5,(t,e)=>{"Autofill.fill"===e&&this.autofillCalculations.recreateAfterDataPopulation(t)}),K4(this,j5,(t,e)=>{if(e&&"area"===e){const e=this.hot.getSelectedRangeActive();if(!e)return;$(this.mergedCellsCollection.getWithinRange(e),o=>{e.getBottomEndCorner().row===o.getLastRow()&&e.getBottomEndCorner().col===o.getLastColumn()&&(t[2]=o.row,t[3]=o.col)})}}),K4(this,q5,(t,e,o,n)=>{if(o)return this.selectionCalculations.getSelectedMergedCellClassName(t,e,o,n)}),K4(this,G5,()=>this.selectionCalculations.getSelectedMergedCellClassNameToRemove()),K4(this,Y5,(t,e,o,n)=>{if(!(n instanceof MouseEvent))return;const i=this.hot.getSelectedRangeActive();if(!i)return;const s=this.mergedCellsCollection.getByRange(i);if(!s)return;const r=this.hot._createCellCoords(s.row,s.col),l=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,l))}),K4(this,X5,()=>!1),K4(this,K5,(t,e,o)=>{if(this.hot.getSettings().rowHeaders||"bottom"===o||"bottom_inline_start_corner"===o)return t;let n,i;if("master"===o)n=this.hot.getFirstRenderedVisibleColumn(),i=this.hot.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(o),s=e?.clone?.wtTable;if(!s)return t;n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(s.getLastRenderedColumn())}if(null==n)return t;if(!this.mergedCellsCollection.get(e,n))return t;const s=this.hot._createCellCoords(e,n),r=this.hot._createCellCoords(e,i??n),l=this.hot._createCellRange(s,s,r),a=this.mergedCellsCollection.getWithinRange(l,!0),h=a.reduce((t,{rowspan:e})=>Math.max(t,e),1);let c=0;return a.length>1&&a[0].rowspan<h&&(c=h-a[0].rowspan),a.forEach(({rowspan:n})=>{let i=0;i="top"===o||"top_inline_start_corner"===o?Math.min(h,this.hot.view.countNotHiddenFixedRowsTop()-e):n-c,t=Math.max(t??0,U4(this.hot,e,i))}),t})}}function Q5(t){as(0,t.rowspan-1,e=>{as(0,t.colspan-1,o=>{this.hot.removeCellMeta(t.row+e,t.col+o,"hidden"),this.hot.removeCellMeta(t.row+e,t.col+o,"copyable")})}),this.hot.removeCellMeta(t.row,t.col,"spanned"),this.hot.removeCellMeta(t.row,t.col,"rowspan"),this.hot.removeCellMeta(t.row,t.col,"colspan")}function J5(t,e=Z4(this,w5,o7).call(this)){const o=this.hot.toPhysicalColumn(t.col);if(null===o)return;const n=Y4(this,a5).get(t),i=e&&n?n.physicalRow:this.hot.toPhysicalRow(t.row);null!==i&&Y4(this,a5).set(t,{physicalRow:i,physicalColumn:o})}function t7(){const t=Z4(this,w5,o7).call(this);this.mergedCellsCollection.mergedCells.forEach(e=>Z4(this,p5,J5).call(this,e,t))}function e7(t){this.mergedCellsCollection.mergedCells.forEach(e=>{const o=Y4(this,a5).get(e);if(!o)return;const n=t(o.physicalRow);n!==o.physicalRow&&Y4(this,a5).set(e,{physicalRow:n,physicalColumn:o.physicalColumn})})}function o7(){const{rowIndexMapper:t}=this.hot;return t.getNotTrimmedIndexesLength()<t.getNumberOfIndexes()}function n7(){const{mergedCells:t}=this.mergedCellsCollection;if(0===t.length)return;const e=[],o=[];t.forEach(t=>{const n=Y4(this,a5).get(t);if(!n)return;const i=this.hot.toVisualColumn(n.physicalColumn);let s=null===i?null:this.hot.toVisualRow(n.physicalRow);for(let e=1;null!==i&&null===s&&e<t.rowspan;e++)s=this.hot.toVisualRow(n.physicalRow+e);if(null===i||null===s)return Y4(this,h5).add(t),void o.push(t);(Y4(this,h5).delete(t)||t.row!==s||t.col!==i)&&e.push({mergedCell:t,row:s,col:i})}),o.length>0&&this.mergedCellsCollection.removeFromMatrix(o),e.length>0&&this.mergedCellsCollection.relocateInMatrix(e)}function i7(t){var e;t.items.push({name:"---------"},(e=this,{key:"mergeCells",name(){const t=this.getSelectedActive();if(t&&e.mergedCellsCollection){const o=e.mergedCellsCollection.get(t[0],t[1]);if(!1!==o&&o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(Cw)}return this.getTranslatedPhrase(vw)},callback(){const t=this.getSelectedRangeActive();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:o,to:n}=t;e.toggleMerge(t),null!==o.row&&null!==o.col&&null!==n.row&&null!==n.col&&this.selectCell(o.row,o.col,n.row,n.col,!1)},disabled(){const t=this.getSelectedActive();return!t||q6.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 s7({pointerRow:t,pointerCol:e,grabRowOffset:o,grabColOffset:n,rangeHeight:i,rangeWidth:s,totalRows:r,totalCols:l}){const a=t-o,h=e-n,c=Math.max(0,r-i),d=Math.max(0,l-s);return{row:Math.min(Math.max(0,a),c),col:Math.min(Math.max(0,h),d)}}const r7=["className"];function l7(t,e,o,n,i){const s=[];for(let r=e;r<=n;r++)for(let e=o;e<=i;e++){const o=t.getCellMetaTransient(r,e);let n=null;for(const t of r7)Te(o,t)&&(n=n??{},n[t]=o[t]);null!==n&&s.push({row:r,col:e,meta:n})}return s}function a7(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h7(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function c7(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,h7(t,e,"get"))}function d7(t,e,o){a7(t,e),e.set(t,o)}function u7(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,h7(t,e,"set"),o),o}function g7(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function p7(t,e){a7(t,e),e.add(t)}const f7="moveCells",m7=f7,w7=1e5;var b7=new WeakMap,v7=new WeakMap,C7=new WeakMap,y7=new WeakMap,S7=new WeakSet,k7=new WeakMap,R7=new WeakMap,E7=new WeakMap,x7=new WeakSet,M7=new WeakMap,T7=new WeakSet,H7=new WeakSet,I7=new WeakSet,_7=new WeakSet,A7=new WeakSet,W7=new WeakSet,O7=new WeakSet;class N7 extends pW{static get PLUGIN_KEY(){return f7}static get PLUGIN_PRIORITY(){return 25}static get SETTING_KEYS(){return[f7]}isEnabled(){return!0===this.hot.getSettings()[f7]}enablePlugin(){this.enabled||(this.addHook("afterOnSelectionEdgeMouseDown",c7(this,k7)),this.addHook("afterScroll",c7(this,E7)),g7(this,T7,L7).call(this),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){g7(this,H7,z7).call(this),super.disablePlugin(),g7(this,I7,B7).call(this,!1,null)}destroy(){g7(this,I7,B7).call(this,!1,null),super.destroy()}isDragActive(){return null!==c7(this,b7)}moveCellRange(t,e,o=!1){const n=t.getTopStartCorner(),i=t.getBottomEndCorner(),s=n.row,r=n.col,l=i.row,a=i.col,h=l-s+1,c=a-r+1,d=e.row,u=e.col,g=d+h-1,p=u+c-1;if(d===s&&u===r)return!1;if(h*c>w7)return Xe("The moved range spans more than 100000 cells — the operation was skipped."),!1;if(d<0||u<0||g>=this.hot.countRows()||p>=this.hot.countCols()||s<0||r<0||l>=this.hot.countRows()||a>=this.hot.countCols()||g7(this,W7,$7).call(this,d,u,h,c)||!o&&g7(this,W7,$7).call(this,s,r,h,c))return!1;const f=this.hot.getPlugin("mergeCells");if(f?.enabled){const e=this.hot._createCellRange(this.hot._createCellCoords(d,u),this.hot._createCellCoords(d,u),this.hot._createCellCoords(g,p));if(f.mergedCellsCollection.getWithinRange(t,!0).length>0||f.mergedCellsCollection.getWithinRange(e,!0).length>0)return!1}if(!1===this.hot.runHooks("beforeMoveCells",t,e,o))return!1;const m=this.hot.getPlugin("formulas"),w=!0===m?.enabled;if(w&&!m.commitPendingMoveCells())return!1;const b=g7(this,S7,P7).call(this,s,r,l,a);this.hot.batch(()=>{if(g7(this,O7,U7).call(this,{fromRow:s,fromCol:r,toRow:l,toCol:a,targetRow:d,targetCol:u,isCopy:o}),!w){if(!o){const t=Array.from({length:h},()=>Array(c).fill(null));this.hot.populateFromArray(s,r,t,l,a,"auto")}this.hot.populateFromArray(d,u,b,g,p,"auto")}});const v=this.hot._createCellRange(this.hot._createCellCoords(d,u),this.hot._createCellCoords(d,u),this.hot._createCellCoords(g,p));return this.hot.runHooks("afterMoveCells",t,v,o),this.hot.selectCells([[d,u,g,p]]),!0}constructor(...t){super(...t),p7(this,S7),p7(this,x7),p7(this,T7),p7(this,H7),p7(this,I7),p7(this,_7),p7(this,A7),p7(this,W7),p7(this,O7),d7(this,b7,{writable:!0,value:void 0}),d7(this,v7,{writable:!0,value:void 0}),d7(this,C7,{writable:!0,value:void 0}),d7(this,y7,{writable:!0,value:void 0}),d7(this,k7,{writable:!0,value:void 0}),d7(this,R7,{writable:!0,value:void 0}),d7(this,E7,{writable:!0,value:void 0}),d7(this,M7,{writable:!0,value:void 0}),u7(this,b7,null),u7(this,v7,null),u7(this,C7,""),u7(this,y7,null),u7(this,k7,t=>{const e=this.hot.selection;if(mn(t))return;if(c7(this,b7)||!e.isRangeMovable()&&!e.isSingleCellMovable())return;const o=e.getSelectedRange().current();if(!o)return;this.hot.listen();const n=o.getTopStartCorner(),i=o.getBottomEndCorner(),s=vO(this.hot,t.clientX,t.clientY),r=n.row,l=n.col,a=i.row,h=i.col;u7(this,b7,{fromRow:r,fromCol:l,toRow:a,toCol:h,grabRowOffset:Math.min(a-r,Math.max(0,(s.row??r)-r)),grabColOffset:Math.min(h-l,Math.max(0,(s.col??l)-l)),pressRow:s.row,pressCol:s.col}),u7(this,y7,{clientX:t.clientX,clientY:t.clientY}),u7(this,C7,this.hot.rootDocument.body.style.cursor),this.hot.rootDocument.body.style.cursor="grabbing",po(this.hot.rootElement,"ht__moving"),g7(this,_7,V7).call(this),g7(this,A7,F7).call(this,r,l,a,h),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mousemove",c7(this,R7)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mouseup",c7(this,M7))}),u7(this,R7,t=>{if(!(t instanceof this.hot.rootWindow.MouseEvent))return;const e=t;c7(this,b7)&&(u7(this,y7,{clientX:e.clientX,clientY:e.clientY}),g7(this,x7,D7).call(this,e.clientX,e.clientY))}),u7(this,E7,()=>{c7(this,b7)&&c7(this,y7)&&g7(this,x7,D7).call(this,c7(this,y7).clientX,c7(this,y7).clientY)}),u7(this,M7,t=>{g7(this,I7,B7).call(this,!0,t)})}}function P7(t,e,o,n){const i=[];for(let s=t;s<=o;s++){const t=this.hot.toPhysicalRow(s),o=[];for(let i=e;i<=n;i++)o.push(this.hot.getSourceDataAtCell(t,i));i.push(o)}return i}function D7(t,e){const o=c7(this,b7);if(!o)return;const{fromRow:n,fromCol:i,toRow:s,toCol:r,grabRowOffset:l,grabColOffset:a}=o,h=vO(this.hot,t,e),c=s7({pointerRow:h.row??n,pointerCol:h.col??i,grabRowOffset:l,grabColOffset:a,rangeHeight:s-n+1,rangeWidth:r-i+1,totalRows:this.hot.countRows(),totalCols:this.hot.countCols()});g7(this,A7,F7).call(this,c.row,c.col,c.row+s-n,c.col+r-i)}function L7(){this.hot.getShortcutManager().getContext("grid")?.addShortcut({keys:[["Escape"]],callback:()=>g7(this,I7,B7).call(this,!1,null),runOnlyIf:()=>null!==c7(this,b7),group:m7})}function z7(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(m7)}function B7(t,e){const o=c7(this,b7);if(!o)return;if(u7(this,b7,null),u7(this,y7,null),this.eventManager.removeEventListener(this.hot.rootDocument.documentElement,"mousemove",c7(this,R7)),this.eventManager.removeEventListener(this.hot.rootDocument.documentElement,"mouseup",c7(this,M7)),c7(this,v7)?.remove(),u7(this,v7,null),fo(this.hot.rootElement,"ht__moving"),this.hot.rootDocument.body.style.cursor=c7(this,C7),!t||!e)return;const n=vO(this.hot,e.clientX,e.clientY);if(n.row===o.pressRow&&n.col===o.pressCol)return void(null!==n.row&&null!==n.col&&this.hot.selectCell(n.row,n.col));const i=s7({pointerRow:n.row??o.fromRow,pointerCol:n.col??o.fromCol,grabRowOffset:o.grabRowOffset,grabColOffset:o.grabColOffset,rangeHeight:o.toRow-o.fromRow+1,rangeWidth:o.toCol-o.fromCol+1,totalRows:this.hot.countRows(),totalCols:this.hot.countCols()}),s=this.hot._createCellRange(this.hot._createCellCoords(o.fromRow,o.fromCol),this.hot._createCellCoords(o.fromRow,o.fromCol),this.hot._createCellCoords(o.toRow,o.toCol));this.moveCellRange(s,this.hot._createCellCoords(i.row,i.col),e.ctrlKey||e.metaKey)}function V7(){const t=this.hot.rootDocument.createElement("div"),e=this.hot.rootWindow.getComputedStyle(this.hot.rootElement),o=e.getPropertyValue("--ht-cell-selection-border-width").trim()||"1px",n=e.getPropertyValue("--ht-cell-selection-border-color").trim()||"#4b89ff";t.className="wtMoveGhost",Object.assign(t.style,{position:"fixed",display:"none",pointerEvents:"none",zIndex:"10000",boxSizing:"border-box",border:`${o} dashed ${n}`}),this.hot.rootDocument.body.appendChild(t),u7(this,v7,t)}function F7(t,e,o,n){if(!c7(this,v7))return;const i=this.hot.rowIndexMapper.getNearestNotHiddenIndex(Math.max(t,this.hot.getFirstRenderedVisibleRow()),1),s=this.hot.rowIndexMapper.getNearestNotHiddenIndex(Math.min(o,this.hot.getLastRenderedVisibleRow()),-1),r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(Math.max(e,this.hot.getFirstRenderedVisibleColumn()),1),l=this.hot.columnIndexMapper.getNearestNotHiddenIndex(Math.min(n,this.hot.getLastRenderedVisibleColumn()),-1);if(null===i||null===s||null===r||null===l||i>s||r>l||i>o||s<t||r>n||l<e)return void(c7(this,v7).style.display="none");const a=this.hot.getCell(i,r,!0),h=this.hot.getCell(s,l,!0);if(!a||!h)return void(c7(this,v7).style.display="none");const c=a.getBoundingClientRect(),d=h.getBoundingClientRect(),u=Math.min(c.left,d.left),g=Math.max(c.right,d.right);Object.assign(c7(this,v7).style,{display:"block",top:`${c.top}px`,left:`${u}px`,width:g-u+"px",height:d.bottom-c.top+"px"})}function $7(t,e,o,n){for(let i=0;i<o;i++)for(let o=0;o<n;o++)if(this.hot.getCellMetaTransient(t+i,e+o).readOnly)return!0;return!1}function U7({fromRow:t,fromCol:e,toRow:o,toCol:n,targetRow:i,targetCol:s,isCopy:r}){const l=i-t,a=s-e,h=i+(o-t),c=s+(n-e),d=l7(this.hot,t,e,o,n),u=l7(this.hot,i,s,h,c),g=new Map(d.map(({row:t,col:e,meta:o})=>[`${t}:${e}`,o]));d.forEach(({row:t,col:e,meta:o})=>{r7.forEach(n=>{Te(o,n)&&this.hot.setCellMeta(t+l,e+a,n,o[n])})}),u.forEach(({row:t,col:e,meta:o})=>{const n=g.get(`${t-l}:${e-a}`);r7.forEach(i=>{!Te(o,i)||n&&Te(n,i)||this.hot.removeCellMeta(t,e,i)})}),r||d.forEach(({row:t,col:e})=>{t>=i&&t<=h&&e>=s&&e<=c||r7.forEach(o=>this.hot.removeCellMeta(t,e,o))})}const j7="sort";const q7="multiColumnSorting",G7=q7;gP(q7,function(t,e){const o=e.map((e,o)=>function(t,e){const o=e.multiColumnSorting;return(o.compareFunctionFactory?o.compareFunctionFactory:fP(e.type))(t,e,o)}(t[o],e));return function(t,e){for(let n=0;n<o.length;n+=1){const i=o[n](t[n+1],e[n+1]);if(i!==mP)return i}return mP}});class Y7 extends iD{static get PLUGIN_KEY(){return q7}static get PLUGIN_PRIORITY(){return 170}static get SETTING_KEYS(){return[q7]}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 t=this.hot.getSelectedRangeActive();if(t){const{highlight:e}=t;if(-1===(e.row??0)&&(e.col??0)>=0){const t=this.getNextSortConfig(e.col??0,UP);this.sort(t)}}return!1},runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return!!(t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&t.isHeader())},relativeToGroup:Ek,position:"before",group:G7})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(G7)}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:void 0!==t?[t]:[]}updateHeaderClasses(t,e,o,n,i){super.updateHeaderClasses(t,e,o,n,i),fo(t,function(t){const e=t.className.split(" "),o=new RegExp(`^${j7}-[0-9]{1,2}$`);return e.filter(t=>o.test(t))}(t)),!1!==this.enabled&&void 0!==e&&void 0!==o&&po(t,function(t,e,o){const n=[];return!1===o||t.isColumnSorted(e)&&t.getNumberOfSortedColumns()>1&&n.push(`${j7}-${t.getIndexOfColumnInSortQueue(e)+1}`),n}(e,o,n??!1))}applyHeaderClickSort(t){t.isCtrlPressed?this.sort(this.getNextSortConfig(t.column,UP)):this.sort(this.getColumnNextConfig(t.column))}constructor(...t){super(...t),this.pluginKey=q7}}function X7(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function K7(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Z7(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,K7(t,e,"get"))}function Q7(t,e,o){X7(t,e),e.set(t,o)}function J7(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,K7(t,e,"set"),o),o}function t9(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function e9(t,e){X7(t,e),e.add(t)}var o9=new WeakMap,n9=new WeakMap,i9=new WeakMap,s9=new WeakSet,r9=new WeakSet,l9=new WeakMap,a9=new WeakSet;class h9 extends pW{static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return Fe()}enablePlugin(){this.enabled||(this.addHook("afterScroll",Z7(this,l9)),this.registerListeners(),super.enablePlugin())}disablePlugin(){t9(this,s9,c9).call(this),super.disablePlugin()}registerListeners(){const{rootElement:t}=this.hot,e=t=>{if(J7(this,o9,null),J7(this,n9,null),1===this.dragged.length)return this.dragged.splice(0,this.dragged.length),!0;const e=this.dragged.indexOf(t);if(-1===e)return!1;this.dragged.splice(e,1)},o=(t,e)=>{const o=vn(t);return null!==o&&(Z7(this,i9).set(o.identifier,e),this.dragged.push(e),!0)},n=t=>{let o=!1;for(const[n,i]of[...Z7(this,i9)])null===Cn(t,n)&&(Z7(this,i9).delete(n),e(i),o=!0);o&&(J7(this,o9,null),J7(this,n9,null),0===this.dragged.length&&(this.touchStartRange=void 0))};this.eventManager.addEventListener(t,"touchstart",t=>{let e;const n=no(t);return go(n,"topSelectionHandle-HitArea")?(e=this.hot.getSelectedRangeActive(),!!e&&(!!o(t,"top")&&(this.touchStartRange={width:e.getWidth(),height:e.getHeight(),direction:e.getDirection()},t.preventDefault(),!1))):go(n,"bottomSelectionHandle-HitArea")?(e=this.hot.getSelectedRangeActive(),!!e&&(!!o(t,"bottom")&&(this.touchStartRange={width:e.getWidth(),height:e.getHeight(),direction:e.getDirection()},t.preventDefault(),!1))):void 0});for(const e of["touchend","touchcancel"])this.eventManager.addEventListener(t,e,t=>{const e=no(t);if(n(t),go(e,"topSelectionHandle-HitArea")||go(e,"bottomSelectionHandle-HitArea"))return t.preventDefault(),!1});this.eventManager.addEventListener(t,"touchmove",t=>{if(0===this.dragged.length)return;const e=t9(this,r9,d9).call(this,t);null!==e&&(null!==Z7(this,o9)&&Math.abs(e.clientX-Z7(this,o9).clientX)<2&&Math.abs(e.clientY-Z7(this,o9).clientY)<2||(J7(this,o9,e),t9(this,a9,u9).call(this,e.clientX,e.clientY)),t.preventDefault())})}getCurrentRangeCoords(t,e,o,n,i){const s=t.getTopStartCorner(),r=t.getBottomEndCorner(),l=t.getBottomStartCorner(),a=t.getTopEndCorner();let h={start:null,end:null};switch(o){case"NE-SW":switch(n){case"NE-SW":case"NW-SE":h="top"===i?{start:this.hot._createCellCoords(e.row??0,t.highlight.col??0),end:this.hot._createCellCoords(l.row??0,e.col??0)}:{start:this.hot._createCellCoords(t.highlight.row??0,e.col??0),end:this.hot._createCellCoords(e.row??0,s.col??0)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(r.row??0,e.col??0),end:this.hot._createCellCoords(e.row??0,s.col??0)})}break;case"NW-SE":switch(n){case"NE-SW":"top"===i?h={start:e,end:l}: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:a}:h.end=e}break;case"SW-NE":switch(n){case"NW-SE":h="bottom"===i?{start:this.hot._createCellCoords(e.row??0,s.col??0),end:this.hot._createCellCoords(l.row??0,e.col??0)}:{start:this.hot._createCellCoords(s.row??0,e.col??0),end:this.hot._createCellCoords(e.row??0,r.col??0)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(t.highlight.row??0,e.col??0),end:this.hot._createCellCoords(e.row??0,r.col??0)}:{start:this.hot._createCellCoords(e.row??0,s.col??0),end:this.hot._createCellCoords(s.row??0,e.col??0)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(e.row??0,a.col??0),end:this.hot._createCellCoords(s.row??0,e.col??0)}:"top"===i&&(h={start:l,end:e})}break;case"SE-NW":switch(n){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}isDraggedBy(t){return Z7(this,i9).has(t)}constructor(...t){super(...t),e9(this,s9),e9(this,r9),e9(this,a9),Q7(this,o9,{writable:!0,value:void 0}),Q7(this,n9,{writable:!0,value:void 0}),Q7(this,i9,{writable:!0,value:void 0}),Q7(this,l9,{writable:!0,value:void 0}),this.dragged=[],J7(this,o9,null),J7(this,n9,null),J7(this,i9,new Map),J7(this,l9,()=>{if(0===this.dragged.length||null===Z7(this,o9))return;const{clientX:t,clientY:e}=Z7(this,o9);t9(this,a9,u9).call(this,t,e)})}}function c9(){this.dragged.splice(0,this.dragged.length),Z7(this,i9).clear(),this.touchStartRange=void 0,J7(this,o9,null),J7(this,n9,null)}function d9(t){for(const e of Z7(this,i9).keys()){const o=Cn(t,e);if(null!==o)return o}return null}function u9(t,e){const o=this.hot.getSelectedRangeActive();if(!o||void 0===this.touchStartRange)return;const n=vO(this.hot,t,e),i=Math.max(n.row??0,0),s=Math.max(n.col??0,0);if(Z7(this,n9)?.row===i&&Z7(this,n9)?.col===s)return;J7(this,n9,{row:i,col:s});const r=this.hot._createCellCoords(i,s),l=o.getDirection();1===o.getWidth()&&1===o.getHeight()&&this.hot.selection.setRangeEnd(r);const a=this.getCurrentRangeCoords(o,r,this.touchStartRange.direction,l,this.dragged[0]);null!==a.start&&this.hot.selection.setRangeStart(a.start),null!==a.end&&this.hot.selection.setRangeEnd(a.end)}function g9({label:t="",colspan:e=1,origColspan:o=1,rowspan:n=1,origRowspan:i=1,collapsible:s=!1,columnDropMode:r="adopt",crossHiddenColumns:l=[],isCollapsed:a=!1,isHidden:h=!1,isRoot:c=!1,isPlaceholder:d=!1,isRowspanPlaceholder:u=!1,headerClassNames:g=[],visibleWhen:p}={}){return{label:t,colspan:e,origColspan:o,rowspan:n,origRowspan:i,collapsible:s,columnDropMode:r,isCollapsed:a,crossHiddenColumns:l,isHidden:h,isRoot:c,isPlaceholder:d,isRowspanPlaceholder:u,headerClassNames:g,visibleWhen:p}}function p9(){return{label:"",isPlaceholder:!0}}const f9=["collapsed","expanded","always"];function m9(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function w9(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,m9(t,e,"get"))}function b9(t,e,o){!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,o)}function v9(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,m9(t,e,"set"),o),o}const C9=["label","collapsible"];var y9=new WeakMap,S9=new WeakMap,k9=new WeakMap;class R9{setColumnsLimit(t){v9(this,k9,t)}setData(t=[]){v9(this,y9,function(t,e=1/0){const o=[],n=[];if(0===e)return o;const i=t=>{if(""===t)return!0;if(!Ce(t))return!1;const{label:e,colspan:o,rowspan:n,headerClassName:i,visibleWhen:s}=t;return!(""!==_t(e)||void 0!==o&&1!==o||void 0!==n&&1!==n||void 0!==i||void 0!==s)},s=t=>{const e=g9();if(Ce(t)){const{label:o,colspan:n,rowspan:i,headerClassName:s,visibleWhen:r,columnDropMode:l}=t;e.label=_t(o),"number"==typeof n&&n>1&&(e.colspan=n,e.origColspan=n),"number"==typeof i&&i>1&&(e.rowspan=i,e.origRowspan=i),"string"==typeof s&&(e.headerClassNames=[...s.split(" ")]),"string"==typeof r&&f9.includes(r)&&(e.visibleWhen=r),"split"===l&&(e.columnDropMode="split")}else e.label=_t(t);return e};$(t,(t=[])=>{const r=[];let l=0,a=0;for(o.push(r);(l<t.length||n[a]>0)&&!(a>=e);){const o=t[l];if(n[a]>0){i(o)&&(l+=1),r.push(g9()),n[a]-=1,a+=1;continue}if(l>=t.length)break;const h=s(o);let c=h.origColspan;if(a+c>=e&&(c-=a+c-e,h.colspan=c,h.origColspan=c),h.origRowspan>1)for(let t=0;t<c;t++)n[a+t]=Math.max(n[a+t]??0,h.origRowspan-1);if(r.push(h),h.colspan>1)for(let t=0;t<h.colspan-1;t++)r.push(p9());a+=c,l+=1}});const r=Math.max(...F(o,t=>t.length));return $(o,t=>{const e=t;if(e.length<r){const t=F(new Array(r-e.length),()=>g9());e.splice(e.length,0,...t)}}),o}(t,w9(this,k9))),v9(this,S9,w9(this,y9).length)}setNormalizedData(t){v9(this,y9,t),v9(this,S9,t.length)}getData(){return w9(this,y9)}mergeWith(t){$(t,({row:t,col:e,...o})=>{const n=this.getHeaderSettings(t,e);null!==n&&ue(n,o,C9)})}map(t){$(w9(this,y9),e=>{$(e,e=>{const o=t({...e});Ce(o)&&ue(e,o,C9)})})}getHeaderSettings(t,e){if(t>=w9(this,S9)||t<0)return null;const o=w9(this,y9)[t];return!1===Array.isArray(o)||e>=o.length?null:o[e]??null}getHeadersSettings(t,e,o=1){const n=[];if(t>=w9(this,S9)||t<0)return n;const i=w9(this,y9)[t];let s=0;for(let t=e;t<i.length;t++){const e=i[t];if(e.isPlaceholder&&ce("The first column settings cannot overlap the other header layers"),s+=e.colspan,n.push(e),e.colspan>1&&(t+=e.colspan-1),s===o)break;s>o&&ce("The last column settings cannot overlap the other header layers")}return n}insertColumns(t,e){$(w9(this,y9),o=>{if(t>0&&t<o.length&&o[t].isPlaceholder){let n=t-1;for(;n>0&&o[n].isPlaceholder;)n-=1;o[n].colspan=(o[n].colspan??1)+e,o[n].origColspan=(o[n].origColspan??1)+e;const i=[];for(let t=0;t<e;t++)i.push(p9());o.splice(t,0,...i)}else{const n=[];for(let t=0;t<e;t++)n.push(g9());o.splice(Math.min(t,o.length),0,...n)}})}removeColumns(t,e){const o=t+e;v9(this,y9,w9(this,y9).map(e=>{const n=[];let i=0;for(;i<e.length;){const s=e[i],r=i+(s.isPlaceholder?1:s.origColspan??1)-1;let l=0;for(let e=i;e<=r;e++)(e<t||e>=o)&&(l+=1);if(l>0){n.push(g9({...s,colspan:l,origColspan:l,isPlaceholder:!1}));for(let t=1;t<l;t++)n.push(p9())}i=r+1}return n}))}getLayersCount(){return w9(this,S9)}getColumnsCount(){return w9(this,S9)>0?w9(this,y9)[0].length:0}clear(){v9(this,y9,[]),v9(this,S9,0)}constructor(){b9(this,y9,{writable:!0,value:void 0}),b9(this,S9,{writable:!0,value:void 0}),b9(this,k9,{writable:!0,value:void 0}),v9(this,y9,[]),v9(this,S9,0),v9(this,k9,1/0)}}const E9="DF-pre-order";const x9=new Map([[E9,function t(e,o){let n=e.call(o,this);for(let i=0;i<this.childs.length;i++){if(!1===n)return!1;n=t.call(this.childs[i],e,o)}return n}],["DF-post-order",function t(e,o){for(let n=0;n<this.childs.length;n++){if(!1===t.call(this.childs[n],e,o))return!1}return e.call(o,this)}],["BF",function(t,e){const o=[this];!function n(){if(0===o.length)return;const i=o.shift();o.push(...i.childs),!1!==t.call(e,i)&&n()}()}]]);class M9{addChild(t){t.parent=this,this.childs.push(t)}cloneTree(t=this){const e=new M9({...t.data});for(let o=0;o<t.childs.length;o++)e.addChild(this.cloneTree(t.childs[o]));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"){x9.has(e)||ce(`Traversal strategy "${e}" does not exist`),x9.get(e).call(this,t,this)}walkUp(t){const e=o=>{!1!==t.call(this,o)&&null!==o.parent&&e(o.parent)};e(this)}constructor(t){this.parent=null,this.childs=[],this.data=t}}function T9(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function H9(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,T9(t,e,"get"))}function I9(t,e,o){!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,o)}function _9(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,T9(t,e,"set"),o),o}var A9=new WeakMap,W9=new WeakMap,O9=new WeakMap;class N9{getRoots(){return Array.from(H9(this,A9).values())}getRootByColumn(t){let e;return H9(this,W9).has(t)&&(e=H9(this,A9).get(H9(this,W9).get(t))),e}getNode(t,e){const o=this.getRootByColumn(e);if(!o)return;const n=e-H9(this,W9).get(e);let i,s=0;return o.walkDown(o=>{const{origColspan:r,headerLevel:l}=o.data;if(t===l){if(n>=s&&n<=s+r-1)return i=o,i.data.isRoot=e===i.data.columnIndex,!1;s+=r}}),i}rebuildTreeIndex(){let t=0;H9(this,W9).clear(),$(H9(this,A9),([,e])=>{const{colspan:o}=e.data;for(let e=t;e<t+o;e++)H9(this,W9).set(e,t);t+=o})}buildTree(){this.clear();const t=H9(this,O9).getColumnsCount();let e=0;for(;e<t;){const t=H9(this,O9).getHeaderSettings(0,e),o=new M9({...g9(),headerLevel:0,columnIndex:e});H9(this,A9).set(e,o),this.buildLeaves(o,e,0,t.origColspan),e+=t.origColspan}this.rebuildTreeIndex()}buildLeaves(t,e,o,n=1){const i=H9(this,O9).getHeadersSettings(o,e,n);o+=1,$(i,n=>{const i=n,s={...i,headerLevel:o-1,columnIndex:e};let r;1===o?(t.data=s,r=t):(r=new M9(s),t.addChild(r)),o<H9(this,O9).getLayersCount()&&this.buildLeaves(r,e,o,i.origColspan),e+=i.origColspan})}clear(){H9(this,A9).clear(),H9(this,W9).clear()}constructor(t){I9(this,A9,{writable:!0,value:void 0}),I9(this,W9,{writable:!0,value:void 0}),I9(this,O9,{writable:!0,value:void 0}),_9(this,A9,new Map),_9(this,W9,new Map),_9(this,O9,null),_9(this,O9,t)}}function P9(t,e){const{data:o,childs:n}=t;if(o.isCollapsed)if(n.length>0){const t=n.find(({data:t})=>!t.isHidden);t&&P9(t,e)}else for(let t=0;t<o.colspan;t++)e(o.columnIndex+t);else if(0!==n.length)n.forEach(t=>P9(t,e));else for(let t=0;t<o.origColspan;t++)e(o.columnIndex+t)}function D9(t){return t.childs.length>0&&t.childs.some(({data:t})=>void 0!==t.visibleWhen)}function L9({childs:t},e){if(0!==t.length)return t[0].data[e]}function z9(t){return L9(t,"origColspan")===t.data.origColspan}function B9(t){const{data:e,childs:o}=t;if(!e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(D9(t))return e.isCollapsed=!1,{rollbackModification:()=>V9(t),affectedColumns:[],colspanCompensation:0};if(z9(t))return B9(o[0]);e.isCollapsed=!1;const n=o.filter(({data:t})=>t.clonedTree),i=new Set;let s=0;if(n.length>0)$(n,t=>{const e=t.data.clonedTree;t.replaceTreeWith(e);const o=t.data;o.clonedTree=null,s+=o.colspan,P9(t,t=>{i.add(t)})});else if(0===o.length){const{colspan:t,origColspan:o,columnIndex:n}=e;s=o-t;for(let t=1;t<o;t++)i.add(n+t)}return t.walkUp(t=>{const{data:e}=t;e.colspan+=s,e.colspan>=e.origColspan?(e.colspan=e.origColspan,e.isCollapsed=!1):z9(t)&&(e.isCollapsed=L9(t,"isCollapsed"))}),{rollbackModification:()=>V9(t),affectedColumns:Array.from(i),colspanCompensation:s}}function V9(t){const{data:e,childs:o}=t;if(e.isCollapsed||e.isHidden||e.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(D9(t))return e.isCollapsed=!0,{rollbackModification:()=>B9(t),affectedColumns:[],colspanCompensation:0};if(z9(t))return V9(o[0]);const n=new Set;let i=0;if(o.length>0){const t=o.findIndex(({data:t})=>!t.isHidden),s=o.filter((e,o)=>o>t);if(-1===t||0===s.length)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};$(s,t=>{P9(t,t=>{n.add(t)}),t.data.clonedTree=t.cloneTree(),t.walkDown(({data:t})=>{t.isHidden=!0})}),i=e.colspan-o[t].data.colspan}else{const{origColspan:t,columnIndex:o}=e,s=new Set(e.crossHiddenColumns),r=[];for(let e=o;e<o+t;e++)s.has(e)||r.push(e);if(r.length<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};$(r.slice(1),t=>{n.add(t)}),i=r.length-1}return e.isCollapsed=!0,t.walkUp(t=>{const{data:e}=t;e.colspan-=i,e.colspan<=1?(e.colspan=1,e.isCollapsed=!0):z9(t)&&(e.isCollapsed=L9(t,"isCollapsed"))}),{rollbackModification:()=>B9(t),affectedColumns:Array.from(n),colspanCompensation:i}}const F9=new Map([["collapse",V9],["expand",B9]]);function $9(t,e,o){const n=F9.get(t);return n||ce(`The node modifier action ("${t}") does not exist.`),n(e,o)}function U9(t){const e=[];return $(t,t=>{t.walkDown(t=>{const o=t.data,{origColspan:n,columnIndex:i,headerLevel:s,crossHiddenColumns:r}=o,l=function(t,e){let o;Array.isArray(t[e])?o=t[e]:(o=[],t[e]=o);return o}(e,s);let a=!1;for(let t=i;t<i+n;t++){if(r.includes(t)||a)l.push(p9());else{const t=j9(o);t.isRoot=!0,l.push(t),a=!0}}})}),function(t){for(let e=0;e<t.length;e++){const o=t[e];for(let n=0;n<o.length;n++){const i=o[n];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 o=1;o<s;o++){const i=e+o;if(t[i])for(let e=n;e<n+r&&e<t[i].length;e++)t[i][e]={label:"",isPlaceholder:!0,isRowspanPlaceholder:!0}}}}}(e),e}function j9(t){const{crossHiddenColumns:e,columnDropMode:o,...n}=g9(t);return n}function q9(t,e){t.forEach(t=>{t.walkDown(t=>{const o=t.data,{columnIndex:n,origColspan:i}=o,s=[];for(let t=n;t<n+i;t++)e.isVisible(t)||s.push(t);o.crossHiddenColumns=s,o.colspan=i-s.length,o.isHidden=0===o.colspan})})}function G9(t){const e=[];let o=0;for(;o<t.length;){const n=t[o],i=n.isPlaceholder?1:Math.max(1,n.origColspan??1);for(let t=0;t<i;t++)e[o+t]=o;o+=i}return e}function Y9(t,e,o){if(void 0!==o)return o>=0?o:-1-t;const n=e[t];return void 0===n?-1-t:n}function X9(t,e,o){const n={...t,colspan:e,origColspan:e,isPlaceholder:!1,authoredColumnIndex:o};return Array.isArray(n.headerClassNames)&&(n.headerClassNames=n.headerClassNames.slice()),Array.isArray(n.crossHiddenColumns)&&(n.crossHiddenColumns=n.crossHiddenColumns.slice()),n}function K9(t,e,o){const n=t.length>0?t[0].length:0;return t.map((t,i)=>function(t,e,o,n,i){const s=G9(t),r=t=>{const o=e.getPhysicalFromVisual(t);return Y9(o,s,i?.get(o)?.get(n))},l=[];let a=0;for(;a<o;){const e=r(a);let n=1;for(;a+n<o&&r(a+n)===e;)n+=1;const i=e>=0?t[e]:g9();l.push(X9(i,n,e));for(let t=1;t<n;t++)l.push(p9());a+=n}return l}(t,e,n,i,o))}function Z9(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Q9(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function J9(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Q9(t,e,"get"))}function t8(t,e,o){Z9(t,e),e.set(t,o)}function e8(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Q9(t,e,"set"),o),o}function o8(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function n8(t,e){Z9(t,e),e.add(t)}var i8=new WeakMap,s8=new WeakMap,r8=new WeakMap,l8=new WeakMap,a8=new WeakMap,h8=new WeakMap,c8=new WeakMap,d8=new WeakSet,u8=new WeakSet,g8=new WeakSet,p8=new WeakSet,f8=new WeakSet,m8=new WeakSet,w8=new WeakSet,b8=new WeakSet,v8=new WeakSet,C8=new WeakSet,y8=new WeakSet,S8=new WeakSet,k8=new WeakSet;class R8{setState(t){J9(this,i8).setData(t),o8(this,S8,P8).call(this);let e=!1;try{o8(this,C8,O8).call(this)}catch(t){J9(this,r8).clear(),J9(this,s8).clear(),J9(this,i8).clear(),e=!0}return o8(this,b8,A8).call(this),e}setColumnsLimit(t){J9(this,i8).setColumnsLimit(t)}setColumnArrangement(t){e8(this,h8,t)}rebuildState(){const t=o8(this,d8,E8).call(this);o8(this,C8,O8).call(this),o8(this,v8,W8).call(this),o8(this,u8,x8).call(this,t),o8(this,b8,A8).call(this)}mergeStateWith(t){const e=F(t,({row:t,...e})=>({row:t<0?this.rowCoordsToLevel(t)??t:t,...e}));o8(this,p8,T8).call(this,()=>J9(this,i8).mergeWith(e),t=>t)}mapState(t){o8(this,p8,T8).call(this,()=>J9(this,i8).map(t),t=>t)}insertColumns(t,e,o){o8(this,S8,P8).call(this),o8(this,p8,T8).call(this,()=>J9(this,i8).insertColumns(e,o),e=>e>=t?e+o:e)}removeColumns(t,e,o){const n=t+e;o8(this,S8,P8).call(this),o8(this,p8,T8).call(this,()=>{[...o].sort((t,e)=>e-t).forEach(t=>J9(this,i8).removeColumns(t,1))},o=>o<t?o:o>=n?o-e:t)}mapNodes(t){const e=[];return J9(this,r8).getRoots().forEach(o=>{o.walkDown(o=>{const n=t(o.data);void 0!==n&&e.push(n)})}),e}triggerNodeModification(t,e,o){const{actionResult:n,modified:i}=o8(this,w8,_8).call(this,t,e,o);return i&&e8(this,l8,U9(J9(this,r8).getRoots())),n}triggerColumnModification(t,e){return this.triggerNodeModification(t,-1,e)}syncVisibility(t){e8(this,a8,t),q9(J9(this,r8).getRoots(),t),e8(this,l8,U9(J9(this,r8).getRoots()))}reparentColumns(t){const e=J9(this,h8)??{getPhysicalFromVisual:t=>t},o=J9(this,i8).getData(),n=o.length,i=n>0?o[0].length:0;if(n<=1||0===i)return;const s=o.map(t=>G9(t)),r=(t,o)=>{const n=e.getPhysicalFromVisual(t);return Y9(n,s[o],J9(this,c8).get(n)?.get(o))},l=(t,o)=>Y9(e.getPhysicalFromVisual(t),s[o]),a=new Set(t),h=(t,e)=>{let o=t-1,n=t+1;for(;o>=0&&a.has(o);)o-=1;for(;n<i&&a.has(n);)n+=1;if(o<0||n>=i)return-1;const s=r(o,e);return s===r(n,e)&&s>=0?s:-1},c=[];t.forEach(t=>{const i=e.getPhysicalFromVisual(t);let r=-1;for(let e=0;e<n-1;e++){const n=h(t,e);n>=0&&"split"!==o[e][n]?.columnDropMode&&(r=e)}for(let e=0;e<n-1;e++){const o=l(t,e),n=e<=r?o8(this,y8,N8).call(this,t,e,h,l,s):o;c.push({physical:i,level:e,identity:n===o?null:n})}}),c.forEach(({physical:t,level:e,identity:o})=>{o8(this,k8,D8).call(this,t,e,o)})}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)??0),null===t||t>=this.getLayersCount()?null:J9(this,l8)[t]?.[e]??null}getHeaderTreeNodeData(t,e){const o=this.getHeaderTreeNode(t,e);return o?{...o.data}:null}getHeaderTreeNode(t,e){let o=t;if(t<0&&(o=this.rowCoordsToLevel(t)),null===o||o>=this.getLayersCount())return null;const n=J9(this,r8).getNode(o,e);return n||null}findTopMostEntireHeaderLevel(t,e=t){const o=e-t+1;let n=!1,i=null;for(let s=t;s<=e;s++){const r=J9(this,r8).getRootByColumn(s);if(!r)break;n=!0,r.walkDown(n=>{const{columnIndex:s,headerLevel:r,origColspan:l,isHidden:a}=n.data;a||l<=o&&s>=t&&s+l-1<=e&&(null===i||r<i)&&(i=r)},E9)}return n&&null===i?-1:this.levelToRowCoords(i??0)}findLeftMostColumnIndex(t,e){const{isRoot:o}=this.getHeaderSettings(t,e)??{isRoot:!0};if(o)return e;let n=e-1;for(;n>=0;){const{isRoot:e}=this.getHeaderSettings(t,n)??{isRoot:!0};if(e)break;n-=1}return n}findRightMostColumnIndex(t,e){const{isRoot:o,origColspan:n}=this.getHeaderSettings(t,e)??{isRoot:!0,origColspan:1};if(o)return e+n-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 J9(this,i8).getLayersCount()}getColumnsCount(){return J9(this,s8).getColumnsCount()}getVisibleWhenHiddenColumns(){const t=[];return J9(this,r8).getRoots().forEach(e=>{e.walkDown(e=>{const o=e.childs;if(!0!==e.data.collapsible||0===o.length)return;if(!D9(e))return;const n=!0===e.data.isCollapsed,i=o.filter(t=>{const e=t.data.visibleWhen??"expanded";return"expanded"===e&&n||"collapsed"===e&&!n});i.length===o.length&&i.shift(),i.forEach(({data:{columnIndex:e,origColspan:o}})=>{for(let n=0;n<o;n++)t.push(e+n)})})}),t}getCollapsedGroups(){const t=[];return J9(this,r8).getRoots().forEach(e=>{e.walkDown(e=>{const{isCollapsed:o,headerLevel:n,columnIndex:i,origColspan:s}=e.data;o&&t.push({headerLevel:n,columnIndex:i,origColspan:s})})}),t}clear(){e8(this,l8,[]),J9(this,i8).clear(),J9(this,s8).clear(),J9(this,r8).clear(),e8(this,a8,null),e8(this,c8,new Map)}constructor(){n8(this,d8),n8(this,u8),n8(this,g8),n8(this,p8),n8(this,f8),n8(this,m8),n8(this,w8),n8(this,b8),n8(this,v8),n8(this,C8),n8(this,y8),n8(this,S8),n8(this,k8),t8(this,i8,{writable:!0,value:void 0}),t8(this,s8,{writable:!0,value:void 0}),t8(this,r8,{writable:!0,value:void 0}),t8(this,l8,{writable:!0,value:void 0}),t8(this,a8,{writable:!0,value:void 0}),t8(this,h8,{writable:!0,value:void 0}),t8(this,c8,{writable:!0,value:void 0}),e8(this,i8,new R9),e8(this,s8,new R9),e8(this,r8,new N9(J9(this,s8))),e8(this,l8,[[]]),e8(this,a8,null),e8(this,h8,null),e8(this,c8,new Map)}}function E8(){const t=[];return J9(this,r8).getRoots().forEach(e=>{e.walkDown(e=>{const{isCollapsed:o,headerLevel:n,authoredColumnIndex:i}=e.data;o&&"number"==typeof i&&i>=0&&t.push({headerLevel:n,authoredColumnIndex:i})})}),t}function x8(t){t.forEach(({headerLevel:t,authoredColumnIndex:e})=>{const o=o8(this,g8,M8).call(this,t,e);1===o.length&&o8(this,w8,_8).call(this,"collapse",t,o[0].data.columnIndex)})}function M8(t,e){const o=[];return J9(this,r8).getRoots().forEach(n=>{n.walkDown(n=>{n.data.headerLevel===t&&n.data.authoredColumnIndex===e&&o.push(n)})}),o}function T8(t,e){const o=o8(this,f8,H8).call(this);t(),o8(this,C8,O8).call(this),o8(this,v8,W8).call(this),o8(this,m8,I8).call(this,o,e),o8(this,b8,A8).call(this)}function H8(){const t=[];return J9(this,r8).getRoots().forEach(e=>{e.walkDown(e=>{const o=e.data;o.isCollapsed&&t.push({headerLevel:o.headerLevel,columnIndex:o.columnIndex})})}),t}function I8(t,e){t.forEach(({headerLevel:t,columnIndex:o})=>{o8(this,w8,_8).call(this,"collapse",t,e(o))})}function _8(t,e,o){e<0&&(e=this.rowCoordsToLevel(e)??0);const n=J9(this,r8).getNode(e,o);return n?{actionResult:$9(t,n,o)??void 0,modified:!0}:{actionResult:void 0,modified:!1}}function A8(){o8(this,v8,W8).call(this),e8(this,l8,U9(J9(this,r8).getRoots()))}function W8(){J9(this,a8)&&q9(J9(this,r8).getRoots(),J9(this,a8))}function O8(){const t=J9(this,h8)??{getPhysicalFromVisual:t=>t};J9(this,s8).setNormalizedData(K9(J9(this,i8).getData(),t,J9(this,c8))),J9(this,r8).buildTree()}function N8(t,e,o,n,i){const s=o(t,e);if(s>=0)return s;const r=o(t,e+1);return r>=0?i[e][r]:n(t,e)}function P8(){e8(this,c8,new Map)}function D8(t,e,o){if(null===o){const o=J9(this,c8).get(t);return o?.delete(e),void(0===o?.size&&J9(this,c8).delete(t))}J9(this,c8).has(t)||J9(this,c8).set(t,new Map),J9(this,c8).get(t).set(e,o)}function L8(t){return{isVisible(e){const o=t.columnIndexMapper.getPhysicalFromVisualIndex(e);return null!==o&&!t.columnIndexMapper.isHidden(o)}}}function z8(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function B8(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 V8=new WeakSet,F8=new WeakSet,$8=new WeakSet,U8=new WeakSet;class j8{setLayersCount(t){return this.layersCount=t,this}getWidth(t){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(t))}buildWidthsMap(){const t=z8(this,V8,q8).call(this),e=t.size>0,o=this.hot.getCurrentThemeName(),n=new Map;e&&t.forEach(t=>{const e=this.widthsMap.getValueAtIndex(t);null!=e&&n.set(t,e)}),this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize","htNestedHeaders"),o&&this.container.classList.add(o),z8(this,F8,G8).call(this,this.container),this.hot.rootDocument.body.appendChild(this.container);const i=this.container.querySelector('[data-ghost-table="rendered"]');if(!i)return this.container.remove(),void(this.container=null);const s=i.querySelectorAll("th[data-column]"),r=new Map;for(let t=0;t<s.length;t++){const e=s[t];if(e.colSpan>1)continue;if(void 0===e.dataset.column)continue;const o=Number.parseInt(e.dataset.column,10);r.set(o,e)}this.widthsMap.clear(),r.forEach((o,i)=>{const s=this.hot.toPhysicalColumn(i);if(this.hot.columnIndexMapper.isHidden(s))return;let r;e&&t.has(s)&&(r=n.get(s)),null==r&&(r=o.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}){B8(this,V8),B8(this,F8),B8(this,$8),B8(this,U8),this.layersCount=0,this.hot=t,this.headersStateManager=e,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}}function q8(){const t=new Set,e=this.hot.countCols();for(let o=0;o<e;o++){const e=this.headersStateManager.getHeaderTreeNode(-1,o);if(!e)continue;let n=!1;e.walkUp(t=>{if(!0===t.data.isCollapsed)return n=!0,!1}),n&&t.add(this.hot.toPhysicalColumn(o))}return t}function G8(t){const e=this.hot.getSettings(),o=!!e.dropdownMenu,n=!!e.collapsibleColumns,i=this.hot.countCols();t.innerHTML=z8(this,$8,Y8).call(this,i,o,n)}function Y8(t,e,o){let n="";for(let i=0;i<this.layersCount;i++){let s="";for(let n=0;n<t;n++){const t=this.headersStateManager.getHeaderSettings(i,n);if(t&&!t.isPlaceholder&&!t.isHidden&&!t.isRowspanPlaceholder){const i=(t.rowspan??0)>1?` rowspan="${t.rowspan}"`:"";s+=`<th data-column="${n}" colspan="${t.colspan}"${i}>${z8(this,U8,X8).call(this,t,e,o)}</th>`}}n+=`<tr>${s}</tr>`}return`<table data-ghost-table="rendered"><thead>${n}</thead></table>`}function X8(t,e,o){const n=String(t.label);return`<div class="relative"><span class="colHeader">${Co.test(n)?Mp(this.hot,n,"header"):n}</span>${e?'<button class="changeType"></button>':""}${o&&(t.origColspan>1||t.colspan>1)?'<div class="collapsibleIndicator expanded">-</div>':""}</div>`}function K8(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z8(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Q8(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Z8(t,e,"get"))}function J8(t,e,o){K8(t,e),e.set(t,o)}function ttt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Z8(t,e,"set"),o),o}function ett(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function ott(t,e){K8(t,e),e.add(t)}const ntt="nestedHeaders";var itt=new WeakMap,stt=new WeakMap,rtt=new WeakMap,ltt=new WeakMap,att=new WeakMap,htt=new WeakMap,ctt=new WeakMap,dtt=new WeakSet,utt=new WeakSet,gtt=new WeakMap,ptt=new WeakMap,ftt=new WeakMap,mtt=new WeakMap,wtt=new WeakMap,btt=new WeakMap,vtt=new WeakMap,Ctt=new WeakMap,ytt=new WeakSet,Stt=new WeakSet,ktt=new WeakMap,Rtt=new WeakSet,Ett=new WeakSet,xtt=new WeakSet,Mtt=new WeakSet,Ttt=new WeakMap,Htt=new WeakMap,Itt=new WeakMap,_tt=new WeakMap,Att=new WeakMap,Wtt=new WeakMap,Ott=new WeakMap,Ntt=new WeakMap,Ptt=new WeakMap,Dtt=new WeakMap,Ltt=new WeakMap,ztt=new WeakMap,Btt=new WeakMap,Vtt=new WeakSet,Ftt=new WeakSet,$tt=new WeakMap,Utt=new WeakMap,jtt=new WeakMap,qtt=new WeakMap,Gtt=new WeakMap,Ytt=new WeakMap,Xtt=new WeakMap,Ktt=new WeakMap,Ztt=new WeakMap;class Qtt extends pW{static get PLUGIN_KEY(){return ntt}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[ntt]}enablePlugin(){if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Xe(X`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
|
|
123
|
+
passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",Q8(this,Gtt)),this.addHook("afterLoadData",Q8(this,Ytt)),this.addHook("afterCreateCol",Q8(this,Xtt)),this.addHook("afterRemoveCol",Q8(this,Ktt)),this.addHook("beforeColumnMove",Q8(this,ctt)),this.addHook("afterColumnMove",Q8(this,htt)),this.addHook("beforeOnCellMouseDown",Q8(this,_tt)),this.addHook("afterOnCellMouseDown",Q8(this,Att)),this.addHook("beforeOnCellMouseOver",Q8(this,Wtt)),this.addHook("afterOnCellMouseOver",Q8(this,Ott)),this.addHook("beforeOnCellMouseUp",Q8(this,Ntt)),this.addHook("beforeSelectionHighlightSet",Q8(this,Ptt)),this.addHook("modifyTransformStart",Q8(this,Dtt)),this.addHook("afterSelection",Q8(this,ktt)),this.addHook("afterSelectionFocusSet",Q8(this,ktt)),this.addHook("beforeViewportScrollHorizontally",Q8(this,Ttt)),this.addHook("afterGetColumnHeaderRenderers",Q8(this,ztt)),this.addHook("modifyColWidth",Q8(this,$tt)),this.addHook("modifyColumnHeaderHeight",Q8(this,Utt)),this.addHook("modifyColumnHeaderValue",Q8(this,jtt)),this.addHook("beforeHighlightingColumnHeader",Q8(this,Htt)),this.addHook("beforeCopy",Q8(this,Itt)),this.addHook("beforeSelectColumns",Q8(this,Ltt)),this.addHook("beforeViewRender",Q8(this,Ztt)),this.addHook("afterViewportColumnCalculatorOverride",Q8(this,Btt)),this.addHook("modifyFocusedElement",Q8(this,qtt)),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",Q8(this,att)),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",Q8(this,ktt)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",Q8(this,ktt)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:t}=this.hot.getSettings();var e;ttt(this,wtt,null),ttt(this,btt,null),Q8(this,itt).setColumnsLimit(this.hot.countCols()),Q8(this,itt).setColumnArrangement((e=this.hot,{getPhysicalFromVisual(t){const o=e.columnIndexMapper.getPhysicalFromVisualIndex(t);return null===o?t:o}})),Array.isArray(t)&&(this.detectedOverlappedHeaders=Q8(this,itt).setState(t)),ttt(this,Ctt,Q8(this,itt).mapNodes(({origRowspan:t})=>t>1||void 0).length>0),Q8(this,Ctt)?po(this.hot.rootElement,"htHasRowspanHeaders"):fo(this.hot.rootElement,"htHasRowspanHeaders"),this.detectedOverlappedHeaders&&Xe(X`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
|
|
124
|
+
is currently not supported.`),this.enabled&&Q8(this,itt).syncVisibility(L8(this.hot)),ttt(this,vtt,!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",Q8(this,ktt)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",Q8(this,ktt)),this.hot.columnIndexMapper.removeLocalHook("cacheUpdated",Q8(this,att)),this.clearColspans(),Q8(this,itt).clear(),ttt(this,wtt,null),ttt(this,btt,null),fo(this.hot.rootElement,"htHasRowspanHeaders"),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return Q8(this,itt)}getLayersCount(){return Q8(this,itt).getLayersCount()}getHeaderSettings(t,e){return Q8(this,itt).getHeaderSettings(t,e)}clearColspans(){if(!this.hot.view)return;const{_wt:t}=this.hot.view,e=t.getSetting("columnHeaders").length,o=t.wtTable.THEAD,n=t.wtOverlays.topOverlay.clone?.wtTable.THEAD,i=t.wtOverlays.topInlineStartCornerOverlay?.clone?.wtTable.THEAD??null;if(o&&n)for(let t=0;t<e;t++){const e=o.childNodes[t];if(!e)break;const s=n.childNodes[t],r=i?i.childNodes[t]:null;for(let t=0,o=e.childNodes.length;t<o;t++){const o=e.childNodes[t];if(o.removeAttribute("colspan"),o.removeAttribute("rowspan"),o.style.display="",fo(o,"hiddenHeader"),s&&s.childNodes[t]){const e=s.childNodes[t];e.removeAttribute("colspan"),e.removeAttribute("rowspan"),e.style.display="",fo(e,"hiddenHeader")}if(i&&r&&r.childNodes[t]){const e=r.childNodes[t];e.removeAttribute("colspan"),e.removeAttribute("rowspan"),e.style.display="",fo(e,"hiddenHeader")}}}}headerRendererFactory(t){const e=this.hot.view._wt.getSetting("fixedColumnsStart");return(o,n)=>{const{columnIndexMapper:i}=this.hot;let s=i.getVisualFromRenderableIndex(o);null===s&&(s=o),n.removeAttribute("colspan"),n.removeAttribute("rowspan"),n.style.display="",fo(n,"hiddenHeader"),fo(n,"hiddenHeaderText"),fo(n,"htRowspanHeader"),fo(n,"htRowspanBottomLevel");const r=Q8(this,itt).getHeaderSettings(t,s)??{},{colspan:l,rowspan:a,isHidden:h,isPlaceholder:c,isRowspanPlaceholder:d,headerClassNames:u}=r;d?(po(n,"hiddenHeader"),n.style.display="none"):c||h?po(n,"hiddenHeader"):(ett(this,ytt,eet).call(this,n,l,s,o,e),ett(this,Stt,oet).call(this,n,a,t)),this.hot.view.appendColHeader(s,n,(t,e)=>this.getColumnHeaderValue(t,e),t);if(t+(a??1)===this.getLayersCount()||fo(n,["beforeHiddenColumn","afterHiddenColumn"]),!c&&!h&&!d){const t=n.querySelector("div.relative");t&&u&&u.length>0&&(fo(t,this.hot.getColumnMeta(s).headerClassName??[]),po(t,u))}}}getColumnHeaderValue(t,e){const{isHidden:o,isPlaceholder:n,isRowspanPlaceholder:i}=Q8(this,itt).getHeaderSettings(e,t)??{};return n||o||i?"":this.hot.getColHeader(t,e)}destroy(){Q8(this,itt).clear(),fo(this.hot.rootElement,"htHasRowspanHeaders"),super.destroy()}_getHeaderTreeNodeDataByCoords(t){if(!(t.row>=0||t.col<0))return Q8(this,itt).getHeaderTreeNodeData(t.row,t.col)}constructor(...t){super(...t),ott(this,dtt),ott(this,utt),ott(this,ytt),ott(this,Stt),ott(this,Rtt),ott(this,Ett),ott(this,xtt),ott(this,Mtt),ott(this,Vtt),ott(this,Ftt),J8(this,itt,{writable:!0,value:void 0}),J8(this,stt,{writable:!0,value:void 0}),J8(this,rtt,{writable:!0,value:void 0}),J8(this,ltt,{writable:!0,value:void 0}),J8(this,att,{writable:!0,value:void 0}),J8(this,htt,{writable:!0,value:void 0}),J8(this,ctt,{writable:!0,value:void 0}),J8(this,gtt,{writable:!0,value:void 0}),J8(this,ptt,{writable:!0,value:void 0}),J8(this,ftt,{writable:!0,value:void 0}),J8(this,mtt,{writable:!0,value:void 0}),J8(this,wtt,{writable:!0,value:void 0}),J8(this,btt,{writable:!0,value:void 0}),J8(this,vtt,{writable:!0,value:void 0}),J8(this,Ctt,{writable:!0,value:void 0}),J8(this,ktt,{writable:!0,value:void 0}),J8(this,Ttt,{writable:!0,value:void 0}),J8(this,Htt,{writable:!0,value:void 0}),J8(this,Itt,{writable:!0,value:void 0}),J8(this,_tt,{writable:!0,value:void 0}),J8(this,Att,{writable:!0,value:void 0}),J8(this,Wtt,{writable:!0,value:void 0}),J8(this,Ott,{writable:!0,value:void 0}),J8(this,Ntt,{writable:!0,value:void 0}),J8(this,Ptt,{writable:!0,value:void 0}),J8(this,Dtt,{writable:!0,value:void 0}),J8(this,Ltt,{writable:!0,value:void 0}),J8(this,ztt,{writable:!0,value:void 0}),J8(this,Btt,{writable:!0,value:void 0}),J8(this,$tt,{writable:!0,value:void 0}),J8(this,Utt,{writable:!0,value:void 0}),J8(this,jtt,{writable:!0,value:void 0}),J8(this,qtt,{writable:!0,value:void 0}),J8(this,Gtt,{writable:!0,value:void 0}),J8(this,Ytt,{writable:!0,value:void 0}),J8(this,Xtt,{writable:!0,value:void 0}),J8(this,Ktt,{writable:!0,value:void 0}),J8(this,Ztt,{writable:!0,value:void 0}),ttt(this,itt,new R8),ttt(this,stt,!1),ttt(this,rtt,null),ttt(this,ltt,null),ttt(this,att,({indexesSequenceChanged:t,hiddenIndexesChanged:e})=>{if(!this.enabled)return;(t&&"move"===this.hot.columnIndexMapper.indexesChangeSource||Q8(this,stt))&&(ett(this,dtt,Jtt).call(this),Q8(this,itt).rebuildState(),ttt(this,stt,!1),ttt(this,rtt,null),ttt(this,ltt,null)),Q8(this,itt).syncVisibility(L8(this.hot)),e&&this.ghostTable.buildWidthsMap()}),ttt(this,htt,()=>{this.enabled&&this.hot.columnIndexMapper.isBatched&&ttt(this,stt,!0)}),ttt(this,ctt,(t,e,o,n)=>{this.enabled&&!1!==n&&(ttt(this,rtt,t.map(t=>this.hot.toPhysicalColumn(t))),ttt(this,ltt,this.hot.columnIndexMapper.getIndexesSequence()))}),ttt(this,gtt,null),ttt(this,ptt,!1),ttt(this,ftt,null),ttt(this,mtt,null),ttt(this,wtt,null),ttt(this,btt,null),ttt(this,vtt,!1),this.ghostTable=new j8({hot:this.hot,headersStateManager:Q8(this,itt)}),this.detectedOverlappedHeaders=!1,ttt(this,Ctt,!1),ttt(this,ktt,()=>{const t=this.hot?.getSelectedRangeActive();if(!t)return;const{highlight:e}=t;if(null!==e.row&&null!==e.col&&e.isHeader()&&e.col>=0&&null!==e.row&&null!==e.col){const{isRowspanPlaceholder:t}=Q8(this,itt).getHeaderSettings(e.row,e.col)??{},o=t?ett(this,Rtt,net).call(this,e.row,e.col):e.row,n=Q8(this,itt).findLeftMostColumnIndex(o,e.col),i=this.hot.selection.highlight.getFocus(),s=i.visualCellRange;if(null===s)return;s.highlight.row=o,s.highlight.col=n,s.from.row=o,s.from.col=n,s.to.row=o,s.to.col=n,i.commit()}}),ttt(this,Ttt,(t,e)=>{const o=this.hot.getSelectedRangeActive();if(!o)return t;const{highlight:n}=o,{navigableHeaders:i}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),r=i?n.row:Q8(this,mtt)?.row,l=s?t:n.col,a=null!=r&&null!=l&&r<0&&l>=0;if(ttt(this,mtt,null),!a||null==r||null==l)return t;const h=this.hot.getFirstFullyVisibleColumn(),c=this.hot.getLastFullyVisibleColumn(),d=c-h+1,u=Q8(this,itt).findLeftMostColumnIndex(r,l),g=Q8(this,itt).findRightMostColumnIndex(r,l),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}),ttt(this,Htt,(t,e,o)=>{const n=Q8(this,itt).getHeaderTreeNodeData(e,t);if(!n)return t;const{columnCursor:i,selectionType:s,selectionWidth:r}=o,{isRoot:l,colspan:a=1}=Q8(this,itt).getHeaderSettings(e,t)??{};if(s===Ph){if(!l)return n.columnIndex}else if(s===Nh&&(a>r-i||!l))return null;return t}),ttt(this,Itt,(t,e,{columnHeadersCount:o})=>{if(0!==o)for(let o=0;o<e.length;o++){const{startRow:n,startCol:i,endRow:s,endCol:r}=e[o],l=s-n+1;if(n>=0||1===i-r+1)break;for(let e=i;e<=r;e++)for(let o=n;o<=s;o++){const n=l+o,s=e-i;if(0===s)continue;const r=Q8(this,itt).getHeaderTreeNodeData(o,e)?.isRoot;!1===r&&(t[n][s]="")}}}),ttt(this,_tt,(t,e,o,n)=>{ttt(this,wtt,null),ttt(this,btt,null);this._getHeaderTreeNodeDataByCoords(e)&&(n.column=!0)}),ttt(this,Att,(t,e)=>{if(null===e.row||null===e.col)return;const o={row:e.row,col:e.col},n=this._getHeaderTreeNodeDataByCoords(o);if(!n)return;ttt(this,gtt,{row:e.row,col:e.col,clone:()=>e.clone()}),ttt(this,ptt,!0);const{selection:i}=this.hot,s=i.isSelected()?i.getSelectedRange().current():null;let r=null;const{columnIndex:l,origColspan:a}=n,h=!i.inInSelection(e);t.shiftKey&&s?r=(e.col??0)<(s.from.col??0)?[s.getTopEndCorner().col??0,l,e.row??0]:(e.col??0)>(s.from.col??0)?[s.getTopStartCorner().col??0,l+a-1,e.row??0]:[l,l+a-1,e.row??0]:(wn(t)||mn(t)&&h||function(t){return"undefined"!=typeof TouchEvent&&t instanceof TouchEvent}(t))&&(r=[l,l+a-1,e.row]),null!==r&&i.selectColumns(...r)}),ttt(this,Wtt,(t,e,o,n)=>{if(ttt(this,ftt,null),!this.hot.view.isMouseDown()||n.column)return;const i=this._getHeaderTreeNodeDataByCoords(e);if(!i)return;const{columnIndex:s,origColspan:r}=i,l=this.hot.getSelectedRangeActive();if(!l)return;const a=l.getTopStartCorner(),h=l.getBottomEndCorner(),{from:c}=l;n.column=!0,n.cell=!0;const d=ds(e.row??0,-1/0,-1);let u;u=(e.col??0)<(c.col??0)?[h.col??0,s,d]:(e.col??0)>(c.col??0)?[a.col??0,s+r-1,d]:[s,s+r-1,d],ttt(this,ftt,u)}),ttt(this,Ott,()=>{if(null===Q8(this,ftt))return;const t=Q8(this,ftt);ttt(this,ftt,null),this.hot.selection.selectColumns(...t)}),ttt(this,Ntt,()=>{ttt(this,ptt,!1)}),ttt(this,Ptt,()=>{const{navigableHeaders:t}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!Q8(this,ptt)||!t)return;const e=this.hot.getSelectedRangeLast();if(!e)return;const o=e.getTopStartCorner().col,n=e.getBottomEndCorner().col,i=Q8(this,itt).getHeaderTreeNodeData(Q8(this,gtt).row,Q8(this,gtt).col);if(!i)return;const{columnIndex:s,origColspan:r}=i;if(e.setHighlight(Q8(this,gtt)),null!==o&&null!==n&&(r>e.getWidth()||s<o||s+r-1>n)){const t=Q8(this,itt).findTopMostEntireHeaderLevel(ds(o,s,s+r-1),ds(n,s,s+r-1));e.highlight.row=t,e.highlight.col=e.from.col}}),ttt(this,Dtt,t=>{const e=this.hot.getSelectedRangeActive();if(!e)return;const{highlight:o}=e,{row:n,col:i}=Q8(this,btt)??{};Number.isInteger(n)&&Number.isInteger(i)&&(o.row===n&&o.col===i||ttt(this,wtt,null));const s=o.row??0,r=o.col??0,l=t.row,a=t.col;let h=r+t.col,c=s+t.row;if(0!==t.row&&h>=0){const e=Math.sign(t.row),o=-1,n=-this.getLayersCount();let i=c;for(;i<=o&&i>=n;){const{isRowspanPlaceholder:t}=Q8(this,itt).getHeaderSettings(i,h)??{};if(!t)break;i+=e}t.row=i-s,c=i}if(0===l&&0!==a&&s<0){if(null!==Q8(this,wtt)){const t=ett(this,Mtt,ret).call(this,Q8(this,wtt),h,Math.sign(a));null!==t&&(h=t,c=Q8(this,wtt))}h<0&&a<0&&null!==Q8(this,wtt)&&(c=Q8(this,wtt));const e=Q8(this,itt).findLeftMostColumnIndex(s,r),o=Q8(this,itt).findRightMostColumnIndex(s,r),{isRowspanPlaceholder:n}=Q8(this,itt).getHeaderSettings(c,h)??{};c===s&&h>=e&&h<=o||c===s&&n&&a>0&&s<-1||(c=ett(this,Rtt,net).call(this,c,h)),t.row=c-s;ett(this,Ett,iet).call(this,c,h)>1&&!Number.isInteger(Q8(this,wtt))&&ttt(this,wtt,function(t,e,o,n){if(t<=o)return t;for(let o=t+1;o<=-1;o++){const t=n(o,e);if(!t)continue;const{isPlaceholder:i,isRowspanPlaceholder:s,isHidden:r}=t;if(!i&&!s&&!r)return o}return t}(s,h,-this.getLayersCount(),(t,e)=>{const o=Q8(this,itt).getHeaderSettings(t,e);return o?{...o,isRowspanPlaceholder:o.isRowspanPlaceholder??!1}:null}))}const d=this.hot._createCellCoords(c,h),u=d.isHeader()&&(d.col??-1)>=0;if(u&&0===l||ttt(this,wtt,null),u&&null!==o.row&&null!==o.col&&null!==d.row&&null!==d.col){const{isRowspanPlaceholder:e}=Q8(this,itt).getHeaderSettings(o.row,o.col)??{},{isRowspanPlaceholder:n}=Q8(this,itt).getHeaderSettings(d.row,d.col)??{};let i=Q8(this,itt).findLeftMostColumnIndex(d.row,d.col),s=Q8(this,itt).findRightMostColumnIndex(d.row,d.col);if(n){const t=ett(this,Rtt,net).call(this,d.row,d.col);i=Q8(this,itt).findLeftMostColumnIndex(t,d.col),s=Q8(this,itt).findRightMostColumnIndex(t,d.col)}if(e){const t=ett(this,Rtt,net).call(this,o.row,o.col);i=Q8(this,itt).findLeftMostColumnIndex(t,o.col),s=Q8(this,itt).findRightMostColumnIndex(t,o.col),a<0?i=Math.max(i,Math.min(o.col,d.col)):a>0&&(s=Math.min(s,Math.max(o.col,d.col)))}if(t.col<0){const e=o.col>=i&&o.col<=s?i-1:s,n=this.hot.columnIndexMapper.getNearestNotHiddenIndex(e,-1);t.col=null===n?-this.hot.view.countRenderableColumnsInRange(0,o.col):-Math.max(this.hot.view.countRenderableColumnsInRange(n,o.col)-1,1)}else if(t.col>0){const n=o.col>=i&&o.col<=s?s+1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);null===r?(t.col=this.hot.view.countRenderableColumnsInRange(o.col,this.hot.countCols()),e&&(t.col+=1,o.row<-1&&(t.row=1,t.col=-(o.col+1)))):t.col=Math.max(this.hot.view.countRenderableColumnsInRange(o.col,r)-1,1)}}ttt(this,btt,{row:s+t.row,col:r+t.col})}),ttt(this,Ltt,(t,e,o)=>{const n=t.row,i=this._getHeaderTreeNodeDataByCoords({row:n,col:t.col}),s=this._getHeaderTreeNodeDataByCoords({row:n,col:e.col});ttt(this,mtt,o.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))}),ttt(this,ztt,t=>{if(Q8(this,itt).getLayersCount()>0){t.length=0;for(let e=0;e<Q8(this,itt).getLayersCount();e++)t.push(this.headerRendererFactory(e))}}),ttt(this,Btt,t=>{ett(this,Vtt,aet).call(this,t),ett(this,Ftt,het).call(this,t)}),ttt(this,$tt,(t,e)=>{if(!1===this.hot.getSettings().autoColumnSize)return t;const o=this.ghostTable.getWidth(e)??0;return t>o?t:o}),ttt(this,Utt,()=>{if(!Q8(this,Ctt))return;const t=this.hot.rootWindow.getComputedStyle(this.hot.rootElement),e=Number.parseFloat(t.getPropertyValue("--ht-cell-vertical-padding")),o=Number.parseFloat(t.getPropertyValue("--ht-line-height")),n=Math.round(2*e+o+1);return Number.isFinite(n)?new Array(this.getLayersCount()).fill(n):void 0}),ttt(this,jtt,(t,e,o)=>{const{label:n}=Q8(this,itt).getHeaderTreeNodeData(o,e)??{label:""};return n}),ttt(this,qtt,(t,e)=>{if(t<0)return this.hot.getCell(t,Q8(this,itt).findLeftMostColumnIndex(t,e),!0)??void 0}),ttt(this,Gtt,()=>{this.updatePlugin()}),ttt(this,Ytt,(t,e)=>{e||this.updatePlugin()}),ttt(this,Xtt,(t,e)=>{const o=this.hot.columnIndexMapper.getPhysicalFromVisualIndex(t)??t;Q8(this,itt).insertColumns(t,o,e),ttt(this,vtt,!0)}),ttt(this,Ktt,(t,e,o)=>{Q8(this,itt).removeColumns(t,e,o),ttt(this,vtt,!0)}),ttt(this,Ztt,()=>{Q8(this,vtt)&&(this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),ttt(this,vtt,!1))})}}function Jtt(){const t=Q8(this,rtt),e=Q8(this,ltt);if(null===t||null===e)return;const o=this.hot.columnIndexMapper.getIndexesSequence();if(e.length===o.length&&e.every((t,e)=>t===o[e]))return;if(!ett(this,utt,tet).call(this,t,e,o))return;const n=[];t.forEach(t=>{const e=this.hot.columnIndexMapper.getVisualFromPhysicalIndex(t);null!==e&&n.push(e)}),Q8(this,itt).reparentColumns(n)}function tet(t,e,o){const n=new Set(t),i=e.filter(t=>!n.has(t)),s=o.filter(t=>!n.has(t));return i.length===s.length&&i.every((t,e)=>t===s[e])}function eet(t,e,o,n,i){if(void 0===e||e<=1)return;const{wtOverlays:s}=this.hot.view._wt,r=s.topInlineStartCornerOverlay?.clone?.wtTable.THEAD?.contains(t),l=s.inlineStartOverlay?.clone?.wtTable.THEAD?.contains(t),a=s.topOverlay?.clone?.wtTable.THEAD?.contains(t);a&&o<i&&po(t,"hiddenHeaderText");const h=r||l?Math.min(e,i-n):e;h>1&&t.setAttribute("colspan",String(h))}function oet(t,e,o){if(void 0===e||e<=1)return;const n=o+e===this.getLayersCount();po(t,"htRowspanHeader"),n&&po(t,"htRowspanBottomLevel"),t.setAttribute("rowspan",String(e))}function net(t,e){const o=-this.getLayersCount();for(let n=t;n>=o;n--){const{isRowspanPlaceholder:t}=Q8(this,itt).getHeaderSettings(n,e)??{};if(!t)return n}return t}function iet(t,e){const o=Q8(this,itt).findLeftMostColumnIndex(t,e),{rowspan:n=1}=Q8(this,itt).getHeaderSettings(t,o)??{};return n}function set(t,e){const o=Q8(this,itt).getHeaderSettings(t,e);if(!o)return!1;const{isPlaceholder:n,isRowspanPlaceholder:i,isHidden:s}=o;return i?t<-1:!n&&!i&&!s}function ret(t,e,o){if(![-1,1].includes(o))return null;for(let n=e;n>=0&&n<this.hot.countCols();n+=o)if(ett(this,xtt,set).call(this,t,n))return n;return null}function aet(t){const e=Q8(this,itt).getLayersCount();let o=t.startColumn,n=!!e;for(let i=0;i<e;i++){const e=Q8(this,itt).findLeftMostColumnIndex(i,t.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(e);if(e>=0&&(n=!1),is(s)&&null!==s&&s<t.startColumn){o=s;break}}t.startColumn=n?Q8(this,itt).getHeaderTreeNodeData(0,o)?.columnIndex??o:o}function het(t){const e=this.hot.columnIndexMapper,o=Q8(this,itt).getLayersCount(),n=e.getVisualFromRenderableIndex(t.endColumn);if(null!==n)for(let i=0;i<o;i++){const o=Q8(this,itt).findRightMostColumnIndex(i,n),s=e.getNearestNotHiddenIndex(o,-1),r=null===s?null:e.getRenderableFromVisualIndex(s);if(null!==r&&r>t.endColumn){t.endColumn=r;break}}}class cet{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},as(0,this.data.length-1,t=>{this.cacheNode(this.data[t],0,null)})}cacheNode(t,e,o){t&&"object"==typeof t&&(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:o,row:this.cache.rows.length-1,level:e}),this.hasChildren(t)&&t.__children&&$(t.__children,o=>{this.cacheNode(o,e+1,t)}))}getDataObject(t){return null==t?null:this.cache.rows[t]}readTreeNodes(t,e,o,n){let i=!1,s=e;if("number"!=typeof s)return s;let r=t;return r||(r={__children:this.data},i=!0,s-=1),null!=o&&s===o?{result:r,end:!0}:null!=n&&r===n?{result:s,end:!0}:(s+=1,r.__children&&$(r.__children,t=>{if(this.parentReference.set(t,i?null:r),s=this.readTreeNodes(t,s,o,n),"number"!=typeof s)return!1}),s)}mockParent(){const t=this.mockNode();return t.__children=this.data,t}mockNode(){const t={};return ke(this.data[0],(e,o)=>{t[o]=null}),t}getRowIndex(t){if(null==t||"object"!=typeof t)return null;const e=this.cache.nodeInfo.get(t);return e?e.row:null}getRowIndexWithinParent(t){let e=null;e="number"!=typeof t?t:this.getDataObject(t);const o=this.getRowParent(t);return null==o?this.data.indexOf(e):o.__children.indexOf(e)}countAllRows(){const t={__children:this.data};return this.countChildren(t)}countChildren(t){let e=0;const o="number"==typeof t?this.getDataObject(t):t;return o&&o.__children?($(o.__children,t=>{e+=1,t.__children&&(e+=this.countChildren(t))}),e):0}getRowParent(t){let e;return e="number"!=typeof t?t:this.getDataObject(t),this.getRowObjectParent(e)}getRowObjectParent(t){if(!t||"object"!=typeof t)return null;const e=this.cache.nodeInfo.get(t);return e?e.parent:null}getRowLevel(t){let e=null;return e="number"!=typeof t?t:this.getDataObject(t),e?this.getRowObjectLevel(e):null}getRowObjectLevel(t){if(null==t||"object"!=typeof t)return null;const e=this.cache.nodeInfo.get(t);return e?e.level:null}hasChildren(t){const e="number"==typeof t?this.getDataObject(t):t;return!!(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){const e="number"==typeof t?this.getDataObject(t):t;return!(!e||!e.__children||0===e.__children.length)}addChild(t,e){let o=e;this.hot.runHooks("beforeAddChild",t,o);let n=null;t&&(n=this.getRowIndex(t)),this.hot.runHooks("beforeCreateRow",n+this.countChildren(t)+1,1);let i=t;t||(i=this.mockParent()),i.__children||(i.__children=[]),o||(o=this.mockNode()),i.__children.push(o),this.rewriteCache();const s=this.getRowIndex(o)??0;this.hot.rowIndexMapper.insertIndexes(s,1),this.hot.runHooks("afterCreateRow",s,1),this.hot.runHooks("afterAddChild",t,o)}addChildAtIndex(t,e,o){let n,i=o;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",t,i,e),t){const o=this.getRowIndex(t)??0,s=o+e+1;this.hot.runHooks("beforeCreateRow",s,1),t.__children.splice(e,0,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(o,"__children",t.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(s,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",s,1),n=s}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",e,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),n=this.getRowIndex(this.data[e])??0;i=this.getDataObject(n)??null,this.hot.runHooks("afterAddChild",t,i,e)}addSibling(t,e="below"){const o=this.translateTrimmedRow(t),n=this.getRowParent(o),i=this.getRowIndexWithinParent(o);switch(e){case"below":this.addChildAtIndex(n,i+1,null);break;case"above":this.addChildAtIndex(n,i,null)}}detachFromParent(t,e=!0){let o=null;const n=[];if(Array.isArray(t)?(as(t[0],t[2],t=>{const e=this.translateTrimmedRow(t);n.push(this.getDataObject(e))}),as(0,n.length-2,t=>{const e=n[t];null!=e&&this.detachFromParent(e,!1)}),o=n[n.length-1]??null):o=t,!o)return;const i=this.getRowIndex(o)??0,s=this.countChildren(o),r=this.getRowIndexWithinParent(o),l=this.getRowParent(o),a=this.getRowParent(l),h=this.getRowIndex(a)??0;let c=null;if(this.hot.runHooks("beforeDetachChild",l,o),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),l.__children.splice(r,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,s+1,t,this.plugin.pluginName),a){c=h+this.countChildren(a);const t=this.getChild(a,this.countChildren(a)-1),e=this.getRowIndex(t)??0;this.hot.runHooks("beforeCreateRow",e+1,s+1,this.plugin.pluginName),a.__children.push(o)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,s+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,s+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,o,this.getRowIndex(o)),e&&this.hot.render()}filterData(t,e,o){const n=[];$(o,t=>{const e=this.getDataObject(t);null!=e&&n.push(e)}),$(n,t=>{const e=this.getRowIndexWithinParent(t),o=this.getRowParent(t);null===o?this.data.splice(e,1):o.__children.splice(e,1)}),this.rewriteCache()}spliceData(t,e,o){const n=this.getDataObject(t-1);let i=null,s=t;n&&n.__children&&0===n.__children.length?(i=n,s=0):t<this.countAllRows()&&(i=this.getRowParent(t),s=this.getRowIndexWithinParent(t)),i?o?i.__children.splice(s,e,...o):i.__children.splice(s,e):o?this.data.splice(s,e,...o):this.data.splice(s,e),this.rewriteCache()}syncRowWithRawSource(t){let e=t,o=e;do{o=this.getRowParent(o),null!==o&&(e=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(t,e,o,n){const i=e===this.hot.countRows(),s=this.getRowParent(t),r=this.getRowIndexWithinParent(t),l=s.__children.slice(r,r+1),a=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||o||n?h.__children.length:this.getRowIndexWithinParent(e),d=s===h;h.__children.splice(c,0,l[0]),s.__children.splice(r+(a&&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 det{constructor(t,e){this.hot=e,this.plugin=t}}class uet extends det{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 o=this.hot.toPhysicalRow(t),n=this.dataManager.getDataObject(o);if(!n)return;const i=this.dataManager.getRowLevel(o),s=e.getElementsByTagName("DIV")[0],r=s.querySelector("span.rowHeader"),l=s.querySelectorAll('[class^="ht_nesting"]'),a=this.hot.getSettings().ariaTags;if($(l,t=>{t&&s.removeChild(t)}),po(e,uet.CSS_CLASSES.indicatorContainer),i){const{rootDocument:t}=this.hot,e=r.cloneNode(!0);s.innerHTML="",as(0,i-1,()=>{const e=t.createElement("SPAN");po(e,uet.CSS_CLASSES.emptyIndicator),s.appendChild(e)}),s.appendChild(e)}if(this.dataManager.hasChildren(n)){const t=this.hot.rootDocument.createElement("DIV");a&&mo(t,[["aria-hidden","true"]]),po(e,uet.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?(po(t,`${uet.CSS_CLASSES.button} ${uet.CSS_CLASSES.expandButton}`),a&&mo(e,[O(!1)])):(po(t,`${uet.CSS_CLASSES.button} ${uet.CSS_CLASSES.collapseButton}`),a&&mo(e,[O(!0)])),s.appendChild(t)}}updateRowHeaderWidth(t){let e=t;e||(e=this.dataManager.cache.levelCount);let o=11;o=2*this.hot.stylesHandler.getCSSVariableValue("cell-horizontal-padding"),this.rowHeaderWidthCache=Math.max(50,o+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}}function get(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function pet(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 fet=new Map([["collapse",{beforeHook:"beforeRowCollapse",afterHook:"afterRowCollapse"}],["expand",{beforeHook:"beforeRowExpand",afterHook:"afterRowExpand"}]]);var met=new WeakSet,wet=new WeakSet,bet=new WeakSet,vet=new WeakSet;class Cet extends det{collapseChildren(t,e=!0,o=!0){const n=[];let i=null,s=null,r=null;isNaN(t)?(i=t,s=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(t),s=t);const l=!!i&&this.dataManager.hasChildren(i);return l&&$(i.__children,t=>{const e=this.dataManager.getRowIndex(t);null!==e&&n.push(e)}),r=this.collapseRows(n,!0,!1),o&&this.trimRows(r),e&&this.renderAndAdjust(),l&&null!==s&&-1===this.collapsedRows.indexOf(s)&&this.collapsedRows.push(s),r}collapseMultipleChildren(t,e=!0,o=!0){const n=[];$(t,t=>{n.push(...this.collapseChildren(t,!1,!1))}),o&&this.trimRows(n),e&&this.renderAndAdjust()}collapseRow(t,e=!0){this.collapseRows([t],e)}collapseRows(t,e=!0,o=!1){const n=[];return $(t,t=>{n.push(t),e&&this.collapseChildRows(t,n)}),o&&this.trimRows(n),n}collapseChildRows(t,e=[],o,n=!1){if(this.dataManager.hasChildren(t)){$(this.dataManager.getDataObject(t).__children??[],t=>{const o=this.dataManager.getRowIndex(t);null!==o&&(e.push(o),this.collapseChildRows(o,e))})}n&&this.trimRows(e)}expandRow(t,e=!0){this.expandRows([t],e)}expandRows(t,e=!0,o=!1){const n=[];return $(t,t=>{n.push(t),e&&this.expandChildRows(t,n)}),o&&this.untrimRows(n),n}expandChildRows(t,e=[],o,n=!1){if(this.dataManager.hasChildren(t)){$(this.dataManager.getDataObject(t).__children??[],t=>{if(!this.isAnyParentCollapsed(t)){const o=this.dataManager.getRowIndex(t);null!==o&&(e.push(o),this.expandChildRows(o,e))}})}n&&this.untrimRows(e)}expandChildren(t,e=!0,o=!0){const n=[];let i=null,s=null,r=null;isNaN(t)?(i=t,s=this.dataManager.getRowIndex(t)):(i=this.dataManager.getDataObject(t),s=t);const l=null===s?-1:this.collapsedRows.indexOf(s);return l>-1&&this.collapsedRows.splice(l,1),i&&this.dataManager.hasChildren(i)&&$(i.__children,t=>{const e=this.dataManager.getRowIndex(t);null!==e&&n.push(e)}),r=this.expandRows(n,!0,!1),o&&this.untrimRows(r),e&&this.renderAndAdjust(),r}expandMultipleChildren(t,e=!0,o=!0){const n=[];$(t,t=>{n.push(...this.expandChildren(t,!1,!1))}),o&&this.untrimRows(n),e&&this.renderAndAdjust()}getCollapsedParents(){return this.collapsedRows.slice().sort((t,e)=>t-e)}toggleCollapsedRows(t,e,o=!0){return this.applyCollapsedRowsChange(t,e,o).performed}applyCollapsedRowsChange(t,e,o=!0){const n=fet.get(e);if(n||ce(`Unsupported action is passed (${e}).`),!Array.isArray(t))return{performed:!1,vetoed:!1};const i="collapse"===e,s=this.getCollapsedParents(),r=t.length>0&&t.every(t=>get(this,wet,ket).call(this,t)),l=get(this,met,yet).call(this,s,t,i);if(o){if(!1===this.hot.runHooks(n.beforeHook,s,l,r))return{performed:!1,vetoed:!0}}r&&(i?this.collapseMultipleChildren(t,!1,!0):this.expandMultipleChildren(t,!1,!0));const a=!get(this,bet,Ret).call(this,s);return a&&this.renderAndAdjust(),o&&this.hot.runHooks(n.afterHook,s,l,r,a),{performed:a,vetoed:!1}}collapseAll(){this.toggleCollapsedRows(get(this,vet,Eet).call(this),"collapse")}expandAll(){this.toggleCollapsedRows(get(this,vet,Eet).call(this),"expand")}getCollapsedParentsShallowestFirst(){return this.getCollapsedParents().map(t=>({row:t,level:this.dataManager.getRowLevel(t)??0})).sort((t,e)=>t.level-e.level).map(({row:t})=>t)}trimRows(t){this.hot.batchExecution(()=>{$(t,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!0)})},!0)}untrimRows(t){this.hot.batchExecution(()=>{$(t,t=>{this.plugin.collapsedRowsMap.setValueAtIndex(t,!1)})},!0)}areChildrenCollapsed(t){let e=isNaN(t)?t:this.dataManager.getDataObject(t),o=!0;return null==e&&(e={__children:this.dataManager.data}),e&&this.dataManager.hasChildren(e)&&$(e.__children,t=>{const e=this.dataManager.getRowIndex(t);if(null===e||!this.plugin.collapsedRowsMap.getValueAtIndex(e))return o=!1,!1}),o}isAnyParentCollapsed(t){let e=t;for(;null!==e;){e=this.dataManager.getRowParent(e);const t=this.dataManager.getRowIndex(e);if(null!==t&&this.collapsedRows.indexOf(t)>-1)return!0}return!1}toggleState(t,e,o){if(e.col>=0)return;const n=this.translateTrimmedRow(e.row);go(no(t),uet.CSS_CLASSES.button)&&(this.toggleCollapsedRows([n],this.areChildrenCollapsed(n)?"expand":"collapse"),pn(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),pet(this,met),pet(this,wet),pet(this,bet),pet(this,vet),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=void 0,o=1)=>{const n=null==e?1/0:e;$(this.lastCollapsedRows??[],(e,i)=>{e>=t&&e<n&&(this.lastCollapsedRows[i]=e+o)})},applyStash:(t=!0)=>{this.collapseMultipleChildren(this.lastCollapsedRows??[],t),this.lastCollapsedRows=void 0},trimStash:(t,e)=>{as(t,t+e-1,t=>{const e=this.lastCollapsedRows.indexOf(t);e>-1&&this.lastCollapsedRows.splice(e,1)})}}}}function yet(t,e,o){const n=e.filter(t=>get(this,wet,ket).call(this,t));if(o){const e=t.slice();return n.forEach(t=>{-1===e.indexOf(t)&&e.push(t)}),e.sort((t,e)=>t-e)}return t.filter(t=>-1===n.indexOf(t))}function ket(t){if(!Number.isInteger(t)||t<0)return!1;const e=this.dataManager.getDataObject(t);return!!e&&this.dataManager.hasChildren(e)}function Ret(t){const e=this.getCollapsedParents();return e.length===t.length&&e.every((e,o)=>e===t[o])}function Eet(){const t=this.dataManager.getData()??[],e=[];return $(t,t=>{if(this.dataManager.hasChildren(t)){const o=this.dataManager.getRowIndex(t);null!==o&&e.push(o)}}),e}function xet(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Met(t,e,o){!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,o)}function Tet(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,xet(t,e,"set"),o),o}var Het=new WeakMap;class Iet extends det{appendOptions(t){const e=[{key:"add_child",name(){return String(this.getTranslatedPhrase(zw))},callback:()=>{const t=this.hot.getSelectedActive(),e=this.dataManager.translateTrimmedRow(t?.[0]??0),o=this.dataManager.getDataObject(e);this.dataManager.addChild(o)},disabled:()=>{const t=this.hot.getSelectedActive();return!t||(t[0]??0)<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=(this.hot.getSettings().maxRows??1/0)}},{key:"detach_from_parent",name(){return String(this.getTranslatedPhrase(Bw))},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedActive()??[])},disabled:()=>{const t=this.hot.getSelectedActive(),e=this.dataManager.translateTrimmedRow(t?.[0]??0);return!this.dataManager.getRowParent(e)||!t||(t[0]??0)<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=(this.hot.getSettings().maxRows??1/0)}},{name:"---------"}];return as(0,t.items.length-1,o=>{if(0===o)return $(e,(e,n)=>{t.items.splice(o+n,0,e)}),!1}),this.modifyRowInsertingOptions(t)}modifyRowInsertingOptions(t){return as(0,t.items.length-1,e=>{const o=(n=this,i=Het,function(t,e){return e.get?e.get.call(t):e.value}(n,xet(n,i,"get")))[t.items[e].key];var n,i;null!=o&&(t.items[e].callback=o)}),t}constructor(...t){super(...t),Met(this,Het,{writable:!0,value:void 0}),this.dataManager=this.plugin.dataManager,Tet(this,Het,{row_above:(t,e)=>{const o=e[e.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(t,e)=>{const o=e[e.length-1];this.dataManager.addSibling(o.start.row,"below")}})}}function _et(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 Aet{onBeforeRowMove(t,e,o,n){if(this.displayAPICompatibilityWarning({rows:t,finalIndex:e,dropIndex:o,movePossible:n}))return!1;this.movedToCollapsed=!1;const i=o===this.hot.countRows(),s=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o??0);let r=!0;const l=t.map(t=>{if(!r)return-1;const e=this.dataManager.translateTrimmedRow(t);return r=this.shouldAllowMoving(e,s),e}),a=-1===l.indexOf(s);if(!r)return!1;if(!a)return;const h=this.getBaseParent(l),c=this.getTargetParent(i,s),d=h===c;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(c),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,s,d),this.moveRows(l,s,c),this.dataManager.rewriteCache(),this.moveCellsMeta(l,s),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",t,e,o,n,n&&this.isRowOrderChanged(t,e)),this.hot.render(),this.selectCells(t,o),!1}displayAPICompatibilityWarning(t){const{rows:e,finalIndex:o,dropIndex:n,movePossible:i}=t;let s=!1;return Wt(n)&&(Xe(X`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
|
|
125
|
+
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",e,o,n,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 o=this.dataManager.getRowParent(t?e-1:e);return null==o&&(o=this.dataManager.getRowParent(e-1)),o}shiftCollapsibleParentsLocations(t,e,o){o||(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,o){const n=e===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender(()=>{t.forEach(t=>{this.dataManager.moveRow(t,e,this.movedToCollapsed,n)})})}moveCellsMeta(t,e){const o=[],n=Math.max(...t)<e;t.forEach(t=>{o.push(this.hot.getCellMetaAtRow(t))}),this.hot.spliceCellsMeta(t[0],t.length),this.hot.spliceCellsMeta(e-(n?o.length:0),0,...o)}selectCells(t,e){const o=t.length;let n=0,i=0;if(this.movedToCollapsed){let s=null;const r=e??0;s=(t[o-1]??0)<r?this.dataManager.translateTrimmedRow(r-o):this.dataManager.translateTrimmedRow(r);const l=this.dataManager.getRowParent(null===s?this.hot.countSourceRows()-1:s-1),a=this.dataManager.getRowIndex(l)??0;n=this.dataManager.untranslateTrimmedRow(a),i=n}else(t[o-1]??0)<(e??0)?(i=(e??0)-1,n=i-o+1):(n=e??0,i=n+o-1);this.hot.selectCells([[n,0,i,this.hot.countCols()-1]],!1)}isRowOrderChanged(t,e){return t.some((t,o)=>t-o!==e)}constructor(t){this.movedToCollapsed=!1,this.plugin=t,this.hot=t.hot,this.dataManager=t.dataManager,this.collapsingUI=t.collapsingUI}}function Wet(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Oet(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Net(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Oet(t,e,"get"))}function Pet(t,e,o){Wet(t,e),e.set(t,o)}function Det(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Oet(t,e,"set"),o),o}function Let(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function zet(t,e){Wet(t,e),e.add(t)}const Bet="nestedRows",Vet=Bet;var Fet=new WeakMap,$et=new WeakMap,Uet=new WeakMap,jet=new WeakSet,qet=new WeakSet,Get=new WeakSet,Yet=new WeakSet,Xet=new WeakSet,Ket=new WeakMap,Zet=new WeakMap,Qet=new WeakMap,Jet=new WeakMap,tot=new WeakMap,eot=new WeakMap,oot=new WeakMap,not=new WeakMap,iot=new WeakMap,sot=new WeakMap,rot=new WeakMap,lot=new WeakMap,aot=new WeakMap,hot=new WeakMap,cot=new WeakMap,dot=new WeakMap,uot=new WeakMap;class got extends pW{static get PLUGIN_KEY(){return Bet}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[Bet]}enablePlugin(){this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.createAndRegisterIndexMap("nestedRows","trimming"),this.dataManager=new cet(this,this.hot),this.collapsingUI=new Cet(this,this.hot),this.headersUI=new uet(this,this.hot),this.contextMenuUI=new Iet(this,this.hot),this.rowMoveController=new Aet(this),this.addHook("afterInit",Net(this,hot)),this.addHook("afterRender",Net(this,cot)),this.addHook("beforeViewRender",Net(this,dot)),this.addHook("modifyRowData",this.onModifyRowData.bind(this)),this.addHook("modifySourceLength",this.onModifySourceLength.bind(this)),this.addHook("beforeDataSplice",this.onBeforeDataSplice.bind(this)),this.addHook("filterData",Net(this,Qet)),this.addHook("afterContextMenuDefaultOptions",Net(this,Jet)),this.addHook("afterGetRowHeader",Net(this,tot)),this.addHook("beforeOnCellMouseDown",Net(this,Zet)),this.addHook("beforeRemoveRow",Net(this,not)),this.addHook("afterRemoveRow",Net(this,oot)),this.addHook("beforeAddChild",Net(this,iot)),this.addHook("afterAddChild",Net(this,sot)),this.addHook("beforeDetachChild",Net(this,rot)),this.addHook("afterDetachChild",Net(this,lot)),this.addHook("modifyRowHeaderWidth",Net(this,eot)),this.addHook("afterCreateRow",Net(this,aot)),this.addHook("beforeRowMove",Net(this,Ket)),this.addHook("beforeLoadData",Net(this,uot)),this.addHook("beforeUpdateData",Net(this,uot)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){const t=this.collapsingUI?.getCollapsedParents()??[];this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),t.length>0&&this.collapsingUI.toggleCollapsedRows(t,"collapse",!1),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid")?.addShortcut({keys:[["Enter"]],callback:()=>{const t=this.hot.getSelectedRangeActive();if(!t)return!1;const{highlight:e}=t,o=this.collapsingUI.translateTrimmedRow(e.row??0);return this.collapsingUI.toggleCollapsedRows([o],this.collapsingUI.areChildrenCollapsed(o)?"expand":"collapse"),!1},runOnlyIf:()=>{const t=this.hot.getSelectedRangeActive()?.highlight;return!!(t&&this.hot.getSelectedRangeActive()?.isSingle()&&this.hot.selection.isCellVisible(t)&&-1===t.col&&null!==t.row&&t.row>=0)},group:Vet,relativeToGroup:Ek,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid")?.removeShortcutsByGroup(Vet)}collapseAll(){Let(this,qet,fot).call(this)&&this.collapsingUI.collapseAll()}expandAll(){Let(this,qet,fot).call(this)&&this.collapsingUI.toggleCollapsedRows(this.collapsingUI.getCollapsedParentsShallowestFirst(),"expand")}collapseParent(t){return Let(this,Xet,bot).call(this,t,"collapse")}expandParent(t){return Let(this,Xet,bot).call(this,t,"expand")}toggleParent(t){const e=Let(this,Yet,wot).call(this,t);if(null===e)return!1;const o=this.dataManager.isParent(e)&&this.collapsingUI.areChildrenCollapsed(e);return this.collapsingUI.toggleCollapsedRows([e],o?"expand":"collapse")}getCollapsedParents(){return Let(this,qet,fot).call(this)?this.collapsingUI.getCollapsedParents():[]}isParentCollapsed(t){const e=Let(this,Yet,wot).call(this,t);return!(null===e||!this.dataManager.isParent(e))&&this.collapsingUI.areChildrenCollapsed(e)}isParent(t){const e=Let(this,Get,mot).call(this,t);return null!==e&&this.dataManager.isParent(e)}getRowLevel(t){const e=Let(this,Get,mot).call(this,t);return null===e?null:this.dataManager.getRowLevel(e)}getRowParent(t){const e=Let(this,Get,mot).call(this,t);if(null===e)return null;const o=this.dataManager.getRowParent(e),n=this.dataManager.getRowIndex(o);if(null===n)return null;const i=this.hot.toVisualRow(n);return null===i?null:i}countChildren(t,e=!1){const o=Let(this,Get,mot).call(this,t);if(null===o)return 0;if(e)return this.dataManager.countChildren(o);const n=this.dataManager.getDataObject(o);return(n?.__children??[]).length}expandToRow(t){if(!Let(this,qet,fot).call(this)||!Number.isInteger(t)||t<0)return!1;const e=[];let o=this.dataManager.getRowParent(t);for(;null!==o;){const t=this.dataManager.getRowIndex(o);if(null===t)break;this.collapsingUI.getCollapsedParents().indexOf(t)>-1&&e.push(t),o=this.dataManager.getRowParent(o)}return 0!==e.length&&this.collapsingUI.toggleCollapsedRows(e.reverse(),"expand")}expandToLevel(t){if(!Let(this,qet,fot).call(this)||!Number.isInteger(t)||t<0)return;const e=[],o=[];this.hot.batch(()=>{const n=this.dataManager.getData()??[];Let(this,jet,pot).call(this,n,(n,i)=>{i>=t?e.push(n):o.push(n)}),o.length>0&&this.collapsingUI.applyCollapsedRowsChange(o,"expand").vetoed||e.length>0&&this.collapsingUI.toggleCollapsedRows(e.reverse(),"collapse")})}disableCoreAPIModifiers(){Det(this,$et,!0)}enableCoreAPIModifiers(){Det(this,$et,!1)}onModifyRowData(t){if(!Net(this,$et))return this.dataManager.getDataObject(t)}onModifySourceLength(){if(!Net(this,$et))return this.dataManager.countAllRows()}onBeforeDataSplice(t,e,o){return!(!Net(this,$et)&&!this.dataManager.isRowHighestLevel(t))||(this.dataManager.spliceData(t,e,[o]),!1)}destroy(){super.destroy()}constructor(...t){super(...t),zet(this,jet),zet(this,qet),zet(this,Get),zet(this,Yet),zet(this,Xet),Pet(this,Fet,{writable:!0,value:void 0}),Pet(this,$et,{writable:!0,value:void 0}),Pet(this,Uet,{writable:!0,value:void 0}),Pet(this,Ket,{writable:!0,value:void 0}),Pet(this,Zet,{writable:!0,value:void 0}),Pet(this,Qet,{writable:!0,value:void 0}),Pet(this,Jet,{writable:!0,value:void 0}),Pet(this,tot,{writable:!0,value:void 0}),Pet(this,eot,{writable:!0,value:void 0}),Pet(this,oot,{writable:!0,value:void 0}),Pet(this,not,{writable:!0,value:void 0}),Pet(this,iot,{writable:!0,value:void 0}),Pet(this,sot,{writable:!0,value:void 0}),Pet(this,rot,{writable:!0,value:void 0}),Pet(this,lot,{writable:!0,value:void 0}),Pet(this,aot,{writable:!0,value:void 0}),Pet(this,hot,{writable:!0,value:void 0}),Pet(this,cot,{writable:!0,value:void 0}),Pet(this,dot,{writable:!0,value:void 0}),Pet(this,uot,{writable:!0,value:void 0}),this.dataManager=null,this.headersUI=null,this.collapsingUI=null,this.contextMenuUI=null,this.rowMoveController=null,this.collapsedRowsMap=null,Det(this,Fet,!1),Det(this,$et,!1),Det(this,Uet,!0),Det(this,Ket,(t,e,o,n)=>this.rowMoveController.onBeforeRowMove(t,e,o,n)),Det(this,Zet,(t,e,o)=>{this.collapsingUI.toggleState(t,e,o)}),Det(this,Qet,(t,e,o)=>(this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],e),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*e),this.dataManager.filterData(t,e,o),Det(this,Fet,!0),this.dataManager.getData().slice())),Det(this,Jet,t=>this.contextMenuUI.appendOptions(t)),Det(this,tot,(t,e)=>{this.headersUI.appendLevelIndicators(t,e)}),Det(this,eot,t=>Math.max(this.headersUI.rowHeaderWidthCache??0,t)),Det(this,oot,(t,e,o,n)=>{n!==this.pluginName&&this.hot._registerTimeout(()=>{Det(this,Fet,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}),Det(this,not,(t,e,o)=>{const n=Array.from(o.reduce((t,e)=>{if(this.dataManager.isParent(e)){const o=this.dataManager.getDataObject(e)?.__children;return t.add(e),Array.isArray(o)&&o.forEach(e=>{const o=this.dataManager.getRowIndex(e);null!==o&&t.add(o)}),t}return t.add(e)},new Set));o.length=0,o.push(...n)}),Det(this,iot,()=>{this.collapsingUI.collapsedRowsStash.stash()}),Det(this,sot,(t,e)=>{const o=this.dataManager.getRowIndex(e);null!==o&&this.collapsingUI.collapsedRowsStash.shiftStash(o),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth(void 0)}),Det(this,rot,()=>{this.collapsingUI.collapsedRowsStash.stash()}),Det(this,lot,(t,e,o)=>{this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth(void 0)}),Det(this,aot,()=>{this.dataManager.rewriteCache()}),Det(this,hot,()=>{this.headersUI.updateRowHeaderWidth(void 0)}),Det(this,cot,()=>{Net(this,Uet)&&this.hot.view&&(Det(this,Uet,!1),this.hot.rootWindow.requestAnimationFrame(()=>{this.hot&&this.hot.view&&!this.hot.isDestroyed&&this.hot.view.adjustElementsSize(!0)}))}),Det(this,dot,(t,e)=>{Net(this,Fet)&&(e.skipRender=!0)}),Det(this,uot,t=>{if(!_et(t))return eo("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[Bet]=!1,void this.disablePlugin();this.dataManager.setData(t),this.dataManager.rewriteCache()})}}function pot(t,e,o=0){t.forEach(t=>{if(!this.dataManager.hasChildren(t))return;const n=this.dataManager.getRowIndex(t);null!==n&&e(n,o),Let(this,jet,pot).call(this,t.__children??[],e,o+1)})}function fot(){return this.enabled&&!!this.dataManager&&!!this.collapsingUI}function mot(t){if(!Let(this,qet,fot).call(this)||!Number.isInteger(t)||t<0)return null;const e=this.hot.toPhysicalRow(t);return null==e?null:e}function wot(t){return Let(this,Get,mot).call(this,t)}function bot(t,e){const o=Let(this,Yet,wot).call(this,t);return null!==o&&this.collapsingUI.toggleCollapsedRows([o],e)}function vot(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cot(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function yot(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Cot(t,e,"get"))}function Sot(t,e,o){vot(t,e),e.set(t,o)}function kot(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Cot(t,e,"set"),o),o}function Rot(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}var Eot=new WeakMap,xot=new WeakMap,Mot=new WeakMap,Tot=new WeakMap,Hot=new WeakMap,Iot=new WeakMap,_ot=new WeakMap,Aot=new WeakSet;class Wot{install(){if(yot(this,Tot)?.container)return;const t=K`${'\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:o,prev:n,next:i,last:s,pageSizeSelect:r}=t.refs;kot(this,Tot,t.refs),e.setAttribute("dir",yot(this,Mot)?"rtl":"ltr"),e.tabIndex=-1;const l=(t,e,o)=>{e.addEventListener(t,t=>{(t=>t.currentTarget.disabled)(t)||o()})};l("click",o,()=>this.runLocalHooks("firstPageClick")),l("click",n,()=>this.runLocalHooks("prevPageClick")),l("click",i,()=>this.runLocalHooks("nextPageClick")),l("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),yot(this,xot)&&(yot(this,xot).appendChild(t.fragment),po(e,[yot(this,Hot)??"","handsontable"]))}getContainer(){return yot(this,Tot).container}getFocusableElements(){const{first:t,prev:e,next:o,last:n,pageSizeSelect:i}=yot(this,Tot);return[i,t,e,o,n].filter(t=>!t.disabled)}updateTheme(t){if(kot(this,Hot,t),yot(this,xot)){const{container:t}=yot(this,Tot);fo(t,/ht-theme-.*/g),yot(this,Hot)&&po(t,yot(this,Hot))}return this}getHeight(){return yot(this,Tot).container.offsetHeight}updateState({currentPage:t,totalPages:e,firstVisibleRowIndex:o,lastVisibleRowIndex:n,totalRenderedRows:i,pageSizeList:s,pageSize:r,autoPageSize:l,counterStartRow:a,counterEndRow:h}){const{first:c,prev:d,next:u,last:g,pageCounterSection:p,pageNavSection:f,pageNavLabel:m,pageSizeSelect:w,pageSizeLabel:b}=yot(this,Tot),v=a??o+1,C=h??n+1,y=yot(this,Iot).call(this,Ab,{start:v,end:C,total:i}),S=yot(this,Iot).call(this,Wb,{currentPage:t,totalPages:e}),k=yot(this,Iot).call(this,_b);p.textContent=y,m.textContent=S,w.textContent="",b.textContent=`${k}:`,mo(f,[x(yot(this,Iot).call(this,Hb))]),mo(w,[x(yot(this,Iot).call(this,_b))]),yot(this,_ot).call(this,S),s.forEach(t=>{const e="auto"===t?yot(this,Iot).call(this,Ib):t,o=new Option(String(e??""),String(t??""));(l&&"auto"===t||!l&&t===r)&&(o.selected=!0),w.add(o)});const R=1===t,E=t===e;if("none"!==f.style.display){const t=yot(this,Eot).ownerDocument.activeElement;R?(po(c,"ht-page-navigation-section__button--disabled"),po(d,"ht-page-navigation-section__button--disabled"),c.disabled=!0,d.disabled=!0):(fo(c,"ht-page-navigation-section__button--disabled"),fo(d,"ht-page-navigation-section__button--disabled"),c.disabled=!1,d.disabled=!1),E?(po(u,"ht-page-navigation-section__button--disabled"),po(g,"ht-page-navigation-section__button--disabled"),u.disabled=!0,g.disabled=!0):(fo(u,"ht-page-navigation-section__button--disabled"),fo(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 mo(c,[x(yot(this,Iot).call(this,Ob)),T(R)]),mo(d,[x(yot(this,Iot).call(this,Nb)),T(R)]),mo(u,[x(yot(this,Iot).call(this,Pb)),T(E)]),mo(g,[x(yot(this,Iot).call(this,Db)),T(E)]),this}setPageSizeSectionVisibility(t){const{pageSizeSection:e,pageSizeSelect:o}=yot(this,Tot);return e.style.display=t?"":"none",o.disabled=!t,Rot(this,Aot,Oot).call(this),this}setCounterSectionVisibility(t){return yot(this,Tot).pageCounterSection.style.display=t?"":"none",Rot(this,Aot,Oot).call(this),this}setNavigationSectionVisibility(t){const{pageNavSection:e,first:o,prev:n,next:i,last:s}=yot(this,Tot);return e.style.display=t?"":"none",o.disabled=!t,n.disabled=!t,i.disabled=!t,s.disabled=!t,Rot(this,Aot,Oot).call(this),this}destroy(){yot(this,Tot)?.container.remove(),kot(this,Tot,null)}constructor({rootElement:t,uiContainer:e,isRtl:o,themeName:n,phraseTranslator:i,a11yAnnouncer:s}){var r,l;vot(r=this,l=Aot),l.add(r),Sot(this,Eot,{writable:!0,value:void 0}),Sot(this,xot,{writable:!0,value:void 0}),Sot(this,Mot,{writable:!0,value:void 0}),Sot(this,Tot,{writable:!0,value:void 0}),Sot(this,Hot,{writable:!0,value:void 0}),Sot(this,Iot,{writable:!0,value:void 0}),Sot(this,_ot,{writable:!0,value:void 0}),kot(this,Mot,!1),kot(this,Tot,null),kot(this,Eot,t),kot(this,xot,e),kot(this,Mot,o),kot(this,Hot,n),kot(this,Iot,i),kot(this,_ot,s),this.install()}}function Oot(){const{container:t,pageSizeSection:e,pageCounterSection:o,pageNavSection:n}=yot(this,Tot),i="none"!==e.style.display||"none"!==o.style.display||"none"!==n.style.display;yot(this,xot)||(i?po(yot(this,Eot).querySelector(".ht-wrapper"),"htPagination"):fo(yot(this,Eot).querySelector(".ht-wrapper"),"htPagination")),t.style.display=i?"":"none"}be(Wot,Wh);const Not=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 o=t(),n=e(),i=[];let s=0,r=0,l=0;for(let t=0;t<o.length;t++){const e=o[t];l>0&&r+e>=n&&(i.push({startIndex:s,endIndex:t-1,pageSize:l}),s=t,r=0,l=0),r+=e,l+=1}i.push({startIndex:s,endIndex:Math.max(0,o.length-1),pageSize:l}),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 Pot(t){Not.has(t)||ce(`Unknown pagination strategy type: ${t}`);return new(Not.get(t))}function Dot(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Lot(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function zot(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Lot(t,e,"get"))}function Bot(t,e,o){Dot(t,e),e.set(t,o)}function Vot(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Lot(t,e,"set"),o),o}function Fot(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function $ot(t,e){Dot(t,e),e.add(t)}QA("pagination",["nestedRows","mergeCells","fixedRowsTop","fixedRowsBottom"]);const Uot="pagination",jot=`plugin:${Uot}`,qot=X`The \`auto\` page size setting requires the \`autoRowSize\`\x20
|
|
126
|
+
plugin to be enabled. Set the \`autoRowSize: true\` in the configuration to ensure correct behavior.`;var Got=new WeakMap,Yot=new WeakMap,Xot=new WeakMap,Kot=new WeakMap,Zot=new WeakMap,Qot=new WeakMap,Jot=new WeakMap,tnt=new WeakMap,ent=new WeakMap,ont=new WeakMap,nnt=new WeakSet,int=new WeakSet,snt=new WeakSet,rnt=new WeakSet,lnt=new WeakSet,ant=new WeakSet,hnt=new WeakSet,cnt=new WeakMap,dnt=new WeakMap,unt=new WeakMap,gnt=new WeakMap,pnt=new WeakMap,fnt=new WeakMap,mnt=new WeakMap,wnt=new WeakMap,bnt=new WeakMap,vnt=new WeakMap;class Cnt extends pW{static get PLUGIN_KEY(){return Uot}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()[Uot]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[Uot];void 0!==t?.initialPage&&Vot(this,Yot,this.getSetting("initialPage")),void 0!==t?.pageSize&&Vot(this,Xot,this.getSetting("pageSize")),Vot(this,tnt,!0===this.hot.runHooks("hasExternalDataSource")),Vot(this,ent,null),Vot(this,Got,this.hot.rowIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding",!1)),"auto"!==zot(this,Xot)||this.hot.getPlugin("autoRowSize")?.enabled||Xe(qot),Vot(this,Zot,Pot("auto"===zot(this,Xot)?"auto":"fixed")),zot(this,Kot)||(Vot(this,Kot,new Wot({rootElement:this.hot.rootGridElement,uiContainer:this.getSetting("uiContainer"),isRtl:this.hot.isRtl(),themeName:this.hot.getCurrentThemeName(),phraseTranslator:(t,e)=>this.hot.getTranslatedPhrase(t,e),a11yAnnouncer:t=>function(t){xR&&(xR.textContent="",setTimeout(()=>{xR&&(xR.textContent=t)},100))}(String(t??""))})),Fot(this,rnt,Rnt).call(this),zot(this,Kot).addLocalHook("firstPageClick",()=>this.firstPage()).addLocalHook("prevPageClick",()=>this.prevPage()).addLocalHook("nextPageClick",()=>this.nextPage()).addLocalHook("lastPageClick",()=>this.lastPage()).addLocalHook("pageSizeChange",t=>this.setPageSize(t))),Ep(this.hot)&&!this.getSetting("uiContainer")&&this.hot.getLayoutManager().register(Uot,zot(this,Kot).getContainer(),{side:"bottom",weight:100}),this.addHook("init",zot(this,mnt),-1),this.addHook("beforeSelectAll",zot(this,cnt)),this.addHook("beforeSelectColumns",zot(this,cnt)),this.addHook("beforeSetRangeEnd",zot(this,dnt)),this.addHook("beforeSelectionHighlightSet",zot(this,unt)),this.addHook("beforePaste",zot(this,gnt)),this.addHook("afterViewRender",zot(this,pnt)),this.addHook("afterLanguageChange",zot(this,wnt)),this.addHook("beforeHeightChange",zot(this,fnt)),this.addHook("afterSetTheme",zot(this,bnt)),this.addHook("afterDataProviderFetch",zot(this,ont),-1),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",zot(this,vnt)),Fot(this,ant,xnt).call(this),super.enablePlugin()}revertPageTo(t){const e=zot(this,Yot);Fot(this,nnt,ynt).call(this,t),this.hot.scrollViewportTo({row:0}),Fot(this,snt,knt).call(this),this.hot.runHooks("afterPageChange",e,t)}revertPageSizeTo(t){const e=zot(this,Xot);Fot(this,int,Snt).call(this,t),Fot(this,snt,knt).call(this),this.hot.runHooks("afterPageSizeChange",e,t)}updatePlugin(){this.disablePlugin(),this.enablePlugin(),Fot(this,snt,knt).call(this),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.removeLocalHook("cacheUpdated",zot(this,vnt)).unregisterMap(this.pluginName),Fot(this,hnt,Mnt).call(this),Ep(this.hot)&&this.hot.getLayoutManager().unregister(Uot,"bottom"),zot(this,Kot)?.destroy(),Vot(this,Kot,null),super.disablePlugin()}getPaginationData(){const t=zot(this,Zot)?.getTotalPages()??0;let e=-1,o=-1;if(zot(this,tnt)){const t=this.hot.countRows();t>0&&(e=0,o=t-1)}else{const t=zot(this,Zot)?.getState(zot(this,Yot));if(!t)return{currentPage:zot(this,Yot),totalPages:0,pageSize:0,pageSizeList:[],autoPageSize:!1,numberOfRenderedRows:0,firstVisibleRowIndex:e,lastVisibleRowIndex:o};const{pageSize:n,startIndex:i}=t,s=this.hot.countRows();let r=0,l=i;for(;r<n&&!(l>=s);)this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(l))||(-1===e&&(e=l),o=l,r+=1),l+=1}const n=zot(this,Zot)?.getState(zot(this,Yot));return{currentPage:zot(this,Yot),totalPages:t,pageSize:n?.pageSize??zot(this,Xot),pageSizeList:[...this.getSetting("pageSizeList")??[]],autoPageSize:"auto"===zot(this,Xot),numberOfRenderedRows:this.hot.rowIndexMapper.getRenderableIndexesLength(),firstVisibleRowIndex:e,lastVisibleRowIndex:o}}getCurrentPage(){return zot(this,Yot)}getCurrentPageSize(){return zot(this,Xot)}setPage(t){const e=zot(this,Yot);!1!==this.hot.runHooks("beforePageChange",e,t)&&(Fot(this,nnt,ynt).call(this,t),Fot(this,snt,knt).call(this),this.hot.scrollViewportTo({row:0}),this.hot.runHooks("afterPageChange",e,zot(this,Yot)))}resetPage(){this.setPage(this.getSetting("initialPage"))}setPageSize(t){const e=zot(this,Xot);!1!==this.hot.runHooks("beforePageSizeChange",e,t)&&("auto"!==t||this.hot.getPlugin("autoRowSize")?.enabled||Xe(qot),Fot(this,int,Snt).call(this,t),Fot(this,snt,knt).call(this),this.hot.runHooks("afterPageSizeChange",e,zot(this,Xot)))}resetPageSize(){this.setPageSize(this.getSetting("pageSize"))}resetPagination(){this.resetPage(),this.resetPageSize(),Fot(this,rnt,Rnt).call(this)}nextPage(){this.setPage(zot(this,Yot)+1)}prevPage(){this.setPage(zot(this,Yot)-1)}firstPage(){this.setPage(1)}lastPage(){this.setPage(zot(this,Zot)?.getTotalPages()??1)}hasPreviousPage(){return zot(this,Yot)>1}hasNextPage(){return zot(this,Yot)<(zot(this,Zot)?.getTotalPages()??0)}getCurrentPageData(){const{firstVisibleRowIndex:t,lastVisibleRowIndex:e}=this.getPaginationData();return-1===t||-1===e?[]:this.hot.getData(t,0,e,this.hot.countCols()-1)}showPageSizeSection(){zot(this,Kot)?.setPageSizeSectionVisibility(!0),this.hot.runHooks("afterPageSizeVisibilityChange",!0)}hidePageSizeSection(){zot(this,Kot)?.setPageSizeSectionVisibility(!1),this.hot.runHooks("afterPageSizeVisibilityChange",!1)}showPageCounterSection(){zot(this,Kot)?.setCounterSectionVisibility(!0),this.hot.runHooks("afterPageCounterVisibilityChange",!0)}hidePageCounterSection(){zot(this,Kot)?.setCounterSectionVisibility(!1),this.hot.runHooks("afterPageCounterVisibilityChange",!1)}showPageNavigationSection(){zot(this,Kot)?.setNavigationSectionVisibility(!0),this.hot.runHooks("afterPageNavigationVisibilityChange",!0)}hidePageNavigationSection(){zot(this,Kot)?.setNavigationSectionVisibility(!1),this.hot.runHooks("afterPageNavigationVisibilityChange",!1)}destroy(){Vot(this,Got,null),Vot(this,Zot,null),zot(this,Kot)?.destroy(),Vot(this,Kot,null),super.destroy()}constructor(...t){super(...t),$ot(this,nnt),$ot(this,int),$ot(this,snt),$ot(this,rnt),$ot(this,lnt),$ot(this,ant),$ot(this,hnt),Bot(this,Got,{writable:!0,value:void 0}),Bot(this,Yot,{writable:!0,value:void 0}),Bot(this,Xot,{writable:!0,value:void 0}),Bot(this,Kot,{writable:!0,value:void 0}),Bot(this,Zot,{writable:!0,value:void 0}),Bot(this,Qot,{writable:!0,value:void 0}),Bot(this,Jot,{writable:!0,value:void 0}),Bot(this,tnt,{writable:!0,value:void 0}),Bot(this,ent,{writable:!0,value:void 0}),Bot(this,ont,{writable:!0,value:void 0}),Bot(this,cnt,{writable:!0,value:void 0}),Bot(this,dnt,{writable:!0,value:void 0}),Bot(this,unt,{writable:!0,value:void 0}),Bot(this,gnt,{writable:!0,value:void 0}),Bot(this,pnt,{writable:!0,value:void 0}),Bot(this,fnt,{writable:!0,value:void 0}),Bot(this,mnt,{writable:!0,value:void 0}),Bot(this,wnt,{writable:!0,value:void 0}),Bot(this,bnt,{writable:!0,value:void 0}),Bot(this,vnt,{writable:!0,value:void 0}),Vot(this,Got,null),Vot(this,Yot,1),Vot(this,Xot,10),Vot(this,Kot,null),Vot(this,Zot,null),Vot(this,Qot,!1),Vot(this,Jot,!1),Vot(this,tnt,!1),Vot(this,ent,null),Vot(this,ont,({queryParameters:t,totalRows:e})=>{if(!zot(this,tnt))return;const o=zot(this,Yot),n=zot(this,Xot),{page:i,pageSize:s}=t;"number"==typeof i&&i>=1&&Fot(this,nnt,ynt).call(this,i),"auto"===s?Fot(this,int,Snt).call(this,"auto"):"number"==typeof s&&s>=1&&Fot(this,int,Snt).call(this,s),zot(this,tnt)&&"number"==typeof e&&e>=0&&Vot(this,ent,e),Fot(this,snt,knt).call(this),o!==zot(this,Yot)&&this.hot.runHooks("afterPageChange",o,zot(this,Yot)),n!==zot(this,Xot)&&this.hot.runHooks("afterPageSizeChange",n,zot(this,Xot))}),Vot(this,cnt,(t,e)=>{const{firstVisibleRowIndex:o,lastVisibleRowIndex:n}=this.getPaginationData();(zot(this,Yot)>1||t.row>=0)&&(t.row=o),e.row=n}),Vot(this,dnt,t=>{if(this.hot.selection.isSelectedByColumnHeader()){const{lastVisibleRowIndex:e}=this.getPaginationData();t.row=e}}),Vot(this,unt,()=>{if(!this.hot.getSettings().navigableHeaders)return;const t=this.hot.getSelectedRangeLast();if(t&&!t.isSingle()){const{highlight:e}=t,o=t.getTopStartCorner().row,n=t.getBottomEndCorner().row;null!==e.row&&null!==o&&null!==n&&(e.row=ds(e.row,o,n))}}),Vot(this,gnt,(t,e)=>{const{firstVisibleRowIndex:o,lastVisibleRowIndex:n}=this.getPaginationData();if(-1===o||-1===n)return!1;e.forEach(({startRow:e})=>{if(0===t.length)return;const o=Math.min(t.length-(n-e+1),t.length);t.splice(0,o)})}),Vot(this,pnt,()=>{"auto"!==zot(this,Xot)||zot(this,Jot)?Vot(this,Jot,!1):(Vot(this,Jot,!0),Fot(this,snt,knt).call(this))}),Vot(this,fnt,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`} - ${zot(this,Kot)?.getHeight()}px)`}),Vot(this,mnt,()=>{"auto"!==zot(this,Xot)&&Fot(this,lnt,Ent).call(this)}),Vot(this,wnt,()=>{Fot(this,snt,knt).call(this)}),Vot(this,bnt,t=>{zot(this,Kot)?.updateTheme(t)}),Vot(this,vnt,()=>{!zot(this,Qot)&&this.hot?.view&&Fot(this,lnt,Ent).call(this)})}}function ynt(t){Vot(this,Yot,t)}function Snt(t){Vot(this,Zot,Pot("auto"===t?"auto":"fixed")),Vot(this,Xot,t)}function knt(){Fot(this,lnt,Ent).call(this),this.hot.view.adjustElementsSize(),this.hot.render()}function Rnt(){this.getSetting("showPageSize")?this.showPageSizeSection():this.hidePageSizeSection(),this.getSetting("showCounter")?this.showPageCounterSection():this.hidePageCounterSection(),this.getSetting("showNavigation")?this.showPageNavigationSection():this.hidePageNavigationSection()}function Ent(){Vot(this,Qot,!0),zot(this,Got)?.clear();const t=this.hot.rowIndexMapper.getRenderableIndexes(),e=t.length,{stylesHandler:o}=this.hot,n=zot(this,tnt),i=n?zot(this,ent)??e:e;zot(this,Zot)?.calculate({pageSize:zot(this,Xot),totalItems:i,viewportSizeProvider:()=>{const t=this.hot.view;if(t.isVerticallyScrollableByWindow()){const e=getComputedStyle(this.hot.rootDocument.body),o=Number.parseInt(e.marginTop,10)+Number.parseInt(e.marginBottom,10),n=this.hot.hasColHeaders()?t._wt.wtViewport.getColumnHeaderHeight():0,i=zot(this,Kot)?.getHeight();return t.getWorkspaceHeight()-(i??0)-n-o}const e=t.hasHorizontalScroll()?jo():0;return t.getViewportHeight()-e},itemsSizeProvider:()=>this.hot.rowIndexMapper.getRenderableIndexes().map(t=>{const e=this.hot.toVisualRow(t);return this.hot.getRowHeight(e)??o.getDefaultRowHeight(e)})});const s=zot(this,Zot)?.getTotalPages();if(Vot(this,Yot,ds(zot(this,Yot),1,s??1)),!n&&t.length>0){const e=zot(this,Zot)?.getState(zot(this,Yot));if(e){const{startIndex:o,pageSize:n}=e;t.splice(o,n)}}!n&&t.length>0?this.hot.batchExecution(()=>{t.forEach(t=>zot(this,Got)?.setValueAtIndex(t,!0))},!0):n||this.hot.rowIndexMapper.updateCache(!0),Vot(this,Qot,!1);const r={...this.getPaginationData(),totalRenderedRows:n?i:e};if(n){const t=i,e=zot(this,Zot)?.getState(zot(this,Yot))?.pageSize??zot(this,Xot);r.counterStartRow=(zot(this,Yot)-1)*e+1,r.counterEndRow=Math.min(zot(this,Yot)*e,t)}zot(this,Kot)?.updateState(r)}function xnt(){const t=zot(this,Kot)?.getContainer();t&&this.hot.getFocusScopeManager().registerScope(Uot,t,{shortcutsContextName:jot,runOnlyIf:()=>Boolean(this.getSetting("showPageSize"))||Boolean(this.getSetting("showNavigation")),onActivate:t=>{const e=zot(this,Kot)?.getFocusableElements();e&&e.length>0&&("tab_from_above"===t?e[0]?.focus():"tab_from_below"===t&&e[e.length-1]?.focus())}})}function Mnt(){this.hot.getFocusScopeManager().unregisterScope(Uot)}function Tnt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Hnt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Tnt(t,e,"get"))}function Int(t,e,o){!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,o)}function _nt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Tnt(t,e,"set"),o),o}const Ant="search",Wnt=function(t,e,o,n,i){const s=t.getCellMeta(e,o);s.isSearchResult=i;let r=s._persistedMetaProps;i?(void 0===r&&(r=new Set,s._persistedMetaProps=r),r.add("isSearchResult")):r?.delete("isSearchResult")},Ont=function(t,e,o){if(Wt(t)||null===t||!t.toLocaleLowerCase||0===t.length)return!1;if(Wt(e)||null===e)return!1;const n=o.locale;return-1!==An(String(e),n).indexOf(An(t,n))};var Nnt=new WeakMap;class Pnt extends pW{static get PLUGIN_KEY(){return Ant}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return!!this.hot.getSettings()[Ant]}enablePlugin(){if(this.enabled)return;const t=this.hot.getSettings()[Ant];this.updatePluginSettings(t),this.addHook("beforeRenderer",Hnt(this,Nnt)),super.enablePlugin()}disablePlugin(){const t=(t,e,o,n,i,s)=>Hnt(this,Nnt).call(this,t,e,o,n,i,s);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(),o=this.getQueryMethod()){const n=this.hot.countRows(),i=this.hot.countCols(),s=[],r=this.hot;return as(0,n-1,n=>{as(0,i-1,i=>{const l=this.hot.getDataAtCell(n,i),a=this.hot.getCellMeta(n,i),h=a.search,c=h?.callback??e,d=(h?.queryMethod??o)(t,l,a);if(d){const t={row:n,col:i,data:l};s.push(t)}c&&c(r,n,i,l,d)})}),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){Ce(t)&&(t.searchResultClass&&this.setSearchResultClass(String(t.searchResultClass)),t.queryMethod&&this.setQueryMethod(t.queryMethod),t.callback&&this.setCallback(t.callback))}destroy(){super.destroy()}constructor(...t){super(...t),Int(this,Nnt,{writable:!0,value:void 0}),this.callback=Wnt,this.queryMethod=Ont,this.searchResultClass="htSearchResult",_nt(this,Nnt,(t,e,o,n,i,s)=>{const r=s.className||[];let l=[];"string"==typeof r?l=r.split(" "):Array.isArray(r)&&l.push(...r);const a=s.isSearchResult;this.isEnabled()&&a?l.includes(this.searchResultClass)||l.push(`${this.searchResultClass}`):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),s.className=l.join(" ")})}}function Dnt({edge:t,target:e,oppositeIndex:o}){const n=Math.max(0,e);return"top"===t||"start"===t?Math.min(n,o):Math.max(n,o)}function Lnt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function znt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Bnt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,znt(t,e,"get"))}function Vnt(t,e,o){Lnt(t,e),e.set(t,o)}function Fnt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,znt(t,e,"set"),o),o}function $nt(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}const Unt="selectionHandles";var jnt=new WeakMap,qnt=new WeakMap,Gnt=new WeakMap,Ynt=new WeakMap,Xnt=new WeakMap,Knt=new WeakMap,Znt=new WeakMap,Qnt=new WeakMap,Jnt=new WeakSet,tit=new WeakMap,eit=new WeakMap,oit=new WeakMap;class nit extends pW{static get PLUGIN_KEY(){return Unt}static get PLUGIN_PRIORITY(){return 24}static get SETTING_KEYS(){return[Unt]}isEnabled(){return!0===this.hot.getSettings()[Unt]}isDragActive(){return null!==Bnt(this,jnt)}enablePlugin(){this.enabled||(this.addHook("afterOnSelectionHandleMouseDown",Bnt(this,Knt)),this.addHook("beforeOnCellMouseOver",Bnt(this,Xnt)),this.addHook("afterScroll",Bnt(this,Qnt)),this.eventManager.addEventListener(this.hot.rootElement,"mouseleave",Bnt(this,tit)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mouseup",Bnt(this,eit)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),Bnt(this,oit).call(this),this.hot.selection.setHandlesHoveredLayer(null)}destroy(){Bnt(this,oit).call(this),super.destroy()}constructor(...t){var e,o;super(...t),Lnt(e=this,o=Jnt),o.add(e),Vnt(this,jnt,{writable:!0,value:void 0}),Vnt(this,qnt,{writable:!0,value:void 0}),Vnt(this,Gnt,{writable:!0,value:void 0}),Vnt(this,Ynt,{writable:!0,value:void 0}),Vnt(this,Xnt,{writable:!0,value:void 0}),Vnt(this,Knt,{writable:!0,value:void 0}),Vnt(this,Znt,{writable:!0,value:void 0}),Vnt(this,Qnt,{writable:!0,value:void 0}),Vnt(this,tit,{writable:!0,value:void 0}),Vnt(this,eit,{writable:!0,value:void 0}),Vnt(this,oit,{writable:!0,value:void 0}),Fnt(this,jnt,null),Fnt(this,qnt,null),Fnt(this,Gnt,""),Fnt(this,Ynt,null),Fnt(this,Xnt,(t,e)=>{Fnt(this,qnt,e),Bnt(this,jnt)||this.hot.selection.setHandlesHoveredLayer(this.hot.selection.getLayerContaining(e))}),Fnt(this,Knt,(t,e)=>{if(mn(t))return;const o=this.hot.selection,n=o.getHandlesHoveredLayer()??o.getLayerLevel(),i=o.getSelectedRange().peekByIndex(n);if(!i)return;const s=i.getTopStartCorner(),r=i.getBottomEndCorner(),l=i.highlight,a=s.row,h=s.col,c=r.row,d=r.col;Fnt(this,jnt,{edge:e,layer:n,fromRow:a,fromCol:h,toRow:c,toCol:d,focusRow:l.row??a,focusCol:l.col??h}),Fnt(this,Ynt,{clientX:t.clientX,clientY:t.clientY}),Fnt(this,Gnt,this.hot.rootDocument.body.style.cursor),this.hot.rootDocument.body.style.cursor="top"===e||"bottom"===e?"ns-resize":"ew-resize",po(this.hot.rootElement,`ht__resizing-selection--${e}`),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mousemove",Bnt(this,Znt)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"mouseup",Bnt(this,oit))}),Fnt(this,Znt,t=>{t instanceof this.hot.rootWindow.MouseEvent&&Bnt(this,jnt)&&(Fnt(this,Ynt,{clientX:t.clientX,clientY:t.clientY}),$nt(this,Jnt,iit).call(this,t.clientX,t.clientY))}),Fnt(this,Qnt,()=>{Bnt(this,jnt)&&Bnt(this,Ynt)&&$nt(this,Jnt,iit).call(this,Bnt(this,Ynt).clientX,Bnt(this,Ynt).clientY)}),Fnt(this,tit,()=>{Bnt(this,jnt)||this.hot.selection.setHandlesHoveredLayer(null)}),Fnt(this,eit,()=>{!Bnt(this,jnt)&&Bnt(this,qnt)&&this.hot.selection.setHandlesHoveredLayer(this.hot.selection.getLayerContaining(Bnt(this,qnt)))}),Fnt(this,oit,()=>{Bnt(this,jnt)&&(Fnt(this,jnt,null),Fnt(this,Ynt,null),this.eventManager.removeEventListener(this.hot.rootDocument.documentElement,"mousemove",Bnt(this,Znt)),this.eventManager.removeEventListener(this.hot.rootDocument.documentElement,"mouseup",Bnt(this,oit)),fo(this.hot.rootElement,["ht__resizing-selection--top","ht__resizing-selection--bottom","ht__resizing-selection--start","ht__resizing-selection--end"]),this.hot.rootDocument.body.style.cursor=Bnt(this,Gnt))})}}function iit(t,e){if(!Bnt(this,jnt))return;const{edge:o,layer:n,fromRow:i,toRow:s,fromCol:r,toCol:l,focusRow:a,focusCol:h}=Bnt(this,jnt),c=vO(this.hot,t,e);let d,u;"top"===o?(d=this.hot._createCellCoords(s,l),u=this.hot._createCellCoords(Dnt({edge:o,target:c.row,oppositeIndex:s}),r)):"bottom"===o?(d=this.hot._createCellCoords(i,r),u=this.hot._createCellCoords(Dnt({edge:o,target:c.row,oppositeIndex:i}),l)):"start"===o?(d=this.hot._createCellCoords(s,l),u=this.hot._createCellCoords(i,Dnt({edge:o,target:c.col,oppositeIndex:l}))):(d=this.hot._createCellCoords(i,r),u=this.hot._createCellCoords(s,Dnt({edge:o,target:c.col,oppositeIndex:r})));const g=this.hot.selection.getSelectedRange().peekByIndex(n);if(!g)return;const p=Math.min(Math.max(a,Math.min(d.row,u.row)),Math.max(d.row,u.row)),f=Math.min(Math.max(h,Math.min(d.col,u.col)),Math.max(d.col,u.col));g.setFrom(d),g.setTo(d),g.setHighlight(this.hot._createCellCoords(p,f)),this.hot.selection.setRangeEnd(u,n)}class sit{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.viewportWidth=0,this.baseWidths=new Map,this.stretchedWidths=new Map,this.overwriteColumnWidthFn=t}}class rit extends sit{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,o=[],n=[];let i=this.viewportWidth,s=0;if(this.baseWidths.forEach((t,r)=>{const l=Math.round(t*e),a=this.overwriteColumnWidthFn(l,r);l===a&&l>=50?(o.push([r,a]),s+=a):l!==a&&(o.push([r,a]),n.push(r),i-=a)}),i<=50)return void this.stretchedWidths.clear();const r=i/s;let l=-1,a=0;o.forEach(([t,e],i)=>{let s=e;n.includes(t)||(s=Math.round(e*r)),this.stretchedWidths.set(t,s),l=t,i<o.length-1&&(a+=s)}),this.stretchedWidths.size>1&&this.stretchedWidths.set(l,Math.round(this.viewportWidth-a))}}function lit(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function ait(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,lit(t,e,"get"))}function hit(t,e,o){!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,o)}function cit(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,lit(t,e,"set"),o),o}var dit=new WeakMap,uit=new WeakMap;class git extends sit{prepare(t){super.prepare(t),cit(this,dit,0),cit(this,uit,-1)}setColumnBaseWidth(t,e){super.setColumnBaseWidth(t,e),cit(this,uit,t),cit(this,dit,e)}calculate(){if(-1===ait(this,uit))return;const t=Array.from(this.baseWidths).reduce((t,[,e])=>t+e,0),e=this.viewportWidth-t+ait(this,dit);e<ait(this,dit)?this.stretchedWidths.clear():this.stretchedWidths.set(ait(this,uit),e)}constructor(...t){super(...t),hit(this,dit,{writable:!0,value:void 0}),hit(this,uit,{writable:!0,value:void 0}),cit(this,dit,0),cit(this,uit,-1)}}function pit(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fit(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function mit(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,fit(t,e,"get"))}function wit(t,e,o){pit(t,e),e.set(t,o)}function bit(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,fit(t,e,"set"),o),o}function vit(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Cit(t,e){pit(t,e),e.add(t)}var yit=new WeakMap,Sit=new WeakMap,kit=new WeakMap,Rit=new WeakMap,Eit=new WeakSet,xit=new WeakSet,Mit=new WeakSet;class Tit{useStrategy(t){bit(this,Rit,"string"==typeof t&&mit(this,kit).has(t)?t:"none")}refreshStretching(){"none"!==mit(this,Rit)?mit(this,yit).batchExecution(()=>{mit(this,Sit).clear();const t=mit(this,kit).get(mit(this,Rit));if(!t)return;let e=mit(this,yit).view.getViewportWidth();vit(this,Eit,Hit).call(this)&&(e-=jo(mit(this,yit).rootDocument)),t.prepare({viewportWidth:e});for(let e=0;e<mit(this,yit).countCols();e++)mit(this,yit).columnIndexMapper.isHidden(mit(this,yit).toPhysicalColumn(e))||t.setColumnBaseWidth(e,vit(this,xit,Iit).call(this,e));t.calculate(),t.getWidths().forEach(([t,e])=>{mit(this,Sit).setValueAtIndex(mit(this,yit).toPhysicalColumn(t),e)})},!0):mit(this,Sit).clear()}getStretchedWidth(t){return mit(this,Sit).getValueAtIndex(mit(this,yit).toPhysicalColumn(t))}constructor(t){Cit(this,Eit),Cit(this,xit),Cit(this,Mit),wit(this,yit,{writable:!0,value:void 0}),wit(this,Sit,{writable:!0,value:void 0}),wit(this,kit,{writable:!0,value:void 0}),wit(this,Rit,{writable:!0,value:void 0}),bit(this,kit,new Map([["all",new rit(vit(this,Mit,_it).bind(this))],["last",new git(vit(this,Mit,_it).bind(this))]])),bit(this,Rit,"none"),bit(this,yit,t),bit(this,Sit,mit(this,yit).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}}function Hit(){const{view:t,stylesHandler:e}=mit(this,yit);if(t.isVerticallyScrollableByWindow())return!1;const o=t.getViewportHeight(),n=mit(this,yit).countRows(),i=e.getDefaultRowHeight();let s=0,r=!1;for(let t=0;t<n;t++)if(!mit(this,yit).rowIndexMapper.isHidden(mit(this,yit).toPhysicalRow(t))&&(s+=mit(this,yit).getRowHeight(t)??i,s>o)){r=!0;break}return r}function Iit(t){return mit(this,yit).getColWidth(t,"StretchColumns")??50}function _it(t,e){return mit(this,yit).runHooks("beforeStretchingColumnWidth",t,e)}function Ait(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Wit(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Ait(t,e,"get"))}function Oit(t,e,o){!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,o)}function Nit(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Ait(t,e,"set"),o),o}var Pit=new WeakMap,Dit=new WeakMap,Lit=new WeakMap,zit=new WeakMap,Bit=new WeakMap;class Vit extends pW{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||(Wit(this,Pit).useStrategy(this.hot.getSettings().stretchH),Wit(this,Lit).observe(this.hot.rootElement),this.addHook("beforeRender",Wit(this,Bit)),this.addHook("modifyColWidth",Wit(this,zit),10),super.enablePlugin())}updatePlugin(){Wit(this,Pit).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),Wit(this,Lit).unobserve(this.hot.rootElement)}getColumnWidth(t){return Wit(this,Pit).getStretchedWidth(t)}destroy(){Wit(this,Lit).disconnect(),Nit(this,Lit,null),Nit(this,Pit,null),super.destroy()}constructor(...t){super(...t),Oit(this,Pit,{writable:!0,value:void 0}),Oit(this,Dit,{writable:!0,value:void 0}),Oit(this,Lit,{writable:!0,value:void 0}),Oit(this,zit,{writable:!0,value:void 0}),Oit(this,Bit,{writable:!0,value:void 0}),Nit(this,Pit,new Tit(this.hot)),Nit(this,Dit,null),Nit(this,Lit,new ResizeObserver(t=>{requestAnimationFrame(()=>{this.hot?.view?.isHorizontallyScrollableByWindow()&&t.forEach(({contentRect:t})=>{null!==Wit(this,Dit)&&Wit(this,Dit)!==t.width&&(this.hot?.view?.adjustElementsSize(),this.hot?.refreshDimensions()),Nit(this,Dit,t.width)})})})),Nit(this,zit,(t,e,o)=>{if(o===this.pluginName)return;const n=this.getColumnWidth(e);return"number"==typeof n?n:t}),Nit(this,Bit,t=>{t&&Wit(this,Pit).refreshStretching()})}}function Fit(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function $it(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Fit(t,e,"get"))}function Uit(t,e,o){!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,o)}function jit(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Fit(t,e,"set"),o),o}var qit=new WeakMap,Git=new WeakMap,Yit=new WeakMap;class Xit extends pW{static get PLUGIN_KEY(){return"touchScroll"}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return Ne()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",$it(this,qit)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",$it(this,Git)),this.addHook("afterMomentumScroll",$it(this,Yit))}constructor(...t){super(...t),Uit(this,qit,{writable:!0,value:void 0}),Uit(this,Git,{writable:!0,value:void 0}),Uit(this,Yit,{writable:!0,value:void 0}),this.scrollbars=[],this.clones=[],this.lockedCollection=!1,this.freezeOverlays=!1,jit(this,qit,()=>{if(this.lockedCollection)return;const{topOverlay:t,bottomOverlay:e,inlineStartOverlay:o,topInlineStartCornerOverlay:n,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(o),n&&this.scrollbars.push(n),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),o.needFullRender&&this.clones.push(o.clone?.wtTable.holder.parentNode),n&&this.clones.push(n.clone?.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}),jit(this,Git,()=>{this.freezeOverlays=!0,$(this.clones,t=>{po(t,"hide-tween")})}),jit(this,Yit,()=>{this.freezeOverlays=!1,$(this.clones,t=>{fo(t,"hide-tween"),po(t,"show-tween")}),this.hot._registerTimeout(()=>{$(this.clones,t=>{fo(t,"show-tween")})},400),$(this.scrollbars,t=>{t.refresh(),t.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()})}}function Kit(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Zit(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Kit(t,e,"get"))}function Qit(t,e,o){!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,o)}function Jit(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Kit(t,e,"set"),o),o}const tst="trimRows";var est=new WeakMap;class ost extends pW{static get PLUGIN_KEY(){return tst}static get PLUGIN_PRIORITY(){return 330}static get SETTING_KEYS(){return[tst]}isEnabled(){return!!this.hot.getSettings()[tst]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.createAndRegisterIndexMap("trimRows","trimming"),this.trimmedRowsMap.addLocalHook("init",Zit(this,est)),this.hot.rowIndexMapper.getNumberOfIndexes()>0&&Zit(this,est).call(this),super.enablePlugin())}updatePlugin(){const t=this.hot.getSettings()[tst];Array.isArray(t)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),$(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(),o=this.isValidConfig(t);let n=e;o&&(n=Array.from(new Set(e.concat(t))));!1!==this.hot.runHooks("beforeTrimRow",e,n,o)&&(o&&this.hot.batchExecution(()=>{$(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0),this.hot.runHooks("afterTrimRow",e,n,o,o&&n.length>e.length))}trimRow(...t){this.trimRows(t)}untrimRows(t){const e=this.getTrimmedRows(),o=this.isValidConfig(t);let n=e;const i=this.trimmedRowsMap.getValues().slice(),s=t.length>0;o&&s&&($(t,t=>{i[t]=!1}),n=B(i,(t,e,o)=>(e&&t.push(o),t),[]));!1!==this.hot.runHooks("beforeUntrimRow",e,n,o&&s)&&(o&&s&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",e,n,o&&s,o&&n.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),Qit(this,est,{writable:!0,value:void 0}),this.trimmedRowsMap=null,Jit(this,est,()=>{const t=this.hot.getSettings()[tst];Array.isArray(t)&&this.hot.batchExecution(()=>{$(t,t=>{this.trimmedRowsMap.setValueAtIndex(t,!0)})},!0)})}}class nst{undo(...t){ce("Not implemented")}redo(...t){ce("Not implemented")}constructor(t){this.actionType="",this.actionType=t}}class ist extends nst{static startRegisteringEvents(t,e){t.addHook("beforeCellAlignment",(t,o,n,i)=>{e.done(()=>new ist({stateBefore:t,range:o,type:n,alignment:i}))})}undo(t,e){$(this.range,e=>{e.forAll((e,o)=>(e>=0&&o>=0&&t.setCellMeta(e,o,"className",this.stateBefore[e][o]||" htLeft"),!0))}),t.addHookOnce("afterViewRender",e),t.render()}redo(t,e){tL(this.range,this.type,this.alignment,(e,o)=>t.getCellMetaTransient(e,o),(e,o,n,i)=>t.setCellMeta(e,o,n,i)),t.addHookOnce("afterViewRender",e),t.render()}constructor({stateBefore:t,range:e,type:o,alignment:n}){super("cell_alignment"),this.stateBefore=t,this.range=e,this.type=o,this.alignment=n}}class sst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeColumnMove",(t,o)=>{!1!==t&&e.done(()=>new sst({columns:t,finalIndex:o}))})}undo(t,e){const o=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e);NQ(this.columns,this.finalColumnIndex,t.columnIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:t,to:e})=>{t<e&&(e-=1),o.moveColumn(e,t)}),t.render(),t.deselectCell(),t.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)}redo(t,e){const o=t.getPlugin("manualColumnMove");t.addHookOnce("afterViewRender",e),o.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 rst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeColumnSort",(t,o,n)=>{n&&e.done(()=>new rst({currentSortState:t,newSortState:o}))})}undo(t,e){const o=t.getPlugin("columnSorting"),n=t.getPlugin("multiColumnSorting"),i=n.isEnabled()?n:o;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),e()}redo(t,e){const o=t.getPlugin("columnSorting"),n=t.getPlugin("multiColumnSorting");(n.isEnabled()?n:o).sort(this.nextSortState),e()}constructor({currentSortState:t,newSortState:e}){super("col_sort"),this.previousSortState=t,this.nextSortState=e}}const lst=[{readKey:"fixedRowsTop",writeKey:"fixedRowsTop"},{readKey:"fixedRowsBottom",writeKey:"fixedRowsBottom"}],ast=[{readKey:"fixedColumnsStart",writeKey:"_fixedColumnsStart"}];function hst(t,e,o){const n=t.getSettings(),i=e.map(({readKey:t})=>n[t]??0),s=()=>{let t=!1;return e.forEach(({readKey:e,writeKey:o},s)=>{(n[e]??0)<i[s]&&(n[o]=i[s],t=!0)}),t},r=()=>{s()};t.addHookOnce("beforeRender",r),o(),t.removeHook("beforeRender",r),s()&&t.render()}class cst extends nst{static startRegisteringEvents(t,e){t.addHook("afterCreateCol",(t,o,n)=>{e.done(()=>new cst({index:t,amount:o}),n)})}undo(t,e){t.addHookOnce("afterRemoveCol",e),hst(t,ast,()=>{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 dst extends nst{static startRegisteringEvents(t,e){t.addHook("afterCreateRow",(t,o,n)=>{e.done(()=>new dst({index:t,amount:o}),n)})}undo(t,e){const o=t.countRows(),n=t.getSettings().minSpareRows;this.index>=o&&this.index-(n??0)<o&&(this.index-=n??0),t.addHookOnce("afterRemoveRow",e),hst(t,lst,()=>{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 ust extends nst{static startRegisteringEvents(t,e){const o=e;t.addHook("beforeChange",function(e,n){if(!(e&&e.length))return;const i=e.filter(t=>null!=t&&Array.isArray(t));if(0===i.length)return;i.find(t=>{const[,,e,o]=t;return e!==o});const s=i.length;o.done(()=>{const e=i.map(t=>[...t]);e.forEach(e=>{e[1]=t.propToCol(e[1])});const o=s>1?this.getSelected():[[e[0][0],e[0][1]]];return new ust({changes:e,selected:o,countCols:t.countCols(),countRows:t.countRows()})},n)},1e3)}undo(t,e){const o=pe(this.changes);for(let t=0,e=o.length;t<e;t++)o[t].splice(3,1);t.addHookOnce("afterChange",()=>{const o=t.countRows()-this.countRows;o>0&&t.alter("remove_row",void 0,o,"UndoRedo.undo");const n=t.countCols()-this.countCols;n>0&&t.isColumnModificationAllowed()&&t.alter("remove_col",void 0,n,"UndoRedo.undo"),t.scrollToFocusedCell(),t.selectCells(this.selected,!1,!1),e()}),t.setDataAtCell(o,null,null,"UndoRedo.undo")}redo(t,e){const o=pe(this.changes);for(let t=0,e=o.length;t<e;t++)o[t].splice(2,1);t.addHookOnce("afterChange",()=>{t.selectCells(this.selected,!1,!1),e()}),t.setDataAtCell(o,null,null,"UndoRedo.redo")}constructor({changes:t,selected:e,countCols:o,countRows:n}){super("change"),this.changes=t,this.selected=e,this.countCols=o,this.countRows=n}}class gst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeFilter",(t,o)=>{e.done(()=>new gst({conditionsStack:t,previousConditionsStack:o}))})}undo(t,e){const o=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),o.importConditions(this.previousConditionsStack),o.filter()}redo(t,e){const o=t.getPlugin("filters");t.addHookOnce("afterViewRender",e),o.importConditions(this.conditionsStack),o.filter()}constructor({conditionsStack:t,previousConditionsStack:e}){super("filter"),this.conditionsStack=t,this.previousConditionsStack=e}}class pst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeMergeCells",(o,n)=>{if(n)return;const i=o,s=i.getTopStartCorner(),r=i.getBottomEndCorner(),l=t.getData(s.row??void 0,s.col??void 0,r.row??void 0,r.col??void 0);e.done(()=>new pst({data:l,cellRange:i}))})}undo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();t.populateFromArray(n.row??0,n.col??0,this.data,void 0,void 0,"MergeCells")}redo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.mergeRange(this.cellRange)}constructor({data:t,cellRange:e}){super("merge_cells"),this.cellRange=e,this.data=t}}function fst(t,e,o,n,i){const s=[];for(let r=e;r<=n;r++){const e=t.toPhysicalRow(r),n=[];for(let s=o;s<=i;s++)n.push(t.getSourceDataAtCell(e,s));s.push(n)}return{fromRow:e,fromCol:o,toRow:n,toCol:i,data:s,meta:l7(t,e,o,n,i)}}function mst(t,e){const{fromRow:o,fromCol:n,toRow:i,toCol:s,data:r,meta:l}=e;t.populateFromArray(o,n,r,i,s,"UndoRedo.undo");const a=new Map(l.map(t=>[`${t.row}:${t.col}`,t.meta]));l7(t,o,n,i,s).forEach(({row:e,col:o,meta:n})=>{const i=a.get(`${e}:${o}`);for(const s of r7)!Te(n,s)||i&&Te(i,s)||t.removeCellMeta(e,o,s)}),l.forEach(({row:e,col:o,meta:n})=>{for(const i of r7)Te(n,i)&&t.setCellMeta(e,o,i,n[i])})}class wst extends nst{static startRegisteringEvents(t,e){const o=e;let n=null;t.addHook("beforeMoveCells",(e,o,i)=>{if(!Rr(e))return n=null,!1;const s=e,r=o,l=s.getTopStartCorner(),a=s.getBottomEndCorner(),h=l.row,c=l.col,d=a.row,u=a.col,g=d-h+1,p=u-c+1,f=r.row+g-1,m=r.col+p-1,w=fst(t,h,c,d,u),b=fst(t,r.row,r.col,f,m);n={sourceSnapshot:w,targetSnapshot:b,isCopy:i}}),t.addHook("afterMoveCells",()=>{if(null===n)return;const t=n;n=null,o.done(()=>new wst(t))})}undo(t,e){t.batch(()=>{mst(t,this.targetSnapshot),this.isCopy||mst(t,this.sourceSnapshot)}),t.render(),t.deselectCell();const{fromRow:o,fromCol:n,toRow:i,toCol:s}=this.sourceSnapshot;t.selectCells([[o,n,i,s]],!1,!1),e()}redo(t,e){const{fromRow:o,fromCol:n,toRow:i,toCol:s}=this.sourceSnapshot,{fromRow:r,fromCol:l}=this.targetSnapshot,a=i-o+1,h=s-n+1,c=t._createCellRange(t._createCellCoords(o,n),t._createCellCoords(o,n),t._createCellCoords(i,s)),d=t._createCellCoords(r,l),u=()=>{t.render();const o=r+a-1,n=l+h-1;t.selectCells([[r,l,o,n]],!1,!1),e()},g=t.getPlugin("moveCells");g?(t.addHookOnce("afterMoveCells",u),g.moveCellRange(c,d,this.isCopy)||(t.removeHook("afterMoveCells",u),e({wasRedone:!1}))):e({wasRedone:!1})}constructor({sourceSnapshot:t,targetSnapshot:e,isCopy:o}){super("move_cells"),this.sourceSnapshot=t,this.targetSnapshot=e,this.isCopy=o}}function bst(t,e,o,n,i){const s=[];return as(n,i,n=>{as(e,o,e=>{const o=t.getCellMeta(e,n);s.push([o.visualRow,o.visualCol,o])})}),s}function vst(t,e,o,n){const i=t.getPlugin("mergeCells");if(!i?.enabled)return[];const s="row"===e?"rowspan":"colspan",r=o+n-1,l=[];return i.mergedCellsCollection?.mergedCells.forEach(t=>{const n=t[e],i=n+t[s]-1;if(n<=r&&i>=o){const{row:e,col:o,rowspan:n,colspan:i}=t;l.push({row:e,col:o,rowspan:n,colspan:i})}}),l}function Cst(t,e){if(!e||0===e.length)return;const o=t.getPlugin("mergeCells");o?.enabled&&e.forEach(({row:e,col:n,rowspan:i,colspan:s})=>{const r=e+i-1,l=n+s-1,a=t._createCellCoords(e,n),h=t._createCellCoords(r,l),c=t._createCellRange(a,a,h);o.unmergeRange(c,!0),o.merge(e,n,r,l)})}class yst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeRemoveCol",(o,n,i,s)=>{e.done(()=>{const e=t.getSourceDataArray(),i=(t.countCols()+o)%t.countCols(),s=i+n-1,r=[],l=[],a=[];if(as(e.length-1,o=>{r.push(((e,o,n)=>{const i=[];return as(o,n,o=>{i.push(e[t.toPhysicalColumn(o)])}),i})(e[o],i,s))}),as(n-1,e=>{a.push(t.toPhysicalColumn(i+e))}),Array.isArray(t.getSettings().colHeaders)){const e=t.getSettings().colHeaders;as(n-1,o=>{l.push(e[t.toPhysicalColumn(i+o)]||null)})}return new yst({index:i,indexes:a,data:r,amount:n,headers:l,columnPositions:t.columnIndexMapper.getIndexesSequence(),rowPositions:t.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:t.getSettings().fixedColumnsStart??0,removedCellMetas:bst(t,0,t.countRows(),i,s),removedMergedCells:vst(t,"col",i,n)})},s)})}undo(t,e){t.getSettings()._fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort((t,e)=>t-e),n=(t,e,n)=>n[this.indexes.indexOf(o[e])],i=this.data.length,s=[];for(let t=0;t<i;t++)s.push(F(this.data[t],n));const r=F(this.headers,n),l=[];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),$(t.getSourceDataArray(),(t,e)=>{const n=t;$(o,(t,o)=>{n[t]=s[e][o],l.push([e,t,n[t]])})}),void 0!==this.headers&&$(r,(e,n)=>{t.getSettings().colHeaders[o[n]]=e}),this.removedCellMetas.forEach(e=>{const[o,n,i]=e;t.setCellMetaObject(o,n,i)}),Cst(t,this.removedMergedCells),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(l,void 0,void 0,"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:o,amount:n,headers:i,columnPositions:s,rowPositions:r,fixedColumnsStart:l,removedCellMetas:a,removedMergedCells:h}){super("remove_col"),this.index=t,this.indexes=e,this.data=o,this.amount=n,this.headers=i,this.columnPositions=s.slice(0),this.rowPositions=r.slice(0),this.fixedColumnsStart=l,this.removedCellMetas=a,this.removedMergedCells=h}}class Sst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeRemoveRow",(o,n,i,s)=>{e.done(()=>{const e=t.toPhysicalRow(o),i=e+n-1,s=[];for(let o=0;o<n;o++){const n=pe(t.getSourceDataAtRow(e+o));n&&"object"==typeof n&&!Array.isArray(n)&&delete n.__children,s.push(n)}return new Sst({index:e,data:s,fixedRowsBottom:t.getSettings().fixedRowsBottom??0,fixedRowsTop:t.getSettings().fixedRowsTop??0,rowIndexesSequence:t.rowIndexMapper.getIndexesSequence(),removedCellMetas:bst(t,e,i,0,t.countCols()-1),removedMergedCells:vst(t,"row",o,n)})},s)})}undo(t,e){const o=t.getSettings(),n=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach((t,e)=>{const o=t;Object.keys(o).forEach(t=>{const i=Number.parseInt(t,10);n.push([this.index+e,isNaN(i)?t:i,o[t]])})}),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=>{const[o,n,i]=e;t.setCellMetaObject(o,n,i)}),Cst(t,this.removedMergedCells),t.addHookOnce("afterViewRender",e),t.setSourceDataAtCell(n,void 0,void 0,"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:o,fixedRowsTop:n,rowIndexesSequence:i,removedCellMetas:s,removedMergedCells:r}){super("remove_row"),this.index=t,this.data=e,this.fixedRowsBottom=o,this.fixedRowsTop=n,this.rowIndexesSequence=i,this.removedCellMetas=s,this.removedMergedCells=r}}class kst extends nst{static startRegisteringEvents(t,e){t.addHook("beforeRowMove",(t,o)=>{!1!==t&&e.done(()=>new kst({rows:t,finalIndex:o}))})}undo(t,e){const o=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e);NQ(this.rows,this.finalRowIndex,t.rowIndexMapper.getNumberOfIndexes()).reverse().forEach(({from:t,to:e})=>{t<e&&(e-=1),o.moveRow(e,t)}),t.render(),t.deselectCell(),t.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)}redo(t,e){const o=t.getPlugin("manualRowMove");t.addHookOnce("afterViewRender",e),o.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 Rst extends nst{static startRegisteringEvents(t,e){t.addHook("afterUnmergeCells",(t,o)=>{o||e.done(()=>new Rst({cellRange:t}))})}undo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.mergeRange(this.cellRange,!0)}redo(t,e){const o=t.getPlugin("mergeCells");t.addHookOnce("afterViewRender",e),o.unmergeRange(this.cellRange,!0),t.render()}constructor({cellRange:t}){super("unmerge_cells"),this.cellRange=t}}function Est(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function xst(t,e,o){!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,o)}function Mst(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Est(t,e,"set"),o),o}const Tst="undoRedo";Qn.getSingleton().register("beforeUndo"),Qn.getSingleton().register("afterUndo"),Qn.getSingleton().register("beforeRedo"),Qn.getSingleton().register("afterRedo");var Hst=new WeakMap;class Ist extends pW{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(){var t;this.enabled||(this.addHook("afterChange",function(t,e){return e.get?e.get.call(t):e.value}(t=this,Est(t,Hst,"get"))),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:Tst};t?.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],{...e})}unregisterShortcuts(){const t=this.hot.getShortcutManager().getContext("grid");t?.removeShortcutsByGroup(Tst)}done(t,e){if(this.ignoreNewActions)return;if("UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e)return;const o=this.doneActions.slice();if(!1===this.hot.runHooks("beforeUndoStackChange",o,e))return;const n=t(),i=this.undoneActions.slice();null!==n&&this.doneActions.push(n),this.hot.runHooks("afterUndoStackChange",o,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 o=pe(e);if(!1===this.hot.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const n=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",n),e.undo(this.hot,()=>{this.ignoreNewActions=!1,this.undoneActions.push(e)}),this.hot.runHooks("afterRedoStackChange",n,this.undoneActions.slice()),this.hot.runHooks("afterUndo",o)}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 o=pe(e);if(!1===this.hot.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const n=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",n);e.redo(this.hot,t=>{this.ignoreNewActions=!1,!1===t?.wasRedone?this.undoneActions.push(e):this.doneActions.push(e)}),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("afterRedo",o)}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=[],this.undoneActions=[],super.destroy()}constructor(t){var e,o;super(t),xst(this,Hst,{writable:!0,value:void 0}),this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,Mst(this,Hst,(t,e)=>{"loadData"===e&&this.clear()}),e=t,o=this,[ist,sst,rst,cst,dst,ust,gst,pst,wst,yst,Sst,kst,Rst].forEach(t=>t.startRegisteringEvents(e,o))}}const _st="ht-dialog";const Ast=["primary","secondary"];function Wst(t){return"string"==typeof t&&Ast.includes(t)}function Ost(t){return Wst(t)?t:"secondary"}const Nst=new Map([["base",function(){let t=null;const e={};return{TEMPLATE_NAME:"base",dialogA11YOptions:()=>({role:"dialog"}),compile:function(){const o=K`${`\n <div data-ref="contentElement" class="${_st}__content"></div>\n `}`;return Object.assign(e,o.refs),t=o.fragment,o},focusableElements:function(){return null===t&&ce("Compile the template first."),[]}}}],["confirm",function({id:t="",title:e="",description:o="",buttons:n=[]}){let i=null;const s={};return{TEMPLATE_NAME:"confirm",dialogA11YOptions:()=>({role:"alertdialog",ariaLabelledby:`${t}-dialog-confirm-title`,ariaDescribedby:o?`${t}-dialog-confirm-description`:void 0}),compile:function(){const r=K`${`\n <div tabindex="-1" data-ref="contentElement" class="${_st}__content-wrapper-inner">\n <div class="${_st}__content">\n <h2\n id="${t}-dialog-confirm-title"\n class="${_st}__title">${En(e)}</h2>\n <p\n id="${t}-dialog-confirm-description"\n class="${_st}__description">${En(o)}</p>\n </div>\n ${n.length>0?`\n <div data-ref="buttonsContainer" class="${_st}__buttons">\n ${n.map(t=>`\n <button class="ht-button ht-button--${Ost(t.type)}">${En(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&&ce("Compile the template first.");const{contentElement:t,buttonsContainer:e}=s,o=[];return e?o.push(...Array.from(e.children)):o.push(t),o}}}]]);function Pst(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Dst(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Lst(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Dst(t,e,"get"))}function zst(t,e,o){Pst(t,e),e.set(t,o)}function Bst(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Dst(t,e,"set"),o),o}function Vst(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function Fst(t,e){Pst(t,e),e.add(t)}const $st=`\n<div data-ref="dialogElement" class="${_st}">\n <div data-ref="dialogWrapperElement" class="${_st}__content-wrapper">\n</div>\n`;var Ust=new WeakMap,jst=new WeakMap,qst=new WeakMap,Gst=new WeakMap,Yst=new WeakMap,Xst=new WeakMap,Kst=new WeakMap,Zst=new WeakMap,Qst=new WeakSet,Jst=new WeakSet;class trt{useTemplate(t,e={}){if(!Nst.has(t)||"base"===t){ce(X`Invalid template: ${t}.\x20
|
|
127
|
+
Valid templates are: ${Array.from(Nst.keys()).filter(t=>"base"!==t).join(", ")}.`)}Bst(this,Yst,Nst.get(t)(e)),Bst(this,Xst,(e.buttons??[]).map(t=>t.callback))}useDefaultTemplate(){Bst(this,Yst,Nst.get("base")()),Bst(this,Xst,[])}install(){if(Lst(this,jst)?.dialogElement)return;const t=K`${$st}`;Bst(this,jst,t.refs);const{dialogElement:e}=Lst(this,jst);mo(e,[["aria-modal","true"],["dir",Lst(this,qst)?"rtl":"ltr"]]),e.addEventListener("transitionstart",()=>Vst(this,Jst,ort).call(this)),e.addEventListener("transitionend",()=>Vst(this,Qst,ert).call(this)),Lst(this,Ust)&&Lst(this,Ust).appendChild(t.fragment)}getContainer(){return Lst(this,jst).dialogElement}getFocusableElements(){return Lst(this,Yst).focusableElements()}updateDialog({isVisible:t,content:e,customClassName:o,background:n,contentBackground:i,animation:s,a11y:r}){const l=Lst(this,Yst).compile(),{dialogElement:a,dialogWrapperElement:h}=Lst(this,jst),c=r;h.innerHTML="",h.appendChild(l.fragment),Object.assign(Lst(this,jst),l.refs);const{contentElement:d,buttonsContainer:u}=Lst(this,jst);"base"!==Lst(this,Yst).TEMPLATE_NAME&&Object.assign(c,Lst(this,Yst).dialogA11YOptions());const g=o?` ${o}`:"",p=n?` ${_st}--background-${n}`:"",f=s?` ${_st}--animation`:"",m=t?` ${_st}--show`:"";var w;a.className=[_st,`${_st}--${Lst(this,Yst).TEMPLATE_NAME}`,"handsontable",g,p,f,m].join(" "),"base"===Lst(this,Yst).TEMPLATE_NAME&&mo(a,[b(-1)]),mo(a,["alertdialog"===c.role?["role","alertdialog"]:["role","dialog"]]),c.ariaLabel&&!c.ariaLabelledby?mo(a,[x(c.ariaLabel)]):wo(a,"aria-label"),c.ariaLabelledby?mo(a,[(w=c.ariaLabelledby,["aria-labelledby",w])]):wo(a,"aria-labelledby"),c.ariaDescribedby?mo(a,[M(c.ariaDescribedby)]):wo(a,"aria-describedby");return po(d,`${_st}__content${i?` ${_st}__content--background`:""}`),"base"===Lst(this,Yst).TEMPLATE_NAME?(d.innerHTML="","string"==typeof e?Ro(d,e,Lst(this,Kst),"dialog",Lst(this,Zst)):(en(e)||e instanceof DocumentFragment)&&d.appendChild(e)):u&&Array.from(u.children).forEach((t,e)=>{const o=Lst(this,Xst)[e];o&&t.addEventListener("click",o)}),this}showDialog(t){const{dialogElement:e}=Lst(this,jst);return e.style.display="block",t&&e.offsetHeight,po(e,`${_st}--show`),Bst(this,Gst,!1),this}hideDialog(t){const{dialogElement:e}=Lst(this,jst);return fo(e,`${_st}--show`),(t&&!Lst(this,Gst)||!t)&&(e.style.display="none"),Bst(this,Gst,!1),this}focusDialog(){Lst(this,jst).dialogElement.focus()}updateWidth(t){return Lst(this,jst).dialogElement.style.width=`${t}px`,this}destroyDialog(){Lst(this,jst)?.dialogElement.remove(),Bst(this,jst,void 0)}constructor({overlayContainer:t,isRtl:e,sanitizer:o,warnScope:n}){Fst(this,Qst),Fst(this,Jst),zst(this,Ust,{writable:!0,value:void 0}),zst(this,jst,{writable:!0,value:void 0}),zst(this,qst,{writable:!0,value:void 0}),zst(this,Gst,{writable:!0,value:void 0}),zst(this,Yst,{writable:!0,value:void 0}),zst(this,Xst,{writable:!0,value:void 0}),zst(this,Kst,{writable:!0,value:void 0}),zst(this,Zst,{writable:!0,value:void 0}),Bst(this,qst,!1),Bst(this,Gst,!1),Bst(this,Yst,Nst.get("base")()),Bst(this,Xst,[]),Bst(this,Ust,t),Bst(this,qst,e),Bst(this,Kst,o),Bst(this,Zst,n),this.install()}}function ert(){const{dialogElement:t}=Lst(this,jst);go(t,`${_st}--show`)||(t.style.display="none")}function ort(){Bst(this,Gst,!0)}function nrt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function irt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function srt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,irt(t,e,"get"))}function rrt(t,e,o){nrt(t,e),e.set(t,o)}function lrt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,irt(t,e,"set"),o),o}function art(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function hrt(t,e){nrt(t,e),e.add(t)}be(trt,Wh);const crt="dialog",drt=crt,urt=`plugin:${crt}`;var grt=new WeakMap,prt=new WeakMap,frt=new WeakMap,mrt=new WeakSet,wrt=new WeakSet,brt=new WeakSet,vrt=new WeakSet,Crt=new WeakSet;class yrt extends pW{static get PLUGIN_KEY(){return crt}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=>ye(t)&&typeof["alert","confirm"].includes(String(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=>ye(t)&&"string"==typeof t.text&&Wst(t.type)&&(void 0===t.callback||"function"==typeof t.callback))),content:t=>"string"==typeof t||en(t)||"undefined"!=typeof DocumentFragment&&t instanceof DocumentFragment,customClassName:t=>"string"==typeof t,background:t=>"string"==typeof t&&["solid","semi-transparent"].includes(t),contentBackground:t=>"boolean"==typeof t,animation:t=>"boolean"==typeof t,closable:t=>"boolean"==typeof t,a11y:t=>ye(t)&&(void 0===t?.role||"string"==typeof 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()[crt]}enablePlugin(){this.enabled||(srt(this,grt)||lrt(this,grt,new trt({overlayContainer:this.hot.rootOverlaysElement,sanitizer:xp(this.hot),warnScope:this.hot.rootElement,isRtl:this.hot.isRtl()})),art(this,mrt,Srt).call(this),art(this,brt,Rrt).call(this),this.addHook("afterViewRender",()=>art(this,Crt,xrt).call(this)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),art(this,wrt,krt).call(this),art(this,vrt,Ert).call(this),srt(this,grt)?.destroyDialog(),lrt(this,grt,null),super.disablePlugin()}isVisible(){return srt(this,prt)}show(t={}){this.enabled&&(this.isVisible()?this.update(t):(this.hot.runHooks("beforeDialogShow"),this.update(t),srt(this,grt).showDialog(this.getSetting("animation")),lrt(this,prt,!0),this.hot.getFocusScopeManager().activateScope(crt),lrt(this,frt,this.hot.selection.exportSelection()),this.hot.deselectCell(),this.hot.runHooks("afterDialogShow")))}hide(){if(this.isVisible()){if(this.hot.runHooks("beforeDialogHide"),srt(this,grt).hideDialog(this.getSetting("animation")),lrt(this,prt,!1),this.hot.getFocusScopeManager().deactivateScope(crt),srt(this,frt)&&srt(this,frt).ranges.length>0&&srt(this,frt).activeRange){const t=srt(this,frt);this.hot.selection.importSelection({ranges:t.ranges,activeRange:t.activeRange,activeSelectionLayer:t.activeSelectionLayer,selectedByRowHeader:t.selectedByRowHeader,selectedByColumnHeader:t.selectedByColumnHeader,disableHeadersHighlight:t.disableHeadersHighlight}),this.hot.view.render(),lrt(this,frt,null)}else this.hot.view.render(),lrt(this,frt,null);this.hot.runHooks("afterDialogHide")}}update(t){if(!this.enabled)return;this.updatePluginSettings(t);const e=this.getSetting("template");if(e!==yrt.DEFAULT_SETTINGS.template&&this.getSetting("content")!==yrt.DEFAULT_SETTINGS.content&&ce("The `template` option cannot be used together with the `content` option."),e){const t=e;srt(this,grt).useTemplate(t.type,{...t,id:this.hot.guid})}else srt(this,grt).useDefaultTemplate();srt(this,grt).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:o="Alert",description:n}=Ce(t)?t:{title:t};this.show({template:{type:"confirm",title:o,description:n,buttons:[{text:this.hot.getTranslatedPhrase(Xm),type:"primary",callback:(...t)=>e?.(...t)}]},contentBackground:!1,background:"solid",animation:!0,closable:!1})}showConfirm(t,e,o){const{title:n="Confirm",description:i}=Ce(t)?t:{title:t};this.show({template:{type:"confirm",title:n,description:i,buttons:[{text:this.hot.getTranslatedPhrase(Km),type:"secondary",callback:(...t)=>o?.(...t)},{text:this.hot.getTranslatedPhrase(Xm),type:"primary",callback:(...t)=>e?.(...t)}]},contentBackground:!0,background:"semi-transparent",animation:!0,closable:!1})}focus(){srt(this,grt).focusDialog()}destroy(){srt(this,grt)?.destroyDialog(),lrt(this,grt,null),lrt(this,prt,!1),lrt(this,frt,null),super.destroy()}constructor(...t){super(...t),hrt(this,mrt),hrt(this,wrt),hrt(this,brt),hrt(this,vrt),hrt(this,Crt),rrt(this,grt,{writable:!0,value:void 0}),rrt(this,prt,{writable:!0,value:void 0}),rrt(this,frt,{writable:!0,value:void 0}),lrt(this,grt,null),lrt(this,prt,!1),lrt(this,frt,null)}}function Srt(){const t=this.hot.getShortcutManager(),e=t.getContext(urt)??t.addContext(urt);e.addShortcut({keys:[["Escape"]],callback:()=>{this.hide()},runOnlyIf:()=>srt(this,prt)&&Boolean(this.getSetting("closable")),group:drt}),e.addShortcut({keys:[["Shift","Tab"],["Tab"]],preventDefault:!1,callback:t=>{this.hot._registerTimeout(()=>{t.shiftKey?this.hot.runHooks("dialogFocusPreviousElement"):this.hot.runHooks("dialogFocusNextElement")})},group:drt})}function krt(){const t=this.hot.getShortcutManager().getContext(urt);t?.removeShortcutsByGroup(drt)}function Rrt(){this.hot.getFocusScopeManager().registerScope(crt,srt(this,grt).getContainer(),{shortcutsContextName:urt,type:"modal",runOnlyIf:()=>this.isVisible(),onActivate:t=>{const e=this.hot.isListening(),o=srt(this,grt).getFocusableElements();o.length>0?"tab_from_above"===t?o[0]?.focus():"tab_from_below"===t&&o[o.length-1]?.focus():"tab_from_above"!==t&&"tab_from_below"!==t&&e&&!srt(this,grt).getContainer().contains(this.hot.rootDocument.activeElement)&&srt(this,grt).getContainer().focus(),e&&this.hot.runHooks("afterDialogFocus","unknown"===t?"show":t)}})}function Ert(){this.hot.getFocusScopeManager().unregisterScope(crt)}function xrt(){const{view:t}=this.hot,e=t.isHorizontallyScrollableByWindow()?t.getTotalTableWidth():t.getWorkspaceWidth();srt(this,grt).updateWidth(e)}function Mrt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Trt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Hrt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Trt(t,e,"get"))}function Irt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Trt(t,e,"set"),o),o}const _rt="loading";var Art=new WeakMap,Wrt=new WeakSet;class Ort extends pW{static get PLUGIN_KEY(){return _rt}static get PLUGIN_PRIORITY(){return 350}static get DEFAULT_SETTINGS(){return{icon:`<svg class="${x_}__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()[_rt]}enablePlugin(){this.enabled||(null===Hrt(this,Art)&&(Irt(this,Art,this.hot.getPlugin("dialog")),Hrt(this,Art)?.isEnabled()||(this.hot.getSettings().dialog=!0),this.hot.addHook("afterDialogFocus",()=>function(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}(this,Wrt,Nrt).call(this))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hide(),super.disablePlugin()}isVisible(){return Hrt(this,Art)?.isVisible()??!1}show(t={}){if(!this.isEnabled()||!Hrt(this,Art)||!Hrt(this,Art)?.isEnabled())return;if(this.isVisible())return void this.update(t);!1!==this.hot.runHooks("beforeLoadingShow")&&(this.update(t),Hrt(this,Art).show(),this.hot.runHooks("afterLoadingShow"))}hide(){if(!Hrt(this,Art)||!Hrt(this,Art)?.isEnabled()||!this.isVisible())return;!1!==this.hot.runHooks("beforeLoadingHide")&&(Hrt(this,Art).hide(),this.hot.runHooks("afterLoadingHide"))}update(t){if(!this.isEnabled()||!Hrt(this,Art)||!Hrt(this,Art)?.isEnabled())return;this.updatePluginSettings(t);const e=this.hot.guid,o=this.getSetting("icon"),n=this.getSetting("title")??this.hot.getTranslatedPhrase(Fb),i=this.getSetting("description"),s=function({id:t,icon:e,title:o,description:n}){return`\n <div class="${x_}__content">\n <i class="${x_}__icon">${e}</i>\n <div class="${x_}__text">\n <h2 id="${t}-${_rt}-title" class="${x_}__title">${Mn(o)}</h2>\n ${n?`<p id="${t}-${_rt}-description" class="${x_}__description">${Mn(n)}</p>`:""}\n </div>\n </div>\n `}({id:e,icon:o,title:n,description:i});Hrt(this,Art).update({content:s,customClassName:x_,background:0===this.hot.countSourceRows()?"solid":"semi-transparent",a11y:{role:"alertdialog",ariaLabelledby:`${e}-${_rt}-title`,ariaDescribedby:i?`${e}-${_rt}-description`:void 0}})}destroy(){Irt(this,Art,null),super.destroy()}constructor(...t){var e,o;super(...t),Mrt(e=this,o=Wrt),o.add(e),function(t,e,o){Mrt(t,e),e.set(t,o)}(this,Art,{writable:!0,value:void 0}),Irt(this,Art,null)}}function Nrt(){Hrt(this,Art).focus()}const Prt="ht-notification",Drt=["top-start","top-end","bottom-start","bottom-end"];function Lrt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function zrt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Lrt(t,e,"get"))}function Brt(t,e,o){!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,o)}function Vrt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Lrt(t,e,"set"),o),o}var Frt=new WeakMap,$rt=new WeakMap,Urt=new WeakMap,jrt=new WeakMap,qrt=new WeakMap,Grt=new WeakMap;class Yrt{install(){if(zrt(this,qrt))return;const t=zrt(this,Frt).ownerDocument,e=t.createElement("div");e.className=`${Prt} handsontable`,e.setAttribute("dir",zrt(this,jrt)?"rtl":"ltr"),Drt.forEach(o=>{const n=t.createElement("div");n.className=`${Prt}__stack ${Prt}__stack--${o}`,n.dataset.htNotificationPosition=o,n.tabIndex=-1,e.appendChild(n),zrt(this,Grt).set(o,n)}),zrt(this,Frt).appendChild(e),Vrt(this,qrt,e)}getHost(){return zrt(this,qrt)}getStack(t){return zrt(this,Grt).get(t)}setRtl(t){Vrt(this,jrt,t),zrt(this,qrt)&&zrt(this,qrt).setAttribute("dir",t?"rtl":"ltr")}setSanitizer(t){Vrt(this,$rt,t)}createToastElement(t,e,o){const n=zrt(this,Frt).ownerDocument,i=n.createElement("div"),s="error"===t.variant;i.className=`${Prt}__toast ${Prt}__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"),o&&(i.classList.add(`${Prt}__toast--animate`),i.classList.add(t.position.startsWith("top")?`${Prt}__toast--stack-top`:`${Prt}__toast--stack-bottom`));const r=n.createElement("div");r.className=`${Prt}__toast-inner`;const l=n.createElement("div");l.className=`${Prt}__accent`,l.setAttribute("aria-hidden","true"),r.appendChild(l);const a=n.createElement("div");if(a.className=`${Prt}__body`,t.title){const e=n.createElement("div");e.className=`${Prt}__title`,e.textContent=En(t.title),a.appendChild(e)}const h=n.createElement("div");if(h.className=`${Prt}__message`,"string"==typeof t.message?Ro(h,t.message,zrt(this,$rt),"notification",zrt(this,Urt)):h.appendChild(t.message),a.appendChild(h),t.actions?.length){const e=n.createElement("div");e.className=`${Prt}__actions`,t.actions.forEach((t,o)=>{const i=n.createElement("button");i.type="button",i.className=`ht-button ht-button--${Ost(t.type)}`,i.textContent=En(t.label),i.dataset.htNotificationAction=String(o),e.appendChild(i)}),a.appendChild(e)}if(r.appendChild(a),t.closable){const t=n.createElement("button");t.type="button",t.className=`${Prt}__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=zrt(this,Frt).ownerDocument.defaultView;return o?c.requestAnimationFrame(()=>{c.requestAnimationFrame(()=>{i.classList.add(`${Prt}__toast--visible`)})}):i.classList.add(`${Prt}__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 o=e?0:-1;t.querySelectorAll(`.${Prt}__toast`).forEach(t=>{const e=t,n=Array.from(e.querySelectorAll("button")).filter(t=>!t.disabled);n.forEach(t=>{t.tabIndex=o}),0===n.length?e.tabIndex=o:e.tabIndex=-1})}destroy(){zrt(this,qrt)?.remove(),Vrt(this,qrt,null),zrt(this,Grt).clear()}constructor({overlayElement:t,sanitizer:e,warnScope:o,isRtl:n}){Brt(this,Frt,{writable:!0,value:void 0}),Brt(this,$rt,{writable:!0,value:void 0}),Brt(this,Urt,{writable:!0,value:void 0}),Brt(this,jrt,{writable:!0,value:void 0}),Brt(this,qrt,{writable:!0,value:void 0}),Brt(this,Grt,{writable:!0,value:void 0}),Vrt(this,jrt,!1),Vrt(this,qrt,null),Vrt(this,Grt,new Map),Vrt(this,Frt,t),Vrt(this,$rt,e),Vrt(this,Urt,o),Vrt(this,jrt,n)}}function Xrt(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Krt(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Zrt(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Krt(t,e,"get"))}function Qrt(t,e,o){Xrt(t,e),e.set(t,o)}function Jrt(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Krt(t,e,"set"),o),o}function tlt(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function elt(t,e){Xrt(t,e),e.add(t)}const olt="notification",nlt=`plugin:${olt}`,ilt=`plugin:${olt}:global`,slt=olt,rlt=new Set(Drt),llt=new Set(["info","success","warning","error"]);var alt=new WeakMap,hlt=new WeakMap,clt=new WeakMap,dlt=new WeakMap,ult=new WeakMap,glt=new WeakMap,plt=new WeakMap,flt=new WeakMap,mlt=new WeakMap,wlt=new WeakSet,blt=new WeakSet,vlt=new WeakMap,Clt=new WeakSet,ylt=new WeakSet,Slt=new WeakSet,klt=new WeakSet,Rlt=new WeakSet,Elt=new WeakSet,xlt=new WeakSet,Mlt=new WeakSet,Tlt=new WeakSet,Hlt=new WeakSet,Ilt=new WeakSet,_lt=new WeakSet,Alt=new WeakSet,Wlt=new WeakSet,Olt=new WeakMap,Nlt=new WeakSet,Plt=new WeakSet,Dlt=new WeakSet,Llt=new WeakSet,zlt=new WeakSet,Blt=new WeakSet,Vlt=new WeakSet,Flt=new WeakSet,$lt=new WeakSet,Ult=new WeakSet,jlt=new WeakSet,qlt=new WeakSet,Glt=new WeakSet,Ylt=new WeakSet,Xlt=new WeakSet,Klt=new WeakSet,Zlt=new WeakSet,Qlt=new WeakSet,Jlt=new WeakSet,tat=new WeakSet,eat=new WeakSet;class oat extends pW{static get PLUGIN_KEY(){return olt}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()[olt]}enablePlugin(){this.enabled||(Zrt(this,alt)||Jrt(this,alt,new Yrt({overlayElement:this.hot.rootOverlaysElement,sanitizer:xp(this.hot),warnScope:this.hot.rootElement,isRtl:this.hot.isRtl()})),Zrt(this,alt).install(),tlt(this,_lt,mat).call(this),tlt(this,Alt,wat).call(this),this.eventManager.addEventListener(this.hot.rootDocument,"focusin",Zrt(this,Olt),!0),this.addHook("afterUpdateSettings",Zrt(this,vlt)),this.eventManager.addEventListener(this.hot.rootDocument,"visibilitychange",()=>{tlt(this,eat,zat).call(this)&&tlt(this,Jlt,Dat).call(this)}),super.enablePlugin(),Jrt(this,mlt,tlt(this,wlt,nat).call(this)))}updatePlugin(t){const e=tlt(this,wlt,nat).call(this);t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,olt)&&null!==Zrt(this,mlt)&&tlt(this,blt,iat).call(this,Zrt(this,mlt),e)||(this.disablePlugin(),this.enablePlugin()),super.updatePlugin()}disablePlugin(){this.hideAll(),tlt(this,Wlt,bat).call(this),tlt(this,Vlt,Eat).call(this),super.disablePlugin(),Zrt(this,alt)?.destroy(),Jrt(this,alt,null),Jrt(this,dlt,null),Jrt(this,ult,!1),Jrt(this,mlt,null)}showMessage(t){if(!this.enabled)return"";const e=tlt(this,Clt,sat).call(this,t);if(!1===this.hot.runHooks("beforeNotificationShow",e))return"";const o=this.getSetting("stackLimit");return tlt(this,ylt,rat).call(this,e.position)>=o?(Zrt(this,clt)[e.position].push(e),e.id):(tlt(this,Slt,lat).call(this,e),e.id)}hide(t){if(!this.enabled||!t)return;const e=Zrt(this,hlt).get(t);if(!e)return void tlt(this,Qlt,Pat).call(this,t);if(!1===this.hot.runHooks("beforeNotificationHide",t))return void(e.durationMs>0&&e.remainingMs<=0&&(e.remainingMs=e.durationMs));const o=this.hot.rootDocument.activeElement,n=o instanceof this.hot.rootWindow.HTMLElement&&e.element.contains(o);tlt(this,Flt,xat).call(this,e,!0),this.hot.runHooks("afterNotificationHide",t),tlt(this,Zlt,Nat).call(this,e.options.position),tlt(this,Klt,Oat).call(this,n)}hideAll(){if(!this.enabled)return;Drt.forEach(t=>{Zrt(this,clt)[t].length=0});[...Zrt(this,hlt).keys()].forEach(t=>this.hide(t))}isVisible(t){return void 0===t?Zrt(this,hlt).size>0:Zrt(this,hlt).has(t)}getQueueSize(){return Drt.reduce((t,e)=>t+Zrt(this,clt)[e].length,0)}destroy(){Drt.forEach(t=>{Zrt(this,clt)[t].length=0}),Zrt(this,hlt).clear(),tlt(this,Wlt,bat).call(this),tlt(this,Vlt,Eat).call(this),Zrt(this,alt)?.destroy(),Jrt(this,alt,null),Jrt(this,dlt,null),Jrt(this,ult,!1),Jrt(this,mlt,null),super.destroy()}constructor(...t){super(...t),elt(this,wlt),elt(this,blt),elt(this,Clt),elt(this,ylt),elt(this,Slt),elt(this,klt),elt(this,Rlt),elt(this,Elt),elt(this,xlt),elt(this,Mlt),elt(this,Tlt),elt(this,Hlt),elt(this,Ilt),elt(this,_lt),elt(this,Alt),elt(this,Wlt),elt(this,Nlt),elt(this,Plt),elt(this,Dlt),elt(this,Llt),elt(this,zlt),elt(this,Blt),elt(this,Vlt),elt(this,Flt),elt(this,$lt),elt(this,Ult),elt(this,jlt),elt(this,qlt),elt(this,Glt),elt(this,Ylt),elt(this,Xlt),elt(this,Klt),elt(this,Zlt),elt(this,Qlt),elt(this,Jlt),elt(this,tat),elt(this,eat),Qrt(this,alt,{writable:!0,value:void 0}),Qrt(this,hlt,{writable:!0,value:void 0}),Qrt(this,clt,{writable:!0,value:void 0}),Qrt(this,dlt,{writable:!0,value:void 0}),Qrt(this,ult,{writable:!0,value:void 0}),Qrt(this,glt,{writable:!0,value:void 0}),Qrt(this,plt,{writable:!0,value:void 0}),Qrt(this,flt,{writable:!0,value:void 0}),Qrt(this,mlt,{writable:!0,value:void 0}),Qrt(this,vlt,{writable:!0,value:void 0}),Qrt(this,Olt,{writable:!0,value:void 0}),Jrt(this,alt,null),Jrt(this,hlt,new Map),Jrt(this,clt,{"top-start":[],"top-end":[],"bottom-start":[],"bottom-end":[]}),Jrt(this,dlt,null),Jrt(this,ult,!1),Jrt(this,glt,!1),Jrt(this,plt,!1),Jrt(this,flt,!1),Jrt(this,mlt,null),Jrt(this,vlt,()=>{if(!this.enabled||!Zrt(this,alt))return;const t=this.hot.rootElement.getAttribute("dir");"rtl"===t||"ltr"===t?Zrt(this,alt).setRtl("rtl"===t):Zrt(this,alt).setRtl(this.hot.isRtl()),Zrt(this,alt).setSanitizer(xp(this.hot))}),Jrt(this,Olt,t=>{if(0===Zrt(this,hlt).size)return;const e=Zrt(this,alt)?.getHost(),o=t.target;if(o instanceof this.hot.rootWindow.HTMLElement&&e){if(e.contains(o)){if(null!==Zrt(this,dlt))return;const o=t.relatedTarget;return void(o instanceof this.hot.rootWindow.HTMLElement&&this.hot.rootWrapperElement.contains(o)&&!e.contains(o)&&Jrt(this,dlt,o))}tlt(this,Elt,cat).call(this)}})}}function nat(){return{stackLimit:this.getSetting("stackLimit"),animation:this.getSetting("animation")}}function iat(t,e){return t.stackLimit===e.stackLimit&&t.animation===e.animation}function sat(t){Ce(t)&&("string"==typeof t.message||"undefined"!=typeof HTMLElement&&t.message instanceof HTMLElement)||ce("Notification.showMessage expects an object with a `message` string or HTMLElement.");const e=`htn-${Sn()}`,o=t.variant&&llt.has(t.variant)?t.variant:"info",n=t.position&&rlt.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=>{Ce(t)&&"string"==typeof t.label&&"function"==typeof t.callback||ce("Each notification action needs `label` (string) and `callback` (function).");const e=Ost(t.type);return{label:t.label,type:e,callback:t.callback}}):[];return{id:e,variant:o,title:"string"==typeof t.title?t.title:void 0,message:t.message,duration:i,position:n,closable:s,actions:r}}function rat(t){let e=0;return Zrt(this,hlt).forEach(o=>{o.options.position===t&&(e+=1)}),e}function lat(t){const e=this.hot.getTranslatedPhrase(Ub),o=this.getSetting("animation"),{element:n}=Zrt(this,alt).createToastElement(t,e,o),i=Zrt(this,alt).getStack(t.position);if(i||ce(`Unknown notification position "${t.position}".`),t.position.startsWith("top")?i.prepend(n):i.appendChild(n),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:n,durationMs:s,remainingMs:s,paused:!1};Zrt(this,hlt).set(t.id,r),tlt(this,klt,aat).call(this,r),Zrt(this,ult)&&tlt(this,xlt,dat).call(this),this.hot.runHooks("afterNotificationShow",t.id,t),s>0&&tlt(this,Jlt,Dat).call(this)}function aat(t){t.toastEventDisposers=[this.eventManager.addEventListener(t.element,"click",e=>{tlt(this,Rlt,hat).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&&tlt(this,Jlt,Dat).call(this)})]}function hat(t,e){const o=t.target;if(!(o instanceof this.hot.rootWindow.HTMLElement))return;if(o.closest(`.${Prt}__close`))return void this.hide(e.id);const n=o.closest("[data-ht-notification-action]");if(!n||!e.element.contains(n))return;const i=Number.parseInt(n.dataset.htNotificationAction??"",10),s=e.options.actions[i];s&&s.callback()}function cat(){const t=Zrt(this,alt)?.getHost();t&&Yrt.setSequentialFocusWithinHost(t,!1),Jrt(this,ult,!1)}function dat(){const t=Zrt(this,alt)?.getHost();t&&0!==Zrt(this,hlt).size&&(Yrt.setSequentialFocusWithinHost(t,!0),Jrt(this,ult,!0))}function uat(){const t=Zrt(this,alt)?.getHost();if(!t||0===Zrt(this,hlt).size)return;const e=this.hot.rootDocument.activeElement;e instanceof this.hot.rootWindow.HTMLElement&&!t.contains(e)&&Jrt(this,dlt,e),this.hot.listen(),this.hot.getFocusScopeManager().activateScope(olt)}function gat(){const t=this.hot.getFocusScopeManager();t.getActiveScopeId()!==kk&&t.activateScope(kk)}function pat(){const t=this.hot.getFocusScopeManager();if(Jrt(this,flt,!0),t.getActiveScopeId()===olt)t.deactivateScope(olt);else{Jrt(this,flt,!1),tlt(this,Elt,cat).call(this);const t=Zrt(this,dlt);Jrt(this,dlt,null),t?.isConnected&&this.hot.getFocusManager().focusElement(t,{preventScroll:!0}),tlt(this,Tlt,gat).call(this)}}function fat(){const t=this.hot.rootDocument,e=Zrt(this,alt)?.getHost();e?.contains(t.activeElement)&&tlt(this,Hlt,pat).call(this)}function mat(){Zrt(this,plt)||(this.hot.getFocusScopeManager().registerScope(olt,Zrt(this,alt).getHost(),{shortcutsContextName:nlt,runOnlyIf:()=>Zrt(this,hlt).size>0,enableFocusCatchers:!1,onActivate:()=>{const t=Zrt(this,alt)?.getHost();t&&(tlt(this,xlt,dat).call(this),tlt(this,qlt,Iat).call(this))},onDeactivate:()=>{tlt(this,Elt,cat).call(this);if(Zrt(this,flt)){Jrt(this,flt,!1);const t=Zrt(this,dlt);Jrt(this,dlt,null),t?.isConnected&&this.hot.getFocusManager().focusElement(t,{preventScroll:!0}),tlt(this,Tlt,gat).call(this)}}}),Jrt(this,plt,!0))}function wat(){const t=this.hot.getShortcutManager(),e=t.getContext(nlt)??t.addContext(nlt),o=t.getOrCreateContext(ilt,"global"),n=t.getContext(kk),i={keys:[["f6"]],preventDefault:!0,callback:()=>{tlt(this,Mlt,uat).call(this)},runOnlyIf:()=>tlt(this,Ylt,Aat).call(this),group:slt};o.addShortcut(i),n&&n.addShortcut(i),e.addShortcut({keys:[["Escape"]],callback:()=>tlt(this,Ilt,fat).call(this),runOnlyIf:()=>!0===Zrt(this,alt)?.getHost()?.contains(this.hot.rootDocument.activeElement),group:slt}),e.addShortcut({keys:[["Tab"]],preventDefault:!0,callback:()=>tlt(this,Blt,Rat).call(this),runOnlyIf:()=>tlt(this,Llt,Sat).call(this),group:slt}),e.addShortcut({keys:[["Shift","Tab"]],preventDefault:!0,callback:()=>tlt(this,Ilt,fat).call(this),runOnlyIf:()=>tlt(this,zlt,kat).call(this),group:slt})}function bat(){const t=this.hot.getShortcutManager();t.getContext(nlt)?.removeShortcutsByGroup(slt),t.getContext(ilt)?.removeShortcutsByGroup(slt),t.getContext(kk)?.removeShortcutsByGroup(slt)}function vat(){const t=Zrt(this,alt)?.getHost();if(!t)return[];const e=[...t.querySelectorAll(`.${Prt}__toast`)],o=[];for(let t=0;t<e.length;t+=1)o.push(...Yrt.getFocusables(e[t]));return o}function Cat(){return tlt(this,Nlt,vat).call(this)[0]}function yat(){if(0===Zrt(this,hlt).size)return null;const t=this.hot.rootDocument.activeElement,e=Zrt(this,alt)?.getHost();if(!(t instanceof this.hot.rootWindow.HTMLElement&&e?.contains(t)))return null;const o=tlt(this,Nlt,vat).call(this);if(0===o.length)return null;const n=o.indexOf(t);return-1===n?null:(Zrt(this,ult)||tlt(this,xlt,dat).call(this),{list:o,idx:n})}function Sat(){const t=tlt(this,Dlt,yat).call(this);return null!==t&&t.idx===t.list.length-1}function kat(){const t=tlt(this,Dlt,yat).call(this);return null!==t&&0===t.idx}function Rat(){const t=this.hot.getFocusScopeManager();Jrt(this,flt,!1),t.getActiveScopeId()===olt?t.deactivateScope(olt):tlt(this,Elt,cat).call(this),this.hot.listen(),t.activateScope(kk,BS.TAB_FROM_ABOVE),Jrt(this,dlt,null)}function Eat(){Zrt(this,plt)&&(this.hot.getFocusScopeManager().unregisterScope(olt),Jrt(this,plt,!1))}function xat(t,e){t.toastEventDisposers&&(t.toastEventDisposers.forEach(t=>t()),t.toastEventDisposers=null),Zrt(this,hlt).delete(t.id),e&&t.element.remove()}function Mat(t){const e=Zrt(this,alt)?.getHost();return!!e&&(t instanceof this.hot.rootWindow.HTMLElement&&e.contains(t))}function Tat(t){let e=!1;return Zrt(this,hlt).forEach(o=>{o.element.contains(t)&&(e=!0)}),e}function Hat(){this.hot.listen();const t=this.hot.getFocusScopeManager();t.getActiveScopeId()===olt&&t.deactivateScope(olt),t.activateScope(olt)}function Iat(){const t=this.hot.rootDocument;if(!this.enabled||0===Zrt(this,hlt).size)return;if(tlt(this,Ult,Tat).call(this,t.activeElement))return;const e=tlt(this,Plt,Cat).call(this);e&&this.hot.getFocusManager().focusElement(e)}function _at(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 Aat(){if(!this.enabled||0===Zrt(this,hlt).size)return!1;const t=Zrt(this,alt)?.getHost();if(!t)return!1;const e=this.hot.rootDocument.activeElement;return!(e instanceof this.hot.rootWindow.HTMLElement&&t.contains(e))&&tlt(this,Glt,_at).call(this,e)}function Wat(){tlt(this,Hlt,pat).call(this)}function Oat(t=!1){const e=this.hot.rootDocument,o=Zrt(this,alt)?.getHost(),n=e.activeElement;if(Zrt(this,hlt).size>0){const e=n instanceof this.hot.rootWindow.HTMLElement&&!0===o?.contains(n);return void((e&&!tlt(this,Ult,Tat).call(this,n)||!e&&t)&&tlt(this,jlt,Hat).call(this))}const i=Zrt(this,ult),s=tlt(this,$lt,Mat).call(this,e.activeElement);(i||t||s)&&tlt(this,Xlt,Wat).call(this)}function Nat(t){const e=this.getSetting("stackLimit"),o=t;for(;Zrt(this,clt)[o].length>0&&tlt(this,ylt,rat).call(this,t)<e;){const t=Zrt(this,clt)[o].shift();tlt(this,Slt,lat).call(this,t)}}function Pat(t){Drt.forEach(e=>{const o=Zrt(this,clt)[e],n=o.findIndex(e=>e.id===t);n>=0&&o.splice(n,1)})}function Dat(){!Zrt(this,glt)&&this.enabled&&(Jrt(this,glt,!0),this.hot._registerTimeout(()=>{Jrt(this,glt,!1),this.enabled&&(tlt(this,tat,Lat).call(this),tlt(this,eat,zat).call(this)&&tlt(this,Jlt,Dat).call(this))},200))}function Lat(){const t=!this.hot.rootDocument.hidden,e=[];Zrt(this,hlt).forEach(o=>{o.durationMs<=0||!o.paused&&t&&(o.remainingMs-=200,o.remainingMs<=0&&e.push(o.id))}),e.forEach(t=>this.hide(t))}function zat(){if(this.hot.rootDocument.hidden)return!1;let t=!1;return Zrt(this,hlt).forEach(e=>{e.durationMs>0&&!e.paused&&(t=!0)}),t}function Bat(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Vat(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Bat(t,e,"get"))}function Fat(t,e,o){!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,o)}function $at(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Bat(t,e,"set"),o),o}const Uat="ht-empty-data-state",jat=`<div data-ref="emptyDataStateElement" class="${Uat} handsontable">\n <div class="${Uat}__content-wrapper">\n <div data-ref="emptyDataStateInner" class="${Uat}__content-wrapper-inner"></div>\n </div>\n</div>`;var qat=new WeakMap,Gat=new WeakMap,Yat=new WeakMap,Xat=new WeakMap;class Kat{install(){if(Vat(this,Yat)?.emptyDataStateElement)return;const t=K`${jat}`;$at(this,Yat,t.refs);const{emptyDataStateInner:e,emptyDataStateElement:o}=Vat(this,Yat);mo(e,[b(-1)]),mo(o,[b(-1)]),Vat(this,qat)&&Vat(this,qat).appendChild(t.fragment)}getElement(){return Vat(this,Yat)?.emptyDataStateElement}getFocusableElements(){const{emptyDataStateButtons:t,emptyDataStateInner:e}=Vat(this,Yat),o=Array.from(t?.children??[]);return 0===o.length?[e]:o}show(){Vat(this,Yat)?.emptyDataStateElement&&(Vat(this,Yat).emptyDataStateElement.style.display="block")}hide(){Vat(this,Yat)?.emptyDataStateElement&&(Vat(this,Xat)?.remove(),$at(this,Xat,null),Vat(this,Yat).emptyDataStateElement.style.display="none")}updateContent(t,e=!1){const{emptyDataStateElement:o,emptyDataStateInner:n}=Vat(this,Yat);let i;i="string"==typeof t?{title:t}:{title:t?.title,description:t?.description,buttons:t?.buttons};const s=K`${(({title:t,description:e,buttons:o},n=!1)=>`\n ${n?`<div class="${Uat}__spinner" aria-hidden="true"></div>`:""}\n <div class="${Uat}__content">\n ${t?`<h2 class="${Uat}__title">${En(t)}</h2>`:""}\n ${e?`<p class="${Uat}__description">${En(e)}</p>`:""}\n </div>\n <div\n data-ref="emptyDataStateButtons"\n class="${Uat}__buttons${o?.length&&o.length>0?` ${Uat}__buttons--has-buttons`:""}"\n >${!n&&o?.length&&o.length>0?o.map(t=>`<button class="ht-button ht-button--${Ost(t.type)}">${En(t.text)}</button>`).join(""):""}</div>`)(i,e)}`;e?(po(o,`${Uat}--loading`),mo(n,[["aria-busy","true"]])):(fo(o,`${Uat}--loading`),wo(n,"aria-busy")),$at(this,Yat,{...Vat(this,Yat),...s.refs}),n.innerHTML="",n.appendChild(s.fragment),!e&&i.buttons?.length&&i.buttons.length>0&&Array.from(Vat(this,Yat).emptyDataStateButtons.children).forEach((t,e)=>{t.addEventListener("click",i.buttons[e].callback)})}updateClassNames(t){const{emptyDataStateElement:e}=Vat(this,Yat);t.countRenderableColumns()>0&&t.getColumnHeadersCount()>0?po(e,`${Uat}--disable-top-border`):fo(e,`${Uat}--disable-top-border`),t.countRenderableRows()>0&&t.getRowHeadersCount()>0?po(e,`${Uat}--disable-inline-border`):fo(e,`${Uat}--disable-inline-border`),t.hasHorizontalScroll()&&!t.isHorizontallyScrollableByWindow()?po(e,`${Uat}--disable-bottom-border`):fo(e,`${Uat}--disable-bottom-border`)}updateSize(t,e=!1){const{emptyDataStateElement:o}=Vat(this,Yat),n=t.hasHorizontalScroll()?jo(t.hot.rootDocument):0,i=t.countRenderableRows(),s=t.countRenderableColumns(),r=t.getColumnHeadersCount(),l=i>0||!0===e&&s>0;o.style.top=s>0?`${t.getColumnHeaderHeight()}px`:"0px",o.style.insetInlineStart="0px";const a={element:Vat(this,Xat)};!function(t,e,o,n,i){if(0!==o)return i.element?.remove(),void(i.element=null);i.element||(i.element=t.createElement("div"),i.element.classList.add(`${n}-placeholder`),e._wt.wtTable.holder.appendChild(i.element)),i.element.style.width="100%",i.element.style.height="150px"}(Vat(this,Gat),t,i,Uat,a),$at(this,Xat,a.element);const h=function(t,e,o){let n=t.getWorkspaceWidth();return t.isHorizontallyScrollableByWindow()?e>0?n=t.getTotalTableWidth():o&&(n=t.getViewportWidth()):t.getTableWidth()-t.getRowHeaderWidth()<t.getViewportWidth()&&e>0&&(n=t.getTableWidth()),n}(t,s,l),c=function(t,e,o,n){let i=t.getTableHeight();return t.isVerticallyScrollableByWindow()||t.hasVerticalScroll()?i=e>0?t.hot.getTableHeight()-t.getColumnHeaderHeight():t.hot.getTableHeight():o>0&&e>0?i=t.getViewportHeight()-n:o>0&&0===e&&(i=t.getWorkspaceHeight()-n),i}(t,s,r,n);o.style.width=`${h}px`,o.style.height=`${c}px`}destroy(){Vat(this,Yat)?.emptyDataStateElement?.remove(),Vat(this,Xat)?.remove(),$at(this,Xat,null),$at(this,Yat,null)}constructor({gridContainer:t,rootDocument:e}){Fat(this,qat,{writable:!0,value:void 0}),Fat(this,Gat,{writable:!0,value:void 0}),Fat(this,Yat,{writable:!0,value:void 0}),Fat(this,Xat,{writable:!0,value:void 0}),$at(this,Yat,null),$at(this,Xat,null),$at(this,qat,t),$at(this,Gat,e),this.install()}}function Zat(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qat(t,e,o){if(!e.has(t))throw new TypeError("attempted to "+o+" private field on non-instance");return e.get(t)}function Jat(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,Qat(t,e,"get"))}function tht(t,e,o){Zat(t,e),e.set(t,o)}function eht(t,e,o){return function(t,e,o){if(e.set)e.set.call(t,o);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=o}}(t,Qat(t,e,"set"),o),o}function oht(t,e,o){if(!e.has(t))throw new TypeError("attempted to get private field on non-instance");return o}function nht(t,e){Zat(t,e),e.add(t)}const iht="emptyDataState",sht=Object.freeze({UNKNOWN:"unknown",FILTERS:"filters",LOADING:"loading"}),rht=`plugin:${iht}`;var lht=new WeakMap,aht=new WeakMap,hht=new WeakMap,cht=new WeakMap,dht=new WeakMap,uht=new WeakSet,ght=new WeakSet,pht=new WeakSet,fht=new WeakSet,mht=new WeakSet,wht=new WeakSet,bht=new WeakSet,vht=new WeakSet,Cht=new WeakSet,yht=new WeakSet,Sht=new WeakSet,kht=new WeakMap,Rht=new WeakMap,Eht=new WeakMap;class xht extends pW{static get PLUGIN_KEY(){return iht}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||void 0===t||!!Ce(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&&Wst(t.type)&&"function"==typeof t.callback)))}}isEnabled(){return!!this.hot.getSettings()[iht]}enablePlugin(){this.enabled||(Jat(this,aht)||(eht(this,aht,new Kat({gridContainer:this.hot.rootGridElement,rootDocument:this.hot.rootDocument})),oht(this,fht,Iht).call(this),oht(this,uht,Mht).call(this)),this.addHook("afterInit",Jat(this,kht)),this.addHook("afterRender",Jat(this,Rht)),this.addHook("afterRowSequenceCacheUpdate",()=>{oht(this,bht,Wht).call(this)}),this.addHook("afterColumnSequenceCacheUpdate",()=>{oht(this,bht,Wht).call(this)}),this.addHook("beforeFilter",Jat(this,Eht)),this.addHook("beforeDataProviderFetch",t=>{t.skipLoading||oht(this,ght,Tht).call(this)}),this.addHook("afterDataProviderFetch",()=>oht(this,pht,Hht).call(this)),this.addHook("afterDataProviderFetchError",()=>oht(this,pht,Hht).call(this)),super.enablePlugin(),oht(this,bht,Wht).call(this))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),oht(this,Cht,Nht).call(this),this.isVisible()&&Jat(this,aht)?.show(),super.updatePlugin()}disablePlugin(){eht(this,dht,!1),oht(this,mht,_ht).call(this),Jat(this,aht)?.destroy(),eht(this,aht,null),super.disablePlugin()}isVisible(){return Jat(this,lht)}destroy(){eht(this,dht,!1),eht(this,lht,!1),Jat(this,aht)?.destroy(),eht(this,aht,null),eht(this,hht,!1),eht(this,cht,null),super.destroy()}constructor(...t){super(...t),nht(this,uht),nht(this,ght),nht(this,pht),nht(this,fht),nht(this,mht),nht(this,wht),nht(this,bht),nht(this,vht),nht(this,Cht),nht(this,yht),nht(this,Sht),tht(this,lht,{writable:!0,value:void 0}),tht(this,aht,{writable:!0,value:void 0}),tht(this,hht,{writable:!0,value:void 0}),tht(this,cht,{writable:!0,value:void 0}),tht(this,dht,{writable:!0,value:void 0}),tht(this,kht,{writable:!0,value:void 0}),tht(this,Rht,{writable:!0,value:void 0}),tht(this,Eht,{writable:!0,value:void 0}),eht(this,lht,!1),eht(this,aht,null),eht(this,hht,!1),eht(this,cht,null),eht(this,dht,!1),eht(this,kht,()=>{oht(this,bht,Wht).call(this),this.hot.render()}),eht(this,Rht,()=>{Jat(this,aht)?.getElement()&&this.isVisible()&&this.hot.view&&(Jat(this,aht).updateSize(this.hot.view,Jat(this,dht)),Jat(this,aht).updateClassNames(this.hot.view))}),eht(this,Eht,t=>{eht(this,hht,t?.length>0),this.isVisible()&&oht(this,Cht,Nht).call(this)})}}function Mht(){this.eventManager.addEventListener(Jat(this,aht).getElement(),"wheel",t=>{oht(this,Sht,Dht).call(this,t)})}function Tht(){Jat(this,dht)||(eht(this,dht,!0),oht(this,bht,Wht).call(this))}function Hht(){Jat(this,dht)&&(eht(this,dht,!1),oht(this,yht,Pht).call(this),oht(this,bht,Wht).call(this),this.hot.render())}function Iht(){this.hot.getFocusScopeManager().registerScope(iht,Jat(this,aht).getElement(),{shortcutsContextName:rht,runOnlyIf:()=>this.isVisible(),onActivate:t=>{const e=Jat(this,aht)?.getFocusableElements()??[];e.length>0&&("tab_from_above"===t?e[0]?.focus():"tab_from_below"===t&&e[e.length-1]?.focus())}})}function _ht(){this.hot.getFocusScopeManager().unregisterScope(iht)}function Aht(t){const e=this.getSetting("message");let o;if(o="function"==typeof e?e(t):e,"string"==typeof o&&(o={title:o}),!o?.title&&!o?.description&&!o?.buttons){const e={};return t===sht.FILTERS?(e.title=this.hot.getTranslatedPhrase(Kb),e.description=this.hot.getTranslatedPhrase(Zb),e.buttons=[{text:this.hot.getTranslatedPhrase(Qb),type:"secondary",callback:()=>{const t=this.hot.getPlugin("filters");t&&(t.clearConditions(),t.filter())}}]):t===sht.LOADING?(e.title=this.hot.getTranslatedPhrase(Jb),e.description=this.hot.getTranslatedPhrase(tv)):(e.title=this.hot.getTranslatedPhrase(Yb),e.description=this.hot.getTranslatedPhrase(Xb)),e}return o}function Wht(){this.hot.view&&(Jat(this,dht)?Jat(this,lht)?oht(this,Cht,Nht).call(this):oht(this,vht,Oht).call(this):0===this.hot.view.countRenderableColumns()||0===this.hot.view.countRenderableRows()?oht(this,vht,Oht).call(this):oht(this,yht,Pht).call(this))}function Oht(){Jat(this,lht)||(this.hot.runHooks("beforeEmptyDataStateShow"),oht(this,Cht,Nht).call(this),Jat(this,aht)?.show(),eht(this,lht,!0),eht(this,cht,this.hot.selection.exportSelection()),this.hot.getFocusScopeManager().activateScope(iht),this.hot.runHooks("afterEmptyDataStateShow"))}function Nht(){Jat(this,dht)?Jat(this,aht)?.updateContent(oht(this,wht,Aht).call(this,sht.LOADING),!0):Jat(this,hht)?Jat(this,aht)?.updateContent(oht(this,wht,Aht).call(this,sht.FILTERS),!1):Jat(this,aht)?.updateContent(oht(this,wht,Aht).call(this,sht.UNKNOWN),!1)}function Pht(){Jat(this,lht)&&(this.hot.runHooks("beforeEmptyDataStateHide"),Jat(this,aht)?.hide(),eht(this,lht,!1),this.hot.getFocusScopeManager().deactivateScope(iht),Jat(this,cht)&&Jat(this,cht).ranges.length>0?(this.hot.selection.importSelection({...Jat(this,cht),activeRange:Jat(this,cht).activeRange}),this.hot.view.render(),eht(this,cht,null)):this.hot.selectCell(0,0,void 0,void 0,!1),this.hot.runHooks("afterEmptyDataStateHide"))}function Dht(t){const e=t.wheelDeltaX??0,o=Number.isNaN(t.deltaX)?-1*e:t.deltaX;0!==o&&this.hot.view.hasHorizontalScroll()&&!this.hot.view.isHorizontallyScrollableByWindow()&&(this.hot.view.setTableScrollPosition({left:this.hot.view.getTableScrollPosition().left+o}),t.preventDefault())}vi(Ti),vi(UT),vi(GT),vi(aH),vi(hH),vi(AT),vi(cH),vi(gH),vi(fH),vi(mH),vi(MH),vi(_H),vi(lM),vi(pH),vi(r_),Os(k_),Os(Jx),Os(W_),Os(R_),Os(N_),Os(S_),Os(F_),Os(G_),Os(tA),Os(sA),Os(rA),Os(lA),Os(aM),Os(Q_),Os(B_),Bs(aA),Bs(uA),Bs(dA),Bs(gA),Bs(fA),Bs(bA),Bs(vA),Bs(yA),Bs(wA),sy(RA),sy(EA),sy(xA),sy(MA),sy(TA),sy(HA),sy(IA),sy(_A),sy(jA),sy("multiSelect",jA),sy(qA),sy(GA),sy(YA),sy(hM),sy(XA),Ms(rO),Ms(BO),Ms(wN),Ms(xN),Ms(JN),Ms(iD),Ms(MD),Ms(JL),Ms(uB),Ms(gV),Ms(ZF),Ms(WU),Ms(Fj),Ms(fq),Ms(rY),Ms(aQ),Ms(H0),Ms(s1),Ms(S1),Ms(W1),Ms(S2),Ms(f3),Ms(Z3),Ms(O6),Ms(Z5),Ms(N7),Ms(Y7),Ms(h9),Ms(Qtt),Ms(got),Ms(Cnt),Ms(Pnt),Ms(nit),Ms(Vit),Ms(Xit),Ms(ost),Ms(Ist),Ms(yrt),Ms(Ort),Ms(oat),Ms(xht);const Lht={hleft:"htLeft",hcenter:"htCenter",hright:"htRight",hjustify:"htJustify",vtop:"htTop",vmiddle:"htMiddle",vbottom:"htBottom"};const zht=p(function({rows:e,cols:o,freeze:n,styles:i,autofilter:s,firstRowAsHeaders:r}){const l=[],a=[],h=[],c=!r||[];Object.entries(e).forEach(([t,e])=>{let o=+t;if(r){if(0===o)return void c.push(...Object.entries(e.cells).map(([,t])=>t.text));o-=1}l[o]=[],Object.entries(e.cells).forEach(([t,e])=>{const n=+t;l[o][n]=e.text,"number"==typeof e.style&&i?.[e.style]&&(a[o]||(a[o]=[]),a[o][n]=i[e.style],h.push({row:o,col:n,renderer:"customStylesRenderer",className:w(Lht[`h${i[e.style].align}`],Lht[`v${i[e.style].valign}`])}))})});const d=[];Object.entries(o||{}).forEach(([t,e])=>{"number"==typeof e.width&&(d[+t]=e.width)});const u=m.decode_cell(n||""),g=m.decode_range(s?.ref||"");return r&&-1!==u.r&&(u.r-=1),Os("customStylesRenderer",(t,e,o,n,i,s,r)=>{aM(0,e,0,0,0,s,r),r.style?.font?.bold&&(e.style.fontWeight="bold"),r.style?.color&&(e.style.color=r.style?.color),r.style?.bgcolor&&(e.style.background=r.style?.bgcolor)}),t(IT,{data:l,rowHeaders:!0,colHeaders:c,licenseKey:"non-commercial-and-evaluation",fixedColumnsStart:-1!==u.c?u.c:void 0,fixedRowsTop:-1!==u.r?u.r:void 0,filters:!0,dropdownMenu:!0,height:"100%",width:"100%",style:{width:"100%",height:"100%"},afterGetColHeader:(t,e)=>{if(!(g.s.c<=t&&t<=g.e.c)){const t=e.querySelector(".changeType");if(!t)return;t.parentElement?.removeChild(t)}},cell:h,cells:function(t,e){const o={style:{}};return a?.[t]?.[e]&&(o.style=a[t][e]),o},colWidths:d.length?d:void 0})});export{zht as default};
|