wijmo 5.20261.45-nightly.d20251218.t163151 → 5.20261.45-nightly.d20260105.t163143
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/cultures/wijmo.culture.ar-AE.d.ts +1 -1
- package/cultures/wijmo.culture.ar-AE.js +1 -1
- package/cultures/wijmo.culture.ar-SA.d.ts +1 -1
- package/cultures/wijmo.culture.ar-SA.js +1 -1
- package/cultures/wijmo.culture.bg.d.ts +1 -1
- package/cultures/wijmo.culture.bg.js +1 -1
- package/cultures/wijmo.culture.ca.d.ts +1 -1
- package/cultures/wijmo.culture.ca.js +1 -1
- package/cultures/wijmo.culture.cs.d.ts +1 -1
- package/cultures/wijmo.culture.cs.js +1 -1
- package/cultures/wijmo.culture.da.d.ts +1 -1
- package/cultures/wijmo.culture.da.js +1 -1
- package/cultures/wijmo.culture.de-CH.d.ts +1 -1
- package/cultures/wijmo.culture.de-CH.js +1 -1
- package/cultures/wijmo.culture.de.d.ts +1 -1
- package/cultures/wijmo.culture.de.js +1 -1
- package/cultures/wijmo.culture.el.d.ts +1 -1
- package/cultures/wijmo.culture.el.js +1 -1
- package/cultures/wijmo.culture.en-CA.d.ts +1 -1
- package/cultures/wijmo.culture.en-CA.js +1 -1
- package/cultures/wijmo.culture.en-GB.d.ts +1 -1
- package/cultures/wijmo.culture.en-GB.js +1 -1
- package/cultures/wijmo.culture.en.d.ts +1 -1
- package/cultures/wijmo.culture.en.js +1 -1
- package/cultures/wijmo.culture.es-419.d.ts +1 -1
- package/cultures/wijmo.culture.es-419.js +1 -1
- package/cultures/wijmo.culture.es-MX.d.ts +1 -1
- package/cultures/wijmo.culture.es-MX.js +1 -1
- package/cultures/wijmo.culture.es.d.ts +1 -1
- package/cultures/wijmo.culture.es.js +1 -1
- package/cultures/wijmo.culture.et.d.ts +1 -1
- package/cultures/wijmo.culture.et.js +1 -1
- package/cultures/wijmo.culture.eu.d.ts +1 -1
- package/cultures/wijmo.culture.eu.js +1 -1
- package/cultures/wijmo.culture.fi.d.ts +1 -1
- package/cultures/wijmo.culture.fi.js +1 -1
- package/cultures/wijmo.culture.fr-CA.d.ts +1 -1
- package/cultures/wijmo.culture.fr-CA.js +1 -1
- package/cultures/wijmo.culture.fr.d.ts +1 -1
- package/cultures/wijmo.culture.fr.js +1 -1
- package/cultures/wijmo.culture.gl.d.ts +1 -1
- package/cultures/wijmo.culture.gl.js +1 -1
- package/cultures/wijmo.culture.he.d.ts +1 -1
- package/cultures/wijmo.culture.he.js +1 -1
- package/cultures/wijmo.culture.hi.d.ts +1 -1
- package/cultures/wijmo.culture.hi.js +1 -1
- package/cultures/wijmo.culture.hr.d.ts +1 -1
- package/cultures/wijmo.culture.hr.js +1 -1
- package/cultures/wijmo.culture.hu.d.ts +1 -1
- package/cultures/wijmo.culture.hu.js +1 -1
- package/cultures/wijmo.culture.id.d.ts +1 -1
- package/cultures/wijmo.culture.id.js +1 -1
- package/cultures/wijmo.culture.it.d.ts +1 -1
- package/cultures/wijmo.culture.it.js +1 -1
- package/cultures/wijmo.culture.ja.d.ts +1 -1
- package/cultures/wijmo.culture.ja.js +1 -1
- package/cultures/wijmo.culture.kk.d.ts +1 -1
- package/cultures/wijmo.culture.kk.js +1 -1
- package/cultures/wijmo.culture.ko.d.ts +1 -1
- package/cultures/wijmo.culture.ko.js +1 -1
- package/cultures/wijmo.culture.lt.d.ts +1 -1
- package/cultures/wijmo.culture.lt.js +1 -1
- package/cultures/wijmo.culture.lv.d.ts +1 -1
- package/cultures/wijmo.culture.lv.js +1 -1
- package/cultures/wijmo.culture.mn-MN.d.ts +1 -1
- package/cultures/wijmo.culture.mn-MN.js +1 -1
- package/cultures/wijmo.culture.nl.d.ts +1 -1
- package/cultures/wijmo.culture.nl.js +1 -1
- package/cultures/wijmo.culture.no.d.ts +1 -1
- package/cultures/wijmo.culture.no.js +1 -1
- package/cultures/wijmo.culture.pl.d.ts +1 -1
- package/cultures/wijmo.culture.pl.js +1 -1
- package/cultures/wijmo.culture.pt.d.ts +1 -1
- package/cultures/wijmo.culture.pt.js +1 -1
- package/cultures/wijmo.culture.ro.d.ts +1 -1
- package/cultures/wijmo.culture.ro.js +1 -1
- package/cultures/wijmo.culture.ru.d.ts +1 -1
- package/cultures/wijmo.culture.ru.js +1 -1
- package/cultures/wijmo.culture.sk.d.ts +1 -1
- package/cultures/wijmo.culture.sk.js +1 -1
- package/cultures/wijmo.culture.sl.d.ts +1 -1
- package/cultures/wijmo.culture.sl.js +1 -1
- package/cultures/wijmo.culture.sr.d.ts +1 -1
- package/cultures/wijmo.culture.sr.js +1 -1
- package/cultures/wijmo.culture.sv.d.ts +1 -1
- package/cultures/wijmo.culture.sv.js +1 -1
- package/cultures/wijmo.culture.th.d.ts +1 -1
- package/cultures/wijmo.culture.th.js +1 -1
- package/cultures/wijmo.culture.tr.d.ts +1 -1
- package/cultures/wijmo.culture.tr.js +1 -1
- package/cultures/wijmo.culture.uk.d.ts +1 -1
- package/cultures/wijmo.culture.uk.js +1 -1
- package/cultures/wijmo.culture.vi.d.ts +1 -1
- package/cultures/wijmo.culture.vi.js +1 -1
- package/cultures/wijmo.culture.zh-HK.d.ts +1 -1
- package/cultures/wijmo.culture.zh-HK.js +1 -1
- package/cultures/wijmo.culture.zh-TW.d.ts +1 -1
- package/cultures/wijmo.culture.zh-TW.js +1 -1
- package/cultures/wijmo.culture.zh.d.ts +1 -1
- package/cultures/wijmo.culture.zh.js +1 -1
- package/package.json +1 -1
- package/styles/misc/_constants.scss +1 -1
- package/styles/misc/_glyphs.scss +257 -255
- package/styles/misc/_mixins.scss +70 -74
- package/styles/misc/_variables.scss +13 -13
- package/styles/parts/_barcode.scss +26 -27
- package/styles/parts/_chart.scss +109 -107
- package/styles/parts/_chart_finance.scss +6 -6
- package/styles/parts/_chart_hierarchical.scss +4 -4
- package/styles/parts/_chart_interaction.scss +224 -219
- package/styles/parts/_chart_map.scss +7 -7
- package/styles/parts/_core.scss +115 -116
- package/styles/parts/_gauge.scss +40 -39
- package/styles/parts/_grid.scss +447 -410
- package/styles/parts/_grid_cellmaker.scss +92 -86
- package/styles/parts/_grid_filter.scss +157 -161
- package/styles/parts/_grid_grouppanel.scss +74 -74
- package/styles/parts/_grid_multirow.scss +65 -64
- package/styles/parts/_grid_search.scss +27 -26
- package/styles/parts/_grid_selector.scss +12 -12
- package/styles/parts/_grid_sheet.scss +176 -176
- package/styles/parts/_grid_transposed_multirow.scss +9 -10
- package/styles/parts/_input.scss +812 -810
- package/styles/parts/_labeled_input.scss +198 -194
- package/styles/parts/_nav.scss +263 -259
- package/styles/parts/_olap.scss +230 -224
- package/styles/parts/_viewer.scss +1005 -989
- package/styles/themes/material/wijmo.theme.material.amber-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.amber-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.amber-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.blue_grey-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.blue_grey-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.brown-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.brown-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.cyan-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.cyan-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_orange-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_orange-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.deep_purple-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.deep_purple-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.green-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.green-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.grey-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.grey-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.indigo-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.indigo-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_blue-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_blue-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.light_green-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.light_green-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.lime-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.lime-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.orange-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.orange-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.pink-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.pink-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.purple-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.purple-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-teal.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.red-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.red-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.teal-yellow.css +1 -1
- package/styles/themes/material/wijmo.theme.material.teal-yellow.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-amber.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-amber.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-cyan.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-cyan.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-deep_orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-deep_orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-deep_purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-deep_purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-indigo.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-indigo.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-light_blue.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-light_blue.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-light_green.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-light_green.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-lime.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-lime.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-orange.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-orange.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-pink.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-pink.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-purple.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-purple.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-red.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-red.scss +1 -2
- package/styles/themes/material/wijmo.theme.material.yellow-teal.css +1 -1
- package/styles/themes/material/wijmo.theme.material.yellow-teal.scss +1 -2
- package/styles/themes/wijmo.theme.cerulean.css +1 -1
- package/styles/themes/wijmo.theme.cerulean.scss +1 -2
- package/styles/themes/wijmo.theme.cleandark.css +1 -1
- package/styles/themes/wijmo.theme.cleandark.scss +2 -3
- package/styles/themes/wijmo.theme.cleanlight.css +1 -1
- package/styles/themes/wijmo.theme.cleanlight.scss +3 -4
- package/styles/themes/wijmo.theme.cocoa.css +1 -1
- package/styles/themes/wijmo.theme.cocoa.scss +1 -2
- package/styles/themes/wijmo.theme.coral.css +1 -1
- package/styles/themes/wijmo.theme.coral.scss +1 -2
- package/styles/themes/wijmo.theme.cyborg.css +1 -1
- package/styles/themes/wijmo.theme.cyborg.scss +1 -2
- package/styles/themes/wijmo.theme.dark.css +1 -1
- package/styles/themes/wijmo.theme.dark.scss +1 -2
- package/styles/themes/wijmo.theme.darkly.css +1 -1
- package/styles/themes/wijmo.theme.darkly.scss +1 -1
- package/styles/themes/wijmo.theme.flatly.css +1 -1
- package/styles/themes/wijmo.theme.flatly.scss +2 -3
- package/styles/themes/wijmo.theme.grayscale.css +1 -1
- package/styles/themes/wijmo.theme.grayscale.scss +1 -1
- package/styles/themes/wijmo.theme.highcontrast.css +1 -1
- package/styles/themes/wijmo.theme.highcontrast.scss +9 -9
- package/styles/themes/wijmo.theme.light.css +1 -1
- package/styles/themes/wijmo.theme.light.scss +1 -1
- package/styles/themes/wijmo.theme.material.amber-indigo.css +1 -1
- package/styles/themes/wijmo.theme.material.amber-indigo.scss +1 -2
- package/styles/themes/wijmo.theme.material.css +1 -1
- package/styles/themes/wijmo.theme.material.indigo-orange.css +1 -1
- package/styles/themes/wijmo.theme.material.indigo-orange.scss +1 -1
- package/styles/themes/wijmo.theme.material.scss +33 -29
- package/styles/themes/wijmo.theme.material.vars.css +1 -1
- package/styles/themes/wijmo.theme.material.vars.scss +1 -1
- package/styles/themes/wijmo.theme.midnight.css +1 -1
- package/styles/themes/wijmo.theme.midnight.scss +1 -1
- package/styles/themes/wijmo.theme.minimal.css +1 -1
- package/styles/themes/wijmo.theme.minimal.scss +1 -1
- package/styles/themes/wijmo.theme.modern.css +1 -1
- package/styles/themes/wijmo.theme.modern.scss +1 -1
- package/styles/themes/wijmo.theme.office.css +1 -1
- package/styles/themes/wijmo.theme.office.scss +1 -1
- package/styles/themes/wijmo.theme.organic.css +1 -1
- package/styles/themes/wijmo.theme.organic.scss +2 -2
- package/styles/themes/wijmo.theme.paper.css +1 -1
- package/styles/themes/wijmo.theme.paper.scss +1 -1
- package/styles/themes/wijmo.theme.simplex.css +1 -1
- package/styles/themes/wijmo.theme.simplex.scss +1 -1
- package/styles/themes/wijmo.theme.slate.css +1 -1
- package/styles/themes/wijmo.theme.slate.scss +1 -1
- package/styles/themes/wijmo.theme.superhero.css +1 -1
- package/styles/themes/wijmo.theme.superhero.scss +1 -1
- package/styles/themes/wijmo.theme.trust.css +1 -1
- package/styles/themes/wijmo.theme.trust.scss +1 -1
- package/styles/themes/wijmo.theme.zen.css +1 -1
- package/styles/themes/wijmo.theme.zen.scss +1 -1
- package/styles/wijmo-core.css +1 -1
- package/styles/wijmo-core.scss +5 -5
- package/styles/wijmo.css +1 -1
- package/styles/wijmo.scss +1 -1
- package/wijmo.angular.base.d.ts +1 -1
- package/wijmo.angular.base.js +1 -1
- package/wijmo.angular.chart.analytics.d.ts +1 -1
- package/wijmo.angular.chart.analytics.js +1 -1
- package/wijmo.angular.chart.animation.d.ts +1 -1
- package/wijmo.angular.chart.animation.js +1 -1
- package/wijmo.angular.chart.annotation.d.ts +1 -1
- package/wijmo.angular.chart.annotation.js +1 -1
- package/wijmo.angular.chart.d.ts +1 -1
- package/wijmo.angular.chart.finance.analytics.d.ts +1 -1
- package/wijmo.angular.chart.finance.analytics.js +1 -1
- package/wijmo.angular.chart.finance.d.ts +1 -1
- package/wijmo.angular.chart.finance.js +1 -1
- package/wijmo.angular.chart.hierarchical.d.ts +1 -1
- package/wijmo.angular.chart.hierarchical.js +1 -1
- package/wijmo.angular.chart.interaction.d.ts +1 -1
- package/wijmo.angular.chart.interaction.js +1 -1
- package/wijmo.angular.chart.js +1 -1
- package/wijmo.angular.chart.radar.d.ts +1 -1
- package/wijmo.angular.chart.radar.js +1 -1
- package/wijmo.angular.core.d.ts +1 -1
- package/wijmo.angular.core.js +1 -1
- package/wijmo.angular.gauge.d.ts +1 -1
- package/wijmo.angular.gauge.js +1 -1
- package/wijmo.angular.grid.d.ts +1 -1
- package/wijmo.angular.grid.detail.d.ts +1 -1
- package/wijmo.angular.grid.detail.js +1 -1
- package/wijmo.angular.grid.filter.d.ts +1 -1
- package/wijmo.angular.grid.filter.js +1 -1
- package/wijmo.angular.grid.grouppanel.d.ts +1 -1
- package/wijmo.angular.grid.grouppanel.js +1 -1
- package/wijmo.angular.grid.js +1 -1
- package/wijmo.angular.grid.multirow.d.ts +1 -1
- package/wijmo.angular.grid.multirow.js +1 -1
- package/wijmo.angular.grid.sheet.d.ts +1 -1
- package/wijmo.angular.grid.sheet.js +1 -1
- package/wijmo.angular.input.d.ts +1 -1
- package/wijmo.angular.input.js +1 -1
- package/wijmo.angular.nav.d.ts +1 -1
- package/wijmo.angular.nav.js +1 -1
- package/wijmo.angular.olap.d.ts +1 -1
- package/wijmo.angular.olap.js +1 -1
- package/wijmo.angular.viewer.d.ts +1 -1
- package/wijmo.angular.viewer.js +1 -1
- package/wijmo.angular2.barcode.common.d.ts +30 -30
- package/wijmo.angular2.barcode.common.js +1 -1
- package/wijmo.angular2.barcode.composite.d.ts +28 -28
- package/wijmo.angular2.barcode.composite.js +1 -1
- package/wijmo.angular2.barcode.specialized.d.ts +24 -24
- package/wijmo.angular2.barcode.specialized.js +1 -1
- package/wijmo.angular2.chart.analytics.d.ts +26 -26
- package/wijmo.angular2.chart.analytics.js +1 -1
- package/wijmo.angular2.chart.animation.d.ts +26 -26
- package/wijmo.angular2.chart.animation.js +1 -1
- package/wijmo.angular2.chart.annotation.d.ts +45 -45
- package/wijmo.angular2.chart.annotation.js +1 -1
- package/wijmo.angular2.chart.d.ts +42 -42
- package/wijmo.angular2.chart.finance.analytics.d.ts +36 -36
- package/wijmo.angular2.chart.finance.analytics.js +1 -1
- package/wijmo.angular2.chart.finance.d.ts +26 -26
- package/wijmo.angular2.chart.finance.js +1 -1
- package/wijmo.angular2.chart.finance.metadata.json +1 -1
- package/wijmo.angular2.chart.hierarchical.d.ts +25 -25
- package/wijmo.angular2.chart.hierarchical.js +1 -1
- package/wijmo.angular2.chart.interaction.d.ts +28 -28
- package/wijmo.angular2.chart.interaction.js +1 -1
- package/wijmo.angular2.chart.js +1 -1
- package/wijmo.angular2.chart.map.d.ts +20 -20
- package/wijmo.angular2.chart.map.js +1 -1
- package/wijmo.angular2.chart.map.metadata.json +1 -1
- package/wijmo.angular2.chart.metadata.json +1 -1
- package/wijmo.angular2.chart.radar.d.ts +28 -28
- package/wijmo.angular2.chart.radar.js +1 -1
- package/wijmo.angular2.chart.radar.metadata.json +1 -1
- package/wijmo.angular2.core.d.ts +47 -47
- package/wijmo.angular2.core.js +2 -2
- package/wijmo.angular2.core.metadata.json +1 -1
- package/wijmo.angular2.directiveBase.d.ts +67 -68
- package/wijmo.angular2.directiveBase.js +2 -2
- package/wijmo.angular2.directiveBase.metadata.json +1 -1
- package/wijmo.angular2.gauge.d.ts +27 -27
- package/wijmo.angular2.gauge.js +1 -1
- package/wijmo.angular2.gauge.metadata.json +1 -1
- package/wijmo.angular2.grid.d.ts +45 -45
- package/wijmo.angular2.grid.detail.d.ts +39 -39
- package/wijmo.angular2.grid.detail.js +2 -2
- package/wijmo.angular2.grid.filter.d.ts +25 -25
- package/wijmo.angular2.grid.filter.js +1 -1
- package/wijmo.angular2.grid.grouppanel.d.ts +28 -28
- package/wijmo.angular2.grid.grouppanel.js +1 -1
- package/wijmo.angular2.grid.js +2 -2
- package/wijmo.angular2.grid.multirow.d.ts +24 -24
- package/wijmo.angular2.grid.multirow.js +1 -1
- package/wijmo.angular2.grid.multirow.metadata.json +1 -1
- package/wijmo.angular2.grid.search.d.ts +12 -12
- package/wijmo.angular2.grid.search.js +1 -1
- package/wijmo.angular2.grid.sheet.d.ts +22 -22
- package/wijmo.angular2.grid.sheet.js +1 -1
- package/wijmo.angular2.grid.sheet.metadata.json +1 -1
- package/wijmo.angular2.grid.transposed.d.ts +14 -14
- package/wijmo.angular2.grid.transposed.js +2 -2
- package/wijmo.angular2.grid.transposedmultirow.d.ts +12 -12
- package/wijmo.angular2.grid.transposedmultirow.js +1 -1
- package/wijmo.angular2.input.d.ts +97 -97
- package/wijmo.angular2.input.js +2 -2
- package/wijmo.angular2.input.metadata.json +1 -1
- package/wijmo.angular2.nav.d.ts +31 -31
- package/wijmo.angular2.nav.js +1 -1
- package/wijmo.angular2.nav.metadata.json +1 -1
- package/wijmo.angular2.olap.d.ts +27 -27
- package/wijmo.angular2.olap.js +1 -1
- package/wijmo.angular2.viewer.d.ts +25 -25
- package/wijmo.angular2.viewer.js +1 -1
- package/wijmo.angular2.viewer.metadata.json +1 -1
- package/wijmo.barcode.common.d.ts +36 -36
- package/wijmo.barcode.common.js +2 -2
- package/wijmo.barcode.composite.d.ts +18 -19
- package/wijmo.barcode.composite.js +2 -2
- package/wijmo.barcode.d.ts +19 -19
- package/wijmo.barcode.js +2 -2
- package/wijmo.barcode.specialized.d.ts +5 -6
- package/wijmo.barcode.specialized.js +2 -2
- package/wijmo.chart.analytics.d.ts +7 -8
- package/wijmo.chart.analytics.js +2 -2
- package/wijmo.chart.animation.d.ts +2 -2
- package/wijmo.chart.animation.js +2 -2
- package/wijmo.chart.annotation.d.ts +21 -21
- package/wijmo.chart.annotation.js +2 -2
- package/wijmo.chart.d.ts +442 -453
- package/wijmo.chart.finance.analytics.d.ts +10 -10
- package/wijmo.chart.finance.analytics.js +2 -2
- package/wijmo.chart.finance.d.ts +10 -10
- package/wijmo.chart.finance.js +2 -2
- package/wijmo.chart.hierarchical.d.ts +16 -19
- package/wijmo.chart.hierarchical.js +2 -2
- package/wijmo.chart.interaction.d.ts +37 -38
- package/wijmo.chart.interaction.js +2 -2
- package/wijmo.chart.js +2 -2
- package/wijmo.chart.map.d.ts +59 -60
- package/wijmo.chart.map.js +2 -2
- package/wijmo.chart.radar.d.ts +7 -8
- package/wijmo.chart.radar.js +2 -2
- package/wijmo.chart.render.d.ts +14 -14
- package/wijmo.chart.render.js +2 -2
- package/wijmo.chart.webgl.d.ts +3 -6
- package/wijmo.chart.webgl.js +2 -2
- package/wijmo.cloud.d.ts +1 -1
- package/wijmo.cloud.js +2 -2
- package/wijmo.d.ts +44 -44
- package/wijmo.gauge.d.ts +4 -4
- package/wijmo.gauge.js +2 -2
- package/wijmo.grid.cellmaker.d.ts +1 -1
- package/wijmo.grid.cellmaker.js +2 -2
- package/wijmo.grid.d.ts +104 -106
- package/wijmo.grid.detail.d.ts +5 -5
- package/wijmo.grid.detail.js +2 -2
- package/wijmo.grid.filter.d.ts +30 -30
- package/wijmo.grid.filter.js +2 -2
- package/wijmo.grid.grouppanel.d.ts +7 -7
- package/wijmo.grid.grouppanel.js +2 -2
- package/wijmo.grid.immutable.d.ts +2 -2
- package/wijmo.grid.immutable.js +2 -2
- package/wijmo.grid.js +2 -2
- package/wijmo.grid.multirow.d.ts +3 -3
- package/wijmo.grid.multirow.js +2 -2
- package/wijmo.grid.pdf.d.ts +243 -243
- package/wijmo.grid.pdf.js +2 -2
- package/wijmo.grid.search.d.ts +1 -1
- package/wijmo.grid.search.js +1 -1
- package/wijmo.grid.selector.d.ts +5 -6
- package/wijmo.grid.selector.js +2 -2
- package/wijmo.grid.sheet.d.ts +27 -28
- package/wijmo.grid.sheet.js +2 -2
- package/wijmo.grid.style.d.ts +19 -19
- package/wijmo.grid.style.js +1 -1
- package/wijmo.grid.transposed.d.ts +2 -2
- package/wijmo.grid.transposed.js +2 -2
- package/wijmo.grid.transposedmultirow.d.ts +2 -2
- package/wijmo.grid.transposedmultirow.js +1 -1
- package/wijmo.grid.xlsx.d.ts +1 -1
- package/wijmo.grid.xlsx.js +2 -2
- package/wijmo.input.d.ts +17 -17
- package/wijmo.input.js +2 -2
- package/wijmo.interop.grid.d.ts +5 -7
- package/wijmo.interop.grid.js +2 -2
- package/wijmo.js +2 -2
- package/wijmo.knockout.base.d.ts +1 -1
- package/wijmo.knockout.base.js +1 -1
- package/wijmo.knockout.chart.analytics.d.ts +1 -1
- package/wijmo.knockout.chart.analytics.js +1 -1
- package/wijmo.knockout.chart.animation.d.ts +1 -1
- package/wijmo.knockout.chart.animation.js +1 -1
- package/wijmo.knockout.chart.annotation.d.ts +1 -1
- package/wijmo.knockout.chart.annotation.js +1 -1
- package/wijmo.knockout.chart.d.ts +1 -1
- package/wijmo.knockout.chart.finance.analytics.d.ts +1 -1
- package/wijmo.knockout.chart.finance.analytics.js +1 -1
- package/wijmo.knockout.chart.finance.d.ts +1 -1
- package/wijmo.knockout.chart.finance.js +1 -1
- package/wijmo.knockout.chart.interaction.d.ts +1 -1
- package/wijmo.knockout.chart.interaction.js +1 -1
- package/wijmo.knockout.chart.js +1 -1
- package/wijmo.knockout.core.d.ts +1 -1
- package/wijmo.knockout.core.js +1 -1
- package/wijmo.knockout.gauge.d.ts +1 -1
- package/wijmo.knockout.gauge.js +1 -1
- package/wijmo.knockout.grid.d.ts +1 -1
- package/wijmo.knockout.grid.filter.d.ts +1 -1
- package/wijmo.knockout.grid.filter.js +1 -1
- package/wijmo.knockout.grid.grouppanel.d.ts +1 -1
- package/wijmo.knockout.grid.grouppanel.js +1 -1
- package/wijmo.knockout.grid.js +1 -1
- package/wijmo.knockout.grid.multirow.d.ts +1 -1
- package/wijmo.knockout.grid.multirow.js +1 -1
- package/wijmo.knockout.grid.sheet.d.ts +1 -1
- package/wijmo.knockout.grid.sheet.js +1 -1
- package/wijmo.knockout.input.d.ts +1 -1
- package/wijmo.knockout.input.js +1 -1
- package/wijmo.knockout.nav.d.ts +1 -1
- package/wijmo.knockout.nav.js +1 -1
- package/wijmo.knockout.olap.d.ts +1 -1
- package/wijmo.knockout.olap.js +1 -1
- package/wijmo.meta.d.ts +2 -2
- package/wijmo.meta.js +2 -2
- package/wijmo.nav.d.ts +8 -8
- package/wijmo.nav.js +2 -2
- package/wijmo.odata.d.ts +25 -27
- package/wijmo.odata.js +2 -2
- package/wijmo.olap.d.ts +10 -12
- package/wijmo.olap.js +2 -2
- package/wijmo.pdf.d.ts +1562 -1563
- package/wijmo.pdf.js +2 -2
- package/wijmo.pdf.security.d.ts +2 -2
- package/wijmo.pdf.security.js +2 -2
- package/wijmo.react.barcode.base.d.ts +1 -1
- package/wijmo.react.barcode.base.js +1 -1
- package/wijmo.react.barcode.common.d.ts +1 -1
- package/wijmo.react.barcode.common.js +1 -1
- package/wijmo.react.barcode.composite.d.ts +1 -1
- package/wijmo.react.barcode.composite.js +1 -1
- package/wijmo.react.barcode.specialized.d.ts +1 -1
- package/wijmo.react.barcode.specialized.js +1 -1
- package/wijmo.react.base.d.ts +50 -50
- package/wijmo.react.base.js +1 -1
- package/wijmo.react.chart.analytics.d.ts +1 -1
- package/wijmo.react.chart.analytics.js +1 -1
- package/wijmo.react.chart.animation.d.ts +1 -1
- package/wijmo.react.chart.animation.js +1 -1
- package/wijmo.react.chart.annotation.d.ts +18 -18
- package/wijmo.react.chart.annotation.js +1 -1
- package/wijmo.react.chart.d.ts +4 -4
- package/wijmo.react.chart.finance.analytics.d.ts +1 -1
- package/wijmo.react.chart.finance.analytics.js +1 -1
- package/wijmo.react.chart.finance.d.ts +1 -1
- package/wijmo.react.chart.finance.js +1 -1
- package/wijmo.react.chart.hierarchical.d.ts +1 -1
- package/wijmo.react.chart.hierarchical.js +1 -1
- package/wijmo.react.chart.interaction.d.ts +2 -2
- package/wijmo.react.chart.interaction.js +1 -1
- package/wijmo.react.chart.js +1 -1
- package/wijmo.react.chart.map.d.ts +1 -1
- package/wijmo.react.chart.map.js +1 -1
- package/wijmo.react.chart.radar.d.ts +1 -1
- package/wijmo.react.chart.radar.js +1 -1
- package/wijmo.react.gauge.d.ts +1 -1
- package/wijmo.react.gauge.js +1 -1
- package/wijmo.react.grid.d.ts +5 -5
- package/wijmo.react.grid.detail.d.ts +2 -3
- package/wijmo.react.grid.detail.js +2 -2
- package/wijmo.react.grid.filter.d.ts +1 -1
- package/wijmo.react.grid.filter.js +1 -1
- package/wijmo.react.grid.grouppanel.d.ts +1 -1
- package/wijmo.react.grid.grouppanel.js +1 -1
- package/wijmo.react.grid.immutable.d.ts +1 -1
- package/wijmo.react.grid.immutable.js +1 -1
- package/wijmo.react.grid.js +2 -2
- package/wijmo.react.grid.multirow.d.ts +1 -1
- package/wijmo.react.grid.multirow.js +1 -1
- package/wijmo.react.grid.search.d.ts +1 -1
- package/wijmo.react.grid.search.js +1 -1
- package/wijmo.react.grid.sheet.d.ts +1 -1
- package/wijmo.react.grid.sheet.js +1 -1
- package/wijmo.react.grid.transposed.d.ts +1 -1
- package/wijmo.react.grid.transposed.js +1 -1
- package/wijmo.react.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.react.grid.transposedmultirow.js +1 -1
- package/wijmo.react.input.d.ts +2 -3
- package/wijmo.react.input.js +2 -2
- package/wijmo.react.nav.d.ts +3 -3
- package/wijmo.react.nav.js +1 -1
- package/wijmo.react.olap.d.ts +1 -1
- package/wijmo.react.olap.js +1 -1
- package/wijmo.react.viewer.d.ts +1 -1
- package/wijmo.react.viewer.js +1 -1
- package/wijmo.rest.d.ts +28 -28
- package/wijmo.rest.js +2 -2
- package/wijmo.touch.d.ts +1 -2
- package/wijmo.touch.js +2 -2
- package/wijmo.undo.d.ts +4 -4
- package/wijmo.undo.js +2 -2
- package/wijmo.viewer.d.ts +388 -407
- package/wijmo.viewer.js +2 -2
- package/wijmo.vue2.barcode.common.d.ts +1 -1
- package/wijmo.vue2.barcode.common.js +1 -1
- package/wijmo.vue2.barcode.composite.d.ts +1 -1
- package/wijmo.vue2.barcode.composite.js +1 -1
- package/wijmo.vue2.barcode.specialized.d.ts +1 -1
- package/wijmo.vue2.barcode.specialized.js +1 -1
- package/wijmo.vue2.base.d.ts +1 -2
- package/wijmo.vue2.base.js +2 -2
- package/wijmo.vue2.chart.analytics.d.ts +1 -1
- package/wijmo.vue2.chart.analytics.js +1 -1
- package/wijmo.vue2.chart.animation.d.ts +1 -1
- package/wijmo.vue2.chart.animation.js +1 -1
- package/wijmo.vue2.chart.annotation.d.ts +1 -1
- package/wijmo.vue2.chart.annotation.js +1 -1
- package/wijmo.vue2.chart.d.ts +1 -1
- package/wijmo.vue2.chart.finance.analytics.d.ts +1 -1
- package/wijmo.vue2.chart.finance.analytics.js +1 -1
- package/wijmo.vue2.chart.finance.d.ts +1 -1
- package/wijmo.vue2.chart.finance.js +1 -1
- package/wijmo.vue2.chart.hierarchical.d.ts +1 -1
- package/wijmo.vue2.chart.hierarchical.js +1 -1
- package/wijmo.vue2.chart.interaction.d.ts +1 -1
- package/wijmo.vue2.chart.interaction.js +1 -1
- package/wijmo.vue2.chart.js +1 -1
- package/wijmo.vue2.chart.map.d.ts +1 -1
- package/wijmo.vue2.chart.map.js +1 -1
- package/wijmo.vue2.chart.radar.d.ts +1 -1
- package/wijmo.vue2.chart.radar.js +1 -1
- package/wijmo.vue2.core.d.ts +33 -33
- package/wijmo.vue2.core.js +1 -1
- package/wijmo.vue2.gauge.d.ts +1 -1
- package/wijmo.vue2.gauge.js +1 -1
- package/wijmo.vue2.grid.d.ts +280 -280
- package/wijmo.vue2.grid.detail.d.ts +1 -1
- package/wijmo.vue2.grid.detail.js +1 -1
- package/wijmo.vue2.grid.filter.d.ts +1 -1
- package/wijmo.vue2.grid.filter.js +1 -1
- package/wijmo.vue2.grid.grouppanel.d.ts +1 -1
- package/wijmo.vue2.grid.grouppanel.js +1 -1
- package/wijmo.vue2.grid.js +2 -2
- package/wijmo.vue2.grid.multirow.d.ts +245 -245
- package/wijmo.vue2.grid.multirow.js +1 -1
- package/wijmo.vue2.grid.search.d.ts +1 -1
- package/wijmo.vue2.grid.search.js +1 -1
- package/wijmo.vue2.grid.sheet.d.ts +1 -1
- package/wijmo.vue2.grid.sheet.js +1 -1
- package/wijmo.vue2.grid.transposed.d.ts +1 -1
- package/wijmo.vue2.grid.transposed.js +1 -1
- package/wijmo.vue2.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.vue2.grid.transposedmultirow.js +1 -1
- package/wijmo.vue2.input.d.ts +1 -1
- package/wijmo.vue2.input.js +1 -1
- package/wijmo.vue2.nav.d.ts +1 -1
- package/wijmo.vue2.nav.js +1 -1
- package/wijmo.vue2.olap.d.ts +1 -1
- package/wijmo.vue2.olap.js +1 -1
- package/wijmo.vue2.viewer.d.ts +1 -1
- package/wijmo.vue2.viewer.js +1 -1
- package/wijmo.webcomponents.barcode.common.d.ts +1 -1
- package/wijmo.webcomponents.barcode.common.js +1 -1
- package/wijmo.webcomponents.barcode.composite.d.ts +1 -1
- package/wijmo.webcomponents.barcode.composite.js +1 -1
- package/wijmo.webcomponents.barcode.specialized.d.ts +1 -1
- package/wijmo.webcomponents.barcode.specialized.js +1 -1
- package/wijmo.webcomponents.base.d.ts +1 -1
- package/wijmo.webcomponents.base.js +1 -1
- package/wijmo.webcomponents.chart.analytics.d.ts +1 -1
- package/wijmo.webcomponents.chart.analytics.js +1 -1
- package/wijmo.webcomponents.chart.animation.d.ts +1 -1
- package/wijmo.webcomponents.chart.animation.js +1 -1
- package/wijmo.webcomponents.chart.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.analytics.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.analytics.js +1 -1
- package/wijmo.webcomponents.chart.finance.d.ts +1 -1
- package/wijmo.webcomponents.chart.finance.js +1 -1
- package/wijmo.webcomponents.chart.hierarchical.d.ts +1 -1
- package/wijmo.webcomponents.chart.hierarchical.js +1 -1
- package/wijmo.webcomponents.chart.interaction.d.ts +1 -1
- package/wijmo.webcomponents.chart.interaction.js +1 -1
- package/wijmo.webcomponents.chart.js +1 -1
- package/wijmo.webcomponents.chart.map.d.ts +1 -1
- package/wijmo.webcomponents.chart.map.js +1 -1
- package/wijmo.webcomponents.chart.radar.d.ts +1 -1
- package/wijmo.webcomponents.chart.radar.js +1 -1
- package/wijmo.webcomponents.gauge.d.ts +1 -1
- package/wijmo.webcomponents.gauge.js +1 -1
- package/wijmo.webcomponents.grid.d.ts +1 -1
- package/wijmo.webcomponents.grid.filter.d.ts +1 -1
- package/wijmo.webcomponents.grid.filter.js +1 -1
- package/wijmo.webcomponents.grid.grouppanel.d.ts +1 -1
- package/wijmo.webcomponents.grid.grouppanel.js +1 -1
- package/wijmo.webcomponents.grid.js +1 -1
- package/wijmo.webcomponents.grid.multirow.d.ts +1 -1
- package/wijmo.webcomponents.grid.multirow.js +1 -1
- package/wijmo.webcomponents.grid.search.d.ts +1 -1
- package/wijmo.webcomponents.grid.search.js +1 -1
- package/wijmo.webcomponents.grid.sheet.d.ts +1 -1
- package/wijmo.webcomponents.grid.sheet.js +1 -1
- package/wijmo.webcomponents.grid.transposed.d.ts +1 -1
- package/wijmo.webcomponents.grid.transposed.js +1 -1
- package/wijmo.webcomponents.grid.transposedmultirow.d.ts +1 -1
- package/wijmo.webcomponents.grid.transposedmultirow.js +1 -1
- package/wijmo.webcomponents.input.d.ts +1 -1
- package/wijmo.webcomponents.input.js +1 -1
- package/wijmo.webcomponents.nav.d.ts +1 -1
- package/wijmo.webcomponents.nav.js +1 -1
- package/wijmo.webcomponents.olap.d.ts +1 -1
- package/wijmo.webcomponents.olap.js +1 -1
- package/wijmo.webcomponents.viewer.d.ts +1 -1
- package/wijmo.webcomponents.viewer.js +1 -1
- package/wijmo.xlsx.d.ts +4704 -4711
- package/wijmo.xlsx.js +2 -2
package/wijmo.grid.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* Wijmo Library 5.20261.45-nightly.
|
|
3
|
+
* Wijmo Library 5.20261.45-nightly.d20260105.t163143
|
|
4
4
|
* https://developer.mescius.com/wijmo
|
|
5
5
|
*
|
|
6
6
|
* Copyright(c) MESCIUS inc. All rights reserved.
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
"use strict";var _a,__extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var DataMapEditor,wijmo_1=require("wijmo/wijmo"),wijmo_input_1=require("wijmo/wijmo.input"),mInput=__importStar(require("wijmo/wijmo.input")),selfModule=__importStar(require("wijmo/wijmo.grid")),_safariVer=null;function _getSafariVer(){return _safariVer}exports._getSafariVer=_getSafariVer;if(wijmo_1.isSafari()){var match=navigator.userAgent.match(/version\/([\d\.]+)/i);if(null!=match){var version=match[1],parts=(match=version.match(/(\d+)/g)).map((function(e){return parseInt(e)}));_safariVer={full:version,major:parts[0],minor:parts[1]}}}exports.FlexGridClsNames={alt:"wj-alt",bigHeader:"wj-big-header",bottomLeft:"wj-bottomleft",cell:"wj-cell",cellCheck:"wj-cell-check",cellIndex:"wj-cell-index",cells:"wj-cells",colFooters:"wj-colfooters",colGroup:"wj-colgroup",colHeaders:"wj-colheaders",elemCollapse:"wj-elem-collapse",elemCollapseSpace:"wj-elem-collapse-space",elemDropDown:"wj-elem-dropdown",elemPin:"wj-elem-pin",errorTip:"wj-error-tip",focusHeaderCell:"wj-focus-header-cell",frozen:"wj-frozen",frozenClone:"wj-frozen-clone",frozenCol:"wj-frozen-col",frozenColLeft:"wj-frozen-col-left",frozenColRight:"wj-frozen-col-right",frozenColRightEdge:"wj-frozen-col-right-edge",frozenRow:"wj-frozen-row",frozenRowBottom:"wj-frozen-row-bottom",gridEditor:"wj-grid-editor",gridIme:"wj-grid-ime",gridListBox:"wj-grid-listbox",group:"wj-group",groupSummary:"wj-group-summary",hasDropDown:"wj-hasdropdown",header:"wj-header",headerAlt:"wj-header-alt",hostElement:"wj-flexgrid",lastFrozenRow:"wj-last-frozen-row",lastFrozenRowBottom:"wj-last-frozen-row-bottom",lastVisibleCol:"wj-last-visible-col",lastVisibleRow:"wj-last-visible-row",marker:"wj-marker",marquee:"wj-marquee",multiline:"wj-multiline",new:"wj-new",radioMap:"wj-radio-map",row:"wj-row",rowHeaders:"wj-rowheaders",sortAsc:"wj-sort-asc",sortDesc:"wj-sort-desc",sortIndex:"wj-sort-index",topLeft:"wj-topleft",whiteSpacePre:"wj-whitespace-pre",wrap:"wj-wrap",noDataOverlay:"wj-no-data-overlay",screenReaderOnly:"wj-sr-only"};exports._CustomEditorClsNames={editorsContainer:"wj-grid-editors-container"};!function(e){e[e.AutoComplete=0]="AutoComplete";e[e.DropDownList=1]="DropDownList";e[e.RadioButtons=2]="RadioButtons";e[e.Menu=3]="Menu"}(DataMapEditor=exports.DataMapEditor||(exports.DataMapEditor={}));var DataMap=function(){function DataMap(e,t,i){this._keyPath="";this._displayPath="";this._sortByVal=!0;this._editable=!1;this._useFilter=!1;this._serK=!0;this.mapChanged=new wijmo_1.Event;if(wijmo_1.isArray(e)&&!t&&!i){e=e.map((function(e){return{value:e}}));t=i="value"}this._cv=wijmo_1.asCollectionView(e);this._keyPath=wijmo_1.asString(t,!1);this._displayPath=wijmo_1.asString(i,!1);this._cv.collectionChanged.addHandler(this.onMapChanged,this)}Object.defineProperty(DataMap.prototype,"sortByDisplayValues",{get:function(){return this._sortByVal},set:function(e){this._sortByVal=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"serializeKeys",{get:function(){return this._serK},set:function(e){if((e=wijmo_1.asBoolean(e))!==this._serK){var t=this._map,i=t&&t.size;this._map=null;this._serK=e;i&&this.onMapChanged(wijmo_1.EventArgs.empty)}},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"selectedValuePath",{get:function(){return this._keyPath},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"displayMemberPath",{get:function(){return this._displayPath},enumerable:!0,configurable:!0});DataMap.prototype.getDataItem=function(e){var t=this;if(!this._map){var i=this._cv.sourceCollection,o=new wijmo_1._Map(this.serializeKeys);wijmo_1.isArray(i)&&this._keyPath&&i.forEach((function(e){var i=e[t._keyPath];o.has(i)||o.set(i,e)}));this._map=o}return this._map.get(e)};DataMap.prototype.getDisplayValue=function(e){var t=this._displayPath,i=this.getDataItem(e);return t&&i?i[t]:e};DataMap.prototype.getKeyValue=function(e,t){var i=this._displayPath,o=this._indexOf(e,i,t,!0);o<0&&(o=this._indexOf(e,i,t,!1));return o>-1?this._cv.sourceCollection[o][this._keyPath]:null};DataMap.prototype.getDisplayValues=function(e){var t=this;return this._cv&&this._displayPath?this._cv.items.map((function(e){return e[t._displayPath]})):[]};DataMap.prototype.getFilteredItems=function(e){return this._cv?this._cv.items:[]};Object.defineProperty(DataMap.prototype,"useFilter",{get:function(){return this._useFilter},set:function(e){this._useFilter=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});DataMap.prototype.getKeyValues=function(){var e=this;return this._cv&&this._keyPath?this._cv.items.map((function(t){return t[e._keyPath]})):[]};Object.defineProperty(DataMap.prototype,"isEditable",{get:function(){return this._editable},set:function(e){this._editable=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"search",{get:function(){return this._search},set:function(e){e&&(this._search=wijmo_1.asFunction(e))},enumerable:!0,configurable:!0});DataMap.prototype.onMapChanged=function(e){this._map=null;this.mapChanged.raise(this,e)};DataMap.prototype._indexOf=function(e,t,i,o){var n=-1,r=-1;if(this._cv&&t){var l=null!=e?e.toString():"";l&&i&&(e=wijmo_1.toPlainText(l));for(var s=o?l:l.toLowerCase(),a=this._cv.sourceCollection,d=0;d<a.length;d++){var c=a[d],u=c?c[t]:void 0;null!=u&&null!=u||(u="");i&&wijmo_1.isString(u)&&(u=wijmo_1.toPlainText(u));u==e?n=d:o||u.length!=s.length||u.toLowerCase()!=s?null!=u&&u.toString()==l&&(n=d):n=d;if(n==d){if(!this._cv.filter||this._cv.filter(c))return n;r<0&&(r=n)}}}return r};return DataMap}();exports.DataMap=DataMap;var CellType,CellRange=function(){function CellRange(e,t,i,o){void 0===e&&(e=-1);void 0===t&&(t=-1);void 0===i&&(i=e);void 0===o&&(o=t);this.setRange(e,t,i,o)}CellRange.prototype.setRange=function(e,t,i,o){void 0===e&&(e=-1);void 0===t&&(t=-1);void 0===i&&(i=e);void 0===o&&(o=t);this._row=wijmo_1.asInt(e);this._col=wijmo_1.asInt(t);this._row2=wijmo_1.asInt(i);this._col2=wijmo_1.asInt(o)};Object.defineProperty(CellRange.prototype,"row",{get:function(){return this._row},set:function(e){this._row=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"col",{get:function(){return this._col},set:function(e){this._col=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"row2",{get:function(){return this._row2},set:function(e){this._row2=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"col2",{get:function(){return this._col2},set:function(e){this._col2=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});CellRange.prototype.clone=function(){return new CellRange(this._row,this._col,this._row2,this._col2)};CellRange.prototype.copy=function(e){this.setRange(e._row,e._col,e._row2,e._col2)};Object.defineProperty(CellRange.prototype,"rowSpan",{get:function(){return Math.abs(this._row2-this._row)+1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"columnSpan",{get:function(){return Math.abs(this._col2-this._col)+1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"topRow",{get:function(){return Math.min(this._row,this._row2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"bottomRow",{get:function(){return Math.max(this._row,this._row2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"leftCol",{get:function(){return Math.min(this._col,this._col2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"rightCol",{get:function(){return Math.max(this._col,this._col2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"isValid",{get:function(){return this._row>-1&&this._col>-1&&this._row2>-1&&this._col2>-1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"isSingleCell",{get:function(){return this._row==this._row2&&this._col==this._col2},enumerable:!0,configurable:!0});CellRange.prototype.contains=function(e,t){var i=wijmo_1.tryCast(e,CellRange);if(i)return i.topRow>=this.topRow&&i.bottomRow<=this.bottomRow&&i.leftCol>=this.leftCol&&i.rightCol<=this.rightCol;if(wijmo_1.isInt(e)&&wijmo_1.isInt(t))return e>=this.topRow&&e<=this.bottomRow&&t>=this.leftCol&&t<=this.rightCol;throw"contains expects a CellRange or row/column indices."};CellRange.prototype.containsRow=function(e){return wijmo_1.asInt(e)>=this.topRow&&e<=this.bottomRow};CellRange.prototype.containsColumn=function(e){return wijmo_1.asInt(e)>=this.leftCol&&e<=this.rightCol};CellRange.prototype.intersects=function(e){return this.intersectsRow(e)&&this.intersectsColumn(e)};CellRange.prototype.intersectsRow=function(e){return e&&!(this.bottomRow<e.topRow||this.topRow>e.bottomRow)};CellRange.prototype.intersectsColumn=function(e){return e&&!(this.rightCol<e.leftCol||this.leftCol>e.rightCol)};CellRange.prototype.getRenderSize=function(e){var t=new wijmo_1.Size(0,0);if(this.isValid){for(var i=this.topRow;i<=this.bottomRow;i++)e.rows[i]&&(t.height+=e.rows[i].renderSize);for(var o=this.leftCol;o<=this.rightCol;o++)e.columns[o]&&(t.width+=e.columns[o].renderSize)}return t};CellRange.prototype.equals=function(e){return e instanceof CellRange&&this._row==e._row&&this._col==e._col&&this._row2==e._row2&&this._col2==e._col2};CellRange.prototype.combine=function(e){return e?new CellRange(Math.min(this.topRow,e.topRow),Math.min(this.leftCol,e.leftCol),Math.max(this.bottomRow,e.bottomRow),Math.max(this.rightCol,e.rightCol)):this};CellRange.prototype.toString=function(){return wijmo_1.format("({row}, {col})-({row2}, {col2})",this)};return CellRange}();exports.CellRange=CellRange;!function(e){e[e.None=0]="None";e[e.Cell=1]="Cell";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.TopLeft=4]="TopLeft";e[e.ColumnFooter=5]="ColumnFooter";e[e.BottomLeft=6]="BottomLeft"}(CellType=exports.CellType||(exports.CellType={}));var GridPanel=function(){function GridPanel(e,t,i,o,n){this._offsetY=0;this._rng=new CellRange;this._g=wijmo_1.asType(e,FlexGrid);this._ct=wijmo_1.asInt(t);this._rows=wijmo_1.asType(i,RowCollection);this._cols=wijmo_1.asType(o,ColumnCollection);this._e=wijmo_1.asType(n,HTMLElement);this._vrb=new CellRange;this._uid=wijmo_1.uidGenerator()}Object.defineProperty(GridPanel.prototype,"activeCell",{get:function(){return this._activeCell},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"cellType",{get:function(){return this._ct},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"viewRange",{get:function(){return this._getViewRange()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"width",{get:function(){return this._cols.getTotalSize()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"height",{get:function(){return this._rows.getTotalSize()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});GridPanel.prototype.getCellData=function(e,t,i){t=this._toIndex(t);return this._getCellData(e,t,i)};GridPanel.prototype._getCellData=function(e,t,i){var o,n,r=this._g,l=this._rows[wijmo_1.asNumber(e,!1,!0)];if(!l)return null;o=this._cols[wijmo_1.asNumber(t,!1,!0)];var s=r?r._getBindingColumn(this,e,o):o,a=null,d=l instanceof GroupRow;d&&l.dataItem instanceof wijmo_1.CollectionViewGroup&&!r.childItemsPath&&(a=l.dataItem);s&&l&&s.binding&&l.dataItem&&!a?n=s._binding.getValue(l.dataItem):l._ubv&&(n=l._ubv[o._hash]);null==n&&(n=this._getSpecialData(e,l,t,o,s,d,a,n));if(i){var c=s.dataMap||l.dataMap;if(this.cellType==CellType.Cell&&s._edt&&s._edt._ctl instanceof wijmo_input_1.MultiSelect&&n){var u=new wijmo_1.Binding(s._edt._ctl.displayMemberPath),h=u&&wijmo_1.isArray(n)?n.map((function(e){return u.getValue(e)})):n;if(wijmo_1.isArray(h)&&h.length>0){var _=h.join(", ");n=wijmo_1.format(_||wijmo_1.culture.MultiSelect.itemsSelected,{count:h.length})}}else this.cellType==CellType.Cell&&c&&(n=c.getDisplayValue(n));n=null!=n?wijmo_1.Globalize.format(n,s.format||l.format):""}return n};GridPanel.prototype.setCellData=function(e,t,i,o,n,r){void 0===o&&(o=!0);void 0===n&&(n=!0);void 0===r&&(r=!1);var l=this._g,s=this._rows[wijmo_1.asNumber(e,!1,!0)],a=wijmo_1.asNumber(this._toIndex(t),!1,!0),d=this._cols[a],c=wijmo_1.DataType;if(!s)return!1;var u=l?l._getBindingColumn(this,e,d):d;if(!u)return!1;var h=u.dataMap||s.dataMap;if(this._ct==CellType.Cell){var _=u.getIsRequired(s),p=u.isContentHtml||s.isContentHtml;if(!r&&h&&null!=i){var g=h.getKeyValue(i,p);if(null==g&&null==h.getDisplayValue(null)){if(h.getDisplayValue(i)!=i);else if(!h.isEditable||h.displayMemberPath!=h.selectedValuePath){if(""!=i||_||!l.commitEmptyEdits)return!1;i=null}}else{var f=l.getRowDataItem(e,a);if(h.useFilter&&f){var m=h.getFilteredItems(f);if(!(m.length>0))return!1;if(m.filter((function(e){return e[h._keyPath]==g})).length>0)i=g;else{var w=m.filter((function(e){return e[h.displayMemberPath]==i}));w.length>0&&(i=w[0][h._keyPath])}}else i=g}}var C=c.Object,v=u.dataType||s.dataType,y=this.getCellData(e,t,!1);u._edt&&u._edt._ctl instanceof wijmo_input_1.MultiSelect&&v===c.String&&wijmo_1.isArray(i)&&(i=i.join(", "));C=v||wijmo_1.getType(y);if(null==i||""===i&&o&&!h){if(_||!l.commitEmptyEdits&&(null==y||""===y))return!1;C!=c.String&&(i=null);o=!1}if("NaN"==i&&Number.isNaN(y)&&!l.commitEmptyEdits)return!1;if(o){var b=u.format||s.format;b||C!=c.Date||(b="d");u.mask&&wijmo_1.isString(i)&&C!=c.String&&(i=i.replace(/_/g,""));i=wijmo_1.changeType(i,C,b,y);if(C!=c.Object&&wijmo_1.getType(i)!=C)return!1}}if(s.dataItem&&u.binding){var R=u._binding,x=s.dataItem,S=R.getValue(x);if(i!==S&&(h&&!h.serializeKeys||!wijmo_1.DateTime.equals(i,S))){var E=l.collectionView,j=E instanceof wijmo_1.CollectionView&&x!=E.currentEditItem&&E.trackChanges,H=null;j&&(H=E._extend({},x));R.setValue(x,i);if(j){var F=new wijmo_1.NotifyCollectionChangedEventArgs(wijmo_1.NotifyCollectionChangedAction.Change,x,E.items.indexOf(x));E.onCollectionChanged(F,H)}}}else{s._ubv||(s._ubv={});s._ubv[d._hash]=i}n&&l&&l.invalidate();return!0};GridPanel.prototype._getRowData=function(e){var t,i=this._g,o=this._rows[wijmo_1.asNumber(e,!1,!0)],n=null,r=[];if(null!=o){var l=null,s=o instanceof GroupRow;s&&o.dataItem instanceof wijmo_1.CollectionViewGroup&&!i.childItemsPath&&(l=o.dataItem);for(var a=!l&&o.dataItem,d=0;d<i.columns.length;d++){var c=t=this._cols[d];a&&i&&(c=i._getBindingColumn(this,e,t));c.binding?n=c._binding.getValue(o.dataItem):o._ubv&&(n=o._ubv[t._hash]);null==n&&(n=this._getSpecialData(e,o,d,t,c,s,l,n));r[d]=n}}return r};GridPanel.prototype._getSpecialData=function(e,t,i,o,n,r,l,s){var a=s,d=CellType;switch(this._ct){case d.TopLeft:case d.ColumnHeader:e!=this._rows.length-1&&n==o||(a=n.header);break;case d.ColumnFooter:if(r&&n.aggregate!=wijmo_1.Aggregate.None){var c=this._g.collectionView;if(c){var u=wijmo_1.tryCast(c,wijmo_1.CollectionView);a=u?u.getAggregate(n.aggregate,n.binding):wijmo_1.getAggregate(n.aggregate,c.items,n.binding)}}break;case d.Cell:var h=void 0,_=this._g._isServerCollectionView(this._g.collectionView);_&&(h=this._g.collectionView);if(t instanceof GroupRow)if(i==this._cols.firstVisibleIndex)a=t.getGroupHeader();else if(_&&h.groupOnServer&&(h.groupLazyLoading||h._virtualization)){var p=t.dataItem;a=h.getGroupAggregate(n.binding,p,n.aggregate)}else l&&n.aggregate!=wijmo_1.Aggregate.None&&(a=l.getAggregate(n.aggregate,n.binding,this._g.collectionView,this._g))}return a};GridPanel.prototype.getCellBoundingRect=function(e,t,i){var o=this._g,n=this.rows[e],r=this.columns[this._toIndex(t)],l=this.rows._frozenInternal<0&&this.rows.isFrozen(e)&&o._hasScroll(this.rows)?this._g._szClient.height+n._antipos:n.pos,s=this.columns._frozenInternal<0&&this.columns.isFrozen(Number(t))&&o._hasScroll(this.columns)?this._g._szClient.width+r._antipos:r.pos,a=new wijmo_1.Rect(s,l,r.renderSize,n.renderSize);if(o.rightToLeft){a.left=this.hostElement.clientWidth-a.right;wijmo_1.isIE()||(a.left-=o._root.offsetWidth-o._root.clientWidth)}if(!i){var d=this.hostElement.getBoundingClientRect();a.left+=d.left;a.top+=d.top-this._offsetY}this.rows.isFrozen(e)&&(this.rows._frozenInternal>0||!this.rows.isFrozen(this.rows._firstVisible))&&(a.top-=o.scrollPosition.y);this.columns.isFrozen(Number(t))&&(a.left-=o.scrollPosition.x*(o.rightToLeft?-1:1));return a};GridPanel.prototype.getCellElement=function(e,t){var i=this.hostElement.children,o=this._g.rows._frozenInternal<0?i.length:Math.min(e+2,i.length);t=this._toIndex(t);for(var n=0;n<o;n++)for(var r=i[n].children,l=this._g.columns._frozenInternal<0?r.length:Math.min(t+2,r.length),s=0;s<l;s++){var a=r[s],d=a[GridPanel._INDEX_KEY];if(d&&(d.row==e&&d.col==t||d.rng&&d.rng.contains(e,t)))return a}return null};GridPanel.prototype.getSelectedState=function(e,t,i){var o=this._g,n=o.selectionMode,r=o._selHdl.selection,l=SelectionMode,s=SelectedState;if(n==l.None)return s.None;t=this._toIndex(t);switch(this._ct){case CellType.Cell:if(o.activePanelType!=this.cellType){i||(i=o.getMergedRange(this,e,t)||new CellRange(e,t));for(var a=i.leftCol;a<=i.rightCol;a++)if(o.columns[a]&&o.columns[a].isSelected)return s.Selected;for(var d=i.topRow;d<=i.bottomRow;d++)if(o.rows[d].isSelected)return s.Selected;return s.None}i||(i=o.getMergedRange(this,e,t));var c=o._getAnchorCell();if(i){if(i.contains(r.row,r.col)){if(!o.anchorCursor||null==c)return o.showMarquee?s.Active:s.Cursor;if(e==c.y&&t==c.x||i.row==c.y&&i.col==c.x)return o.showMarquee?s.Active:s.Cursor}if(i.intersects(r)&&o.anchorCursor&&null!=c&&(e==c.y&&t==c.x||i.row==c.y&&i.col==c.x))return o.showMarquee?s.Active:s.Cursor;if(i.intersects(r)&&n!=l.ListBox)return s.Selected;for(a=i.leftCol;a<=i.rightCol;a++)if(o.columns[a]&&o.columns[a].isSelected)return s.Selected;for(d=i.topRow;d<=i.bottomRow;d++)if(o.rows[d].isSelected)return s.Selected}if(o.anchorCursor&&null!=c){if(e==c.y&&t==c.x)return o.showMarquee?s.Active:s.Cursor}else if(r.row==e&&r.col==t)return o.showMarquee?s.Active:s.Cursor;if(o.rows[e].isSelected||o.columns[t].isSelected)return s.Selected;if(n==l.MultiRange)for(var u=o._selHdl.extendedSelection,h=0;h<u.length;h++)if(u[h].contains(e,t)||i&&i.intersects(u[h]))return s.Selected;if(i)switch(n){case l.Row:case l.RowRange:if(i.containsRow(r.row))return s.Selected}return n==l.ListBox?s.None:(r=this._getAdjustedSelection(r)).containsRow(e)&&r.containsColumn(t)?s.Selected:s.None;case CellType.ColumnHeader:if(o.activePanelType==CellType.ColumnHeader){if((i=o.getMergedRange(this,e,t,!1))&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}if(o.activePanelType==CellType.Cell&&o.showSelectedHeaders&HeadersVisibility.Column&&(o.columns[t].isSelected||r.containsColumn(t)||r.intersectsColumn(i))){i&&(e=i.bottomRow);if(e==this.rows.length-1)return s.Selected}break;case CellType.RowHeader:if(o.activePanelType==CellType.RowHeader){if((i=o.getMergedRange(this,e,t,!1))&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}if(o.activePanelType==CellType.Cell&&o.showSelectedHeaders&HeadersVisibility.Row&&(o.rows[e].isSelected||r.containsRow(e)||r.intersectsRow(i))){i&&(t=i.rightCol);if(t==this.columns.length-1)return s.Selected}break;case CellType.TopLeft:if(o.activePanelType==CellType.TopLeft){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}break;case CellType.BottomLeft:if(o.activePanelType===CellType.BottomLeft){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}break;case CellType.ColumnFooter:if(o.activePanelType===CellType.ColumnFooter){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}}return s.None};Object.defineProperty(GridPanel.prototype,"hostElement",{get:function(){return this._e},enumerable:!0,configurable:!0});GridPanel.prototype.isRangeValid=function(e){return e&&e.isValid&&e.bottomRow<this.rows.length&&e.rightCol<this.columns.length};GridPanel.prototype.getNextVisibleRow=function(e){void 0===e&&(e=0);for(var t=Math.max(e,0);t<this.rows.length;t++)if(this.rows[t].isVisible)return t;return-1};GridPanel.prototype.getLastVisibleRow=function(e){void 0===e&&(e=1/0);for(var t=Math.min(e,this.rows.length-1);t>=0;t--)if(this.rows[t].isVisible)return t;return-1};GridPanel.prototype.getNextVisibleColumn=function(e){void 0===e&&(e=0);for(var t=Math.max(e,0);t<this.columns.length;t++)if(this.columns[t].isVisible)return t;return-1};GridPanel.prototype.getLastVisibleColumn=function(e){void 0===e&&(e=1/0);for(var t=Math.min(e,this.columns.length-1);t>=0;t--)if(this.columns[t].isVisible)return t;return-1};GridPanel.prototype._toIndex=function(e){if(wijmo_1.isString(e)&&(e=this._cols.indexOf(e))<0)throw"Invalid column name or binding.";return e};GridPanel.prototype._getAdjustedSelection=function(e){var t=this._g,i=this._rng,o=SelectionMode;switch(t.selectionMode){case o.Cell:i.setRange(e.row,e.col,e.row,e.col);break;case o.Row:i.setRange(e.row,0,e.row,t.columns.length-1);break;case o.RowRange:case o.ListBox:i.setRange(e.row,0,e.row2,t.columns.length-1);break;default:i.copy(e)}return i};GridPanel.prototype._getOffsetY=function(){return this._offsetY};GridPanel.prototype._updateContent=function(e,t,i,o){var n=this._g,r=this._e,l=this._rows,s=this._cols,a=this._ct;if(a==CellType.ColumnHeader||a==CellType.ColumnFooter||a==CellType.RowHeader){var d=n._ptScrl,c=r.style;a==CellType.RowHeader?c.top=d.y+"px":n.rightToLeft?c.right=d.x+"px":c.left=d.x+"px"}if(this._offsetY!=i){e=!1;this._offsetY=i}var u=this._getViewRange(),h=u;if(h.isValid){var _=l.length<=n._vtRows?l.length:0,p=s.length<=n._vtCols?s.length:0,g=l._frozenInternal>=0?Math.max(u.row-_,l._frozenInternal):Math.max(u.row-_,0),f=l._frozenInternal>=0?Math.min(u.row2+_,l.length-1):Math.min(u.row2+_,l.length-1+l._frozenInternal),m=s._frozenInternal>=0?Math.max(u.col-p,s._frozenInternal):Math.max(u.col-p,0),w=s._frozenInternal>=0?Math.min(u.col2+p,s.length-1):Math.min(u.col2+p,s.length-1+s._frozenInternal);h=new CellRange(g,m,f,w)}if(e&&!t&&this._vrb.contains(u)&&!l._frozenInternal&&!s._frozenInternal)return this._activeCell;e&&h.equals(this._vrb)||(t=!1);e&&!t&&this._ct!=CellType.TopLeft&&this._reorderCells(h,this._vrb);this._activeCell=null;this._vru=u;this._vrb=h;this._recycle=e;var C=this.grid.topLeftCells.hostElement.parentElement;[HeadersVisibility.Row,HeadersVisibility.Column].includes(n.headersVisibility)?wijmo_1.setAttribute(C,"aria-hidden",!0):C.removeAttribute("aria-hidden");this._updateCells(t,0,o);return this._activeCell};GridPanel.prototype._updateCells=function(e,t,i){var o=this,n=this._rows,renderVisibleRange=function(){for(var n=o._vrb.topRow;n<=o._vrb.bottomRow&&n>-1;n++)t=o._renderRow(n,o._vrb,e,t,i)};if(n._frozenInternal>0){!function(){for(var r=0;r<n._frozenInternal&&r<n.length;r++)t=o._renderRow(r,o._vrb,e,t,i)}();renderVisibleRange()}else if(n._frozenInternal<0){renderVisibleRange();!function(){for(var r=n._lastFrozen;r<n.length;r++)t=o._renderRow(r,o._vrb,e,t,i)}()}else renderVisibleRange();this._scanAndRemoveExtraCells(t)};GridPanel.prototype._scanAndRemoveExtraCells=function(e){for(var t=this._e;t.childElementCount>e;){var i=t.lastElementChild;wijmo_1.removeChild(i);this._removeExtraCells(i,0)}};GridPanel.prototype._clearCells=function(){for(var e=this.hostElement,t=this._g.cellFactory,i=e.childElementCount-1;i>=0;i--){for(var o=e.children[i],n=o.childElementCount-1;n>=0;n--)t.disposeCell(o.children[n]);wijmo_1.removeChild(o)}e.innerHTML=""};GridPanel.prototype._reorderCells=function(e,t){var i=this;if(this._g._reorderCells&&t.isValid&&e.isValid&&e.intersects(t)){var relocateForScrollToBeginning=function(e,t,o,n,r,l){wijmo_1.assert(o<0,"Scroll delta must be a negative number");var s,a,d=-o,c=t+(n-r+1),u=e.childElementCount-c;if(u<d&&u>0){s=u;a=d-u}else{s=d;a=0}if(s>0){var h=i._createRange(e,c,c+s);h&&e.insertBefore(h.extractContents(),e.children[t])}if(a>0)for(var _=e.children[t],p=0;p<a;p++){var g=document.createElement("div");g.className=l;e.insertBefore(g,_)}};if(e.row!=t.row){var o=this._e;if(0!=(a=e.row-t.row)){var n=this._ct==CellType.Cell?1:0,r=o.childElementCount;this.rows._frozenInternal>0&&(n+=this.rows._frozenInternal);if(a>0){var l=n,s=Math.min(n+a,r);(h=this._createRange(o,l,s))&&o.appendChild(h.extractContents())}else relocateForScrollToBeginning(o,n,a,e.row2,t.row,exports.FlexGridClsNames.row)}}if(e.col!=t.col){var a;o=this._e;if(0!=(a=e.col-t.col)){n=this._ct==CellType.Cell&&this._g.rowHeaderPath?1:0;this.columns._frozenInternal>=0&&(n+=this.columns._frozenInternal);for(var d=0;d<o.children.length;d++){var c=o.children[d],u=r=c.children.length;this.columns._frozenInternal<0&&(u+=this.columns._frozenInternal);if(wijmo_1.hasClass(c,exports.FlexGridClsNames.row))if(a>0){var h;l=n,s=Math.min(n+a,u);(h=this._createRange(c,l,s))&&c.appendChild(h.extractContents())}else relocateForScrollToBeginning(c,n,a,e.col2,t.col,exports.FlexGridClsNames.cell)}}}}};GridPanel.prototype._createRange=function(e,t,i){if(i>t&&i<=e.children.length&&t>-1){this._docRange||(this._docRange=document.createRange());var o=this._docRange;o.setStart(e,t);o.setEnd(e,i);return o}return null};GridPanel.prototype._renderRowHdrCell=function(e,t,i){var o=e.children[0];o||(o=wijmo_1.createElement(GridPanel._HTML_CELL,e));o.setAttribute("role",t<0?"columnheader":"rowheader");o.textContent=i?i.toString():"";wijmo_1.setCss(o,{position:"fixed",left:-32e3,top:-32e3,width:.1,height:.1,overflow:"hidden",opacity:"0"});o[GridPanel._INDEX_KEY]={row:t,col:-1,panel:this};return 1};GridPanel.prototype._renderRow=function(e,t,i,o,n){var r=this._g,l=this.rows[e];if(l.renderSize<=0)return o;var s=this._e.children[o];s||(s=wijmo_1.createElement('<div class="'+exports.FlexGridClsNames.row+'"></div>',this._e));var a=this._g.columnHeaders&&this._g.columnHeaders.rows&&this._g.columnHeaders.rows.length||0,d=this._g.headersVisibility&HeadersVisibility.Column?a:0,makeId=function(e,t,i){return"g-"+r._ariaId+"-"+e+"-"+t+"-"+i},setAriaOwns=function(t,i){for(var o=[],n=0;n<i;n++)o.push(makeId(t,e,n));return o.join(" ")};switch(this._ct){case CellType.ColumnHeader:if(r.headersVisibility&HeadersVisibility.Row&&r.headersVisibility&HeadersVisibility.Column){var c=[],u=setAriaOwns("tl",r.topLeftCells.columns.length);u&&c.push(u);var h=setAriaOwns("ch",this.columns.length);h&&c.push(h);(g=c.join(" "))&&wijmo_1.setAttribute(s,"aria-owns",g)}wijmo_1.setAttribute(s,"aria-rowindex",e+1);break;case CellType.TopLeft:wijmo_1.setAttribute(s,"aria-rowindex",e+1);break;case CellType.Cell:if(r.headersVisibility&HeadersVisibility.Row){c=[];var _=setAriaOwns("rh",r.rowHeaders.columns.length);_&&c.push(_);var p=setAriaOwns("cell",r.cells.columns.length);p&&c.push(p);var g=c.join(" ");this._allowSetAriaOwns(g,s)?wijmo_1.setAttribute(s,"aria-owns",g):wijmo_1.setAttribute(s,"aria-owns")}wijmo_1.setAttribute(s,"aria-rowindex",e+1+d);break;case CellType.RowHeader:wijmo_1.setAttribute(s,"aria-rowindex",e+1+d);break;case CellType.BottomLeft:case CellType.ColumnFooter:if(r.headersVisibility&HeadersVisibility.Row){c=[];var f=setAriaOwns("bl",r.bottomLeftCells.columns.length);f&&c.push(f);var m=setAriaOwns("cf",r.columnFooters.columns.length);m&&c.push(m);(g=c.join(" "))&&wijmo_1.setAttribute(s,"aria-owns",g)}var w=a+r.rows.length+e+1;wijmo_1.setAttribute(s,"aria-rowindex",w)}if(this._ct==CellType.Cell){s.setAttribute("role","row");var C=SelectionMode,v=l.isSelected;switch(r.selectionMode){case C.Row:case C.RowRange:v=v||this._g._selHdl.selection.containsRow(e)}wijmo_1.setAttribute(s,"aria-selected",!!v||null);wijmo_1.setAttribute(s,"aria-level",l instanceof GroupRow?l.level+1:null);wijmo_1.setAttribute(s,"aria-expanded",l instanceof GroupRow?!l.isCollapsed:null);this.rows.ariaLabel&&wijmo_1.setAttribute(s,"aria-label",this.rows.ariaLabel)}this._ct!==CellType.TopLeft&&this._ct!==CellType.ColumnFooter&&this._ct!==CellType.BottomLeft||s.setAttribute("role","row");var y=0;if(this._ct==CellType.Cell||this._ct==CellType.ColumnHeader){var b=this._g._getRowHeaderPath();if(b){var R=this._ct==CellType.Cell?[b.getValue(l.dataItem),e]:[b.path,-1],x=R[0],S=R[1];y=this._renderRowHdrCell(s,S,x)}}var E=t.clone();E.col=this.columns._frozenInternal>=0?0:this.columns.length+this.columns._frozenInternal;E.col2=this.columns._frozenInternal>=0?this.columns._frozenInternal-1:this.columns.length-1;if(this.columns._frozenInternal>=0)for(var j=0;j<this.columns._frozenInternal&&j<this.columns.length;j++)y=this._renderCell(s,e,j,E,i,y,n);else for(j=Math.max(0,this.columns.length+this.columns._frozenInternal);j<this.columns.length;j++)y=this._renderCell(s,e,j,E,i,y,n);if(t.leftCol>-1){var H=r.getMergedRange(this,e,t.leftCol,!1),F=-1;if(H){F=H.leftCol;for(;!this.columns[F].isVisible&&F<H.rightCol;)F++}H&&F<t.leftCol&&(y=this._renderCell(s,e,F,t,i,y,n))}for(j=t.leftCol;j<=t.rightCol&&j>-1;j++)y=this._renderCell(s,e,j,t,i,y,n);this._removeExtraCells(s,y);return o+1};GridPanel.prototype._allowSetAriaOwns=function(e,t){return!!e&&!wijmo_1.hasClass(t,"wj-detail-row")};GridPanel.prototype._renderCell=function(e,t,i,o,n,r,l){var s=this._g,a=this._ct==CellType.Cell?s.getMergedRange(this,t,i,!1):s.getMergedRange(this,t,i);if(a){for(var d=Math.max(o.row,a.row);d<t;d++)if(this.rows[d].renderSize)return r;for(d=Math.max(o.col,a.col);d<i;d++)if(this.columns[d].renderSize)return r;if(t>=a.row&&t<=a.row2&&i>a.col&&i<=a.col2&&this._ct===CellType.Cell&&a.isSingleCell)return r;var c=this.columns._frozenInternal;if(c&&a.col<c&&a.col2>=c&&i>a.col)return r;if(!this.columns[i].isVisible&&"DetailRow"!==this._rows[t].constructor.name)return r;if(a.leftCol!=i)for(var u=a.leftCol;u<i;u++)if(this.columns[u].isVisible)return r}var h=this.columns[i];if((!h||h.renderSize<=0)&&(!a||a.getRenderSize(this).width<=0))return r;var _=e.children[r];if(_&&!n&&this._recycle&&s._lazyRender&&!s.activeEditor){var p=_[GridPanel._INDEX_KEY];p&&p.row==t&&p.col==i&&p.rng==a&&(this.rows.isFrozen(t)||this.columns.isFrozen(i)||(n=!0))}var g=SelectedState,f=this.getSelectedState(t,i,a),m=f==g.Cursor||f==g.Active,w=!1;switch(this.cellType){case CellType.RowHeader:case CellType.ColumnHeader:case CellType.TopLeft:case CellType.BottomLeft:case CellType.ColumnFooter:w=!0}if(_&&n){wijmo_1.toggleClass(_,wijmo_1.ControlStateClsNames.active,m);wijmo_1.toggleClass(_,w?exports.FlexGridClsNames.focusHeaderCell:wijmo_1.ControlStateClsNames.selected,f==g.Cursor);wijmo_1.toggleClass(_,wijmo_1.ControlStateClsNames.multiSelected,f==g.Selected);_.querySelector(".wj-column-selector, .wj-cell-check")||wijmo_1.setAttribute(_,"aria-selected",!(!m&&f==g.None)||null);m&&(this._activeCell=_);return r+1}_||(_=wijmo_1.createElement(GridPanel._HTML_CELL,e));var C=l?i+1+l:i+1;wijmo_1.setAttribute(_,"aria-colindex",C);m&&(this._activeCell=_);if(this._ct==CellType.Cell){wijmo_1.setAttribute(_,"role","gridcell");wijmo_1.setAttribute(_,"aria-selected",!(f==g.None&&!m)||null);var v=!s.canEditCell(t,i)||null;wijmo_1.setAttribute(_,"aria-readonly",v);wijmo_1.setAttribute(_,"aria-required",v?null:h.getIsRequired())}this._ct!==CellType.ColumnFooter&&this._ct!==CellType.BottomLeft||wijmo_1.setAttribute(_,"role","gridcell");s.cellFactory.updateCell(this,t,i,_,a);_[GridPanel._INDEX_KEY]={row:t,col:i,rng:a,panel:this};return r+1};GridPanel.prototype._removeExtraCells=function(e,t){var i=this._g.cellFactory;0!==t||this.cellType!==CellType.RowHeader&&this.cellType!==CellType.TopLeft&&this.cellType!==CellType.BottomLeft||wijmo_1.setAttribute(e,"aria-hidden","true");for(;e.childElementCount>t;){var o=e.lastElementChild;i.disposeCell(o);wijmo_1.removeChild(o)}};GridPanel.prototype._getViewRange=function(){var e=this._g,t=e._ptScrl,i=e._szClientSB,o=this._rows,n=this._cols,r=new CellRange(0,0,o.length-1,n.length-1);if(this._ct==CellType.Cell||this._ct==CellType.RowHeader){var l=-t.y+this._offsetY,s=i.height;if((u=Math.min(Math.abs(o._frozenInternal),o.length-1))>0)if(o._frozenInternal>=0){l+=p=o[u-1].pos;s-=p}else{s+=p=o[o.length-u]._antipos}if(o._frozenInternal>=0)if(u>0&&o[u].pos>i.height)r.row=r.row2=-1;else{r.row=Math.min(o.length-1,Math.max(u,o.getItemAt(l)));r.row2=Math.max(r.row,o.getItemAt(l+s))}else if(u>0&&o[o.length-u]._antipos+i.height<0)r.row=r.row2=-1;else{r.row=Math.min(o.length+o._frozenInternal-1,o.getItemAt(l));r.row2=Math.max(r.row,o.getItemAt(l+s));e.columnFooters.rows.length>0&&(r.row2-=e.columnFooters.rows.length)}var a=e.hostElement;if(e._clipToScreen&&a){var d=a.getBoundingClientRect(),c=-d.top-e.cells._e.offsetTop;d.top<0&&(r.row=Math.max(r.row,o.getItemAt(c)-1));d.bottom>innerHeight&&(r.row2=Math.min(r.row2,o.getItemAt(c+innerHeight)+1))}}if(this._ct==CellType.Cell||this._ct==CellType.ColumnHeader){var u,h=-t.x,_=i.width;if((u=Math.min(Math.abs(n._frozenInternal),n.length-1))>0&&n._frozenInternal>0){h+=p=n[u-1].pos;_-=p}else if(u>0&&n._frozenInternal<0){var p;h+=p=n[0].pos}if(n._frozenInternal>=0?u>0&&n[u].pos>i.width:u>0&&Math.abs(n[n.length-u]._antipos)>i.width)r.col=r.col2=-1;else if(n._frozenInternal>=0){r.col=Math.min(n.length-1,Math.max(u,n.getItemAt(h)));r.col2=Math.max(r.col,n.getItemAt(h+_))}else{r.col=Math.min(n.length-1,Math.max(0,n.getItemAt(h)));r.col2=Math.max(r.col,n.getItemAt(h+_-n._frozenColAreaWidth))}}o.length<=Math.abs(o._frozenInternal)&&(r.row=r.row2=-1);n.length<=Math.abs(n._frozenInternal)&&(r.col=r.col2=-1);return r};GridPanel.prototype._getFrozenPos=function(){var e=this._rows._frozenInternal,t=this._cols._frozenInternal,i=null,o=null,n=0,r=0;e>0?n=(i=e>0?this._rows[e-1]:null)?i.pos+i.renderSize:0:e<0&&this._rows.lastFrozen&&(n=Math.min(this._rows.lastFrozen.pos,this._g._szClient.height+this._rows.lastFrozen._antipos));t>0?r=(o=t>0?this._cols[t-1]:null)?o.pos+o.renderSize:0:t<0&&this._cols.lastFrozen&&(r=Math.min(this._cols.lastFrozen.pos,this._g._szClient.width+this._cols.lastFrozen._antipos));return new wijmo_1.Point(r,n)};GridPanel.prototype.dispose=function(){this._clearCells();if(this._docRange){this._docRange.detach();this._docRange=null}this._g=null;this._e=null;this._rows=null;this._cols=null;this._activeCell=null};GridPanel._INDEX_KEY=exports.FlexGridClsNames.cellIndex;GridPanel._HTML_CELL='<div class="'+exports.FlexGridClsNames.cell+'" tabindex="-1"></div>';return GridPanel}();exports.GridPanel=GridPanel;var CellRangeEventArgs=function(e){__extends(CellRangeEventArgs,e);function CellRangeEventArgs(t,i,o){var n=e.call(this)||this;n._p=wijmo_1.asType(t,GridPanel,!0);n._rng=wijmo_1.asType(i,CellRange,!0);n._data=o;return n}Object.defineProperty(CellRangeEventArgs.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"range",{get:function(){return this._rng.clone()},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"row",{get:function(){return this._rng.row},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"col",{get:function(){return this._rng.col},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0});CellRangeEventArgs.prototype.getRow=function(){return this._p&&this.row>-1?this._p.rows[this.row]:null};CellRangeEventArgs.prototype.getColumn=function(e){var t=this._p,i=t&&this.col>-1?t.columns[this.col]:null;if(i&&e){var o=t.grid;i=t.cellType===CellType.ColumnHeader&&o._hasColumnGroups()?o._getColumnGroup(this.row,this.col):t.grid._getBindingColumn(t,this.row,i)}return i};return CellRangeEventArgs}(wijmo_1.CancelEventArgs);exports.CellRangeEventArgs=CellRangeEventArgs;var FormatItemEventArgs=function(e){__extends(FormatItemEventArgs,e);function FormatItemEventArgs(t,i,o,n){void 0===n&&(n=!0);var r=e.call(this,t,i)||this;r._updateContent=!0;r._cell=wijmo_1.asType(o,HTMLElement);return r}Object.defineProperty(FormatItemEventArgs.prototype,"cell",{get:function(){return this._cell},enumerable:!0,configurable:!0});Object.defineProperty(FormatItemEventArgs.prototype,"updateContent",{get:function(){return this._updateContent},enumerable:!0,configurable:!0});return FormatItemEventArgs}(CellRangeEventArgs);exports.FormatItemEventArgs=FormatItemEventArgs;var SelectionMode,SelectedState,SelMove,CellEditEndingEventArgs=function(e){__extends(CellEditEndingEventArgs,e);function CellEditEndingEventArgs(){var t=null!==e&&e.apply(this,arguments)||this;t._stayInEditMode=!1;t._refresh=!0;return t}Object.defineProperty(CellEditEndingEventArgs.prototype,"stayInEditMode",{get:function(){return this._stayInEditMode},set:function(e){this._stayInEditMode=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellEditEndingEventArgs.prototype,"refresh",{get:function(){return this._refresh},set:function(e){this._refresh=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellEditEndingEventArgs.prototype,"previousData",{get:function(){return null!=this._previousData?this._previousData:this._data},set:function(e){this._previousData=e},enumerable:!0,configurable:!0});return CellEditEndingEventArgs}(CellRangeEventArgs);exports.CellEditEndingEventArgs=CellEditEndingEventArgs;function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softDetailRow(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softDetailRow=softDetailRow;function softMultirow(){return wijmo_1._getModule("wijmo.grid.multirow")}exports.softMultirow=softMultirow;function softTransposed(){return wijmo_1._getModule("wijmo.grid.transposed")}exports.softTransposed=softTransposed;function softTransposedMultirow(){return wijmo_1._getModule("wijmo.grid.transposedmultirow")}exports.softTransposedMultirow=softTransposedMultirow;function softRestCV(){return wijmo_1._getModule("wijmo.rest")}exports.softRestCV=softRestCV;function softODataCV(){return wijmo_1._getModule("wijmo.odata")}exports.softODataCV=softODataCV;function softGridInteropBase(){return wijmo_1._getModule("wijmo.interop.grid")}exports.softGridInteropBase=softGridInteropBase;!function(e){e[e.None=0]="None";e[e.Cell=1]="Cell";e[e.CellRange=2]="CellRange";e[e.Row=3]="Row";e[e.RowRange=4]="RowRange";e[e.ListBox=5]="ListBox";e[e.MultiRange=6]="MultiRange"}(SelectionMode=exports.SelectionMode||(exports.SelectionMode={}));!function(e){e[e.None=0]="None";e[e.Selected=1]="Selected";e[e.Cursor=2]="Cursor";e[e.Active=3]="Active"}(SelectedState=exports.SelectedState||(exports.SelectedState={}));!function(e){e[e.None=0]="None";e[e.Next=1]="Next";e[e.Prev=2]="Prev";e[e.NextPage=3]="NextPage";e[e.PrevPage=4]="PrevPage";e[e.Home=5]="Home";e[e.End=6]="End";e[e.NextCell=7]="NextCell";e[e.PrevCell=8]="PrevCell";e[e.NextEditableCell=9]="NextEditableCell";e[e.PrevEditableCell=10]="PrevEditableCell"}(SelMove=exports.SelMove||(exports.SelMove={}));var RowColFlags,_SelectionHandler=function(){function _SelectionHandler(e){this._sel=new CellRange(0,0);this._xSel=new wijmo_1.ObservableArray;this._mode=SelectionMode.CellRange;this._g=e;this._e=new CellRangeEventArgs(e.cells,new CellRange(0,0));this._collectionChangedHandler=function(){e.invalidate()};this._xSel.collectionChanged.addHandler(this._collectionChangedHandler)}Object.defineProperty(_SelectionHandler.prototype,"selectionMode",{get:function(){return this._mode},set:function(e){e!=this._mode&&this._setSelectionMode(e)},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"selection",{get:function(){return this._sel},set:function(e){this.select(e)},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"extendedSelection",{get:function(){return this._xSel},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"cellRangeEventArgs",{get:function(){return this._e},enumerable:!0,configurable:!0});_SelectionHandler.prototype.select=function(e,t,i,o){void 0===t&&(t=!0);void 0===i&&(i=!1);o||(o=this._g._gpCells);var n=this._g,r=this._e.range,l=this._sel,s=r,a=!1,d=SelectionMode,c=n.activePanelType,u=o.cellType==CellType.RowHeader||o.cellType==CellType.ColumnHeader,h=o.cellType==CellType.BottomLeft||o.cellType==CellType.ColumnFooter,_=!u&&!h;n._mouseHdl._eMouse&&(n._mouseHdl._eMouse.ctrlKey||n._mouseHdl._eMouse.metaKey);if(wijmo_1.isNumber(e)&&wijmo_1.isString(t)){var p=o.columns.indexOf(t);if(p<0)throw"Invalid column name or binding.";r.setRange(e,p);t=!0}else if(wijmo_1.isNumber(e)&&wijmo_1.isNumber(t)){r.setRange(e,t);t=!0}else e instanceof CellRange?r.copy(e):wijmo_1.assert(!1,"CellRange expected");n.activePanel=o;switch(n.selectionMode){case d.Cell:s.row2=s.row;s.col2=s.col;break;case d.Row:s.row2=s.row;break;case d.ListBox:a=!0}if(u||h){s.row2=s.row;s.col2=s.col}var g=s.equals(l)&&c==o.cellType;if(g&&a&&_)for(var f=0;f<n.rows.length;f++)if(n.rows[f].isSelected!==s.containsRow(f)){g=!1;break}if(g){t&&o.isRangeValid(s)&&this._showSelection();return!0}var m=wijmo_1.Control.getControl(wijmo_1.closest(wijmo_1.getActiveElement(),"."+exports.FlexGridClsNames.hostElement));if(m&&m==n&&m.activeEditor&&!m.finishEditing())return!1;var w=this._e;w._rng=s;w.cancel=!1;if(!n.onSelectionChanging(w)&&!i)return!1;_&&a&&n.rows.forEach((function(e,t){e._setFlag(RowColFlags.Selected,s.containsRow(t),!0)}));s.row=Math.min(s.row,o.rows.length-1);s.row2=Math.min(s.row2,o.rows.length-1);this._sel.copy(s);n.refreshCells(!1,!0,!0);t&&this._showSelection();var C=n.collectionView;if(C&&_){var v=n._getCvIndex(s.row);C.moveCurrentToPosition(v)}var y=wijmo_1.getActiveElement();this._g.errorTip&&(y.classList.contains(wijmo_1.ControlStateClsNames.invalid)?this._g.errorTip._showAutoTip(void 0,y):this._g.errorTip.hide());n.onSelectionChanged(w);return!0};_SelectionHandler.prototype.moveSelectionWithinSelectedPanel=function(e,t){var i=this._g,o=this._sel.clone(),n=i.activePanel,r=i.getMergedRange(n,o.row,o.col,!1);r||(r=new CellRange(o.row,o.col));if(e>0){var l=n.getNextVisibleRow(r.bottomRow+e);l>=0&&(o.row=o.row2=l);if(!n.columns[o.col].isVisible){var s=n.getNextVisibleColumn(r.leftCol);s>=0&&(o.col=o.col2=s)}}else if(e<0){var a=n.getLastVisibleRow(r.topRow+e);a>=0&&(o.row=o.row2=a)}if(t>0){var d=n.getNextVisibleColumn(r.rightCol+t);d>=0&&(o.col=o.col2=d)}else if(t<0){var c=n.getLastVisibleColumn(r.leftCol+t);c>=0&&(o.col=o.col2=c)}o.equals(this._sel)||i.select(o,!0,n)};_SelectionHandler.prototype.moveSelection=function(e,t,i){var o=this._g,n=this._sel,r=i&&o.anchorCursor?new CellRange(n.row2,n.col2):new CellRange(n.row,n.col),l=r.row,s=r.col,a=o.columns,d=Math.max(0,o._szClient.height-o.columnHeaders.height),c=SelMove,u=-1,h=o.getMergedRange(o.cells,l,s),_=0;if(h){t==c.Next||t==c.NextCell||t==c.NextEditableCell?s=h.rightCol:t!=c.Prev&&t!=c.PrevCell&&t!=c.PrevEditableCell||(s=h.leftCol);if(e==c.Next||e==c.NextCell||e==c.NextEditableCell){l=h.bottomRow;if(softMultirow()&&o instanceof softMultirow().MultiRow){_=r.row-h.topRow;if(h.bottomRow===o.rows.length-1)return}}else if(e==c.Prev||e==c.PrevCell||e==c.PrevEditableCell){l=h.topRow;if(softMultirow()&&o instanceof softMultirow().MultiRow){_=r.row-h.bottomRow;if(0===h.topRow)return}}}switch(t){case c.NextCell:case c.NextEditableCell:u=s;(s=this._getNextColumnCell(l,u,t))!=u&&(h=o.getMergedRange(o.cells,l,s))&&s<h.col2&&(s=h.col2);if(s==u)for(;;){if(l==o.rows.length-1){s=r.col;l=r.row;break}var p=!1;if((l=this._getNextRowCell(l,s,t))>r.row){u=-1;for(;u<a.length;){if((s=this._getNextColumnCell(l,u,t))==u){p=!0;break}(h=o.getMergedRange(o.cells,l,s))&&s<h.col2&&(s=h.col2);break}if(p)continue}break}o.select(l,s);break;case c.PrevCell:case c.PrevEditableCell:u=s;(s=this._getNextColumnCell(l,u,t))!=u&&(h=o.getMergedRange(o.cells,l,s))&&s>h.col&&(s=h.col);if(s==u)for(;;){if(0==l){s=r.col;l=r.row;break}p=!1;if((l=this._getNextRowCell(l,s,t))<r.row){u=a.length;for(;u>-1;){(s=this._getNextColumnCell(l,u,t))!=u?(h=o.getMergedRange(o.cells,l,s))&&s>h.col&&(s=h.col):p=!0;break}if(p)continue}break}o.select(l,s);break;default:l=this._getNextRowCell(l,s,e,d);l+=_;s=this._getNextColumnCell(l,s,t,d);i?o.selection=o.anchorCursor?new CellRange(n.row,n.col,l,s):new CellRange(l,s,n.row2,n.col2):o.select(l,s)}};_SelectionHandler.prototype._getNextColumnCell=function(e,t,i,o){void 0===o&&(o=0);return this._g.columns.getNextCell(t,i,o)};_SelectionHandler.prototype._getNextRowCell=function(e,t,i,o){void 0===o&&(o=0);return this._g.rows.getNextCell(e,i,o)};_SelectionHandler.prototype._setSelectionMode=function(e){var t=this._g,i=t.rows;this._mode=e;this._xSel.clear();if(i.length){this._adjustSelection(this._sel,e,!0);t.invalidate()}};_SelectionHandler.prototype._adjustSelection=function(e,t,i){void 0===i&&(i=!1);var o=this._g.rows,n=SelectionMode,r=void 0;if(this._g.hostElement){r=this._g.hostElement.querySelector("input.wj-column-selector")instanceof HTMLInputElement}if(!r)for(var l=0;l<o.length;l++)o[l]._setFlag(RowColFlags.Selected,!1,!0);var s=e.clone();switch(t){case n.None:s=new CellRange;break;case n.Cell:s=new CellRange(e.row,e.col);break;case n.ListBox:if(r)return;for(l=0;l<o.length;l++)o[l]._setFlag(RowColFlags.Selected,s.containsRow(l),!0)}this.select(s,!1,i)};_SelectionHandler.prototype._expandSelection=function(){var e=this._g,t=e.selectionMode;if(e.expandSelectionOnCopyPaste&&t){var i=this.selection,o=SelectionMode;switch(t){case o.Cell:case o.Row:break;case o.ListBox:this._expandSelectedRows();break;case o.RowRange:i=new CellRange(i.topRow,0,i.bottomRow,e.columns.length-1);default:var n=this._expandSelectionRange(i);n&&this.select(n,!1)}}};_SelectionHandler.prototype._deselectRange=function(e){var t=this.selection,i=this.extendedSelection;if(t.contains(e)){var o=i.length;this._sel=o?i[o-1]:new CellRange;o&&i.removeAt(o-1);return!0}for(var n=0;n<i.length;n++)if(i[n].contains(e)){i.removeAt(n);return!0}return!1};_SelectionHandler.prototype._expandSelectedRows=function(){wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"ListBox mode expected");for(var e=this._g,t=e.selectedRows.map((function(e){return e.index})),i=[],o=0;o<t.length;o++)for(var n=new CellRange(t[o],0,t[o],e.columns.length-1),r=this._expandSelectionRange(n)||n,l=r.topRow;l<=r.bottomRow;l++)-1===i.indexOf(l)&&i.push(l);i.sort();this._selectRows(i)};_SelectionHandler.prototype._expandSelectionRange=function(e){var t=this._g,i=t.cells,o=t.getMergedRange(i,e.topRow,e.leftCol,!1),n=t.getMergedRange(i,e.bottomRow,e.leftCol,!1),r=t.getMergedRange(i,e.topRow,e.rightCol,!1),l=t.getMergedRange(i,e.bottomRow,e.rightCol,!1);if(o||n||r||l){o=o||new CellRange(e.topRow,e.leftCol);n=n||new CellRange(e.bottomRow,e.leftCol);r=r||new CellRange(e.topRow,e.rightCol);l=l||new CellRange(e.bottomRow,e.rightCol);return new CellRange(Math.min(o.topRow,n.topRow,r.topRow,l.topRow),Math.min(o.leftCol,n.leftCol,r.leftCol,l.leftCol),Math.max(o.bottomRow,n.bottomRow,r.bottomRow,l.bottomRow),Math.max(o.rightCol,n.rightCol,r.rightCol,l.rightCol))}return null};_SelectionHandler.prototype._selectRows=function(e){wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"ListBox mode expected");for(var t=this._g,i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n.index)>-1;if(r&&o){o=!1;this.select(i,this.selection.col)}n.isSelected=r}};_SelectionHandler.prototype._showSelection=function(){var e=this._g,t=this._sel.clone();e.activePanelType===CellType.ColumnHeader?t.row=-1:e.activePanelType===CellType.RowHeader?t.col=-1:(e.activePanelType===CellType.BottomLeft||e.activePanelType===CellType.ColumnFooter)&&(t.row=-1);e.activePanelType!==CellType.TopLeft&&(e.anchorCursor?e.scrollIntoView(t.row2,t.col2):e.scrollIntoView(t.row,t.col));e.activePanelType!==CellType.Cell&&this._showHeaderSelection()};_SelectionHandler.prototype._showHeaderSelection=function(){var e=this._g.activePanel.activeCell;if(e){var t=e.getBoundingClientRect(),i=0,o=0,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;t.y<0?i=t.y:t.y>r-2&&(i=t.y-r+t.height);t.x<0?o=t.x:t.x>n-2&&(o=t.x-n+t.width);0==i&&0==o||window.scrollBy(o,i)}};_SelectionHandler.prototype._adjustReferenceCell=function(e,t,i){var o=this._g,n=o.getMergedRange(o.cells,e.row,e.col);if(n&&!n.isSingleCell){var r=SelMove;switch(t){case r.Next:case r.NextCell:case r.NextEditableCell:e.row=n.bottomRow;break;case r.Prev:case r.PrevCell:case r.PrevEditableCell:e.row=n.topRow}switch(i){case r.Next:case r.NextCell:case r.NextEditableCell:e.col=n.rightCol;break;case r.Prev:case r.PrevCell:case r.PrevEditableCell:e.col=n.leftCol}}};_SelectionHandler.prototype.dispose=function(){if(this._xSel&&this._collectionChangedHandler){this._xSel.collectionChanged.removeHandler(this._collectionChangedHandler);this._collectionChangedHandler=null}this._g=null;this._e=null;this._xSel=null};return _SelectionHandler}();exports._SelectionHandler=_SelectionHandler;!function(e){e[e.Visible=1]="Visible";e[e.AllowResizing=2]="AllowResizing";e[e.AllowDragging=4]="AllowDragging";e[e.AllowMerging=8]="AllowMerging";e[e.AllowSorting=16]="AllowSorting";e[e.AutoGenerated=32]="AutoGenerated";e[e.Collapsed=64]="Collapsed";e[e.ParentCollapsed=128]="ParentCollapsed";e[e.Selected=256]="Selected";e[e.ReadOnly=512]="ReadOnly";e[e.HtmlContent=1024]="HtmlContent";e[e.WordWrap=2048]="WordWrap";e[e.MultiLine=4096]="MultiLine";e[e.HasTemplate=8192]="HasTemplate";e[e.RowDefault=3]="RowDefault";e[e.ColumnDefault=23]="ColumnDefault"}(RowColFlags=exports.RowColFlags||(exports.RowColFlags={}));var RowCol=function(){function RowCol(){this._type=null;this._align=null;this._inpType=null;this._mask=null;this._maxLen=null;this._required=null;this._fmt=null;this._map=null;this._ddCssClass=null;this._cssClass=null;this._cssClassAll=null;this._szMin=null;this._szMax=null;this._sz=null;this._pos=0;this._antipos=0;this._idx=-1;this._idxVis=-1;this._idxData=-1;this.gridChanged=new wijmo_1.Event}Object.defineProperty(RowCol.prototype,"binding",{get:function(){return this._binding?this._binding.path:null},set:function(e){if(e!=this.binding){var t=wijmo_1.asString(e);this._binding=t?new wijmo_1.Binding(t):null;if(!this._type&&this.grid&&this._binding){var i=this.grid.collectionView;if(i&&i.sourceCollection&&i.sourceCollection.length){var o=i.sourceCollection[0];this._type=wijmo_1.getType(this._binding.getValue(o))}}this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"sortMemberPath",{get:function(){return this._bindingSort?this._bindingSort.path:null},set:function(e){if(e!=this.sortMemberPath){var t=wijmo_1.asString(e);this._bindingSort=t?new wijmo_1.Binding(t):null;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataType",{get:function(){return this._type},set:function(e){e=wijmo_1.asEnum(e,wijmo_1.DataType,!0);if(this._type!=e){this._type=e;this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"inputType",{get:function(){return this._inpType},set:function(e){this._inpType=wijmo_1.asString(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask=wijmo_1.asString(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"maxLength",{get:function(){return this._maxLen},set:function(e){this._maxLen=wijmo_1.asNumber(e,!0,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"align",{get:function(){return this._align},set:function(e){if(this._align!=e){this._align=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"format",{get:function(){return this._fmt},set:function(e){if(this._fmt!=e){this._fmt=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataMap",{get:function(){return this._map},set:function(e){if(this._map!=e){this._map&&this._map.mapChanged.removeHandler(this.onPropertyChanged,this);wijmo_1.isArray(e)&&(e=new DataMap(e,null,null));this._map=wijmo_1.asType(e,DataMap,!0);this._map&&this._map.mapChanged.addHandler(this.onPropertyChanged,this);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataMapEditor",{get:function(){return null!=this._mapEditor?this._mapEditor:DataMapEditor.DropDownList},set:function(e){if(e!=this._mapEditor){this._mapEditor=wijmo_1.asEnum(e,DataMapEditor);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"showDropDown",{get:function(){return this.dataMapEditor==DataMapEditor.DropDownList},set:function(e){wijmo_1._deprecated("showDropDown","dataMapEditor");this.dataMapEditor=e?DataMapEditor.DropDownList:DataMapEditor.AutoComplete},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dropDownCssClass",{get:function(){return this._ddCssClass},set:function(e){this._ddCssClass=wijmo_1.asString(e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"visible",{get:function(){return this._getFlag(RowColFlags.Visible)},set:function(e){this._setFlag(RowColFlags.Visible,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isVisible",{get:function(){if(!this._getFlag(RowColFlags.Visible))return!1;if(this._getFlag(RowColFlags.ParentCollapsed)&&!(this instanceof _NewRowTemplate))return!1;var e=this.grid;if(e&&this._list){if(this._list===e.columnHeaders.rows&&(e.headersVisibility===HeadersVisibility.None||e.headersVisibility===HeadersVisibility.Row))return!1;if(this._list===e.rowHeaders.columns&&(e.headersVisibility===HeadersVisibility.None||e.headersVisibility===HeadersVisibility.Column))return!1}return!0},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"pos",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._pos},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"index",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._idx},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"visibleIndex",{get:function(){this._list&&this._list._dirty&&this._list._update();return this.isVisible?this._idxVis:-1},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"size",{get:function(){return this._sz},set:function(e){if(e!=this._sz){this._sz=wijmo_1.asNumber(e,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"renderSize",{get:function(){var e=0,t=this._list;if(this.isVisible){(null==(e=this._sz)||e<0)&&(e=t?t.defaultSize:0);t&&null!=t.minSize&&e<t.minSize&&(e=t.minSize);t&&null!=t.maxSize&&e>t.maxSize&&(e=t.maxSize);null!=this._szMin&&e<this._szMin&&(e=this._szMin);null!=this._szMax&&e>this._szMax&&(e=this._szMax)}return e},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowResizing",{get:function(){return this._getFlag(RowColFlags.AllowResizing)},set:function(e){this._setFlag(RowColFlags.AllowResizing,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowDragging",{get:function(){return this._getFlag(RowColFlags.AllowDragging)},set:function(e){this._setFlag(RowColFlags.AllowDragging,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowMerging",{get:function(){return this._getFlag(RowColFlags.AllowMerging)},set:function(e){this._setFlag(RowColFlags.AllowMerging,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isSelected",{get:function(){return this._getFlag(RowColFlags.Selected)},set:function(e){if(!!e!=this.isSelected){var t=this.grid;if(t){var i=this instanceof Row?new CellRange(this.index,0,this.index,t.columns.length-1):new CellRange(0,this.index,t.rows.length-1,this.index),o=new CellRangeEventArgs(t?t.cells:null,i);if(t.onSelectionChanging(o)&&this._setFlag(RowColFlags.Selected,e,!0)){t.refreshCells(!1,!0,!0);t.onSelectionChanged(o);t.onRowColSelected(o)}}else this._setFlag(RowColFlags.Selected,e)}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isReadOnly",{get:function(){return this._getFlag(RowColFlags.ReadOnly)},set:function(e){this._setFlag(RowColFlags.ReadOnly,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isRequired",{get:function(){return this._required},set:function(e){this._required=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isContentHtml",{get:function(){return this._getFlag(RowColFlags.HtmlContent)},set:function(e){if(this.isContentHtml!=e){this._setFlag(RowColFlags.HtmlContent,e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"wordWrap",{get:function(){return this._getFlag(RowColFlags.WordWrap)},set:function(e){this._setFlag(RowColFlags.WordWrap,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"multiLine",{get:function(){return this._getFlag(RowColFlags.MultiLine)},set:function(e){this._setFlag(RowColFlags.MultiLine,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"cssClass",{get:function(){return this._cssClass},set:function(e){if(e!=this._cssClass){this._cssClass=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"cssClassAll",{get:function(){return this._cssClassAll},set:function(e){if(e!=this._cssClassAll){this._cssClassAll=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"grid",{get:function(){return this._list?this._list._g:null},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"collectionView",{get:function(){return this.grid?this.grid.collectionView:null},enumerable:!0,configurable:!0});RowCol.prototype.onPropertyChanged=function(){if(this._list){this._list._dirty=!0;this.grid.invalidate()}};RowCol.prototype.onGridChanged=function(e){this.gridChanged.raise(this,e)};RowCol.prototype._setList=function(e){if(e!=this._list){this._list=e;this.onGridChanged()}};RowCol.prototype._getFlag=function(e){return 0!=(this._f&e)};RowCol.prototype._setFlag=function(e,t,i){if(!!t!=this._getFlag(e)){this._f=t?this._f|e:this._f&~e;i||this.onPropertyChanged();return!0}return!1};return RowCol}();exports.RowCol=RowCol;var Column=function(e){__extends(Column,e);function Column(t){var i=e.call(this)||this;i._hdr=null;i._plholder=null;i._name=null;i._agg=null;i._quickSize=null;i._descById=null;i._sortOrder=null;i._tpl=null;i._f=RowColFlags.ColumnDefault;i._hash=Column._ctr.toString(36);Column._ctr++;wijmo_1.copy(i,t);i._uid=wijmo_1.uidGenerator();return i}Object.defineProperty(Column.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"width",{get:function(){return null!=this._szStar?this._szStar:this.size},set:function(e){if(null!=Column._parseStarSize(e)){this._szStar=e;this.onPropertyChanged()}else{this._szStar=null;this.size=wijmo_1.asNumber(e,!0)}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"minWidth",{get:function(){return this._szMin},set:function(e){if(e!=this._szMin){this._szMin=wijmo_1.asNumber(e,!0,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"maxWidth",{get:function(){return this._szMax},set:function(e){if(e!=this._szMax){this._szMax=wijmo_1.asNumber(e,!0,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(e){this._quickSize=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Column.prototype._getQuickAutoSize=function(){return!!this.grid._getQuickAutoSize()&&(wijmo_1.isBoolean(this._quickSize)?this._quickSize:!(this.isContentHtml||this.wordWrap||this.multiLine||this._getFlag(RowColFlags.HasTemplate)))};Object.defineProperty(Column.prototype,"renderWidth",{get:function(){return this.renderSize},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"header",{get:function(){return this._hdr?this._hdr:this.binding},set:function(e){if(this._hdr!=e){this._hdr=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"placeholder",{get:function(){return this._plholder?this._plholder:this.header},set:function(e){if(this._plholder!=e){this._plholder=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"cellTemplate",{get:function(){return this._tpl},set:function(e){if(e!=this._tpl){wijmo_1.assert(null==e||wijmo_1.isString(e)||wijmo_1.isFunction(e),"cellTemplate should be a string or an ICellTemplateFunction.");this._tpl=e;this._setFlag(RowColFlags.HasTemplate,null!=e&&""!=e);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"editor",{get:function(){var e=this._edt;return e?e.control:null},set:function(e){if(e!=this.editor){if(this._edt){this._edt.dispose();this._edt=null}if(null!=e){e=wijmo_1.asType(e,wijmo_1.Control);this._edt=new _CustomEditor(this,e)}}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"allowSorting",{get:function(){return this._getFlag(RowColFlags.AllowSorting)},set:function(e){this._setFlag(RowColFlags.AllowSorting,e)},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){null!=e&&(e=wijmo_1.asEnum(e,SortOrder));if(this._sortOrder!=e){this._sortOrder=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"currentSort",{get:function(){var e=this.currentSortIndex;if(e>-1){return this.grid.collectionView.sortDescriptions[e].ascending?"+":"-"}return null},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"currentSortIndex",{get:function(){var e=this.grid?this.grid.collectionView:null,t=e?e.sortDescriptions:null,i=t&&t.length?this._getBindingSort():null;if(i)for(var o=0;o<t.length;o++)if(t[o].property==i)return o;return-1},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"aggregate",{get:function(){return null!=this._agg?this._agg:wijmo_1.Aggregate.None},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_1.Aggregate))!=this._agg){this._agg=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"describedById",{get:function(){return this._descById},set:function(e){if(e!=this._descById){this._descById=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Column.prototype.getIsRequired=function(e){return null!=this._required?this._required:e&&null!=e.isRequired?e.isRequired:this.dataType==wijmo_1.DataType.String?null!=this.dataMap||null!=this._mask&&this._mask.length>0:!e||e.dataType!=wijmo_1.DataType.String||(null!=e.dataMap||null!=e.mask&&e.mask.length>0)};Column.prototype.getAlignment=function(e){if(null!=this._align)return this._align;if(e&&null!=e.align)return e.align;if(!this._map)switch(this.dataType){case wijmo_1.DataType.Boolean:return"center";case wijmo_1.DataType.Number:return"right"}if(e&&!e.dataMap)switch(e.dataType){case wijmo_1.DataType.Boolean:return"center";case wijmo_1.DataType.Number:return"right"}return""};Column.prototype._getBindingSort=function(){return this.sortMemberPath?this.sortMemberPath:this.binding?this.binding:null};Column._parseStarSize=function(e){if(wijmo_1.isString(e)){var t=e.length;if(t>0&&"*"==e[t-1]){var i=1==t?1:parseFloat(e);if(i>0&&!isNaN(i))return i}}return null};Column._ctr=0;return Column}(RowCol);exports.Column=Column;var Row=function(e){__extends(Row,e);function Row(t){var i=e.call(this)||this;i.resizedManually=!1;i._f=RowColFlags.ColumnDefault;i._data=t||null;return i}Object.defineProperty(Row.prototype,"dataItem",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"dataIndex",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._idxData},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"height",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"renderHeight",{get:function(){return this.renderSize},enumerable:!0,configurable:!0});return Row}(RowCol);exports.Row=Row;var GroupRow=function(e){__extends(GroupRow,e);function GroupRow(t){var i=e.call(this,t)||this;i._level=-1;i._isSummary=!1;i.level=t instanceof wijmo_1.CollectionViewGroup?t.level:-1;i.isReadOnly=!0;return i}Object.defineProperty(GroupRow.prototype,"isSummary",{get:function(){return this._isSummary},set:function(e){if(e!=this._isSummary){this._isSummary=wijmo_1.asBoolean(e);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"level",{get:function(){return this._level},set:function(e){wijmo_1.asInt(e);if(e!=this._level){this._level=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"hasChildren",{get:function(){if(this.isSummary)return!1;if(null!=this.grid&&null!=this._list){this._list._update();var e=this.index<this._list.length-1?this._list[this.index+1]:null,t=wijmo_1.tryCast(e,GroupRow),i=wijmo_1.tryCast(e,_NewRowTemplate);return null!=e&&null==i&&(null==t||t.level>this.level)}return!0},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"isCollapsed",{get:function(){return this._getFlag(RowColFlags.Collapsed)},set:function(e){!!e==this.isCollapsed||null==this._list||this.isSummary||this._setCollapsed(wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});GroupRow.prototype.getGroupHeader=function(){if(this.isSummary)return"";var e=this.grid,t=e.groupHeaderFormat||wijmo_1.culture.FlexGrid.groupHeaderFormat,i=this.dataItem;i&&i instanceof wijmo_1.CollectionViewGroup&&!this.hasChildren&&!this.isSummary&&0==i.items.length&&(t=null);if(i instanceof wijmo_1.CollectionViewGroup&&t&&e.showGroups&&!e.childItemsPath){var o=i.groupDescription.propertyName,n=i.name,r=e.getColumn(o),l=this.isContentHtml;if(r){l=l||r.isContentHtml;r.header&&(o=r.header);var s=r.dataMap;s&&(n=s.getDisplayValue(n));r.dataType==wijmo_1.getType(n)&&(n=wijmo_1.Globalize.format(n,r.format))}else o=wijmo_1.toHeaderCase(o);var a=0,d=e.collectionView;a=e._isServerCollectionView(d)&&d.groupOnServer?d.getGroupAggregate(i.groupDescription.propertyName,i,wijmo_1.Aggregate.CntAll):i.getAggregate(wijmo_1.Aggregate.CntAll,null,e.collectionView);return wijmo_1.format(t,{name:wijmo_1.escapeHtml(o),value:l?n:wijmo_1.escapeHtml(n),level:i.level,count:a})}return""};GroupRow.prototype._setCollapsed=function(e){var t=this,i=this.grid,o=i.rows,n=this.getCellRange(),r=i.collectionView,l=i.isUpdating&&r&&r.groupOnServer&&r.groupLazyLoading;l&&(i._isGrpClpsChanging=!0);var s=new CellRangeEventArgs(i.cells,new CellRange(this.index,-1));if(i.onGroupCollapsedChanging(s)){i.deferUpdate((function(){o.deferUpdate((function(){t._setFlag(RowColFlags.Collapsed,e,!0);for(var i=n.topRow+1;i<=n.bottomRow&&i>-1&&i<o.length;i++){o[i]._setFlag(RowColFlags.ParentCollapsed,e,!0);var r=o[i];r instanceof GroupRow&&r.isCollapsed&&(i=r.getCellRange().bottomRow)}}))}));i.onGroupCollapsedChanged(s);l&&(i._isGrpClpsChanging=!1)}};GroupRow.prototype.getCellRange=function(){for(var e=this._list,t=this.index,i=e.length-1,o=t+1;o<=i;o++){var n=e[o];if(n instanceof GroupRow&&n.level<=this.level){i=o-1;break}}if(this.grid.groupSummaryPosition===GroupSummaryPosition.Auto&&e.length>i&&e[i+1]instanceof GroupRow&&e[i+1].isSummary)do{i++}while(e[i+1]instanceof GroupRow&&e[i+1].isSummary&&e[i+1].dataItem==e[i].dataItem);return new CellRange(t,0,i,this.grid.columns.length-1)};return GroupRow}(Row);exports.GroupRow=GroupRow;var RowColCollection=function(e){__extends(RowColCollection,e);function RowColCollection(t,i){var o=e.call(this)||this;o.frozenDetailChildren=0;o._frozen=0;o._frozenEnd=0;o._lastFrozen=-1;o._lastFrozenVisible=-1;o._lastUnfrozenVisible=-1;o._firstVisible=-1;o._vlen=0;o._szDef=28;o._szTot=0;o._szFrozen=0;o._szCustom=!1;o._dirty=!1;o._frozenColAreaWidth=0;o._g=wijmo_1.asType(t,FlexGrid);o._szDef=wijmo_1.asNumber(i,!1,!0);o._uid=wijmo_1.uidGenerator();return o}Object.defineProperty(RowColCollection.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"defaultSize",{get:function(){return this._szDef},set:function(e){this._szCustom=!0;if(this._szDef!=e){this._szDef=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"frozen",{get:function(){return this._frozen},set:function(e){wijmo_1.assert(wijmo_1.isNumber(e),"Positive number expected");if(wijmo_1.isNumber(e)&&e!=this._frozen){this._frozen=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"frozenEnd",{get:function(){return this._frozenEnd},set:function(e){wijmo_1.assert(wijmo_1.isNumber(e),"Positive number expected");if(wijmo_1.isNumber(e)&&e!=this._frozenEnd){this._frozenEnd=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"_frozenInternal",{get:function(){return this._frozen>0?this._frozen:-this._frozenEnd},set:function(e){if(e<0){this.frozen=0;this.frozenEnd=-e}else{this.frozen=e;this.frozenEnd=0}},enumerable:!0,configurable:!0});RowColCollection.prototype.isFrozen=function(e){return this._frozenInternal>=0?e<this._frozenInternal:e>=this._lastFrozen};Object.defineProperty(RowColCollection.prototype,"minSize",{get:function(){return this._szMin},set:function(e){if(e!=this._szMin){this._szMin=wijmo_1.asNumber(e,!0,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"maxSize",{get:function(){return this._szMax},set:function(e){if(e!=this._szMax){this._szMax=wijmo_1.asNumber(e,!0,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});RowColCollection.prototype.getTotalSize=function(){this._dirty&&this._update();return this._szTot};RowColCollection.prototype.getFrozenSize=function(){this._dirty&&this._update();return this._szFrozen};Object.defineProperty(RowColCollection.prototype,"visibleLength",{get:function(){this._dirty&&this._update();return this._vlen},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"lastFrozen",{get:function(){return-1!=this._lastFrozen?this[this._lastFrozen]:null},enumerable:!0,configurable:!0});RowColCollection.prototype.getItemAt=function(e){this._dirty&&this._update();if(e<=0&&this.length>0&&this[0].renderSize)return 0;for(var t,i,o=this.length,n=0,r=o-1;n<=r;)if((i=this[t=n+r>>>1])._pos>=e&&t>0)r=t-1;else{if(!(i._pos+i.renderSize<=e&&t<o-1)){for(;t>0&&!this[t].renderSize;)t--;for(;t<o-1&&!this[t].renderSize;)t++;return t}n=t+1}return r};RowColCollection.prototype.getNextCell=function(e,t,i){void 0===i&&(i=0);var o,n=SelMove;switch(t){case n.Next:case n.NextCell:for(o=e+1;o<this.length;o++)if(this[o].renderSize>0)return o;break;case n.NextEditableCell:for(o=e+1;o<this.length;o++)if(this[o].renderSize>0&&!this[o].isReadOnly)return o;break;case n.Prev:case n.PrevCell:for(o=e-1;o>=0;o--)if(this[o].renderSize>0)return o;break;case n.PrevEditableCell:for(o=e-1;o>=0;o--)if(this[o].renderSize>0&&!this[o].isReadOnly)return o;break;case n.End:for(o=this.length-1;o>=0;o--)if(this[o].renderSize>0)return o;break;case n.Home:for(o=0;o<this.length;o++)if(this[o].renderSize>0)return o;break;case n.NextPage:return(o=this.getItemAt(this[e].pos+this[e].renderSize+i))<0?this.getNextCell(e,SelMove.End,i):o==e&&o<this.length-1&&this[o+1].renderSize?o+1:o;case n.PrevPage:return(o=this.getItemAt(this[e].pos-i))<0?this.getNextCell(e,SelMove.Home,i):o==e&&o>0&&this[o-1].renderSize?o-1:o}return e};RowColCollection.prototype.canMoveElement=function(e,t,i){void 0===i&&(i=!0);if(t==e)return!1;if(e<0||e>=this.length||t>=this.length)return!1;if(i){t<0&&(t=this.length-1);for(var o=Math.min(e,t),n=Math.max(e,t),r=o;r<=n;r++)if(!this[r].allowDragging)return!1}return!(this[t]instanceof _NewRowTemplate)};RowColCollection.prototype.moveElement=function(e,t,i){void 0===i&&(i=!0);if(this.canMoveElement(e,t,i)){var o=this[e];this.removeAt(e);t<0&&(t=this.length);this.insert(t,o);i&&(this.isFrozen(e)&&!this.isFrozen(t)?this._frozenInternal>=0?this._frozenInternal--:this._frozenInternal++:!this.isFrozen(e)&&this.isFrozen(t)&&(this._frozenInternal>=0?this._frozenInternal++:this._frozenInternal--));return!0}return!1};RowColCollection.prototype.onCollectionChanged=function(t){void 0===t&&(t=wijmo_1.NotifyCollectionChangedEventArgs.reset);this._dirty=!0;this._g.invalidate();e.prototype.onCollectionChanged.call(this,t)};RowColCollection.prototype.push=function(t){t._setList(this);return e.prototype.push.call(this,t)};RowColCollection.prototype.splice=function(t,i){for(var o=this,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];for(var l=t;l<t+i&&l<this.length;l++){var s=this[l];s instanceof RowCol&&s._setList(null)}n.forEach((function(e){return e._setList(o)}));return e.prototype.splice.apply(this,[t,i].concat(n))};RowColCollection.prototype.beginUpdate=function(){this._update();e.prototype.beginUpdate.call(this)};RowColCollection.prototype._setDefaultSize=function(e){if(!this._szCustom){this.defaultSize=e;this._szCustom=!1}};RowColCollection.prototype._update=function(){if(this._dirty&&!this.isUpdating){this._dirty=!1;this._lastFrozen=-1;this._firstVisible=-1;this._lastUnfrozenVisible=-1;this._frozenColAreaWidth=0;this._szFrozen=0;var e=0,t=0,i=void 0,o=void 0;if(this._frozenInternal>=0){for(var n=0;n<this.length;n++){(o=this[n])._idx=n;o._idxVis=e;o._pos=t;o._setList(this);if((i=o.renderSize)>0){t+=i;e++;n<this._frozenInternal&&(this._lastFrozen=n)}this._firstVisible<0&&o.visible&&(this._firstVisible=n);n<this._frozenInternal&&(this._szFrozen+=i)}this._vlen=e;this._szTot=t;return!0}for(n=0;n<this.length;n++){(o=this[n])._idx=n;o._idxVis=e;o._pos=t;o._setList(this);if((i=o.renderSize)>0){t+=i;e++}this._firstVisible<0&&o.visible&&(this._firstVisible=n);o.visible&&n<this.length+this._frozenInternal&&(this._lastUnfrozenVisible=n);n>=this.length+this._frozenInternal&&(this._szFrozen+=i)}this._lastFrozen=Math.max(0,this.length+this._frozenInternal);this._lastFrozenVisible=this._lastFrozen;for(;this._lastFrozenVisible<this.length&&!(this[this._lastFrozenVisible].renderSize>0);)this._lastFrozenVisible++;var r=0;for(n=this.length-1;n>=Math.max(0,this.length+this._frozenInternal);n--){i=(o=this[n]).renderSize;r-=this[n].renderSize;o._antipos=r;this._frozenColAreaWidth+=i}this._vlen=e;this._szTot=t;return!0}return!1};return RowColCollection}(wijmo_1.ObservableArray);exports.RowColCollection=RowColCollection;var ColumnCollection=function(e){__extends(ColumnCollection,e);function ColumnCollection(){return null!==e&&e.apply(this,arguments)||this}ColumnCollection.prototype.getColumn=function(e){var t=wijmo_1.isNumber(e)?e:this.indexOf(e);return t>-1?this[t]:null};ColumnCollection.prototype.indexOf=function(t){if(t instanceof Column)return e.prototype.indexOf.call(this,t);for(var i=0;i<this.length;i++)if(this[i].name==t)return i;for(i=0;i<this.length;i++)if(this[i].binding==t)return i;return-1};Object.defineProperty(ColumnCollection.prototype,"describedById",{get:function(){return this._descById},set:function(e){if(e!=this._descById){this._descById=wijmo_1.asString(e);this._g&&this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(ColumnCollection.prototype,"firstVisibleIndex",{get:function(){this._dirty&&this._update();return this._firstVisible},enumerable:!0,configurable:!0});ColumnCollection.prototype._updateStarSizes=function(e){var t,i=!1,o=0;e-=.5;for(var n=0;n<this.length;n++){if((l=this[n]).isVisible)if(l._szStar){o+=Column._parseStarSize(l._szStar);t=l}else e-=l.renderWidth}if(t){var r=e;for(n=0;n<this.length;n++){var l;if((l=this[n]).isVisible&&l._szStar){var s=l._sz;l==t&&r>0?s=r:r-=s=Math.max(0,Math.round(Column._parseStarSize(l._szStar)/o*e));if(s!=l._sz){l._sz=s;i=!0}}}if(i){this._dirty=!0;this._update()}return i}return!1};return ColumnCollection}(RowColCollection);exports.ColumnCollection=ColumnCollection;var RowCollection=function(e){__extends(RowCollection,e);function RowCollection(){var t=null!==e&&e.apply(this,arguments)||this;t._maxLevel=-1;return t}Object.defineProperty(RowCollection.prototype,"ariaLabel",{get:function(){return this._ariaLabel},set:function(e){if(e!=this.ariaLabel){this._ariaLabel=wijmo_1.asString(e);this._g&&this._g.refresh()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCollection.prototype,"maxGroupLevel",{get:function(){this._dirty&&this._update();return this._maxLevel},enumerable:!0,configurable:!0});RowCollection.prototype.getDetailRowCountUptoRow=function(e){var t=softDetailRow(),i=0,o=Math.abs(e),n=0,r=this.length-1,l=1,s=0;if(e<0){l=-1;s=1}for(;o>0&&n<=r&&n>=0;){var a=r*s+n*l,d=this[a];if(d&&!(t&&d instanceof t.DetailRow)){var c=this[a+1];c&&t&&c instanceof t.DetailRow&&i++;o--}n++}return i};RowCollection.prototype._update=function(){var t=this;if(e.prototype._update.call(this)){var i=this.grid?this.grid.collectionView:null,o=i?i.items:null,n=0;this._maxLevel=-1;this.forEach((function(e){e instanceof GroupRow&&e.level>t._maxLevel&&(t._maxLevel=e.level);var i=e.dataItem;i&&o?i===o[n]?e._idxData=n:i===o[n+1]?e._idxData=++n:i!==o[e._idxData]&&(e._idxData=-1):e._idxData=-1}));return!0}return!1};return RowCollection}(RowColCollection);exports.RowCollection=RowCollection;var _ColumnGroupHandler=function(){function _ColumnGroupHandler(e){this._updatingCollection=0;this._initialized=!1;this._grid=e;this._initializeColumnGroups();this._initialized=!0}Object.defineProperty(_ColumnGroupHandler.prototype,"columnGroups",{get:function(){return this._colGroups},enumerable:!0,configurable:!0});_ColumnGroupHandler.prototype.createColumnGroups=function(e){this._initialized=!1;this._createColumnGroups(e);this._initialized=!0};_ColumnGroupHandler.prototype.hasColumnGroups=function(){return null!=this._colGroups&&this._colGroups.length>0};_ColumnGroupHandler.prototype.getGroupDefinitions=function(){return this._groupDefs};_ColumnGroupHandler.prototype.getColumnGroup=function(e,t){return this._getColumnGroup(e,t)};_ColumnGroupHandler.prototype.canMoveColumnGroup=function(e,t,i,o){if(e==i&&t==o)return!1;var n=this._grid,r=n.columnHeaders.rows,l=n.columns;if(e<0||e>=r.length||t<0||t>=l.length||i<0||i>=r.length||o<0||o>=l.length)return!1;var s=this._getColumnGroup(e,t),a=this._getColumnGroup(i,o);if(!s||!a||s==a)return!1;if(s.level<a.level&&s._containsGroup(a))return!1;var d=s.parentGroup,c=a.parentGroup;return!d||d===c||!d._isCollapseTo(s)};_ColumnGroupHandler.prototype.moveColumnGroup=function(e,t,i,o,n){if(this.canMoveColumnGroup(e,t,i,o)){var r=this._getColumnGroup(e,t),l=this._getColumnGroup(i,o);if(!r||!l||r==l)return!1;if(n&&!l.isEmpty)return!1;var s=this._getCollection(r),a=n?l.columns:this._getCollection(l);if(!s||!a)return!1;var d=n?0:a.indexOf(l);if(d<0)return!1;!n&&s!=a&&o>t&&d++;this._deferCollectionUpdate((function(){if(!s.remove(r))return!1;a.insert(d,r)}));return!0}return!1};_ColumnGroupHandler.prototype.handleCollectionChange=function(){if(this._initialized&&!this._updatingCollection){this._initialized=!1;this._buildColumnGroups();this._initialized=!0}};_ColumnGroupHandler.prototype.handlePropertyChange=function(e){if(e&&this._initialized){var t=this._grid,i=e._rng,o=e.header;if(o!=e._curr_header)for(var n=i.topRow;n<=i.bottomRow;n++)for(var r=i.leftCol;r<=i.rightCol;r++){t.columnHeaders.setCellData(n,r,o);e._curr_header=o}e.columns.length>0&&t.invalidate()}};_ColumnGroupHandler.prototype._initializeColumnGroups=function(){var e=this._grid,t=new ColumnGroupCollection;this._groupDefs=t;this._colGroups=t;this._colGroups._setOwner(e);this._colGroups._setChangeHandler(this)};_ColumnGroupHandler.prototype._createColumnGroups=function(e){this._grid;this._groupDefs=wijmo_1.asArray(e);this._colGroups&&this._colGroups._setOwner(null);this._colGroups=ColumnGroupCollection._parse(e);this._buildColumnGroups()};_ColumnGroupHandler.prototype._buildColumnGroups=function(){var e=this,t=this._grid;this._colGroups._removeChangeHandler();this._assertColumnGroups(this._colGroups);t.autoGenerateColumns=!1;t.columns.clear();this._colGroups._setOwner(t);this._colGroups.forEach((function(e){e._beginBuild()}));var i=0;this._colGroups.forEach((function(t){e._addColumnGroup(t);i=Math.max(i,t._getMaxLevel())}));this._colGroups.forEach((function(e){e._expandRange(i)}));var o=t.columnHeaders.rows;o.clear();for(var n=0;n<=i;n++){var r=new Row;o.splice(n,0,r);n<i&&(r.cssClassAll=exports.FlexGridClsNames.colGroup)}for(n=0;n<o.length;n++)for(var l=0;l<t.columns.length;l++){var s=this._getColumnGroup(n,l);if(s){var a=s.header||wijmo_1.toHeaderCase(s.binding);t.columnHeaders.setCellData(n,l,a);if(s.height){var d=t.columnHeaders.rows[n].height;t.columnHeaders.rows[n].height=d<=s.height?s.height:d}s._curr_header=s.header}}this._colGroups._setChangeHandler(this);this._colGroups.forEach((function(e){e._checkIfCollapsed()}))};_ColumnGroupHandler.prototype._getColumnGroup=function(e,t){var i=this._grid;if(e<i.columnHeaders.rows.length&&t<i.columns.length)for(var o=this._colGroups;o;){for(var n=o,r=0;r<o.length;r++){var l=o[r],s=l._rng;if(s.containsColumn(t)){if(s.containsRow(e)||0==l.columns.length)return l;o=l.columns;break}}if(o==n)break}return null};_ColumnGroupHandler.prototype._getCollection=function(e){var t=e.parentGroup;return t?t.columns:this._colGroups};_ColumnGroupHandler.prototype._assertColumnGroups=function(e){var t=this;wijmo_1.assert(e instanceof ColumnGroupCollection,"column groups contain items of invalid collection type");e.forEach((function(e){wijmo_1.assert(e instanceof ColumnGroup,"column groups contain items of invalid type");t._assertColumnGroups(e.columns)}))};_ColumnGroupHandler.prototype._addColumnGroup=function(e){var t=this,i=this._grid;e._rng.col=i.columns.length;0==e.columns.length?i.columns.push(e):e.columns.forEach((function(e){t._addColumnGroup(e)}));e._rng.col2=i.columns.length-1};_ColumnGroupHandler.prototype._beginCollectionUpdate=function(){this._updatingCollection++};_ColumnGroupHandler.prototype._endCollectionUpdate=function(){this._updatingCollection--;this._updatingCollection<=0&&this.handleCollectionChange()};_ColumnGroupHandler.prototype._deferCollectionUpdate=function(e){try{this._beginCollectionUpdate();e()}finally{this._endCollectionUpdate()}};return _ColumnGroupHandler}();exports._ColumnGroupHandler=_ColumnGroupHandler;var ColumnGroup=function(e){__extends(ColumnGroup,e);function ColumnGroup(t,i){var o=e.call(this)||this;o._rng=new CellRange(0,-1);o._lvl=0;o._collapsed=!1;o._cols=new ColumnGroupCollection;wijmo_1.copy(o,t);var n=i&&i.columns;n&&n.indexOf(o)<0&&n.push(o);return o}ColumnGroup.prototype._copy=function(e,t){if("columns"==e){var i=wijmo_1.asArray(t);this._cols=ColumnGroupCollection._parse(i);return!0}return!1};Object.defineProperty(ColumnGroup.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"columnGroups",{get:function(){return this._cols},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"height",{get:function(){return this._cgHeight},set:function(e){this._cgHeight=e},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"isEmpty",{get:function(){return 0===this._cols.length},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"parentGroup",{get:function(){var e=this._ownerList,t=e&&e.owner;return t instanceof ColumnGroup?t:null},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"level",{get:function(){for(var e=this,t=0;e.parentGroup;){e=e.parentGroup;t++}return t},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"collapseTo",{get:function(){return this._collTo},set:function(e){wijmo_1.assert(wijmo_1.isArray(e)||wijmo_1.isString(e),"collapseTo should be an array or a string.");if(this._collTo!=e){this._collTo=e;this._updateCollapsedState()}},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"isCollapsed",{get:function(){return this._collapsed},set:function(e){var t=this.grid,i=null;if(e!=this._collapsed)if(t){i=new CellRangeEventArgs(t.columnHeaders,this._rng,this);t.onColumnGroupCollapsedChanging(i)?this._collapsed=wijmo_1.asBoolean(e):i=null}else this._collapsed=wijmo_1.asBoolean(e);this._updateCollapsedState();t&&i&&t.onColumnGroupCollapsedChanged(i)},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"grid",{get:function(){var e=this._ownerList,t=e&&e.owner;return t instanceof ColumnGroup?t.grid:t instanceof FlexGrid?t:null},enumerable:!0,configurable:!0});ColumnGroup.prototype._beginBuild=function(){var e=this;this._lvl=0;for(var t=this.parentGroup;t;t=t.parentGroup)this._lvl++;setTimeout((function(){if(e.parentGroup&&0!==e._lvl&&e.parentGroup.width&&(null===e.width||void 0===e.width)){var t=0,i=0;e.parentGroup._cols.forEach((function(e){t+=e.width;null!==e.width&&void 0!==e.width||i++}));e.width=(e.parentGroup.width-t)/i}}),0);this._rng=new CellRange(0,-1);this._rng.row=this._rng.row2=this._lvl;this._cols.forEach((function(e){e._beginBuild()}))};ColumnGroup.prototype._setChangeHandler=function(e){this._changeHdl=e;this._cols._setChangeHandler(e)};ColumnGroup.prototype._removeChangeHandler=function(){this._changeHdl=null;this._cols._removeChangeHandler()};ColumnGroup.prototype._setOwnerList=function(e){e!=this._ownerList&&(this._ownerList=e)};ColumnGroup.prototype._checkIfCollapsed=function(){var e=this.grid;(e?e.columns:null)&&(this._collapsed?this._updateCollapsedState():this._cols.forEach((function(e){e._checkIfCollapsed()})))};ColumnGroup.prototype._updateCollapsedState=function(){var e=this.grid,t=e?e.columns:null,i=this._rng,o=this._collapsed;if(t){this._cols.forEach((function(e){if(e instanceof ColumnGroup){e._collapsed=o;e._updateCollapsedState()}}));for(var n=this._getCollapseToIndices(),r=i.leftCol;r<=i.rightCol;r++){var l=!o||n.indexOf(r)>-1;t[r]._setFlag(RowColFlags.ParentCollapsed,!l)}}};ColumnGroup.prototype._getMaxLevel=function(){var e=this._lvl;this.columns.forEach((function(t){e=Math.max(e,t._getMaxLevel())}));return e};ColumnGroup.prototype._expandRange=function(e){var t=e-this._getMaxLevel();if(t>0){this._rng.row2+=t;this._cols.forEach((function(e){e._shiftRange(t)}))}for(var i=this.grid.columns,o=this._rng,n=o.col;n<=o.col2;n++){i[n]._rng.row2=e}};ColumnGroup.prototype._shiftRange=function(e){this._rng.row+=e;this._rng.row2+=e;this._cols.forEach((function(t){t._shiftRange(e)}))};ColumnGroup.prototype._containsGroup=function(e){for(var t=0;t<this._cols.length;t++){var i=this._cols[t];if(i==e||i._containsGroup(e))return!0}return!1};ColumnGroup.prototype._isCollapseTo=function(e){var t=this.grid,i=t?t.columns:null;if(!e||!i)return!1;var o=this._getCollapseToBindings();if(o&&o.length)for(var n=0;n<o.length;n++)switch(o[n]){case"$first":case"$last":continue;default:if(e===i.getColumn(o[n]))return!0}return!1};ColumnGroup.prototype._getCollapseToBindings=function(){var e=this.collapseTo;return wijmo_1.isString(e)?[e]:e};ColumnGroup.prototype._getCollapseToIndices=function(){var e=this.grid,t=this._rng,i=this._getCollapseToBindings();if(i&&i.length){for(var o=[],n=e.columns,r=0;r<i.length;r++)switch(i[r]){case"$first":o.push(t.leftCol);break;case"$last":o.push(t.rightCol);break;default:var l=n.getColumn(i[r]),s=n.indexOf(l);l&&t.containsColumn(s)&&o.push(s)}if(o.length)return o}return[t.rightCol]};ColumnGroup.prototype.onPropertyChanged=function(){var t=this._changeHdl;t&&t.handlePropertyChange(this);e.prototype.onPropertyChanged.call(this)};return ColumnGroup}(Column);exports.ColumnGroup=ColumnGroup;var AllowSorting,SortOrder,AllowPinning,HeadersVisibility,ClipStringOptions,HeadersFocusability,FrozenRowCol,GroupSummaryPosition,ColumnGroupCollection=function(e){__extends(ColumnGroupCollection,e);function ColumnGroupCollection(){return null!==e&&e.apply(this,arguments)||this}ColumnGroupCollection.prototype.getColumn=function(e){return wijmo_1.isNumber(e)?this._getColByIdx(e):this._findColByProp("name",e)||this._findColByProp("binding",e)};Object.defineProperty(ColumnGroupCollection.prototype,"owner",{get:function(){return this._owner},enumerable:!0,configurable:!0});ColumnGroupCollection.prototype.push=function(t){t._setOwnerList(this);return e.prototype.push.call(this,t)};ColumnGroupCollection.prototype.splice=function(t,i){for(var o=this,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];for(var l=t;l<t+i&&l<this.length;l++){var s=this[l];s instanceof ColumnGroup&&s._setOwnerList(null)}n.forEach((function(e){return e._setOwnerList(o)}));return e.prototype.splice.apply(this,[t,i].concat(n))};ColumnGroupCollection._parse=function(e){var t=null;if(e)if(e instanceof ColumnGroupCollection)t=e;else{t=new ColumnGroupCollection;e.forEach((function(e){var i=e instanceof ColumnGroup?e:new ColumnGroup(e);t.indexOf(i)<0&&t.push(i)}))}else t=new ColumnGroupCollection;return t};ColumnGroupCollection.prototype._setChangeHandler=function(e){this._changeHdl=e;this.forEach((function(t){return t._setChangeHandler(e)}))};ColumnGroupCollection.prototype._removeChangeHandler=function(){this._changeHdl=null;this.forEach((function(e){return e._removeChangeHandler()}))};ColumnGroupCollection.prototype._setOwner=function(e){this._owner=e;this.forEach((function(e){return e.columns._setOwner(e)}))};ColumnGroupCollection.prototype._getColByIdx=function(e){return e>-1&&e<this.length?this[e]:null};ColumnGroupCollection.prototype._findColByProp=function(e,t){for(var i=0;i<this.length;i++){var o=this[i];if(o[e]===t)return o;if(null!==(o=o.columns._findColByProp(e,t)))return o}return null};ColumnGroupCollection.prototype.onCollectionChanged=function(t){void 0===t&&(t=wijmo_1.NotifyCollectionChangedEventArgs.reset);var i=this._changeHdl;i&&i.handleCollectionChange();e.prototype.onCollectionChanged.call(this,t)};return ColumnGroupCollection}(wijmo_1.ObservableArray);exports.ColumnGroupCollection=ColumnGroupCollection;wijmo_1._addCultureInfo("FlexGrid",{groupHeaderFormat:"{name}: <b>{value}</b> ({count:n0} items)",ariaLabels:{toggleDropDown:"Toggle Dropdown",toggleGroup:"Toggle Group",pinning:"Pinnable",pined:"Pinned",sortIndex:"Sort Index",pencil:"Item Being Edited",collapse:"Collapsed Column Header ",asterisk:"New Row Template",rowHeader:"Row Header",topleft:"Top Left",checked:"Checked",unchecked:"Unchecked",editCell:"Edit Cell",IMEInput:"IME Input",radioButtonChecked:"Radio Button Checked",newRowCell:"New Row Cell"},accessibilityHelperMessage:{insertRow:"insert before row {index}",deleteRow:"delete row {index}",pin:{pinColumnName:"Pin Column: {name}",unpinColumnName:"Unpin Column: {name}",pinColumnIndex:"Pin: {colIndex}",unpin:"Unpin"},sort:{sortAscending:"Column {name} Sorted Ascending",sortDescending:"Column {name} Sorted Descending",clearSort:"Clear sort"},frozen:{frozenColumn:"frozen column: {col} row: {row}",unfrozenColumn:"unfrozen column: {col} row: {row}"},imeHandler:{focusImeCell:"{value} {rowName} row {rowIndex} {colName} column {colIndex}"}}});!function(e){e[e.None=0]="None";e[e.SingleColumn=1]="SingleColumn";e[e.MultiColumn=2]="MultiColumn"}(AllowSorting=exports.AllowSorting||(exports.AllowSorting={}));!function(e){e[e.AscDesc=0]="AscDesc";e[e.DescAsc=1]="DescAsc";e[e.AscDescNone=2]="AscDescNone";e[e.DescAscNone=3]="DescAscNone"}(SortOrder=exports.SortOrder||(exports.SortOrder={}));!function(e){e[e.None=0]="None";e[e.SingleColumn=1]="SingleColumn";e[e.ColumnRange=2]="ColumnRange";e[e.Both=3]="Both"}(AllowPinning=exports.AllowPinning||(exports.AllowPinning={}));!function(e){e[e.None=0]="None";e[e.Column=1]="Column";e[e.Row=2]="Row";e[e.All=3]="All"}(HeadersVisibility=exports.HeadersVisibility||(exports.HeadersVisibility={}));!function(e){e[e.Default=0]="Default";e[e.CSV=1]="CSV";e[e.QuoteAll=2]="QuoteAll";e[e.SkipMerged=4]="SkipMerged";e[e.Unformatted=8]="Unformatted";e[e.InvisibleRows=16]="InvisibleRows";e[e.InvisibleColumns=32]="InvisibleColumns";e[e.InvisibleCells=48]="InvisibleCells"}(ClipStringOptions=exports.ClipStringOptions||(exports.ClipStringOptions={}));!function(e){e[e.None=0]="None";e[e.Column=1]="Column";e[e.Row=2]="Row";e[e.All=3]="All"}(HeadersFocusability=exports.HeadersFocusability||(exports.HeadersFocusability={}));!function(e){e[e.Column=0]="Column";e[e.Row=1]="Row"}(FrozenRowCol=exports.FrozenRowCol||(exports.FrozenRowCol={}));!function(e){e[e.Top=0]="Top";e[e.Bottom=1]="Bottom";e[e.Auto=2]="Auto"}(GroupSummaryPosition=exports.GroupSummaryPosition||(exports.GroupSummaryPosition={}));var FlexGrid=function(e){__extends(FlexGrid,e);function FlexGrid(t,i){var o=e.call(this,t,null,!0)||this;o._activeCell=null;o._eNoData=null;o._srFocusHelper=null;o._srMessageHelper=null;o._imeContainer=null;o._eEditorsContainer=null;o._szClient=new wijmo_1.Size(0,0);o._szClientSB=new wijmo_1.Size(0,0);o._offsetY=0;o._cssPage=0;o._ptScrl=new wijmo_1.Point(0,0);o._ptLastScrl=new wijmo_1.Point(0,0);o._cellPadLeft=3;o._cellPadHorz=3;o._cellPadVert=0;o._clipToScreen=!1;o._anchorCell=null;o._spDiff=new wijmo_1.Point(0,0);o._autoGenCols=!0;o._autoClipboard=!0;o._xOnCopyPaste=!0;o._autoScroll=!0;o._autoSearch=!1;o._caseSensitive=!1;o._readOnly=!1;o._indent=14;o._autoSizeMode=AutoSizeMode.Both;o._autoHeights=!1;o._quickSize=null;o._hdrVis=HeadersVisibility.All;o._hdrFoc=HeadersFocusability.None;o._alSorting=AllowSorting.SingleColumn;o._sortOrder=SortOrder.AscDesc;o._alPinning=AllowPinning.None;o._alAddNew=!1;o._alDelete=!1;o._alResizing=AllowResizing.Columns;o._alDragging=AllowDragging.Columns;o._alMerging=AllowMerging.None;o._ssHdr=HeadersVisibility.None;o._shSort=!0;o._shGroups=!0;o._shMarquee=!1;o._shPlcHld=!1;o._altStep=1;o._shErr=!0;o._shDropDown=!0;o._valEdt=!0;o._gHdrFmt=null;o._childItemsPath=null;o._sortRowIndex=null;o._editColIndex=null;o._deferResizing=!1;o._pSel=!0;o._pOutline=!0;o._collapsedGroups=null;o._stickyHdr=!1;o._anchorCursor=!1;o._copyHeaders=HeadersVisibility.None;o._bigChecks=!1;o._skipMerged=!1;o._commitEmptyEdits=!0;o._maxContent=!1;o._pasteEmptyCells=!0;o._groupSummaryPosition=GroupSummaryPosition.Top;o._noDataOverlayContent="";o._fzClone=null;o._vt=0;o._vtRows=0;o._vtCols=0;o._lazyRender=!0;o._refreshOnEdit=!0;o._reorderCells=!0;o._lastStickyScroll=0;o._scrollStickyThrottleTimeout=14;o._scrollEndTimer=null;o._contentEstimationLimit=100;o._isSilentScroll=!1;o._isISChanging=!1;o._isScrollingByWheel=!1;o.cachedDefaultHeight=-1;o.cachedHeights={};o._isSourceChanging=!1;o._canOverRuleCtrlPress=!1;o._isShiftTab=!1;o._touchEdit=!1;o._isGrpClpsChanging=!1;o._initialRestCvLoad=!0;o._grpClpsChng=!1;o.itemsSourceChanging=new wijmo_1.Event;o.itemsSourceChanged=new wijmo_1.Event;o.scrollPositionChanged=new wijmo_1.Event;o.selectionChanging=new wijmo_1.Event;o.selectionChanged=new wijmo_1.Event;o.loadingRows=new wijmo_1.Event;o.loadedRows=new wijmo_1.Event;o.updatingLayout=new wijmo_1.Event;o.updatedLayout=new wijmo_1.Event;o.resizingColumn=new wijmo_1.Event;o.resizedColumn=new wijmo_1.Event;o.autoSizingColumn=new wijmo_1.Event;o.autoSizedColumn=new wijmo_1.Event;o.starSizedColumns=new wijmo_1.Event;o.draggingColumn=new wijmo_1.Event;o.draggingColumnOver=new wijmo_1.Event;o.draggedColumn=new wijmo_1.Event;o.pinningColumn=new wijmo_1.Event;o.pinnedColumn=new wijmo_1.Event;o.resizingRow=new wijmo_1.Event;o.resizedRow=new wijmo_1.Event;o.autoSizingRow=new wijmo_1.Event;o.autoSizedRow=new wijmo_1.Event;o.draggingRow=new wijmo_1.Event;o.draggingRowOver=new wijmo_1.Event;o.draggedRow=new wijmo_1.Event;o.groupCollapsedChanging=new wijmo_1.Event;o.groupCollapsedChanged=new wijmo_1.Event;o.columnGroupCollapsedChanging=new wijmo_1.Event;o.columnGroupCollapsedChanged=new wijmo_1.Event;o.sortingColumn=new wijmo_1.Event;o.sortedColumn=new wijmo_1.Event;o.beginningEdit=new wijmo_1.Event;o.prepareCellForEdit=new wijmo_1.Event;o.cellEditEnding=new wijmo_1.Event;o.cellEditEnded=new wijmo_1.Event;o.rowEditStarting=new wijmo_1.Event;o.rowEditStarted=new wijmo_1.Event;o.rowEditEnding=new wijmo_1.Event;o.rowEditEnded=new wijmo_1.Event;o.rowAdded=new wijmo_1.Event;o.deletingRow=new wijmo_1.Event;o.deletedRow=new wijmo_1.Event;o.copying=new wijmo_1.Event;o.copied=new wijmo_1.Event;o.pasting=new wijmo_1.Event;o.pasted=new wijmo_1.Event;o.pastingCell=new wijmo_1.Event;o.pastedCell=new wijmo_1.Event;o.formatItem=new wijmo_1.Event((function(){o._clearCells()}));o.updatingView=new wijmo_1.Event;o.updatedView=new wijmo_1.Event;o.gettingCellClipString=new wijmo_1.Event;o._mappedColumns=null;o.rowColSelected=new wijmo_1.Event;var n=o.hostElement;wijmo_1.isIE()&&(n.style.borderRadius="0");var r=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+wijmo_1.ControlClsNames.content+" "+exports.FlexGridClsNames.hostElement,r,{_mainContainer:"main-container",_root:"root",_eSz:"sz",_eCt:"cells",_fCt:"fcells",_eTL:"tl",_eBL:"bl",_eCHdr:"ch",_eRHdr:"rh",_eCFtr:"cf",_eTLCt:"tlcells",_eBLCt:"blcells",_eCHdrCt:"chcells",_eCFtrCt:"cfcells",_eRHdrCt:"rhcells",_eMarquee:"marquee",_eNoData:"no-data",_srFocusHelper:"sr-focus-helper"});o._createHelperContainer();wijmo_1.setCss(o._mainContainer,{position:"relative",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden",minWidth:"inherit",minHeight:"inherit",maxWidth:"inherit",maxHeight:"inherit"});wijmo_1.setCss(o._root,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",minWidth:"inherit",minHeight:"inherit",maxWidth:"inherit",maxHeight:"inherit",overflow:"auto",webkitOverflowScrolling:"touch"});wijmo_1.setCss(o._eCt,{position:"absolute"});wijmo_1.setCss(o._eMarquee,{display:"none"});wijmo_1.setCss(o._eMarquee.firstChild,{width:"100%",height:"100%"});wijmo_1.setCss(o._fCt,{position:"absolute",top:0,left:0,overflow:"hidden",pointerEvents:"none"});wijmo_1.setCss(o._eSz,{position:"relative",visibility:"hidden"});wijmo_1.setCss(o._srFocusHelper,{position:"fixed",height:"100%"});[o._eRHdr,o._eCFtr,o._eCHdr,o._eBL,o._eTL].forEach((function(e){wijmo_1.setCss(e,{position:"absolute",overflow:"hidden",outline:"none"});wijmo_1.setCss(e.firstElementChild,{position:"relative"})}));[o._eMarquee,o._fCt,o._eSz].forEach((function(e){wijmo_1.setAttribute(e,"aria-hidden",!0)}));if(o.itemsSource&&o.itemsSource.length>0){wijmo_1.setAttribute(o._root,"role","rowgroup");wijmo_1.setAttribute(o._eCHdr,"role","rowgroup")}if(wijmo_1.isIE9()||wijmo_1.isIE10()){var l=o._eMarquee;["click","dblclick","mousedown","mouseup"].forEach((function(e){o.addEventListener(l,e,(function(t){var i=l.style.display;l.style.display="none";var o=document.elementFromPoint(t.clientX,t.clientY);l.style.display=i;var n=document.createEvent("Event");n.initEvent(e,!0,!0);for(var r in t)try{n[r]=t[r]}catch(e){}o.dispatchEvent(n)}))}))}n.tabIndex=-1;o._uid=wijmo_1.uidGenerator();o._ariaId=FlexGrid._FLEXGRID_COUNT;FlexGrid._FLEXGRID_COUNT++;o.deferUpdate((function(){var e=o._getDefaultRowHeight();o._rows=new RowCollection(o,e);o._cols=new ColumnCollection(o,4*e);o._hdrRows=new RowCollection(o,e);o._hdrCols=new ColumnCollection(o,Math.round(1.25*e));o._ftrRows=new RowCollection(o,e);var t=CellType;o._gpTL=new GridPanel(o,t.TopLeft,o._hdrRows,o._hdrCols,o._eTLCt);o._gpCHdr=new GridPanel(o,t.ColumnHeader,o._hdrRows,o._cols,o._eCHdrCt);o._gpRHdr=new GridPanel(o,t.RowHeader,o._rows,o._hdrCols,o._eRHdrCt);o._gpCells=new GridPanel(o,t.Cell,o._rows,o._cols,o._eCt);o._gpBL=new GridPanel(o,t.BottomLeft,o._ftrRows,o._hdrCols,o._eBLCt);o._gpCFtr=new GridPanel(o,t.ColumnFooter,o._ftrRows,o._cols,o._eCFtrCt);o.activePanel=o._gpCells;o._hdrRows.push(new Row);o._hdrCols.push(new Column({align:"center"}));o._cf=new CellFactory;o._keyHdl=new _KeyboardHandler(o);o._mouseHdl=new _MouseHandler(o);o._edtHdl=new _EditHandler(o);o._selHdl=o._createSelHdl();o._addHdl=new _AddNewHandler(o);o._grpHdl=new _ColumnGroupHandler(o);o._mrgMgr=new MergeManager;o._oMgr=new OverlayManager;o._bndSortConverter=o._sortConverter.bind(o);o._errorTip=new wijmo_1.Tooltip({isContentHtml:!1,showDelay:50,cssClass:exports.FlexGridClsNames.errorTip});o._errorTip._tooltipVisibleOnHover=!0;o._errorTip.forceRecreate=!0;o.selectionMode=SelectionMode.CellRange;o._root.tabIndex=-1;o.addEventListener(o._eFocus,"focus",(function(e){o.rows.length||o._eNoData.focus()}));o.initialize(i)}));o.addEventListener(o._root,"scroll",(function(e){wijmo_1.isChromiumBased()&&o._handleSpaceDisorderOnScrollToEnd();if(o._updateScrollPosition()||o._forceScrollUpdate){var t=o.activeEditor,i=o.activeCell,n=i?i.className:null,r=softInput(),l=r&&r.InputNumberClsNames.numeric;if((wijmo_1.hasClass(i,"wj-detail")||wijmo_1.hasClass(t,l))&&wijmo_1.Control.sharedState.InvalidScroll){o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0);return}o._forceScrollUpdate||wijmo_1.Control.sharedState.InvalidScroll||o.finishEditing();o._forceScrollUpdate=!1;var s=o._edtHdl._getCustomEditor(o),a=!(!t||!s)&&s.isOpen,d=o._edtHdl.validate;if(!a||!d){if("React"===o.workingAs)o._updateContentAnim=requestAnimationFrame((function(){o._updateContent(!0);o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}));else{o._updateContent(!0);o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}var c=o.activeEditor,u=o.activeCell;if(c&&u&&t&&n){c.value=t.value;u.className=n;o._setFocusNoScroll(c)}else!c||u||wijmo_1.Control.sharedState.InvalidScroll||o.finishEditing(!0)}o.columns._frozenInternal&&(o._triggerInvalidateTimer=setTimeout((function(){var e=o.columnHeaders.hostElement.style,t=parseInt(e.left),i=o._ptScrl.x;Math.abs(t-i)>1&&o.invalidate()})));o._invalidScrollWithWheelTimer=setTimeout((function(){o._isScrollingByWheel=!1;wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}}));o.addEventListener(n,"focus",(function(e){if(n.tabIndex>-1){var t=e.target;t instanceof HTMLElement&&t.tabIndex<0&&o._setFocus(!0)}}),!0);o.addEventListener(window,"resize",(function(){if(!wijmo_1.isMobile()&&!wijmo_1.isSupportTouch()){o.finishEditing(!1);o.invalidate()}}));o.addEventListener(document,"keydown",(function(e){"Tab"===e.key&&(e.shiftKey?o._isShiftTab=!0:o._isShiftTab=!1)}));o.addEventListener(o._srFocusHelper,"focus",(function(e){var t=wijmo_1._getFocusableElements(document.body),i=t.indexOf(e.target),n=o._isShiftTab?i-1:i+1;i>-1&&t[n]?t[n].focus():e.target.blur()}));o.resizingColumn.addHandler(o._handleRowColResizing);o.resizingRow.addHandler(o._handleRowColResizing);o.resizedColumn.addHandler(o._getRowColResizedHandler(o,!1));o.resizedRow.addHandler(o._getRowColResizedHandler(o,!0));o.updatedLayout.addHandler(o.handleLoad.bind(o));o.refreshed.addHandler(o._handleRefreshForA11y.bind(o));return o}Object.defineProperty(FlexGrid,"controlTemplate",{get:function(){FlexGrid._ctrlTemplate||(FlexGrid._ctrlTemplate='<div wj-part="main-container"> <div wj-part="ch"><div wj-part="chcells" class="'+exports.FlexGridClsNames.colHeaders+'"></div></div><div wj-part="root"><div wj-part="cells" class="'+exports.FlexGridClsNames.cells+'"></div><div wj-part="no-data" class="'+exports.FlexGridClsNames.noDataOverlay+'" tabindex="-1"></div><div wj-part="marquee" class="'+exports.FlexGridClsNames.marquee+'"><div></div></div><div role="row" ><div class="'+exports.FlexGridClsNames.screenReaderOnly+'" wj-part="sr-focus-helper" tabindex="0" role="gridcell" aria-label="Focus helper"></div></div></div><div wj-part="fcells" aria-hidden="true" class="'+exports.FlexGridClsNames.cells+" "+exports.FlexGridClsNames.frozenClone+'"></div><div wj-part="rh"><div wj-part="rhcells" class="'+exports.FlexGridClsNames.rowHeaders+'"></div></div><div wj-part="cf"><div wj-part="cfcells" class="'+exports.FlexGridClsNames.colFooters+'"></div></div><div wj-part="bl"><div wj-part="blcells" class="'+exports.FlexGridClsNames.bottomLeft+'"></div></div><div wj-part="tl"><div wj-part="tlcells" class="'+exports.FlexGridClsNames.topLeft+'"></div></div><div wj-part="sz"></div></div>');return FlexGrid._ctrlTemplate},set:function(e){FlexGrid._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activePanel",{get:function(){return this._activePanel},set:function(e){this._activePanel=wijmo_1.asType(e,GridPanel,!1)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activePanelType",{get:function(){return this._activePanel?this._activePanel.cellType:CellType.Cell},enumerable:!0,configurable:!0});FlexGrid.prototype._handleSpaceDisorderOnScrollToEnd=function(){var e=new wijmo_1.Size(this._szClientSB.width-(this._root.offsetWidth-this._root.clientWidth),this._szClientSB.height-(this._root.offsetHeight-this._root.clientHeight)),t=this._gpCells.width-e.width+this._ptScrl.x,i=this._gpCells.height-e.height+this._eCFtr.clientHeight+this._ptScrl.y,o=1==this._rtlDir?-1:1,n=o*(this._root.scrollLeft-this._ptLastScrl.x),r=this._root.scrollTop-this._ptLastScrl.y,l=new wijmo_1.Point(this._ptLastScrl.x+n,this._ptLastScrl.y+r),s=this._gpCells.width+this._eRHdr.clientWidth-this._root.clientWidth,a=this._gpCells.height+this._eCHdr.clientHeight-this._root.clientHeight+this._eCFtr.clientHeight;this._ptLastScrl=new wijmo_1.Point(this._root.scrollLeft,this._root.scrollTop);if((t<1||l.x>s)&&n>0){var d=o*(this._gpCells.width-e.width);if(d!=this._root.scrollLeft){this._szClient=e;this._root.scrollLeft=d;return!0}}else if((i<1||l.y>a)&&r>0){var c=this._gpCells.height-(e.height-this._eCFtr.clientHeight);if(this._root.scrollTop!=c){this._szClient=e;this._root.scrollTop=c;return!0}}return!1};FlexGrid.prototype._handleResize=function(){var t=this;this._rcBounds=null;this.activeEditor&&this.isTouching||this._touchEdit?this._startEditingTimer=setTimeout((function(){if(!t.activeEditor){t._touchEdit=!0;t.startEditing(!0)}}),50):e.prototype._handleResize.call(this);this._touchEdit=!1};Object.defineProperty(FlexGrid.prototype,"headersVisibility",{get:function(){return this._hdrVis},set:function(e){if((e=wijmo_1.asEnum(e,HeadersVisibility))!=this._hdrVis){this._hdrVis=e;this.columnHeaders.rows._dirty=!0;this.rowHeaders.columns._dirty=!0;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"headersFocusability",{get:function(){return this._hdrFoc},set:function(e){if((e=wijmo_1.asEnum(e,HeadersFocusability))!=this._hdrFoc){this._hdrFoc=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"stickyHeaders",{get:function(){return this._stickyHdr},set:function(e){if(e!=this._stickyHdr){this._stickyHdr=wijmo_1.asBoolean(e);this._updateStickyHeaders();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"maxContent",{get:function(){return this._maxContent},set:function(e){if(e!=this._maxContent){this._maxContent=wijmo_1.asBoolean(e);this._adjustMaxContentWidth();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveSelectedState",{get:function(){return this._pSel},set:function(e){this._pSel=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveOutlineState",{get:function(){return this._pOutline},set:function(e){this._pOutline=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"anchorCursor",{get:function(){return this._anchorCursor},set:function(e){this._anchorCursor=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"noDataOverlayContent",{get:function(){return this._noDataOverlayContent},set:function(e){if(this._noDataOverlayContent!=e){this._noDataOverlayContent=wijmo_1.asString(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"copyHeaders",{get:function(){return this._copyHeaders},set:function(e){this._copyHeaders=wijmo_1.asEnum(e,HeadersVisibility)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"lazyRender",{get:function(){return this._lazyRender},set:function(e){this._lazyRender=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"refreshOnEdit",{get:function(){return this._refreshOnEdit},set:function(e){this._refreshOnEdit=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"virtualizationThreshold",{get:function(){return this._vt},set:function(e){this._vt=e;if(wijmo_1.isNumber(e))this._vtRows=this._vtCols=wijmo_1.asNumber(e);else if(e)if(wijmo_1.isArray(e)&&2==e.length){this._vtRows=wijmo_1.asNumber(e[0]);this._vtCols=wijmo_1.asNumber(e[1])}else wijmo_1.assert(!1,"virtualizationThreshold should be a number or an array with two numbers.");else this._vtRows=this._vtCols=0},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoGenerateColumns",{get:function(){return this._autoGenCols},set:function(e){this._autoGenCols=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoClipboard",{get:function(){return this._autoClipboard},set:function(e){this._autoClipboard=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"expandSelectionOnCopyPaste",{get:function(){return this._xOnCopyPaste},set:function(e){this._xOnCopyPaste=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoScroll",{get:function(){return this._autoScroll},set:function(e){this._autoScroll=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoSearch",{get:function(){return this._autoSearch},set:function(e){this._autoSearch=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"caseSensitiveSearch",{get:function(){return this._caseSensitive},set:function(e){this._caseSensitive=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnLayout",{get:function(){var e,t=this._hasColumnGroups(),i=t?ColumnGroup:Column,o=t?"columnGroups":"columns",n=FlexGrid._getSerializableProperties(i),r=t?["collapseTo"]:[],l=["size"],s=new i,a=t?this.getColumnGroups():this.columns,serializeColumns=function(e){var i=[];e.forEach((function(e){var o={};n.forEach((function(t){var i=e[t];(function(e,t){return t!=s[e]&&l.indexOf(e)<0&&(wijmo_1.isPrimitive(t)||r.indexOf(e)>-1)})(t,i)&&(o[t]=i)}));if(t){var a=e.columns;a.length&&(o.columns=serializeColumns(a))}i.push(o)}));return i},d=serializeColumns(a);return JSON.stringify(((e={})[o]=d,e))},set:function(e){var t=this,i=JSON.parse(wijmo_1.asString(e));wijmo_1.assert(i,"Invalid columnLayout data.");this.columns.deferUpdate((function(){t.columns.clear();t._hasColumnGroups()&&(t.columnGroups=new ColumnGroupCollection);t.initialize(i)}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnGroups",{get:function(){return this._grpHdl.getGroupDefinitions()},set:function(e){this.columns.clear();this._grpHdl.createColumnGroups(wijmo_1.asArray(e))},enumerable:!0,configurable:!0});FlexGrid.prototype.getColumnGroups=function(){return this._grpHdl.columnGroups};Object.defineProperty(FlexGrid.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){if(e!=this._readOnly){this._readOnly=wijmo_1.asBoolean(e);this.finishEditing();this.invalidate(!0);this._addHdl.updateNewRowTemplate();wijmo_1.toggleClass(this.hostElement,wijmo_1.ControlStateClsNames.readOnly,this.isReadOnly);this._setAria("aria-readonly",this.isReadOnly?"true":"false")}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"bigCheckboxes",{get:function(){return this._bigChecks},set:function(e){this._bigChecks=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"skipMerged",{get:function(){return this._skipMerged},set:function(e){this._skipMerged=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"pasteEmptyCells",{get:function(){return this._pasteEmptyCells},set:function(e){this._pasteEmptyCells=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"isDisabled",{get:function(){return this._e&&null!=this._e.getAttribute("disabled")},set:function(e){if((e=wijmo_1.asBoolean(e,!0))!=this.isDisabled){var t=this._e;if(t){wijmo_1.enable(t,!e);this._updateTabIndex();this.invalidate()}}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"imeEnabled",{get:function(){return null!=this._imeHdl},set:function(e){if(wijmo_1.asBoolean(e)!=this.imeEnabled&&this.finishEditing()){var t=this.containsFocus();if(this._imeHdl){this._imeHdl.dispose();this._imeHdl=null}e&&(this._imeHdl=new _ImeHandler(this));t&&this.focus()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowResizing",{get:function(){return this._alResizing},set:function(e){this._alResizing=wijmo_1.asEnum(e,AllowResizing)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"deferResizing",{get:function(){return this._deferResizing},set:function(e){this._deferResizing=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoSizeMode",{get:function(){return this._autoSizeMode},set:function(e){this._autoSizeMode=wijmo_1.asEnum(e,AutoSizeMode)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoRowHeights",{get:function(){return this._autoHeights},set:function(e){this._autoHeights=wijmo_1.asBoolean(e);this._autoRowHeights()},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(e){this._quickSize=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});FlexGrid.prototype._getQuickAutoSize=function(){return wijmo_1.isBoolean(this._quickSize)?this._quickSize:!this.formatItem.hasHandlers&&null==this.itemFormatter};Object.defineProperty(FlexGrid.prototype,"allowSorting",{get:function(){return this._alSorting},set:function(e){wijmo_1.isBoolean(e)&&(e=e?AllowSorting.SingleColumn:AllowSorting.None);this._alSorting=wijmo_1.asEnum(e,AllowSorting)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){e=wijmo_1.asEnum(e,SortOrder);this._sortOrder!=e&&(this._sortOrder=e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowPinning",{get:function(){return this._alPinning},set:function(e){if(e!=this._alPinning){wijmo_1.isBoolean(e)&&(e=e?AllowPinning.SingleColumn:AllowPinning.None);this._alPinning=wijmo_1.asEnum(e,AllowPinning);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowAddNew",{get:function(){return this._alAddNew},set:function(e){if(e!=this._alAddNew){this._alAddNew=wijmo_1.asBoolean(e);this._addHdl.updateNewRowTemplate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"newRowAtTop",{get:function(){return this._addHdl.newRowAtTop},set:function(e){this._addHdl.newRowAtTop=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowDelete",{get:function(){return this._alDelete},set:function(e){e!=this._alDelete&&(this._alDelete=wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowMerging",{get:function(){return this._alMerging},set:function(e){if((e=wijmo_1.asEnum(e,AllowMerging))!=this._alMerging){this._alMerging=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showSelectedHeaders",{get:function(){return this._ssHdr},set:function(e){if((e=wijmo_1.asEnum(e,HeadersVisibility))!=this._ssHdr){this._ssHdr=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showMarquee",{get:function(){return this._shMarquee},set:function(e){if(e!=this._shMarquee){this._shMarquee=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showPlaceholders",{get:function(){return this._shPlcHld},set:function(e){this._shPlcHld=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showSort",{get:function(){return this._shSort},set:function(e){if(e!=this._shSort){this._shSort=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showGroups",{get:function(){return this._shGroups},set:function(e){if(e!=this._shGroups){this._shGroups=wijmo_1.asBoolean(e);this._bindGrid(!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"alternatingRowStep",{get:function(){return this._altStep},set:function(e){if(e!=this._altStep){this._altStep=wijmo_1.asInt(e,!1,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showAlternatingRows",{get:function(){return this._altStep>0},set:function(e){wijmo_1._deprecated("showAlternatingRows","alternatingRowStep");this.alternatingRowStep=e?1:0},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showErrors",{get:function(){return this._shErr},set:function(e){if(e!=this._shErr){this._clearCells();this._shErr=wijmo_1.asBoolean(e)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"errorTip",{get:function(){return this._errorTip},set:function(e){if(e!=this._errorTip){this._clearCells();this._errorTip=wijmo_1.asType(e,wijmo_1.Tooltip,!0)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemValidator",{get:function(){return this._itemValidator},set:function(e){if(e!=this.itemValidator){this._itemValidator=wijmo_1.asFunction(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"validateEdits",{get:function(){return this._valEdt},set:function(e){this._setvalidateEdits(e)},enumerable:!0,configurable:!0});FlexGrid.prototype._setvalidateEdits=function(e){this._valEdt=wijmo_1.asBoolean(e)};Object.defineProperty(FlexGrid.prototype,"groupHeaderFormat",{get:function(){return this._gHdrFmt},set:function(e){if(e!=this._gHdrFmt){this._gHdrFmt=wijmo_1.asString(e);this._bindGrid(!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowDragging",{get:function(){return this._alDragging},set:function(e){if((e=wijmo_1.asEnum(e,AllowDragging))!=this._alDragging){this._alDragging=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"ariaLabel",{get:function(){return this._ariaLabel?this._ariaLabel:this._gridRoleElement()?this._gridRoleElement().getAttribute("aria-label"):this._ariaLabel},set:function(e){this._ariaLabel=e;this._setAria("aria-label",e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemsSource",{get:function(){return this._items},set:function(e){var t=this;if(e!=this._items){var i=new wijmo_1.CancelEventArgs;if(this.onItemsSourceChanging(i)){if(this._cv){var o=this._cv;if(this._isServerCollectionView(this._cv)){(r=this.collectionView).loading.removeHandler(null,this);r.loaded.removeHandler(null,this)}o.currentChanged.removeHandler(null,this);o.collectionChanged.removeHandler(null,this);o.pageChanging&&o.pageChanging.removeHandler(null,this);o.pageChanged&&o.pageChanged.removeHandler(null,this);o.groupDescriptions&&o.groupDescriptions.collectionChanged.removeHandler(null,this);o instanceof wijmo_1.CollectionView&&o.sortConverter==this._bndSortConverter&&(o.sortConverter=null);this._cv=null}this._items=e;this._cv=this._getCollectionView(e);this._collapsedGroups=null;this._lastCount=0;if(this._cv){var n;(o=this._cv).collectionChanged.addHandler((function(e,i){return t._cvCollectionChanged(e,i)}),this);o.pageChanging&&o.pageChanging.addHandler((function(){t._saveCollapsedState()}),this);o.pageChanged&&o.pageChanged.addHandler((function(){t._restoreCollapsedState()}),this);o.groupDescriptions&&o.groupDescriptions.collectionChanged.addHandler((function(e,i){i.action!==wijmo_1.NotifyCollectionChangedAction.Add&&(t._collapsedGroups=null)}),this);if(this._isServerCollectionView(this._cv)){var r;(r=this.collectionView).groupLazyLoading&&this._isFlexSheetInstance()&&console.error("groupLazyLoading is not supported for FlexSheet.");r.loading.addHandler((function(e,i){n=t.selection}),this);r.loaded.addHandler((function(e,i){return t._restCvLoadedHandler(e,i,n)}),this)}o.currentChanged.addHandler((function(e,i){return t._cvCurrentChanged(e,i)}),this);if(o instanceof wijmo_1.CollectionView){e&&(o.trackChanges=Boolean(e.trackChanges));o.sortConverter&&!this._isFlexSheetInstance()||(o.sortConverter=this._bndSortConverter)}}this._isISChanging=!0;this.disposed||this._bindGrid(!0);this._isISChanging=!1;this.onItemsSourceChanged(i)}}},enumerable:!0,configurable:!0});FlexGrid.prototype._restCvLoadedHandler=function(e,t,i){var o=this;e.groupLazyLoading&&this.deferUpdate((function(){o._isGrpClpsChanging=!0;o.rows.deferUpdate((function(){for(var e=0;e<o.rows.length;e++)o.rows[e]instanceof GroupRow&&Object.keys(o.rows[e].dataItem.items[0]).length==o.rows[e].dataItem.level+1&&(o.rows[e].isCollapsed=!0)}));o._isGrpClpsChanging=!1}));if(e._virtualization){e.groupDescriptions.length&&this.deferUpdate((function(){o._loadVirtualizedItems()}));this._isGrpClpsChanging=!1}(e._virtualization||e.groupLazyLoading)&&this.selection&&-1==this.selection.row&&i&&-1!=i.row&&this.select(i,!1,this.cells);if(this._initialRestCvLoad){0==this.selectionMode&&-1!=this.selection.row&&this.select(-1,0);this._initialRestCvLoad=!1;this._isFlexSheetInstance()&&(this._selHdl.selection.col=this._selHdl.selection.col2=0)}};FlexGrid.prototype._loadVirtualizedItems=function(){for(var e=this.viewRange,t=this.collectionView,i=null,o=e.row;o<=e.row2;o++)if(!(this.rows[o]instanceof GroupRow)&&this.rows[o].dataItem instanceof wijmo_1._NullValue&&-1!==this.rows[o].visibleIndex)null===i&&(i=o);else if(null!==i){t.setWindow(i-this._getGroupCount(i),o-1);i=null}null!==i&&t.setWindow(i-this._getGroupCount(i),e.row2)};Object.defineProperty(FlexGrid.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editableCollectionView",{get:function(){return wijmo_1.tryCast(this._cv,"IEditableCollectionView")},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"childItemsPath",{get:function(){return this._childItemsPath},set:function(e){if(e!=this._childItemsPath){wijmo_1.assert(null==e||wijmo_1.isArray(e)||wijmo_1.isString(e),"childItemsPath should be an array or a string.");this._childItemsPath=e;this._bindGrid(!0)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rowHeaderPath",{get:function(){return this._rowHdrPath?this._rowHdrPath.path:null},set:function(e){if(e!=this.rowHeaderPath){e=wijmo_1.asString(e);this._rowHdrPath=e?new wijmo_1.Binding(e):null;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cells",{get:function(){return this._gpCells},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnHeaders",{get:function(){return this._gpCHdr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnFooters",{get:function(){return this._gpCFtr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rowHeaders",{get:function(){return this._gpRHdr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"topLeftCells",{get:function(){return this._gpTL},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"bottomLeftCells",{get:function(){return this._gpBL},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});FlexGrid.prototype.getColumn=function(e,t){if(this._hasColumnGroups()&&t){var i=this.getColumnGroups();return null!==i?i.getColumn(e):null}return this.columns.getColumn(e)};Object.defineProperty(FlexGrid.prototype,"frozenCells",{get:function(){return{top:this.rows.frozen,bottom:this.rows.frozenEnd,left:this.columns.frozen,right:this.columns.frozenEnd}},set:function(e){if(this._isFrozenObjectAllowed()){wijmo_1.assert("object"==typeof e,"Object of type IGridFreezeOptions expected");var t={top:e.top?e.top:0,bottom:e.bottom?e.bottom:0,left:e.left?e.left:0,right:e.right?e.right:0},i=0;if(t.top){i=this.rows.getDetailRowCountUptoRow(t.top);t.top+=i}else if(t.bottom){i=this.rows.getDetailRowCountUptoRow(-t.bottom);t.bottom+=i}this.rows.frozen=t.top;this.rows.frozenEnd=t.bottom;i&&(this.rows.frozenDetailChildren=i);this.columns.frozen=t.left;this.columns.frozenEnd=t.right}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"frozenRows",{get:function(){return this.rows.frozen-this.rows.frozenDetailChildren},set:function(e){var t=this.rows.getDetailRowCountUptoRow(e);this.rows.frozen=e+t;this.rows.frozenDetailChildren=t},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"frozenColumns",{get:function(){return this.columns.frozen},set:function(e){this.columns.frozen=e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cloneFrozenCells",{get:function(){return this._fzClone},set:function(e){if(e!=this._fzClone){wijmo_1.setText(this._fCt,null);this._fzClone=wijmo_1.asBoolean(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"sortRowIndex",{get:function(){return this._sortRowIndex},set:function(e){if(e!=this._sortRowIndex){this._sortRowIndex=wijmo_1.asNumber(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editColumnIndex",{get:function(){return this._editColIndex},set:function(e){if(e!=this._editColIndex){this._editColIndex=wijmo_1.asNumber(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"scrollPosition",{get:function(){return this._ptScrl.clone()},set:function(e){var t=this._root,i=-e.x;if(this.rightToLeft)switch(FlexGrid._getRtlMode()){case"rev":i=t.scrollWidth-t.clientWidth+e.x;break;case"neg":i=e.x;break;default:i=-e.x}t.scrollLeft!=i&&(t.scrollLeft=i);t.scrollTop!=-e.y&&(t.scrollTop=-e.y);this._updateScrollPosition()&&(this._forceScrollUpdate=!0)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"commitEmptyEdits",{get:function(){return this._commitEmptyEdits},set:function(e){if(e!=this._commitEmptyEdits){this._commitEmptyEdits=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"clientSize",{get:function(){return this._szClient},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"controlRect",{get:function(){this._rcBounds||(this._rcBounds=wijmo_1.getElementRect(this._root));return this._rcBounds},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"scrollSize",{get:function(){return new wijmo_1.Size(this._gpCells.width,this._heightBrowser)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"viewRange",{get:function(){return this._gpCells.viewRange},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cellFactory",{get:function(){return this._cf},set:function(e){if(e!=this._cf){this._clearCells();this._cf=wijmo_1.asType(e,CellFactory,!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(e){if(e!=this._itemFormatter){this._clearCells();this._itemFormatter=wijmo_1.asFunction(e)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"groupSummaryPosition",{get:function(){return this.childItemsPath?GroupSummaryPosition.Top:this._groupSummaryPosition},set:function(e){if(e!==this._groupSummaryPosition){this._groupSummaryPosition=wijmo_1.asEnum(e,GroupSummaryPosition,!1);this._bindGrid(!1)}},enumerable:!0,configurable:!0});FlexGrid.prototype.canEditCell=function(e,t){return this._edtHdl._allowEdit(e,t)};FlexGrid.prototype.getCellData=function(e,t,i){return this.cells.getCellData(e,t,i)};FlexGrid.prototype.getRowDataItem=function(e,t){return this.rows[wijmo_1.asNumber(e,!1,!0)].dataItem};FlexGrid.prototype._getRowData=function(e){return this.cells._getRowData(e)};FlexGrid.prototype.getCellBoundingRect=function(e,t,i){return this.cells.getCellBoundingRect(e,t,i)};FlexGrid.prototype.setCellData=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!0);return this.cells.setCellData(e,t,i,o,n)};FlexGrid.prototype.hitTest=function(e,t){wijmo_1.isNumber(e)&&wijmo_1.isNumber(t)&&(e=new wijmo_1.Point(e,t));wijmo_1.isBoolean(t)&&t&&(this._rcBounds=null);return new HitTestInfo(this,e)};FlexGrid.prototype.getClipString=function(e,t,i,o){var n;n=this.skipMerged?ClipStringOptions.SkipMerged:null==t||wijmo_1.isBoolean(t)?t?ClipStringOptions.CSV:ClipStringOptions.Default:t;wijmo_1.assert(wijmo_1.isNumber(n),"Unexpected value for ClipStringOptions parameter.");return this._edtHdl.getClipString(e,n,i,o)};FlexGrid.prototype.setClipString=function(e,t){this._edtHdl.setClipString(e,t)};FlexGrid.prototype.focus=function(e){this.isDisabled||this._setFocus(e)};FlexGrid.prototype.dispose=function(){var t=this;this.disposed=!0;if(this._afClip){cancelAnimationFrame(this._afClip);this._afClip=null}if(this._afSticky){cancelAnimationFrame(this._afSticky);this._afSticky=null}if(this._updateContentAnim){cancelAnimationFrame(this._updateContentAnim);this._updateContentAnim=null}this._edtHdl&&this.finishEditing(!0);this.rows.clear();this.columns.clear();this._hdrRows.clear();this._hdrCols.clear();this._ftrRows.clear();if(this._setInvalidScrollTimer){clearTimeout(this._setInvalidScrollTimer);this._setInvalidScrollTimer=null}if(this._triggerInvalidateTimer){clearTimeout(this._triggerInvalidateTimer);this._triggerInvalidateTimer=null}if(this._invalidScrollWithWheelTimer){clearTimeout(this._invalidScrollWithWheelTimer);this._invalidScrollWithWheelTimer=null}if(this._startEditingTimer){clearTimeout(this._startEditingTimer);this._startEditingTimer=null}if(this._showAutoTipTimer){clearTimeout(this._showAutoTipTimer);this._showAutoTipTimer=null}if(this._toAutoHeights){clearTimeout(this._toAutoHeights);this._toAutoHeights=null}if(this._toErrorTips){clearTimeout(this._toErrorTips);this._toErrorTips=null}if(this._scrollEndTimer){clearTimeout(this._scrollEndTimer);this._scrollEndTimer=null}if(this._invalidateTimer){clearTimeout(this._invalidateTimer);this._invalidateTimer=null}if(this._errorTip){this._errorTip.dispose();this._errorTip=null}["_gpTL","_gpCHdr","_gpRHdr","_gpCells","_gpBL","_gpCFtr"].forEach((function(e){var i=t[e];i&&i.dispose();t[e]=null}));["_root","_mainContainer","_helperContainer","_eTL","_eTLCt","_eCHdr","_eCHdrCt","_eRHdr","_eRHdrCt","_eCt","_eBL","_eBLCt","_eCFtrCt","_eCFtr","_fCt","_eFocus","_eSz","_eMarquee","_eNoData","_srFocusHelper","_imeContainer","_srMessageHelper"].forEach((function(e){return t[e]=null}));this._activeCell=null;this._activePanel=null;FlexGrid._ctrlTemplate=null;["_mouseHdl","_keyHdl","_edtHdl","_selHdl","_addHdl","_grpHdl","_imeHdl","_mrgMgr","_oMgr"].forEach((function(e){t[e]&&t[e].dispose&&t[e].dispose();t[e]=null}));CellFactory.dispose();e.prototype.dispose.call(this)};FlexGrid.prototype.refresh=function(t){void 0===t&&(t=!0);e.prototype.refresh.call(this,t);this.finishEditing();if(t){this._updateColumnTypes();this.scrollPosition=this._ptScrl;this._updateAriaRowCount();this._updateAriaColumnCount();this._updateDefaultSizes();clearTimeout(this._toInv);this._toInv=null}this.refreshCells(t);var i=this._e;i&&(this._szCtl=new wijmo_1.Size(i.offsetWidth,i.offsetHeight))};FlexGrid.prototype.refreshCells=function(e,t,i){this.isUpdating||this.disposed||(e?this._updateLayout():this._updateContent(t,i))};FlexGrid.prototype.refreshRange=function(e,t){for(var i=t||this.cells,o=e.topRow;o<=e.bottomRow;o++)for(var n=e.leftCol;n<=e.rightCol;n++){var r=i.getCellElement(o,n);if(r){var l=r[GridPanel._INDEX_KEY];this.cellFactory.updateCell(i,o,n,r,l.rng)}}this._useFrozenDiv()&&this._updateFrozenCells(!0,!0)};FlexGrid.prototype.autoSizeColumn=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=4);this.autoSizeColumns(e,e,t,i)};FlexGrid.prototype.autoSizeColumns=function(e,t,i,o){var n=this;void 0===i&&(i=!1);void 0===o&&(o=4);var r=0,l=i?this.topLeftCells:this.columnHeaders,s=i?this.bottomLeftCells:this.columnFooters,a=i?this.rowHeaders:this.cells,d=this.viewRange;e=null==e?0:wijmo_1.asInt(e);t=null==t?a.columns.length-1:wijmo_1.asInt(t);d.row=Math.max(0,d.row-1e3);d.row2=Math.min(d.row2+1e3,this.rows.length-1);this.finishEditing()&&this.columns.deferUpdate((function(){wijmo_1.setCss(n._eCt,{width:n._gpCells.width});for(var i=wijmo_1.createElement("<div "+FlexGrid._WJS_MEASURE+'="true"/>',a.hostElement,{visibility:"hidden"}),c=n._getCanvasContext(),u=e;u<=t&&u>-1&&u<a.columns.length;u++){var h=a.columns[u];if(h.isVisible){r=0;if(n.autoSizeMode&AutoSizeMode.Headers){for(var _=0;_<l.rows.length;_++)l.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(l,_,u,i),r));for(_=0;_<s.rows.length;_++)s.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(s,_,u,i),r))}if(n.autoSizeMode&AutoSizeMode.Cells&&d.row>-1&&d.row2>-1)if(h._getQuickAutoSize()){_=n._getWidestRow(a,d,u,c);r=Math.max(n._getDesiredWidth(a,_,u,i),r)}else for(_=d.row;_<=d.row2&&_<a.rows.length;_++)a.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(a,_,u,i),r));r>0&&(h.width=r+o+2)}}n.cellFactory.disposeCell(i);wijmo_1.removeChild(i)}))};FlexGrid.prototype.autoSizeRow=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=0);this.autoSizeRows(e,e,t,i)};FlexGrid.prototype.autoSizeRows=function(e,t,i,o){var n=this;void 0===i&&(i=!1);void 0===o&&(o=0);var r=0,l=1==i?this.topLeftCells:null==i?this.bottomLeftCells:this.rowHeaders,s=1==i?this.columnHeaders:null==i?this.columnFooters:this.cells;o=wijmo_1.asNumber(o);e=null==e?0:wijmo_1.asInt(e);if((t=null==t?s.rows.length-1:wijmo_1.asInt(t))>=e&&this.finishEditing()){wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this.cachedHeights={};var a=wijmo_1.createElement("<div "+FlexGrid._WJS_MEASURE+'="true"/>',s.hostElement,{visibility:"hidden"});this.rows.deferUpdate((function(){for(var i={},d=n._autoSizeMode,c=AutoSizeMode,u=e;u<=t&&u>-1&&u<s.rows.length;u++){if(s.rows[u].isVisible){r=0;d&c.Headers&&(r=n._getDesiredRowHeight(l,u,a,i));d&c.Cells&&(r=Math.max(n._getDesiredRowHeight(s,u,a,i),r));r>0&&(s.rows[u].height=r+o)}}}));this.cellFactory.disposeCell(a);wijmo_1.removeChild(a)}};Object.defineProperty(FlexGrid.prototype,"treeIndent",{get:function(){return this._indent},set:function(e){if(e!=this._indent){this._indent=wijmo_1.asNumber(e,!1,!0);this.columns.onCollectionChanged()}},enumerable:!0,configurable:!0});FlexGrid.prototype.collapseGroupsToLevel=function(e){var t=this;if(this.finishEditing()){this._isServerCollectionView(this._cv)&&(this._grpClpsChng=!0);if(this.preserveOutlineState&&this._cv){var i=this._cv._fullGroups||this._cv.groups;if(i){this._collapsedGroups||(this._collapsedGroups=this._getMap());if(this._collapsedGroups){this._collapsedGroups.clear();this._updateAllGroupsCollapseState(i,e,0)}}}this.deferUpdate((function(){var i=t.rows;i.deferUpdate((function(){for(var t=0;t<i.length;t++){var o=i[t];o instanceof GroupRow&&!o.isSummary&&(o.isCollapsed=o.level>=e)}}))}))}this._grpClpsChng=!1};Object.defineProperty(FlexGrid.prototype,"selectionMode",{get:function(){return this._selHdl.selectionMode},set:function(e){if((e=wijmo_1.asEnum(e,SelectionMode))!=this.selectionMode){this._selHdl.selectionMode=e;this._updateTabIndex()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selection",{get:function(){return this._selHdl.selection.clone()},set:function(e){this._selHdl.selection=e},enumerable:!0,configurable:!0});FlexGrid.prototype.select=function(e,t,i){void 0===t&&(t=!0);return this._selHdl.select(e,t,!1,i)};FlexGrid.prototype.selectAll=function(){var e=this.rows.length,t=this.columns.length;return!(!e||!t)&&this.select(new CellRange(0,0,e-1,t-1),!1)};FlexGrid.prototype.getSelectedState=function(e,t){return this.cells.getSelectedState(e,t)};Object.defineProperty(FlexGrid.prototype,"selectedRows",{get:function(){var e=this,t=this.selectionMode,i=this.rows.filter((function(e){return e.isSelected}));if(0==i.length&&t!=SelectionMode.None&&t!=SelectionMode.ListBox){var o=[];this.selectedRanges.forEach((function(t){for(var i=t.topRow;i<=t.bottomRow&&i>-1&&i<e.rows.length;i++)o.indexOf(i)<0&&o.push(i)}));o.sort((function(e,t){return e-t}));i=o.map((function(t){return e.rows[t]}))}return i},set:function(e){var t=this;wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"This property can be set only in ListBox mode.");e=wijmo_1.asArray(e);this.deferUpdate((function(){for(var i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n)>-1;if(r&&o){o=!1;t.select(i,t.selection.col)}n.isSelected=r}}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selectedItems",{get:function(){var e=[];this.selectedRows.forEach((function(t){var i=t?t.dataItem:null;i&&e.indexOf(i)<0&&e.push(i)}));return e},set:function(e){var t=this;wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"This property can be set only in ListBox mode.");e=wijmo_1.asArray(e);this.deferUpdate((function(){for(var i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n.dataItem)>-1;if(r&&o){o=!1;t.select(i,t.selection.col)}n.isSelected=r}}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selectedRanges",{get:function(){var e=[this.selection];this._selHdl.extendedSelection.forEach((function(t){e.push(t)}));return e},set:function(e){if((e=wijmo_1.asArray(e))&&e.length>0){this.select(e[0]);if(this.selectionMode==SelectionMode.MultiRange){var t=this._selHdl.extendedSelection;t.deferUpdate((function(){t.clear();for(var i=1;i<e.length;i++)t.push(e[i])}))}}},enumerable:!0,configurable:!0});FlexGrid.prototype.scrollIntoView=function(e,t,i){var o=this;(null==this._maxOffsetY||this._rows._dirty||this._cols._dirty)&&e>-1&&this._updateLayout();var n=this.scrollPosition,r=this._szClient,l=r.width,s=r.height-this._gpCFtr.rows.getTotalSize(),a=this.cells._getFrozenPos();e=wijmo_1.asInt(e);wijmo_1.isString(t)&&(t=this.columns.indexOf(t));t=wijmo_1.asInt(t);e=e>=this.rows.length?-1:e;t=t>=this.columns.length?-1:t;var d=null;try{var c=this.getMergedRange(this.cells,e,t,!1);d=c;var u=this.cells._getFrozenPos();this.rows._frozenInternal>=0?c&&c.rowSpan>1&&this._rows[e].pos>u.y+-this.scrollPosition.y&&this._rows[e].renderHeight*c.rowSpan<this.hostElement.clientHeight&&this._edtHdl._getCustomEditor(this)&&(e=c.bottomRow):c&&c.rowSpan>1&&this._rows[c.bottomRow].pos+this._rows[c.bottomRow].renderHeight>u.y+-this.scrollPosition.y&&this._rows[c.bottomRow].pos-this._rows[c.topRow].pos+this._rows[c.bottomRow].renderHeight<this.clientSize.height&&(e=c.bottomRow)}catch(e){}var h=this._rows[e];if(e>-1&&e<this._rows.length&&!this._rows.isFrozen(e)){var _=this._getCssPage(h.pos);if(_!=this._cssPage){for(var p=this._maxOffsetY,g=Math.round(p*_);g>h.pos;_-=.1)g=Math.round(p*_);this._offsetY=g}var f=h.pos-this._offsetY,m=f+h.renderSize;m>s-n.y&&(n.y=Math.max(-f,s-m));if(this.rows._frozenInternal>=0)f-a.y<-n.y&&(n.y=-(f-a.y));else{h.pos<-n.y&&(n.y=-h.pos);m+n.y-a.y>0&&(n.y-=m+n.y-a.y);0==Math.abs(n.y-(this._ptScrl.y-this._spDiff.y))&&(n.y=this._ptScrl.y)}_!=this._cssPage&&(this._cssPage=this._getCssPage(-n.y))}wijmo_1.isString(t)&&(t=this.columns.indexOf(t));if((t=wijmo_1.asInt(t))>-1&&t<this._cols.length&&!this._cols.isFrozen(t)){var w=this._cols[t],C=w.pos+w.renderSize;C>-n.x+l&&(n.x=Math.max(-w.pos,l-C));if(this.columns._frozenInternal>=0)w.pos-a.x<-n.x&&(n.x=-(w.pos-a.x));else{w.pos<-n.x&&(n.x=-w.pos);C+n.x-a.x>0&&(n.x-=C+n.x-a.x);0==Math.abs(n.x-(this._ptScrl.x-this._spDiff.x))&&(n.x=this._ptScrl.x);this.rightToLeft&&!this._rows.isFrozen(e)&&wijmo_1.isFirefox()&&n.x++}}if(!n.equals(this._ptScrl,1,.8)){var v=1,y=1;this.columns._frozenInternal<0&&(v=-1);this.rows._frozenInternal<0&&(y=-1);n.x!=this._ptScrl.x&&this._root.clientWidth-n.x<this._root.scrollWidth&&(0!==n.x?n.x-=1*v:this.rightToLeft&&(n.x+=1*v));0!==n.y&&n.y<this._ptScrl.y&&this._root.clientHeight-n.y<this._root.scrollHeight&&(n.y-=1*y);this.scrollPosition=n;if(i){this._updateScrollPosition();this._forceScrollUpdate=!1;this.refresh()}this._spDiff.x=this._ptScrl.x-n.x;this._spDiff.y=this._ptScrl.y-n.y;this._showAutoTipTimer=setTimeout((function(){var e=wijmo_1.getActiveElement();e.classList.contains(wijmo_1.ControlStateClsNames.invalid)&&o.errorTip._showAutoTip(void 0,e)}),50);return!0}if(e>-1&&t>-1){var b=this._root,R=b.scrollWidth==b.clientWidth,x=b.scrollHeight==b.clientHeight;if(R||x){var S=wijmo_1.getScrollableParent(this.hostElement);if(S.clientHeight==S.scrollHeight&&S.clientWidth==S.scrollWidth)return!1;var E=wijmo_1.getOffsetFromAncestor(this.hostElement,S),j=this.cells.getCellElement(e,t),H=d||new CellRange(e,t),F=H.getRenderSize(this.cells),z=this.rows[H.topRow].pos+this._eCHdr.clientHeight,T=this.columns[H.leftCol].pos+this._eRHdr.clientWidth,M=j?j.clientWidth:F.width,G=j?j.clientHeight:F.height,I=z+E.top,P=T+E.left,A=I+G,D=P+M,L=S.clientWidth,O=S.clientHeight,N=S.scrollTop,V=S.scrollLeft,k=N+O,B=V+L;this.stickyHeaders&&(N+=this._eCHdr.clientHeight-1);this.rightToLeft&&(P=(D=E.left+b.clientWidth-this._eRHdr.clientWidth-this.columns[H.leftCol].pos)-M);if(N<=I&&A<=k&&V<=P&&D<=B)return!1;var W=0,K=0;x&&(N>I?K=I-N:k<A&&(K=A-k));R&&(V>P?W=P-V:B<D&&(W=D-B));S.scrollBy(W,K);if(W||K){i&&(this._isSilentScroll=!0);return!0}}}return!1};FlexGrid.prototype.isRangeValid=function(e){return e&&e.isValid&&e.bottomRow<this.rows.length&&e.rightCol<this.columns.length};FlexGrid.prototype.startEditing=function(e,t,i,o,n){void 0===e&&(e=!0);return this._edtHdl.startEditing(e,t,i,o,n)};FlexGrid.prototype.finishEditing=function(e){return this._edtHdl.finishEditing(e)};Object.defineProperty(FlexGrid.prototype,"activeCell",{get:function(){return this._activeCell},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activeEditor",{get:function(){var e=this._edtHdl;return e?e.activeEditor:null},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editRange",{get:function(){var e=this._edtHdl&&this._edtHdl.editRange;return e?e.clone():null},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"mergeManager",{get:function(){return this._mrgMgr},set:function(e){if(e!=this._mrgMgr){this._mrgMgr=wijmo_1.asType(e,MergeManager,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"overlayManager",{get:function(){return this._oMgr},set:function(e){if(e!=this._oMgr){this._oMgr=wijmo_1.asType(e,OverlayManager,!0);this.invalidate()}},enumerable:!0,configurable:!0});FlexGrid.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._mrgMgr?this._mrgMgr.getMergedRange(e,t,i,o):null};Object.defineProperty(FlexGrid.prototype,"keyActionTab",{get:function(){return this._keyHdl._kaTab},set:function(e){this._keyHdl._kaTab=wijmo_1.asEnum(e,KeyAction)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"keyActionEnter",{get:function(){return this._keyHdl._kaEnter},set:function(e){this._keyHdl._kaEnter=wijmo_1.asEnum(e,KeyAction)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveWhiteSpace",{get:function(){return wijmo_1.hasClass(this.hostElement,FlexGrid._WJS_WSPRE)},set:function(e){wijmo_1.toggleClass(this.hostElement,FlexGrid._WJS_WSPRE,wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showDropDown",{get:function(){return this._shDropDown},set:function(e){if(e!=this._shDropDown){this._shDropDown=wijmo_1.asBoolean(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});FlexGrid.prototype.toggleDropDownList=function(){if(!this._tglDropDown){this._tglDropDown=!0;this._edtHdl._toggleListBox(null);this._tglDropDown=!1}return null!=this._edtHdl._lbx};Object.defineProperty(FlexGrid,"defaultTypeWidth",{get:function(){return FlexGrid._defTypeWidth},enumerable:!0,configurable:!0});FlexGrid.prototype.onItemsSourceChanging=function(e){this.itemsSourceChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};FlexGrid.prototype.onScrollPositionChanged=function(e){this.scrollPositionChanged.raise(this,e);if(this._isServerCollectionView(this.collectionView)){var t=this.collectionView;if(t._virtualization&&t.groupDescriptions.length>0){var i=this.showGroups?this._getGroupCount(this.viewRange.row):0;t.setWindow(Math.floor((this.viewRange.row-i)/this._getRowsPerItem()),Math.ceil((this.viewRange.row2-i)/this._getRowsPerItem()))}t._virtualization&&0==t.groupDescriptions.length&&t.setWindow(Math.floor(this.viewRange.row/this._getRowsPerItem()),Math.ceil(this.viewRange.row2/this._getRowsPerItem()))}};FlexGrid.prototype.onSelectionChanging=function(e){this.selectionChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onSelectionChanged=function(e){this.selectionChanged.raise(this,e)};FlexGrid.prototype.onLoadingRows=function(e){this.loadingRows.raise(this,e);return!e.cancel};FlexGrid.prototype.onLoadedRows=function(e){this.loadedRows.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onUpdatingLayout=function(e){this.updatingLayout.raise(this,e);return!e.cancel};FlexGrid.prototype.onUpdatedLayout=function(e){this.updatedLayout.raise(this,e)};FlexGrid.prototype.onResizingColumn=function(e){this.resizingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onResizedColumn=function(e){this.resizedColumn.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onAutoSizingColumn=function(e){this.autoSizingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onAutoSizedColumn=function(e){this.autoSizedColumn.raise(this,e)};FlexGrid.prototype.onStarSizedColumns=function(e){this.starSizedColumns.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onDraggingColumn=function(e){this.draggingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggingColumnOver=function(e){this.draggingColumnOver.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggedColumn=function(e){this.draggedColumn.raise(this,e)};FlexGrid.prototype.onPinningColumn=function(e){this.pinningColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onPinnedColumn=function(e){this.pinnedColumn.raise(this,e)};FlexGrid.prototype.onResizingRow=function(e){this.resizingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onResizedRow=function(e){this.resizedRow.raise(this,e)};FlexGrid.prototype.onAutoSizingRow=function(e){this.autoSizingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onAutoSizedRow=function(e){this.autoSizedRow.raise(this,e)};FlexGrid.prototype.onDraggingRow=function(e){this.draggingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggingRowOver=function(e){this.draggingRowOver.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggedRow=function(e){this.draggedRow.raise(this,e)};FlexGrid.prototype.onGroupCollapsedChanging=function(e){this._isGrpClpsChanging||this.groupCollapsedChanging.raise(this,e);if(!e.cancel){if(this._isServerCollectionView(this.collectionView)){var t=this.collectionView,i=this.rows[e.row];!this.isUpdating&&t.groupLazyLoading&&this.preserveOutlineState&&t._updateExpandedGroups(i.dataItem,i.isCollapsed);t.groupLazyLoading&&i.isCollapsed&&Object.keys(i.dataItem.items[0]).length<=t.groupDescriptions.length&&!this._isGrpClpsChanging&&t.lazyLoadGroup(i.dataItem)}}return!e.cancel};FlexGrid.prototype.onGroupCollapsedChanged=function(e){this._isGrpClpsChanging||this.groupCollapsedChanged.raise(this,e);if(this._isServerCollectionView(this.collectionView)){if(this._cv._virtualization){var t=this.selection;t&&t.row>-1&&!this._grpClpsChng&&this._loadVirtualItems(t,e);if(t&&-1==t.row){t=e.range;this._loadVirtualItems(t,e)}}}};FlexGrid.prototype._loadVirtualItems=function(e,t){var i=this.collectionView,o=this.viewRange,n=Math.floor((e.row-this._getGroupCount(e.row))/this._getRowsPerItem()+(this.rows[t.row].isCollapsed?this.rows[e.row].dataItem.items.length:0)),r=Math.ceil((o.row2-this._getGroupCount(o.row2))/this._getRowsPerItem());if(n<=r&&i._isVirtualRefreshNeeded(n,r)){this._isGrpClpsChanging=!0;i.setWindow(n,r)}};FlexGrid.prototype._getGroupCount=function(e){for(var t=0,i=0;i<e;i++)this.rows[i]instanceof GroupRow&&t++;return t++};FlexGrid.prototype.onColumnGroupCollapsedChanging=function(e){this.columnGroupCollapsedChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onColumnGroupCollapsedChanged=function(e){this.columnGroupCollapsedChanged.raise(this,e)};FlexGrid.prototype.onSortingColumn=function(e){this.sortingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onSortedColumn=function(e){this.sortedColumn.raise(this,e)};FlexGrid.prototype.onBeginningEdit=function(e){this._addHdl._beginningEdit(this,e);e.cancel||this.beginningEdit.raise(this,e);return!e.cancel};FlexGrid.prototype.onPrepareCellForEdit=function(e){this.prepareCellForEdit.raise(this,e)};FlexGrid.prototype.onCellEditEnding=function(e){this.cellEditEnding.raise(this,e);return!e.cancel&&!e.stayInEditMode};FlexGrid.prototype.onCellEditEnded=function(e){this.cellEditEnded.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onRowEditStarting=function(e){this._addHdl._rowEditStarting(this,e);e.cancel||this.rowEditStarting.raise(this,e);return!e.cancel};FlexGrid.prototype.onRowEditStarted=function(e){this.rowEditStarted.raise(this,e)};FlexGrid.prototype.onRowEditEnding=function(e){this._addHdl._rowEditEnding(this,e);this.rowEditEnding.raise(this,e)};FlexGrid.prototype.onRowEditEnded=function(e){this.rowEditEnded.raise(this,e);this._addHdl._rowEditEnded(this,e);this._autoRowHeights()};FlexGrid.prototype.onRowAdded=function(e){this.rowAdded.raise(this,e);return!e.cancel};FlexGrid.prototype.onDeletingRow=function(e){this.deletingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onDeletedRow=function(e){this.deletedRow.raise(this,e)};FlexGrid.prototype.onCopying=function(e){this.copying.raise(this,e);return!e.cancel};FlexGrid.prototype.onCopied=function(e){this.copied.raise(this,e)};FlexGrid.prototype.onPasting=function(e){this.pasting.raise(this,e);return!e.cancel};FlexGrid.prototype.onPasted=function(e){this.pasted.raise(this,e)};FlexGrid.prototype.onPastingCell=function(e){this.pastingCell.raise(this,e);return!e.cancel};FlexGrid.prototype.onPastedCell=function(e){this.pastedCell.raise(this,e)};FlexGrid.prototype.onFormatItem=function(e){this.formatItem.raise(this,e)};FlexGrid.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e);return!e.cancel};FlexGrid.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};FlexGrid.prototype.onGettingCellClipString=function(e){this.gettingCellClipString.raise(this,e)};FlexGrid.prototype.getMergedRangeRawData=function(e,t,i,o){void 0===o&&(o=!0);return this._mrgMgr?softMultirow()&&this instanceof softMultirow().MultiRow||softTransposed()&&this instanceof softTransposed().TransposedGrid||softTransposedMultirow()&&this instanceof softTransposedMultirow().TransposedMultiRow?this._mrgMgr.getMergedRange(e,t,i,o):this._mrgMgr._getMergedRange?this._mrgMgr._getMergedRange(e,t,i,o,!1):this._mrgMgr.getMergedRange(e,t,i,o):null};FlexGrid.prototype._createSelHdl=function(){return new _SelectionHandler(this)};FlexGrid.prototype._getTabIndex=function(){return this._orgTabIndex};FlexGrid.prototype._setTabOrder=function(e){this._orgTabIndex=e;this._updateTabIndex()};FlexGrid.prototype._updateTabIndex=function(){var e=this.isDisabled?-1:this._orgTabIndex,t=this._imeHdl;t&&t._updateImeFocus();var i=this._activeCell,o=this._root,n=this._eFocus;if(i){i.tabIndex=e;n.tabIndex=-1;o.tabIndex=-1}else if(this.selectionMode!=SelectionMode.None){n.tabIndex=e;o.tabIndex=-1}else{o.tabIndex=e;n.tabIndex=-1}};FlexGrid.prototype._autoRowHeights=function(){var e=this;if(this._autoHeights){this.rows.length>100&&[this.columnHeaders,this.rowHeaders].forEach((function(e){e._updateContent(!0,!1,e._getOffsetY())}));clearTimeout(this._toAutoHeights);this._toAutoHeights=setTimeout((function(){e._toAutoHeights=null;e.editRange||e._autoSizeRows()}),wijmo_1.Control._REFRESH_INTERVAL)}};FlexGrid.prototype._autoSizeRows=function(){var e=this.autoSizeMode,t=AutoSizeMode;if(e&t.Headers){this._autoSizeMode=t.Both;this.autoSizeRows(0,this.columnHeaders.rows.length-1,!0);this._autoSizeMode=e}e&t.Cells&&this.autoSizeRows()};FlexGrid.prototype._getShowErrors=function(){return this.showErrors&&this._hasValidation};FlexGrid.prototype._getHasValidation=function(){return this._hasValidation};FlexGrid.prototype._getError=function(e,t,i,o){if(wijmo_1.isFunction(this.itemValidator)){if(e==this.cells)return this.itemValidator(t,i,o);if(e==this.rowHeaders){var n=e.rows,r=this.columns,l=n[t].dataItem,s=null,a=[],d=t;if(g=this.getMergedRange(e,t,i,!1)){for(t=d=g.row;t<n.length&&(n[t].dataItem==l||g&&g.rowSpan>1&&g.row2>=t);t++)for(var c=0;c<r.length;c++)if(s=this.itemValidator(t,c,!1)){(C=this.getMergedRange(this.cells,t,c))&&(C.columnSpan>1&&C.col<c||C.rowSpan>1&&C.row<t)||a.push(s)}}else for(c=0;c<this.columns.length;c++){var u=this.itemValidator(t,c,!1);u&&a.push(u)}if(a.length){var h=!!(v=this.errorTip)&&v.isContentHtml;s=a.join(h?"<br/>":"\n")}return s}}var _=this._cv,p=_?_.getError:null;if(wijmo_1.isFunction(p)){n=e.rows,r=this.columns;if((l=n[t].dataItem)&&!(l instanceof wijmo_1.CollectionViewGroup))if(e==this.cells)for(;t<n.length&&n[t].dataItem==l;t++){return p(l,(f=this._getBindingColumn(this.cells,t,r[i])).binding,o)}else if(e==this.rowHeaders){if(!(s=p(l,null,!1))){var g;a=[],d=t;(g=this.getMergedRange(e,t,i,!1))&&(d=g.row);for(t=d;t<n.length&&(n[t].dataItem==l||g&&g.rowSpan>1&&g.row2>=t);t++)for(c=0;c<r.length;c++){var f=this._getBindingColumn(this.cells,t,r[c]),m=n[t].dataItem,w=m&&f&&f.binding?f._binding.getValue(m):null;if(s=f.binding&&m&&f.getIsRequired(n[t])&&this.editRange&&this.editRange.containsRow(t)&&(null==w||""===w)?this._edtHdl._getRequiredMsg():p(m,f.binding,!1)){var C;(C=this.getMergedRange(this.cells,t,c))&&(C.columnSpan>1&&C.col<c||C.rowSpan>1&&C.row<t)||a.push(s)}}if(a.length){var v;h=!!(v=this.errorTip)&&v.isContentHtml;s=a.join(h?"<br/>":"\n")}}return s}}return null};FlexGrid.prototype._setAria=function(e,t){var i=this._gridRoleElement();i&&wijmo_1.setAttribute(i,e,t)};FlexGrid.prototype._setFocus=function(e){if(this.hostElement){var t=wijmo_1.getActiveElement(),i=this.activeEditor,o=this._activeCell,n=this._eFocus,r=this._root,l=this._getTabIndex(),s=this.containsFocus();if(!e&&s&&this.selectionMode!=SelectionMode.None){if(this.rows.length>0&&this.selection.row>=0&&this.selection.col>=0){var a=this._getBindingColumn(this.cells,this.selection.row,this.columns[this.selection.col]),d=a&&a._edt;this._isInputElement(t)||!o||wijmo_1.contains(o,t)||this.imeEnabled||d||this._correctFocusOfActiveCell(o)}}else if(e||!s){if(i){if(!wijmo_1.contains(i,t)){i.focus();n.tabIndex=-1;r.tabIndex=-1}}else if(o)wijmo_1.contains(o,t)||this._correctFocusOfActiveCell(o);else if(!wijmo_1.contains(n,t)&&t!=r)if(this.selectionMode!=SelectionMode.None){n.tabIndex=l;this._setFocusNoScroll(n)}else{r.tabIndex=l;this._setFocusNoScroll(r)}if(!this.containsFocus())if(this.selectionMode!=SelectionMode.None){n.tabIndex=l;this._setFocusNoScroll(n)}else{r.tabIndex=l;this._setFocusNoScroll(r)}}}};FlexGrid.prototype._correctFocusOfActiveCell=function(e){var t=this._getTabIndex();if(wijmo_1.getActiveElement()!=this._root){wijmo_1.isIE()&&wijmo_1.hasClass(e,exports.FlexGridClsNames.group)&&(e=e.querySelector("."+CellFactory._WJC_COLLAPSE)||e);e.tabIndex=t}else e.tabIndex=t;this._setFocusNoScroll(e);this._eFocus.tabIndex=-1};FlexGrid.prototype._setFocusNoScroll=function(e){if(wijmo_1.getActiveElement()!=e){if(wijmo_1.supportsFocusOptions())this._imeHdl&&this._imeHdl._handlingCompositionStart||e.focus({preventScroll:!0});else{var t=this.scrollPosition,i=e.style,o=i.position;i.position="fixed";e.focus();i.position=o;this.scrollPosition=t}this._fixScroll()}};FlexGrid.prototype._clearAnchorCell=function(){this._anchorCell=null};FlexGrid.prototype._setAnchorCell=function(e,t){var i=this.getMergedRange(this.cells,e,t);this._anchorCell=i?new wijmo_1.Point(i.col,i.row):new wijmo_1.Point(t,e)};FlexGrid.prototype._getAnchorCell=function(){return this._anchorCell};FlexGrid.prototype._updateDefaultSizes=function(){var e=this._getDefaultRowHeight();this._rows._setDefaultSize(e);this._cols._setDefaultSize(4*e);this._hdrRows._setDefaultSize(e);this._hdrCols._setDefaultSize(Math.round(1.25*e));this._ftrRows._setDefaultSize(e);return e};FlexGrid.prototype._getDefaultRowHeight=function(){var e=this.hostElement,t=this._eFocus,i=null;if(!t.offsetHeight){i=wijmo_1.createElement('<div><div class="'+exports.FlexGridClsNames.cell+'">0</div></div>',document.body);e&&i.setAttribute("class",e.getAttribute("class"));t=i.children[0]}var o=t.offsetHeight;(isNaN(o)||o<=6)&&(o=28);wijmo_1.removeChild(i);return o};FlexGrid.prototype._getCollectionView=function(e){return wijmo_1.asCollectionView(e)};FlexGrid.prototype._getCanvasContext=function(){var e=document.createElement("canvas").getContext("2d"),t=getComputedStyle(this.hostElement);e.font=t.fontSize+" "+t.fontFamily.split(",")[0];return e};FlexGrid.prototype._getWidestRow=function(e,t,i,o){for(var n=0,r=0,l=1===this._getRowsPerItem()&&e.columns[i].dataType==wijmo_1.DataType.Boolean,s=t.row;s<=t.row2;s++)if(e.rows[s].isVisible){var a=e.getCellData(s,i,!0),d=o.measureText(a).width,c=this.getMergedRange(e,s,i,!1);c&&c.columnSpan>1&&(d/=c.columnSpan);if(d>r){r=d;n=s}if(l)break;s+=c?c.rowSpan-1:0}return n};FlexGrid.prototype._getDesiredWidth=function(e,t,i,o){var n=this.getMergedRange(e,t,i,!1),r=o.style;this.cellFactory.updateCell(e,t,i,o,n);r.width=r.top=r.left="";return o.offsetWidth/(n&&n.columnSpan>1?n.columnSpan:1)};FlexGrid.prototype._getDesiredHeight=function(e,t,i,o){var n=o.style,r=this.getMergedRange(e,t,i,!1),l=r?r.rowSpan:1;this.cellFactory.updateCell(e,t,i,o,r);var s=o.innerHTML,a=this.cachedHeights[s],d=s.trim();if(!d||"<div></div>"===d){s=" ";var c=o;if(null==(a=this.cachedHeights[s])){d?c.firstElementChild.innerHTML=s:c.innerHTML=s;c.style.height=c.style.top=c.style.left=""}if(!e.rows[t].wordWrap&&!e.columns[i].wordWrap){if(-1==this.cachedDefaultHeight){n.height=n.top=n.left="";this.cachedDefaultHeight=c.offsetHeight}this.cachedHeights[s]=this.cachedDefaultHeight;return this.cachedDefaultHeight/l}}if(null==a||a<o.scrollHeight){n.height=n.top=n.left="";this.cachedHeights[s]=o.offsetHeight}return this.cachedHeights[s]/l};FlexGrid.prototype._getDesiredRowHeight=function(e,t,i,o){for(var n=0,r=(e.rows[t],this._getQuickAutoSize()),l=0;l<e.columns.length;l++){if(e.columns[l].isVisible){var s=this.getMergedRange(e,t,l,!1),a=void 0;if(r){var d={ct:e.cellType,col:l,spr:s&&s.rowSpan>1?s.rowSpan:1,spc:s&&s.columnSpan>1?s.columnSpan:1,data:e.getCellData(t,l,!0)||"1"},c=JSON.stringify(d);if(null==(a=o[c])){a=this._getDesiredHeight(e,t,l,i);o[c]=a}}else a=this._getDesiredHeight(e,t,l,i);n=Math.max(a,n);l+=s?s.columnSpan-1:0}}return n};FlexGrid.prototype._getSortRowIndex=function(){return null!=this._sortRowIndex?this._sortRowIndex:this.columnHeaders.rows.length-1};FlexGrid.prototype._getDeleteColumnIndex=function(){return 0};FlexGrid.prototype._getEditColumnIndex=function(){return null!=this._editColIndex?this._editColIndex:this.rowHeaders.columns.length-1};FlexGrid.prototype._sortConverter=function(e,t,i,o){var n,r=this;if(o){this._mappedColumns=null;this._cv&&this._cv.sortDescriptions.forEach((function(e){if((n=r.getColumn(e.property))&&n.dataMap){r._mappedColumns||(r._mappedColumns={});r._mappedColumns[n.binding]=n.dataMap}}));if(this._mouseHdl._htDown&&this._mouseHdl._htDown.col>-1){n=this.columns[this._mouseHdl._htDown.col];this._mappedColumns&&n.dataMap&&(this._mappedColumns[n.binding]=n.dataMap)}}if(this._mappedColumns){var l=this._mappedColumns[e.property];l&&l.sortByDisplayValues&&(i=l.getDisplayValue(i))}return i};FlexGrid.prototype._bindGrid=function(e){var t=this;this.finishEditing();this.deferUpdate((function(){t.autoGenerateColumns&&0==t._lastCount&&wijmo_1.hasItems(t._cv)&&(e=!0);var i;t.preserveSelectedState&&(i=t._getMap())&&t.rows.forEach((function(e){e.isSelected&&e.dataItem&&i.set(e.dataItem,!0)}));var o=null,n=t.selection&&t.rows&&(t.rows[t.selection.row]instanceof GroupRow||t.rows[t.selection.row2]instanceof GroupRow);if(t.preserveSelectedState&&!t._isSourceChanging&&t._cv&&n){var r=t.selection,l=t.rows[t.selection.row]instanceof GroupRow?t.selection.row:t.selection.row2;r.row>-1&&t.rows[l]&&(o=t.rows[l].dataItem)}var s,a=t._getMap();a&&t.rows.forEach((function(e){e.isReadOnly&&e.dataItem&&a.set(e.dataItem,!0)}));if(t.preserveOutlineState&&t.rows.maxGroupLevel>-1&&(s=t._getMap()))for(var d=0;d<t.rows.length;d++){var c=t.rows[d];if(c instanceof GroupRow&&c.isCollapsed&&c.dataItem){var u=c.dataItem;u instanceof wijmo_1.CollectionViewGroup&&(u=u._path);s.set(u,!0);t._collapsedGroups||(t._collapsedGroups=t._getMap());t._collapsedGroups&&t._collapsedGroups.set(u,!0)}}e&&t.columns.deferUpdate((function(){t._bindColumns()}));var h=new wijmo_1.CancelEventArgs;if(t.onLoadingRows(h)){t.rows.deferUpdate((function(){t._bindRows()}));t.onLoadedRows(h)}t._selHdl.extendedSelection.clear();var _=0;i&&i.size&&t.rows.forEach((function(e){var t=e.dataItem;if(t&&i.has(t)){e.isSelected=!0;_++}}));a&&a.size&&t.rows.forEach((function(e){var t=e.dataItem;t&&a.has(t)&&(e.isReadOnly=!0)}));if(0==_&&t.selectionMode==SelectionMode.ListBox)for(d=(r=t.selection).topRow;d<=r.bottomRow&&d>-1&&d<t.rows.length;d++)t.rows[d]._setFlag(RowColFlags.Selected,!0,!0);if(t._cv&&n&&o){var p=!1;for(r=t.selection.clone(),l=0;l<t.rows.length;l++)if(t.rows[l].dataItem===o){r.row=r.row2=l;p=!0;break}if(!p){r.row=-1;r.row2=-1}t._selHdl._adjustSelection(r,t.selectionMode,e&&!t._toInv)}if(s&&s.size){t._cv&&t._cv.groupOnServer&&t._cv._virtualization&&(t._isGrpClpsChanging=!0);t.rows.deferUpdate((function(){t.rows.forEach((function(e){if(e instanceof GroupRow){var t=e.dataItem;t instanceof wijmo_1.CollectionViewGroup&&(t=t._path);s.has(t)&&(e.isCollapsed=!0)}}))}));t._cv&&t._cv.groupOnServer&&t._cv._virtualization&&(t._isGrpClpsChanging=!1)}if(!t._lastCount){var g=t._cv;g&&g.items&&(t._lastCount=g.items.length)}}));if(this._cv){var i=e&&!this._toInv;this.activePanelType===CellType.Cell&&this._syncSelection(i)}else{var o=this.selection,n=new CellRange(-1,o.col,-1,o.col2);this.activePanelType===CellType.Cell&&this._selHdl._adjustSelection(n,this.selectionMode)}};FlexGrid.prototype._getMap=function(){return window.Map?new Map:null};FlexGrid.prototype._saveCollapsedState=function(){if(this.preserveOutlineState&&-1!==this.rows.maxGroupLevel){this._collapsedGroups||(this._collapsedGroups=this._getMap());for(var e=0;e<this.rows.length;e++){var t=this.rows[e];if(t instanceof GroupRow&&t.dataItem){var i=t.dataItem;i instanceof wijmo_1.CollectionViewGroup&&(i=i._path);t.isCollapsed?this._collapsedGroups.set(i,!0):this._collapsedGroups.delete(i)}}}};FlexGrid.prototype._restoreCollapsedState=function(){var e=this;if(this.preserveOutlineState&&this._collapsedGroups){var t=this._isServerCollectionView(this._cv);t&&this._cv&&this._cv.groupOnServer&&this._cv._virtualization&&(this._isGrpClpsChanging=!0);this.rows.deferUpdate((function(){e.rows.forEach((function(t){if(t instanceof GroupRow&&t.dataItem){var i=t.dataItem;i instanceof wijmo_1.CollectionViewGroup&&(i=i._path);t.isCollapsed=e._collapsedGroups.has(i)}}))}));t&&this._cv&&this._cv.groupOnServer&&this._cv._virtualization&&(this._isGrpClpsChanging=!1)}};FlexGrid.prototype._updateAllGroupsCollapseState=function(e,t,i){if(e&&this._collapsedGroups)for(var o=0;o<e.length;o++){var n=e[o],r=n._path;i>=t?this._collapsedGroups.set(r,!0):this._collapsedGroups.delete(r);n.groups&&n.groups.length>0&&this._updateAllGroupsCollapseState(n.groups,t,i+1)}};FlexGrid.prototype._cvCollectionChanged=function(e,t){this._isSourceChanging=!0;if(this.autoGenerateColumns&&0==this.columns.length){this._bindGrid(!0);this._isSourceChanging=!1}else{var i=wijmo_1.NotifyCollectionChangedAction;if(this.childItemsPath&&t.action!=i.Change){this._bindGrid(!1);this._isSourceChanging=!1}else{switch(t.action){case i.Change:this.invalidate();return;case i.Add:if(t.index==this._cv.items.length-1){var o=this.rows.length;this.rows[o-1]instanceof _NewRowTemplate&&o--;this.rows.insert(o,new Row(t.item));return}wijmo_1.assert(!1,"added item should be the last one.");break;case i.Remove:var n=this._findRow(t.item);if(n>-1){this.rows.removeAt(n);this._syncSelection(!1);return}wijmo_1.assert(!1,"removed item not found on grid.")}this._bindGrid(!1);this._isSourceChanging=!1}}};FlexGrid.prototype._cvCurrentChanged=function(e,t){this._syncSelection(!1)};FlexGrid.prototype._syncSelection=function(e){if(this._cv&&this.selectionMode!=SelectionMode.None){var t=this._selHdl,i=t.selection,o=i.row>-1&&i.row<this.rows.length?this.rows[i.row]:null,n=o?o.dataItem:null,r=this._cv;if(r instanceof wijmo_1.CollectionView&&r.isUpdating)return;if(this.newRowAtTop&&o instanceof _NewRowTemplate)return;n instanceof wijmo_1.CollectionViewGroup&&(n=null);var l=this._isISChanging;if(e||n!=r.currentItem||l&&i.row!==i.row2||i.row>=this.rows.length||i.row2>=this.rows.length||(0!==i.col||0!==i.col2)&&(i.col>=this.columns.length||i.col2>=this.columns.length)){var s=this.editableCollectionView;if(!this.childItemsPath||!s||!s.currentAddItem){var a=this._getRowIndex(r.currentPosition),d=this.getMergedRange(this._activePanel,a,i.col,!1);if(!(null!=d&&d._row<=i.row&&d._row2>=i.row2||a==i.row&&this.childItemsPath)){var c=l?i.col:i.col2;i=-1!==a&&(i.col>=this.columns.length||i.col2>=this.columns.length)?new CellRange(a,0):new CellRange(a,i.col,a,c);t._adjustSelection(i,this.selectionMode);this.selectionMode&&!this._updating&&this.scrollIntoView(i.row,-1)}}}}};FlexGrid.prototype._getRowIndex=function(e){if(this._cv){var t=this.rows;if(e>-1){for(var i=this._cv.items[e];e<t.length;e++)if(t[e].dataItem===i)return e;return-1}if(1==t.length&&t[0]instanceof _NewRowTemplate)return 0;var o=this.selection.row,n=o>-1?t[o]:null;return n&&(n instanceof GroupRow||null==n.dataItem)?o:-1}return this.selection.row};FlexGrid.prototype._getCvIndex=function(e){return e>-1&&e<this.rows.length?this.rows[e].dataIndex:-1};FlexGrid.prototype._findRow=function(e){for(var t=0;t<this.rows.length;t++)if(this.rows[t].dataItem==e)return t;return-1};FlexGrid.prototype._preWidth=function(){var e=this._root,t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0;return e.clientWidth-t};FlexGrid.prototype._updateLayout=function(){var e=new wijmo_1.CancelEventArgs;if(this.onUpdatingLayout(e)){var t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0,i=this._hdrVis&HeadersVisibility.Column?this._hdrRows.getTotalSize():0,o=this._ftrRows.getTotalSize(),n=this._rows.getTotalSize()+o;n<1&&(n=1);this._heightReal=n;this._heightBrowser=Math.min(n,FlexGrid._getMaxSupportedCssHeight());this._maxOffsetY=Math.max(0,n-this._heightBrowser);this.rows.length||wijmo_1.setCss(this._eSz,{height:"0px"});var r=this.overlayManager.updateNoDataOverlay(this,this._eNoData),l=getComputedStyle(this._eFocus);this._cellPadVert=parseInt(l.paddingTop)+parseInt(l.paddingBottom);this._cellPadHorz=parseInt(l.paddingLeft)+parseInt(l.paddingRight);this._cellPadLeft=parseInt(this.rightToLeft?l.paddingRight:l.paddingLeft);var s=this._heightBrowser+i-o,a=this._gpCells.width,d=this._heightBrowser;!a&&this.rows.length&&(a=.1);!d&&this.columns.length&&(d=.1);if(this.rightToLeft){wijmo_1.setCss(this._eTL,{right:0,top:0,width:t,height:i});wijmo_1.setCss(this._eCHdr,{right:t,top:0,height:i});wijmo_1.setCss(this._eRHdr,{right:0,top:i,width:t});wijmo_1.setCss(this._eCt,{right:t,top:i,width:a,height:d});wijmo_1.setCss(this._fCt,{right:t,top:i});wijmo_1.setCss(this._eBL,{right:0,top:s,width:t,height:o});wijmo_1.setCss(this._eCFtr,{right:t,top:s,height:o})}else{wijmo_1.setCss(this._eTL,{left:0,top:0,width:t,height:i});wijmo_1.setCss(this._eCHdr,{left:t,top:0,height:i});wijmo_1.setCss(this._eRHdr,{left:0,top:i,width:t});wijmo_1.setCss(this._eCt,{left:t,top:i,width:a,height:d});wijmo_1.setCss(this._fCt,{left:t,top:i});wijmo_1.setCss(this._eBL,{left:0,top:s,width:t,height:o});wijmo_1.setCss(this._eCFtr,{left:t,top:s,height:o})}this._stickyHdr&&this._updateStickyHeaders();var c=this.rows._frozenInternal||this.columns._frozenInternal;wijmo_1.setCss([this._eTL,this._eBL,this._eCFtr,this._eRHdr],{zIndex:c?"4":"3"});wijmo_1.setCss(this._eCHdr,{zIndex:c?"5":"3"});wijmo_1.setCss(this._eMarquee,{zIndex:c?"4":"1"});this._eCHdr.closest("."+exports.FlexGridClsNames.cell)&&wijmo_1.setCss(this._eCHdr,{zIndex:c?"5":"2"});wijmo_1.isIE()&&(this._fCt.style.zIndex=c?"3":"");var u=this._root,h=u.offsetWidth-u.clientWidth,_=u.offsetHeight-u.clientHeight;wijmo_1.setCss(this._eSz,{width:t+h+this._gpCells.width,height:i+_+this._heightBrowser+r});var p=null;if(this.columns._updateStarSizes(u.clientWidth-t)){p=u.clientWidth;wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this.onStarSizedColumns()}this._szClient=new wijmo_1.Size(u.clientWidth-t,u.clientHeight-i);this._szClientSB=new wijmo_1.Size(u.offsetWidth-t,u.offsetHeight-i);this._rcBounds=null;this._updateScrollHandler();this._updateContent(!1);h=u.offsetWidth-u.clientWidth;_=u.offsetHeight-u.clientHeight;wijmo_1.setCss(this._eSz,{width:t+h+this._gpCells.width,height:i+_+this._heightBrowser+r});var g=new wijmo_1.Size(this._szClient.width,this._szClient.height);this._szClient=new wijmo_1.Size(u.clientWidth-t,u.clientHeight-i);!(this.columns._frozenInternal<0||this.rows._frozenInternal<0)||g.width==this._szClient.width&&g.height==this._szClient.height||this._updateContent(!1);if(p&&p!=u.clientWidth&&this.columns._updateStarSizes(u.clientWidth-t)){wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this._updateContent(!1)}wijmo_1.setCss([this._eCHdr,this._eCFtr,this._fCt],{width:this._szClient.width});wijmo_1.setCss([this._eRHdr,this._fCt],{height:this._szClient.height});if(o){s=Math.min(s,this._szClient.height+i-o);wijmo_1.setCss([this._eBL,this._eCFtr],{top:s})}this._alignTheTail(this.rows);this._alignTheTail(this.columns);this.onUpdatedLayout(e)}};FlexGrid.prototype.handleLoad=function(){var e=this._mainContainer||this._root.parentElement,t=this._root.style.overflowX,i=this._root.style.overflowY;wijmo_1.setCss(this._root,{"overflow-y":0!=this._root.scrollHeight&&this._root.scrollHeight===e.clientHeight?"hidden":"auto","overflow-x":0!=this._root.scrollWidth&&this._root.scrollWidth===e.clientWidth?"hidden":"auto"});t==this._root.style.overflowX&&i==this._root.style.overflowY||this.invalidate()};FlexGrid.prototype._updateStickyHeaders=function(){var e=!1,t=0;if(this._stickyHdr){for(var i=0,o=null,n=this.hostElement;n;n=n.parentElement)if("inline"!=getComputedStyle(n).display){var r=n.getBoundingClientRect();null==o&&(o=r.top);i=Math.max(i,r.top)}t=-(o=Math.max(0,i-o-1));e=o>0;this._rcBounds=null}this._eTL.style.top=this._eCHdr.style.top=e?-t+"px":"";wijmo_1.toggleClass(this._eTL,FlexGrid._WJS_STICKY,e);wijmo_1.toggleClass(this._eCHdr,FlexGrid._WJS_STICKY,e)};FlexGrid.prototype._updateScrollHandler=function(){this._clipToScreen=this._getClipToScreen();var e=this._stickyHdr||this._clipToScreen;if(e!=this._scrollHandlerAttached){this._scrollHandlerAttached=e;e?this.addEventListener(window,"scroll",this._scroll.bind(this),!0):this.removeEventListener(window,"scroll")}};FlexGrid.prototype._getClipToScreen=function(){if(this.rows.length<=FlexGrid._MIN_VIRT_ROWS)return!1;if(this._root.scrollHeight>this._root.clientHeight)return!1;for(var e=this.hostElement;e&&e!=document.documentElement;e=e.parentElement){if("auto"==getComputedStyle(e).overflow)return!1}return!0};FlexGrid.prototype._scroll=function(e){var t=this;if(wijmo_1.contains(e.target,this.hostElement)){if(this._clipToScreen){var i=this;this._afClip&&cancelAnimationFrame(this._afClip);this._afClip=requestAnimationFrame((function(){if(i._isSilentScroll)queueMicrotask((function(){return i._isSilentScroll=!1}));else{t._afClip=null;t.finishEditing();t._updateContent(!0)}}))}if(this._stickyHdr){var o=Date.now();if(o-this._lastStickyScroll>this._scrollStickyThrottleTimeout){this._afSticky&&cancelAnimationFrame(this._afSticky);this._afSticky=requestAnimationFrame((function(){t._afSticky=null;var e=new wijmo_1.CancelEventArgs;if(t.onUpdatingLayout(e)){t._updateStickyHeaders();t.onUpdatedLayout(e)}}));this._lastStickyScroll=o}this._handleScrollEnd()}}};FlexGrid.prototype._getCssPage=function(e){if(this._heightReal>this._heightBrowser){var t=this._szClient.height-this._gpCFtr.rows.getTotalSize();if(this._heightBrowser>t)return wijmo_1.clamp(Math.round(e/(this._heightBrowser-t)*10)/10,0,1)}return 0};FlexGrid.prototype._updateScrollPosition=function(){var e=this._root,t=e.scrollTop,i=e.scrollLeft;this.rightToLeft&&"rev"==FlexGrid._getRtlMode()&&(i=e.scrollWidth-e.clientWidth-i);var o=new wijmo_1.Point(-Math.abs(i),-t),n=this.columns.getTotalSize();this.rightToLeft&&"rev"!=FlexGrid._getRtlMode()&&(i=-i);if(wijmo_1.isSafari()&&(i<0||n>this._szClient.width&&i+this._szClient.width>n))return!1;if(!this._ptScrl.equals(o)){this._ptScrl=o;this._updateMarquee();this.onScrollPositionChanged();return!0}return!1};FlexGrid.prototype._updateContent=function(e,t){var i=this,o=this._root,n=this.hostElement,r=this.cells.hostElement,l=this._activeCell,s=wijmo_1.getActiveElement(),a=wijmo_1.contains(n,s),d=wijmo_1.closest(s,"."+exports.FlexGridClsNames.hostElement)==n?s:null,c=new wijmo_1.CancelEventArgs;if(this.onUpdatingView(c)){this._setAria("role",this.rows.maxGroupLevel<0?"grid":"treegrid");this._hasValidation=wijmo_1.isFunction(this._itemValidator)||this._cv&&wijmo_1.isFunction(this._cv.getError);var u=!t&&this._errorTip&&this._errorTip._tips.length,h=this._getCssPage(-this._ptScrl.y);if(h!=this._cssPage){this._cssPage=h;this._offsetY=Math.round(this._maxOffsetY*h)}this._updateScrollPosition();this._updateMarquee();var _=0,p=this._hdrVis;p&HeadersVisibility.Row&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Row)&&(_=this.rowHeaders.columns.length);var g=this._gpCells._updateContent(e,t,this._offsetY,_);if(p&HeadersVisibility.Column&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Column)){this._gpCHdr._updateContent(e,t,0,_);this.rightToLeft||(this._eCHdr.scrollLeft=0)}if(p&HeadersVisibility.Row&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Row)){this._gpRHdr._updateContent(e,t,this._offsetY);this._eRHdr.scrollTop=0}!p||this.headersFocusability!==HeadersFocusability.All&&t||this._gpTL._updateContent(e,t,0);if(this._gpCFtr.rows.length){this._gpBL._updateContent(e,t,0);this._gpCFtr._updateContent(e,t,0)}switch(this.activePanelType){case CellType.ColumnHeader:g=this._gpCHdr.activeCell;break;case CellType.RowHeader:g=this._gpRHdr.activeCell;break;case CellType.TopLeft:g=this._gpTL.activeCell;break;case CellType.BottomLeft:g=this._gpBL.activeCell;break;case CellType.ColumnFooter:g=this._gpCFtr.activeCell}if(u&&this._errorTip&&this._errorTip._tips.length){clearTimeout(this._toErrorTips);this._toErrorTips=setTimeout((function(){var e=i._errorTip;if(e){e.hide();for(var t=e._tips,o=0;o<t.length;o++){var n=t[o].element;if(!n.offsetHeight||!wijmo_1.hasClass(n,wijmo_1.ControlStateClsNames.invalid)){e.setTooltip(n,null);o--}}}}),40)}if(this._useFrozenDiv()){this._updateFrozenCells(t);g&&wijmo_1.hasClass(g,exports.FlexGridClsNames.frozen)&&(g=null)}this._fCt.style.display=this._fCt.childElementCount?"":"none";this._activeCell=g;if(d)if(d==o||d==this._eFocus||!wijmo_1.contains(n,d)||wijmo_1.contains(r,d)||this.imeEnabled){var f=g!==l;this._setFocus(f)}else{wijmo_1.getActiveElement()!==d&&d.focus();if(wijmo_1.isIE()&&d instanceof HTMLInputElement&&!d.type.match(/checkbox|radio|range/i)){var m=d.selectionStart,w=d.selectionEnd;d.setSelectionRange(m,w)}}!d&&g&&(g.tabIndex=this.isDisabled?-1:this._orgTabIndex);l&&l!=g&&(l.tabIndex=-1);if(this.selectionMode!=SelectionMode.None)this._eFocus.tabIndex=null!=g||this.isDisabled?-1:this._orgTabIndex;else{this._eFocus.tabIndex=-1;this._root.tabIndex=null!=g||this.isDisabled?-1:this._orgTabIndex}a&&this.focus();this._fixScroll();this._rcBounds=null;this._updateMarquee();this.onUpdatedView(c)}};FlexGrid.prototype._fixScroll=function(){var e=this._root;if(!this._updating){var t=this.hostElement,i=e?e.parentElement:null,o=this.rightToLeft;if(t){t.scrollTop&&(t.scrollTop=0);t.scrollLeft&&!o&&(t.scrollLeft=0)}if(i){i.scrollTop&&(i.scrollTop=0);i.scrollLeft&&!o&&(i.scrollLeft=0)}}var n=_getSafariVer();if(e&&n&&14==n.major&&n.minor>=1){e.style.transform="";e.style.transform="translateZ(0)"}};FlexGrid.prototype._clearCells=function(){for(var e in this)if("_"==e[0]){var t=this[e];t instanceof GridPanel&&t._clearCells()}this.invalidate()};FlexGrid.prototype._useFrozenDiv=function(){return wijmo_1.isBoolean(this._fzClone)?this._fzClone:wijmo_1.isIE()||wijmo_1.isFirefox()||wijmo_1.isSafari()||wijmo_1.isMobile()};FlexGrid.prototype._updateFrozenCells=function(e,t){void 0===t&&(t=!1);var i=this._fCt;(t||0===this.rows.frozen&&0===this.columns.frozen)&&wijmo_1.setText(i,null);if(this.rows._frozenInternal||this.columns._frozenInternal){var o=this._eCt.querySelectorAll("."+exports.FlexGridClsNames.frozen);if(e&&i.children.length==o.length){for(var n=0;n<o.length;n++)i.children[n].className=o[n].className;return}wijmo_1.setText(i,null);if(!this.activeEditor){var r=this._errorTip,l=navigator.userAgent.indexOf("MSIE")>=0;for(n=0;n<o.length;n++){var s=o[n];if(wijmo_1.closest(s,"."+exports.FlexGridClsNames.hostElement)==this.hostElement){var a=s[GridPanel._INDEX_KEY],d=s.firstElementChild,c=null;if(a&&d){var u=a.panel,h=this._getBindingColumn(u,a.row,u.columns[a.col]);c=wijmo_1.isFunction(h.cellTemplate)?d.onclick:null}if(l){var _="input[type=checkbox]",p=s.querySelector(_);s=s.cloneNode(!0);if(p){s.querySelector(_).checked=p.checked}}else{s=s.cloneNode(!0);softGridInteropBase()&&a&&s&&this.cellFactory instanceof softGridInteropBase().DirectiveCellFactoryBase&&this.cellFactory.updateCell(this.cells,a.row,a.col,s,this.mergeManager.getMergedRange(this.cells,a.row,a.col));var g=s.getAttribute("top-for-clone"),f=s.getAttribute("left-for-clone");g&&(s.style.top=g+"px");f?this.rightToLeft?s.style.right=f+"px":s.style.left=f+"px":s.style.left=Math.round(parseFloat(s.style.left))+"px"}d=s.firstElementChild;c&&d&&(d.onclick=c);s[GridPanel._INDEX_KEY]=a;if(r){var m=r.getTooltip(o[n]);m&&r.setTooltip(s,m)}i.appendChild(s)}}}}};FlexGrid.prototype._updateMarquee=function(){if(this.activePanelType==CellType.Cell){var e=this._eMarquee,t=this._getMarqueeRect();if(t&&t.width&&t.height){var i=this.cells.hostElement,o=e.firstChild,n=e.offsetWidth-o.offsetWidth,r=e.offsetHeight-o.offsetHeight;wijmo_1.setCss(e,{width:t.width+n,height:t.height+r,top:t.top+i.offsetTop-r/2,left:t.left+i.offsetLeft-n/2,display:""})}else e.style.display="none"}else this._hideMarquee()};FlexGrid.prototype._hideMarquee=function(){var e=this._eMarquee;wijmo_1.setCss(e,{display:"none"})};FlexGrid.prototype._getMarqueeRect=function(){if(!this._shMarquee||!this.selectionMode)return null;var e=this._selHdl.selection;if(!this.isRangeValid(e))return null;e=(e=(e=this.cells._getAdjustedSelection(e)).combine(this.getMergedRange(this.cells,e.topRow,e.leftCol,!1))).combine(this.getMergedRange(this.cells,e.bottomRow,e.rightCol,!1));var t=this.cells.getCellBoundingRect(e.topRow,e.leftCol,!0),i=this.cells.getCellBoundingRect(e.bottomRow,e.rightCol,!0);if(this.rows._frozenInternal){var o=this.rows._frozenInternal>=0?Math.min(this.rows.length,this.rows._frozenInternal):this.rows._lastFrozen,n=this.rows._frozenInternal>=0?this.cells.getCellBoundingRect(o-1,0,!0):this.cells.getCellBoundingRect(o,0,!0);if(this.rows._frozenInternal>=0){e.topRow>=o&&t.top<n.bottom&&(t.top=n.bottom);e.bottomRow>=o&&i.bottom<n.bottom&&(i.height=n.bottom-i.top)}else{e.bottomRow<o&&i.bottom>n.top&&(i.height-=i.bottom-n.top);e.topRow<o&&t.top>n.top&&(t.top=n.top);this.rows.isFrozen(this.rows._firstVisible)&&e.topRow===this.rows._firstVisible&&t.top++;if(wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()){e.bottomRow>=o&&i.top--;e.topRow>=o&&t.top--}}}if(this.columns._frozenInternal){var r=this.columns._frozenInternal>=0?Math.min(this.columns.length,this.columns._frozenInternal):this.columns._lastFrozen;n=this.columns._frozenInternal>=0?this.cells.getCellBoundingRect(0,r-1,!0):this.cells.getCellBoundingRect(0,r,!0);if(this.rightToLeft)if(this.columns._frozenInternal>=0){e.leftCol>=r&&t.right>n.left&&(t.left=n.left-t.width);e.rightCol>=r&&i.left>n.left&&(i.left=n.left)}else{if(e.rightCol<r&&i.left<n.right){i.left=n.right;if(t.right<=n.right){t.left=n.right;t.width=0}}if(e.leftCol<r&&t.right<n.right){t.left=n.right;t.width=0}}else if(this.columns._frozenInternal>=0){e.leftCol>=r&&t.left<n.right&&(t.left=n.right);e.rightCol>=r&&i.right<n.right&&(i.width=n.right-i.left)}else{e.rightCol<r&&i.right>n.left&&(i.left-=i.right-n.left);e.leftCol<r&&t.left>n.left&&(t.left=n.left)}}var l=0;this.columns._frozenInternal<0&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&this.columns.isFrozen(e.rightCol)&&t.right-i.left!=0&&(l=1);return this.rightToLeft?new wijmo_1.Rect(i.left,t.top,t.right-i.left-l,i.bottom-t.top):new wijmo_1.Rect(t.left,t.top,i.right-t.left-l,i.bottom-t.top)};FlexGrid.prototype._bindColumns=function(){for(var e=this.columns,t=0;t<e.length;t++){if(e[t]._getFlag(RowColFlags.AutoGenerated)){e.removeAt(t);t--}}var i=this._cv,o=i?i.items:null;o&&o.length&&this.autoGenerateColumns&&this._getColumnTypes(o).forEach((function(t){var i=new Column(t);i._setFlag(RowColFlags.AutoGenerated,!0);i.name=i.binding;i.header=wijmo_1.toHeaderCase(i.binding);var o=FlexGrid._defTypeWidth[i.dataType];if(null!=o){if(wijmo_1.isString(o)){var n=Math.round(parseFloat(o));o=o.indexOf("*")>-1?n*e.defaultSize:n}wijmo_1.isNumber(o)&&o>0&&(i.width=o)}e.push(i)}));this._updateColumnTypes()};FlexGrid.prototype._getColumnTypes=function(e){return wijmo_1.getTypes(e)};FlexGrid.prototype._updateColumnTypes=function(){var e=this._cv;if(wijmo_1.hasItems(e)){var t=e.items[0];this.columns.forEach((function(e){null==e.dataType&&e._binding&&(e.dataType=wijmo_1.getType(e._binding.getValue(t)))}))}};FlexGrid.prototype._getMapEditor=function(e,t){return t&&t.editor?null!=t.editor.isDroppedDown?t.dataMapEditor:null:!e||!e.dataMap||e instanceof GroupRow?t&&t.dataMap?t.dataMapEditor:null:e.dataMapEditor};FlexGrid.prototype._getBindingColumn=function(e,t,i){return i};FlexGrid.prototype._getBindingColumns=function(){return this.columns};FlexGrid.prototype._getRowsPerItem=function(){return 1};FlexGrid.prototype._isTransposed=function(){return!1};FlexGrid.prototype._getRowHeaderPath=function(){return this._rowHdrPath};FlexGrid.prototype._bindRows=function(){this.rows.clear();var e=this._cv;if(e&&e.items){var t=e.items,i=e.groups;if(this.childItemsPath)for(var o=0;o<t.length;o++)this._addNode(t,o,0);else if(null!=i&&i.length>0&&this.showGroups)for(o=0;o<i.length;o++)this._addGroup(i[o]);else for(o=0;o<t.length;o++)this._addBoundRow(t,o)}};FlexGrid.prototype._addBoundRow=function(e,t){var i=new Row(e[t]),o=this.rows;i._list=o;o[o.length++]=i};FlexGrid.prototype._addGroupRow=function(e){this.rows.push(new GroupRow(e))};FlexGrid.prototype._addNode=function(e,t,i){var o=e[t],n=this.childItemsPath,r=o[wijmo_1.isArray(n)?n[i]:n],l=new GroupRow(o);l.level=i;this.rows.push(l);if(wijmo_1.isArray(r))for(var s=0;s<r.length;s++)this._addNode(r,s,i+1)};FlexGrid.prototype._addGroup=function(e){this._addGroupRow(e);if(e.isBottomLevel)for(var t=e.items,i=0;i<t.length;i++)this._addBoundRow(t,i);else for(i=0;i<e.groups.length;i++)this._addGroup(e.groups[i]);if(this.groupSummaryPosition!=GroupSummaryPosition.Top){var o=e._clone();this._addGroupSummaryRow(o)}};FlexGrid.prototype._addGroupSummaryRow=function(e){var t=new GroupRow(e);t.isSummary=!0;this.rows.push(t)};FlexGrid._getSerializableProperties=function(e){var t=[];for(e=e.prototype;e!=Object.prototype;e=Object.getPrototypeOf(e))for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var n=i[o],r=Object.getOwnPropertyDescriptor(e,n);r&&r.set&&r.get&&"_"!=n[0]&&!n.match(/^(disabled|required|showDropDown)$/)&&t.push(n)}return t};FlexGrid.prototype._hasColumnGroups=function(){return this._grpHdl.hasColumnGroups()};FlexGrid.prototype._getColumnGroup=function(e,t){return this._grpHdl.getColumnGroup(e,t)};FlexGrid.prototype._canMoveColumnGroup=function(e,t,i,o){return this._grpHdl.canMoveColumnGroup(e,t,i,o)};FlexGrid.prototype._moveColumnGroup=function(e,t,i,o,n){return this._grpHdl.moveColumnGroup(e,t,i,o,n)};FlexGrid.prototype._copy=function(e,t){var i=this;if("columns"==e){var o=wijmo_1.asArray(t);if(o.some((function(e){return null!=e.columns})))this.columnGroups=o;else{this.columns.clear();o.forEach((function(e){var t=new Column(e);i.columns.push(t)}))}return!0}return!1};FlexGrid.prototype._isInputElement=function(e){return e instanceof HTMLElement&&!wijmo_1.hasClass(e,wijmo_1.GlyphClsNames.btnGlyph)&&("true"==e.contentEditable||null!=e.tagName.match(/^(INPUT|TEXTAREA|BUTTON|A|SELECT|OPTION)$/i)||e instanceof HTMLSpanElement&&e.parentElement&&null!=e.parentElement.tagName.match(/^(INPUT|TEXTAREA|BUTTON|A|SELECT|OPTION)$/i)&&!wijmo_1.hasClass(e.parentElement,wijmo_1.GlyphClsNames.btnGlyph))};FlexGrid.prototype._isNativeCheckbox=function(e){return e instanceof HTMLInputElement&&"checkbox"==e.type&&!e.disabled&&!e.readOnly&&wijmo_1.hasClass(e,CellFactory._WJC_CHECKBOX)&&wijmo_1.closest(e,"."+exports.FlexGridClsNames.hostElement)==this.hostElement};FlexGrid.prototype._wantsInput=function(e){return this._isInputElement(e)&&!this.activeEditor&&!this._isNativeCheckbox(e)&&!wijmo_1.hasClass(e,exports.FlexGridClsNames.gridIme)&&wijmo_1.contains(document.body,e)};FlexGrid._getMaxSupportedCssHeight=function(){if(!FlexGrid._maxCssHeight){var e=265e5;wijmo_1.isIE()?e=15e5:wijmo_1.isFirefox()&&(e=175e5);FlexGrid._maxCssHeight=e}return FlexGrid._maxCssHeight};FlexGrid._getRtlMode=function(){if(!FlexGrid._rtlMode){var e=wijmo_1.createElement('<div dir="rtl"><div></div></div>');wijmo_1.setCss(e,{visibility:"hidden",width:100,height:100,overflow:"auto"});wijmo_1.setCss(e.firstChild,{width:2e3,height:2e3});document.body.appendChild(e);var t=e.scrollLeft;e.scrollLeft=-1e3;var i=e.scrollLeft;wijmo_1.removeChild(e);FlexGrid._rtlMode=i<0?"neg":t>0?"rev":"std"}return FlexGrid._rtlMode};FlexGrid.prototype.getEmptyRequiredCell=function(e){return this._getEmptyRequiredCell(e)};FlexGrid.prototype._getEmptyRequiredCell=function(e){if(e>=0)for(var t=0;t<this.columns.length;t++){var i=this.getCellData(e,t,!1);if(this.columns[t].visible&&this.columns[t].getIsRequired(this.rows[e])&&(""===i||null==i)){if(!this.columns[t].isReadOnly&&!this.rows[e].isReadOnly)return t;console.warn("Incorrect data. Cell ("+e+", "+t+") is at the same time required, empty and read-only")}}return null};FlexGrid.prototype.adjustFrozenRowColSize=function(e,t,i){var o=t===FrozenRowCol.Column,n=o?this.columns:this.rows,r=o?this.columns._frozenInternal:this.rows._frozenInternal,l=o?this._szClient.width:this._szClient.height;if(!(e<0||e>=n.length)&&n.isFrozen(e)){var s=l-(o?r>=0?this.columns.slice(0,this.columns._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):this.columns.slice(this.columns.length+this.columns._frozenInternal,this.columns.length).reduce((function(e,t){return e+t.renderSize}),0):r>=0?this.rows.slice(0,this.rows._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):this.rows.slice(this.rows.length+this.rows._frozenInternal,this.rows.length).reduce((function(e,t){return e+t.renderSize}),0))-5,a=n[e].size||n[e].renderSize,d=i>s?a+s:a+i;n[e].size=d}};FlexGrid.prototype._adjustMaxContentWidth=function(){if(0!==this.rows.length&&0!==this.columns.length&&this._maxContent){var e=document.createElement("div");e.style.visibility="hidden";this.hostElement.appendChild(e);for(var t=0,i=1/0,o=new Array(this.columns.length).fill(0),n=0;n<this.columns.length;n++){for(var r=0,l=1/0,s=Math.min(this._contentEstimationLimit,this.rows.length),a=0;a<s;a++){var d=Math.round(a*this.rows.length/s),c=this._getDesiredWidth(this.cells,d,n,e);r=Math.max(r,c);l=Math.min(l,c)}o[n]=r;t+=r;i=Math.min(i,l)}this.hostElement.removeChild(e);var u=window.innerWidth,h=this.hostElement.parentElement?this.hostElement.parentElement.offsetWidth:u,_=window.getComputedStyle(this.hostElement),p=this.hostElement.getBoundingClientRect();_.minWidth.includes("content")&&(this.hostElement.style.minWidth=Math.min.apply(Math,o)+"px");"min-content"===_.maxWidth?this.hostElement.style.maxWidth=i+"px":"fit-content"===_.maxWidth||"max-content"===_.maxWidth?this.hostElement.style.maxWidth=t>h?h+"px":t+"px":this.hostElement.style.width=t>p.width?"100%":"";this.hostElement.parentElement.style.overflowX=t>u||t>h?"auto":"hidden";var g=window.innerHeight-(p.top+window.pageYOffset)-50;this.hostElement.style.maxHeight=g+"px"}};FlexGrid.prototype._isAllCellsSelected=function(){var e=this.selection;return 1===this.selectedRanges.length&&this.columns.length===e.columnSpan&&this.rows.length===e.rowSpan};FlexGrid.prototype._canResizeAllCellsWithoutCtrl=function(){return this._canOverRuleCtrlPress&&this.selectionMode===SelectionMode.MultiRange};FlexGrid.prototype._handleScrollEnd=function(){var e=this;null!==this._scrollEndTimer&&clearTimeout(this._scrollEndTimer);this._scrollEndTimer=window.setTimeout((function(){e._updateStickyHeaders()}),75)};FlexGrid.prototype._updateLayoutOnPin=function(){var e=this._root,t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0,i=this._hdrVis&HeadersVisibility.Column?this._hdrRows.getTotalSize():0,o=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight,r=e.offsetWidth-t-o,l=e.offsetHeight-i-n,s=e.scrollTop,a=Math.abs(e.scrollLeft),d=this.cells.height-l,c=this.cells.width-r;s>d&&e.scrollTo({top:d,left:a});a>c&&e.scrollTo({top:s,left:this.rightToLeft?-c:c})};FlexGrid.prototype._hasScroll=function(e,t){void 0===t&&(t=0);if(e.length&&e._frozenInternal&&e._frozenInternal<0){if(e instanceof ColumnCollection)return e.lastFrozen.pos+t>this._szClient.width+e.lastFrozen._antipos;if(e instanceof RowCollection)return e.lastFrozen.pos+t>this._szClient.height+e.lastFrozen._antipos}return!1};FlexGrid.prototype._alignTheTail=function(e){if(e._frozenInternal&&e._frozenInternal<0&&e._lastFrozen>0){var t=e[e._lastFrozen-1],i=t.pos+t.renderSize,o=this.scrollPosition;if(e instanceof ColumnCollection){var n=this._szClient.width+e.lastFrozen._antipos;if(i+this._ptScrl.x<n){var r=n-i-this._ptScrl.x;o.x+=r;this.scrollPosition=o}}else if(e instanceof RowCollection){n=this._szClient.height+e.lastFrozen._antipos;if(i+this._ptScrl.y<n){r=n-i-this._ptScrl.y;o.y+=r;this.scrollPosition=o}}}};FlexGrid.prototype._getRangesToResize=function(e,t,i){var o,n,r=i,l=this._getResizingInfo(t,e),s=l.isRowResizing,a=l.isColResizing,d=l.rangeBeingResized;o=this.selection.containsColumn(d.col);n=this.selection.containsRow(d.row);(a&&!o||s&&!n)&&(r=[d]);return r};FlexGrid.prototype._getResizingInfo=function(e,t){var i=this._mouseHdl,o={isRowResizing:i._szRowCol instanceof Row,isColResizing:i._szRowCol instanceof Column,rangeBeingResized:null};if(e){var n=this.hitTest(t);o.isRowResizing=n.edgeBottom;o.isColResizing=n.edgeRight;o.rangeBeingResized=n.range}else i._szArgs&&(o.rangeBeingResized=i._szArgs.range);return o};FlexGrid.prototype._handleRowColResizing=function(e,t){if(-1==t.row){if(!e.columns.isFrozen(t.col)||!t.data||!t.data.isPrimaryDragged)return;var i=t.getColumn(),o=(l=e.columns.getFrozenSize())-i.renderWidth+t.data.newSize,n=t.data.newSize>i.renderWidth,r=e.clientSize.width;if(o+FlexGrid._MAX_FROZEN_GAP_LIMIT>r&&n){t.data.maxSize=r-l+i.renderWidth;t.data.internalCancel=!0}}else{if(!e.rows.isFrozen(t.row)||!t.data||!t.data.isPrimaryDragged)return;var l,s=t.getRow(),a=(o=(l=e.rows.getFrozenSize())-s.renderHeight+t.data.newSize,n=t.data.newSize>s.renderHeight,e.clientSize.height);if(o+FlexGrid._MAX_FROZEN_GAP_LIMIT>a&&n){t.data.maxSize=a-l+s.renderHeight;t.data.internalCancel=!0}}};FlexGrid.prototype._getRowColResizedHandler=function(e,t){var i=this,o=new Set;return t?function(t,i){if(i.data){if(i.data.isPrimaryDragged){o.clear();queueMicrotask((function(){var t=e.rows.getFrozenSize(),i=Array.from(o).filter((function(t){return e.rows.isFrozen(t)}));if(t+FlexGrid._MAX_FROZEN_GAP_LIMIT>e.clientSize.height&&i.length>0){var n=t-i.reduce((function(t,i){return t+e.rows[i].renderHeight}),0),r=e.clientSize.height-n-2,l=Math.floor(r/i.length);e.rows.deferUpdate((function(){i.forEach((function(t){return e.rows[t].height=l}))}))}}))}o.add(i.row)}}:function(t,n){if(n.data){if(n.data.isPrimaryDragged){o.clear();queueMicrotask((function(){var t=e.columns.getFrozenSize(),n=Array.from(o).filter((function(t){return e.columns.isFrozen(t)}));if(t+FlexGrid._MAX_FROZEN_GAP_LIMIT>e.clientSize.width&&n.length>0){var r=t-n.reduce((function(t,i){return t+e.columns[i].renderWidth}),0),l=e.clientSize.width-r-2,s=Math.floor(l/n.length);e.columns.deferUpdate((function(){n.forEach((function(t){return e.columns[t].width=s}))}))}0==e.columns.getTotalSize()&&(i._invalidateTimer=setTimeout((function(){e.invalidate();i._invalidateTimer=null}),wijmo_1.Control._REFRESH_INTERVAL))}))}o.add(n.col)}}};FlexGrid.prototype._isFrozenObjectAllowed=function(){var e=this,t=!1;"flexgrid,wjflexgrid".split(",").forEach((function(i){e.constructor.name.toLowerCase().startsWith(i)&&(t=!0)}));return t};FlexGrid.prototype._isFlexSheetInstance=function(){return"flexsheet,wjflexsheet".split(",").indexOf(this.constructor.name.toLowerCase())>-1};FlexGrid.prototype._isServerCollectionView=function(e,t){!t&&(t=this);return softRestCV()&&t.collectionView instanceof softRestCV().RestCollectionView||softODataCV()&&t.collectionView instanceof softODataCV().ODataCollectionView};FlexGrid.prototype._updateAriaRowCount=function(){var e=this._gridRoleElement();if(e){var t=this.columnHeaders.rows.visibleLength,i=this.rows.visibleLength,o=this.columnFooters.rows.visibleLength;null!=t&&null!=i&&null!=o?this._setAria("aria-rowcount",t+i+o):e.removeAttribute("aria-rowcount")}};FlexGrid.prototype._updateAriaColumnCount=function(){var e=this._gridRoleElement();if(e){var t=this.rowHeaders.columns.visibleLength,i=this.columns.visibleLength;null!=t&&null!=i?this._setAria("aria-colcount",t+i):e.removeAttribute("aria-colcount")}};FlexGrid.prototype._ensureEditSelectionForParentGrid=function(){var e=wijmo_1.closest(this.hostElement,"."+exports.FlexGridClsNames.cell);if(e&&e[exports.FlexGridClsNames.cellIndex]){var t=e[exports.FlexGridClsNames.cellIndex],i=t.panel.grid,o=!1;if(i.editRange){i.finishEditing();o=!0}if(!i.selection||!i.selection.contains(t.row,t.col)){i._selHdl._adjustSelection(new CellRange(t.row,t.col),i.selectionMode);o=!0}o&&i.refresh()}};FlexGrid.prototype._createHelperContainer=function(){this._helperContainer=wijmo_1.createElement('<div wj-part="helper-container"><div wj-part="sr-message-helper" tabindex="-1" role="status" aria-live="polite" aria-atomic="true"></div><div wj-part="focus" class="'+exports.FlexGridClsNames.cell+'">0</div></div>',this.hostElement);this._imeContainer=wijmo_1.createElement('<div wj-part="ime-container"></div>',this.hostElement);this._srMessageHelper=this._helperContainer.querySelector('[wj-part="sr-message-helper"]');this._eFocus=this._helperContainer.querySelector('[wj-part="focus"]');wijmo_1.setCss(this._helperContainer,{position:"absolute",left:"-9999px",top:"0",width:"1px",height:"1px",overflow:"hidden"});wijmo_1.setCss(this._eFocus,{position:"fixed",left:"-32000px"});wijmo_1.setCss(this._imeContainer,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"})};FlexGrid.prototype._gridRoleElement=function(){return this._mainContainer?this._mainContainer:this.hostElement};FlexGrid.prototype._modifyRole=function(e,t,i){i?e.removeAttribute("role"):e.getAttribute("role")||e.setAttribute("role",t)};FlexGrid.prototype._handleRefreshForA11y=function(){var e=this._eCHdr.querySelector('[role="row"]>[role="columnheader"]'),t=this._root.querySelector('[role="row"]>[role="gridcell"]');this._modifyRole(this._eCHdr,"rowgroup",!e);this._modifyRole(this._root,"rowgroup",!t)};FlexGrid.prototype.announceShortcut=function(e){var t=this._srMessageHelper;t&&(t.textContent=e)};FlexGrid.prototype.destroyScreenReaderShortCutNotifier=function(){this._srMessageHelper&&this._srMessageHelper.remove();this._srMessageHelper=null};FlexGrid.prototype.onRowColSelected=function(e){this.rowColSelected.raise(this,e)};FlexGrid.prototype.isAddingInvalidNewRow=function(e){var t=!this.rows[e]||this.rows[e]&&Object.getPrototypeOf(this.rows[e])!==Row.prototype?null:this.getEmptyRequiredCell(e),i=this.editableCollectionView;return this._getHasValidation()&&this.validateEdits&&null!==t&&i.currentAddItem};FlexGrid._WJS_STICKY=wijmo_1.ControlStateClsNames.sticky;FlexGrid._WJS_MEASURE=wijmo_1.ControlStateClsNames.measuring;FlexGrid._WJS_UPDATING=wijmo_1.ControlStateClsNames.updating;FlexGrid._WJS_WSPRE=exports.FlexGridClsNames.whiteSpacePre;FlexGrid._MIN_VIRT_ROWS=200;FlexGrid._RESIZE_SCRL_GAP=5;FlexGrid._MAX_FROZEN_GAP_LIMIT=2;FlexGrid._FLEXGRID_COUNT=1;FlexGrid._defTypeWidth=((_a={})[wijmo_1.DataType.Number]="0.714285714*",_a);FlexGrid._ctrlTemplate="";return FlexGrid}(wijmo_1.Control);exports.FlexGrid=FlexGrid;var _ImeHandler=function(){function _ImeHandler(e){var t=this;this._updateImeFocusAsyncBnd=this._updateImeFocusAsync.bind(this);this._cmpstartBnd=this._compositionstart.bind(this);this._keypressBnd=this._keypress.bind(this);this._suspended=!1;this._handlingCompositionStart=!1;this._g=e;var i=wijmo_1.createElement('<textarea class="'+exports.FlexGridClsNames.gridEditor+" "+wijmo_1.InputFormElementsClsNames.formControl+" "+exports.FlexGridClsNames.gridIme+'"/>');wijmo_1.setCss(i,_ImeHandler._cssHidden);wijmo_1.disableAutoComplete(i);i.tabIndex=-1;wijmo_1.setAttribute(i,"aria-label",wijmo_1.culture.FlexGrid.ariaLabels.IMEInput);this._tbx=i;this._suspended=!1;this._maskProvider=new wijmo_1._MaskProvider(i);e._imeContainer.appendChild(i);this._updateImeFocus();var o=e.hostElement,n=e.addEventListener.bind(e),r=this._updateImeFocusAsyncBnd;n(o,"blur",r,!0);n(o,"focus",r,!0);n(i,"compositionstart",this._cmpstartBnd);wijmo_1.isiOS()&&n(o,"keypress",this._keypressBnd);e.selectionChanged.addHandler(r,this);e.cellEditEnded.addHandler(this._cellEditEnded,this);e.cellEditEnding.addHandler(this._cellEditEnding,this);n(o,"mousedown",(function(t){var i=wijmo_1.closest(wijmo_1.getActiveElement(),"."+exports.FlexGridClsNames.hostElement)==e.hostElement,o=e.hitTest(t);i&&o.panel==e.cells&&wijmo_1.hasClass(o.target,exports.FlexGridClsNames.cell)&&(e.isReadOnly||t.preventDefault())}));e.gotFocus.addHandler((function(){return t._updateImeFocus()}))}_ImeHandler.prototype.dispose=function(){var e=this._g,t=e.hostElement,i=this._tbx,o=e.removeEventListener.bind(e),n=this._updateImeFocusAsyncBnd;o(t,"blur",n);o(t,"focus",n);o(t,"keypress",this._keypressBnd);o(i,"compositionstart",this._cmpstartBnd);e.selectionChanged.removeHandler(n);e.cellEditEnded.removeHandler(this._cellEditEnded);e.cellEditEnding.removeHandler(this._cellEditEnding);if(this._setValueInSafariTimer){clearTimeout(this._setValueInSafariTimer);this._setValueInSafariTimer=null}if(this._aeFocusTimer){clearTimeout(this._aeFocusTimer);this._aeFocusTimer=null}if(this._tbxFocusTimer){clearTimeout(this._tbxFocusTimer);this._tbxFocusTimer=null}if(this._toFocus){clearTimeout(this._toFocus);this._toFocus=null}wijmo_1.removeChild(i);this._suspended=!1};_ImeHandler.prototype._compositionstart=function(e){var t=this,i=this._g;if(!i.activeEditor){var o=i._selHdl.selection;this._handlingCompositionStart=!0;var n=i.startEditing(!1,o.row,o.col,!1,e);this._handlingCompositionStart=!1;if(n){if(i.activeEditor&&"checkbox"!=i.activeEditor.type){o=i.editRange;var r=i._getBindingColumn(i.cells,o.row,i.columns[o.col]),l=r&&r._edt,s=i.activeEditor,a=this._tbx,d=i.getCellBoundingRect(o.row,o.col),c=i.cells.getCellElement(o.row,o.col);d.width=c.offsetWidth;d.height=c.offsetHeight;var u=c.getBoundingClientRect(),h=i._imeContainer.getBoundingClientRect(),_=u.left-h.left,p=u.top-h.top,g=c.querySelector("."+wijmo_1.InputFormElementsClsNames.btn+"."+wijmo_1.UtilitesClsNames.right);g&&(d.width-=g.offsetWidth);"minLength,maxLength,pattern".split(",").forEach((function(e){wijmo_1.setAttribute(a,e,s.getAttribute(e))}));var f=s instanceof HTMLTextAreaElement;wijmo_1.setAttribute(a,"wrap",f?"soft":"off");var m=getComputedStyle(c),w=m.paddingTop;if(o.rowSpan>1&&!f){var C=parseFloat(m.lineHeight);isNaN(C)&&(C=1.2*parseFloat(m.fontSize));w=Math.max(0,(d.height-C)/2)+"px"}var v={position:"absolute",left:_,top:p,width:d.width-1,height:d.height-1,paddingTop:w,paddingLeft:m.paddingLeft,paddingRight:m.paddingRight,textAlign:m.textAlign,zIndex:c.style.zIndex};if(i.rightToLeft){v.right=parseInt(c.style.right)+parseInt(i.cells.hostElement.style.right);v.left=""}wijmo_1.setCss(a,v);if(l){var y=l._tbx.getBoundingClientRect(),b=a.getBoundingClientRect(),R=window.getComputedStyle(a),x=parseFloat(R.left),S=parseFloat(R.right),E=parseFloat(R.top);i.rightToLeft?wijmo_1.setCss(a,{right:S+b.right-y.right+"px",top:E+y.top-b.top+"px",width:y.width+"px",height:y.height+"px"}):wijmo_1.setCss(a,{left:x+y.left-b.left+"px",top:E+y.top-b.top+"px",width:y.width+"px",height:y.height+"px"})}i._edtHdl._edt=a;a.select();var j=s.value;if(wijmo_1.isSafari()){" "!=a.value&&" "!=a.value||(a.value=j);wijmo_1.setSelectionRange(a,a.value.length)}else this._setValueInSafariTimer=setTimeout((function(){" "!=a.value&&" "!=a.value||(a.value=j);wijmo_1.setSelectionRange(a,a.value.length)}),20);wijmo_1.Control.sharedState.InvalidScroll=wijmo_1.isEdge();a.placeholder=s.placeholder;s.placeholder="";s.value=""}}else{this._tbx.blur();this._tbxFocusTimer=setTimeout((function(){t._tbx.focus();i._setFocusNoScroll(i.hostElement)}),20)}}};_ImeHandler.prototype._cellEditEnding=function(){var e=this._maskProvider;e&&e.mask&&e._valueChanged()};_ImeHandler.prototype._cellEditEnded=function(){var e=this._tbx,t=this._g;if(this._enableIme()){var i=wijmo_1.getActiveElement();i.blur();if(t._isScrollingByWheel)this._aeFocusTimer=setTimeout((function(){i.focus();t._setFocusNoScroll(t.hostElement);e.value="";i.focus()}),20);else{i.focus();t._setFocusNoScroll(t.hostElement);i.focus()}e.value="";wijmo_1.setCss(e,_ImeHandler._cssHidden);this._updateImeFocus()}};_ImeHandler.prototype._keypress=function(e){if(!e.defaultPrevented&&e.target==this._tbx&&!(e.ctrlKey||e.altKey||e.metaKey||27==e.keyCode||this._g.activeEditor)){this._tbx.value="";this._compositionstart(e);e.stopPropagation()}};_ImeHandler.prototype._updateImeFocus=function(){var e=this._g,t=this._tbx,i=wijmo_1.getActiveElement(),o=e._getTabIndex();if(e.activeEditor||wijmo_1.closest(i,"."+exports.FlexGridClsNames.hostElement)!=e.hostElement)(e.isDisabled||o<0)&&t.tabIndex>=0&&(t.tabIndex=-1);else if(this._enableIme()&&!e._wantsInput(i)){if(i!=t){e.activeCell&&(e.activeCell.tabIndex=-1);t.tabIndex=o;t.disabled=!1;t.value="";this._showCellMessageForScreenReader();if(!e.isTouching)if(window&&window.top!=window.self){wijmo_1.setSelectionRange(t,0,0,!1);e._setFocusNoScroll(t)}else{wijmo_1.setSelectionRange(t,0);t.focus()}}var n=e._selHdl.selection,r=n.isValid?e._getBindingColumn(e.cells,n.row,e.columns[n.col]):null;this._maskProvider.mask=r?r.mask:null}else{t.tabIndex=-1;t.disabled=!0;t.value="";if(i==t){t.blur();var l=e.activeCell;if(l){l.tabIndex=o;l.focus()}else e.focus()}}};_ImeHandler.prototype._updateImeFocusAsync=function(){var e=this;this._toFocus&&clearTimeout(this._toFocus);this._toFocus=setTimeout((function(){e._toFocus=null;e._updateImeFocus()}),100)};_ImeHandler.prototype._resetTabIndex=function(){this._tbx.tabIndex=-1};_ImeHandler.prototype._suspendIME=function(){this._suspended=!0};_ImeHandler.prototype._resumeIME=function(){this._suspended=!1};_ImeHandler.prototype._enableIme=function(){var e=this._g,t=e._selHdl.selection;if(this._suspended)return!1;if(!e.canEditCell(t.row,t.col))return!1;var i=t.isValid?e._getBindingColumn(e.cells,t.row,e.columns[t.col]):null;return!(!i||i.dataType==wijmo_1.DataType.Boolean)&&!(i&&i.dataMap&&i.dataMapEditor==DataMapEditor.RadioButtons||i.dataMapEditor==DataMapEditor.Menu)};_ImeHandler.prototype._showCellMessageForScreenReader=function(){var e=this,t=wijmo_1.getActiveElement();if(t&&t!==this._tbx){var i=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.imeHandler.focusImeCell,o=t.parentElement.getAttribute("aria-rowindex"),n=t.getAttribute("aria-colindex"),r="",l="";if(t.id){var s=t.id.split("-"),a=Number(s[s.length-1]);!isNaN(a)&&this._g.columnHeaders.columns[a]&&this._g.columnHeaders.rows.forEach((function(t,i){0!==i&&(r+=" ");var o=e._g.columnHeaders.getCellData(i,a,!1);wijmo_1.isNullOrUndefined(o)&&(o="");r+=o}));var d=Number(s[s.length-2]);!isNaN(d)&&this._g.rowHeaders.rows[d]&&this._g.rowHeaders.columns.forEach((function(t,i){0!==i&&(l+=" ");var o=e._g.rowHeaders.getCellData(d,i,!1);wijmo_1.isNullOrUndefined(o)&&(o="");l+=o}))}i=wijmo_1.format(i,{value:t.textContent,rowIndex:o,colIndex:n,colName:r,rowName:l});this._g.announceShortcut(i)}};_ImeHandler._cssHidden={position:"fixed",width:"0px",left:-32e3,top:-32e3,overflow:"hidden"};return _ImeHandler}();exports._ImeHandler=_ImeHandler;function toggleColumnPinning(e,t,i,o,n){var r=e.columns,l=r._frozenInternal,s=e.allowPinning;o&&s==AllowPinning.Both&&(s=n?AllowPinning.ColumnRange:AllowPinning.SingleColumn);var a=!r.isFrozen(t),d=l>=0?l:r._lastFrozen-1,c=l>=0?1:-1,u=a?t===d:t===d-c,h=e.rowHeaders.columns.length,_=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,p=e.getColumn(t).header,g=a?_.pin.pinColumnName:_.pin.unpinColumnName,f=new CellRangeEventArgs(e.cells,new CellRange(i,t));if(e.onPinningColumn(f)){var m=r._frozenInternal>=0?new Set(r.slice(0,r._frozenInternal).map((function(e,t){return t}))):new Set(r.slice(r.length+r._frozenInternal).map((function(e,t){return t+r.length+r._frozenInternal})));if(s==AllowPinning.SingleColumn){m.has(t)?m.delete(t):m.add(t);_resizeColumns(e,m);if(u)r._frozenInternal=a?r._frozenInternal+c:r._frozenInternal-c;else if(e._hasColumnGroups()){var w=e._getColumnGroup(i,t);e._canMoveColumnGroup(i,t,0,d)||w&&w._ownerList&&w._ownerList.owner&&w._ownerList.owner.collapseTo&&(w._ownerList.owner.collapseTo="");var C=w._ownerList.length>1?i:Math.max(i-1,0);if(r.isFrozen(t)){if(!C||!u||C&&e._getColumnGroup(i-1,t)!=e._getColumnGroup(i-1,t+1)){var v=l>=0?l:r._lastFrozen;e._moveColumnGroup(C,t,0,v,!1)}r._frozenInternal-=c}else{e._moveColumnGroup(C,t,0,d,!1);r._frozenInternal+=c}}else if(r.isFrozen(t)){g=_.pin.unpinColumnName;r.moveElement(t,d-c,!1);r._frozenInternal-=c}else{g=_.pin.pinColumnName;r.moveElement(t,d,!1);r._frozenInternal+=c}}if(s==AllowPinning.ColumnRange){if(r._frozenInternal>=0)for(var y=0;y<=t;y++)m.add(y);else if(r._frozenInternal<0)for(y=t;y<r.length;y++)m.add(y);_resizeColumns(e,m);if(t+1!=l&&r._frozenInternal>=0){r.frozen=t+1;g=_.pin.pinColumnIndex}else if(-(r.length-t)!=l&&r._frozenInternal<0){r._frozenInternal=-(r.length-t);g=_.pin.pinColumnIndex}else{r._frozenInternal=0;g=_.pin.unpin}}e._updateLayoutOnPin();e.onPinnedColumn(f);g=wijmo_1.format(g,{name:p,colIndex:t+h+1});e.announceShortcut(g)}}exports.toggleColumnPinning=toggleColumnPinning;function _resizeColumns(e,t){var i=e.columns;if(Array.from(t).reduce((function(e,t){return e+i[t].renderSize}),0)+5>e._szClient.width){var o=Array.from(t).sort((function(e,t){return e-t})),n=e._szClient.width-5*o.length;e.columns.length<=t.size&&(n=e._szClient.width);var r=Math.round(n/o.length);o.forEach((function(e){i[e].width=r}))}e.invalidate()}function toggleColumnSort(e,t,i,o,n,r,l){var s=e,a=s.allowSorting,d=s.collectionView,c=d?d.sortDescriptions:null;if(d&&d.canSort&&a!=AllowSorting.None){var u=t.columns[i],h=s._getBindingColumn(t,o,u),_=h?h._getBindingSort():null;if(h.allowSorting&&_){if(u&&h&&u._uid==h._uid){var p=s.getMergedRange(t,o,i,!1);if(p&&p.columnSpan>1)return}var g=new CellRangeEventArgs(t,new CellRange(o,i),n),f=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,m="";if(s.onSortingColumn(g)){s._edtHdl._commitRowEdits();for(var w=-1,C=null,v=0;v<c.length;v++)if(c[v].property==_){w=v;C=c[v];break}c.deferUpdate((function(){if(r&&l){c.clear();m=f.sort.clearSort}else if(C){var e=null!=h.sortOrder?h.sortOrder:s.sortOrder;if(r||C.ascending&&(e===SortOrder.DescAscNone||s.isTouching&&e===SortOrder.DescAsc)||!C.ascending&&(e===SortOrder.AscDescNone||s.isTouching&&e===SortOrder.AscDesc)){c.removeAt(w);m=f.sort.clearSort}else{t=!C.ascending;c[w]=new wijmo_1.SortDescription(_,t);m=t?f.sort.sortAscending:f.sort.sortDescending}}else{if(a!=AllowSorting.MultiColumn){c.clear();m=f.sort.clearSort}var t=null==h.sortOrder?s.sortOrder==SortOrder.AscDesc||s.sortOrder==SortOrder.AscDescNone:h.sortOrder==SortOrder.AscDesc||h.sortOrder==SortOrder.AscDescNone,i=new wijmo_1.SortDescription(_,t);c.push(i);m=t?f.sort.sortAscending:f.sort.sortDescending}}));m=wijmo_1.format(m,{name:u.header});s.announceShortcut(m);s.onSortedColumn(g)}}}}exports.toggleColumnSort=toggleColumnSort;var _AddNewHandler=function(){function _AddNewHandler(e){this._nrt=new _NewRowTemplate;this._top=!1;this._keydownBnd=this._keydown.bind(this);this._committing=!1;this._pasting=!1;this._g=e;this._attach()}Object.defineProperty(_AddNewHandler.prototype,"newRowAtTop",{get:function(){return this._top},set:function(e){if(e!=this.newRowAtTop){this._top=wijmo_1.asBoolean(e);this.updateNewRowTemplate();var t=this._g;if(this._top&&t.selectionMode==SelectionMode.ListBox){t.rows.forEach((function(e,t){e._setFlag(RowColFlags.Selected,0==t,!0)}));t.select(0,t.selection.col)}}},enumerable:!0,configurable:!0});_AddNewHandler.prototype.updateNewRowTemplate=function(){var e=this._g,t=e.editableCollectionView,i=e.rows,o=this._nrt,n=t&&t.canAddNew&&e.allowAddNew&&!e.isReadOnly,r=i.indexOf(o),l=this._top?0:i.length-1,s=!1;if(!n&&r>-1){var a=e.selection;a.row==r&&e.select(a.row-1,a.col);i.removeAt(r)}else if(n){if(r<0)s=!0;else if(r!=l){i.removeAt(r);s=!0}s&&(this._top?i.insert(0,o):i.push(o));if(o){o._ubv=null;o._setFlag(RowColFlags.ParentCollapsed,!1);this._top&&e.selectionMode==SelectionMode.ListBox||o._setFlag(RowColFlags.Selected,!1)}}};_AddNewHandler.prototype._attach=function(){var e=this._g;if(e){e.pasting.addHandler(this._pastingData,this);e.pasted.addHandler(this._pastedData,this);e.loadedRows.addHandler(this.updateNewRowTemplate,this);e.addEventListener(e.hostElement,"keydown",this._keydownBnd,!0)}};_AddNewHandler.prototype._detach=function(){var e=this._g;if(e){e.pasting.removeHandler(this._pastingData,this);e.pasted.removeHandler(this._pastedData,this);e.loadedRows.removeHandler(this.updateNewRowTemplate);e.removeEventListener(e.hostElement,"keydown",this._keydownBnd,!0)}};_AddNewHandler.prototype._keydown=function(e){if(!e.defaultPrevented&&e.keyCode==wijmo_1.Key.Escape&&null==this._g.activeEditor&&this._top&&this._nrt.dataItem){this._nrt.dataItem=null;this._g.invalidate()}};_AddNewHandler.prototype._beginningEdit=function(e,t){if(!t.cancel){var i=e.rows[t.row];i instanceof _NewRowTemplate&&this._handleEditStarting(e,t,i)}};_AddNewHandler.prototype._pastingData=function(e,t){t.cancel||(this._pasting=!0)};_AddNewHandler.prototype._pastedData=function(e,t){this._pasting=!1};_AddNewHandler.prototype._rowEditStarting=function(e,t){if(this._pasting){var i=e.rows[t.row];i instanceof _NewRowTemplate&&this._handleEditStarting(e,t,i)}};_AddNewHandler.prototype._rowEditEnding=function(e,t){var i=e.editableCollectionView,o=this._nrt.dataItem;if(i&&this._top&&o&&!t.cancel){var n=i.currentAddItem;if(!(n&&n==o)){n=i.addNew();for(var r in o)n[r]=o[r]}}};_AddNewHandler.prototype._rowEditEnded=function(e,t){var i=this,o=e.editableCollectionView;if(o&&!this._committing)if(this._top){if(t.cancel)return;var n=this._nrt.dataItem;if(n){this._committing=!0;this._nrt.dataItem=null;var r=this._g.rows,l=o.items.indexOf(n)+1;l<r.length&&t._rng.setRange(l,-1);e.onRowAdded(t)?o.commitNew():o.cancelNew();this._committing=!1}var s=e.rows[t.row];this._addNewTimer=setTimeout((function(){if(s instanceof _NewRowTemplate){e._selHdl.extendedSelection.clear();e.select(0,e.columns.firstVisibleIndex)}i.updateNewRowTemplate()}),20)}else o.isAddingNew&&o.commitNew()};_AddNewHandler.prototype._handleEditStarting=function(e,t,i){var o=e.editableCollectionView;if(o&&o.canAddNew)if(this._top)if(null==this._nrt.dataItem){var n=null,r=o.sourceCollection,l=o.newItemCreator;n=wijmo_1.isFunction(l)?l():r&&r.length?new r[0].constructor:{};this._nrt.dataItem=n}else o.currentAddItem&&(e.onRowAdded(t)||o.cancelNew());else{n=o.currentAddItem&&o.currentAddItem==i.dataItem?o.currentAddItem:o.addNew();o.moveCurrentTo(n);var s=this._nrt.isSelected;this.updateNewRowTemplate();s&&t.row>-1&&(e.rows[t.row].isSelected=!0);e.isUpdating||e.refresh(!0);e.onRowAdded(t)||o.cancelNew()}};_AddNewHandler.prototype.dispose=function(){if(this._addNewTimer){clearTimeout(this._addNewTimer);this._addNewTimer=null}};return _AddNewHandler}();exports._AddNewHandler=_AddNewHandler;var AllowMerging,_NewRowTemplate=function(e){__extends(_NewRowTemplate,e);function _NewRowTemplate(){return null!==e&&e.apply(this,arguments)||this}return _NewRowTemplate}(Row);exports._NewRowTemplate=_NewRowTemplate;!function(e){e[e.None=0]="None";e[e.Cells=1]="Cells";e[e.ColumnHeaders=2]="ColumnHeaders";e[e.RowHeaders=4]="RowHeaders";e[e.AllHeaders=6]="AllHeaders";e[e.All=7]="All"}(AllowMerging=exports.AllowMerging||(exports.AllowMerging={}));var MergeManager=function(){function MergeManager(e){null!=e&&console.error('** WARNING: the "grid" parameter has been deprecated. Please remove it.')}MergeManager.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._getMergedRange(e,t,i,o)};MergeManager.prototype._getMergedRange=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!0);var r,l=e.grid,s=e.cellType,a=e.columns,d=e.rows,c=d[t],u=a[i];if(c instanceof _NewRowTemplate)return null;if(!(c instanceof Row&&u instanceof Column))return null;if(e==l.columnHeaders){var h=l._getColumnGroup(t,i);if(h){var _=h._rng,p=e.columns;if(p.isFrozen(_.col)!=p.isFrozen(_.col2)){_=_.clone();p.isFrozen(i)?p._frozenInternal>0?_.col2=p._frozenInternal-1:_.col=p.length+p._frozenInternal:p._frozenInternal>0?_.col=p._frozenInternal:_.col2=p.length+p._frozenInternal-1}return _}}if(l.showGroups&&!l.childItemsPath&&c instanceof GroupRow&&c.dataItem instanceof wijmo_1.CollectionViewGroup&&s==CellType.Cell){_=new CellRange(t,i);if(u.aggregate==wijmo_1.Aggregate.None){for(var g=a._frozenInternal>=0?a._frozenInternal:a.length+a._frozenInternal;_.col>0&&a[_.col-1].aggregate==wijmo_1.Aggregate.None&&_.col!=g;)_.col--;for(;_.col2<a.length-1&&a[_.col2+1].aggregate==wijmo_1.Aggregate.None&&_.col2+1!=g;)_.col2++}for(;_.col<i&&!a[_.col].visible;)_.col++;return _.isSingleCell?null:_}var f=!1,m=AllowMerging,w=CellType;switch(l.allowMerging){case m.None:f=!0;break;case m.Cells:f=s!=w.Cell;break;case m.ColumnHeaders:f=s!=w.ColumnHeader&&s!=w.TopLeft;break;case m.RowHeaders:f=s!=w.RowHeader&&s!=w.TopLeft;break;case m.AllHeaders:f=s==w.Cell}if(f)return null;if(s==w.Cell){var C=l.editableCollectionView,v=C?C.currentAddItem:null;if(v&&c.dataItem==v)return null}var y=e.grid.editableCollectionView;r=y?y.currentAddItem:null;if(a[i].allowMerging){_=new CellRange(t,i);var b=e._vrb,R=0,x=d.length-1;if(t>=d._frozenInternal){if(o&&(s==CellType.Cell||s==CellType.RowHeader)&&l._vtRows<d.length&&b){R=b.topRow;x=b.bottomRow}}else d.length>d._frozenInternal&&(x=d._frozenInternal-1);for(var S=e._getCellData(t,i,n),E=t-1;E>=R&&this._mergeCell(e,t,i,E,i,r,n,S);E--)_.row=E;for(var j=t+1;j<=x&&this._mergeCell(e,t,i,j,i,r,n,S);j++)_.row2=j;for(;_.row<t&&!d[_.row].visible;)_.row++;if(!_.isSingleCell)return _}if(d[t].allowMerging){_=new CellRange(t,i),b=e._vrb;var H=0,F=a.length-1;if(i>=a._frozenInternal){if(o&&(s==CellType.Cell||s==CellType.ColumnHeader)&&l._vtCols<a.length&&b){H=b.leftCol;F=b.rightCol}}else F=a._frozenInternal-1;S=e._getCellData(t,i,n);for(var z=i-1;z>=H&&this._mergeCell(e,t,i,t,z,r,n,S);z--)_.col=z;for(var T=i+1;T<=F&&this._mergeCell(e,t,i,t,T,r,n,S);T++)_.col2=T;for(;_.col<i&&!a[_.col].visible;)_.col++;if(!_.isSingleCell)return _}return null};MergeManager.prototype._mergeCell=function(e,t,i,o,n,r,l,s){void 0===l&&(l=!0);void 0===s&&(s=null);var a=e.rows[t],d=e.rows[o];if(!a||!d)return!1;if(a instanceof GroupRow||a instanceof _NewRowTemplate||d instanceof GroupRow||d instanceof _NewRowTemplate)return!1;if(r&&(a.dataItem==r||d.dataItem==r))return!1;if(t!=o&&e.rows.isFrozen(t)!=e.rows.isFrozen(o))return!1;if(i!=n&&e.columns.isFrozen(i)!=e.columns.isFrozen(n))return!1;if(t!=o){if(i>0&&(a.allowMerging&&this._mergeCell(e,t,i-1,t,i,r,l)||d.allowMerging&&this._mergeCell(e,o,i-1,o,i,r,l)))return!1;if(n<e.columns.length-1&&(a.allowMerging&&this._mergeCell(e,t,n,t,n+1,r,l)||d.allowMerging&&this._mergeCell(e,o,n,o,n+1,r,l)))return!1}var c=e._getCellData(o,n,l);null==s&&(s=e._getCellData(t,i,l));return!!(s==c||wijmo_1.isDate(s)&&wijmo_1.DateTime.equals(s,c))};return MergeManager}();exports.MergeManager=MergeManager;var _MASK_PROVIDER="$WJ-MSKP",CellFactory=function(){function CellFactory(){}CellFactory.prototype.updateCell=function(e,t,i,o,n,r){var l;o.style.cssText="";var s=e.grid,a=s.rightToLeft,d=e.rows,c=e.columns,u=d[t],h=c[i],_=t,p=i,g=u instanceof GroupRow?u:null,f=!!g&&g.isSummary,m=g&&(s.groupSummaryPosition===GroupSummaryPosition.Bottom||s.groupSummaryPosition===GroupSummaryPosition.Auto&&!g.isCollapsed),w=u instanceof _NewRowTemplate?u:null,C=!!(softDetailRow()&&u instanceof softDetailRow().DetailRow),v=h.renderWidth,y=u.renderHeight,b=e.cellType,R=exports.FlexGridClsNames.cell,x="",S={display:""},E=CellType,j=0,H=0,F=!0;g&&i!=c.firstVisibleIndex?!f&&m&&(F=!1):f&&i==c.firstVisibleIndex&&(F=!1);0!=r&&o.firstElementChild&&(1==o.childNodes.length&&"checkbox"==o.firstElementChild.type||(o.textContent=""));if(s._useFrozenDiv()){o.getAttribute("left-for-clone")&&o.removeAttribute("left-for-clone");o.getAttribute("top-for-clone")&&o.removeAttribute("top-for-clone");if(c.isFrozen(i)&&c._frozenInternal<0){var z=s._szClient.width+h._antipos;(H=z<=h.pos?z:0)&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&H--;H&&wijmo_1.setAttribute(o,"left-for-clone",H)}if(d.isFrozen(t)&&d._frozenInternal<0){var T=s._szClient.height+u._antipos;(j=T<=u.pos?T:0)&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&j--;j!=Math.floor(j)&&(j=Math.round(j));if(j){s.columnFooters.rows.length>0&&(j-=s.columnFooters.height);wijmo_1.setAttribute(o,"top-for-clone",j)}}}if(n&&!n.isSingleCell){t=n.row;i=n.col;_=n.row2;p=n.col2;u=d[t];h=c[i];g=u instanceof GroupRow?u:null;y=(q=n.getRenderSize(e)).height;v=q.width}var M,G,I,P,A,D,L=s._getBindingColumn(e,t,h),O=L?L.dataType:u?u.dataType:void 0;I=b==E.RowHeader||b==E.Cell&&(!g||s.childItemsPath);D=L&&L.isContentHtml||u&&u.isContentHtml;G=b==E.Cell?s._getMapEditor(u,L):null;M=null;L&&(M=L.dataMap);null==M&&u&&(M=u.dataMap);P=I&&G==DataMapEditor.RadioButtons;A=O==wijmo_1.DataType.Boolean&&!M;var N=I&&G==DataMapEditor.Menu,V=h.pos,k=u.pos,B=s._ptScrl,W=d.length>d.frozenEnd,K=c.length>c.frozenEnd;if(s._useFrozenDiv()&&b==E.Cell&&!s.editRange)c.isFrozen(i)&&!d.isFrozen(_)?k+=B.y:d.isFrozen(t)&&!c.isFrozen(p)&&(V+=B.x);else{var q=s._szClient;if(d.isFrozen(_))if(d._frozenInternal>=0){k=Math.min(k,q.height);y=Math.min(y,Math.max(0,q.height-k));k-=B.y}else{k=Math.min(u.pos,q.height+u._antipos);d.isFrozen(d._firstVisible)||(k-=B.y);wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&W&&(k-=1)}if(c.isFrozen(p)&&!C){var U=0!=q.width?q.width:s._preWidth();if(c._frozenInternal>=0){V=Math.min(V,U);V-=B.x}else{V=Math.min(h.pos,U+h._antipos);V-=B.x;wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&K&&(V-=1)}}}a?S.right=V+"px":S.left=V+"px";d.isFrozen(_)||(k-=e._getOffsetY());S.top=k+"px";S.width=v+"px";S.height=y+"px";var J=0;c.isFrozen(i)&&(J+=1);if(d.isFrozen(t)){d._frozenInternal<0&&s.columnFooters.rows.length>0&&(S.top=k-s.columnFooters.height+"px");J+=2;0===y&&(J=-1)}var Y=!1,X=s.alternatingRowStep;if(X&&(!n||n.row==n.row2)){Y=u.visibleIndex%(X+1)==0;1==X&&(Y=!Y)}if(b==E.Cell){g&&(R+=" "+exports.FlexGridClsNames.group);g&&f&&(R+=" "+exports.FlexGridClsNames.groupSummary);Y&&(R+=" "+exports.FlexGridClsNames.alt);(d.isFrozen(t)||c.isFrozen(i))&&(R+=" "+exports.FlexGridClsNames.frozen);w&&(R+=" "+exports.FlexGridClsNames.new);u&&u.cssClass&&(R+=" "+u.cssClass);L&&L.cssClass&&(R+=" "+L.cssClass);s.headersVisibility&HeadersVisibility.Row&&wijmo_1.setAttribute(o,"id","g-"+e.grid._ariaId+"-cell-"+t+"-"+i)}else{R+=" "+exports.FlexGridClsNames.header;Y&&(R+=" "+exports.FlexGridClsNames.headerAlt);u&&u.cssClass&&b==E.ColumnHeader&&(R+=" "+u.cssClass);L&&L.cssClass&&b==E.RowHeader&&(R+=" "+L.cssClass);var $=!1;b!=E.ColumnHeader&&b!=E.TopLeft||s.allowResizing&AllowResizing.Columns&&($=null!=s._mouseHdl._getResizeCol(e,p));$||b!=E.RowHeader||s.allowResizing&AllowResizing.Rows&&($=null!=s._mouseHdl._getResizeRow(e,_));$&&(R+=" "+exports.FlexGridClsNames.bigHeader)}var Z=b==E.Cell&&i==c.firstVisibleIndex&&g&&!_isEditingCell(s,t,i),Q=Z&&g.hasChildren,ee=b,te=s._isTransposed(),ie=(ee==E.ColumnHeader&&!te||ee==E.RowHeader&&te)&&s._hasColumnGroups()?s._getColumnGroup(t,i):null;u&&u.cssClassAll&&(R+=" "+u.cssClassAll);L&&L.cssClassAll&&(null==ie||0==ie.columns.length)&&(R+=" "+L.cssClassAll);ie&&ie.cssClassAll&&ie.columns.length>0&&(R+=" "+ie.cssClassAll);var oe=SelectedState,ne=e.getSelectedState(t,i,n);ne!=oe.None&&b==E.Cell&&!A&&s.editRange&&s.editRange.contains(t,i)&&(ne=oe.None);var re=!1,le=((l={})[E.RowHeader]="rh",l[E.ColumnHeader]="ch",l[E.TopLeft]="tl",l[E.BottomLeft]="bl",l[E.ColumnFooter]="cf",l)[b];if(le){s.headersVisibility&HeadersVisibility.Row&&"true"!==o.dataset.groupPanel&&wijmo_1.setAttribute(o,"id","g-"+e.grid._ariaId+"-"+le+"-"+t+"-"+i);re=!0}switch(ne){case oe.Active:R+=" "+wijmo_1.ControlStateClsNames.active;break;case oe.Cursor:R+=re?" "+exports.FlexGridClsNames.focusHeaderCell:" "+wijmo_1.ControlStateClsNames.selected;R+=" "+wijmo_1.ControlStateClsNames.active;break;case oe.Selected:R+=" "+wijmo_1.ControlStateClsNames.multiSelected}if(d.isFrozen(_))if(d._frozenInternal>0){R+=" "+exports.FlexGridClsNames.frozenRow;_===d._lastFrozen&&(R+=" "+exports.FlexGridClsNames.lastFrozenRow)}else{R+=" "+exports.FlexGridClsNames.frozenRowBottom;if(t===d._lastFrozenVisible)R+=" "+exports.FlexGridClsNames.lastFrozenRowBottom;else if(g&&d.length-t<Math.abs(d._frozenInternal)){for(var se=t-1,ae=!1;se>=d.length+d._frozenInternal;){if(d[se].isVisible){ae=!0;break}se--}ae||(R+=" "+exports.FlexGridClsNames.lastFrozenRowBottom)}}if(c._frozenInternal>0){if(p<=c._lastFrozen){R+=" "+exports.FlexGridClsNames.frozenColLeft;p===c._lastFrozen&&(R+=" "+exports.FlexGridClsNames.frozenCol)}}else if(c._frozenInternal<0&&p>=c._lastFrozen){R+=" "+exports.FlexGridClsNames.frozenColRight;if(i===c._lastFrozenVisible)R+=" "+exports.FlexGridClsNames.frozenColRightEdge;else if(c.length-i<Math.abs(c._frozenInternal)){for(var de=i-1,ce=!1;de>=c.length+c._frozenInternal;){if(c[de].isVisible){ce=!0;break}de--}ce||(R+=" "+exports.FlexGridClsNames.frozenColRightEdge)}}d._frozenInternal<0&&_==d._lastUnfrozenVisible&&(R+=" "+exports.FlexGridClsNames.lastVisibleRow);c._frozenInternal<0&&p==c._lastUnfrozenVisible&&(R+=" "+exports.FlexGridClsNames.lastVisibleCol);(L&&L.wordWrap||u&&u.wordWrap)&&(R+=" "+exports.FlexGridClsNames.wrap);(L&&L.multiLine||u&&u.multiLine)&&(R+=" "+exports.FlexGridClsNames.multiline);var ue=L?L.getAlignment(u):void 0;ue&&(x=" "+wijmo_1.UtilitesClsNames.align+"-"+ue);ie&&ie.align&&(x=" "+wijmo_1.UtilitesClsNames.align+"-"+ie.align);S.paddingLeft=S.paddingRight=S.paddingTop=S.paddingBottom="";if(b==E.Cell&&s.rows.maxGroupLevel>-1&&i==c.firstVisibleIndex&&s.treeIndent){var he=g?Math.max(0,g.level):d.maxGroupLevel+1,_e=Math.min(s.treeIndent*he+s._cellPadLeft,v-s._cellPadHorz)+"px";a?S.paddingRight=_e:S.paddingLeft=_e}v<=s._cellPadHorz&&null==o.getAttribute(FlexGrid._WJS_MEASURE)&&(S.paddingLeft=S.paddingRight=0);Q&&(x="");Q?wijmo_1.setAttribute(o,"aria-expanded",!g.isCollapsed):o.removeAttribute("aria-expanded");var pe=null,ge=null;if(0!=r&&L){pe=e.getCellData(t,i,!1),ge=e.getCellData(t,i,!0);g&&m&&!g.isSummary&&ee==E.Cell&&(ge="");if(Q&&!g.isSummary){var fe=_getTreeBtn(g,o);ge=g.getGroupHeader()||wijmo_1.escapeHtml(ge);(st=document.createElement("span")).classList.add(exports.FlexGridClsNames.elemCollapseSpace);o.innerHTML=fe.outerHTML+st.outerHTML+ge}else if(b!=E.ColumnHeader||_!=s._getSortRowIndex()&&L==h)if(b==E.RowHeader&&!ge&&function(){var e=!1;if(i==s._getEditColumnIndex()){var t=s.editableCollectionView,n=t?t.currentEditItem:null;ge=o.innerHTML=n&&u.dataItem==n?_getGlyph("pencil",getAriaLabels().pencil,!0):u instanceof _NewRowTemplate?_getGlyph("asterisk",getAriaLabels().asterisk,!0):"";e=!0}var r=L._tpl;if(r){_renderTemplate(r,o,pe,ge,u,L);e=!0}return e}());else if(b!=E.Cell||O!=wijmo_1.DataType.Boolean||M||g&&!wijmo_1.isBoolean(pe))if(b==E.Cell&&N&&_isEditingCell(s,t,i)){D&&M&&!M.isEditable&&(ge=wijmo_1.toPlainText(ge));o.textContent="";var me=document.createElement("span");me.style.flexGrow="1";me.textContent=ge;o.appendChild(me);(ve=document.createElement("input")).type="menu";ve.value=ge;s._edtHdl._edt=ve}else if(b==E.Cell&&!P&&_isEditingCell(s,t,i)){var we=L.inputType||u.inputType;we||(we=O!=wijmo_1.DataType.Number||M?"text":"tel");if(!M&&!L.mask&&!u.mask){var Ce=e.getCellData(t,i,!1);wijmo_1.isNumber(Ce)&&(ge=_getEditString(Ce,L.format||u.format))}o.innerHTML=(L.multiLine||u.multiLine)&&"checkbox"!=we?'<textarea wrap="soft"></textarea>':'<input type="'+we+'"/>';var ve=o.children[0];wijmo_1.addClass(ve,exports.FlexGridClsNames.gridEditor+" "+wijmo_1.InputFormElementsClsNames.formControl);wijmo_1.disableAutoComplete(ve);wijmo_1.setAriaLabel(ve,getAriaLabels().editCell);D&&M&&!M.isEditable&&(ge=wijmo_1.toPlainText(ge));ve.value=ge;ve.tabIndex=-1;ve.required=L.getIsRequired(u);wijmo_1.setAttribute(ve,"aria-required",ve.required);var ye=L.maxLength||u.maxLength;ye&&(ve.maxLength=ye);ve.style.textAlign=L.getAlignment(u);var be=L.mask||u.mask;if(be){ve[_MASK_PROVIDER]&&ve[_MASK_PROVIDER].dispose();ve[_MASK_PROVIDER]=new wijmo_1._MaskProvider(ve,be)}s.showPlaceholders&&(ve.placeholder=L.placeholder||"");(wijmo_1.isSafari()||wijmo_1.Control.sharedState.InvalidScroll)&&s._edtHdl&&s._edtHdl._edt&&(ve.value=s._edtHdl._edt.value);s._edtHdl._edt=ve}else{var Re=null;if(P){var xe=[],Se=e.getCellData(t,i,!1);M._cv.items.forEach((function(e,o){var n=e[M.selectedValuePath],r=n===Se?" checked":"",l=s.isReadOnly||u.isReadOnly||h.isReadOnly||!s._edtHdl._allowEdit(t,i)?" disabled":"",a=wijmo_1.escapeHtml(M.getDisplayValue(n));o===pe&&(Re=a);xe.push('<label><input type="radio" tabindex="-1"'+r+l+' data-idx="'+o+'" value="'+a+'"><span>'+a+"</span></label>")}));o.innerHTML=xe.join(" ");if(Re){ze=getAriaLabels();wijmo_1.setAriaLabel(o,Re+" "+ze.radioButtonChecked)}R+=" "+CellFactory._WJC_RADIOMAP}var Ee=I?L._tpl:null;Ee&&F?_renderTemplate(Ee,o,pe,ge,u,L):P||(b==E.Cell&&D?o.innerHTML=ge:o.textContent=ge||"");if(ie&&ie.collapseTo){var je=ie._rng;if(je&&(b==E.ColumnHeader&&je.columnSpan>1||b==E.RowHeader&&je.rowSpan>1)){var He=ie.isCollapsed;o.innerHTML='<div role="button" class="'+CellFactory._WJC_COLLAPSE+'" aria-hidden="true">'+_getGlyph(He?"plus":"minus")+"</div> "+o.innerHTML;wijmo_1.setAttribute(o,"aria-expanded",!He);He&&wijmo_1.addClass(o,wijmo_1.ControlStateClsNames.collapsed)}}}else{var Fe=o.firstChild;if(!g||F){if(!s._isNativeCheckbox(Fe)){var ze=getAriaLabels();o.innerHTML='<label><input type="checkbox" class="'+CellFactory._WJC_CHECKBOX+'" tabindex="-1" aria-label='+(pe?ze.checked:ze.unchecked)+"><span>​</span></label>";Fe=o.querySelector("input")}wijmo_1.setAttribute(o,"aria-selected",!0===pe?"true":"false");wijmo_1.setChecked(Fe,pe);Fe.disabled=!s.canEditCell(t,i);Fe.disabled&&(Fe.style.cursor="default")}else g&&(o.innerHTML="");s.editRange&&s.editRange.contains(t,i)&&(s._edtHdl._edt=Fe)}else{o.innerHTML=wijmo_1.escapeHtml(ge);var Te=L.currentSort;if(Te&&s.showSort){R+="+"==Te?" "+exports.FlexGridClsNames.sortAsc:" "+exports.FlexGridClsNames.sortDesc;var Me=_getSortGlyph(L);o.innerHTML+=" "+Me}s.allowPinning&&wijmo_1.contains(s.hostElement,o)&&_addPinButton(o,s.columns.isFrozen(i),h.header)}var Ge=n;Ge||!s||ie?ie&&(Ge=ie._rng):Ge=s.getMergedRange(e,t,i);o.removeAttribute("aria-rowspan");o.removeAttribute("aria-colspan");o.removeAttribute("aria-rowindex");if(Ge&&!Ge.isSingleCell){var Ie=ie&&ie.isCollapsed,Pe=re&&ie&&!ie.isCollapsed,Ae=re&&!ie;if(Ie)b===CellType.ColumnHeader&&Ge.rowSpan>1?wijmo_1.setAttribute(o,"aria-rowspan",Ge.rowSpan):b===CellType.RowHeader&&Ge.columnSpan>1&&wijmo_1.setAttribute(o,"aria-colspan",Ge.columnSpan);else if(Pe||Ae||!re){Ge.columnSpan>1&&wijmo_1.setAttribute(o,"aria-colspan",Ge.columnSpan);if(Ge.rowSpan>1){wijmo_1.setAttribute(o,"aria-rowspan",Ge.rowSpan);var De=wijmo_1.closest(o,"."+exports.FlexGridClsNames.row);if(De){var Le=De.getAttribute("aria-rowindex");Le&&""!==Le&&wijmo_1.setAttribute(o,"aria-rowindex",Le)}}}}if((G==DataMapEditor.DropDownList||G==DataMapEditor.Menu)&&s.showDropDown&&s.canEditCell(t,i)&&softInput()){var Oe=_getDropDownBtn();o.insertBefore(Oe,o.firstChild);_isEditingCell(s,t,i)&&(R+=" "+exports.FlexGridClsNames.hasDropDown)}}if(b==E.RowHeader||b==E.ColumnHeader){var Ne=b==E.RowHeader?!g&&!w&&u.allowDragging&&0!=(s.allowDragging&AllowDragging.Rows):(ie||h).allowDragging&&0!=(s.allowDragging&AllowDragging.Columns);wijmo_1.setAttribute(o,"draggable",Ne?"true":null)}w&&wijmo_1.setAttribute(o,"aria-label",getAriaLabels().newRowCell);b!==E.ColumnHeader&&b!=E.RowHeader||exports.colHdrAriaAttributes(o,h,e,s,ge,b===E.RowHeader);E.TopLeft===b&&wijmo_1.setAttribute(o,"role",isNullOrEmptyString(ge)?"gridcell":"rowheader");R+=x;o.className!=R&&(o.className=R);S.zIndex=0===J?"":J;var Ve=o.style;for(var ke in S)Ve[ke]!==S[ke]&&(Ve[ke]=S[ke]);if(s._edtHdl._edt&&s._edtHdl._edt.parentElement==o){var Be=s._root,We=Be.getBoundingClientRect(),Ke=o.getBoundingClientRect(),qe=We.top+Be.clientHeight-Ke.top,Ue=We.left+Be.clientWidth-Ke.left;if(c._frozenInternal<0){var Je=document.querySelector('[wj-part="rh"]').getBoundingClientRect(),Ye=e._getFrozenPos();if(Je.left+Je.width>Ke.left&&Ke.width>Ye.x&&K){Ue=Ye.x;o.style.left=o.offsetLeft+Ue-Ye.x+"px"}}if(d._frozenInternal<0){var Xe=document.querySelector('[wj-part="ch"]').getBoundingClientRect();Ye=e._getFrozenPos();if(Xe.top+Xe.height>Ke.top&&Ke.height>Ye.y&&W){qe=Ye.y;o.style.top=o.offsetTop+qe-Ye.y+"px"}}Ke.height>qe&&(o.style.height=qe+"px");Ke.width>Ue&&(o.style.width=Ue+"px")}!1===r&&L&&(pe=e.getCellData(t,i,!1));var $e=null==pe||""===pe,Ze=b===E.RowHeader;if(b==E.Cell||Ze){var Qe=s._getShowErrors(),et=null!=s._edtHdl._edt,tt=s._edtHdl.editRange&&s._edtHdl.editRange.containsRow(t);if(Qe&&(!et||!$e&&!Ze||et&&!tt)){var it="",ot=d[t].dataItem;it=L.binding&&ot&&L.getIsRequired(u)&&_isEditingCell(s,t,i)&&$e?s._edtHdl._getRequiredMsg():s._getError(e,t,i,!1);s._edtHdl._setCellError(o,it)}}s.itemFormatter&&s.itemFormatter(e,t,i,o);if(s.formatItem.hasHandlers){var nt=CellFactory._fmtItemArgs;if(nt){nt._p=e;nt._rng.setRange(t,i,_,p);nt._cell=o}else nt=CellFactory._fmtItemArgs=new FormatItemEventArgs(e,new CellRange(t,i,_,p),o);nt._updateContent=!1!==r;s.onFormatItem(nt)}var rt=g&&g.level>0,lt=I?L&&L._tpl:null;if(Z&&!Q&&rt&&(!1!==r&&L)&&!(lt&&F)){fe=_getTreeBtn(g,o);var st,at=o.firstChild;(st=document.createElement("span")).classList.add(exports.FlexGridClsNames.elemCollapseSpace);o.insertBefore(fe,at);o.insertBefore(st,at)}};CellFactory.prototype.disposeCell=function(e){delete e[GridPanel._INDEX_KEY];if(e[_MASK_PROVIDER]){e[_MASK_PROVIDER].dispose();delete e[_MASK_PROVIDER]}e.removeAttribute("draggable")};CellFactory.prototype._interopDisposeCell=function(e){};CellFactory.prototype.getEditorValue=function(e){var t=e._edtHdl._edt;if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return t.checked;case"radio":return t.value}if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){var i=t[_MASK_PROVIDER],o=i?i._applyMask():t.value,n=t.maxLength;if(wijmo_1.isNumber(n)&&n>-1&&o.length>n){var r=wijmo_1.culture.Globalize.numberFormat["%"]||"%",l=o.length&&o[o.length-1]==r;o=o.substr(0,n);l&&o.indexOf(r)<0&&(o+=r)}return o}return null};CellFactory.dispose=function(){CellFactory._ddBtn&&(CellFactory._ddBtn=null);CellFactory._tplCtx={row:null,col:null,value:null,text:null,item:null};CellFactory._fmtItemArgs=null};CellFactory._WJC_RADIOMAP=exports.FlexGridClsNames.radioMap;CellFactory._WJC_CHECKBOX=exports.FlexGridClsNames.cellCheck;CellFactory._WJC_COLLAPSE=exports.FlexGridClsNames.elemCollapse;CellFactory._WJC_DROPDOWN=exports.FlexGridClsNames.elemDropDown;CellFactory._WJC_PIN=exports.FlexGridClsNames.elemPin;CellFactory._tplDdBtn=_getButton(CellFactory._WJC_DROPDOWN,"down");CellFactory._tplCtx={row:null,col:null,value:null,text:null,item:null};return CellFactory}();exports.CellFactory=CellFactory;function getAriaLabels(){return wijmo_1.culture.FlexGrid.ariaLabels}function _renderTemplate(e,t,i,o,n,r){var l=CellFactory._tplCtx;l.value=i;l.text=o;l.item=n.dataItem;l.row=n;l.col=r;var s=wijmo_1.isString(e)?wijmo_1.evalTemplate(e,l):e(l,t);null!=s&&(t.innerHTML=s)}function _getEditString(e,t){t=t||"n";var i=wijmo_1.Globalize._parseNumericFormat(t);switch(i.spec){case"d":case"x":break;case"e":t=t.replace(/[0-9]/g,"");break;default:t="p"==i.spec?"P15":"r";i.scale&&(t+=Array(i.scale/3+1).join(","))}return wijmo_1.Globalize.formatNumber(e,t,!0)}function _isEditingCell(e,t,i){return e.editRange&&e.editRange.contains(t,i)}function _getDropDownBtn(){var e=CellFactory._ddBtn;if(!e){e=CellFactory._ddBtn=wijmo_1.createElement(CellFactory._tplDdBtn);wijmo_1.setAriaLabel(e,getAriaLabels().toggleDropDown);wijmo_1.setAttribute(e,"aria-expanded",!1)}return e.cloneNode(!0)}function _addPinButton(e,t,i){var o=t?getAriaLabels().pined:getAriaLabels().pinning,n=_getButton(CellFactory._WJC_PIN,"pin",o),r=wijmo_1.createElement(n);wijmo_1.toggleClass(r,wijmo_1.ControlStateClsNames.pinned,t);wijmo_1.setAttribute(r,"aria-pressed",t);e.insertBefore(r,e.firstChild)}function _getSortGlyph(e){var t,i,o=getAriaLabels(),n=e.grid.collectionView;if(n&&n.sortDescriptions.length>1){var r=e.currentSortIndex;if(r>-1){i=o.sortIndex+" "+(r+1);t='<span class="'+exports.FlexGridClsNames.sortIndex+'" aria-hidden= "true">'+(r+1)+"</span>"}}var l=_getGlyph("+"==e.currentSort?"up":"down",i,!0);t&&(l+=t);return l}function _getTreeBtn(e,t){var i=CellFactory._WJC_COLLAPSE,o=(e.isCollapsed?"":"down-")+(e.grid.rightToLeft?"left":"right"),n=wijmo_1.createElement('<button class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.GlyphClsNames.btnGlyph+" "+i+'" type="button" tabindex="-1">'+_getGlyph(o)+"</button>");wijmo_1.setAriaLabel(n,getAriaLabels().toggleGroup);wijmo_1.setAttribute(n,"aria-expanded",!e.isCollapsed);wijmo_1.setAttribute(t,"aria-expanded",!e.isCollapsed);if(!e.hasChildren){n.style.visibility="hidden";wijmo_1.setAttribute(n,"aria-hidden",!0);t.removeAttribute("aria-expanded")}return n}function _getGlyph(e,t,i){void 0===i&&(i=!1);return'<span class="'+(wijmo_1.GlyphClsNames.glyph+"-"+e)+'"'+(t?' aria-label="'+t+'"':"")+(t&&i?' role="button"':"")+"></span>"}function _getButton(e,t,i){return'<button class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.GlyphClsNames.btnGlyph+" "+wijmo_1.UtilitesClsNames.right+" "+e+'" '+(void 0!==i?'aria-label = "'+i+'"':"")+' type="button" tabindex="-1">'+_getGlyph(t)+"</button>"}function isNullOrEmptyString(e){return null==e||0===e.length}exports.isNullOrEmptyString=isNullOrEmptyString;var KeyAction,_CustomEditor=function(){function _CustomEditor(e,t){this._col=wijmo_1.asType(e,Column);this._ctl=t;var i=this._ctl;this._tbx=t.hostElement.querySelector("input")||i&&i._tbx;wijmo_1.assert(this._col instanceof Column,"Invalid Column");wijmo_1.assert(this._ctl instanceof wijmo_1.Control,"Invalid edit control");wijmo_1.assert(this._tbx instanceof HTMLInputElement,"Input element not found in editor");this._prop=wijmo_1.isUndefined(i.value)?wijmo_1.isUndefined(i.checkedItems)?wijmo_1.isUndefined(i.text)?null:"text":"checkedItems":"value";wijmo_1.assert(null!=this._prop,"value, text properties not found in editor");var o=softInput();if(o){this._isDropDown=i instanceof o.DropDown;this._isComboBox=i instanceof o.ComboBox;this._isAutoComplete=i instanceof o.AutoComplete;this._isInputDateTime=i instanceof o.InputDateTime;this._isInputNumber=i instanceof o.InputNumber;this._isInputMask=i instanceof o.InputMask}this._updateFocusBnd=this._updateFocus.bind(this);this._keydownBnd=this._keydown.bind(this);this._cmpstartBnd=this._cmpstart.bind(this);this._mousedownBnd=this._mousedown.bind(this);this._connect();this._col.gridChanged.addHandler(this._connect,this);this._hideEditor();this._updateFocus()}Object.defineProperty(_CustomEditor.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(_CustomEditor.prototype,"column",{get:function(){return this._col},enumerable:!0,configurable:!0});Object.defineProperty(_CustomEditor.prototype,"control",{get:function(){return this._ctl},enumerable:!0,configurable:!0});_CustomEditor.prototype.dispose=function(){this._disconnect();this._isDropDown&&(this._isDropDown=!1);this._g=this._col=this._ctl=this._tbx=null};_CustomEditor.prototype._connect=function(){var e=this._col?this._col.grid:null;if(e!=this._g){this._disconnect();if(e){var t=e.hostElement,i=e.addEventListener.bind(e),o=this._updateFocusBnd;this._g=e;this._ensureEditorsContainer(e);this._hideEditor();this._updateFocus();i(t,"keydown",this._keydownBnd,!0);i(t,"mousedown",this._mousedownBnd,!0);i(t,"mouseup",o,!0);i(t,"blur",o,!0);i(t,"focus",o);i(this._tbx,"compositionstart",this._cmpstartBnd);e.gotFocus.addHandler(o,this);e.selectionChanged.addHandler(o,this);e.prepareCellForEdit.addHandler(this._prepareCellForEdit,this);e.cellEditEnding.addHandler(this._cellEditEnding,this);e.cellEditEnded.addHandler(this._cellEditEnded,this)}}};_CustomEditor.prototype._disconnect=function(){var e=this._g;if(e){var t=e.hostElement,i=e.removeEventListener.bind(e),o=this._updateFocusBnd;i(t,"keydown",this._keydownBnd);i(t,"mousedown",this._mousedownBnd);i(t,"mouseup",o);i(t,"blur",o);i(t,"focus",o);i(this._tbx,"compositionstart",this._cmpstartBnd);e.gotFocus.removeHandler(o,this);e.selectionChanged.removeHandler(o,this);e.prepareCellForEdit.removeHandler(this._prepareCellForEdit,this);e.cellEditEnding.removeHandler(this._cellEditEnding,this);e.cellEditEnded.removeHandler(this._cellEditEnded,this);if(this._ieKeypressTimer){clearTimeout(this._ieKeypressTimer);this._ieKeypressTimer=null}if(this._ieActivateEditorTimer){clearTimeout(this._ieActivateEditorTimer);this._ieActivateEditorTimer=null}if(this._setSelectionRangeTimer){clearTimeout(this._setSelectionRangeTimer);this._setSelectionRangeTimer=null}this._g=null}};_CustomEditor.prototype._prepareCellForEdit=function(e,t){if(!t.cancel&&t.getColumn(!0)==this._col){var i=this.grid,o=this._ctl,n=this._tbx,r=this._prop,l=t.range,s=t.data,a=s&&void 0!==s.type?s.type:"",d=i.getCellData(l.row,l.col,"text"==r||this._isInputMask),c=!1,u="rtl"==getComputedStyle(o.hostElement).direction;o._rtlDir=u;wijmo_1.toggleClass(o.hostElement,wijmo_1.UtilitesClsNames.rtl,u);if(this._isComboBox){""!=d&&(o._emptyValueAction=!1);i._imeHdl&&i._imeHdl._handlingCompositionStart&&(o._composing=!0);this._isInputDateTime&&o._setDropdown(o._ddDate)}this._isAutoComplete&&o.reset();this._isInputMask&&(o._fullEdit=!0);if("checkedItems"==r){if(o.showFilterInput){o.showFilterInput=!1;o.showFilterInput=!0}if(null==d||0==d.length){o[r]=[];o.selectedIndex=0}}if(null!=d||!o.isRequired){if("checkedItems"==r){var h=[];if(o.selectedValuePath)for(var _loop_1=function(e){var t=o.collectionView.items.findIndex((function(t){return null!=d[e][o.selectedValuePath]&&t[o.selectedValuePath]===d[e][o.selectedValuePath]}));if(t>=0){o._lbx.toggleItemChecked(t);h.push(o.collectionView.items[t])}},_=0;_<d.length;_++)_loop_1(_);else wijmo_1.isArray(d)?h=d:d.length>0&&d.split(",").forEach((function(e){return h.push(e.trim())}));o[r]=h}else o[r]=d;if(this._isAutoComplete){clearTimeout(o._toSearch);if((g=o.collectionView)&&(g.filter||o._rxHighlight)){o._rxHighlight=null;g.filter=null}if(d){var p=o._findNext(d,1,-1);o.selectedIndex!=p&&(o.selectedIndex=p);!o.containsFocus()&&o._focus&&o.onGotFocus()}}}switch(a){case"keydown":case"mousedown":if(wijmo_1.isUndefined(s.keyCode)||s.keyCode==wijmo_1.Key.F4||s.altKey){c=this._isDropDown;if(this._isAutoComplete&&(null==d||wijmo_1.isString(d))){var g;if(g=o.collectionView){if(g.filter||o._rxHighlight){o._rxHighlight=null;g.filter=null}p=d?o._findNext(d,1,-1):-1;o.selectedIndex!=p&&(o.selectedIndex=p)}}}}i.showPlaceholders&&!o.placeholder&&(n.placeholder=this._col.header);this.showEditor();i._edtHdl._fullEdit=!0;if(0==a.indexOf("key")&&32==s.keyCode){wijmo_1.setSelectionRange(n,n.value.length);s.preventDefault()}if(wijmo_1.isIE()&&!i.imeEnabled)if("keypress"==a&&s.key){this._ieKeypressTimer=setTimeout((function(){n.value=s.key;wijmo_1.setSelectionRange(n,1);var e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1);n.dispatchEvent(e)}));s.preventDefault()}else if("compositionstart"==a){var f=n.value.length;wijmo_1.setSelectionRange(n,f)}this._isDropDown&&(o.isDroppedDown=c)}};_CustomEditor.prototype._cellEditEnding=function(e,t){if(!t.cancel&&t.getColumn(!0)==this._col){var i=this.grid,o=this._ctl,n=this._prop;if(this._isAutoComplete){var r=o.selectedIndex;if(wijmo_1.isNumber(r)&&r<0){var l=o.collectionView;l&&1==l.items.length?o.selectedIndex=0:this._col.isRequired&&(t.cancel=!0)}}if(!t.cancel&&n){var s=!1;if(this._isInputMask){var a=o;if(null!=a){i._edtHdl._setCustomEditorValue(a._msk._applyMask());s=!0}}s||i._edtHdl._setCustomEditorValue(o[n])}}};_CustomEditor.prototype._cellEditEnded=function(e,t){this._hideEditor();this._updateFocus()};_CustomEditor.prototype._cmpstart=function(e){var t=this;this.grid.imeEnabled&&(wijmo_1.isIE()?this._ieActivateEditorTimer=setTimeout((function(){t._activateEditor(e)})):this._activateEditor(e))};_CustomEditor.prototype._keydown=function(e){if(!e.defaultPrevented&&this._checkColumn(e.target))if(this.grid.activeEditor){if(e.keyCode==wijmo_1.Key.Enter&&this._isDropDown){var t=this._ctl;if(t.isDroppedDown){t.isDroppedDown=!1;e.preventDefault();e.stopImmediatePropagation()}}}else if(this._isDropDown){var i=e.keyCode;switch(i){case wijmo_1.Key.F4:case wijmo_1.Key.Up:case wijmo_1.Key.Down:if(i==wijmo_1.Key.F4||e.altKey){this._activateEditor(e);e.preventDefault()}}}};_CustomEditor.prototype._checkColumn=function(e){var t=this._g;if(!t.imeEnabled&&!t.isReadOnly||null!=e&&this._imeEditor()===e){var i=t._selHdl.selection;return t._getBindingColumn(t.cells,i.row,t.columns[i.col])==this._col&&!this._col.isReadOnly&&!t.rows[i.row].isReadOnly}return!1};_CustomEditor.prototype._mousedown=function(e){if(!e.defaultPrevented&&0==e.button&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this._isDropDown&&wijmo_1.closestClass(e.target,CellFactory._WJC_DROPDOWN)){var t=this.grid,i=t.hitTest(e);if((!t._edtHdl||t._edtHdl.validate)&&!i._clickChildGrid&&i.getColumn(!0)==this._col){t._ensureEditSelectionForParentGrid();t.select(i.range);t.refresh();this._activateEditor(e);e.preventDefault()}}};_CustomEditor.prototype._activateEditor=function(e){var t=this.grid;if(!t.activeEditor){var i=t._selHdl.selection;if(i.isValid)return t.startEditing(!0,i.row,i.col,!0,e)}return!1};_CustomEditor.prototype.showEditor=function(){this.isOpen=!0;var e=this.grid,t=e.activeEditor,i=wijmo_1.closest(t,"."+exports.FlexGridClsNames.cell);if(i){var o=this._tbx,n=this._ctl.hostElement;wijmo_1.setCss(n,_CustomEditor._cssVisible);wijmo_1.toggleClass(o,exports.FlexGridClsNames.gridIme,!1);i.innerHTML="";i.appendChild(n);e._edtHdl._edt=o;if(this._imeEditor())this._initImeEditInput();else{o.select();o.focus();t.value=""}}};_CustomEditor.prototype._hideEditor=function(){this.isOpen=!1;var e=this.grid,t=this._ctl.hostElement,i=this._tbx;this._isDropDown&&(this._ctl.isDroppedDown=!1);i.setCustomValidity("");var o=i.value;i.value=o+" ";i.value=o;wijmo_1.setCss(t,_CustomEditor._cssHidden);wijmo_1.toggleClass(i,exports.FlexGridClsNames.gridIme,!0);if(e&&t.parentElement!=e._eEditorsContainer){this._ensureEditorsContainer(e);e._eEditorsContainer.appendChild(t)}this._ctl._composing&&(this._ctl._composing=!1)};_CustomEditor.prototype._resetTabIndex=function(){this._tbx.tabIndex=-1};_CustomEditor.prototype._updateFocus=function(){var e=this.grid;if(e&&!e.activeEditor){var t=e.hostElement,i="."+exports.FlexGridClsNames.hostElement,o=this._tbx,n=wijmo_1.getActiveElement(),r=e._getTabIndex();if(wijmo_1.closest(n,i)==t)if(wijmo_1.closest(o,i)!=t)this._hideEditor();else if(e.imeEnabled)o.tabIndex>-1&&(o.tabIndex=-1);else{var l=e._selHdl.selection,s=e._getBindingColumn(e.cells,l.row,e.columns[l.col]);if(s&&s==this._col&&e.canEditCell(l.row,l.col)){if(n!==o){e.activeCell&&(e.activeCell.tabIndex=-1);o.tabIndex=r;if(!o.readOnly&&!e.isTouching){o.select();o.focus()}}}else if(o.tabIndex>-1){o.tabIndex=-1;n==o&&e.focus(!0)}}}};_CustomEditor.prototype._initImeEditInput=function(){var e=this,t=this._imeEditor();if(t){var i=this._tbx,o=i&&i.style.color,n=this._ctl,compEndEh_1=function(){t.removeEventListener("compositionend",compEndEh_1);n._composing=!1;wijmo_1.setCss(t,_ImeHandler._cssHidden);if(i){i.style.color=o;var gotF=function(){n.gotFocus.removeHandler(gotF);e._g._edtHdl._edt=i;var o=t.value;if(o){i.value=o;e._isInputMask?e._setSelectionRangeTimer=setTimeout((function(){_CustomEditor._setSelectionRange(i,o.length,o.length)}),0):_CustomEditor._setSelectionRange(i,o.length,o.length);var r=document.createEvent("HTMLEvents");r.initEvent("input",!0,!1);i.dispatchEvent(r)}};n.gotFocus.addHandler(gotF);i.focus()}};t.addEventListener("compositionend",compEndEh_1);i&&(i.style.color="transparent")}};_CustomEditor._setSelectionRange=function(e,t,i){void 0===i&&(i=t);if(wijmo_1.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wijmo_1.asNumber(t),wijmo_1.asNumber(i),wijmo_1.isIE()?null:"backward");e.focus()}catch(e){}};_CustomEditor.prototype._imeEditor=function(){var e=this.grid;if(e&&e.imeEnabled){var t=wijmo_1.getActiveElement();if(t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&wijmo_1.hasClass(t,exports.FlexGridClsNames.gridIme))return t}return null};_CustomEditor.prototype._ensureEditorsContainer=function(e){if(e&&!e._eEditorsContainer){e._eEditorsContainer=wijmo_1.createElement('<div class="'+exports._CustomEditorClsNames.editorsContainer+'"></div>');var t=e._gridRoleElement();t&&"container"===t.parentElement.getAttribute("wj-part")?t.parentElement.appendChild(e._eEditorsContainer):e.hostElement.appendChild(e._eEditorsContainer)}};_CustomEditor._cssHidden={position:"fixed",left:-32e3,top:-32e3,width:"0px",height:"0px",overflow:"hidden",border:"none",display:"block"};_CustomEditor._cssVisible={position:"absolute",left:0,top:0,width:"100%",height:"100%",display:"inline-table"};return _CustomEditor}();exports._CustomEditor=_CustomEditor;!function(e){e[e.None=0]="None";e[e.MoveDown=1]="MoveDown";e[e.MoveAcross=2]="MoveAcross";e[e.Cycle=3]="Cycle";e[e.CycleOut=4]="CycleOut";e[e.CycleEditable=5]="CycleEditable"}(KeyAction=exports.KeyAction||(exports.KeyAction={}));var _KeyboardHandler=function(){function _KeyboardHandler(e){this._kaTab=KeyAction.None;this._kaEnter=KeyAction.MoveDown;this._isHeadersHandled=!1;this._g=e;var t=e.hostElement;e.addEventListener(t,"keypress",this._keypress.bind(this));e.addEventListener(t,"keydown",this._keydownHeaders.bind(this));e.addEventListener(t,"keydown",this._keydown.bind(this))}_KeyboardHandler.prototype._keydownMetaHeaders=function(e){if(!e.defaultPrevented){var t=this._g,i=t._getKeyCode(e),o=e.ctrlKey||e.metaKey,n=(e.altKey,e.shiftKey),r=!1;switch(i){case wijmo_1.Key.Left:case wijmo_1.Key.Right:case wijmo_1.Key.Up:case wijmo_1.Key.Down:case wijmo_1.Key.Enter:case wijmo_1.Key.Delete:case wijmo_1.Key.Back:case wijmo_1.Key.F2:case wijmo_1.Key.Home:case wijmo_1.Key.End:r=!0;break;case wijmo_1.Key.Space:(t.activePanelType!==CellType.ColumnHeader||o)&&(t.activePanelType!==CellType.RowHeader||n)?t.activePanelType===CellType.TopLeft&&(r=!0):r=!0}if(r){e.preventDefault();this._isHeadersHandled=!0}}};_KeyboardHandler.prototype._keydownHeaders=function(e){if(!e.defaultPrevented&&this._g.activePanelType!=CellType.Cell){var t=this._g,i=t.selection,o=e.ctrlKey||e.metaKey,n=e.shiftKey,r=e.altKey,l=e.target,s=(e.char||e.key,!1),a=t.activePanel,d=t.activePanelType,c=t._getKeyCode(e),u=this._getCustomEditor(t,i.row,i.col);if("INPUT"===l.tagName&&!u){var h=l.type;if("radio"!==h&&"checkbox"!==h)return}if(o||r||n)return this._keydownMetaHeaders(e);if(!s)switch(c){case wijmo_1.Key.Left:if(t.headersFocusability===HeadersFocusability.All&&t.headersVisibility===HeadersVisibility.All)if(d===CellType.ColumnHeader){var _=a.getNextVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).leftCol<=_){if((g=t._gpTL.getLastVisibleColumn())>=0){t.select(new CellRange(i.row,g),!0,t._gpTL);s=!0}}}else if(d===CellType.ColumnFooter){_=a.getNextVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).leftCol<=_){if((g=t._gpBL.getLastVisibleColumn())>=0){t.select(new CellRange(i.row,g),!0,t._gpBL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(0,-1);s=!0}break;case wijmo_1.Key.Right:if(d===CellType.RowHeader){var p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){if((g=t._gpCells.getNextVisibleColumn())>=0){t.select(i.row,g);s=!0}}}else if(d===CellType.TopLeft&&t.headersVisibility&HeadersVisibility.Column){p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){if((g=t._gpCHdr.getNextVisibleColumn())>=0){t.select(i.row,g,t._gpCHdr);s=!0}}}else if(d===CellType.BottomLeft&&t.headersVisibility===HeadersVisibility.All){p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){var g;if((g=t._gpCFtr.getNextVisibleColumn())>=0){t.select(i.row,g,t._gpCFtr);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(0,1);s=!0}break;case wijmo_1.Key.Down:if(d===CellType.ColumnHeader){var f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpCells.getNextVisibleRow())>=0){t.select(w,i.col);s=!0}}}else if(d===CellType.TopLeft&&t.headersVisibility&HeadersVisibility.Row){f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpRHdr.getNextVisibleRow())>=0){t.select(w,i.col,t._gpRHdr);s=!0}}}else if(d===CellType.RowHeader&&t.headersVisibility&HeadersVisibility.Row){f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpBL.getNextVisibleRow())>=0){t.select(w,i.col,t._gpBL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(1,0);s=!0}break;case wijmo_1.Key.Up:if(t.headersFocusability===HeadersFocusability.All&&t.headersVisibility===HeadersVisibility.All)if(d===CellType.BottomLeft){f=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow<=f){if((w=t._gpRHdr.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0,t._gpRHdr);s=!0}}}else if(d===CellType.ColumnFooter){f=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow<=f){if((w=t._gpCells.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0);s=!0}}}else if(d===CellType.RowHeader){var m=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).topRow<=m){var w;if((w=t._gpTL.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0,t._gpTL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(-1,0);s=!0}break;case wijmo_1.Key.Tab:if(!(s=this._performKeyAction(t.keyActionTab,n))&&!t.activeCell){t.focus(!0);if(t.imeEnabled){var C=t._imeHdl;C&&C._resetTabIndex()}else u&&u._resetTabIndex()}break;case wijmo_1.Key.Enter:case wijmo_1.Key.Space:var v=a.getCellElement(i.row,i.col);if(v){var y=v.querySelector("button");if(y){y.click();s=!0}else{var b=v.querySelector('[role="button"]');if(b){b.click();s=!0}else if(a.cellType===CellType.TopLeft){var R=SelectionMode;if(t.selectionMode!==R.None&&t.selectionMode!==R.Cell){t.selectAll();s=!0}}else{var x=v.querySelector("input");if(x&&!x.classList.contains("wj-column-selector")){x.click();s=!0}else if(!x&&d==CellType.ColumnHeader){v.click();s=!0}}}}s=!0;break;default:s=!0}if(s){e.preventDefault();this._isHeadersHandled=!0}}};_KeyboardHandler.prototype._keydown=function(e){if(this._isHeadersHandled)this._isHeadersHandled=!1;else{var t=this._g,i=t._edtHdl,o=t.selection,n=e.ctrlKey||e.metaKey,r=e.shiftKey,l=e.altKey,s=e.target,a=e.char||e.key,d=!0,c="Space"===e.code||" "===a;if(!n&&!l&&a&&1==a.length&&wijmo_1.closest(s,"."+exports.FlexGridClsNames.cell)&&s.firstElementChild){if(!c||!r){var u=s.querySelectorAll("."+CellFactory._WJC_RADIOMAP+" label input");if(u&&u.length){for(var h=-1,_=0;_<u.length;_++)if(u[_].checked){h=_;break}a=a.toLowerCase();for(_=0;_<u.length;_++){var p=u[(h+_+1)%u.length];if(c||p.value.toLowerCase()[0]==a){p.click();break}}e.preventDefault();return}}var g=s.querySelector(".wj-cell-maker");if(g&&c){g.click();e.preventDefault();return}}if(!t._wantsInput(s)){var f=wijmo_1.tryCast(t.rows[o.row],GroupRow),m=t.editableCollectionView,w=t._getKeyCode(e),C=SelMove,v=SelectionMode,y=e.defaultPrevented&&!(s instanceof HTMLInputElement),b=w===wijmo_1.Key.Up||w===wijmo_1.Key.Down||w===wijmo_1.Key.Left||w===wijmo_1.Key.Right||w===wijmo_1.Key.PageDown||w===wijmo_1.Key.PageUp||w===wijmo_1.Key.Home||w===wijmo_1.Key.End;if(((t.isRangeValid(o)||b)&&!y||n&&65==w)&&(!t.activeEditor||!i._keydown(e)||t._isNativeCheckbox(t.activeEditor))){if(t.autoClipboard){if(n&&(67==w||45==w)){var R=new CellRangeEventArgs(t.cells,o);if(t.onCopying(R)){var x=HeadersVisibility,S=0!=(t.copyHeaders&x.Column),E=0!=(t.copyHeaders&x.Row),j=t.getClipString(null,!1,S,E);wijmo_1._isMacOS()||(j+="\r\n");t._eFocus.focus();wijmo_1.Clipboard.copy(j);t.onCopied(R)}e.stopPropagation();return}if(n&&86==w||r&&45==w){t.isReadOnly||wijmo_1.Clipboard.paste((function(e){t.setClipString(e)}));e.stopPropagation();return}}(r||n)&&"Space"==e.code&&(w=wijmo_1.Key.Space);switch(w){case wijmo_1.Key.Space:if(r&&o.isValid)switch(t.selectionMode){case v.CellRange:case v.MultiRange:case v.Row:case v.RowRange:case v.ListBox:t.select(new CellRange(o.row,0,o.row,t.columns.length-1),!1);var H=o.row-t.rowHeaders.viewRange.row;if(t.headersVisibility!==HeadersVisibility.Column){var F=null;if(t.rowHeaders.hostElement){t.rowHeaders.hostElement.children[H]&&(F=t.rowHeaders.hostElement.children[H].querySelector("."+wijmo_1.ForeignClsNames.SelectorClsNames.columnSelector))}F&&!t.rows[o.row].isSelected&&F.click()}}else if(n&&o.isValid)switch(t.selectionMode){case v.CellRange:case v.MultiRange:t.select(new CellRange(0,o.col,t.rows.length-1,o.col),!1)}else{if(d=this._startEditing(!0,e))this._finishEditingTimer=setTimeout((function(){var e=t.activeEditor;if(e)if(e.disabled||e.readOnly&&!wijmo_1.closest(e,"."+wijmo_1.ControlClsNames.hostElement))t.finishEditing();else if("checkbox"==e.type){wijmo_1.setChecked(e,e.indeterminate||!e.checked);t.finishEditing()}}));else if(t.rows.maxGroupLevel>-1&&this._isGroupCell()){var z=t.rows[o.row];this._toggleGroupCollapse(!z.isCollapsed,!0)}d=!0}break;case 65:if(n)switch(t.selectionMode){case v.None:case v.Cell:break;default:t.selectAll()}else d=!1;break;case wijmo_1.Key.Left:if(n||l)d=!1;else{if(this._isGroupCell()&&!f.isCollapsed)this._toggleGroupCollapse(!0);else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Row&&t.headersVisibility&HeadersVisibility.Row){if(t.activePanel.getNextVisibleColumn()>=(t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).leftCol){t.select(o.row,t._gpRHdr.columns.length-1,t._gpRHdr);e.preventDefault();return}}if(!n){if(t.selectionMode==v.None)return;this._moveSelWithValid(C.None,n?C.Home:C.Prev,r)}}break;case wijmo_1.Key.Right:if(n||e.altKey)d=!1;else if(this._isGroupCell()&&f.isCollapsed)this._toggleGroupCollapse(!1);else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.None,n?C.End:C.Next,r)}break;case wijmo_1.Key.Up:if(n)d=!1;else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Column&&t.headersVisibility&HeadersVisibility.Column){var T=t.activePanel.getNextVisibleRow();if((t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).topRow<=T){var M=t._gpCHdr.getLastVisibleRow();if(M>=0){t.select(M,o.col,t._gpCHdr);e.preventDefault();return}}}if(!n)if(e.altKey&&i._toggleListBox(e))d=!0;else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.Prev,C.None,r)}break;case wijmo_1.Key.Down:if(n)d=!1;else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Column&&t.headersVisibility&HeadersVisibility.Column){var G=t.activePanel.getLastVisibleRow();if((t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).topRow>=G){if(t._gpCFtr.getNextVisibleRow()>=0){t.select(0,o.col,t._gpCFtr);e.preventDefault();return}}}if(!n)if(e.altKey&&i._toggleListBox(e))d=!0;else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.Next,C.None,r)}break;case wijmo_1.Key.PageUp:this._moveSelWithValid(e.altKey?C.Home:C.PrevPage,C.None,r);if(t.rows._frozenInternal&&t.rows.isFrozen(t.selection.row)){var I=t.scrollPosition;I.y&&(t.scrollPosition=new wijmo_1.Point(I.x,0))}break;case wijmo_1.Key.PageDown:this._moveSelWithValid(e.altKey?C.End:C.NextPage,C.None,r);break;case wijmo_1.Key.Home:this._moveSelWithValid(n?C.Home:C.None,C.Home,r);break;case wijmo_1.Key.End:this._moveSelWithValid(n?C.End:C.None,C.End,r);break;case wijmo_1.Key.Tab:if(!(d=this._performKeyAction(t.keyActionTab,r))&&!t.activeCell){t.focus(!0);if(t.imeEnabled){var P=t._imeHdl;P&&P._resetTabIndex()}else{var A=this._getCustomEditor(t,o.row,o.col);A&&A._resetTabIndex()}}break;case wijmo_1.Key.Enter:t.rows[o.row]instanceof _NewRowTemplate||(d=this._performKeyAction(t.keyActionEnter,r));this._getCustomEditor(t,o.row,o.col)||t.focus(!0);r||!m||null==m.currentEditItem||t.isAddingInvalidNewRow(o.row)||i._commitRowEdits();break;case wijmo_1.Key.Escape:d=!1;if(m&&(m.currentAddItem||m.currentEditItem)){var D=new CellRangeEventArgs(t.cells,t.selection);D.cancel=!0;t.onRowEditEnding(D);m.currentAddItem&&m.cancelNew();m.currentEditItem&&m.cancelEdit();t.onRowEditEnded(D);d=!0}t._mouseHdl.resetMouseState();break;case wijmo_1.Key.Delete:case wijmo_1.Key.Back:d=this._deleteSel(e);break;case wijmo_1.Key.F2:d=this._startEditing(!0,e);break;case wijmo_1.Key.F4:d=i._toggleListBox(e);break;case wijmo_1.Key.MinusKey:case wijmo_1.Key.HyphenMinusKey:d=!1;n&&t.allowDelete&&(d=this._deleteSel(e,!0));break;case wijmo_1.Key.PlusKey:d=!1;e.ctrlKey&&(d=this._addSel(e));break;case wijmo_1.Key.EqualPlusKey:d=!1;e.ctrlKey&&e.shiftKey&&(d=this._addSel(e));break;case wijmo_1.Key.S:d=!1;if(n&&r){this._sortByKeyboard(e);d=!0}break;case wijmo_1.Key.P:d=!1;if(n&&r){this._pinByKeyboard(e);d=!0}break;case wijmo_1.Key.F:d=!1;if(n&&l){var L=this._g,O=0!==L.frozenColumns||0!==L.frozenRows,N=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,V=O?N.frozen.unfrozenColumn:N.frozen.frozenColumn;V=wijmo_1.format(V,{col:O?L.frozenColumns:o.col,row:O?L.frozenRows:o.row});L.announceShortcut(V);L.frozenColumns=O?0:o.col;L.frozenRows=O?0:o.row;d=!0}break;default:d=!1}if(d){t.containsFocus()||t.focus();e.preventDefault();e.stopPropagation()}}}}};_KeyboardHandler.prototype._performKeyAction=function(e,t){var i=KeyAction,o=SelMove;switch(e){case i.MoveDown:this._moveSel(t?o.Prev:o.Next,o.None,!1);return!0;case i.MoveAcross:this._moveSel(o.None,t?o.Prev:o.Next,!1);return!0;case i.Cycle:this._moveSel(o.None,t?o.PrevCell:o.NextCell,!1);return!0;case i.CycleEditable:this._moveSel(o.None,t?o.PrevEditableCell:o.NextEditableCell,!1);return!0;case i.CycleOut:var n=this._g.selection;this._moveSel(o.None,t?o.PrevCell:o.NextCell,!1);return!n.equals(this._g.selection)}return!1};_KeyboardHandler.prototype._keypress=function(e){var t=this,i=this._g;if(!i._wantsInput(e.target)&&!e.defaultPrevented){var o=i._edtHdl;if(i.activeEditor)o._keypress(e);else if(e.charCode>wijmo_1.Key.Space&&"AltLeft"!=e.code&&"AltRight"!=e.code)if(this._startEditing(!1,e)&&i.activeEditor){var n=wijmo_1.getActiveElement();if(n instanceof HTMLInputElement&&"checkbox"!=n.type||n instanceof HTMLTextAreaElement){var r=i._selHdl.selection,l=i.getCellData(r.row,r.col,!0),s=i.getCellData(r.row,r.col,!1),a=wijmo_1.culture.Globalize.numberFormat["%"]||"%",d=String.fromCharCode(e.charCode),c=wijmo_1.isNumber(s)&&l.indexOf(a)>-1||""==l&&n.value==a,u=!0,initEditor_1=function(){n.value=c?d+a:d;wijmo_1.setSelectionRange(n,1);n.dispatchEvent(o._evtInput);o._keypress(e);o._edtValue=n.value!=l?n.value:null};if(i.imeEnabled){var h=this._getCustomEditor(i,r.row,r.col),_=h&&h.control;if(_&&!_._focus){var gotF_1=function(){_.gotFocus.removeHandler(gotF_1);u=!1;initEditor_1()};_.gotFocus.addHandler(gotF_1)}}u&&initEditor_1();e.preventDefault()}}else if(i.autoSearch){var p=!1;r=i._selHdl.selection;if(e.charCode>32||32==e.charCode&&this._search){e.preventDefault();this._search+=String.fromCharCode(e.charCode);this._toSearch&&clearTimeout(this._toSearch);this._toSearch=setTimeout((function(){t._toSearch=null;t._search=""}),wijmo_1.Control._SEARCH_DELAY);var g=this._findNext(r.row,r.col);if(g<0&&this._search.length>1){this._search=this._search[this._search.length-1];g=this._findNext(r.row,r.col)}if(g>-1){p=!0;i.select(g,r.col)}}p||(this._search="")}}};_KeyboardHandler.prototype._getCustomEditor=function(e,t,i){var o=e._getBindingColumn(e.cells,t,e.columns[i]);return o&&o._edt};_KeyboardHandler.prototype._findNext=function(e,t){var i=this._g,o=i.rows.length;(e<0||1==this._search.length)&&e++;var n=this._search,r=i.caseSensitiveSearch;r||(n=n.toLowerCase());for(var l=i.columns[t].isContentHtml,s=0;s<o;s++){var a=(e+s)%o,d=i.getCellData(a,t,!0).trim();l&&(d=wijmo_1.toPlainText(d));r||(d=d.toLowerCase());if(0==d.indexOf(n))return a}return-1};_KeyboardHandler.prototype._moveSel=function(e,t,i){var o=this._g,n=o.selectionMode,r=o._selHdl;if(n!=SelectionMode.None){n==SelectionMode.MultiRange&&r.extendedSelection.clear();r.moveSelection(e,t,i)}};_KeyboardHandler.prototype._addSel=function(e){var t=this._g,i=t.editableCollectionView,o=t.selection,n=new CellRange,r=new CellEditEndingEventArgs(t.cells,n,e);if(!t._edtHdl._allowEdit()||!t.allowAddNew)return!1;t.deferUpdate((function(){i&&i.beginUpdate();if(t.onRowAdded(r)){var e=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.insertRow;t.announceShortcut(wijmo_1.format(e,{index:o.row}));t.rows.insert(o.row,new Row)}i&&i.endUpdate(!1)}));return!0};_KeyboardHandler.prototype._deleteSel=function(e,t){var i=this,o=this._g,n=o.rows,r=o.editableCollectionView,l=o.selection,s=[],a=new CellRange,d=new CellEditEndingEventArgs(o.cells,a,e),c=SelectionMode;if(!o._edtHdl._allowEdit())return!1;if(o.allowDelete&&(null==r||r.canRemove&&!r.isAddingNew&&!r.isEditingItem)){if(0==(s=n.filter((function(e){return e.isSelected}))).length)switch(o.selectionMode){case c.CellRange:case c.MultiRange:var u=o._getDeleteColumnIndex();o.selectedRanges.forEach((function(e){if(e.leftCol==u&&e.rightCol==o.columns.length-1||t)for(var i=e.topRow;i>-1&&i<=e.bottomRow;i++){var r=n[i];s.indexOf(r)<0&&s.push(r)}}));break;case c.Row:l.topRow>-1&&s.push(n[l.topRow]);break;case c.RowRange:for(var h=l.topRow;h>-1&&h<=l.bottomRow;h++)s.push(n[h])}s=s.reduce((function(e,t){e.find((function(e){return e.dataItem===t.dataItem}))||e.push(t);return e}),[])}if(s.length>0){var _=0;o.deferUpdate((function(){r&&r.beginUpdate();for(var e=s.length-1;e>=0;e--){var t=s[e];if(!(t instanceof _NewRowTemplate)){a.setRange(t.index,-1);o.onDeletingRow(d);if(!d.cancel){r&&t.dataItem?r.remove(t.dataItem):o.rows.removeAt(t.index);_++;var i=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.deleteRow;o.announceShortcut(wijmo_1.format(i,{index:l.row}));o.onDeletedRow(d)}}}r&&r.endUpdate(!1)}));if(_>0){var p=l.topRow;p=Math.min(p,o.rows.length-1);for(;p>0&&o.rows[p]instanceof _NewRowTemplate;)p--;l.row=l.row2=p;o.select(l,!1);o.rows._frozenInternal>0&&o.rows.length<=o.rows._frozenInternal&&(o._ptScrl=new wijmo_1.Point(o._ptScrl.x,0));o.childItemsPath&&r&&r.refresh()}return!0}if(0==s.length){o.deferUpdate((function(){var t=o.scrollPosition,a=-1;s=n.filter((function(e){return e.isSelected}));switch(o.selectionMode){case c.Row:l.topRow>-1&&s.push(n[l.topRow]);break;case c.RowRange:for(var d=l.topRow;d>-1&&d<=l.bottomRow;d++)s.push(n[d])}var u=o.selectedRanges.length>1||s.length>1||l.isValid&&n[l.row].dataItem!=n[l.row2].dataItem;r&&r.beginUpdate();if(s.length){var h=new CellRange(0,0,0,o.columns.length-1);s.forEach((function(t){h.row=h.row2=t.index;i._deleteRange(e,h);a=h.bottomRow}))}else{i._deleteRange(e,l);a=l.bottomRow;o.selectionMode==c.MultiRange&&o._selHdl.extendedSelection.forEach((function(t){i._deleteRange(e,t);a=t.bottomRow}))}o.select(l,!1);o.scrollPosition=t;if(r){if(u&&r.currentEditItem){r.commitEdit();var _=new CellRangeEventArgs(o.cells,new CellRange(a,-1));o.onRowEditEnding(_);o.onRowEditEnded(_)}r.endUpdate(!1)}}));return!0}return!1};_KeyboardHandler.prototype._deleteRange=function(e,t){var i=this._g,o=i.editableCollectionView,n=new CellRange,r=new CellEditEndingEventArgs(i.cells,n,e),l=new CellRangeEventArgs(i.cells,new CellRange(t.topRow,-1));i._imeHdl&&i._imeHdl._suspendIME();for(var s=t.topRow;s<=t.bottomRow;s++){var a=i.rows[s];if(!a.isReadOnly)for(var d=t.leftCol;d<=t.rightCol;d++){var c=i._getBindingColumn(i.cells,s,i.columns[d]);if(!c.getIsRequired(a)&&!c.isReadOnly){var u=i.getCellData(s,d,!1);if(i.getCellData(s,d,!0)){n.setRange(s,d);r.cancel=!1;if(i.onBeginningEdit(r)){var h=a.dataItem,_=o?o.currentEditItem:null;if(h!=_&&d===t.leftCol){l._rng.setRange(s,-1);i.onRowEditStarting(l);i.onRowEditStarted(l)}if(o){o.editItem(h);i._edtHdl._edItem=h}i.setCellData(s,d,"",!0,!1);r.previousData=u;i.onCellEditEnding(r);i.onCellEditEnded(r);if(_&&h!=_&&d===t.rightCol){i.onRowEditEnding(l);i.onRowEditEnded(l)}}}}}}i._imeHdl&&i._imeHdl._resumeIME()};_KeyboardHandler.prototype._startEditing=function(e,t,i,o){return this._g._edtHdl.startEditing(e,i,o,!0,t)};_KeyboardHandler.prototype._sortByKeyboard=function(e){var t=this._g,i=t.selection;toggleColumnSort(t,t.activePanel,i.col,i.row,e)};_KeyboardHandler.prototype._pinByKeyboard=function(e){var t=this._g,i=t.selection;toggleColumnPinning(t,i.col,i.row,!1)};_KeyboardHandler.prototype._isGroupCell=function(){var e=this._g,t=e.selection,i=e.getMergedRange(e.cells,t.row,t.col)||new CellRange(t.row,t.col),o=e.activePanel;if(!e.rows[t.row])return!1;var n=o.getNextVisibleColumn(),r=e.rows[t.row],l=e.rows[t.topRow].dataItem instanceof wijmo_1.CollectionViewGroup,s=i&&i.leftCol<=n,a=l&&s,d=t.leftCol<=n||a;return o.cellType==CellType.Cell&&t.isValid&&d&&r&&r.hasChildren};_KeyboardHandler.prototype._toggleGroupCollapse=function(e,t){var i=this._g,o=i.selection,n=i.rows[o.row];if(n.hasChildren){n.isCollapsed=e;t&&i.scrollIntoView(o.row,-1)}};_KeyboardHandler.prototype._moveSelWithValid=function(e,t,i){var o=this._g;o.isRangeValid(o.selection)?this._moveSel(e,t,i):o.select(o.rows._firstVisible,o.columns._firstVisible)};_KeyboardHandler.prototype.dispose=function(){if(this._g){if(this._toSearch){clearTimeout(this._toSearch);this._toSearch=null}if(this._finishEditingTimer){clearTimeout(this._finishEditingTimer);this._finishEditingTimer=null}this._g=null;this._search=null}};return _KeyboardHandler}();exports._KeyboardHandler=_KeyboardHandler;exports.colHdrAriaAttributes=function(e,t,i,o,n,r){void 0===r&&(r=!1);var l=isNullOrEmptyString(n);wijmo_1.setAttribute(e,"role",l?"gridcell":r?"rowheader":"columnheader");if(t.describedById||i.columns.describedById){var s=[t.describedById,i.columns.describedById].join(" ").trim();wijmo_1.setAttribute(e,"aria-describedby",s||null)}if(o.allowSorting){var a=o._getBindingColumn(i,0,t);if(a&&!l)switch(a.currentSort){case"+":wijmo_1.setAttribute(e,"aria-sort","ascending");break;case"-":wijmo_1.setAttribute(e,"aria-sort","descending");break;default:e.removeAttribute("aria-sort")}}if(!o.isReadOnly){wijmo_1.setAttribute(e,"aria-readonly",t.isReadOnly);wijmo_1.setAttribute(e,"aria-required",t.isReadOnly?null:t.getIsRequired()&&!r)}var d=e.closest("."+exports.FlexGridClsNames.row);wijmo_1.setAttribute(d,"role","row")};var HitTestInfo=function(){function HitTestInfo(e,t){this._row=-1;this._col=-1;this._edge=0;this._clickChildGrid=!1;this._mergedRange=null;var i;if(t instanceof Element){if(wijmo_1.closest(t,"."+exports.FlexGridClsNames.hostElement)!=e.hostElement)return;e=t;this._target=t}if(!(e instanceof Element)||e instanceof FlexGrid){if(e instanceof FlexGrid){this._target=e.hostElement;i=this._g=e}else{if(!(e instanceof GridPanel))throw"First parameter should be a FlexGrid or GridPanel.";this._target=e.hostElement;this._p=e;i=this._g=this._p.grid}if(t instanceof MouseEvent){this._target=t.target;var o=wijmo_1.closest(this._target,"."+exports.FlexGridClsNames.hostElement);"mousedown"==t.type&&null!=o&&e instanceof FlexGrid&&o!=e.hostElement&&(this._clickChildGrid=!0);"mousedown"==t.type&&(i._rcBounds=null)}t=wijmo_1.mouseToPage(t);this._pt=t.clone();var n=i.controlRect,r=i._szClient,l=i.topLeftCells,s=i._eTL,a=i.headersVisibility,d=HeadersVisibility,c=a&d.Row?l.columns.getTotalSize():0,u=a&d.Column?l.rows.getTotalSize():0,h=a&d.Column?u+s.offsetTop:0,_=i._eBL,p=_.offsetHeight,g=getComputedStyle(i.hostElement),f=g&&g.borderLeftWidth?parseFloat(g.borderLeftWidth):0,m=g&&g.borderTopWidth?parseFloat(g.borderTopWidth):0;t.x-=n.left-f;t.y-=n.top-m;i.rightToLeft&&(t.x=n.width-t.x);this._p||t.x>=0&&t.y>=s.offsetTop&&r&&t.x<=r.width+c&&t.y<=r.height+u&&(t.y<h?this._p=t.x<c?i.topLeftCells:i.columnHeaders:t.y<_.offsetTop?this._p=t.x<c?i.rowHeaders:i.cells:this._p=t.x<c?i.bottomLeftCells:i.columnFooters);if(null!=this._p){var w=this._p.rows,C=this._p.columns,v=this._p.cellType,y=CellType,b=this._p._getFrozenPos(),R=v==y.TopLeft||v==y.ColumnHeader?u:v==y.BottomLeft||v==y.ColumnFooter?p:w.getTotalSize(),x=v==y.TopLeft||v==y.BottomLeft||v==y.RowHeader?c:C.getTotalSize();if(v==y.RowHeader||v==y.Cell){t.y-=u;this._inBottomFrozenArea=this._g.rows._frozenInternal&&this._g.rows._frozenInternal<0&&this._g._szClient.height&&this._g.rows.lastFrozen&&t.y>=Math.min(this._g.rows.lastFrozen.pos,this._g._szClient.height+this._g.rows.lastFrozen._antipos);if(this._p.rows._frozenInternal>=0){if(t.y>b.y||b.y<=0){t.y-=i._ptScrl.y;t.y+=this._p._getOffsetY()}}else(t.y<b.y||b.y>=this._g._szClient.height)&&(t.y-=i._ptScrl.y)}else v!=y.BottomLeft&&v!=y.ColumnFooter||(t.y-=_.offsetTop);if(v==y.ColumnHeader||v==y.Cell||v==y.ColumnFooter){t.x-=c;this._inRightFrozenArea=this._g.columns._frozenInternal&&this._g.columns._frozenInternal<0&&this._g.columns.lastFrozen&&this._g._szClient.width&&t.x>=Math.min(this._g.columns.lastFrozen.pos,Math.min(this._g.columns.lastFrozen.pos,this._g._szClient.width+this._g.columns.lastFrozen._antipos));this._p.columns._frozenInternal>=0?(t.x>b.x||b.x<=0)&&(t.x-=i._ptScrl.x):(t.x<b.x||b.x>=this._g._szClient.width)&&(t.x-=i._ptScrl.x)}v!=y.ColumnHeader&&v!=y.TopLeft||(t.y-=h-u);this._edge=0;var S=HitTestInfo._SZEDGE[this._g.isTouching?1:0];if(this._g.isTouching){S=HitTestInfo._SZEDGE[1];t.x-=S/2}this._row=t.y>R?-1:w.getItemAt(t.y);this._col=t.x>x?-1:C.getItemAt(t.x);(this._g.columns._frozenInternal<0||this._g.rows._frozenInternal<0)&&this.correctionForNegativeFrozen(t);if(this._row<0||this._col<0){this._p=null;return}if(this._col>-1){var E=C[this._col],j=this.grid.columns._frozenInternal<0&&this.grid.columns.isFrozen(this._col)?Math.min(E.pos,i._szClient.width+E._antipos):E.pos;if(t.x-j<=S){this._edge|=1;t.x-j<=S/2&&(this._edge|=64)}var H=j+E.renderSize-t.x;if(H<=S){this._edge|=4;H<=S/2&&(this._edge|=16)}}if(this._row>-1){var F=w[this._row],z=this.grid.rows._frozenInternal<0&&this.grid.rows.isFrozen(this._row)?Math.min(F.pos,i._szClient.height+F._antipos):F.pos;if(t.y-z<=S){this._edge|=2;t.y-z<=S/2&&(this._edge|=128)}var T=z+F.renderSize-t.y;if(T<=S){this._edge|=8;T<=S/2&&(this._edge|=32)}}}this.panel&&(this._mergedRange=this.grid.getMergedRange(this.panel,this.row,this.col))}else{var M=wijmo_1.closest(e,"."+exports.FlexGridClsNames.cell),G=M?M[GridPanel._INDEX_KEY]:null;if(G){this._target=e;this._row=G.row;this._col=G.col;this._rng=G.rng;this._p=G.panel;this._g=G.panel.grid}}}Object.defineProperty(HitTestInfo.prototype,"point",{get:function(){return this._pt},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"cellType",{get:function(){return this._p?this._p.cellType:CellType.None},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"grid",{get:function(){return this._p?this._p.grid:null},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"row",{get:function(){return this._row},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"mergedRange",{get:function(){return this._mergedRange},enumerable:!0,configurable:!0});HitTestInfo.prototype.getRow=function(){return this._p&&this._row>-1?this._p.rows[this._row]:null};Object.defineProperty(HitTestInfo.prototype,"col",{get:function(){return this._col},enumerable:!0,configurable:!0});HitTestInfo.prototype.getColumn=function(e){var t=this._p,i=t&&this._col>-1?t.columns[this._col]:null;if(i&&e){var o=t.grid;i=t.cellType===CellType.ColumnHeader&&o._hasColumnGroups()?o._getColumnGroup(this._row,this._col):o._getBindingColumn(t,this._row,i)}return i};Object.defineProperty(HitTestInfo.prototype,"range",{get:function(){this._rng||(this._rng=new CellRange(this._row,this._col));return this._rng},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeLeft",{get:function(){return this._considerMergedStatusOfCell(0!=(1&this._edge),"leftCol")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeTop",{get:function(){return this._considerMergedStatusOfCell(0!=(2&this._edge),"topRow")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeRight",{get:function(){return this._mergedRange&&this.panel.columns[this._mergedRange._col2]&&this.panel.columns[this._mergedRange._col2].isVisible?this._considerMergedStatusOfCell(0!=(4&this._edge),"rightCol"):0!=(4&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarRight",{get:function(){return this._considerMergedStatusOfCell(0!=(16&this._edge),"rightCol")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeBottom",{get:function(){return this._mergedRange&&this.panel.rows[this._mergedRange._row2]&&this.panel.rows[this._mergedRange._row2].isVisible?this._considerMergedStatusOfCell(0!=(8&this._edge),"bottomRow"):0!=(8&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarBottom",{get:function(){return this._considerMergedStatusOfCell(0!=(32&this._edge),"bottomRow")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarLeft",{get:function(){return 0!=(64&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarTop",{get:function(){return 0!=(128&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0});HitTestInfo.prototype.correctionForNegativeFrozen=function(e){var t=this._g._szClient.width,i=this._g._szClient.height;if(this._inRightFrozenArea||this._inBottomFrozenArea){if(this._inRightFrozenArea){for(var o=this._g.columns._lastFrozen;o<this._g.columns.length;o++)this._g.columns[o].isVisible&&e.x>=Math.min(this._g.columns[o].pos,t+this._g.columns[o]._antipos)&&e.x<=Math.min(this._g.columns[o].pos+this._g.columns[o].width,t)&&(this._col=o);this._col<this._g.columns.length+this._g.columns._frozenInternal&&(this._col=-1)}if(this._inBottomFrozenArea){for(o=this._g.rows._lastFrozen;o<this._g.rows.length;o++)this._g.rows[o].isVisible&&e.y>=Math.min(this._g.rows[o].pos,i+this._g.rows[o]._antipos)&&e.y<=Math.min(this._g.rows[o].pos+this._g.rows[o].height,i)&&(this._row=o);this._row<this._g.rows.length+this._g.rows._frozenInternal&&(this._row=-1)}}};HitTestInfo.prototype._considerMergedStatusOfCell=function(e,t){return!(!e||!(this.mergedRange&&this.mergedRange[t]===this.range[t]||null===this.mergedRange))};HitTestInfo._SZEDGE=[6,30];return HitTestInfo}();exports.HitTestInfo=HitTestInfo;var _LB_PAGE_SIZE=4,_EditHandler=function(){function _EditHandler(e){var t=this;this._rng=null;this._edt=null;this._edItem=null;this._edtCanceled=!1;this._list=null;this._mapSearch=null;this._fullEdit=!1;this._evtInput=null;this._evtChange=null;this._cstEdtValue=null;this._validating=!1;this._map=null;this._composing=!1;this._g=e;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtChange=document.createEvent("HTMLEvents");this._evtChange.initEvent("change",!0,!1);this._selectionChangingHandler=function(e,i){t._selectionChanging(i)};e.selectionChanging.addHandler(this._selectionChangingHandler);this._lostFocusHandler=function(){var e=wijmo_1.getActiveElement();e&&"fixed"==getComputedStyle(e).position?t.finishEditing():t._commitRowEdits()};e.lostFocus.addHandler(this._lostFocusHandler);var i=e.hostElement;this._mousedownHandler=function(i){if(!i.defaultPrevented&&0==i.button&&!e._mouseHdl._szRowCol){var o=e.hitTest(i);o.cellType!=CellType.Cell&&o.cellType!=CellType.None&&(t.finishEditing()||t.finishEditing(!0))}};e.addEventListener(i,"mousedown",this._mousedownHandler,!0);this._compositionendHandler=function(e){t._composing=!1;t._keypress.call(t,e)};e.addEventListener(i,"compositionend",this._compositionendHandler);this._compositionstartHandler=function(e){var i=t._getCustomEditor(t._g),o=null!=e?wijmo_1.closest(e.target,"."+exports.FlexGridClsNames.hostElement):null,n=wijmo_1.Control.getControl(o),r=n&&n._edtHdl?null!=n._edtHdl.activeEditor:null!=t.activeEditor;if(!i||r||t._g.imeEnabled)t._composing=!0;else{var l=window.getSelection(),s=l.rangeCount>0?l.getRangeAt(0):null,a=document.activeElement;if(null!=a){a.blur();window.getSelection().removeAllRanges();t._addRangeTimer=setTimeout((function(){null!=s&&window.getSelection().addRange(s);a.focus()}),20)}}};e.addEventListener(i,"compositionstart",this._compositionstartHandler)}_EditHandler.prototype.startEditing=function(e,t,i,o,n){void 0===e&&(e=!0);var r=this._g,l=r._selHdl.selection;t=wijmo_1.asNumber(t,!0,!0);i=wijmo_1.isString(i)?r.columns.indexOf(i):wijmo_1.asNumber(i,!0,!0);null==t&&(t=l.row);null==i&&(i=l.col);null==o&&(o=!0);if(!this._allowEdit(t,i))return!1;var s=r.getMergedRange(r.cells,t,i,!1);s||(s=new CellRange(t,i));var a=r.rows[t].dataItem;r.scrollIntoView(s.row,s.col,!0);if(!r.select(s,!0))return!1;if(!r.rows[t]||a!=r.rows[t].dataItem)return!1;if(this.activeEditor){if(s.equals(this._rng))return!0;if(!this.finishEditing())return!1}var d=new CellRangeEventArgs(r.cells,s,n);if(!r.onBeginningEdit(d))return!1;var c=r.editableCollectionView,u=!1;if(c){(u=(a=r.rows[t].dataItem)!=c.currentEditItem)&&r.onRowEditStarting(d);c.editItem(a);if(u){r.onRowEditStarted(d);this._edItem=a}}var h=r.rows[t],_=r._getBindingColumn(r.cells,t,r.columns[i]),p=_.dataMap||h.dataMap,g=DataMapEditor.RadioButtons,f=h.dataMap&&h.dataMapEditor==g||_.dataMap&&_.dataMapEditor==g;if((h.dataMap&&h.dataMapEditor==DataMapEditor.Menu||_.dataMap&&_.dataMapEditor==DataMapEditor.Menu)&&n&&"keypress"==n.type)return!1;this._fullEdit=wijmo_1.asBoolean(e);this._rng=s;this._list=null;p&&(this._map=p);if(p&&!f&&!_.editor){var m=p.useFilter?p.getFilteredItems(r.getRowDataItem(t,i)):p.getDisplayValues(a);(_.isContentHtml||h.isContentHtml)&&(m=m.map((function(e){return wijmo_1.toPlainText(e)})));this._list=m;this._mapSearch=p.search}if(f){var w=r._activeCell||r.hostElement.querySelector("."+exports.FlexGridClsNames.cell+"."+wijmo_1.ControlStateClsNames.active);if(w){var C=n?n.target:null;C instanceof HTMLSpanElement&&(C=wijmo_1.closest(C,"label"));C instanceof HTMLLabelElement&&(C=C.querySelector("input"));if(C instanceof HTMLInputElement)this._edt=C;else{var v=w.querySelectorAll("input[checked]");v.length>0?this._edt=v[0]:this._edt=w.querySelector("input")}this._updateRowHeaderCell(t)}}else s.isSingleCell?this._updateEditorCell(t,i,u):r.refresh(!1);var y=this._edt;if(y){if("checkbox"==y.type||"radio"==y.type||"menu"==y.type)this._fullEdit=!1;else if(o){var b=0,R=y.value.length,x=!1,S=wijmo_1.culture.Globalize.numberFormat["%"]||"%",E=r.getCellData(t,i,!1);wijmo_1.isNumber(E)?x=y.value.indexOf(S)>-1:null==E&&(x=/^p/i.test(_.format))&&y.value.indexOf(S)<0&&(y.value+=S);if(x){var j=y.value;b=0;R=j.length;for(;R>0&&(j[R-1]==S||" "==j[R-1]);)R--;for(;b<R&&j[b]==S;)b++}n&&"keydown"==n.type&&n.keyCode==wijmo_1.Key.Space&&(b=R);this._setSelectionRange(y,b,R,!0,wijmo_1.isEdge());wijmo_1.isIE()&&"right"==y.style.textAlign&&(y.style.paddingRight="1px")}r.onPrepareCellForEdit(d)}o&&!r.containsFocus()&&r.focus();return null!=y&&!y.disabled&&!y.readOnly};_EditHandler.prototype.finishEditing=function(e){var t=this._edt;if(!t||null==this._rng){this._removeListBox();return!0}var i=this._g,o=this._rng,n=new CellEditEndingEventArgs(i.cells,o),r=i.containsFocus();if(!e){var l=i.hostElement.querySelector("."+wijmo_1.ControlClsNames.hostElement+"."+wijmo_1.ControlStateClsNames.focused);if(l){var s=wijmo_1.Control.getControl(l);s&&s instanceof softInput().AutoComplete&&""==t.value&&s.reset();s&&(s.containsFocus()||s._focus)&&s.onLostFocus(n)}}n.cancel=e;if(!e&&i.validateEdits){if(E=this._getValidationError()){n.cancel=!0;var a=i.cells.getCellElement(o.row,o.col);if(a){this._setCellError(a,E);n.stayInEditMode=!0}}}this._cstEdtValue=null;n.data=i.cells.getCellData(o.topRow,o.leftCol,!1);if(!i.onCellEditEnding(n)&&n.stayInEditMode){r?this._selectTimer=setTimeout((function(){t.select()})):t.select();this._fullEdit=!0;return!1}if(!n.cancel){var d=null,c=!1;if(null!=this._lbx_SelectedValue){d=this._lbx_SelectedValue;c=!0}else{var u=this._cstEdtValue,h=this._map,_=this._lbx,p=i.columns[o.col].dataMapEditor===DataMapEditor.RadioButtons;if(u&&void 0!==u.value)d=u.value;else if(p&&this._edt.getAttribute("data-idx")){var g=parseInt(this._edt.getAttribute("data-idx"));d=h._cv.items[g][h.selectedValuePath]}else if(t&&_){var f=i._selHdl.selection,m=i.rows[f.row],w=i._getBindingColumn(i.cells,f.row,i.columns[f.col]);(t.value==this._lbx.selectedValue||wijmo_1.isString(this._lbx.selectedValue)&&0==this._lbx.selectedValue.indexOf(t.value))&&(this._lbx_SelectedValue=this._findKeyValue(m.dataMap||w.dataMap,w.isContentHtml||m.isContentHtml));d=this._lbx_SelectedValue}null==this._lbx_SelectedValue&&null==d&&(d=i.cellFactory.getEditorValue(i));c=null!=this._lbx_SelectedValue||p}for(var C=o.topRow;C<=o.bottomRow&&C<i.rows.length;C++)for(var v=o.leftCol;v<=o.rightCol&&v<i.columns.length;v++){w=i._getBindingColumn(i.cells,C,i.columns[v]),m=i.rows[C];var y=!(h=w&&w.dataMap||m&&m.dataMap)||h.serializeKeys;if(!c&&h){if(this.isEqualValue(h.getDisplayValue(n.data),d))continue;if(h.useFilter){for(var b=i.getRowDataItem(C,v),R=h.getFilteredItems(b),x=!1,S=0;S<R.length&&!(x=R[S][h._displayPath]==d);S++);if(!x)continue}}if(!i.cells.setCellData(C,v,d,y,!1,c)&&i.validateEdits){var E;if(E=this._getValidationError(!0)){n.cancel=!0;var j=i.cells.getCellElement(o.row,o.col);if(j){this._setCellError(j,E);n.stayInEditMode=!0}return!1}}}t.value==this._edtValue&&t.dispatchEvent(this._evtChange)}this._edt=null;this._rng=null;this._list=null;this._edtValue=null;this._edtCanceled=n.cancel;this._removeListBox();this._lbx_SelectedValue=null;var H=wijmo_1.closest(t,"."+exports.FlexGridClsNames.cell);if(wijmo_1.contains(H,wijmo_1.getActiveElement())){i._setFocusNoScroll(H);i._isScrollingByWheel=!1}!n.cancel&&n.refresh&&i._refreshOnEdit?i.refresh(!1):this._updateEditorCell(o.row,o.col,!1);r&&i.focus();i.onCellEditEnded(n);return!0};_EditHandler.prototype._setSelectionRange=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!1);if(!n)return wijmo_1.setSelectionRange(e,t,i,o);if(wijmo_1.contains(document.body,e)&&!e.disabled&&e.offsetHeight){try{e.setSelectionRange(t,i,"backward")}catch(e){}if(o)try{this._g._setFocusNoScroll(e);return!0}catch(e){}}return!1};_EditHandler.prototype._setCustomEditorValue=function(e){this._cstEdtValue={value:e}};_EditHandler.prototype._getCustomEditor=function(e){var t=null,i=e.selection;if(null!=i&&i.isValid){var o=e._getBindingColumn(e.cells,i.row,e.columns[i.col]);t=o&&o._edt}return t};_EditHandler.prototype._setCellError=function(e,t){var i=this._g;""==t&&(t=null);wijmo_1.toggleClass(e,wijmo_1.ControlStateClsNames.invalid,null!=t);wijmo_1.setAttribute(e,"aria-invalid",null!=t?"true":null);var o=i.errorTip,n=i.activeEditor;if(o){o.setTooltip(e,t);n&&wijmo_1.contains(e,n)&&wijmo_1.setAttribute(n,"title","")}else wijmo_1.setAttribute(e,"title",t);n&&e==i.activeCell&&!wijmo_1.contains(e,n)&&o&&o.setTooltip(n,t)};Object.defineProperty(_EditHandler.prototype,"activeEditor",{get:function(){return this._edt},enumerable:!0,configurable:!0});Object.defineProperty(_EditHandler.prototype,"editRange",{get:function(){return this._rng},enumerable:!0,configurable:!0});_EditHandler.prototype.getClipString=function(e,t,i,o){var n,r=this,l=this._g,s=l.selectionMode,a=[],d=0!=(t&ClipStringOptions.CSV),c=d?"\r\n":"\n",u=d?",":"\t",h=0!=(t&ClipStringOptions.InvisibleRows),_=SelectionMode,p=null!=e;if(!e&&s!=_.ListBox)for(var g=l.rows,f=0;f<g.length;f++)if(g[f].isSelected){s=_.ListBox;break}if(!e){l._selHdl._expandSelection();e=l.selection;switch(s){case _.Row:case _.RowRange:case _.ListBox:e.col=0;e.col2=l.columns.length-1;break;case _.MultiRange:var m=l.selectedRanges;if(m.length>1){var w=this._sameCols(m),C=this._sameRows(m);if(w||C){(m=m.slice()).sort((function(e,t){var i=e.topRow-t.topRow;return i||e.leftCol-t.leftCol}));for(var v=0;v<m.length;v++)for(var y=m[v],b=v+1;b<m.length;b++)if(y.contains(m[b])){m.splice(b,1);b--}if(w){var R=[];m.forEach((function(e){R.push(r.getClipString(e,t,i,o));i=!1}));return R.join(c)}if(C){var x;m.forEach((function(e){var n=r.getClipString(e,t,i,o).split(c);if(null==x){x=n;o=!1}else n.forEach((function(e,t){x[t]+=u+e}))}));return x.join(c)}}}}}var S=e.col>-1&&e.col2>-1;i&&S&&(n=l.columnHeaders).rows.forEach((function(i,l){if(h||i.isVisible){var s=r._getRowClipString(n,l,e,t,o);a.push(s)}}));if(e.row>-1&&e.row2>-1){n=l.cells;if(s!=_.ListBox||p){wijmo_1.assert(e.bottomRow<n.rows.length,"Row index must be less than the number of rows.");for(v=e.topRow;v<=e.bottomRow;v++)if(h||n.rows[v].isVisible){var E=this._getRowClipString(n,v,e,t,o);a.push(E)}}else n.rows.forEach((function(i,l){if(i.isSelected&&(h||i.isVisible)){var s=r._getRowClipString(n,l,e,t,o);a.push(s)}}))}return a.join(c)};_EditHandler.prototype._getRowClipString=function(e,t,i,o,n){var r=[],l=e.rows[t],s=ClipStringOptions,a=0!=(o&s.CSV),d=0!=(o&s.InvisibleColumns),c=0==(o&s.Unformatted),u=0!=(o&s.SkipMerged),h=e.grid;if(l.isVisible){if(n)for(var _=e.cellType==CellType.ColumnHeader?h.topLeftCells:h.rowHeaders,p=0;p<_.columns.length;p++)if(d||_.columns[p].isVisible){var g=_.getCellData(t,p,!0);u&&this._skipMergedCell(e,null,t,p)&&(g="");var f=new CellRangeEventArgs(e,new CellRange(t,p),g);h.onGettingCellClipString(f);r.push(this._getCellClipString(f.data,o))}var m=l instanceof GroupRow?l:null,w=m&&(h.groupSummaryPosition===GroupSummaryPosition.Bottom||h.groupSummaryPosition===GroupSummaryPosition.Auto&&!m.isCollapsed),C=m&&!m.isSummary&&w;if(i.col>-1&&i.col2>-1){wijmo_1.assert(i.rightCol<e.columns.length,"Column index must be less than the number of columns.");for(p=i.leftCol;p<=i.rightCol;p++)if(d||e.columns[p].isVisible){g=e.getCellData(t,p,c);C&&p!=e.columns.firstVisibleIndex&&(g=null);!g&&l instanceof GroupRow&&p==e.columns.firstVisibleIndex&&(g=wijmo_1.toPlainText(l.getGroupHeader()));u&&this._skipMergedCell(e,null,t,p)&&(g="");f=new CellRangeEventArgs(e,new CellRange(t,p),g);h.onGettingCellClipString(f);r.push(this._getCellClipString(f.data,o))}}}return r.join(a?",":"\t")};_EditHandler.prototype._skipMergedCell=function(e,t,i,o){var n=e.grid.getMergedRange(e,i,o,!1);if(n){if(t){n.row=Math.max(t.topRow,n.row);n.col=Math.max(t.leftCol,n.col)}if(n.row!=i||n.col!=o)return!0}return!1};_EditHandler.prototype._getCellClipString=function(e,t){wijmo_1.isString(e)||(e=wijmo_1.isDate(e)?e.toJSON():null!=e?e.toString():"");e=e.replace(/\t/g," ");var i=0!=(t&ClipStringOptions.QuoteAll);(i=i||/\n|^"|"$/.test(e))||0==(t&ClipStringOptions.CSV)||(i=e.indexOf(",")>-1);i&&(e='"'+(e=e.replace(/"/g,'""'))+'"');return e};_EditHandler.prototype._sameRows=function(e){for(var t=e[0],i=1;i<e.length;i++)if(e[i].topRow!=t.topRow||e[i].bottomRow!=t.bottomRow)return!1;return!0};_EditHandler.prototype._sameCols=function(e){for(var t=e[0],i=1;i<e.length;i++)if(e[i].leftCol!=t.leftCol||e[i].rightCol!=t.rightCol)return!1;return!0};_EditHandler.prototype.setClipString=function(e,t){var i,o,n=this,r=this._g,l=r.editableCollectionView,s=this._parseClipString(wijmo_1.asString(e)),a=r._getRowsPerItem(),d=r.selection,c=!1,u=s.length;t&&(d=t);i=r.rows[d.topRow]instanceof _NewRowTemplate&&r.newRowAtTop;o=d.rowSpan>1&&1===a||d.rowSpan-a!=0&&a>1;if(i&&o){c=!0;r.select(new CellRange(d.topRow,d.leftCol,d.topRow,d.rightCol))}var h=null==t,_=SelectionMode;if(h){r._selHdl._expandSelection();t=r.selection;switch(r.selectionMode){case _.Row:case _.RowRange:case _.ListBox:t.col=0;t.col2=r.columns.length-1;break;case _.MultiRange:var p=r.selectedRanges;if(p.length>1){l&&l.beginUpdate();p.forEach((function(t){r.setClipString(e,t)}));l&&l.endUpdate();r.selectedRanges=p;return}}}t=wijmo_1.asType(t,CellRange);this._expandClipRows(s,t);c||(u=s.length);var g=0;if(s.length)for(var f=t.leftCol,m=r.columns.length,w=0;w<s[0].length;w++)for(var C=f+w+g;C<m&&!r.columns[C].visible;){g++;C++}var v=h?new CellRange(t.topRow,t.leftCol,Math.min(t.topRow+s.length-1,r.rows.length-1),Math.min(t.leftCol+s[0].length-1+g,r.columns.length-1)):t,y=new CellRangeEventArgs(r.cells,v,e);if(!r.onPasting(y))return!1;v=new CellRange(t.topRow,t.leftCol);var b=new CellRangeEventArgs(r.cells,new CellRange(t.topRow,-1)),R=!1,x=0,S=t.topRow,E=r.rows,j=r.columns,H=s.length>a,F=this._deferPaste(t,s.length);wijmo_1.assert(a>=1,"Invalid RPI value = "+a);r.deferUpdate((function(){var e=-1;if(l&&F){e=l.currentPosition;l.beginUpdate()}for(var i=0;i<u&&S<E.length;i++,S++){var o=E[S];if(o.isVisible){if(!H||!o.isReadOnly){var d=o.dataItem,c=l?l.currentEditItem:null;if(c&&d!=c){r.onRowEditEnding(b);r.onRowEditEnded(b)}if(o instanceof _NewRowTemplate&&l){if(F){o.dataItem=l.addNew();b._rng.setRange(r.newRowAtTop?0:S,-1);if(!r.onRowEditStarting(b)){S--;l.cancelNew();continue}r.onRowEditStarted(b)}else if(1==a||(S+1)%a==1||0==i){b._rng.setRange(r.newRowAtTop?S%a:S,-1);if(!r.onRowEditStarting(b)){S--;continue}r.onRowEditStarted(b)}}else if(d!=c){b._rng.setRange(S,-1);r.onRowEditStarting(b);r.onRowEditStarted(b)}for(var h=s[i],_=t.leftCol,p=0;p<h.length&&_<j.length;p++,_++){var g=j[_];if(g.isVisible){if(!H||!g.isReadOnly){var f=r.getMergedRange(r.cells,S,_,!1);if(!(f&&(f.leftCol!=_||f.topRow!=S))&&n._allowEdit(S,_)){var m=h[p],w=g.maxLength||o.maxLength;w&&(m=m.substr(0,w));var C=new CellRangeEventArgs(r.cells,new CellRange(S+x,_),m);if(r.onPastingCell(C)){if(l){l.editItem(d);n._edItem=l.currentEditItem}var y=r.getCellData(S,_,!1),z=C.data,T=softInput();if(T){var M=r._getBindingColumn(r.cells,S,r.columns[_]),G=M.editor,I=null,P=null;if(G instanceof T.InputNumber){I=G.clamp.bind(G);if(z!=G.text){G._oldText=G.text;G._setText(z)}z=G.text;P=wijmo_1.DataType.Number}else if(G instanceof T.InputDate||G instanceof T.InputTime){I=G._clamp.bind(G);P=wijmo_1.DataType.Date}if(I){z=wijmo_1.changeType(z,P,M.format,y);wijmo_1.getType(z)==P&&(z=I(z))}}if((r.pasteEmptyCells||""!==z)&&r.setCellData(S,_,z)){C.data=y;r.onPastedCell(C);R=!0}}v.row2=Math.max(v.row2,S+x);v.col2=Math.max(v.col2,_)}}}else p--}if(n._edItem&&l instanceof wijmo_1.CollectionView){var A=new wijmo_1.NotifyCollectionChangedEventArgs(wijmo_1.NotifyCollectionChangedAction.Change,n._edItem,S);l.onCollectionChanged(A,l._edtClone)}if(o instanceof _NewRowTemplate&&l)if(F){o.dataItem=null;if(R){b._rng.setRange(r.newRowAtTop?0:S,-1);r.onRowEditEnding(b);r.onRowEditEnded(b);S--;x++;l.commitNew()}else l.cancelNew()}else if(H&&a>1&&(S+1)%a==0&&R){b._rng.setRange(r.newRowAtTop?S%a:S,-1);r.onRowEditEnding(b);r.onRowEditEnded(b);S-=a;x++}}}else i--}if(l)if(F){if(l.currentEditItem){l.commitEdit();r.onRowEditEnding(b);r.onRowEditEnded(b)}l.moveCurrentToPosition(e);l.endUpdate(!0)}else{var D=l.currentAddItem;!D&&0==t.row&&r.newRowAtTop&&E[0]instanceof _NewRowTemplate&&E[0].dataItem&&"{}"!=JSON.stringify(E[0].dataItem)&&(D=E[0].dataItem);if(D){l.editItem(D);n._edItem=D}else E[0]instanceof _NewRowTemplate&&E[0].dataItem&&(E[0].dataItem=null)}v.rowSpan>1&&0==v.topRow&&E[0]instanceof _NewRowTemplate&&(v.row=v.row2=0);r.select(v)}));r.onPasted(y);if(R&&wijmo_1.closest(r.hostElement,"form")){var z=document.createEvent("HTMLEvents"),T=wijmo_1.createElement("<input>",r.hostElement);z.initEvent("change",!0,!1);T.dispatchEvent(z);wijmo_1.removeChild(T)}};_EditHandler.prototype._deferPaste=function(e,t){var i=this._g.rows,o=i.length;if(t>1){if(o>1&&i[0].dataItem!=i[1].dataItem)return!0;if(1==o&&i[0]instanceof _NewRowTemplate)return!0}return!1};_EditHandler.prototype._parseClipString=function(e){var t=[],i=(e=(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")).replace(/\n$/,"")).length,isTabOrNewLineChar=function(e){return"\n"===e||"\t"===e},o=0,n=0;for(o=0;o<i;o++){var r=!1,l=!1,s=!1;if('"'===e[o]){for(var a=o+1,d=!1;a<i;)if('"'===e[a]){if(!(a+1<i&&'"'===e[a+1])){d=!0;break}a+=2}else a++;d&&(r=!0)}for(n=o;n<i&&!s;n++){var c=e[n];if('"'===c)r&&(l=!l);else if(isTabOrNewLineChar(c)&&!l){this._parseClipCell(t,e,o,n,"\n"==c);o=n;n==i-1&&(o=n+1);s=!0}}if(n==i){this._parseClipCell(t,e,o,n,!1);break}}0==t.length&&t.push([""]);return t};_EditHandler.prototype._parseClipCell=function(e,t,i,o,n){e.length||e.push([]);var r=t.substr(i,o-i),l=r.length;if(l>2&&'"'==r[0]&&'"'==r[l-1]){var s=r.substr(1,l-2),unquotedStringHasChar=function(e){return s.indexOf(e)>-1};(unquotedStringHasChar('""')||unquotedStringHasChar("\t")||unquotedStringHasChar("\n"))&&(r=s.replace(/""/g,'"'))}else"\t"==r&&(r="");e[e.length-1].push(r);n&&e.push([])};_EditHandler.prototype._expandClipRows=function(e,t){for(var i=e.length,o=0,n=0;n<i;n++)o=Math.max(o,e[n].length);for(var r=this._g,l=0,s=0,a=r._getRowsPerItem(),d=t.topRow;d<=t.bottomRow;d++){r.rows[d].isVisible&&l++;if(0===d&&r.allowAddNew&&r.newRowAtTop&&a<=1)break}for(var c=t.leftCol;c<=t.rightCol;c++)r.columns[c].isVisible&&s++;if(l>1||s>1){1==l&&(l=i);1==s&&(s=o);if(s%o==0&&l%i==0){for(c=o;c<s;c++)for(d=0;d<i;d++)e[d].push(e[d%i][c%o]);for(d=i;d<l;d++)e.push(e[d%i])}}};_EditHandler.prototype._updateEditorCell=function(e,t,i){var o=this._g;if(o._useFrozenDiv()&&(o.rows.isFrozen(e)||o.columns.isFrozen(t))||o.columns._frozenInternal<0||o._hasPendingUpdates())o.refresh(!1);else{var n=o.cells.getCellElement(e,t);if(n&&o.onUpdatingView(new wijmo_1.CancelEventArgs)){this._updateCell(n);(i||o._getHasValidation())&&this._updateRowHeaderCell(e);o.onUpdatedView()}}};_EditHandler.prototype._updateRowHeaderCell=function(e){var t=this._g;if(t.headersVisibility&HeadersVisibility.Row){var i=t.rowHeaders,o=t._getEditColumnIndex(),n=i.getCellElement(e,o);n&&this._updateCell(n)}};_EditHandler.prototype._updateCell=function(e){var t=new HitTestInfo(e,null),i=FlexGrid._WJS_UPDATING;if(t.panel){wijmo_1.addClass(e,i);t.grid.cellFactory.updateCell(t.panel,t.row,t.col,e,t.range);wijmo_1.removeClass(e,i)}};_EditHandler.prototype._getValidationError=function(e){var t=this,i=this._g,o="";if(i&&this._rng&&!this._validating){var n=this._rng.row,r=this._rng.col,l=i.activeEditor,s=i.cellFactory.getEditorValue(i),a=i.getCellData(n,r,!1);e&&(o=i._getError(i.cells,n,r,!0));if(!o&&i._getHasValidation()){l&&(o=l.validationMessage);if(!o){var d=i.columns[r],c=i.rows[n];!i._getBindingColumn(i.cells,n,d).getIsRequired(c)||null!=s&&""!==s||(o=this._getRequiredMsg())}if(!o&&i.setCellData(n,r,s,!0,!1)){o=i._getError(i.cells,n,r,!1);i.setCellData(n,r,a,!1,!1)}}if(!o){var u=wijmo_1.Control.getControl(wijmo_1.closest(l,"."+wijmo_1.ControlClsNames.hostElement));u==i&&wijmo_1.hasClass(l,exports.FlexGridClsNames.gridIme)&&null!=i.activeCell&&(u=i.activeCell.firstChild["$WJ-CTRL"]);if(u&&u!=i&&u.invalidInput.hasHandlers){this._invInputHandler=function(e,l){if(l.cancel){o=i._getError(i.cells,n,r,!0)||t._getBadInputMsg();l.cancel=""!=o}};this._validating=!0;var h=l.value;u.invalidInput.addHandler(this._invInputHandler);if(u._containsFocus()){var _=wijmo_1.closest(u.hostElement,"."+exports.FlexGridClsNames.cell);_&&_.focus()}var p=u.isDroppedDown;u.onLostFocus();u.invalidInput.removeHandler(this._invInputHandler);l.value=h;if(o)l.select();else if(p){u.isDroppedDown=!0;l.select()}this._validating=!1}}}return o};Object.defineProperty(_EditHandler.prototype,"validate",{get:function(){return!this._getValidationError()},enumerable:!0,configurable:!0});_EditHandler.prototype._getRequiredMsg=function(){if(!_EditHandler._msgRequired){var e=document.createElement("input");e.required=!0;_EditHandler._msgRequired=e.validationMessage}return _EditHandler._msgRequired};_EditHandler.prototype._getBadInputMsg=function(){if(!_EditHandler._msgBadInput){var e=document.createElement("input");e.pattern="x";e.value="a";_EditHandler._msgBadInput=e.validationMessage||"Bad Input"}return _EditHandler._msgBadInput};_EditHandler.prototype._allowEdit=function(e,t){var i=this._g;if(i.isReadOnly||i.selectionMode==SelectionMode.None)return!1;if(i.collectionView&&!i.editableCollectionView)return!1;if(null!=e){if(e<0||e>=i.rows.length)return!1;var o=i.rows[e];if(!o||o.isReadOnly||!o.isVisible)return!1}if(null!=t){if(t<0||t>=i.columns.length)return!1;var n=i._getBindingColumn(i.cells,e,i.columns[t]);if(!n||n.isReadOnly||!n.isVisible)return!1}return!0};_EditHandler.prototype._commitRowEdits=function(){var e=this._g;if(this.finishEditing()&&this._edItem){var t=e.editableCollectionView;if(t&&(t.currentEditItem||t.currentAddItem)){var i=new CellRangeEventArgs(e.cells,e.selection);e.onRowEditEnding(i);t.commitEdit();e.onRowEditEnded(i)}this._edItem=null}};_EditHandler.prototype._keydown=function(e){var t=this._edt;switch(e.keyCode){case wijmo_1.Key.F2:this._fullEdit=!this._fullEdit;e.preventDefault();return!0;case wijmo_1.Key.F4:this._toggleListBox(e);e.preventDefault();return!0;case wijmo_1.Key.Space:if(t&&"checkbox"==t.type&&!t.disabled&&!t.readOnly){wijmo_1.setChecked(t,t.indeterminate||!t.checked);this.finishEditing();e.preventDefault()}return!0;case wijmo_1.Key.Enter:e.preventDefault();if(t&&e.altKey){var i=e.target;if(i instanceof HTMLTextAreaElement&&"soft"==i.wrap){if(this._composing){i.blur();i.focus()}i.style.setProperty("ime-mode","auto","important");var o=i.value,n=i.selectionStart,r=i.selectionEnd;i.value=o.substr(0,n)+"\n"+o.substr(r);wijmo_1.setSelectionRange(i,n+1);i.blur();i.focus();i.style.imeMode=""}return!0}if(t&&this._lbx){var l=this._g,s=l._selHdl.selection,a=l.rows[s.row],d=l._getBindingColumn(l.cells,s.row,l.columns[s.col]);null!=t.value&&(t.value!=this._lbx.selectedValue&&0!=(wijmo_1.isString(this._lbx.selectedValue)&&this._lbx.selectedValue.indexOf(t.value))||""==t.value&&null!=this._lbx.selectedValue||(this._lbx_SelectedValue=this._findKeyValue(a.dataMap||d.dataMap,d.isContentHtml||a.isContentHtml)));this._toggleListBox(e);this.finishEditing();return!0}return!this.finishEditing();case wijmo_1.Key.Tab:e.preventDefault();return!this.finishEditing();case wijmo_1.Key.Escape:e.preventDefault();this.finishEditing(!0);return!0;case wijmo_1.Key.Up:case wijmo_1.Key.Down:case wijmo_1.Key.Left:case wijmo_1.Key.Right:case wijmo_1.Key.PageUp:case wijmo_1.Key.PageDown:case wijmo_1.Key.Home:case wijmo_1.Key.End:if(this._lbx)return this._keydownListBox(e);if(e.altKey)switch(e.keyCode){case wijmo_1.Key.Up:case wijmo_1.Key.Down:this._toggleListBox(e);e.preventDefault();return!0}if(this._fullEdit)switch(e.keyCode){case wijmo_1.Key.PageUp:case wijmo_1.Key.PageDown:e.preventDefault()}else if(this.finishEditing())return!1}return!0};_EditHandler.prototype._keydownListBox=function(e){var t=!0;if(this._lbx)switch(e.keyCode){case wijmo_1.Key.Up:e.altKey?this._toggleListBox(e):this._lbx.selectedIndex>0&&this._lbx.selectedIndex--;break;case wijmo_1.Key.Down:e.altKey?this._toggleListBox(e):this._lbx.selectedIndex++;break;case wijmo_1.Key.Home:case wijmo_1.Key.PageUp:this._lbx.selectedIndex=0;break;case wijmo_1.Key.End:case wijmo_1.Key.PageDown:this._lbx.selectedIndex=this._lbx.collectionView.items.length-1;break;default:t=!1}if(t){e.preventDefault();return!0}return!1};_EditHandler.prototype._keypress=function(e){if("AltLeft"!=e.code&&"AltRight"!=e.code){var t=this._edt,i=null!=e.key&&e.key.length>0?e.key.charCodeAt(0):32,o=this._list;if(wijmo_1.isEdge()){var n=t;n&&(1==n.value.length||0==n.selectionStart&&n.selectionEnd==n.value.length)&&(wijmo_1.Control.sharedState.InvalidScroll=!0)}if(t&&"checkbox"!=t.type&&wijmo_1.getActiveElement()==t&&o&&o.length>0&&i>=32){var r=t.selectionStart,l=t.value.substr(0,r);if(""==l&&null==e.key)return;if(e.target==t&&i){l+=String.fromCharCode(i);r++}var s=this._mapSearch,a=-1,d=this._map;if(s)for(var c=0;c<o.length;c++){var u=o[c];if(s(null==u?u:u.toString(),l)){a=c;break}}else d&&d.useFilter?(a=this._findStringInObjArray(o,d.displayMemberPath,l,!0))<0&&!this._g.caseSensitiveSearch&&(a=this._findStringInObjArray(o,d.displayMemberPath,l,!1)):(a=this._findString(o,l,!0))<0&&!this._g.caseSensitiveSearch&&(a=this._findString(o,l,!1));if(a>-1){var h=this._lbx;h&&(h.selectedIndex=a);var _=null;_=d&&d.useFilter?o[a][d.displayMemberPath]:o[a];t.value=_;wijmo_1.setSelectionRange(t,r,t.value.length);t.dispatchEvent(this._evtInput);e.preventDefault&&e.preventDefault()}else this._lbx&&(this._lbx_SelectedValue=null)}}else e.preventDefault()};_EditHandler.prototype._findString=function(e,t,i){i||(t=t.toLowerCase());for(var o=0;o<e.length;o++){var n=e[o];if(null!=n){n=n.toString();i||(n=n.toLowerCase());if(0==n.indexOf(t))return o}}return-1};_EditHandler.prototype._findStringInObjArray=function(e,t,i,o){o||(i=i.toLowerCase());for(var n=0;n<e.length;n++){var r=e[n];if(null!=r){r=r[t].toString();o||(r=r.toLowerCase());if(0==r.indexOf(i))return n}}return-1};_EditHandler.prototype._toggleListBox=function(e,t){var i=this._g,o=i._selHdl.selection,n=i.isTouching;t||(t=o);if(this._lbx){this._removeListBox();if(o.intersects(t)){i.activeEditor?i.activeEditor.focus():i.containsFocus()||i.focus();return!0}}if(!t.isValid)return!1;var r=i.rows[t.row],l=i._getBindingColumn(i.cells,t.row,i.columns[t.col]),s=r.dataMap||l.dataMap,a=i._getMapEditor(r,l);if(!s||a!=DataMapEditor.DropDownList&&a!=DataMapEditor.Menu||!softInput())return!1;if(null!=l.editor)return!1;if(!t.intersects(i.editRange)&&!this.startEditing(!0,t.row,t.col,!n,e))return!1;var d=this._lbx=this._createListBox();requestAnimationFrame((function(){return d.showSelection()}));n&&d.focus();return!0};_EditHandler.prototype._createListBox=function(){var e=this,t=this._g,i=t.activeEditor,o=this._rng,n=t.rows[o.row],r=t._getBindingColumn(t.cells,o.row,t.columns[o.col]),l=r.isContentHtml||n.isContentHtml,s=r.dataMap||n.dataMap,a=r.dropDownCssClass||n.dropDownCssClass,d=document.createElement("div");this._removeListBox();wijmo_1.addClass(d,mInput.DropDownClsNames.dropDownPanel+" "+exports.FlexGridClsNames.gridListBox);wijmo_1.addClass(d,a);wijmo_1.setAttribute(d,"dir",t.rightToLeft?"rtl":"ltr");var c=i?i.value:t.getCellData(o.row,o.col,!0),u=new mInput.ListBox(d,{maxHeight:n.renderHeight*_LB_PAGE_SIZE,isContentHtml:l}),h=t.getRowDataItem(o.row,o.col);if(s.useFilter){u.itemsSource=s.getFilteredItems(h);u.displayMemberPath=s._displayPath;u.selectedValuePath=s._keyPath}else u.itemsSource=s.getDisplayValues(h);if(s._displayPath==s._keyPath)u.selectedValue=c;else{var _=t.getCellData(o.row,o.col,!1),p=-1,g=this._findDuplicateValues(s,c,l),f=s._cv.items.findIndex((function(t){return e.isEqualValue(t[s._keyPath],_,l)}));if(f>-1){var m=s._cv.items[f][s._displayPath];if(this.isEqualValue(c,m,l))if(1==g.length)p=f>=u.itemsSource.length||!this.isEqualValue(this._getListBoxItemField(u,s.useFilter,f),c,l)?u.itemsSource.findIndex((function(t){return e.isEqualValue(m,s.useFilter?t[u.displayMemberPath]:t,l)})):f;else for(var w=-1,C=0;C<u.itemsSource.length;C++)if(this.isEqualValue(this._getListBoxItemField(u,s.useFilter,C),m,l)){w++;if(this.isEqualValue(g[w],_,l)){p=C;break}}}p<0&&(p=u.itemsSource.findIndex((function(t){return e.isEqualValue(c,s.useFilter?t[u.displayMemberPath]:t,l)})));p>=0?u.selectedIndex=p:u.selectedValue=null}u.addEventListener(d,"keydown",(function(i){switch(i.keyCode){case wijmo_1.Key.Enter:case wijmo_1.Key.Escape:e._removeListBox();t.focus()}}));u.addEventListener(d,"click",(function(){e._lbx&&(e._lbx_SelectedValue=e._findKeyValue(s,l));e._removeListBox();t.focus();e.finishEditing()}));u.gotFocus.addHandler((function(){u.containsFocus()&&i&&!wijmo_1.isEdge()&&i.focus()}));u.selectedIndexChanged.addHandler((function(){var i=t.activeEditor;if(i){var o=e._map,n=null==o?null:o._displayPath,r=e._list[u.selectedIndex];i.value=void 0===r||null==r?"":"object"==typeof r&&null!=n&&void 0!==r[n]?r[n]:r;i.dispatchEvent(e._evtInput);wijmo_1.setSelectionRange(i,0,i.value.length)}}));var v=t.cells.getCellElement(o.row,o.col);if(v){wijmo_1.showPopup(d,v,!1,!1,!1);var y=v.querySelector("."+CellFactory._WJC_DROPDOWN);wijmo_1.setAttribute(y,"aria-expanded",!0)}else{wijmo_1.showPopup(d,t.getCellBoundingRect(o.row,o.col));d[wijmo_1.Control._OWNR_KEY]=t.hostElement}return u};_EditHandler.prototype._getListBoxItemField=function(e,t,i){return i>=e.itemsSource.length?null:t?e.itemsSource[i][e.displayMemberPath]:e.itemsSource[i]};_EditHandler.prototype._findKeyValue=function(e,t){void 0===t&&(t=!1);if(e.useFilter){if(this._lbx.selectedValue)return this._lbx.selectedValue;if(this._lbx.selectedItem&&this._lbx.selectedValuePath)return this._lbx.selectedItem[this._lbx.selectedValuePath]}var i=this._lbx.selectedValue,o=this._findDuplicateValues(e,i,t),n=e.getKeyValue(i);if(this._lbx.selectedIndex>0&&o.length>1){for(var r=-1,l=0;l<=this._lbx.selectedIndex;l++)this.isEqualValue(this._lbx.itemsSource[l],i,t)&&r++;r>=0&&(n=o[r])}return n};_EditHandler.prototype._findDuplicateValues=function(e,t,i){void 0===i&&(i=!1);for(var o=[],n=e.getKeyValues(),r=0;r<n.length;r++)this.isEqualValue(e.getDisplayValue(n[r]),t,i)&&o.push(n[r]);return o};_EditHandler.prototype._removeListBox=function(){var e=this._lbx;if(e){this._lbx=null;wijmo_1.hidePopup(e.hostElement,(function(){e.dispose()}))}};_EditHandler.prototype.isEqualValue=function(e,t,i){void 0===i&&(i=!1);if(e instanceof Date&&t instanceof Date)return e.getTime()==t.getTime();null!=e&&null!=e||(e="");null!=t&&null!=t||(t="");Number.isNaN(e)&&(e="NaN");Number.isNaN(t)&&(t="NaN");if(i){wijmo_1.isString(e)&&e.indexOf("<")>-1&&(e=wijmo_1.toPlainText(e));wijmo_1.isString(t)&&t.indexOf("<")>-1&&(t=wijmo_1.toPlainText(t))}return e.toString()==t.toString()};_EditHandler.prototype._selectionChanging=function(e){var t=this;if(!this._g.isReadOnly)if(this.finishEditing()){var i=this._g._selHdl.selection.row;if(i!=e.row){var o=this._g.rows.length;if((i>-1&&i<o?this._g.rows[i].dataItem:null)!=(e.row>-1&&e.row<o?this._g.rows[e.row].dataItem:null)){var n=!this._g.rows[i]||this._g.rows[i]&&Object.getPrototypeOf(this._g.rows[i])!==Row.prototype?null:this._g.getEmptyRequiredCell(i);if(this._g.isAddingInvalidNewRow(i)){this._startEditingTimer=setTimeout((function(){t._g.select(new CellRange(i,n));t.startEditing(!0,i,n,!0,e)}));e.cancel=!0}else this._commitRowEdits()}}}else e.cancel=!0};_EditHandler.prototype.dispose=function(){if(this._g){this._g.selectionChanging.removeHandler(this._selectionChangingHandler);this._g.lostFocus.removeHandler(this._lostFocusHandler);var e=this._g.hostElement;this._g.removeEventListener(e,"mousedown",this._mousedownHandler,!0);this._g.removeEventListener(e,"compositionend",this._compositionendHandler);this._g.removeEventListener(e,"compositionstart",this._compositionstartHandler)}var t=wijmo_1.Control.getControl(wijmo_1.closest(this._g.activeEditor,"."+wijmo_1.ControlClsNames.hostElement));t&&t.invalidInput.removeHandler(this._invInputHandler);this._lbx&&this._removeListBox();if(this._selectTimer){clearTimeout(this._selectTimer);this._selectTimer=null}if(this._startEditingTimer){clearTimeout(this._startEditingTimer);this._startEditingTimer=null}if(this._addRangeTimer){clearTimeout(this._addRangeTimer);this._addRangeTimer=null}wijmo_1.removeChild(this._edt);this._edt=null;this._edItem=null;this._list=null;this._map=null;this._g=null};_EditHandler._msgRequired="";_EditHandler._msgBadInput="";return _EditHandler}();exports._EditHandler=_EditHandler;var AllowResizing,AutoSizeMode,AllowDragging,_AR_ALLCELLS=4,_AR_OVERFLOW=8,_WJC_DRAGSRC=wijmo_1.ControlStateClsNames.dragSrc,_WJC_FLEXGRID=exports.FlexGridClsNames.hostElement;!function(e){e[e.None=0]="None";e[e.Columns=1]="Columns";e[e.Rows=2]="Rows";e[e.Both=3]="Both";e[e.ColumnsAllCells=e.Columns|_AR_ALLCELLS]="ColumnsAllCells";e[e.RowsAllCells=e.Rows|_AR_ALLCELLS]="RowsAllCells";e[e.BothAllCells=e.Both|_AR_ALLCELLS]="BothAllCells";e[e.ColumnsOverflow=e.Columns|_AR_OVERFLOW]="ColumnsOverflow";e[e.RowsOverflow=e.Rows|_AR_OVERFLOW]="RowsOverflow";e[e.BothOverflow=e.Both|_AR_OVERFLOW]="BothOverflow";e[e.ColumnsAllCellsOverflow=e.ColumnsAllCells|_AR_OVERFLOW]="ColumnsAllCellsOverflow";e[e.RowsAllCellsOverflow=e.RowsAllCells|_AR_OVERFLOW]="RowsAllCellsOverflow";e[e.BothAllCellsOverflow=e.BothAllCells|_AR_OVERFLOW]="BothAllCellsOverflow"}(AllowResizing=exports.AllowResizing||(exports.AllowResizing={}));!function(e){e[e.None=0]="None";e[e.Headers=1]="Headers";e[e.Cells=2]="Cells";e[e.Both=3]="Both"}(AutoSizeMode=exports.AutoSizeMode||(exports.AutoSizeMode={}));!function(e){e[e.None=0]="None";e[e.Columns=1]="Columns";e[e.Rows=2]="Rows";e[e.Both=3]="Both"}(AllowDragging=exports.AllowDragging||(exports.AllowDragging={}));var _MouseHandler=function(){function _MouseHandler(e){var t=this;this._wasAllRowColHidden=!1;this._scrollbarStatusAtMouseDown=null;this._mousedownPoint=null;var i=e.hostElement,o=e.addEventListener.bind(e),n=e.removeEventListener.bind(e);this._g=e;o(i,"mousedown",(function(i){e._rcBounds=null;var r=i.target,l=wijmo_1.closestClass(r,_WJC_FLEXGRID),s=i.defaultPrevented&&null!=wijmo_1.closestClass(r,CellFactory._WJC_DROPDOWN);if(s&&null==(l=wijmo_1.closestClass(document.activeElement,_WJC_FLEXGRID))){var a=wijmo_1.Control.getControl(document.activeElement),d=null;a&&a.hostElement&&(a.hostElement["$WJ-OWNR"]&&a.hostElement["$WJ-OWNR"]["$WJ-CTRL"]?d=a.hostElement["$WJ-OWNR"]["$WJ-CTRL"].inputElement:a.hostElement.parentElement&&a.hostElement.parentElement["$WJ-OWNR"]&&a.hostElement.parentElement["$WJ-OWNR"]["$WJ-CTRL"]&&(d=a.hostElement.parentElement["$WJ-OWNR"]["$WJ-CTRL"].inputElement));l=wijmo_1.closestClass(d,_WJC_FLEXGRID)}var c=l&&l!=e.hostElement,u=c&&(l[wijmo_1.Control._CTRL_KEY]._imeHdl||e.imeEnabled);if((!i.defaultPrevented||u||s)&&0==i.button){if(!i.defaultPrevented){var h=t._g.activeCell;if(!e.containsFocus()||!h||h.classList.contains(wijmo_1.ControlStateClsNames.selected)){var _=r instanceof HTMLElement&&r.tabIndex>-1?r:e._eFocus;e._setFocusNoScroll(_)}t._focusTimer=setTimeout((function(){i.defaultPrevented||e.focus()}))}var p=e.hitTest(i),g=CellType;if(c||!e.activeEditor&&e._isInputElement(r)&&!t._hasRadioMap(i)&&!e._isNativeCheckbox(r)||s){switch(p.cellType){case g.Cell:if(c&&s||c||!e.activeEditor&&e._isInputElement(r)&&!t._hasRadioMap(i)&&!e._isNativeCheckbox(r)){var f=e.getMergedRange(p.panel,p.row,p.col,!1);e.select(null!=f?f:p.range,!1)}!i.defaultPrevented&&r instanceof HTMLElement&&"root"!=r.getAttribute("wj-part")&&r.focus();break;case g.ColumnHeader:case g.ColumnFooter:e.scrollIntoView(-1,p.col);break;case g.RowHeader:e.scrollIntoView(p.row,-1)}!i.defaultPrevented&&wijmo_1.isIE()&&p.cellType!=g.Cell&&e._isInputElement(r)&&r.focus();t._isDown=!0;t._htDown=p;return}if(e._isNativeCheckbox(r)&&wijmo_1.hasClass(r,"wj-column-selector")&&(p.cellType===g.RowHeader||p.cellType===g.ColumnHeader))return;var m=document;n(m,"mousemove");n(m,"mouseup");o(m,"mousemove",mouseMove);o(m,"mouseup",mouseUp);t._isDown=!0;t._mousedown(i)}}));var mouseMove=function(e){t._mousemove(e)},mouseUp=function(e){t._isDown=!1;n(document,"mousemove");n(document,"mouseup");t._mouseup(e)};o(i,"mouseenter",(function(t){e._rcBounds=null}));o(i,"mousemove",this._hover.bind(this));o(i,"dblclick",this._dblclick.bind(this));o(i,"click",this._click.bind(this));o(i,"selectstart",(function(t){e._isInputElement(t.target)||t.preventDefault()}));wijmo_1.isSafari()&&o(i,"mousewheel",(function(t){t.defaultPrevented||!t.wheelDeltaY||t.ctrlKey||t.metaKey||(e._isScrollingByWheel=!0)}));o(i,"wheel",(function(i){if(!i.defaultPrevented&&i.deltaY&&!i.ctrlKey&&!i.metaKey){var o=e._root,n=i.deltaY;if((i.shiftKey?o.scrollWidth>o.clientWidth:o.scrollHeight>o.clientHeight)&&wijmo_1.closestClass(i.target,_WJC_FLEXGRID)==e.hostElement){switch(i.deltaMode){case 1:n=e.rows.defaultSize*(n<0?-1:1);break;case 2:n=(i.shiftKey?o.clientWidth:o.clientHeight)*(n<0?-1:1);break;case 0:default:wijmo_1.isSafari()&&(n=wijmo_1.clamp(n,-150,150))}e._isScrollingByWheel=!0;wijmo_1.isEdge()&&(wijmo_1.Control.sharedState.InvalidScroll=!1);e.finishEditing(!1)&&(i.shiftKey?o.scrollLeft+=n:o.scrollTop+=n);clearTimeout(t._mouseWhellTimer);t._mouseWhellTimer=setTimeout((function(){e._isScrollingByWheel=!1}),1);i.preventDefault();i.stopImmediatePropagation()}}}));o(i,"dragstart",this._dragstart.bind(this));o(i,"dragover",this._dragover.bind(this));o(i,"dragleave",this._dragleave.bind(this));o(i,"drop",this._drop.bind(this));o(i,"dragend",this._dragend.bind(this))}_MouseHandler.prototype.resetMouseState=function(){var e=this._g,t=e.hostElement;if(this._updating){this._updating=!1;e.endUpdate()}this._dragSrc&&wijmo_1.removeClass(this._dragSrc,_WJC_DRAGSRC);this._showDragMarker(null);t&&(t.style.cursor="");wijmo_1.isSafari()&&this._szRowCol&&e.invalidate();e.removeEventListener(document,"mousemove");e.removeEventListener(document,"mouseup");this._eMouse=null;this._isDown=null;this._htDown=null;this._scrollbarStatusAtMouseDown=null;this._lbSelState=null;this._lbSelStateRows={};this._lbSel=null;this._szRowCol=null;this._szArgs=null;e._rcBounds=null;this._anchorCol=-1;this._mousedownPoint=null};_MouseHandler.prototype._mousedown=function(e){var t=this._g,i=e.target,o=t.hitTest(e),n=o.cellType,r=CellType,l=e.ctrlKey||e.metaKey;this._mousedownPoint={x:e.clientX,y:e.clientY};this._selDown=t.selection;this._selPanelType=t.activePanelType;this._ignoreClick=!1;if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid){if(wijmo_1.closestClass(i,CellFactory._WJC_DROPDOWN)){var s=t.hitTest(i);s.range&&this._selDown&&(!t.editRange||t.editRange.contains(o.row,o.col))||t.finishEditing();t._ensureEditSelectionForParentGrid();t._edtHdl._toggleListBox(e,s.range);e.preventDefault();this._ignoreClick=!0;return}var a=t.editRange;if(a&&a.contains(o.range)){wijmo_1.Control.sharedState.InvalidScroll=wijmo_1.isEdge();return}}var d=wijmo_1.getActiveElement();if(i!=d||!t._isInputElement(i))if(n!=r.None){this._htDown=o;this._eMouse=e;this._anchorCol=o.col;this._scrollbarStatusAtMouseDown={row:t._hasScroll(t.rows),col:t._hasScroll(t.columns)};if(o.panel){var c={height:t._root.clientHeight,width:t._root.clientWidth},u={height:t.cells.hostElement.clientHeight,width:t.cells.hostElement.clientWidth};this._szInitial={row:o.getRow().renderHeight,col:o.getColumn().renderWidth,canHaveHScrl:c.width-t.rowHeaders.columns.getTotalSize()-u.width!=0,canHaveVScrl:c.height-t.columnHeaders.rows.getTotalSize()-u.height!=0}}else this._szInitial=null;if(null==this._szRowCol){var h=t.allowResizing,_=AllowResizing;if((n==r.RowHeader||n==r.TopLeft)&&(o.edgeTop||o.edgeBottom)&&h&_.Rows&&this._getResizeRowHt(o))this._ignoreClick=!0;else if((n==r.ColumnHeader||n==r.TopLeft)&&(o.edgeLeft||o.edgeRight)&&h&_.Columns&&this._getResizeColHt(o))this._ignoreClick=!0;else{var p=t.allowDragging,g=AllowDragging;switch(n){case r.Cell:case r.RowHeader:if(l&&t.selectionMode==SelectionMode.ListBox){this._lbSelState=t.rows[o.row].isSelected;wijmo_1.closest(i,"."+exports.FlexGridClsNames.elemCollapse)&&(this._lbSelState=!1)}this._mouseSelect(e,e.shiftKey);if(n==r.RowHeader&&!(p&g.Rows)){e.preventDefault();t.focus()}break;case r.ColumnHeader:t.allowSorting||p&g.Columns||wijmo_1.closest(i,"button")||this._mouseSelect(e,e.shiftKey)}}}else{var f=t._eFocus;if(d!=f){f.tabIndex=0;f.focus()}this._ignoreClick=!0;this._handleResizing(e)}}else{t.finishEditing();i!=t._root&&i!=t._fCt&&t._edtHdl._commitRowEdits()}};_MouseHandler.prototype._mousemove=function(e){null==this._htDown&&wijmo_1.isEdge()&&(wijmo_1.Control.sharedState.InvalidScroll=!1);if(this._htDown&&!e.defaultPrevented){if(0==e.buttons&&this._eMouse&&e.timeStamp-this._eMouse.timeStamp>600){this.resetMouseState();return}this._eMouse=e;var t=!1;if(this._szRowCol){this._handleResizing(e);t=!0}else{var i=this._g,o=i.allowDragging,n=AllowDragging,r=CellType;switch(this._htDown.cellType){case r.Cell:this._mouseSelect(e,!0);t=!0;break;case r.RowHeader:if(!(o&n.Rows)){this._mouseSelect(e,!0);t=!0}break;case r.ColumnHeader:if(!(o&n.Columns||i.allowSorting)){this._mouseSelect(e,!0);t=!0}}}t&&wijmo_1.isMobile()&&e.preventDefault()}};_MouseHandler.prototype._mouseup=function(e){var t=this._g;if(!t.isTouching||!(this._dragSrc||e.target instanceof HTMLHtmlElement)){var i=t.hitTest(e),o=this._htDown;if(o&&!e.defaultPrevented){this._mousedownPoint&&t.isTouching&&e.clientX===this._mousedownPoint.x&&e.clientY===this._mousedownPoint.y&&(this._ignoreClick=!1);this._szArgs&&this._finishResizing(e,t._getRangesToResize(e,!1));if(!this._szArgs&&(null==i.panel&&null==o.panel||i.panel&&o.panel&&i.panel._uid==o.panel._uid)&&i.row==o.row&&i.col==o.col){var n=i.getColumn();if(n){if(!(n._getFlag(RowColFlags.HasTemplate)&&!n.cellTemplate)){var r=i.target;if(r!=o.target&&r instanceof HTMLElement){if(o.target instanceof HTMLInputElement){var l=i.point,s=o.point;Math.abs(l.x-s.x)+Math.abs(l.y-s.y)<10&&(r=r.querySelector("input")||r)}var a=document.createEvent("Event");a.initEvent("click",!0,!0);for(var d in e)/Key$|X$|Y$|^button|^(x|y|which)$/.test(d)&&(a[d]=e[d]);r.dispatchEvent(a)}}}}}this.resetMouseState()}};_MouseHandler.prototype._click=function(e){if(this._ignoreClick){this._ignoreClick=!1;e.preventDefault()}if(!e.defaultPrevented){var t=this._g,i=e.target,o=t.hitTest(i),n=wijmo_1.tryCast(i,HTMLInputElement),r="input."+CellFactory._WJC_CHECKBOX;if(!n){var l=wijmo_1.closest(i,"label");l&&(n=l.querySelector(r))}!n&&t.bigCheckboxes&&(n=i.querySelector(r));if(t._isNativeCheckbox(n)){if(n!=t.activeEditor){if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid){var s=t.getCellData(o.row,o.col,!1);if(t.startEditing(!1,o.row,o.col,!1,e)){t.activeEditor.checked=!s;t.finishEditing();t.focus()}else"boolean"!=typeof s&&null!=s||(n.checked=s)}}else t.finishEditing();return}if(this._hasRadioMap(e)){this._handleClick(e);return}var a=e.ctrlKey||e.metaKey;if(t.rows.maxGroupLevel>-1&&wijmo_1.closestClass(i,CellFactory._WJC_COLLAPSE)){var d=t.rows[o.row];if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid&&d instanceof GroupRow){if(!d.hasChildren)return;a?t.collapseGroupsToLevel(d.isCollapsed?d.level+1:d.level):d.isCollapsed=!d.isCollapsed;t.scrollIntoView(o.row,-1);return}}if(!(a||e.shiftKey||t.activeEditor||t.activePanelType!==CellType.Cell||t._isInputElement(i))&&(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid)){var c=t._selHdl.selection,u=c.equals(this._selDown);if(!u&&t.cells){var h=this._selDown?t.getMergedRange(t.cells,this._selDown.row,this._selDown.col):null;if(h){var _=t.getMergedRange(t.cells,c.row,c.col);u=_&&_.equals(h)}}if(u&&this._selPanelType===CellType.Cell&&o.range.contains(c)){t.startEditing(!0,null,null,!0,e);return}}this._handleClick(e)}};_MouseHandler.prototype._handleClick=function(e){var t=this._g,i=e.target,o=t.hitTest(i),n=e.ctrlKey||e.metaKey,r=o.panel;if(!e.defaultPrevented&&o.grid&&t&&o.grid._uid==t._uid){if(r&&t.cells&&r._uid==t.cells._uid&&this._hasRadioMap(e)){var l=t._getBindingColumn(o.panel,o.row,o.getColumn()),s=wijmo_1.closest(i,"label"),a=s&&s.querySelector("input"),d=a&&parseInt(a.getAttribute("data-idx")),c=o.getColumn().dataMap||l&&l.dataMap||o.getRow().dataMap,u=void 0;null!=d&&(u=c._cv.items[d][c.selectedValuePath]);a&&!a.disabled&&t.startEditing(!1,o.row,o.col,!1,e)&&t.finishEditing()&&(t._edtHdl._edtCanceled?e.preventDefault():t.cells.setCellData(o.row,o.col,void 0!==u?u:s.textContent,!0,t.refreshOnEdit,void 0!==u));return}if(!t._isInputElement(i)){if(r&&t.topLeftCells&&r._uid==t.topLeftCells._uid){var h=SelectionMode;switch(t.selectionMode){case h.None:case h.Cell:break;default:t.selectAll()}return}if(r&&t.columnHeaders&&r._uid==t.columnHeaders._uid){if(t.allowPinning&&wijmo_1.closestClass(i,CellFactory._WJC_PIN))this._clickPin(e,o);else if(!t._isTransposed()&&wijmo_1.closestClass(e.target,CellFactory._WJC_COLLAPSE)){if(m=t._getColumnGroup(o.row,o.col))if(n){for(var _=m.isCollapsed,p=m.level,g=[],f=0;f<t.columns.length;f++)if((m=t._getColumnGroup(o.row,f))&&m.collapseTo&&m.level==p&&g.indexOf(m)<0){g.push(m);m.isCollapsed=!_}}else m.isCollapsed=!m.isCollapsed;t.scrollIntoView(-1,o.col)}else{i instanceof HTMLSpanElement&&i.parentElement instanceof HTMLLabelElement&&(i=i.parentElement.querySelector("input"));i instanceof HTMLInputElement||this._clickSort(e,o);t.focus();t.scrollIntoView(-1,o.col)}return}if(r&&t.rowHeaders&&r._uid==t.rowHeaders._uid){if(t._isTransposed()&&wijmo_1.closestClass(e.target,CellFactory._WJC_COLLAPSE)){var m;if(m=t._getColumnGroup(o.row,o.col))if(n){_=m.isCollapsed,p=m.level,g=[];for(var w=0;w<t.rows.length;w++)if((m=t._getColumnGroup(w,o.col))&&m.collapseTo&&m.level==p&&g.indexOf(m)<0){g.push(m);m.isCollapsed=!_}}else m.isCollapsed=!m.isCollapsed}return}if(r&&t.cells&&r._uid==t.cells._uid){if(o.row<0){this._clickSort(e,o);return}if(wijmo_1.closestClass(i,CellFactory._WJC_COLLAPSE)){var C=t.rows[o.row];C instanceof GroupRow&&(n?t.collapseGroupsToLevel(C.isCollapsed?C.level+1:C.level):C.isCollapsed=!C.isCollapsed);return}wijmo_1.closestClass(i,CellFactory._WJC_DROPDOWN)&&t._edtHdl._toggleListBox(e,o.range)}}}};_MouseHandler.prototype._hasRadioMap=function(e){var t=e.target;if(wijmo_1.closest(t,"label")){var i=wijmo_1.closestClass(t,CellFactory._WJC_RADIOMAP);return wijmo_1.closestClass(i,_WJC_FLEXGRID)==this._g.hostElement}return!1};_MouseHandler.prototype._clickSort=function(e,t){var i=e.ctrlKey||e.metaKey,o=e.shiftKey;toggleColumnSort(this._g,t.panel,t.col,t.row,e,i,o)};_MouseHandler.prototype._clickPin=function(e,t){toggleColumnPinning(this._g,t.col,t.row,!0,e.shiftKey)};_MouseHandler.prototype._dblclick=function(e){if(!e.defaultPrevented){var t,i=this._g,o=i.hitTest(e),n=e.ctrlKey||e.metaKey,r=o.range,l=o.cellType,s=CellType,a=i.allowResizing,d=AllowResizing,c=o._inRightFrozenArea&&i._hasScroll(i.columns),u=i._getRangesToResize(e,!0);u||(u=[i.selection]);if((o.edgeRight&&!c||o.edgeLeft&&c)&&a&d.Columns){if(l==s.TopLeft){if(o.panel.columns[o.col].allowResizing){t=new CellRangeEventArgs(o.panel,new CellRange(-1,o.col));if(i.onAutoSizingColumn(t)&&i.onResizingColumn(t)){this._ignoreClick=!0;i.autoSizeColumn(o.col,!0);i.onAutoSizedColumn(t);i.onResizedColumn(t);e.preventDefault()}}}else if(l==s.ColumnHeader||a&_AR_ALLCELLS){l==s.ColumnHeader&&(n||i._canResizeAllCellsWithoutCtrl())||(u=[r]);for(var h=0;h<u.length;h++)for(var _=u[h],p=l==s.RowHeader||l==s.BottomLeft,g=_.leftCol;g<=_.rightCol;g++)if(o.panel.columns[g].allowResizing){t=new CellRangeEventArgs(o.panel,new CellRange(-1,g));if(i.onAutoSizingColumn(t)&&i.onResizingColumn(t)){this._ignoreClick=!0;i.autoSizeColumn(g,p);i.onResizedColumn(t);i.onAutoSizedColumn(t);e.preventDefault()}}}this.resetMouseState()}else{var f=o._inBottomFrozenArea&&i._hasScroll(i.rows);if((o.edgeBottom&&!f||o.edgeTop&&f)&&a&d.Rows){if(l==s.TopLeft||l==s.BottomLeft){if(o.getRow().allowResizing){p=l==s.TopLeft||null;t=new CellRangeEventArgs(o.panel,new CellRange(o.row,-1));if(i.onAutoSizingRow(t)&&i.onResizingRow(t)){this._ignoreClick=!0;i.autoSizeRow(o.row,p);i.onResizedRow(t);i.onAutoSizedRow(t);e.preventDefault()}}}else if(l==s.RowHeader||a&_AR_ALLCELLS){var m=o.panel;p=m==i.columnHeaders||m==i.columnFooters&&null;(n||i._canResizeAllCellsWithoutCtrl())&&m&&i.cells||(u=[r]);for(h=0;h<u.length;h++)for(var w=u[h],C=w.topRow;C<=w.bottomRow;C++)if(m.rows[C].allowResizing){t=new CellRangeEventArgs(m,new CellRange(C,-1));if(i.onAutoSizingRow(t)&&i.onResizingRow(t)){this._ignoreClick=!0;i.autoSizeRow(C,p);i.onResizedRow(t);i.onAutoSizedRow(t);e.preventDefault()}}}this.resetMouseState()}else;}}};_MouseHandler.prototype._hover=function(e){if(!this._isDown){var t=this._g,i=t.hitTest(e),o="";this._szRowCol=this._getResizeColHt(i)||this._getResizeRowHt(i);if(this._szRowCol instanceof Column){o="col-resize";this._wasAllRowColHidden=0===t.columns.visibleLength}else if(this._szRowCol instanceof Row){o="row-resize";this._wasAllRowColHidden=0===t.rows.visibleLength}this._szStart=this._szRowCol?this._szRowCol.renderSize:0;t.hostElement.style.cursor=o;return i}return null};_MouseHandler.prototype._getResizeColHt=function(e){var t,i=this._g,o=i.allowResizing,n=e.cellType,r=CellType;if(o&AllowResizing.Columns&&(n==r.ColumnHeader||n==r.TopLeft||o&_AR_ALLCELLS)){if(e._inRightFrozenArea&&i._hasScroll(i.columns)){e.edgeLeft&&(t=e.getColumn());e.edgeFarLeft&&(t=this._getResizeCol(e.panel,e.col,!0)||e.getColumn());e.edgeRight&&(t=this._getResizeCol(e.panel,e.col)||t)}else{e.edgeRight&&(t=e.getColumn());e.edgeFarRight&&(t=this._getResizeCol(e.panel,e.col)||e.getColumn());e.edgeLeft&&(t=this._getResizeCol(e.panel,e.col,!0)||t)}}return t&&t.allowResizing?t:null};_MouseHandler.prototype._getDvMarker=function(){this._dvMarker||(this._dvMarker=wijmo_1.createElement('<div class="'+exports.FlexGridClsNames.marker+'"> </div>'));return this._dvMarker};_MouseHandler.prototype._getResizeRowHt=function(e){var t,i=this._g,o=i.allowResizing,n=AllowResizing,r=e.cellType,l=CellType;if(o&n.Rows&&(r==l.RowHeader||r==l.TopLeft||o&_AR_ALLCELLS)){if(e._inBottomFrozenArea&&i._hasScroll(i.rows)){e.edgeTop&&(t=e.getRow());e.edgeFarTop&&(t=this._getResizeRow(e.panel,e.row,!0)||e.getRow());e.edgeBottom&&(t=this._getResizeRow(e.panel,e.row)||t)}else{e.edgeBottom&&(t=e.getRow());e.edgeFarBottom&&(t=this._getResizeRow(e.panel,e.row)||e.getRow());e.edgeTop&&(t=this._getResizeRow(e.panel,e.row,!0)||t)}}return t&&t.allowResizing?t:null};_MouseHandler.prototype._getResizeCol=function(e,t,i){void 0===i&&(i=!1);var o=this._g,n=e.columns;if(i){for(var r=t-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}if(n==o.columns&&0!=(o.headersVisibility&HeadersVisibility.Row))for(r=(n=o.rowHeaders.columns).length-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}return null}for(r=t+1;r<n.length;r++){if((l=n[r]).isVisible)return this._asResizable(l)}if(t==n.length-1&&n==o.rowHeaders.columns){n=o.columns;for(r=0;r<n.length;r++){var l;if((l=n[r]).isVisible)return this._asResizable(l)}}return null};_MouseHandler.prototype._getResizeRow=function(e,t,i){void 0===i&&(i=!1);var o=this._g,n=e.rows;if(i){for(var r=t-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}if(n==o.rows&&0!=(o.headersVisibility&HeadersVisibility.Column))for(r=(n=o.columnHeaders.rows).length-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}return null}for(r=t+1;r<n.length;r++){if((l=n[r]).isVisible)return this._asResizable(l)}if(t==n.length-1&&n==o.columnHeaders.rows){n=o.rows;for(r=0;r<n.length;r++){var l;if((l=n[r]).isVisible)return this._asResizable(l)}}return null};_MouseHandler.prototype._asResizable=function(e){return 0==e.renderSize&&e.allowResizing?e:null};_MouseHandler.prototype._mouseSelect=function(e,t){var i=this,o=this._g;if(e&&this._htDown&&this._htDown.panel&&o.selectionMode!=SelectionMode.None){var n=new HitTestInfo(this._htDown.panel,e);this._handleSelection(n,t);!wijmo_1.isIE9()&&e.button>=0&&e.target!=o._root&&((n=new HitTestInfo(o,e)).panel||(this._mouseSelectTimer=setTimeout((function(){i._isDown&&i._eMouse&&i._mouseSelect(i._eMouse,t)}),100)))}};_MouseHandler.prototype._handleResizing=function(e){"mousedown"==e.type&&(wijmo_1.isSafari()?wijmo_1.setAttribute(e.target,"draggable",null):e.preventDefault());var t=this._szRowCol,i=this._g,o=this._g.controlRect,n=i._szClientSB.width-i._szClient.width+FlexGrid._RESIZE_SCRL_GAP,r=i._szClientSB.height-i._szClient.height+FlexGrid._RESIZE_SCRL_GAP;if(t instanceof Column){var l=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.col:i._hasScroll(i.columns),s=wijmo_1.mouseToPage(e).x,a=i.columns._frozenInternal&&i.columns._frozenInternal<0&&i.columns.isFrozen(t.index),d=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(s-this._htDown.point.x)*(a&&l?-1:1)*(i.rightToLeft?-1:1))),c=y=(w=Math.round(o.left))+o.width,u=w;i.rightToLeft?w+=n:y-=n;var h=i.columns._frozenInternal<0&&i.columns.isFrozen(t.index),_=i.rightToLeft?-1:1;_=h?-_:_;var p=Math.abs(t.renderWidth-(this._szInitial?this._szInitial.col:0));if(i.columns.isFrozen(t.index)||!this._canResizeOverflow())if(s>y&&(!this._szInitial||this._szInitial.canHaveHScrl)){var g=Math.abs(Math.abs(this._htDown.point.x-y)-p)*_;this._htDown.point.x>=y&&this._htDown.point.x<=c&&(g=0);d=Math.max(t.renderWidth+g,0)}else if(s<w){g=Math.abs(Math.abs(w-this._htDown.point.x)-p)*_;this._htDown.point.x<=w&&this._htDown.point.x>=u&&(g=0);d=Math.max(t.renderWidth-g,0)}if(t.renderSize!=d){if(null==this._szArgs){var f=i.rowHeaders.columns.indexOf(t)>-1?i.rowHeaders:i.cells;this._szArgs=new CellRangeEventArgs(f,new CellRange(-1,t.index))}this._szArgs.data={newSize:d,isPrimaryDragged:!0};this._szArgs.cancel=!1;if(i.onResizingColumn(this._szArgs)){this._szArgs.data.maxSize&&(d=this._szArgs.data.maxSize);i.deferResizing?this._showResizeMarker(d):t.width=d}}}var m=this._szRowCol;if(m instanceof Row){l=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.row:i._hasScroll(i.rows);var w,C=wijmo_1.mouseToPage(e).y,v=i.rows._frozenInternal&&i.rows._frozenInternal<0&&i.rows.isFrozen(m.index),y=(d=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(C-this._htDown.point.y)*(v&&l?-1:1))),(w=Math.round(o.top))+o.height-r-i.columnFooters.rows.getTotalSize());_=i.rows._frozenInternal<0&&i.rows.isFrozen(m.index)?-1:1,p=Math.abs(m.renderHeight-(this._szInitial?this._szInitial.row:0));if(i.rows.isFrozen(m.index)||!this._canResizeOverflow())if(C>y&&(!this._szInitial||this._szInitial.canHaveVScrl)){var b=Math.abs(Math.abs(this._htDown.point.y-y)-p)*_;d=Math.max(m.renderHeight+b,0)}else if(C<w){b=Math.abs(Math.abs(w-this._htDown.point.y)-p)*_;d=Math.max(m.renderHeight-b,0)}if(m.renderSize!=d){if(null==this._szArgs){f=i.columnHeaders.rows.indexOf(m)>-1?i.columnHeaders:i.columnFooters.rows.indexOf(m)>-1?i.columnFooters:i.cells;this._szArgs=new CellRangeEventArgs(f,new CellRange(m.index,-1))}this._szArgs.data={newSize:d,isPrimaryDragged:!0};this._szArgs.cancel=!1;if(i.onResizingRow(this._szArgs)){this._szArgs.data.maxSize&&(d=this._szArgs.data.maxSize);i.deferResizing?this._showResizeMarker(d):m.height=d}}}this._szArgs&&e.preventDefault()};_MouseHandler.prototype._dragstart=function(e){var t=this._g,i=this._htDown,o=AllowDragging,n=CellType;if(i){this._dragSrc=null;this._htDrag=null;this._chldColGrpMarker=!1;if(!this._szRowCol){var r=new CellRangeEventArgs(i.panel,i.range),l=t.allowDragging,s=i.cellType,a=i.panel.rows,d=i.getColumn(!0);d&&d.allowDragging&&(s==n.ColumnHeader||s==n.TopLeft)&&l&o.Columns&&(t.onDraggingColumn(r)?this._dragSrc=e.target:e.preventDefault());if(!this._dragSrc&&i.row>-1&&a[i.row].allowDragging){var c=a[i.row];c instanceof GroupRow||c instanceof _NewRowTemplate||s==n.RowHeader&&l&o.Rows&&(t.onDraggingRow(r)?this._dragSrc=e.target:e.preventDefault())}}if(this._dragSrc&&e.dataTransfer&&!e.defaultPrevented){this._htDrag=i;wijmo_1._startDrag(e.dataTransfer,"move");e.stopPropagation();wijmo_1.addClass(this._dragSrc,_WJC_DRAGSRC);t.beginUpdate();this._updating=!0}}};_MouseHandler.prototype._dragend=function(e){this._dragSrc=null;this._htDrag=null;this.resetMouseState()};_MouseHandler.prototype._dragover=function(e){var t=this._g,i=this._hitTest(e),o=this._dragSrc?this._htDrag:null,n=CellType,r=!1;this._htDown&&(i.row>this._htDown.row?this.isDetailRow(i.row+1)&&(i._row+=1):i.row<this._htDown.row&&this.isDetailRow(i.row)&&(i._row-=1));if(o&&i.cellType==o.cellType){var l=new CellRangeEventArgs(i.panel,i.range,o);if(i.cellType==n.ColumnHeader&&t._hasColumnGroups()){l.cancel=!t._canMoveColumnGroup(o.row,o.col,i.row,i.col);r=t.onDraggingColumnOver(l)}else if(i.cellType==n.ColumnHeader){l.cancel=!t.columns.canMoveElement(o.col,i.col);r=t.onDraggingColumnOver(l)}else if(i.cellType==n.RowHeader){l.cancel=!t.rows.canMoveElement(o.row,i.row);r=t.onDraggingRowOver(l)}else if(i.cellType==n.TopLeft){l.cancel=!t.topLeftCells.columns.canMoveElement(o.col,i.col);r=t.onDraggingColumnOver(l)}}if(r){e.dataTransfer.dropEffect="move";e.preventDefault();e.stopPropagation();this._showDragMarker(i)}else this._showDragMarker(null);if(o&&t.autoScroll){var s=t.controlRect,a=t.scrollPosition,d=wijmo_1.Control._DRAG_SCROLL_EDGE,c=wijmo_1.Control._DRAG_SCROLL_STEP;if(o.panel==t.columnHeaders){e.pageX-s.left<d&&(a.x+=c);s.right-e.pageX<d&&(a.x-=c)}else if(o.panel==t.rowHeaders){e.pageY-s.top<d&&(a.y+=c);s.bottom-e.pageY<d&&(a.y-=c)}if(!a.equals(t._ptScrl)){t.scrollPosition=a;t._rcBounds=null}}};_MouseHandler.prototype._dragleave=function(e){this._showDragMarker(null)};_MouseHandler.prototype._drop=function(e){var t=this._g,i=this._hitTest(e),o=this._dragSrc?this._htDrag:null,n=CellType;if(o&&i.cellType==o.cellType){var r=t.selection,l=new CellRangeEventArgs(i.panel,i.range,o);if(i.cellType==n.ColumnHeader&&t._hasColumnGroups()){var s=t._getColumnGroup(o.row,o.col).columns.length,a=s>0?s:1,d=t.columns._frozenInternal;t._moveColumnGroup(o.row,o.col,i.row,i.col,this._chldColGrpMarker);d>=0?o.col<d&&i.col>=d?t.columns._frozenInternal-=a:o.col>=d&&i.col<d&&(t.columns._frozenInternal+=a):o.col<t.columns.length+d&&i.col>=t.columns.length+d?t.columns._frozenInternal-=a:o.col>=t.columns.length+d&&i.col<t.columns.length+d&&(t.columns._frozenInternal+=a);t.activePanelType===CellType.ColumnHeader||t.activePanelType===CellType.TopLeft?t.select(r.row,i.col,t.columnHeaders):t.select(r.row,i.col);t.onDraggedColumn(l)}else if(i.cellType==n.ColumnHeader){t.columns.moveElement(o.col,i.col);t.activePanelType===CellType.ColumnHeader||t.activePanelType===CellType.TopLeft?t.select(r.row,i.col,t.columnHeaders):t.select(r.row,i.col);t.onDraggedColumn(l)}else if(i.cellType==n.RowHeader){var c=i.row;i.row>this._htDown.row&&this.isDetailRow(i.row+1)?c+=1:i.row<this._htDown.row&&this.isDetailRow(i.row)&&(c-=1);this.isDetailRow(o.row)?this.moveDetailRow(o.row-1,c):this.isDetailRow(o.row+1)?this.moveDetailRow(o.row,c):t.rows.moveElement(o.row,c);t.select(i.row,r.col);t.onDraggedRow(l)}else if(i.cellType==n.TopLeft){t.topLeftCells.columns.moveElement(o.col,i.col);t.onDraggedColumn(l)}}this.resetMouseState()};_MouseHandler.prototype._hitTest=function(e){var t=this._g;t._rcBounds=null;return t.hitTest(e)};_MouseHandler.prototype._showResizeMarker=function(e){var t,i=this._g,o=i._ptScrl,n=this._szArgs.panel.cellType,r=CellType,l=this._getDvMarker(),s=i.cells.hostElement;l.parentElement!=s&&s.appendChild(l);if(this._szRowCol instanceof Column){t={left:this._szRowCol.pos+e-1,top:-1e3,right:"",bottom:0,width:3,height:""};n!=r.TopLeft&&n!=r.RowHeader||(t.left-=i._eTL.offsetWidth+o.x);n==r.Cell&&i.columns._frozenInternal>0&&i.columns.isFrozen(this._szRowCol.index)&&(t.left-=o.x);n==r.Cell&&i.columns._frozenInternal<0&&i.columns.isFrozen(this._szRowCol.index)&&(t.left=Math.min(this._szRowCol.pos,this._g._szClient.width+this._szRowCol._antipos)-e+this._szRowCol.renderWidth+1);i.rightToLeft&&(t.left=s.clientWidth-t.left-t.width)}else if(this._szRowCol instanceof Row){t={left:-1e3,top:this._szRowCol.pos+e-1,right:0,bottom:"",width:"",height:3};n!=r.TopLeft&&n!=r.ColumnHeader||(t.top-=i._eTL.offsetHeight+o.y);n==r.Cell&&i.rows._frozenInternal>0&&i.rows.isFrozen(this._szRowCol.index)&&(t.top-=o.y);n==r.Cell&&i.rows._frozenInternal<0&&i.rows.isFrozen(this._szRowCol.index)&&(t.top=Math.min(this._szRowCol.pos,this._g._szClient.height+this._szRowCol._antipos)-e+this._szRowCol.renderHeight+1)}wijmo_1.setCss(l,t)};_MouseHandler.prototype._showDragMarker=function(e){var t=this._getDvMarker();if(e&&e.panel){if(!e.range.equals(this._rngTarget)){this._rngTarget=e.range;var i=e.panel.hostElement;t.parentElement!=i&&i.appendChild(t);var o=this._g,n=o._ptScrl,r=CellType,l={left:0,top:0,width:6,height:6,right:"",bottom:""};switch(e.cellType){case r.ColumnHeader:var s=o._getColumnGroup(e.row,e.col);if(s){var a=s._rng,d=e.panel.rows,c=e.panel.columns;if(s.isEmpty&&null===s.binding){var u=d[a.bottomRow],h=c[a.leftCol],_=o.rightToLeft,p=_?t.parentElement.clientWidth-e.point.x:e.point.x,g=Math.max(h.renderWidth/5,_MouseHandler._SZ_MAX_COLGRP_EDGE),f=h.pos+g,m=h.pos+h.renderWidth-g,w=this._htDown&&e.col>this._htDown.col;if(!w&&p>f||w&&p<m){l.top=u.pos-l.height/2+u.renderHeight;l.left=_?t.parentElement.clientWidth-h.pos-h.renderWidth:h.pos;l.width=h.renderWidth;this._chldColGrpMarker=!0;break}}this._chldColGrpMarker=!1;l.top=0;l.height=0;for(var C=0;C<a.topRow;C++)l.top+=d[C].renderHeight;for(C=a.topRow;C<=a.bottomRow;C++)l.height+=d[C].renderHeight;l.left=0;if(this._htDown&&e.col>this._htDown.col){var v=c[a.rightCol];l.left=v.pos-l.width/2+v.renderWidth}else{var y=c[a.leftCol];l.left=y.pos-l.width/2}o.rightToLeft&&(l.left=t.parentElement.clientWidth-l.left-l.width);break}case r.TopLeft:case r.ColumnHeader:var b=e.panel.columns[e.col],R=o.columns._frozenInternal<0&&o.columns.isFrozen(e.col)?Math.min(b.pos,o._szClient.width+b._antipos):b.pos;l.left=R-l.width/2;l.height=e.panel.height;this._htDown&&e.col>this._htDown.col&&(l.left+=b.renderWidth);e.cellType==r.ColumnHeader&&o.columns.isFrozen(e.col)&&(l.left-=n.x);o.rightToLeft&&(l.left=t.parentElement.clientWidth-l.left-l.width);break;case r.RowHeader:var x=e.getRow(),S=o.rows._frozenInternal<0&&o.rows.isFrozen(e.row)?Math.min(x.pos,o._szClient.height+x._antipos):x.pos;l.top=S-l.height/2;l.width=e.panel.width;e.row>this._htDown.row&&(l.top+=x.renderHeight);o.rows.isFrozen(e.row)&&(l.top-=n.y)}wijmo_1.setCss(t,l)}}else{wijmo_1.removeChild(t);this._rngTarget=null}};_MouseHandler.prototype._finishResizing=function(e,t){var i=this._g,o=i.selection,n=this._szArgs,r=this._eMouse,l=r&&(r.ctrlKey||r.metaKey),s=CellType,a=this._wasAllRowColHidden&&this._htDown.cellType===s.TopLeft&&n.panel.cellType===s.Cell;if(n&&(!n.cancel||n.data&&n.data.internalCancel)){var d=n.data||{};t||(t=[i.selection]);var c=this._g.controlRect,u=i._szClientSB.width-i._szClient.width+FlexGrid._RESIZE_SCRL_GAP,h=i._szClientSB.height-i._szClient.height+FlexGrid._RESIZE_SCRL_GAP,_=wijmo_1.mouseToPage(e),p=Math.round(c.left),g=p+c.width;i.rightToLeft?p+=u:g-=u;var f=Math.round(c.top),m=f+c.height-h-i.columnFooters.rows.getTotalSize(),w=_.y>=f&&_.y<m,C=_.x>=p&&_.x<g;if(n.col>-1&&this._szRowCol instanceof Column){var v=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.col:i._hasScroll(i.columns),y=n.col,b=wijmo_1.mouseToPage(e).x,R=this._szRowCol,x=i.columns._frozenInternal&&i.columns._frozenInternal<0&&i.columns.isFrozen(R.index),S=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(b-this._htDown.point.x)*(x&&v?-1:1)*(this._g.rightToLeft?-1:1)));this._htDown.cellType,s.TopLeft;if(C)n.panel.columns[y].width=Math.round(S);else if(i.deferResizing){var E=i.columns._frozenInternal<0&&i.columns.isFrozen(y),j=i.rightToLeft?-1:1;j=E?-j:j;if(i.columns.isFrozen(R.index)||!this._canResizeOverflow())if(_.x>g){var H=Math.abs(this._htDown.point.x-g)*j;S=Math.max(n.panel.columns[y].renderWidth+H,0)}else if(_.x<p){H=Math.abs(p-this._htDown.point.x)*j;S=Math.max(n.panel.columns[y].renderWidth-H,0)}n.panel.columns[y].width=Math.round(S)}i.onResizedColumn(n);for(var F=0;F<t.length;F++){o=t[F];if((l||i._canResizeAllCellsWithoutCtrl())&&(this._htDown.cellType==s.ColumnHeader||a)){for(var z=i.columns[y].size,T=o.leftCol;T<=o.rightCol;T++)if(i.columns[T].allowResizing&&T!=y){(n=new CellRangeEventArgs(i.cells,new CellRange(-1,T))).data=__assign({},d,{isPrimaryDragged:!1});if(i.onResizingColumn(n)){i.columns[T].size=z;i.onResizedColumn(n)}}i.columns.isFrozen(y)&&(i.columns[y].size=z)}}e.preventDefault()}if(n.row>-1&&this._szRowCol instanceof Row){v=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.row:i._hasScroll(i.rows);var M=n.row,G=wijmo_1.mouseToPage(e).y,I=this._szRowCol,P=i.rows._frozenInternal&&i.rows._frozenInternal<0&&i.rows.isFrozen(I.index);S=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(G-this._htDown.point.y)*(P&&v?-1:1))),this._htDown.cellType,s.TopLeft;if(w){n.getRow().height=Math.round(S);if("setHeights"in i){(D=i).setHeights(Array.from(D.rows).map((function(e){return e.height})))}}else if(i.deferResizing){j=i.rows._frozenInternal<0&&i.rows.isFrozen(n.row)?-1:1;if(i.rows.isFrozen(I.index)||!this._canResizeOverflow())if(_.y>m){var A=Math.abs(this._htDown.point.y-m)*j;S=Math.max(n.getRow().renderHeight+A-i.columnFooters.rows.getTotalSize(),0)}else if(_.y<f){A=Math.abs(p-this._htDown.point.y)*j;S=Math.max(n.getRow().renderHeight-A-i.columnFooters.rows.getTotalSize(),0)}n.getRow().height=Math.round(S);if("setHeights"in i){var D;(D=i).setHeights(Array.from(D.rows).map((function(e){return e.height})))}}i.onResizedRow(n);for(F=0;F<t.length;F++){o=t[F];if((l||i._canResizeAllCellsWithoutCtrl())&&(this._htDown.cellType==s.RowHeader||a)){for(var L=i.rows[M].size,O=o.topRow;O<=o.bottomRow;O++)if(i.rows[O].allowResizing&&O!=M){(n=new CellRangeEventArgs(i.cells,new CellRange(O,-1))).data=__assign({},d,{isPrimaryDragged:!1});if(i.onResizingRow(n)){i.rows[O].size=L;i.rows[O].resizedManually=!0;i.onResizedRow(n)}}i.rows.isFrozen(M)&&(i.rows[M].size=L)}}n.panel.rows[M].resizedManually=!0;e.preventDefault()}}};_MouseHandler.prototype._limitSizeByFrozen=function(e,t,i){void 0===i&&(i=5);var o=this._g;if(e instanceof Column){var n=o.columns._frozenInternal>0?o.columns.slice(0,o.columns._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):o.columns.slice(o.columns.length+o.columns._frozenInternal,o.columns.length).reduce((function(e,t){return e+t.renderSize}),0),r=n-e.renderSize+t,l=!o._hasScroll(o.columns)&&o.columns._frozenInternal<0?o._szClient.width-i-o.columns.lastFrozen.pos:o._szClient.width-i;r>=l&&(t=l-n+e.renderSize)}else if(e instanceof Row){var s=o.rows._frozenInternal>0?o.rows.slice(0,o.rows._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):o.rows.slice(o.rows.length+o.rows._frozenInternal,o.rows.length).reduce((function(e,t){return e+t.renderSize}),0),a=s-e.renderSize+t,d=!o._hasScroll(o.rows)&&o.rows._frozenInternal<0?o._szClient.height-i-o.rows.lastFrozen.pos:o._szClient.height-i;a>=d&&(t=d-s+e.renderSize)}return t};_MouseHandler.prototype._handleSelection=function(e,t){var i=this._g,o=i._selHdl.selection,n=new CellRange(e.row,e.col),r=CellType,l=SelectionMode,s=null,a=this._eMouse&&(this._eMouse.ctrlKey||this._eMouse.metaKey),d=!1,c=e.col>=this._anchorCol;if(n.isValid)if(null==this._lbSelState){e.cellType!=r.ColumnHeader&&i._clearAnchorCell();switch(e.cellType){case r.RowHeader:n.col=0;n.col2=i.columns.length-1;break;case r.ColumnHeader:switch(i.selectionMode){case l.Row:case l.Cell:n.row=n.row2=o.row;t=!1;break;default:n.row=0;n.row2=i.rows.length-1;if(null!=(s=i._getColumnGroup(e.row,e.col))){if(i.anchorCursor){s._rng.col<=this._anchorCol&&this._anchorCol<=s._rng.col2&&(this._anchorCol=s._rng.col2);i._setAnchorCell(0,this._anchorCol)}else s._rng.col<this._anchorCol&&this._anchorCol<=s._rng.col2&&(this._anchorCol=s._rng.col);if(c){n.col=s._rng.col2;n.col2=s._rng.col}else{n.col=s._rng.col;n.col2=s._rng.col2;o.col2<n.col2&&(o.col2=n.col2)}}}}if(t){if(e.cellType==r.ColumnHeader){i.anchorCursor?null==i._getAnchorCell()&&i.selectionMode!=SelectionMode.Row&&i.selectionMode!=SelectionMode.Cell&&i._setAnchorCell(o.row,o.col):i._clearAnchorCell();n.row2=o.row2;!c&&o.col>o.col2?n.col2=o.col:n.col2=o.col2;null!=s&&c&&n.col2>s._rng.col&&(n.col2=s._rng.col)}else if(i.anchorCursor){n.row=o.row;n.col=o.col}else{n.row2=o.row2;n.col2=o.col2}if(!n.isValid){var u=this._htDown;u&&(n=new CellRange(u.row,u.col))}}if(wijmo_1.closestClass(this._eMouse.target,CellFactory._WJC_COLLAPSE)){a=!1;d=!0}if(i.selectionMode==SelectionMode.MultiRange){var h=i._selHdl,_=h.selection,p=h.extendedSelection,g=e.panel!=i.cells,f=h.cellRangeEventArgs;if(a){if(!t&&h._deselectRange(n)){h.selection.isValid&&(n=null);if(i._getProductInfo().indexOf("MultiRow")>-1){var m=[];for(E=0;E<p.length;E++){_.contains(p[E])&&m.push(E);f&&f.range.contains(p[E])&&!m.includes(E)&&m.push(E)}if(m.length>0){for(var w=m.length-1;w>=0;w--)p.splice(m[w],1);m=[]}}}else if(_.isValid&&(g||!_.intersects(n)))if(i._getProductInfo().indexOf("MultiRow")>-1){var C=!1;m=[];_=h.selection.clone();for(E=0;E<p.length&&!C;E++){p[E].equals(_)&&(C=!0);_.contains(p[E])&&m.push(E);f&&f.range.contains(p[E])&&!m.includes(E)&&m.push(E)}if(m.length>0){for(w=m.length-1;w>=0;w--)p.splice(m[w],1);m=[]}C||p.push(_)}else{var v=h.selection;(g?this._splitRange(v):[v.clone()]).forEach((function(e){for(var t=!1,i=0;i<p.length&&!t;i++)p[i].equals(e)&&(t=!0);t||p.push(e)}))}}else p.clear()}if(n){i.select(n,!1);if(!d)switch(e.cellType){case r.RowHeader:i.scrollIntoView(e.row,-1);break;case r.ColumnHeader:i.scrollIntoView(-1,e.col);break;default:i.scrollIntoView(e.row,e.col)}}else{var y=new CellRangeEventArgs(i.cells,new CellRange(e.row,e.col));i.onSelectionChanging(y);i.onSelectionChanged(y);i.invalidate()}}else{var b=this._htDown.row,R=e.row,x=this._lbSel;if(b>R){R=b;b=e.row}var S=this._lbSelStateRows||{};if(this._lbSel)for(var E=x.row;E<=x.row2;E++)(E<b||E>R)&&(i.rows[E].isSelected=S[E]);for(var E=b;E<=R;E++){S.hasOwnProperty(E)||(S[E]=i.rows[E].isSelected);i.rows[E].isSelected=!this._lbSelState}this._lbSel=new CellRange(b,0,R,0);i.scrollIntoView(e.row,e.col)}};_MouseHandler.prototype._splitRange=function(e){var t=this._g,i=t.columns.length,o=t.rows.length,n=[];if(e.columnSpan==i)for(var r=e.topRow;r<=e.bottomRow;r++)n.push(new CellRange(r,0,r,i-1));else if(e.rowSpan==o)for(var l=e.leftCol;l<=e.rightCol;l++)n.push(new CellRange(0,l,o-1,l));else n.push(e.clone());return n};_MouseHandler.prototype.isDetailRow=function(e){var t=this._g.rows[e];return!!t&&"DetailRow"===t.constructor.name};_MouseHandler.prototype.moveDetailRow=function(e,t){var i=this._g,o=i.rows[e],n=i.rows[e+1];if(e>t){i.rows.splice(e,2);i.rows.splice(t,0,o,n)}else if(e<t){i.rows.splice(e,2);i.rows.splice(t-1,0,o,n)}};_MouseHandler.prototype._canResizeOverflow=function(){var e=AllowResizing.ColumnsOverflow&AllowResizing.RowsOverflow&AllowResizing.BothOverflow&AllowResizing.ColumnsAllCellsOverflow&AllowResizing.RowsAllCellsOverflow&AllowResizing.BothAllCellsOverflow;return this._g.allowResizing&e};_MouseHandler.prototype.dispose=function(){this.resetMouseState();if(this._mouseSelectTimer){clearTimeout(this._mouseSelectTimer);this._mouseSelectTimer=null}if(this._mouseWhellTimer){clearTimeout(this._mouseWhellTimer);this._mouseWhellTimer=null}if(this._focusTimer){clearTimeout(this._focusTimer);this._focusTimer=null}wijmo_1.removeChild(this._dvMarker);this._dvMarker=null;this._htDown=null;this._szRowCol=null;this._selDown=null;this._dragSrc=null;this._htDrag=null;this._g=null};_MouseHandler._SZ_MIN=0;_MouseHandler._SZ_MAX_COLGRP_EDGE=50;return _MouseHandler}();exports._MouseHandler=_MouseHandler;var OverlayManager=function(){function OverlayManager(){this._oldNoDataHeight=0}OverlayManager.prototype.updateNoDataContent=function(e,t){t.innerHTML=e.noDataOverlayContent};OverlayManager.prototype.updateNoDataOverlay=function(e,t){var i=e.headersVisibility&HeadersVisibility.Column?e.columnHeaders.rows.getTotalSize():0,o=!(e.rows.length||!e.noDataOverlayContent);wijmo_1.setCss(t,{display:o?"flex":"none",position:"absolute",alignItems:"center",justifyContent:"center",top:i+"px",width:"100%",height:"calc(100% - "+i+"px)",minHeight:4*e.rows.defaultSize+"px",overflow:"auto"});wijmo_1.setAttribute(t,"aria-hidden","true");if(!o)return 0;this.updateNoDataContent(e,t);wijmo_1.setCss(t,{alignItems:t.clientHeight<t.scrollHeight?"start":"center"});if(this._oldNoDataHeight&&Math.abs(t.clientHeight-this._oldNoDataHeight)<=2)return this._oldNoDataHeight;this._oldNoDataHeight=t.clientHeight;return t.clientHeight};return OverlayManager}();exports.OverlayManager=OverlayManager;wijmo_1._registerModule("wijmo.grid",selfModule);
|
|
14
|
+
"use strict";var _a,__extends=this&&this.__extends||function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)};return function(e,t){extendStatics(e,t);function __(){this.constructor=e}e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),__assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++){t=arguments[i];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)},__importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var DataMapEditor,wijmo_1=require("wijmo/wijmo"),wijmo_input_1=require("wijmo/wijmo.input"),mInput=__importStar(require("wijmo/wijmo.input")),selfModule=__importStar(require("wijmo/wijmo.grid")),_safariVer=null;function _getSafariVer(){return _safariVer}exports._getSafariVer=_getSafariVer;if(wijmo_1.isSafari()){var match=navigator.userAgent.match(/version\/([\d.]+)/i);if(null!=match){var version=match[1],parts=(match=version.match(/(\d+)/g)).map((function(e){return parseInt(e)}));_safariVer={full:version,major:parts[0],minor:parts[1]}}}exports.FlexGridClsNames={alt:"wj-alt",bigHeader:"wj-big-header",bottomLeft:"wj-bottomleft",cell:"wj-cell",cellCheck:"wj-cell-check",cellIndex:"wj-cell-index",cells:"wj-cells",colFooters:"wj-colfooters",colGroup:"wj-colgroup",colHeaders:"wj-colheaders",elemCollapse:"wj-elem-collapse",elemCollapseSpace:"wj-elem-collapse-space",elemDropDown:"wj-elem-dropdown",elemPin:"wj-elem-pin",errorTip:"wj-error-tip",focusHeaderCell:"wj-focus-header-cell",frozen:"wj-frozen",frozenClone:"wj-frozen-clone",frozenCol:"wj-frozen-col",frozenColLeft:"wj-frozen-col-left",frozenColRight:"wj-frozen-col-right",frozenColRightEdge:"wj-frozen-col-right-edge",frozenRow:"wj-frozen-row",frozenRowBottom:"wj-frozen-row-bottom",gridEditor:"wj-grid-editor",gridIme:"wj-grid-ime",gridListBox:"wj-grid-listbox",group:"wj-group",groupSummary:"wj-group-summary",hasDropDown:"wj-hasdropdown",header:"wj-header",headerAlt:"wj-header-alt",hostElement:"wj-flexgrid",lastFrozenRow:"wj-last-frozen-row",lastFrozenRowBottom:"wj-last-frozen-row-bottom",lastVisibleCol:"wj-last-visible-col",lastVisibleRow:"wj-last-visible-row",marker:"wj-marker",marquee:"wj-marquee",multiline:"wj-multiline",new:"wj-new",radioMap:"wj-radio-map",row:"wj-row",rowHeaders:"wj-rowheaders",sortAsc:"wj-sort-asc",sortDesc:"wj-sort-desc",sortIndex:"wj-sort-index",topLeft:"wj-topleft",whiteSpacePre:"wj-whitespace-pre",wrap:"wj-wrap",noDataOverlay:"wj-no-data-overlay",screenReaderOnly:"wj-sr-only"};exports._CustomEditorClsNames={editorsContainer:"wj-grid-editors-container"};!function(e){e[e.AutoComplete=0]="AutoComplete";e[e.DropDownList=1]="DropDownList";e[e.RadioButtons=2]="RadioButtons";e[e.Menu=3]="Menu"}(DataMapEditor=exports.DataMapEditor||(exports.DataMapEditor={}));var DataMap=function(){function DataMap(e,t,i){this._keyPath="";this._displayPath="";this._sortByVal=!0;this._editable=!1;this._useFilter=!1;this._serK=!0;this.mapChanged=new wijmo_1.Event;if(wijmo_1.isArray(e)&&!t&&!i){e=e.map((function(e){return{value:e}}));t=i="value"}this._cv=wijmo_1.asCollectionView(e);this._keyPath=wijmo_1.asString(t,!1);this._displayPath=wijmo_1.asString(i,!1);this._cv.collectionChanged.addHandler(this.onMapChanged,this)}Object.defineProperty(DataMap.prototype,"sortByDisplayValues",{get:function(){return this._sortByVal},set:function(e){this._sortByVal=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"serializeKeys",{get:function(){return this._serK},set:function(e){if((e=wijmo_1.asBoolean(e))!==this._serK){var t=this._map,i=t&&t.size;this._map=null;this._serK=e;i&&this.onMapChanged(wijmo_1.EventArgs.empty)}},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"selectedValuePath",{get:function(){return this._keyPath},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"displayMemberPath",{get:function(){return this._displayPath},enumerable:!0,configurable:!0});DataMap.prototype.getDataItem=function(e){var t=this;if(!this._map){var i=this._cv.sourceCollection,o=new wijmo_1._Map(this.serializeKeys);wijmo_1.isArray(i)&&this._keyPath&&i.forEach((function(e){var i=e[t._keyPath];o.has(i)||o.set(i,e)}));this._map=o}return this._map.get(e)};DataMap.prototype.getDisplayValue=function(e){var t=this._displayPath,i=this.getDataItem(e);return t&&i?i[t]:e};DataMap.prototype.getKeyValue=function(e,t){var i=this._displayPath,o=this._indexOf(e,i,t,!0);o<0&&(o=this._indexOf(e,i,t,!1));return o>-1?this._cv.sourceCollection[o][this._keyPath]:null};DataMap.prototype.getDisplayValues=function(e){var t=this;return this._cv&&this._displayPath?this._cv.items.map((function(e){return e[t._displayPath]})):[]};DataMap.prototype.getFilteredItems=function(e){return this._cv?this._cv.items:[]};Object.defineProperty(DataMap.prototype,"useFilter",{get:function(){return this._useFilter},set:function(e){this._useFilter=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});DataMap.prototype.getKeyValues=function(){var e=this;return this._cv&&this._keyPath?this._cv.items.map((function(t){return t[e._keyPath]})):[]};Object.defineProperty(DataMap.prototype,"isEditable",{get:function(){return this._editable},set:function(e){this._editable=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(DataMap.prototype,"search",{get:function(){return this._search},set:function(e){e&&(this._search=wijmo_1.asFunction(e))},enumerable:!0,configurable:!0});DataMap.prototype.onMapChanged=function(e){this._map=null;this.mapChanged.raise(this,e)};DataMap.prototype._indexOf=function(e,t,i,o){var n=-1,r=-1;if(this._cv&&t){var l=null!=e?e.toString():"";l&&i&&(e=wijmo_1.toPlainText(l));for(var s=o?l:l.toLowerCase(),a=this._cv.sourceCollection,d=0;d<a.length;d++){var u=a[d],c=u?u[t]:void 0;null!=c&&null!=c||(c="");i&&wijmo_1.isString(c)&&(c=wijmo_1.toPlainText(c));c==e?n=d:o||c.length!=s.length||c.toLowerCase()!=s?null!=c&&c.toString()==l&&(n=d):n=d;if(n==d){if(!this._cv.filter||this._cv.filter(u))return n;r<0&&(r=n)}}}return r};return DataMap}();exports.DataMap=DataMap;var CellType,CellRange=function(){function CellRange(e,t,i,o){void 0===e&&(e=-1);void 0===t&&(t=-1);void 0===i&&(i=e);void 0===o&&(o=t);this.setRange(e,t,i,o)}CellRange.prototype.setRange=function(e,t,i,o){void 0===e&&(e=-1);void 0===t&&(t=-1);void 0===i&&(i=e);void 0===o&&(o=t);this._row=wijmo_1.asInt(e);this._col=wijmo_1.asInt(t);this._row2=wijmo_1.asInt(i);this._col2=wijmo_1.asInt(o)};Object.defineProperty(CellRange.prototype,"row",{get:function(){return this._row},set:function(e){this._row=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"col",{get:function(){return this._col},set:function(e){this._col=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"row2",{get:function(){return this._row2},set:function(e){this._row2=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"col2",{get:function(){return this._col2},set:function(e){this._col2=wijmo_1.asInt(e)},enumerable:!0,configurable:!0});CellRange.prototype.clone=function(){return new CellRange(this._row,this._col,this._row2,this._col2)};CellRange.prototype.copy=function(e){this.setRange(e._row,e._col,e._row2,e._col2)};Object.defineProperty(CellRange.prototype,"rowSpan",{get:function(){return Math.abs(this._row2-this._row)+1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"columnSpan",{get:function(){return Math.abs(this._col2-this._col)+1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"topRow",{get:function(){return Math.min(this._row,this._row2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"bottomRow",{get:function(){return Math.max(this._row,this._row2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"leftCol",{get:function(){return Math.min(this._col,this._col2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"rightCol",{get:function(){return Math.max(this._col,this._col2)},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"isValid",{get:function(){return this._row>-1&&this._col>-1&&this._row2>-1&&this._col2>-1},enumerable:!0,configurable:!0});Object.defineProperty(CellRange.prototype,"isSingleCell",{get:function(){return this._row==this._row2&&this._col==this._col2},enumerable:!0,configurable:!0});CellRange.prototype.contains=function(e,t){var i=wijmo_1.tryCast(e,CellRange);if(i)return i.topRow>=this.topRow&&i.bottomRow<=this.bottomRow&&i.leftCol>=this.leftCol&&i.rightCol<=this.rightCol;if(wijmo_1.isInt(e)&&wijmo_1.isInt(t))return e>=this.topRow&&e<=this.bottomRow&&t>=this.leftCol&&t<=this.rightCol;throw"contains expects a CellRange or row/column indices."};CellRange.prototype.containsRow=function(e){return wijmo_1.asInt(e)>=this.topRow&&e<=this.bottomRow};CellRange.prototype.containsColumn=function(e){return wijmo_1.asInt(e)>=this.leftCol&&e<=this.rightCol};CellRange.prototype.intersects=function(e){return this.intersectsRow(e)&&this.intersectsColumn(e)};CellRange.prototype.intersectsRow=function(e){return e&&!(this.bottomRow<e.topRow||this.topRow>e.bottomRow)};CellRange.prototype.intersectsColumn=function(e){return e&&!(this.rightCol<e.leftCol||this.leftCol>e.rightCol)};CellRange.prototype.getRenderSize=function(e){var t=new wijmo_1.Size(0,0);if(this.isValid){for(var i=this.topRow;i<=this.bottomRow;i++)e.rows[i]&&(t.height+=e.rows[i].renderSize);for(var o=this.leftCol;o<=this.rightCol;o++)e.columns[o]&&(t.width+=e.columns[o].renderSize)}return t};CellRange.prototype.equals=function(e){return e instanceof CellRange&&this._row==e._row&&this._col==e._col&&this._row2==e._row2&&this._col2==e._col2};CellRange.prototype.combine=function(e){return e?new CellRange(Math.min(this.topRow,e.topRow),Math.min(this.leftCol,e.leftCol),Math.max(this.bottomRow,e.bottomRow),Math.max(this.rightCol,e.rightCol)):this};CellRange.prototype.toString=function(){return wijmo_1.format("({row}, {col})-({row2}, {col2})",this)};return CellRange}();exports.CellRange=CellRange;!function(e){e[e.None=0]="None";e[e.Cell=1]="Cell";e[e.ColumnHeader=2]="ColumnHeader";e[e.RowHeader=3]="RowHeader";e[e.TopLeft=4]="TopLeft";e[e.ColumnFooter=5]="ColumnFooter";e[e.BottomLeft=6]="BottomLeft"}(CellType=exports.CellType||(exports.CellType={}));var GridPanel=function(){function GridPanel(e,t,i,o,n){this._offsetY=0;this._rng=new CellRange;this._g=wijmo_1.asType(e,FlexGrid);this._ct=wijmo_1.asInt(t);this._rows=wijmo_1.asType(i,RowCollection);this._cols=wijmo_1.asType(o,ColumnCollection);this._e=wijmo_1.asType(n,HTMLElement);this._vrb=new CellRange;this._uid=wijmo_1.uidGenerator()}Object.defineProperty(GridPanel.prototype,"activeCell",{get:function(){return this._activeCell},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"cellType",{get:function(){return this._ct},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"viewRange",{get:function(){return this._getViewRange()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"width",{get:function(){return this._cols.getTotalSize()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"height",{get:function(){return this._rows.getTotalSize()},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0});Object.defineProperty(GridPanel.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});GridPanel.prototype.getCellData=function(e,t,i){t=this._toIndex(t);return this._getCellData(e,t,i)};GridPanel.prototype._getCellData=function(e,t,i){var o,n,r=this._g,l=this._rows[wijmo_1.asNumber(e,!1,!0)];if(!l)return null;o=this._cols[wijmo_1.asNumber(t,!1,!0)];var s=r?r._getBindingColumn(this,e,o):o,a=null,d=l instanceof GroupRow;d&&l.dataItem instanceof wijmo_1.CollectionViewGroup&&!r.childItemsPath&&(a=l.dataItem);s&&l&&s.binding&&l.dataItem&&!a?n=s._binding.getValue(l.dataItem):l._ubv&&(n=l._ubv[o._hash]);null==n&&(n=this._getSpecialData(e,l,t,o,s,d,a,n));if(i){var u=s.dataMap||l.dataMap;if(this.cellType==CellType.Cell&&s._edt&&s._edt._ctl instanceof wijmo_input_1.MultiSelect&&n){var c=new wijmo_1.Binding(s._edt._ctl.displayMemberPath),h=c&&wijmo_1.isArray(n)?n.map((function(e){return c.getValue(e)})):n;if(wijmo_1.isArray(h)&&h.length>0){var _=h.join(", ");n=wijmo_1.format(_||wijmo_1.culture.MultiSelect.itemsSelected,{count:h.length})}}else this.cellType==CellType.Cell&&u&&(n=u.getDisplayValue(n));n=null!=n?wijmo_1.Globalize.format(n,s.format||l.format):""}return n};GridPanel.prototype.setCellData=function(e,t,i,o,n,r){void 0===o&&(o=!0);void 0===n&&(n=!0);void 0===r&&(r=!1);var l=this._g,s=this._rows[wijmo_1.asNumber(e,!1,!0)],a=wijmo_1.asNumber(this._toIndex(t),!1,!0),d=this._cols[a],u=wijmo_1.DataType;if(!s)return!1;var c=l?l._getBindingColumn(this,e,d):d;if(!c)return!1;var h=c.dataMap||s.dataMap;if(this._ct==CellType.Cell){var _=c.getIsRequired(s),p=c.isContentHtml||s.isContentHtml;if(!r&&h&&null!=i){var g=h.getKeyValue(i,p);if(null==g&&null==h.getDisplayValue(null)){if(h.getDisplayValue(i)!=i);else if(!h.isEditable||h.displayMemberPath!=h.selectedValuePath){if(""!=i||_||!l.commitEmptyEdits)return!1;i=null}}else{var f=l.getRowDataItem(e,a);if(h.useFilter&&f){var m=h.getFilteredItems(f);if(!(m.length>0))return!1;if(m.filter((function(e){return e[h._keyPath]==g})).length>0)i=g;else{var w=m.filter((function(e){return e[h.displayMemberPath]==i}));w.length>0&&(i=w[0][h._keyPath])}}else i=g}}var C=u.Object,v=c.dataType||s.dataType,y=this.getCellData(e,t,!1);c._edt&&c._edt._ctl instanceof wijmo_input_1.MultiSelect&&v===u.String&&wijmo_1.isArray(i)&&(i=i.join(", "));C=v||wijmo_1.getType(y);if(null==i||""===i&&o&&!h){if(_||!l.commitEmptyEdits&&(null==y||""===y))return!1;C!=u.String&&(i=null);o=!1}if("NaN"==i&&Number.isNaN(y)&&!l.commitEmptyEdits)return!1;if(o){var b=c.format||s.format;b||C!=u.Date||(b="d");c.mask&&wijmo_1.isString(i)&&C!=u.String&&(i=i.replace(/_/g,""));i=wijmo_1.changeType(i,C,b,y);if(C!=u.Object&&wijmo_1.getType(i)!=C)return!1}}if(s.dataItem&&c.binding){var R=c._binding,x=s.dataItem,S=R.getValue(x);if(i!==S&&(h&&!h.serializeKeys||!wijmo_1.DateTime.equals(i,S))){var E=l.collectionView,j=E instanceof wijmo_1.CollectionView&&x!=E.currentEditItem&&E.trackChanges,H=null;j&&(H=E._extend({},x));R.setValue(x,i);if(j){var F=new wijmo_1.NotifyCollectionChangedEventArgs(wijmo_1.NotifyCollectionChangedAction.Change,x,E.items.indexOf(x));E.onCollectionChanged(F,H)}}}else{s._ubv||(s._ubv={});s._ubv[d._hash]=i}n&&l&&l.invalidate();return!0};GridPanel.prototype._getRowData=function(e){var t,i=this._g,o=this._rows[wijmo_1.asNumber(e,!1,!0)],n=null,r=[];if(null!=o){var l=null,s=o instanceof GroupRow;s&&o.dataItem instanceof wijmo_1.CollectionViewGroup&&!i.childItemsPath&&(l=o.dataItem);for(var a=!l&&o.dataItem,d=0;d<i.columns.length;d++){var u=t=this._cols[d];a&&i&&(u=i._getBindingColumn(this,e,t));u.binding?n=u._binding.getValue(o.dataItem):o._ubv&&(n=o._ubv[t._hash]);null==n&&(n=this._getSpecialData(e,o,d,t,u,s,l,n));r[d]=n}}return r};GridPanel.prototype._getSpecialData=function(e,t,i,o,n,r,l,s){var a=s,d=CellType;switch(this._ct){case d.TopLeft:case d.ColumnHeader:e!=this._rows.length-1&&n==o||(a=n.header);break;case d.ColumnFooter:if(r&&n.aggregate!=wijmo_1.Aggregate.None){var u=this._g.collectionView;if(u){a=(c=wijmo_1.tryCast(u,wijmo_1.CollectionView))?c.getAggregate(n.aggregate,n.binding):wijmo_1.getAggregate(n.aggregate,u.items,n.binding)}}break;case d.Cell:var c=void 0,h=this._g._isServerCollectionView(this._g.collectionView);h&&(c=this._g.collectionView);if(t instanceof GroupRow)if(i==this._cols.firstVisibleIndex)a=t.getGroupHeader();else if(h&&c.groupOnServer&&(c.groupLazyLoading||c._virtualization)){var _=t.dataItem;a=c.getGroupAggregate(n.binding,_,n.aggregate)}else l&&n.aggregate!=wijmo_1.Aggregate.None&&(a=l.getAggregate(n.aggregate,n.binding,this._g.collectionView,this._g))}return a};GridPanel.prototype.getCellBoundingRect=function(e,t,i){var o=this._g,n=this.rows[e],r=this.columns[this._toIndex(t)],l=this.rows._frozenInternal<0&&this.rows.isFrozen(e)&&o._hasScroll(this.rows)?this._g._szClient.height+n._antipos:n.pos,s=this.columns._frozenInternal<0&&this.columns.isFrozen(Number(t))&&o._hasScroll(this.columns)?this._g._szClient.width+r._antipos:r.pos,a=new wijmo_1.Rect(s,l,r.renderSize,n.renderSize);if(o.rightToLeft){a.left=this.hostElement.clientWidth-a.right;wijmo_1.isIE()||(a.left-=o._root.offsetWidth-o._root.clientWidth)}if(!i){var d=this.hostElement.getBoundingClientRect();a.left+=d.left;a.top+=d.top-this._offsetY}this.rows.isFrozen(e)&&(this.rows._frozenInternal>0||!this.rows.isFrozen(this.rows._firstVisible))&&(a.top-=o.scrollPosition.y);this.columns.isFrozen(Number(t))&&(a.left-=o.scrollPosition.x*(o.rightToLeft?-1:1));return a};GridPanel.prototype.getCellElement=function(e,t){var i=this.hostElement.children,o=this._g.rows._frozenInternal<0?i.length:Math.min(e+2,i.length);t=this._toIndex(t);for(var n=0;n<o;n++)for(var r=i[n].children,l=this._g.columns._frozenInternal<0?r.length:Math.min(t+2,r.length),s=0;s<l;s++){var a=r[s],d=a[GridPanel._INDEX_KEY];if(d&&(d.row==e&&d.col==t||d.rng&&d.rng.contains(e,t)))return a}return null};GridPanel.prototype.getSelectedState=function(e,t,i){var o=this._g,n=o.selectionMode,r=o._selHdl.selection,l=SelectionMode,s=SelectedState;if(n==l.None)return s.None;t=this._toIndex(t);switch(this._ct){case CellType.Cell:if(o.activePanelType!=this.cellType){i||(i=o.getMergedRange(this,e,t)||new CellRange(e,t));for(var a=i.leftCol;a<=i.rightCol;a++)if(o.columns[a]&&o.columns[a].isSelected)return s.Selected;for(var d=i.topRow;d<=i.bottomRow;d++)if(o.rows[d].isSelected)return s.Selected;return s.None}i||(i=o.getMergedRange(this,e,t));var u=o._getAnchorCell();if(i){if(i.contains(r.row,r.col)){if(!o.anchorCursor||null==u)return o.showMarquee?s.Active:s.Cursor;if(e==u.y&&t==u.x||i.row==u.y&&i.col==u.x)return o.showMarquee?s.Active:s.Cursor}if(i.intersects(r)&&o.anchorCursor&&null!=u&&(e==u.y&&t==u.x||i.row==u.y&&i.col==u.x))return o.showMarquee?s.Active:s.Cursor;if(i.intersects(r)&&n!=l.ListBox)return s.Selected;for(a=i.leftCol;a<=i.rightCol;a++)if(o.columns[a]&&o.columns[a].isSelected)return s.Selected;for(d=i.topRow;d<=i.bottomRow;d++)if(o.rows[d].isSelected)return s.Selected}if(o.anchorCursor&&null!=u){if(e==u.y&&t==u.x)return o.showMarquee?s.Active:s.Cursor}else if(r.row==e&&r.col==t)return o.showMarquee?s.Active:s.Cursor;if(o.rows[e].isSelected||o.columns[t].isSelected)return s.Selected;if(n==l.MultiRange)for(var c=o._selHdl.extendedSelection,h=0;h<c.length;h++)if(c[h].contains(e,t)||i&&i.intersects(c[h]))return s.Selected;if(i)switch(n){case l.Row:case l.RowRange:if(i.containsRow(r.row))return s.Selected}return n==l.ListBox?s.None:(r=this._getAdjustedSelection(r)).containsRow(e)&&r.containsColumn(t)?s.Selected:s.None;case CellType.ColumnHeader:if(o.activePanelType==CellType.ColumnHeader){if((i=o.getMergedRange(this,e,t,!1))&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}if(o.activePanelType==CellType.Cell&&o.showSelectedHeaders&HeadersVisibility.Column&&(o.columns[t].isSelected||r.containsColumn(t)||r.intersectsColumn(i))){i&&(e=i.bottomRow);if(e==this.rows.length-1)return s.Selected}break;case CellType.RowHeader:if(o.activePanelType==CellType.RowHeader){if((i=o.getMergedRange(this,e,t,!1))&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}if(o.activePanelType==CellType.Cell&&o.showSelectedHeaders&HeadersVisibility.Row&&(o.rows[e].isSelected||r.containsRow(e)||r.intersectsRow(i))){i&&(t=i.rightCol);if(t==this.columns.length-1)return s.Selected}break;case CellType.TopLeft:if(o.activePanelType==CellType.TopLeft){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}break;case CellType.BottomLeft:if(o.activePanelType===CellType.BottomLeft){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}break;case CellType.ColumnFooter:if(o.activePanelType===CellType.ColumnFooter){i||(i=o.getMergedRange(this,e,t,!1));if(i&&i.contains(r))return s.Cursor;if(r.row==e&&r.col==t)return s.Cursor}}return s.None};Object.defineProperty(GridPanel.prototype,"hostElement",{get:function(){return this._e},enumerable:!0,configurable:!0});GridPanel.prototype.isRangeValid=function(e){return e&&e.isValid&&e.bottomRow<this.rows.length&&e.rightCol<this.columns.length};GridPanel.prototype.getNextVisibleRow=function(e){void 0===e&&(e=0);for(var t=Math.max(e,0);t<this.rows.length;t++)if(this.rows[t].isVisible)return t;return-1};GridPanel.prototype.getLastVisibleRow=function(e){void 0===e&&(e=1/0);for(var t=Math.min(e,this.rows.length-1);t>=0;t--)if(this.rows[t].isVisible)return t;return-1};GridPanel.prototype.getNextVisibleColumn=function(e){void 0===e&&(e=0);for(var t=Math.max(e,0);t<this.columns.length;t++)if(this.columns[t].isVisible)return t;return-1};GridPanel.prototype.getLastVisibleColumn=function(e){void 0===e&&(e=1/0);for(var t=Math.min(e,this.columns.length-1);t>=0;t--)if(this.columns[t].isVisible)return t;return-1};GridPanel.prototype._toIndex=function(e){if(wijmo_1.isString(e)&&(e=this._cols.indexOf(e))<0)throw"Invalid column name or binding.";return e};GridPanel.prototype._getAdjustedSelection=function(e){var t=this._g,i=this._rng,o=SelectionMode;switch(t.selectionMode){case o.Cell:i.setRange(e.row,e.col,e.row,e.col);break;case o.Row:i.setRange(e.row,0,e.row,t.columns.length-1);break;case o.RowRange:case o.ListBox:i.setRange(e.row,0,e.row2,t.columns.length-1);break;default:i.copy(e)}return i};GridPanel.prototype._getOffsetY=function(){return this._offsetY};GridPanel.prototype._updateContent=function(e,t,i,o){var n=this._g,r=this._e,l=this._rows,s=this._cols,a=this._ct;if(a==CellType.ColumnHeader||a==CellType.ColumnFooter||a==CellType.RowHeader){var d=n._ptScrl,u=r.style;a==CellType.RowHeader?u.top=d.y+"px":n.rightToLeft?u.right=d.x+"px":u.left=d.x+"px"}if(this._offsetY!=i){e=!1;this._offsetY=i}var c=this._getViewRange(),h=c;if(h.isValid){var _=l.length<=n._vtRows?l.length:0,p=s.length<=n._vtCols?s.length:0,g=l._frozenInternal>=0?Math.max(c.row-_,l._frozenInternal):Math.max(c.row-_,0),f=l._frozenInternal>=0?Math.min(c.row2+_,l.length-1):Math.min(c.row2+_,l.length-1+l._frozenInternal),m=s._frozenInternal>=0?Math.max(c.col-p,s._frozenInternal):Math.max(c.col-p,0),w=s._frozenInternal>=0?Math.min(c.col2+p,s.length-1):Math.min(c.col2+p,s.length-1+s._frozenInternal);h=new CellRange(g,m,f,w)}if(e&&!t&&this._vrb.contains(c)&&!l._frozenInternal&&!s._frozenInternal)return this._activeCell;e&&h.equals(this._vrb)||(t=!1);e&&!t&&this._ct!=CellType.TopLeft&&this._reorderCells(h,this._vrb);this._activeCell=null;this._vru=c;this._vrb=h;this._recycle=e;var C=this.grid.topLeftCells.hostElement.parentElement;[HeadersVisibility.Row,HeadersVisibility.Column].includes(n.headersVisibility)?wijmo_1.setAttribute(C,"aria-hidden",!0):C.removeAttribute("aria-hidden");this._updateCells(t,0,o);return this._activeCell};GridPanel.prototype._updateCells=function(e,t,i){var o=this,n=this._rows,renderVisibleRange=function(){for(var n=o._vrb.topRow;n<=o._vrb.bottomRow&&n>-1;n++)t=o._renderRow(n,o._vrb,e,t,i)};if(n._frozenInternal>0){!function(){for(var r=0;r<n._frozenInternal&&r<n.length;r++)t=o._renderRow(r,o._vrb,e,t,i)}();renderVisibleRange()}else if(n._frozenInternal<0){renderVisibleRange();!function(){for(var r=n._lastFrozen;r<n.length;r++)t=o._renderRow(r,o._vrb,e,t,i)}()}else renderVisibleRange();this._scanAndRemoveExtraCells(t)};GridPanel.prototype._scanAndRemoveExtraCells=function(e){for(var t=this._e;t.childElementCount>e;){var i=t.lastElementChild;wijmo_1.removeChild(i);this._removeExtraCells(i,0)}};GridPanel.prototype._clearCells=function(){for(var e=this.hostElement,t=this._g.cellFactory,i=e.childElementCount-1;i>=0;i--){for(var o=e.children[i],n=o.childElementCount-1;n>=0;n--)t.disposeCell(o.children[n]);wijmo_1.removeChild(o)}e.innerHTML=""};GridPanel.prototype._reorderCells=function(e,t){var i=this;if(this._g._reorderCells&&t.isValid&&e.isValid&&e.intersects(t)){var relocateForScrollToBeginning=function(e,t,o,n,r,l){wijmo_1.assert(o<0,"Scroll delta must be a negative number");var s,a,d=-o,u=t+(n-r+1),c=e.childElementCount-u;if(c<d&&c>0){s=c;a=d-c}else{s=d;a=0}if(s>0){var h=i._createRange(e,u,u+s);h&&e.insertBefore(h.extractContents(),e.children[t])}if(a>0)for(var _=e.children[t],p=0;p<a;p++){var g=document.createElement("div");g.className=l;e.insertBefore(g,_)}};if(e.row!=t.row){var o=this._e;if(0!=(a=e.row-t.row)){var n=this._ct==CellType.Cell?1:0,r=o.childElementCount;this.rows._frozenInternal>0&&(n+=this.rows._frozenInternal);if(a>0){var l=n,s=Math.min(n+a,r);(h=this._createRange(o,l,s))&&o.appendChild(h.extractContents())}else relocateForScrollToBeginning(o,n,a,e.row2,t.row,exports.FlexGridClsNames.row)}}if(e.col!=t.col){var a;o=this._e;if(0!=(a=e.col-t.col)){n=this._ct==CellType.Cell&&this._g.rowHeaderPath?1:0;this.columns._frozenInternal>=0&&(n+=this.columns._frozenInternal);for(var d=0;d<o.children.length;d++){var u=o.children[d],c=r=u.children.length;this.columns._frozenInternal<0&&(c+=this.columns._frozenInternal);if(wijmo_1.hasClass(u,exports.FlexGridClsNames.row))if(a>0){var h;l=n,s=Math.min(n+a,c);(h=this._createRange(u,l,s))&&u.appendChild(h.extractContents())}else relocateForScrollToBeginning(u,n,a,e.col2,t.col,exports.FlexGridClsNames.cell)}}}}};GridPanel.prototype._createRange=function(e,t,i){if(i>t&&i<=e.children.length&&t>-1){this._docRange||(this._docRange=document.createRange());var o=this._docRange;o.setStart(e,t);o.setEnd(e,i);return o}return null};GridPanel.prototype._renderRowHdrCell=function(e,t,i){var o=e.children[0];o||(o=wijmo_1.createElement(GridPanel._HTML_CELL,e));o.setAttribute("role",t<0?"columnheader":"rowheader");o.textContent=i?i.toString():"";wijmo_1.setCss(o,{position:"fixed",left:-32e3,top:-32e3,width:.1,height:.1,overflow:"hidden",opacity:"0"});o[GridPanel._INDEX_KEY]={row:t,col:-1,panel:this};return 1};GridPanel.prototype._renderRow=function(e,t,i,o,n){var r=this._g,l=this.rows[e];if(l.renderSize<=0)return o;var s=this._e.children[o];s||(s=wijmo_1.createElement('<div class="'+exports.FlexGridClsNames.row+'"></div>',this._e));var a=this._g.columnHeaders&&this._g.columnHeaders.rows&&this._g.columnHeaders.rows.length||0,d=this._g.headersVisibility&HeadersVisibility.Column?a:0,makeId=function(e,t,i){return"g-"+r._ariaId+"-"+e+"-"+t+"-"+i},setAriaOwns=function(t,i){for(var o=[],n=0;n<i;n++)o.push(makeId(t,e,n));return o.join(" ")};switch(this._ct){case CellType.ColumnHeader:if(r.headersVisibility&HeadersVisibility.Row&&r.headersVisibility&HeadersVisibility.Column){var u=[],c=setAriaOwns("tl",r.topLeftCells.columns.length);c&&u.push(c);var h=setAriaOwns("ch",this.columns.length);h&&u.push(h);(g=u.join(" "))&&wijmo_1.setAttribute(s,"aria-owns",g)}wijmo_1.setAttribute(s,"aria-rowindex",e+1);break;case CellType.TopLeft:wijmo_1.setAttribute(s,"aria-rowindex",e+1);break;case CellType.Cell:if(r.headersVisibility&HeadersVisibility.Row){u=[];var _=setAriaOwns("rh",r.rowHeaders.columns.length);_&&u.push(_);var p=setAriaOwns("cell",r.cells.columns.length);p&&u.push(p);var g=u.join(" ");this._allowSetAriaOwns(g,s)?wijmo_1.setAttribute(s,"aria-owns",g):wijmo_1.setAttribute(s,"aria-owns")}wijmo_1.setAttribute(s,"aria-rowindex",e+1+d);break;case CellType.RowHeader:wijmo_1.setAttribute(s,"aria-rowindex",e+1+d);break;case CellType.BottomLeft:case CellType.ColumnFooter:if(r.headersVisibility&HeadersVisibility.Row){u=[];var f=setAriaOwns("bl",r.bottomLeftCells.columns.length);f&&u.push(f);var m=setAriaOwns("cf",r.columnFooters.columns.length);m&&u.push(m);(g=u.join(" "))&&wijmo_1.setAttribute(s,"aria-owns",g)}var w=a+r.rows.length+e+1;wijmo_1.setAttribute(s,"aria-rowindex",w)}if(this._ct==CellType.Cell){s.setAttribute("role","row");var C=SelectionMode,v=l.isSelected;switch(r.selectionMode){case C.Row:case C.RowRange:v=v||this._g._selHdl.selection.containsRow(e)}wijmo_1.setAttribute(s,"aria-selected",!!v||null);wijmo_1.setAttribute(s,"aria-level",l instanceof GroupRow?l.level+1:null);wijmo_1.setAttribute(s,"aria-expanded",l instanceof GroupRow?!l.isCollapsed:null);this.rows.ariaLabel&&wijmo_1.setAttribute(s,"aria-label",this.rows.ariaLabel)}this._ct!==CellType.TopLeft&&this._ct!==CellType.ColumnFooter&&this._ct!==CellType.BottomLeft||s.setAttribute("role","row");var y=0;if(this._ct==CellType.Cell||this._ct==CellType.ColumnHeader){var b=this._g._getRowHeaderPath();if(b){var R=this._ct==CellType.Cell?[b.getValue(l.dataItem),e]:[b.path,-1],x=R[0],S=R[1];y=this._renderRowHdrCell(s,S,x)}}var E=t.clone();E.col=this.columns._frozenInternal>=0?0:this.columns.length+this.columns._frozenInternal;E.col2=this.columns._frozenInternal>=0?this.columns._frozenInternal-1:this.columns.length-1;if(this.columns._frozenInternal>=0)for(var j=0;j<this.columns._frozenInternal&&j<this.columns.length;j++)y=this._renderCell(s,e,j,E,i,y,n);else for(j=Math.max(0,this.columns.length+this.columns._frozenInternal);j<this.columns.length;j++)y=this._renderCell(s,e,j,E,i,y,n);if(t.leftCol>-1){var H=r.getMergedRange(this,e,t.leftCol,!1),F=-1;if(H){F=H.leftCol;for(;!this.columns[F].isVisible&&F<H.rightCol;)F++}H&&F<t.leftCol&&(y=this._renderCell(s,e,F,t,i,y,n))}for(j=t.leftCol;j<=t.rightCol&&j>-1;j++)y=this._renderCell(s,e,j,t,i,y,n);this._removeExtraCells(s,y);return o+1};GridPanel.prototype._allowSetAriaOwns=function(e,t){return!!e&&!wijmo_1.hasClass(t,"wj-detail-row")};GridPanel.prototype._renderCell=function(e,t,i,o,n,r,l){var s=this._g,a=this._ct==CellType.Cell?s.getMergedRange(this,t,i,!1):s.getMergedRange(this,t,i);if(a){for(var d=Math.max(o.row,a.row);d<t;d++)if(this.rows[d].renderSize)return r;for(d=Math.max(o.col,a.col);d<i;d++)if(this.columns[d].renderSize)return r;if(t>=a.row&&t<=a.row2&&i>a.col&&i<=a.col2&&this._ct===CellType.Cell&&a.isSingleCell)return r;var u=this.columns._frozenInternal;if(u&&a.col<u&&a.col2>=u&&i>a.col)return r;if(!this.columns[i].isVisible&&"DetailRow"!==this._rows[t].constructor.name)return r;if(a.leftCol!=i)for(var c=a.leftCol;c<i;c++)if(this.columns[c].isVisible)return r}var h=this.columns[i];if((!h||h.renderSize<=0)&&(!a||a.getRenderSize(this).width<=0))return r;var _=e.children[r];if(_&&!n&&this._recycle&&s._lazyRender&&!s.activeEditor){var p=_[GridPanel._INDEX_KEY];p&&p.row==t&&p.col==i&&p.rng==a&&(this.rows.isFrozen(t)||this.columns.isFrozen(i)||(n=!0))}var g=SelectedState,f=this.getSelectedState(t,i,a),m=f==g.Cursor||f==g.Active,w=!1;switch(this.cellType){case CellType.RowHeader:case CellType.ColumnHeader:case CellType.TopLeft:case CellType.BottomLeft:case CellType.ColumnFooter:w=!0}if(_&&n){wijmo_1.toggleClass(_,wijmo_1.ControlStateClsNames.active,m);wijmo_1.toggleClass(_,w?exports.FlexGridClsNames.focusHeaderCell:wijmo_1.ControlStateClsNames.selected,f==g.Cursor);wijmo_1.toggleClass(_,wijmo_1.ControlStateClsNames.multiSelected,f==g.Selected);_.querySelector(".wj-column-selector, .wj-cell-check")||wijmo_1.setAttribute(_,"aria-selected",!(!m&&f==g.None)||null);m&&(this._activeCell=_);return r+1}_||(_=wijmo_1.createElement(GridPanel._HTML_CELL,e));var C=l?i+1+l:i+1;wijmo_1.setAttribute(_,"aria-colindex",C);m&&(this._activeCell=_);if(this._ct==CellType.Cell){wijmo_1.setAttribute(_,"role","gridcell");wijmo_1.setAttribute(_,"aria-selected",!(f==g.None&&!m)||null);var v=!s.canEditCell(t,i)||null;wijmo_1.setAttribute(_,"aria-readonly",v);wijmo_1.setAttribute(_,"aria-required",v?null:h.getIsRequired())}this._ct!==CellType.ColumnFooter&&this._ct!==CellType.BottomLeft||wijmo_1.setAttribute(_,"role","gridcell");s.cellFactory.updateCell(this,t,i,_,a);_[GridPanel._INDEX_KEY]={row:t,col:i,rng:a,panel:this};return r+1};GridPanel.prototype._removeExtraCells=function(e,t){var i=this._g.cellFactory;0!==t||this.cellType!==CellType.RowHeader&&this.cellType!==CellType.TopLeft&&this.cellType!==CellType.BottomLeft||wijmo_1.setAttribute(e,"aria-hidden","true");for(;e.childElementCount>t;){var o=e.lastElementChild;i.disposeCell(o);wijmo_1.removeChild(o)}};GridPanel.prototype._getViewRange=function(){var e=this._g,t=e._ptScrl,i=e._szClientSB,o=this._rows,n=this._cols,r=new CellRange(0,0,o.length-1,n.length-1);if(this._ct==CellType.Cell||this._ct==CellType.RowHeader){var l=-t.y+this._offsetY,s=i.height;if((c=Math.min(Math.abs(o._frozenInternal),o.length-1))>0)if(o._frozenInternal>=0){l+=p=o[c-1].pos;s-=p}else{s+=p=o[o.length-c]._antipos}if(o._frozenInternal>=0)if(c>0&&o[c].pos>i.height)r.row=r.row2=-1;else{r.row=Math.min(o.length-1,Math.max(c,o.getItemAt(l)));r.row2=Math.max(r.row,o.getItemAt(l+s))}else if(c>0&&o[o.length-c]._antipos+i.height<0)r.row=r.row2=-1;else{r.row=Math.min(o.length+o._frozenInternal-1,o.getItemAt(l));r.row2=Math.max(r.row,o.getItemAt(l+s));e.columnFooters.rows.length>0&&(r.row2-=e.columnFooters.rows.length)}var a=e.hostElement;if(e._clipToScreen&&a){var d=a.getBoundingClientRect(),u=-d.top-e.cells._e.offsetTop;d.top<0&&(r.row=Math.max(r.row,o.getItemAt(u)-1));d.bottom>innerHeight&&(r.row2=Math.min(r.row2,o.getItemAt(u+innerHeight)+1))}}if(this._ct==CellType.Cell||this._ct==CellType.ColumnHeader){var c,h=-t.x,_=i.width;if((c=Math.min(Math.abs(n._frozenInternal),n.length-1))>0&&n._frozenInternal>0){h+=p=n[c-1].pos;_-=p}else if(c>0&&n._frozenInternal<0){var p;h+=p=n[0].pos}if(n._frozenInternal>=0?c>0&&n[c].pos>i.width:c>0&&Math.abs(n[n.length-c]._antipos)>i.width)r.col=r.col2=-1;else if(n._frozenInternal>=0){r.col=Math.min(n.length-1,Math.max(c,n.getItemAt(h)));r.col2=Math.max(r.col,n.getItemAt(h+_))}else{r.col=Math.min(n.length-1,Math.max(0,n.getItemAt(h)));r.col2=Math.max(r.col,n.getItemAt(h+_-n._frozenColAreaWidth))}}o.length<=Math.abs(o._frozenInternal)&&(r.row=r.row2=-1);n.length<=Math.abs(n._frozenInternal)&&(r.col=r.col2=-1);return r};GridPanel.prototype._getFrozenPos=function(){var e=this._rows._frozenInternal,t=this._cols._frozenInternal,i=null,o=null,n=0,r=0;e>0?n=(i=e>0?this._rows[e-1]:null)?i.pos+i.renderSize:0:e<0&&this._rows.lastFrozen&&(n=Math.min(this._rows.lastFrozen.pos,this._g._szClient.height+this._rows.lastFrozen._antipos));t>0?r=(o=t>0?this._cols[t-1]:null)?o.pos+o.renderSize:0:t<0&&this._cols.lastFrozen&&(r=Math.min(this._cols.lastFrozen.pos,this._g._szClient.width+this._cols.lastFrozen._antipos));return new wijmo_1.Point(r,n)};GridPanel.prototype.dispose=function(){this._clearCells();if(this._docRange){this._docRange.detach();this._docRange=null}this._g=null;this._e=null;this._rows=null;this._cols=null;this._activeCell=null};GridPanel._INDEX_KEY=exports.FlexGridClsNames.cellIndex;GridPanel._HTML_CELL='<div class="'+exports.FlexGridClsNames.cell+'" tabindex="-1"></div>';return GridPanel}();exports.GridPanel=GridPanel;var CellRangeEventArgs=function(e){__extends(CellRangeEventArgs,e);function CellRangeEventArgs(t,i,o){var n=e.call(this)||this;n._p=wijmo_1.asType(t,GridPanel,!0);n._rng=wijmo_1.asType(i,CellRange,!0);n._data=o;return n}Object.defineProperty(CellRangeEventArgs.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"range",{get:function(){return this._rng.clone()},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"row",{get:function(){return this._rng.row},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"col",{get:function(){return this._rng.col},enumerable:!0,configurable:!0});Object.defineProperty(CellRangeEventArgs.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0});CellRangeEventArgs.prototype.getRow=function(){return this._p&&this.row>-1?this._p.rows[this.row]:null};CellRangeEventArgs.prototype.getColumn=function(e){var t=this._p,i=t&&this.col>-1?t.columns[this.col]:null;if(i&&e){var o=t.grid;i=t.cellType===CellType.ColumnHeader&&o._hasColumnGroups()?o._getColumnGroup(this.row,this.col):t.grid._getBindingColumn(t,this.row,i)}return i};return CellRangeEventArgs}(wijmo_1.CancelEventArgs);exports.CellRangeEventArgs=CellRangeEventArgs;var FormatItemEventArgs=function(e){__extends(FormatItemEventArgs,e);function FormatItemEventArgs(t,i,o,n){void 0===n&&(n=!0);var r=e.call(this,t,i)||this;r._updateContent=!0;r._cell=wijmo_1.asType(o,HTMLElement);return r}Object.defineProperty(FormatItemEventArgs.prototype,"cell",{get:function(){return this._cell},enumerable:!0,configurable:!0});Object.defineProperty(FormatItemEventArgs.prototype,"updateContent",{get:function(){return this._updateContent},enumerable:!0,configurable:!0});return FormatItemEventArgs}(CellRangeEventArgs);exports.FormatItemEventArgs=FormatItemEventArgs;var SelectionMode,SelectedState,SelMove,CellEditEndingEventArgs=function(e){__extends(CellEditEndingEventArgs,e);function CellEditEndingEventArgs(){var t=null!==e&&e.apply(this,arguments)||this;t._stayInEditMode=!1;t._refresh=!0;return t}Object.defineProperty(CellEditEndingEventArgs.prototype,"stayInEditMode",{get:function(){return this._stayInEditMode},set:function(e){this._stayInEditMode=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellEditEndingEventArgs.prototype,"refresh",{get:function(){return this._refresh},set:function(e){this._refresh=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(CellEditEndingEventArgs.prototype,"previousData",{get:function(){return null!=this._previousData?this._previousData:this._data},set:function(e){this._previousData=e},enumerable:!0,configurable:!0});return CellEditEndingEventArgs}(CellRangeEventArgs);exports.CellEditEndingEventArgs=CellEditEndingEventArgs;function softInput(){return wijmo_1._getModule("wijmo.input")}exports.softInput=softInput;function softDetailRow(){return wijmo_1._getModule("wijmo.grid.detail")}exports.softDetailRow=softDetailRow;function softMultirow(){return wijmo_1._getModule("wijmo.grid.multirow")}exports.softMultirow=softMultirow;function softTransposed(){return wijmo_1._getModule("wijmo.grid.transposed")}exports.softTransposed=softTransposed;function softTransposedMultirow(){return wijmo_1._getModule("wijmo.grid.transposedmultirow")}exports.softTransposedMultirow=softTransposedMultirow;function softRestCV(){return wijmo_1._getModule("wijmo.rest")}exports.softRestCV=softRestCV;function softODataCV(){return wijmo_1._getModule("wijmo.odata")}exports.softODataCV=softODataCV;function softGridInteropBase(){return wijmo_1._getModule("wijmo.interop.grid")}exports.softGridInteropBase=softGridInteropBase;!function(e){e[e.None=0]="None";e[e.Cell=1]="Cell";e[e.CellRange=2]="CellRange";e[e.Row=3]="Row";e[e.RowRange=4]="RowRange";e[e.ListBox=5]="ListBox";e[e.MultiRange=6]="MultiRange"}(SelectionMode=exports.SelectionMode||(exports.SelectionMode={}));!function(e){e[e.None=0]="None";e[e.Selected=1]="Selected";e[e.Cursor=2]="Cursor";e[e.Active=3]="Active"}(SelectedState=exports.SelectedState||(exports.SelectedState={}));!function(e){e[e.None=0]="None";e[e.Next=1]="Next";e[e.Prev=2]="Prev";e[e.NextPage=3]="NextPage";e[e.PrevPage=4]="PrevPage";e[e.Home=5]="Home";e[e.End=6]="End";e[e.NextCell=7]="NextCell";e[e.PrevCell=8]="PrevCell";e[e.NextEditableCell=9]="NextEditableCell";e[e.PrevEditableCell=10]="PrevEditableCell"}(SelMove=exports.SelMove||(exports.SelMove={}));var RowColFlags,_SelectionHandler=function(){function _SelectionHandler(e){this._sel=new CellRange(0,0);this._xSel=new wijmo_1.ObservableArray;this._mode=SelectionMode.CellRange;this._g=e;this._e=new CellRangeEventArgs(e.cells,new CellRange(0,0));this._collectionChangedHandler=function(){e.invalidate()};this._xSel.collectionChanged.addHandler(this._collectionChangedHandler)}Object.defineProperty(_SelectionHandler.prototype,"selectionMode",{get:function(){return this._mode},set:function(e){e!=this._mode&&this._setSelectionMode(e)},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"selection",{get:function(){return this._sel},set:function(e){this.select(e)},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"extendedSelection",{get:function(){return this._xSel},enumerable:!0,configurable:!0});Object.defineProperty(_SelectionHandler.prototype,"cellRangeEventArgs",{get:function(){return this._e},enumerable:!0,configurable:!0});_SelectionHandler.prototype.select=function(e,t,i,o){void 0===t&&(t=!0);void 0===i&&(i=!1);o||(o=this._g._gpCells);var n=this._g,r=this._e.range,l=this._sel,s=r,a=!1,d=SelectionMode,u=n.activePanelType,c=o.cellType==CellType.RowHeader||o.cellType==CellType.ColumnHeader,h=o.cellType==CellType.BottomLeft||o.cellType==CellType.ColumnFooter,_=!c&&!h;n._mouseHdl._eMouse&&(n._mouseHdl._eMouse.ctrlKey||n._mouseHdl._eMouse.metaKey);if(wijmo_1.isNumber(e)&&wijmo_1.isString(t)){var p=o.columns.indexOf(t);if(p<0)throw"Invalid column name or binding.";r.setRange(e,p);t=!0}else if(wijmo_1.isNumber(e)&&wijmo_1.isNumber(t)){r.setRange(e,t);t=!0}else e instanceof CellRange?r.copy(e):wijmo_1.assert(!1,"CellRange expected");n.activePanel=o;switch(n.selectionMode){case d.Cell:s.row2=s.row;s.col2=s.col;break;case d.Row:s.row2=s.row;break;case d.ListBox:a=!0}if(c||h){s.row2=s.row;s.col2=s.col}var g=s.equals(l)&&u==o.cellType;if(g&&a&&_)for(var f=0;f<n.rows.length;f++)if(n.rows[f].isSelected!==s.containsRow(f)){g=!1;break}if(g){t&&o.isRangeValid(s)&&this._showSelection();return!0}var m=wijmo_1.Control.getControl(wijmo_1.closest(wijmo_1.getActiveElement(),"."+exports.FlexGridClsNames.hostElement));if(m&&m==n&&m.activeEditor&&!m.finishEditing())return!1;var w=this._e;w._rng=s;w.cancel=!1;if(!n.onSelectionChanging(w)&&!i)return!1;_&&a&&n.rows.forEach((function(e,t){e._setFlag(RowColFlags.Selected,s.containsRow(t),!0)}));s.row=Math.min(s.row,o.rows.length-1);s.row2=Math.min(s.row2,o.rows.length-1);this._sel.copy(s);n.refreshCells(!1,!0,!0);t&&this._showSelection();var C=n.collectionView;if(C&&_){var v=n._getCvIndex(s.row);C.moveCurrentToPosition(v)}var y=wijmo_1.getActiveElement();this._g.errorTip&&(y.classList.contains(wijmo_1.ControlStateClsNames.invalid)?this._g.errorTip._showAutoTip(void 0,y):this._g.errorTip.hide());n.onSelectionChanged(w);return!0};_SelectionHandler.prototype.moveSelectionWithinSelectedPanel=function(e,t){var i=this._g,o=this._sel.clone(),n=i.activePanel,r=i.getMergedRange(n,o.row,o.col,!1);r||(r=new CellRange(o.row,o.col));if(e>0){var l=n.getNextVisibleRow(r.bottomRow+e);l>=0&&(o.row=o.row2=l);if(!n.columns[o.col].isVisible){var s=n.getNextVisibleColumn(r.leftCol);s>=0&&(o.col=o.col2=s)}}else if(e<0){var a=n.getLastVisibleRow(r.topRow+e);a>=0&&(o.row=o.row2=a)}if(t>0){var d=n.getNextVisibleColumn(r.rightCol+t);d>=0&&(o.col=o.col2=d)}else if(t<0){var u=n.getLastVisibleColumn(r.leftCol+t);u>=0&&(o.col=o.col2=u)}o.equals(this._sel)||i.select(o,!0,n)};_SelectionHandler.prototype.moveSelection=function(e,t,i){var o=this._g,n=this._sel,r=i&&o.anchorCursor?new CellRange(n.row2,n.col2):new CellRange(n.row,n.col),l=r.row,s=r.col,a=o.columns,d=Math.max(0,o._szClient.height-o.columnHeaders.height),u=SelMove,c=-1,h=o.getMergedRange(o.cells,l,s),_=0;if(h){t==u.Next||t==u.NextCell||t==u.NextEditableCell?s=h.rightCol:t!=u.Prev&&t!=u.PrevCell&&t!=u.PrevEditableCell||(s=h.leftCol);if(e==u.Next||e==u.NextCell||e==u.NextEditableCell){l=h.bottomRow;if(softMultirow()&&o instanceof softMultirow().MultiRow){_=r.row-h.topRow;if(h.bottomRow===o.rows.length-1)return}}else if(e==u.Prev||e==u.PrevCell||e==u.PrevEditableCell){l=h.topRow;if(softMultirow()&&o instanceof softMultirow().MultiRow){_=r.row-h.bottomRow;if(0===h.topRow)return}}}switch(t){case u.NextCell:case u.NextEditableCell:c=s;(s=this._getNextColumnCell(l,c,t))!=c&&(h=o.getMergedRange(o.cells,l,s))&&s<h.col2&&(s=h.col2);if(s==c)for(;;){if(l==o.rows.length-1){s=r.col;l=r.row;break}var p=!1;if((l=this._getNextRowCell(l,s,t))>r.row){c=-1;for(;c<a.length;){if((s=this._getNextColumnCell(l,c,t))==c){p=!0;break}(h=o.getMergedRange(o.cells,l,s))&&s<h.col2&&(s=h.col2);break}if(p)continue}break}o.select(l,s);break;case u.PrevCell:case u.PrevEditableCell:c=s;(s=this._getNextColumnCell(l,c,t))!=c&&(h=o.getMergedRange(o.cells,l,s))&&s>h.col&&(s=h.col);if(s==c)for(;;){if(0==l){s=r.col;l=r.row;break}p=!1;if((l=this._getNextRowCell(l,s,t))<r.row){c=a.length;for(;c>-1;){(s=this._getNextColumnCell(l,c,t))!=c?(h=o.getMergedRange(o.cells,l,s))&&s>h.col&&(s=h.col):p=!0;break}if(p)continue}break}o.select(l,s);break;default:l=this._getNextRowCell(l,s,e,d);l+=_;s=this._getNextColumnCell(l,s,t,d);i?o.selection=o.anchorCursor?new CellRange(n.row,n.col,l,s):new CellRange(l,s,n.row2,n.col2):o.select(l,s)}};_SelectionHandler.prototype._getNextColumnCell=function(e,t,i,o){void 0===o&&(o=0);return this._g.columns.getNextCell(t,i,o)};_SelectionHandler.prototype._getNextRowCell=function(e,t,i,o){void 0===o&&(o=0);return this._g.rows.getNextCell(e,i,o)};_SelectionHandler.prototype._setSelectionMode=function(e){var t=this._g,i=t.rows;this._mode=e;this._xSel.clear();if(i.length){this._adjustSelection(this._sel,e,!0);t.invalidate()}};_SelectionHandler.prototype._adjustSelection=function(e,t,i){void 0===i&&(i=!1);var o,n=this._g.rows,r=SelectionMode;if(this._g.hostElement){o=this._g.hostElement.querySelector("input.wj-column-selector")instanceof HTMLInputElement}if(!o)for(var l=0;l<n.length;l++)n[l]._setFlag(RowColFlags.Selected,!1,!0);var s=e.clone();switch(t){case r.None:s=new CellRange;break;case r.Cell:s=new CellRange(e.row,e.col);break;case r.ListBox:if(o)return;for(l=0;l<n.length;l++)n[l]._setFlag(RowColFlags.Selected,s.containsRow(l),!0)}this.select(s,!1,i)};_SelectionHandler.prototype._expandSelection=function(){var e=this._g,t=e.selectionMode;if(e.expandSelectionOnCopyPaste&&t){var i=this.selection,o=SelectionMode;switch(t){case o.Cell:case o.Row:break;case o.ListBox:this._expandSelectedRows();break;case o.RowRange:i=new CellRange(i.topRow,0,i.bottomRow,e.columns.length-1);default:var n=this._expandSelectionRange(i);n&&this.select(n,!1)}}};_SelectionHandler.prototype._deselectRange=function(e){var t=this.selection,i=this.extendedSelection;if(t.contains(e)){var o=i.length;this._sel=o?i[o-1]:new CellRange;o&&i.removeAt(o-1);return!0}for(var n=0;n<i.length;n++)if(i[n].contains(e)){i.removeAt(n);return!0}return!1};_SelectionHandler.prototype._expandSelectedRows=function(){wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"ListBox mode expected");for(var e=this._g,t=e.selectedRows.map((function(e){return e.index})),i=[],o=0;o<t.length;o++)for(var n=new CellRange(t[o],0,t[o],e.columns.length-1),r=this._expandSelectionRange(n)||n,l=r.topRow;l<=r.bottomRow;l++)-1===i.indexOf(l)&&i.push(l);i.sort();this._selectRows(i)};_SelectionHandler.prototype._expandSelectionRange=function(e){var t=this._g,i=t.cells,o=t.getMergedRange(i,e.topRow,e.leftCol,!1),n=t.getMergedRange(i,e.bottomRow,e.leftCol,!1),r=t.getMergedRange(i,e.topRow,e.rightCol,!1),l=t.getMergedRange(i,e.bottomRow,e.rightCol,!1);if(o||n||r||l){o=o||new CellRange(e.topRow,e.leftCol);n=n||new CellRange(e.bottomRow,e.leftCol);r=r||new CellRange(e.topRow,e.rightCol);l=l||new CellRange(e.bottomRow,e.rightCol);return new CellRange(Math.min(o.topRow,n.topRow,r.topRow,l.topRow),Math.min(o.leftCol,n.leftCol,r.leftCol,l.leftCol),Math.max(o.bottomRow,n.bottomRow,r.bottomRow,l.bottomRow),Math.max(o.rightCol,n.rightCol,r.rightCol,l.rightCol))}return null};_SelectionHandler.prototype._selectRows=function(e){wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"ListBox mode expected");for(var t=this._g,i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n.index)>-1;if(r&&o){o=!1;this.select(i,this.selection.col)}n.isSelected=r}};_SelectionHandler.prototype._showSelection=function(){var e=this._g,t=this._sel.clone();e.activePanelType===CellType.ColumnHeader?t.row=-1:e.activePanelType===CellType.RowHeader?t.col=-1:(e.activePanelType===CellType.BottomLeft||e.activePanelType===CellType.ColumnFooter)&&(t.row=-1);e.activePanelType!==CellType.TopLeft&&(e.anchorCursor?e.scrollIntoView(t.row2,t.col2):e.scrollIntoView(t.row,t.col));e.activePanelType!==CellType.Cell&&this._showHeaderSelection()};_SelectionHandler.prototype._showHeaderSelection=function(){var e=this._g.activePanel.activeCell;if(e){var t=e.getBoundingClientRect(),i=0,o=0,n=document.documentElement.clientWidth,r=document.documentElement.clientHeight;t.y<0?i=t.y:t.y>r-2&&(i=t.y-r+t.height);t.x<0?o=t.x:t.x>n-2&&(o=t.x-n+t.width);0==i&&0==o||window.scrollBy(o,i)}};_SelectionHandler.prototype.dispose=function(){if(this._xSel&&this._collectionChangedHandler){this._xSel.collectionChanged.removeHandler(this._collectionChangedHandler);this._collectionChangedHandler=null}this._g=null;this._e=null;this._xSel=null};return _SelectionHandler}();exports._SelectionHandler=_SelectionHandler;!function(e){e[e.Visible=1]="Visible";e[e.AllowResizing=2]="AllowResizing";e[e.AllowDragging=4]="AllowDragging";e[e.AllowMerging=8]="AllowMerging";e[e.AllowSorting=16]="AllowSorting";e[e.AutoGenerated=32]="AutoGenerated";e[e.Collapsed=64]="Collapsed";e[e.ParentCollapsed=128]="ParentCollapsed";e[e.Selected=256]="Selected";e[e.ReadOnly=512]="ReadOnly";e[e.HtmlContent=1024]="HtmlContent";e[e.WordWrap=2048]="WordWrap";e[e.MultiLine=4096]="MultiLine";e[e.HasTemplate=8192]="HasTemplate";e[e.RowDefault=3]="RowDefault";e[e.ColumnDefault=23]="ColumnDefault"}(RowColFlags=exports.RowColFlags||(exports.RowColFlags={}));var RowCol=function(){function RowCol(){this._type=null;this._align=null;this._inpType=null;this._mask=null;this._maxLen=null;this._required=null;this._fmt=null;this._map=null;this._ddCssClass=null;this._cssClass=null;this._cssClassAll=null;this._szMin=null;this._szMax=null;this._sz=null;this._pos=0;this._antipos=0;this._idx=-1;this._idxVis=-1;this._idxData=-1;this.gridChanged=new wijmo_1.Event}Object.defineProperty(RowCol.prototype,"binding",{get:function(){return this._binding?this._binding.path:null},set:function(e){if(e!=this.binding){var t=wijmo_1.asString(e);this._binding=t?new wijmo_1.Binding(t):null;if(!this._type&&this.grid&&this._binding){var i=this.grid.collectionView;if(i&&i.sourceCollection&&i.sourceCollection.length){var o=i.sourceCollection[0];this._type=wijmo_1.getType(this._binding.getValue(o))}}this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"sortMemberPath",{get:function(){return this._bindingSort?this._bindingSort.path:null},set:function(e){if(e!=this.sortMemberPath){var t=wijmo_1.asString(e);this._bindingSort=t?new wijmo_1.Binding(t):null;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataType",{get:function(){return this._type},set:function(e){e=wijmo_1.asEnum(e,wijmo_1.DataType,!0);if(this._type!=e){this._type=e;this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"inputType",{get:function(){return this._inpType},set:function(e){this._inpType=wijmo_1.asString(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"mask",{get:function(){return this._mask},set:function(e){this._mask=wijmo_1.asString(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"maxLength",{get:function(){return this._maxLen},set:function(e){this._maxLen=wijmo_1.asNumber(e,!0,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"align",{get:function(){return this._align},set:function(e){if(this._align!=e){this._align=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"format",{get:function(){return this._fmt},set:function(e){if(this._fmt!=e){this._fmt=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataMap",{get:function(){return this._map},set:function(e){if(this._map!=e){this._map&&this._map.mapChanged.removeHandler(this.onPropertyChanged,this);wijmo_1.isArray(e)&&(e=new DataMap(e,null,null));this._map=wijmo_1.asType(e,DataMap,!0);this._map&&this._map.mapChanged.addHandler(this.onPropertyChanged,this);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dataMapEditor",{get:function(){return null!=this._mapEditor?this._mapEditor:DataMapEditor.DropDownList},set:function(e){if(e!=this._mapEditor){this._mapEditor=wijmo_1.asEnum(e,DataMapEditor);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"showDropDown",{get:function(){return this.dataMapEditor==DataMapEditor.DropDownList},set:function(e){wijmo_1._deprecated("showDropDown","dataMapEditor");this.dataMapEditor=e?DataMapEditor.DropDownList:DataMapEditor.AutoComplete},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"dropDownCssClass",{get:function(){return this._ddCssClass},set:function(e){this._ddCssClass=wijmo_1.asString(e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"visible",{get:function(){return this._getFlag(RowColFlags.Visible)},set:function(e){this._setFlag(RowColFlags.Visible,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isVisible",{get:function(){if(!this._getFlag(RowColFlags.Visible))return!1;if(this._getFlag(RowColFlags.ParentCollapsed)&&!(this instanceof _NewRowTemplate))return!1;var e=this.grid;if(e&&this._list){if(this._list===e.columnHeaders.rows&&(e.headersVisibility===HeadersVisibility.None||e.headersVisibility===HeadersVisibility.Row))return!1;if(this._list===e.rowHeaders.columns&&(e.headersVisibility===HeadersVisibility.None||e.headersVisibility===HeadersVisibility.Column))return!1}return!0},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"pos",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._pos},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"index",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._idx},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"visibleIndex",{get:function(){this._list&&this._list._dirty&&this._list._update();return this.isVisible?this._idxVis:-1},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"size",{get:function(){return this._sz},set:function(e){if(e!=this._sz){this._sz=wijmo_1.asNumber(e,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"renderSize",{get:function(){var e=0,t=this._list;if(this.isVisible){(null==(e=this._sz)||e<0)&&(e=t?t.defaultSize:0);t&&null!=t.minSize&&e<t.minSize&&(e=t.minSize);t&&null!=t.maxSize&&e>t.maxSize&&(e=t.maxSize);null!=this._szMin&&e<this._szMin&&(e=this._szMin);null!=this._szMax&&e>this._szMax&&(e=this._szMax)}return e},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowResizing",{get:function(){return this._getFlag(RowColFlags.AllowResizing)},set:function(e){this._setFlag(RowColFlags.AllowResizing,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowDragging",{get:function(){return this._getFlag(RowColFlags.AllowDragging)},set:function(e){this._setFlag(RowColFlags.AllowDragging,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"allowMerging",{get:function(){return this._getFlag(RowColFlags.AllowMerging)},set:function(e){this._setFlag(RowColFlags.AllowMerging,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isSelected",{get:function(){return this._getFlag(RowColFlags.Selected)},set:function(e){if(!!e!=this.isSelected){var t=this.grid;if(t){var i=this instanceof Row?new CellRange(this.index,0,this.index,t.columns.length-1):new CellRange(0,this.index,t.rows.length-1,this.index),o=new CellRangeEventArgs(t?t.cells:null,i);if(t.onSelectionChanging(o)&&this._setFlag(RowColFlags.Selected,e,!0)){t.refreshCells(!1,!0,!0);t.onSelectionChanged(o);t.onRowColSelected(o)}}else this._setFlag(RowColFlags.Selected,e)}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isReadOnly",{get:function(){return this._getFlag(RowColFlags.ReadOnly)},set:function(e){this._setFlag(RowColFlags.ReadOnly,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isRequired",{get:function(){return this._required},set:function(e){this._required=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"isContentHtml",{get:function(){return this._getFlag(RowColFlags.HtmlContent)},set:function(e){if(this.isContentHtml!=e){this._setFlag(RowColFlags.HtmlContent,e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"wordWrap",{get:function(){return this._getFlag(RowColFlags.WordWrap)},set:function(e){this._setFlag(RowColFlags.WordWrap,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"multiLine",{get:function(){return this._getFlag(RowColFlags.MultiLine)},set:function(e){this._setFlag(RowColFlags.MultiLine,e)},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"cssClass",{get:function(){return this._cssClass},set:function(e){if(e!=this._cssClass){this._cssClass=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"cssClassAll",{get:function(){return this._cssClassAll},set:function(e){if(e!=this._cssClassAll){this._cssClassAll=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"grid",{get:function(){return this._list?this._list._g:null},enumerable:!0,configurable:!0});Object.defineProperty(RowCol.prototype,"collectionView",{get:function(){return this.grid?this.grid.collectionView:null},enumerable:!0,configurable:!0});RowCol.prototype.onPropertyChanged=function(){if(this._list){this._list._dirty=!0;this.grid.invalidate()}};RowCol.prototype.onGridChanged=function(e){this.gridChanged.raise(this,e)};RowCol.prototype._setList=function(e){if(e!=this._list){this._list=e;this.onGridChanged()}};RowCol.prototype._getFlag=function(e){return 0!=(this._f&e)};RowCol.prototype._setFlag=function(e,t,i){if(!!t!=this._getFlag(e)){this._f=t?this._f|e:this._f&~e;i||this.onPropertyChanged();return!0}return!1};return RowCol}();exports.RowCol=RowCol;var Column=function(e){__extends(Column,e);function Column(t){var i=e.call(this)||this;i._hdr=null;i._plholder=null;i._name=null;i._agg=null;i._quickSize=null;i._descById=null;i._sortOrder=null;i._tpl=null;i._f=RowColFlags.ColumnDefault;i._hash=Column._ctr.toString(36);Column._ctr++;wijmo_1.copy(i,t);i._uid=wijmo_1.uidGenerator();return i}Object.defineProperty(Column.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"width",{get:function(){return null!=this._szStar?this._szStar:this.size},set:function(e){if(null!=Column._parseStarSize(e)){this._szStar=e;this.onPropertyChanged()}else{this._szStar=null;this.size=wijmo_1.asNumber(e,!0)}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"minWidth",{get:function(){return this._szMin},set:function(e){if(e!=this._szMin){this._szMin=wijmo_1.asNumber(e,!0,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"maxWidth",{get:function(){return this._szMax},set:function(e){if(e!=this._szMax){this._szMax=wijmo_1.asNumber(e,!0,!0);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(e){this._quickSize=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});Column.prototype._getQuickAutoSize=function(){return!!this.grid._getQuickAutoSize()&&(wijmo_1.isBoolean(this._quickSize)?this._quickSize:!(this.isContentHtml||this.wordWrap||this.multiLine||this._getFlag(RowColFlags.HasTemplate)))};Object.defineProperty(Column.prototype,"renderWidth",{get:function(){return this.renderSize},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"header",{get:function(){return this._hdr?this._hdr:this.binding},set:function(e){if(this._hdr!=e){this._hdr=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"placeholder",{get:function(){return this._plholder?this._plholder:this.header},set:function(e){if(this._plholder!=e){this._plholder=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"cellTemplate",{get:function(){return this._tpl},set:function(e){if(e!=this._tpl){wijmo_1.assert(null==e||wijmo_1.isString(e)||wijmo_1.isFunction(e),"cellTemplate should be a string or an ICellTemplateFunction.");this._tpl=e;this._setFlag(RowColFlags.HasTemplate,null!=e&&""!=e);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"editor",{get:function(){var e=this._edt;return e?e.control:null},set:function(e){if(e!=this.editor){if(this._edt){this._edt.dispose();this._edt=null}if(null!=e){e=wijmo_1.asType(e,wijmo_1.Control);this._edt=new _CustomEditor(this,e)}}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"allowSorting",{get:function(){return this._getFlag(RowColFlags.AllowSorting)},set:function(e){this._setFlag(RowColFlags.AllowSorting,e)},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){null!=e&&(e=wijmo_1.asEnum(e,SortOrder));if(this._sortOrder!=e){this._sortOrder=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"currentSort",{get:function(){var e=this.currentSortIndex;if(e>-1){return this.grid.collectionView.sortDescriptions[e].ascending?"+":"-"}return null},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"currentSortIndex",{get:function(){var e=this.grid?this.grid.collectionView:null,t=e?e.sortDescriptions:null,i=t&&t.length?this._getBindingSort():null;if(i)for(var o=0;o<t.length;o++)if(t[o].property==i)return o;return-1},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"aggregate",{get:function(){return null!=this._agg?this._agg:wijmo_1.Aggregate.None},set:function(e){if((e=wijmo_1.asEnum(e,wijmo_1.Aggregate))!=this._agg){this._agg=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(Column.prototype,"describedById",{get:function(){return this._descById},set:function(e){if(e!=this._descById){this._descById=wijmo_1.asString(e);this.grid&&this.grid.invalidate()}},enumerable:!0,configurable:!0});Column.prototype.getIsRequired=function(e){return null!=this._required?this._required:e&&null!=e.isRequired?e.isRequired:this.dataType==wijmo_1.DataType.String?null!=this.dataMap||null!=this._mask&&this._mask.length>0:!e||e.dataType!=wijmo_1.DataType.String||(null!=e.dataMap||null!=e.mask&&e.mask.length>0)};Column.prototype.getAlignment=function(e){if(null!=this._align)return this._align;if(e&&null!=e.align)return e.align;if(!this._map)switch(this.dataType){case wijmo_1.DataType.Boolean:return"center";case wijmo_1.DataType.Number:return"right"}if(e&&!e.dataMap)switch(e.dataType){case wijmo_1.DataType.Boolean:return"center";case wijmo_1.DataType.Number:return"right"}return""};Column.prototype._getBindingSort=function(){return this.sortMemberPath?this.sortMemberPath:this.binding?this.binding:null};Column._parseStarSize=function(e){if(wijmo_1.isString(e)){var t=e.length;if(t>0&&"*"==e[t-1]){var i=1==t?1:parseFloat(e);if(i>0&&!isNaN(i))return i}}return null};Column._ctr=0;return Column}(RowCol);exports.Column=Column;var Row=function(e){__extends(Row,e);function Row(t){var i=e.call(this)||this;i.resizedManually=!1;i._f=RowColFlags.ColumnDefault;i._data=t||null;return i}Object.defineProperty(Row.prototype,"dataItem",{get:function(){return this._data},set:function(e){this._data=e},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"dataIndex",{get:function(){this._list&&this._list._dirty&&this._list._update();return this._idxData},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"height",{get:function(){return this.size},set:function(e){this.size=e},enumerable:!0,configurable:!0});Object.defineProperty(Row.prototype,"renderHeight",{get:function(){return this.renderSize},enumerable:!0,configurable:!0});return Row}(RowCol);exports.Row=Row;var GroupRow=function(e){__extends(GroupRow,e);function GroupRow(t){var i=e.call(this,t)||this;i._level=-1;i._isSummary=!1;i.level=t instanceof wijmo_1.CollectionViewGroup?t.level:-1;i.isReadOnly=!0;return i}Object.defineProperty(GroupRow.prototype,"isSummary",{get:function(){return this._isSummary},set:function(e){if(e!=this._isSummary){this._isSummary=wijmo_1.asBoolean(e);this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"level",{get:function(){return this._level},set:function(e){wijmo_1.asInt(e);if(e!=this._level){this._level=e;this.onPropertyChanged()}},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"hasChildren",{get:function(){if(this.isSummary)return!1;if(null!=this.grid&&null!=this._list){this._list._update();var e=this.index<this._list.length-1?this._list[this.index+1]:null,t=wijmo_1.tryCast(e,GroupRow),i=wijmo_1.tryCast(e,_NewRowTemplate);return null!=e&&null==i&&(null==t||t.level>this.level)}return!0},enumerable:!0,configurable:!0});Object.defineProperty(GroupRow.prototype,"isCollapsed",{get:function(){return this._getFlag(RowColFlags.Collapsed)},set:function(e){!!e==this.isCollapsed||null==this._list||this.isSummary||this._setCollapsed(wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});GroupRow.prototype.getGroupHeader=function(){if(this.isSummary)return"";var e=this.grid,t=e.groupHeaderFormat||wijmo_1.culture.FlexGrid.groupHeaderFormat,i=this.dataItem;i&&i instanceof wijmo_1.CollectionViewGroup&&!this.hasChildren&&!this.isSummary&&0==i.items.length&&(t=null);if(i instanceof wijmo_1.CollectionViewGroup&&t&&e.showGroups&&!e.childItemsPath){var o=i.groupDescription.propertyName,n=i.name,r=e.getColumn(o),l=this.isContentHtml;if(r){l=l||r.isContentHtml;r.header&&(o=r.header);var s=r.dataMap;s&&(n=s.getDisplayValue(n));r.dataType==wijmo_1.getType(n)&&(n=wijmo_1.Globalize.format(n,r.format))}else o=wijmo_1.toHeaderCase(o);var a=0,d=e.collectionView;a=e._isServerCollectionView(d)&&d.groupOnServer?d.getGroupAggregate(i.groupDescription.propertyName,i,wijmo_1.Aggregate.CntAll):i.getAggregate(wijmo_1.Aggregate.CntAll,null,e.collectionView);return wijmo_1.format(t,{name:wijmo_1.escapeHtml(o),value:l?n:wijmo_1.escapeHtml(n),level:i.level,count:a})}return""};GroupRow.prototype._setCollapsed=function(e){var t=this,i=this.grid,o=i.rows,n=this.getCellRange(),r=i.collectionView,l=i.isUpdating&&r&&r.groupOnServer&&r.groupLazyLoading;l&&(i._isGrpClpsChanging=!0);var s=new CellRangeEventArgs(i.cells,new CellRange(this.index,-1));if(i.onGroupCollapsedChanging(s)){i.deferUpdate((function(){o.deferUpdate((function(){t._setFlag(RowColFlags.Collapsed,e,!0);for(var i=n.topRow+1;i<=n.bottomRow&&i>-1&&i<o.length;i++){o[i]._setFlag(RowColFlags.ParentCollapsed,e,!0);var r=o[i];r instanceof GroupRow&&r.isCollapsed&&(i=r.getCellRange().bottomRow)}}))}));i.onGroupCollapsedChanged(s);l&&(i._isGrpClpsChanging=!1)}};GroupRow.prototype.getCellRange=function(){for(var e=this._list,t=this.index,i=e.length-1,o=t+1;o<=i;o++){var n=e[o];if(n instanceof GroupRow&&n.level<=this.level){i=o-1;break}}if(this.grid.groupSummaryPosition===GroupSummaryPosition.Auto&&e.length>i&&e[i+1]instanceof GroupRow&&e[i+1].isSummary)do{i++}while(e[i+1]instanceof GroupRow&&e[i+1].isSummary&&e[i+1].dataItem==e[i].dataItem);return new CellRange(t,0,i,this.grid.columns.length-1)};return GroupRow}(Row);exports.GroupRow=GroupRow;var RowColCollection=function(e){__extends(RowColCollection,e);function RowColCollection(t,i){var o=e.call(this)||this;o.frozenDetailChildren=0;o._frozen=0;o._frozenEnd=0;o._lastFrozen=-1;o._lastFrozenVisible=-1;o._lastUnfrozenVisible=-1;o._firstVisible=-1;o._vlen=0;o._szDef=28;o._szTot=0;o._szFrozen=0;o._szCustom=!1;o._dirty=!1;o._frozenColAreaWidth=0;o._g=wijmo_1.asType(t,FlexGrid);o._szDef=wijmo_1.asNumber(i,!1,!0);o._uid=wijmo_1.uidGenerator();return o}Object.defineProperty(RowColCollection.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"defaultSize",{get:function(){return this._szDef},set:function(e){this._szCustom=!0;if(this._szDef!=e){this._szDef=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"frozen",{get:function(){return this._frozen},set:function(e){wijmo_1.assert(wijmo_1.isNumber(e),"Positive number expected");if(wijmo_1.isNumber(e)&&e!=this._frozen){this._frozen=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"frozenEnd",{get:function(){return this._frozenEnd},set:function(e){wijmo_1.assert(wijmo_1.isNumber(e),"Positive number expected");if(wijmo_1.isNumber(e)&&e!=this._frozenEnd){this._frozenEnd=wijmo_1.asNumber(e,!1,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"_frozenInternal",{get:function(){return this._frozen>0?this._frozen:-this._frozenEnd},set:function(e){if(e<0){this.frozen=0;this.frozenEnd=-e}else{this.frozen=e;this.frozenEnd=0}},enumerable:!0,configurable:!0});RowColCollection.prototype.isFrozen=function(e){return this._frozenInternal>=0?e<this._frozenInternal:e>=this._lastFrozen};Object.defineProperty(RowColCollection.prototype,"minSize",{get:function(){return this._szMin},set:function(e){if(e!=this._szMin){this._szMin=wijmo_1.asNumber(e,!0,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"maxSize",{get:function(){return this._szMax},set:function(e){if(e!=this._szMax){this._szMax=wijmo_1.asNumber(e,!0,!0);this._dirty=!0;this._g.invalidate()}},enumerable:!0,configurable:!0});RowColCollection.prototype.getTotalSize=function(){this._dirty&&this._update();return this._szTot};RowColCollection.prototype.getFrozenSize=function(){this._dirty&&this._update();return this._szFrozen};Object.defineProperty(RowColCollection.prototype,"visibleLength",{get:function(){this._dirty&&this._update();return this._vlen},enumerable:!0,configurable:!0});Object.defineProperty(RowColCollection.prototype,"lastFrozen",{get:function(){return-1!=this._lastFrozen?this[this._lastFrozen]:null},enumerable:!0,configurable:!0});RowColCollection.prototype.getItemAt=function(e){this._dirty&&this._update();if(e<=0&&this.length>0&&this[0].renderSize)return 0;for(var t,i,o=this.length,n=0,r=o-1;n<=r;)if((i=this[t=n+r>>>1])._pos>=e&&t>0)r=t-1;else{if(!(i._pos+i.renderSize<=e&&t<o-1)){for(;t>0&&!this[t].renderSize;)t--;for(;t<o-1&&!this[t].renderSize;)t++;return t}n=t+1}return r};RowColCollection.prototype.getNextCell=function(e,t,i){void 0===i&&(i=0);var o,n=SelMove;switch(t){case n.Next:case n.NextCell:for(o=e+1;o<this.length;o++)if(this[o].renderSize>0)return o;break;case n.NextEditableCell:for(o=e+1;o<this.length;o++)if(this[o].renderSize>0&&!this[o].isReadOnly)return o;break;case n.Prev:case n.PrevCell:for(o=e-1;o>=0;o--)if(this[o].renderSize>0)return o;break;case n.PrevEditableCell:for(o=e-1;o>=0;o--)if(this[o].renderSize>0&&!this[o].isReadOnly)return o;break;case n.End:for(o=this.length-1;o>=0;o--)if(this[o].renderSize>0)return o;break;case n.Home:for(o=0;o<this.length;o++)if(this[o].renderSize>0)return o;break;case n.NextPage:return(o=this.getItemAt(this[e].pos+this[e].renderSize+i))<0?this.getNextCell(e,SelMove.End,i):o==e&&o<this.length-1&&this[o+1].renderSize?o+1:o;case n.PrevPage:return(o=this.getItemAt(this[e].pos-i))<0?this.getNextCell(e,SelMove.Home,i):o==e&&o>0&&this[o-1].renderSize?o-1:o}return e};RowColCollection.prototype.canMoveElement=function(e,t,i){void 0===i&&(i=!0);if(t==e)return!1;if(e<0||e>=this.length||t>=this.length)return!1;if(i){t<0&&(t=this.length-1);for(var o=Math.min(e,t),n=Math.max(e,t),r=o;r<=n;r++)if(!this[r].allowDragging)return!1}return!(this[t]instanceof _NewRowTemplate)};RowColCollection.prototype.moveElement=function(e,t,i){void 0===i&&(i=!0);if(this.canMoveElement(e,t,i)){var o=this[e];this.removeAt(e);t<0&&(t=this.length);this.insert(t,o);i&&(this.isFrozen(e)&&!this.isFrozen(t)?this._frozenInternal>=0?this._frozenInternal--:this._frozenInternal++:!this.isFrozen(e)&&this.isFrozen(t)&&(this._frozenInternal>=0?this._frozenInternal++:this._frozenInternal--));return!0}return!1};RowColCollection.prototype.onCollectionChanged=function(t){void 0===t&&(t=wijmo_1.NotifyCollectionChangedEventArgs.reset);this._dirty=!0;this._g.invalidate();e.prototype.onCollectionChanged.call(this,t)};RowColCollection.prototype.push=function(t){t._setList(this);return e.prototype.push.call(this,t)};RowColCollection.prototype.splice=function(t,i){for(var o=this,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];for(var l=t;l<t+i&&l<this.length;l++){var s=this[l];s instanceof RowCol&&s._setList(null)}n.forEach((function(e){e._setList(o)}));return e.prototype.splice.apply(this,[t,i].concat(n))};RowColCollection.prototype.beginUpdate=function(){this._update();e.prototype.beginUpdate.call(this)};RowColCollection.prototype._setDefaultSize=function(e){if(!this._szCustom){this.defaultSize=e;this._szCustom=!1}};RowColCollection.prototype._update=function(){if(this._dirty&&!this.isUpdating){this._dirty=!1;this._lastFrozen=-1;this._firstVisible=-1;this._lastUnfrozenVisible=-1;this._frozenColAreaWidth=0;this._szFrozen=0;var e=0,t=0,i=void 0,o=void 0;if(this._frozenInternal>=0){for(var n=0;n<this.length;n++){(o=this[n])._idx=n;o._idxVis=e;o._pos=t;o._setList(this);if((i=o.renderSize)>0){t+=i;e++;n<this._frozenInternal&&(this._lastFrozen=n)}this._firstVisible<0&&o.visible&&(this._firstVisible=n);n<this._frozenInternal&&(this._szFrozen+=i)}this._vlen=e;this._szTot=t;return!0}for(n=0;n<this.length;n++){(o=this[n])._idx=n;o._idxVis=e;o._pos=t;o._setList(this);if((i=o.renderSize)>0){t+=i;e++}this._firstVisible<0&&o.visible&&(this._firstVisible=n);o.visible&&n<this.length+this._frozenInternal&&(this._lastUnfrozenVisible=n);n>=this.length+this._frozenInternal&&(this._szFrozen+=i)}this._lastFrozen=Math.max(0,this.length+this._frozenInternal);this._lastFrozenVisible=this._lastFrozen;for(;this._lastFrozenVisible<this.length&&!(this[this._lastFrozenVisible].renderSize>0);)this._lastFrozenVisible++;var r=0;for(n=this.length-1;n>=Math.max(0,this.length+this._frozenInternal);n--){i=(o=this[n]).renderSize;r-=this[n].renderSize;o._antipos=r;this._frozenColAreaWidth+=i}this._vlen=e;this._szTot=t;return!0}return!1};return RowColCollection}(wijmo_1.ObservableArray);exports.RowColCollection=RowColCollection;var ColumnCollection=function(e){__extends(ColumnCollection,e);function ColumnCollection(){return null!==e&&e.apply(this,arguments)||this}ColumnCollection.prototype.getColumn=function(e){var t=wijmo_1.isNumber(e)?e:this.indexOf(e);return t>-1?this[t]:null};ColumnCollection.prototype.indexOf=function(t){if(t instanceof Column)return e.prototype.indexOf.call(this,t);for(var i=0;i<this.length;i++)if(this[i].name==t)return i;for(i=0;i<this.length;i++)if(this[i].binding==t)return i;return-1};Object.defineProperty(ColumnCollection.prototype,"describedById",{get:function(){return this._descById},set:function(e){if(e!=this._descById){this._descById=wijmo_1.asString(e);this._g&&this._g.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(ColumnCollection.prototype,"firstVisibleIndex",{get:function(){this._dirty&&this._update();return this._firstVisible},enumerable:!0,configurable:!0});ColumnCollection.prototype._updateStarSizes=function(e){var t,i=!1,o=0;e-=.5;for(var n=0;n<this.length;n++){if((l=this[n]).isVisible)if(l._szStar){o+=Column._parseStarSize(l._szStar);t=l}else e-=l.renderWidth}if(t){var r=e;for(n=0;n<this.length;n++){var l;if((l=this[n]).isVisible&&l._szStar){var s=l._sz;l==t&&r>0?s=r:r-=s=Math.max(0,Math.round(Column._parseStarSize(l._szStar)/o*e));if(s!=l._sz){l._sz=s;i=!0}}}if(i){this._dirty=!0;this._update()}return i}return!1};return ColumnCollection}(RowColCollection);exports.ColumnCollection=ColumnCollection;var RowCollection=function(e){__extends(RowCollection,e);function RowCollection(){var t=null!==e&&e.apply(this,arguments)||this;t._maxLevel=-1;return t}Object.defineProperty(RowCollection.prototype,"ariaLabel",{get:function(){return this._ariaLabel},set:function(e){if(e!=this.ariaLabel){this._ariaLabel=wijmo_1.asString(e);this._g&&this._g.refresh()}},enumerable:!0,configurable:!0});Object.defineProperty(RowCollection.prototype,"maxGroupLevel",{get:function(){this._dirty&&this._update();return this._maxLevel},enumerable:!0,configurable:!0});RowCollection.prototype.getDetailRowCountUptoRow=function(e){var t=softDetailRow(),i=0,o=Math.abs(e),n=0,r=this.length-1,l=1,s=0;if(e<0){l=-1;s=1}for(;o>0&&n<=r&&n>=0;){var a=r*s+n*l,d=this[a];if(d&&!(t&&d instanceof t.DetailRow)){var u=this[a+1];u&&t&&u instanceof t.DetailRow&&i++;o--}n++}return i};RowCollection.prototype._update=function(){var t=this;if(e.prototype._update.call(this)){var i=this.grid?this.grid.collectionView:null,o=i?i.items:null,n=0;this._maxLevel=-1;this.forEach((function(e){e instanceof GroupRow&&e.level>t._maxLevel&&(t._maxLevel=e.level);var i=e.dataItem;i&&o?i===o[n]?e._idxData=n:i===o[n+1]?e._idxData=++n:i!==o[e._idxData]&&(e._idxData=-1):e._idxData=-1}));return!0}return!1};return RowCollection}(RowColCollection);exports.RowCollection=RowCollection;var _ColumnGroupHandler=function(){function _ColumnGroupHandler(e){this._updatingCollection=0;this._initialized=!1;this._grid=e;this._initializeColumnGroups();this._initialized=!0}Object.defineProperty(_ColumnGroupHandler.prototype,"columnGroups",{get:function(){return this._colGroups},enumerable:!0,configurable:!0});_ColumnGroupHandler.prototype.createColumnGroups=function(e){this._initialized=!1;this._createColumnGroups(e);this._initialized=!0};_ColumnGroupHandler.prototype.hasColumnGroups=function(){return null!=this._colGroups&&this._colGroups.length>0};_ColumnGroupHandler.prototype.getGroupDefinitions=function(){return this._groupDefs};_ColumnGroupHandler.prototype.getColumnGroup=function(e,t){return this._getColumnGroup(e,t)};_ColumnGroupHandler.prototype.canMoveColumnGroup=function(e,t,i,o){if(e==i&&t==o)return!1;var n=this._grid,r=n.columnHeaders.rows,l=n.columns;if(e<0||e>=r.length||t<0||t>=l.length||i<0||i>=r.length||o<0||o>=l.length)return!1;var s=this._getColumnGroup(e,t),a=this._getColumnGroup(i,o);if(!s||!a||s==a)return!1;if(s.level<a.level&&s._containsGroup(a))return!1;var d=s.parentGroup,u=a.parentGroup;return!d||d===u||!d._isCollapseTo(s)};_ColumnGroupHandler.prototype.moveColumnGroup=function(e,t,i,o,n){if(this.canMoveColumnGroup(e,t,i,o)){var r=this._getColumnGroup(e,t),l=this._getColumnGroup(i,o);if(!r||!l||r==l)return!1;if(n&&!l.isEmpty)return!1;var s=this._getCollection(r),a=n?l.columns:this._getCollection(l);if(!s||!a)return!1;var d=n?0:a.indexOf(l);if(d<0)return!1;!n&&s!=a&&o>t&&d++;this._deferCollectionUpdate((function(){if(!s.remove(r))return!1;a.insert(d,r)}));return!0}return!1};_ColumnGroupHandler.prototype.handleCollectionChange=function(){if(this._initialized&&!this._updatingCollection){this._initialized=!1;this._buildColumnGroups();this._initialized=!0}};_ColumnGroupHandler.prototype.handlePropertyChange=function(e){if(e&&this._initialized){var t=this._grid,i=e._rng,o=e.header;if(o!=e._curr_header)for(var n=i.topRow;n<=i.bottomRow;n++)for(var r=i.leftCol;r<=i.rightCol;r++){t.columnHeaders.setCellData(n,r,o);e._curr_header=o}e.columns.length>0&&t.invalidate()}};_ColumnGroupHandler.prototype._initializeColumnGroups=function(){var e=this._grid,t=new ColumnGroupCollection;this._groupDefs=t;this._colGroups=t;this._colGroups._setOwner(e);this._colGroups._setChangeHandler(this)};_ColumnGroupHandler.prototype._createColumnGroups=function(e){this._grid;this._groupDefs=wijmo_1.asArray(e);this._colGroups&&this._colGroups._setOwner(null);this._colGroups=ColumnGroupCollection._parse(e);this._buildColumnGroups()};_ColumnGroupHandler.prototype._buildColumnGroups=function(){var e=this,t=this._grid;this._colGroups._removeChangeHandler();this._assertColumnGroups(this._colGroups);t.autoGenerateColumns=!1;t.columns.clear();this._colGroups._setOwner(t);this._colGroups.forEach((function(e){e._beginBuild()}));var i=0;this._colGroups.forEach((function(t){e._addColumnGroup(t);i=Math.max(i,t._getMaxLevel())}));this._colGroups.forEach((function(e){e._expandRange(i)}));var o=t.columnHeaders.rows;o.clear();for(var n=0;n<=i;n++){var r=new Row;o.splice(n,0,r);n<i&&(r.cssClassAll=exports.FlexGridClsNames.colGroup)}for(n=0;n<o.length;n++)for(var l=0;l<t.columns.length;l++){var s=this._getColumnGroup(n,l);if(s){var a=s.header||wijmo_1.toHeaderCase(s.binding);t.columnHeaders.setCellData(n,l,a);if(s.height){var d=t.columnHeaders.rows[n].height;t.columnHeaders.rows[n].height=d<=s.height?s.height:d}s._curr_header=s.header}}this._colGroups._setChangeHandler(this);this._colGroups.forEach((function(e){e._checkIfCollapsed()}))};_ColumnGroupHandler.prototype._getColumnGroup=function(e,t){var i=this._grid;if(e<i.columnHeaders.rows.length&&t<i.columns.length)for(var o=this._colGroups;o;){for(var n=o,r=0;r<o.length;r++){var l=o[r],s=l._rng;if(s.containsColumn(t)){if(s.containsRow(e)||0==l.columns.length)return l;o=l.columns;break}}if(o==n)break}return null};_ColumnGroupHandler.prototype._getCollection=function(e){var t=e.parentGroup;return t?t.columns:this._colGroups};_ColumnGroupHandler.prototype._assertColumnGroups=function(e){var t=this;wijmo_1.assert(e instanceof ColumnGroupCollection,"column groups contain items of invalid collection type");e.forEach((function(e){wijmo_1.assert(e instanceof ColumnGroup,"column groups contain items of invalid type");t._assertColumnGroups(e.columns)}))};_ColumnGroupHandler.prototype._addColumnGroup=function(e){var t=this,i=this._grid;e._rng.col=i.columns.length;0==e.columns.length?i.columns.push(e):e.columns.forEach((function(e){t._addColumnGroup(e)}));e._rng.col2=i.columns.length-1};_ColumnGroupHandler.prototype._beginCollectionUpdate=function(){this._updatingCollection++};_ColumnGroupHandler.prototype._endCollectionUpdate=function(){this._updatingCollection--;this._updatingCollection<=0&&this.handleCollectionChange()};_ColumnGroupHandler.prototype._deferCollectionUpdate=function(e){try{this._beginCollectionUpdate();e()}finally{this._endCollectionUpdate()}};return _ColumnGroupHandler}();exports._ColumnGroupHandler=_ColumnGroupHandler;var ColumnGroup=function(e){__extends(ColumnGroup,e);function ColumnGroup(t,i){var o=e.call(this)||this;o._rng=new CellRange(0,-1);o._lvl=0;o._collapsed=!1;o._cols=new ColumnGroupCollection;wijmo_1.copy(o,t);var n=i&&i.columns;n&&n.indexOf(o)<0&&n.push(o);return o}ColumnGroup.prototype._copy=function(e,t){if("columns"==e){var i=wijmo_1.asArray(t);this._cols=ColumnGroupCollection._parse(i);return!0}return!1};Object.defineProperty(ColumnGroup.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"columnGroups",{get:function(){return this._cols},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"height",{get:function(){return this._cgHeight},set:function(e){this._cgHeight=e},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"isEmpty",{get:function(){return 0===this._cols.length},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"parentGroup",{get:function(){var e=this._ownerList,t=e&&e.owner;return t instanceof ColumnGroup?t:null},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"level",{get:function(){for(var e=this,t=0;e.parentGroup;){e=e.parentGroup;t++}return t},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"collapseTo",{get:function(){return this._collTo},set:function(e){wijmo_1.assert(wijmo_1.isArray(e)||wijmo_1.isString(e),"collapseTo should be an array or a string.");if(this._collTo!=e){this._collTo=e;this._updateCollapsedState()}},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"isCollapsed",{get:function(){return this._collapsed},set:function(e){var t=this.grid,i=null;if(e!=this._collapsed)if(t){i=new CellRangeEventArgs(t.columnHeaders,this._rng,this);t.onColumnGroupCollapsedChanging(i)?this._collapsed=wijmo_1.asBoolean(e):i=null}else this._collapsed=wijmo_1.asBoolean(e);this._updateCollapsedState();t&&i&&t.onColumnGroupCollapsedChanged(i)},enumerable:!0,configurable:!0});Object.defineProperty(ColumnGroup.prototype,"grid",{get:function(){var e=this._ownerList,t=e&&e.owner;return t instanceof ColumnGroup?t.grid:t instanceof FlexGrid?t:null},enumerable:!0,configurable:!0});ColumnGroup.prototype._beginBuild=function(){var e=this;this._lvl=0;for(var t=this.parentGroup;t;t=t.parentGroup)this._lvl++;setTimeout((function(){if(e.parentGroup&&0!==e._lvl&&e.parentGroup.width&&(null===e.width||void 0===e.width)){var t=0,i=0;e.parentGroup._cols.forEach((function(e){t+=e.width;null!==e.width&&void 0!==e.width||i++}));e.width=(e.parentGroup.width-t)/i}}),0);this._rng=new CellRange(0,-1);this._rng.row=this._rng.row2=this._lvl;this._cols.forEach((function(e){e._beginBuild()}))};ColumnGroup.prototype._setChangeHandler=function(e){this._changeHdl=e;this._cols._setChangeHandler(e)};ColumnGroup.prototype._removeChangeHandler=function(){this._changeHdl=null;this._cols._removeChangeHandler()};ColumnGroup.prototype._setOwnerList=function(e){e!=this._ownerList&&(this._ownerList=e)};ColumnGroup.prototype._checkIfCollapsed=function(){var e=this.grid;(e?e.columns:null)&&(this._collapsed?this._updateCollapsedState():this._cols.forEach((function(e){e._checkIfCollapsed()})))};ColumnGroup.prototype._updateCollapsedState=function(){var e=this.grid,t=e?e.columns:null,i=this._rng,o=this._collapsed;if(t){this._cols.forEach((function(e){if(e instanceof ColumnGroup){e._collapsed=o;e._updateCollapsedState()}}));for(var n=this._getCollapseToIndices(),r=i.leftCol;r<=i.rightCol;r++){var l=!o||n.indexOf(r)>-1;t[r]._setFlag(RowColFlags.ParentCollapsed,!l)}}};ColumnGroup.prototype._getMaxLevel=function(){var e=this._lvl;this.columns.forEach((function(t){e=Math.max(e,t._getMaxLevel())}));return e};ColumnGroup.prototype._expandRange=function(e){var t=e-this._getMaxLevel();if(t>0){this._rng.row2+=t;this._cols.forEach((function(e){e._shiftRange(t)}))}for(var i=this.grid.columns,o=this._rng,n=o.col;n<=o.col2;n++){i[n]._rng.row2=e}};ColumnGroup.prototype._shiftRange=function(e){this._rng.row+=e;this._rng.row2+=e;this._cols.forEach((function(t){t._shiftRange(e)}))};ColumnGroup.prototype._containsGroup=function(e){for(var t=0;t<this._cols.length;t++){var i=this._cols[t];if(i==e||i._containsGroup(e))return!0}return!1};ColumnGroup.prototype._isCollapseTo=function(e){var t=this.grid,i=t?t.columns:null;if(!e||!i)return!1;var o=this._getCollapseToBindings();if(o&&o.length)for(var n=0;n<o.length;n++)switch(o[n]){case"$first":case"$last":continue;default:if(e===i.getColumn(o[n]))return!0}return!1};ColumnGroup.prototype._getCollapseToBindings=function(){var e=this.collapseTo;return wijmo_1.isString(e)?[e]:e};ColumnGroup.prototype._getCollapseToIndices=function(){var e=this.grid,t=this._rng,i=this._getCollapseToBindings();if(i&&i.length){for(var o=[],n=e.columns,r=0;r<i.length;r++)switch(i[r]){case"$first":o.push(t.leftCol);break;case"$last":o.push(t.rightCol);break;default:var l=n.getColumn(i[r]),s=n.indexOf(l);l&&t.containsColumn(s)&&o.push(s)}if(o.length)return o}return[t.rightCol]};ColumnGroup.prototype.onPropertyChanged=function(){var t=this._changeHdl;t&&t.handlePropertyChange(this);e.prototype.onPropertyChanged.call(this)};return ColumnGroup}(Column);exports.ColumnGroup=ColumnGroup;var ColumnGroupCollection=function(e){__extends(ColumnGroupCollection,e);function ColumnGroupCollection(){return null!==e&&e.apply(this,arguments)||this}ColumnGroupCollection.prototype.getColumn=function(e){return wijmo_1.isNumber(e)?this._getColByIdx(e):this._findColByProp("name",e)||this._findColByProp("binding",e)};Object.defineProperty(ColumnGroupCollection.prototype,"owner",{get:function(){return this._owner},enumerable:!0,configurable:!0});ColumnGroupCollection.prototype.push=function(t){t._setOwnerList(this);return e.prototype.push.call(this,t)};ColumnGroupCollection.prototype.splice=function(t,i){for(var o=this,n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];for(var l=t;l<t+i&&l<this.length;l++){var s=this[l];s instanceof ColumnGroup&&s._setOwnerList(null)}n.forEach((function(e){e._setOwnerList(o)}));return e.prototype.splice.apply(this,[t,i].concat(n))};ColumnGroupCollection._parse=function(e){var t=null;if(e)if(e instanceof ColumnGroupCollection)t=e;else{t=new ColumnGroupCollection;e.forEach((function(e){var i=e instanceof ColumnGroup?e:new ColumnGroup(e);t.indexOf(i)<0&&t.push(i)}))}else t=new ColumnGroupCollection;return t};ColumnGroupCollection.prototype._setChangeHandler=function(e){this._changeHdl=e;this.forEach((function(t){t._setChangeHandler(e)}))};ColumnGroupCollection.prototype._removeChangeHandler=function(){this._changeHdl=null;this.forEach((function(e){e._removeChangeHandler()}))};ColumnGroupCollection.prototype._setOwner=function(e){this._owner=e;this.forEach((function(e){e.columns._setOwner(e)}))};ColumnGroupCollection.prototype._getColByIdx=function(e){return e>-1&&e<this.length?this[e]:null};ColumnGroupCollection.prototype._findColByProp=function(e,t){for(var i=0;i<this.length;i++){var o=this[i];if(o[e]===t)return o;if(null!==(o=o.columns._findColByProp(e,t)))return o}return null};ColumnGroupCollection.prototype.onCollectionChanged=function(t){void 0===t&&(t=wijmo_1.NotifyCollectionChangedEventArgs.reset);var i=this._changeHdl;i&&i.handleCollectionChange();e.prototype.onCollectionChanged.call(this,t)};return ColumnGroupCollection}(wijmo_1.ObservableArray);exports.ColumnGroupCollection=ColumnGroupCollection;var _AddNewHandler=function(){function _AddNewHandler(e){this._nrt=new _NewRowTemplate;this._top=!1;this._keydownBnd=this._keydown.bind(this);this._committing=!1;this._pasting=!1;this._g=e;this._attach()}Object.defineProperty(_AddNewHandler.prototype,"newRowAtTop",{get:function(){return this._top},set:function(e){if(e!=this.newRowAtTop){this._top=wijmo_1.asBoolean(e);this.updateNewRowTemplate();var t=this._g;if(this._top&&t.selectionMode==SelectionMode.ListBox){t.rows.forEach((function(e,t){e._setFlag(RowColFlags.Selected,0==t,!0)}));t.select(0,t.selection.col)}}},enumerable:!0,configurable:!0});_AddNewHandler.prototype.updateNewRowTemplate=function(){var e=this._g,t=e.editableCollectionView,i=e.rows,o=this._nrt,n=t&&t.canAddNew&&e.allowAddNew&&!e.isReadOnly,r=i.indexOf(o),l=this._top?0:i.length-1,s=!1;if(!n&&r>-1){var a=e.selection;a.row==r&&e.select(a.row-1,a.col);i.removeAt(r)}else if(n){if(r<0)s=!0;else if(r!=l){i.removeAt(r);s=!0}s&&(this._top?i.insert(0,o):i.push(o));if(o){o._ubv=null;o._setFlag(RowColFlags.ParentCollapsed,!1);this._top&&e.selectionMode==SelectionMode.ListBox||o._setFlag(RowColFlags.Selected,!1)}}};_AddNewHandler.prototype._attach=function(){var e=this._g;if(e){e.pasting.addHandler(this._pastingData,this);e.pasted.addHandler(this._pastedData,this);e.loadedRows.addHandler(this.updateNewRowTemplate,this);e.addEventListener(e.hostElement,"keydown",this._keydownBnd,!0)}};_AddNewHandler.prototype._detach=function(){var e=this._g;if(e){e.pasting.removeHandler(this._pastingData,this);e.pasted.removeHandler(this._pastedData,this);e.loadedRows.removeHandler(this.updateNewRowTemplate);e.removeEventListener(e.hostElement,"keydown",this._keydownBnd,!0)}};_AddNewHandler.prototype._keydown=function(e){if(!e.defaultPrevented&&e.keyCode==wijmo_1.Key.Escape&&null==this._g.activeEditor&&this._top&&this._nrt.dataItem){this._nrt.dataItem=null;this._g.invalidate()}};_AddNewHandler.prototype._beginningEdit=function(e,t){if(!t.cancel){var i=e.rows[t.row];i instanceof _NewRowTemplate&&this._handleEditStarting(e,t,i)}};_AddNewHandler.prototype._pastingData=function(e,t){t.cancel||(this._pasting=!0)};_AddNewHandler.prototype._pastedData=function(e,t){this._pasting=!1};_AddNewHandler.prototype._rowEditStarting=function(e,t){if(this._pasting){var i=e.rows[t.row];i instanceof _NewRowTemplate&&this._handleEditStarting(e,t,i)}};_AddNewHandler.prototype._rowEditEnding=function(e,t){var i=e.editableCollectionView,o=this._nrt.dataItem;if(i&&this._top&&o&&!t.cancel){var n=i.currentAddItem;if(!(n&&n==o)){n=i.addNew();for(var r in o)n[r]=o[r]}}};_AddNewHandler.prototype._rowEditEnded=function(e,t){var i=this,o=e.editableCollectionView;if(o&&!this._committing)if(this._top){if(t.cancel)return;var n=this._nrt.dataItem;if(n){this._committing=!0;this._nrt.dataItem=null;var r=this._g.rows,l=o.items.indexOf(n)+1;l<r.length&&t._rng.setRange(l,-1);e.onRowAdded(t)?o.commitNew():o.cancelNew();this._committing=!1}var s=e.rows[t.row];this._addNewTimer=setTimeout((function(){if(s instanceof _NewRowTemplate){e._selHdl.extendedSelection.clear();e.select(0,e.columns.firstVisibleIndex)}i.updateNewRowTemplate()}),20)}else o.isAddingNew&&o.commitNew()};_AddNewHandler.prototype._handleEditStarting=function(e,t,i){var o=e.editableCollectionView;if(o&&o.canAddNew)if(this._top)if(null==this._nrt.dataItem){var n=null,r=o.sourceCollection,l=o.newItemCreator;n=wijmo_1.isFunction(l)?l():r&&r.length?new r[0].constructor:{};this._nrt.dataItem=n}else o.currentAddItem&&(e.onRowAdded(t)||o.cancelNew());else{n=o.currentAddItem&&o.currentAddItem==i.dataItem?o.currentAddItem:o.addNew();o.moveCurrentTo(n);var s=this._nrt.isSelected;this.updateNewRowTemplate();s&&t.row>-1&&(e.rows[t.row].isSelected=!0);e.isUpdating||e.refresh(!0);e.onRowAdded(t)||o.cancelNew()}};_AddNewHandler.prototype.dispose=function(){if(this._addNewTimer){clearTimeout(this._addNewTimer);this._addNewTimer=null}};return _AddNewHandler}();exports._AddNewHandler=_AddNewHandler;var AllowSorting,SortOrder,AllowPinning,HeadersVisibility,ClipStringOptions,HeadersFocusability,FrozenRowCol,GroupSummaryPosition,_NewRowTemplate=function(e){__extends(_NewRowTemplate,e);function _NewRowTemplate(){return null!==e&&e.apply(this,arguments)||this}return _NewRowTemplate}(Row);exports._NewRowTemplate=_NewRowTemplate;wijmo_1._addCultureInfo("FlexGrid",{groupHeaderFormat:"{name}: <b>{value}</b> ({count:n0} items)",ariaLabels:{toggleDropDown:"Toggle Dropdown",toggleGroup:"Toggle Group",pinning:"Pinnable",pined:"Pinned",sortIndex:"Sort Index",pencil:"Item Being Edited",collapse:"Collapsed Column Header ",asterisk:"New Row Template",rowHeader:"Row Header",topleft:"Top Left",checked:"Checked",unchecked:"Unchecked",editCell:"Edit Cell",IMEInput:"IME Input",radioButtonChecked:"Radio Button Checked",newRowCell:"New Row Cell"},accessibilityHelperMessage:{insertRow:"insert before row {index}",deleteRow:"delete row {index}",pin:{pinColumnName:"Pin Column: {name}",unpinColumnName:"Unpin Column: {name}",pinColumnIndex:"Pin: {colIndex}",unpin:"Unpin"},sort:{sortAscending:"Column {name} Sorted Ascending",sortDescending:"Column {name} Sorted Descending",clearSort:"Clear sort"},frozen:{frozenColumn:"frozen column: {col} row: {row}",unfrozenColumn:"unfrozen column: {col} row: {row}"},imeHandler:{focusImeCell:"{value} {rowName} row {rowIndex} {colName} column {colIndex}"}}});!function(e){e[e.None=0]="None";e[e.SingleColumn=1]="SingleColumn";e[e.MultiColumn=2]="MultiColumn"}(AllowSorting=exports.AllowSorting||(exports.AllowSorting={}));!function(e){e[e.AscDesc=0]="AscDesc";e[e.DescAsc=1]="DescAsc";e[e.AscDescNone=2]="AscDescNone";e[e.DescAscNone=3]="DescAscNone"}(SortOrder=exports.SortOrder||(exports.SortOrder={}));!function(e){e[e.None=0]="None";e[e.SingleColumn=1]="SingleColumn";e[e.ColumnRange=2]="ColumnRange";e[e.Both=3]="Both"}(AllowPinning=exports.AllowPinning||(exports.AllowPinning={}));!function(e){e[e.None=0]="None";e[e.Column=1]="Column";e[e.Row=2]="Row";e[e.All=3]="All"}(HeadersVisibility=exports.HeadersVisibility||(exports.HeadersVisibility={}));!function(e){e[e.Default=0]="Default";e[e.CSV=1]="CSV";e[e.QuoteAll=2]="QuoteAll";e[e.SkipMerged=4]="SkipMerged";e[e.Unformatted=8]="Unformatted";e[e.InvisibleRows=16]="InvisibleRows";e[e.InvisibleColumns=32]="InvisibleColumns";e[e.InvisibleCells=48]="InvisibleCells"}(ClipStringOptions=exports.ClipStringOptions||(exports.ClipStringOptions={}));!function(e){e[e.None=0]="None";e[e.Column=1]="Column";e[e.Row=2]="Row";e[e.All=3]="All"}(HeadersFocusability=exports.HeadersFocusability||(exports.HeadersFocusability={}));!function(e){e[e.Column=0]="Column";e[e.Row=1]="Row"}(FrozenRowCol=exports.FrozenRowCol||(exports.FrozenRowCol={}));!function(e){e[e.Top=0]="Top";e[e.Bottom=1]="Bottom";e[e.Auto=2]="Auto"}(GroupSummaryPosition=exports.GroupSummaryPosition||(exports.GroupSummaryPosition={}));var FlexGrid=function(e){__extends(FlexGrid,e);function FlexGrid(t,i){var o=e.call(this,t,null,!0)||this;o._activeCell=null;o._eNoData=null;o._srFocusHelper=null;o._srMessageHelper=null;o._imeContainer=null;o._eEditorsContainer=null;o._szClient=new wijmo_1.Size(0,0);o._szClientSB=new wijmo_1.Size(0,0);o._offsetY=0;o._cssPage=0;o._ptScrl=new wijmo_1.Point(0,0);o._ptLastScrl=new wijmo_1.Point(0,0);o._cellPadLeft=3;o._cellPadHorz=3;o._cellPadVert=0;o._clipToScreen=!1;o._anchorCell=null;o._spDiff=new wijmo_1.Point(0,0);o._autoGenCols=!0;o._autoClipboard=!0;o._xOnCopyPaste=!0;o._autoScroll=!0;o._autoSearch=!1;o._caseSensitive=!1;o._readOnly=!1;o._indent=14;o._autoSizeMode=AutoSizeMode.Both;o._autoHeights=!1;o._quickSize=null;o._hdrVis=HeadersVisibility.All;o._hdrFoc=HeadersFocusability.None;o._alSorting=AllowSorting.SingleColumn;o._sortOrder=SortOrder.AscDesc;o._alPinning=AllowPinning.None;o._alAddNew=!1;o._alDelete=!1;o._alResizing=AllowResizing.Columns;o._alDragging=AllowDragging.Columns;o._alMerging=AllowMerging.None;o._ssHdr=HeadersVisibility.None;o._shSort=!0;o._shGroups=!0;o._shMarquee=!1;o._shPlcHld=!1;o._altStep=1;o._shErr=!0;o._shDropDown=!0;o._valEdt=!0;o._gHdrFmt=null;o._childItemsPath=null;o._sortRowIndex=null;o._editColIndex=null;o._deferResizing=!1;o._pSel=!0;o._pOutline=!0;o._collapsedGroups=null;o._stickyHdr=!1;o._anchorCursor=!1;o._copyHeaders=HeadersVisibility.None;o._bigChecks=!1;o._skipMerged=!1;o._commitEmptyEdits=!0;o._maxContent=!1;o._pasteEmptyCells=!0;o._groupSummaryPosition=GroupSummaryPosition.Top;o._noDataOverlayContent="";o._fzClone=null;o._vt=0;o._vtRows=0;o._vtCols=0;o._lazyRender=!0;o._refreshOnEdit=!0;o._reorderCells=!0;o._lastStickyScroll=0;o._scrollStickyThrottleTimeout=14;o._scrollEndTimer=null;o._contentEstimationLimit=100;o._isSilentScroll=!1;o._isISChanging=!1;o._isScrollingByWheel=!1;o.cachedDefaultHeight=-1;o.cachedHeights={};o._isSourceChanging=!1;o._canOverRuleCtrlPress=!1;o._isShiftTab=!1;o._touchEdit=!1;o._isGrpClpsChanging=!1;o._initialRestCvLoad=!0;o._grpClpsChng=!1;o.itemsSourceChanging=new wijmo_1.Event;o.itemsSourceChanged=new wijmo_1.Event;o.scrollPositionChanged=new wijmo_1.Event;o.selectionChanging=new wijmo_1.Event;o.selectionChanged=new wijmo_1.Event;o.loadingRows=new wijmo_1.Event;o.loadedRows=new wijmo_1.Event;o.updatingLayout=new wijmo_1.Event;o.updatedLayout=new wijmo_1.Event;o.resizingColumn=new wijmo_1.Event;o.resizedColumn=new wijmo_1.Event;o.autoSizingColumn=new wijmo_1.Event;o.autoSizedColumn=new wijmo_1.Event;o.starSizedColumns=new wijmo_1.Event;o.draggingColumn=new wijmo_1.Event;o.draggingColumnOver=new wijmo_1.Event;o.draggedColumn=new wijmo_1.Event;o.pinningColumn=new wijmo_1.Event;o.pinnedColumn=new wijmo_1.Event;o.resizingRow=new wijmo_1.Event;o.resizedRow=new wijmo_1.Event;o.autoSizingRow=new wijmo_1.Event;o.autoSizedRow=new wijmo_1.Event;o.draggingRow=new wijmo_1.Event;o.draggingRowOver=new wijmo_1.Event;o.draggedRow=new wijmo_1.Event;o.groupCollapsedChanging=new wijmo_1.Event;o.groupCollapsedChanged=new wijmo_1.Event;o.columnGroupCollapsedChanging=new wijmo_1.Event;o.columnGroupCollapsedChanged=new wijmo_1.Event;o.sortingColumn=new wijmo_1.Event;o.sortedColumn=new wijmo_1.Event;o.beginningEdit=new wijmo_1.Event;o.prepareCellForEdit=new wijmo_1.Event;o.cellEditEnding=new wijmo_1.Event;o.cellEditEnded=new wijmo_1.Event;o.rowEditStarting=new wijmo_1.Event;o.rowEditStarted=new wijmo_1.Event;o.rowEditEnding=new wijmo_1.Event;o.rowEditEnded=new wijmo_1.Event;o.rowAdded=new wijmo_1.Event;o.deletingRow=new wijmo_1.Event;o.deletedRow=new wijmo_1.Event;o.copying=new wijmo_1.Event;o.copied=new wijmo_1.Event;o.pasting=new wijmo_1.Event;o.pasted=new wijmo_1.Event;o.pastingCell=new wijmo_1.Event;o.pastedCell=new wijmo_1.Event;o.formatItem=new wijmo_1.Event((function(){o._clearCells()}));o.updatingView=new wijmo_1.Event;o.updatedView=new wijmo_1.Event;o.gettingCellClipString=new wijmo_1.Event;o._mappedColumns=null;o.rowColSelected=new wijmo_1.Event;var n=o.hostElement;wijmo_1.isIE()&&(n.style.borderRadius="0");var r=o.getTemplate();o.applyTemplate(wijmo_1.ControlClsNames.hostElement+" "+wijmo_1.ControlClsNames.content+" "+wijmo_1.ControlClsNames.content+" "+exports.FlexGridClsNames.hostElement,r,{_mainContainer:"main-container",_root:"root",_eSz:"sz",_eCt:"cells",_fCt:"fcells",_eTL:"tl",_eBL:"bl",_eCHdr:"ch",_eRHdr:"rh",_eCFtr:"cf",_eTLCt:"tlcells",_eBLCt:"blcells",_eCHdrCt:"chcells",_eCFtrCt:"cfcells",_eRHdrCt:"rhcells",_eMarquee:"marquee",_eNoData:"no-data",_srFocusHelper:"sr-focus-helper"});o._createHelperContainer();wijmo_1.setCss(o._mainContainer,{position:"relative",left:"0",top:"0",width:"100%",height:"100%",overflow:"hidden",minWidth:"inherit",minHeight:"inherit",maxWidth:"inherit",maxHeight:"inherit"});wijmo_1.setCss(o._root,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",minWidth:"inherit",minHeight:"inherit",maxWidth:"inherit",maxHeight:"inherit",overflow:"auto",webkitOverflowScrolling:"touch"});wijmo_1.setCss(o._eCt,{position:"absolute"});wijmo_1.setCss(o._eMarquee,{display:"none"});wijmo_1.setCss(o._eMarquee.firstChild,{width:"100%",height:"100%"});wijmo_1.setCss(o._fCt,{position:"absolute",top:0,left:0,overflow:"hidden",pointerEvents:"none"});wijmo_1.setCss(o._eSz,{position:"relative",visibility:"hidden"});wijmo_1.setCss(o._srFocusHelper,{position:"fixed",height:"100%"});[o._eRHdr,o._eCFtr,o._eCHdr,o._eBL,o._eTL].forEach((function(e){wijmo_1.setCss(e,{position:"absolute",overflow:"hidden",outline:"none"});wijmo_1.setCss(e.firstElementChild,{position:"relative"})}));[o._eMarquee,o._fCt,o._eSz].forEach((function(e){wijmo_1.setAttribute(e,"aria-hidden",!0)}));if(o.itemsSource&&o.itemsSource.length>0){wijmo_1.setAttribute(o._root,"role","rowgroup");wijmo_1.setAttribute(o._eCHdr,"role","rowgroup")}if(wijmo_1.isIE9()||wijmo_1.isIE10()){var l=o._eMarquee;["click","dblclick","mousedown","mouseup"].forEach((function(e){o.addEventListener(l,e,(function(t){var i=l.style.display;l.style.display="none";var o=document.elementFromPoint(t.clientX,t.clientY);l.style.display=i;var n=document.createEvent("Event");n.initEvent(e,!0,!0);for(var r in t)try{n[r]=t[r]}catch(e){}o.dispatchEvent(n)}))}))}n.tabIndex=-1;o._uid=wijmo_1.uidGenerator();o._ariaId=FlexGrid._FLEXGRID_COUNT;FlexGrid._FLEXGRID_COUNT++;o.deferUpdate((function(){var e=o._getDefaultRowHeight();o._rows=new RowCollection(o,e);o._cols=new ColumnCollection(o,4*e);o._hdrRows=new RowCollection(o,e);o._hdrCols=new ColumnCollection(o,Math.round(1.25*e));o._ftrRows=new RowCollection(o,e);var t=CellType;o._gpTL=new GridPanel(o,t.TopLeft,o._hdrRows,o._hdrCols,o._eTLCt);o._gpCHdr=new GridPanel(o,t.ColumnHeader,o._hdrRows,o._cols,o._eCHdrCt);o._gpRHdr=new GridPanel(o,t.RowHeader,o._rows,o._hdrCols,o._eRHdrCt);o._gpCells=new GridPanel(o,t.Cell,o._rows,o._cols,o._eCt);o._gpBL=new GridPanel(o,t.BottomLeft,o._ftrRows,o._hdrCols,o._eBLCt);o._gpCFtr=new GridPanel(o,t.ColumnFooter,o._ftrRows,o._cols,o._eCFtrCt);o.activePanel=o._gpCells;o._hdrRows.push(new Row);o._hdrCols.push(new Column({align:"center"}));o._cf=new CellFactory;o._keyHdl=new _KeyboardHandler(o);o._mouseHdl=new _MouseHandler(o);o._edtHdl=new _EditHandler(o);o._selHdl=o._createSelHdl();o._addHdl=new _AddNewHandler(o);o._grpHdl=new _ColumnGroupHandler(o);o._mrgMgr=new MergeManager;o._oMgr=new OverlayManager;o._bndSortConverter=o._sortConverter.bind(o);o._errorTip=new wijmo_1.Tooltip({isContentHtml:!1,showDelay:50,cssClass:exports.FlexGridClsNames.errorTip});o._errorTip._tooltipVisibleOnHover=!0;o._errorTip.forceRecreate=!0;o.selectionMode=SelectionMode.CellRange;o._root.tabIndex=-1;o.addEventListener(o._eFocus,"focus",(function(e){o.rows.length||o._eNoData.focus()}));o.initialize(i)}));o.addEventListener(o._root,"scroll",(function(e){wijmo_1.isChromiumBased()&&o._handleSpaceDisorderOnScrollToEnd();if(o._updateScrollPosition()||o._forceScrollUpdate){var t=o.activeEditor,i=o.activeCell,n=i?i.className:null,r=softInput(),l=r&&r.InputNumberClsNames.numeric;if((wijmo_1.hasClass(i,"wj-detail")||wijmo_1.hasClass(t,l))&&wijmo_1.Control.sharedState.InvalidScroll){o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0);return}o._forceScrollUpdate||wijmo_1.Control.sharedState.InvalidScroll||o.finishEditing();o._forceScrollUpdate=!1;var s=o._edtHdl._getCustomEditor(o),a=!(!t||!s)&&s.isOpen,d=o._edtHdl.validate;if(!a||!d){if("React"===o.workingAs)o._updateContentAnim=requestAnimationFrame((function(){o._updateContent(!0);o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}));else{o._updateContent(!0);o._setInvalidScrollTimer=setTimeout((function(){wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}var u=o.activeEditor,c=o.activeCell;if(u&&c&&t&&n){u.value=t.value;c.className=n;o._setFocusNoScroll(u)}else!u||c||wijmo_1.Control.sharedState.InvalidScroll||o.finishEditing(!0)}o.columns._frozenInternal&&(o._triggerInvalidateTimer=setTimeout((function(){var e=o.columnHeaders.hostElement.style,t=parseInt(e.left),i=o._ptScrl.x;Math.abs(t-i)>1&&o.invalidate()})));o._invalidScrollWithWheelTimer=setTimeout((function(){o._isScrollingByWheel=!1;wijmo_1.Control.sharedState.InvalidScroll=!1}),0)}}));o.addEventListener(n,"focus",(function(e){if(n.tabIndex>-1){var t=e.target;t instanceof HTMLElement&&t.tabIndex<0&&o._setFocus(!0)}}),!0);o.addEventListener(window,"resize",(function(){if(!wijmo_1.isMobile()&&!wijmo_1.isSupportTouch()){o.finishEditing(!1);o.invalidate()}}));o.addEventListener(document,"keydown",(function(e){"Tab"===e.key&&(e.shiftKey?o._isShiftTab=!0:o._isShiftTab=!1)}));o.addEventListener(o._srFocusHelper,"focus",(function(e){var t=wijmo_1._getFocusableElements(document.body),i=t.indexOf(e.target),n=o._isShiftTab?i-1:i+1;i>-1&&t[n]?t[n].focus():e.target.blur()}));o.resizingColumn.addHandler(o._handleRowColResizing);o.resizingRow.addHandler(o._handleRowColResizing);o.resizedColumn.addHandler(o._getRowColResizedHandler(o,!1));o.resizedRow.addHandler(o._getRowColResizedHandler(o,!0));o.updatedLayout.addHandler(o.handleLoad.bind(o));o.refreshed.addHandler(o._handleRefreshForA11y.bind(o));return o}Object.defineProperty(FlexGrid,"controlTemplate",{get:function(){FlexGrid._ctrlTemplate||(FlexGrid._ctrlTemplate='<div wj-part="main-container"> <div wj-part="ch"><div wj-part="chcells" class="'+exports.FlexGridClsNames.colHeaders+'"></div></div><div wj-part="root"><div wj-part="cells" class="'+exports.FlexGridClsNames.cells+'"></div><div wj-part="no-data" class="'+exports.FlexGridClsNames.noDataOverlay+'" tabindex="-1"></div><div wj-part="marquee" class="'+exports.FlexGridClsNames.marquee+'"><div></div></div><div role="row" ><div class="'+exports.FlexGridClsNames.screenReaderOnly+'" wj-part="sr-focus-helper" tabindex="0" role="gridcell" aria-label="Focus helper"></div></div></div><div wj-part="fcells" aria-hidden="true" class="'+exports.FlexGridClsNames.cells+" "+exports.FlexGridClsNames.frozenClone+'"></div><div wj-part="rh"><div wj-part="rhcells" class="'+exports.FlexGridClsNames.rowHeaders+'"></div></div><div wj-part="cf"><div wj-part="cfcells" class="'+exports.FlexGridClsNames.colFooters+'"></div></div><div wj-part="bl"><div wj-part="blcells" class="'+exports.FlexGridClsNames.bottomLeft+'"></div></div><div wj-part="tl"><div wj-part="tlcells" class="'+exports.FlexGridClsNames.topLeft+'"></div></div><div wj-part="sz"></div></div>');return FlexGrid._ctrlTemplate},set:function(e){FlexGrid._ctrlTemplate=e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activePanel",{get:function(){return this._activePanel},set:function(e){this._activePanel=wijmo_1.asType(e,GridPanel,!1)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activePanelType",{get:function(){return this._activePanel?this._activePanel.cellType:CellType.Cell},enumerable:!0,configurable:!0});FlexGrid.prototype._handleSpaceDisorderOnScrollToEnd=function(){var e=new wijmo_1.Size(this._szClientSB.width-(this._root.offsetWidth-this._root.clientWidth),this._szClientSB.height-(this._root.offsetHeight-this._root.clientHeight)),t=this._gpCells.width-e.width+this._ptScrl.x,i=this._gpCells.height-e.height+this._eCFtr.clientHeight+this._ptScrl.y,o=1==this._rtlDir?-1:1,n=o*(this._root.scrollLeft-this._ptLastScrl.x),r=this._root.scrollTop-this._ptLastScrl.y,l=new wijmo_1.Point(this._ptLastScrl.x+n,this._ptLastScrl.y+r),s=this._gpCells.width+this._eRHdr.clientWidth-this._root.clientWidth,a=this._gpCells.height+this._eCHdr.clientHeight-this._root.clientHeight+this._eCFtr.clientHeight;this._ptLastScrl=new wijmo_1.Point(this._root.scrollLeft,this._root.scrollTop);if((t<1||l.x>s)&&n>0){var d=o*(this._gpCells.width-e.width);if(d!=this._root.scrollLeft){this._szClient=e;this._root.scrollLeft=d;return!0}}else if((i<1||l.y>a)&&r>0){var u=this._gpCells.height-(e.height-this._eCFtr.clientHeight);if(this._root.scrollTop!=u){this._szClient=e;this._root.scrollTop=u;return!0}}return!1};FlexGrid.prototype._handleResize=function(){var t=this;this._rcBounds=null;this.activeEditor&&this.isTouching||this._touchEdit?this._startEditingTimer=setTimeout((function(){if(!t.activeEditor){t._touchEdit=!0;t.startEditing(!0)}}),50):e.prototype._handleResize.call(this);this._touchEdit=!1};Object.defineProperty(FlexGrid.prototype,"headersVisibility",{get:function(){return this._hdrVis},set:function(e){if((e=wijmo_1.asEnum(e,HeadersVisibility))!=this._hdrVis){this._hdrVis=e;this.columnHeaders.rows._dirty=!0;this.rowHeaders.columns._dirty=!0;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"headersFocusability",{get:function(){return this._hdrFoc},set:function(e){if((e=wijmo_1.asEnum(e,HeadersFocusability))!=this._hdrFoc){this._hdrFoc=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"stickyHeaders",{get:function(){return this._stickyHdr},set:function(e){if(e!=this._stickyHdr){this._stickyHdr=wijmo_1.asBoolean(e);this._updateStickyHeaders();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"maxContent",{get:function(){return this._maxContent},set:function(e){if(e!=this._maxContent){this._maxContent=wijmo_1.asBoolean(e);this._adjustMaxContentWidth();this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveSelectedState",{get:function(){return this._pSel},set:function(e){this._pSel=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveOutlineState",{get:function(){return this._pOutline},set:function(e){this._pOutline=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"anchorCursor",{get:function(){return this._anchorCursor},set:function(e){this._anchorCursor=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"noDataOverlayContent",{get:function(){return this._noDataOverlayContent},set:function(e){if(this._noDataOverlayContent!=e){this._noDataOverlayContent=wijmo_1.asString(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"copyHeaders",{get:function(){return this._copyHeaders},set:function(e){this._copyHeaders=wijmo_1.asEnum(e,HeadersVisibility)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"lazyRender",{get:function(){return this._lazyRender},set:function(e){this._lazyRender=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"refreshOnEdit",{get:function(){return this._refreshOnEdit},set:function(e){this._refreshOnEdit=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"virtualizationThreshold",{get:function(){return this._vt},set:function(e){this._vt=e;if(wijmo_1.isNumber(e))this._vtRows=this._vtCols=wijmo_1.asNumber(e);else if(e)if(wijmo_1.isArray(e)&&2==e.length){this._vtRows=wijmo_1.asNumber(e[0]);this._vtCols=wijmo_1.asNumber(e[1])}else wijmo_1.assert(!1,"virtualizationThreshold should be a number or an array with two numbers.");else this._vtRows=this._vtCols=0},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoGenerateColumns",{get:function(){return this._autoGenCols},set:function(e){this._autoGenCols=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoClipboard",{get:function(){return this._autoClipboard},set:function(e){this._autoClipboard=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"expandSelectionOnCopyPaste",{get:function(){return this._xOnCopyPaste},set:function(e){this._xOnCopyPaste=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoScroll",{get:function(){return this._autoScroll},set:function(e){this._autoScroll=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoSearch",{get:function(){return this._autoSearch},set:function(e){this._autoSearch=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"caseSensitiveSearch",{get:function(){return this._caseSensitive},set:function(e){this._caseSensitive=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnLayout",{get:function(){var e,t=this._hasColumnGroups(),i=t?ColumnGroup:Column,o=t?"columnGroups":"columns",n=FlexGrid._getSerializableProperties(i),r=t?["collapseTo"]:[],l=["size"],s=new i,a=t?this.getColumnGroups():this.columns,serializeColumns=function(e){var i=[];e.forEach((function(e){var o={};n.forEach((function(t){var i=e[t];(function(e,t){return t!=s[e]&&l.indexOf(e)<0&&(wijmo_1.isPrimitive(t)||r.indexOf(e)>-1)})(t,i)&&(o[t]=i)}));if(t){var a=e.columns;a.length&&(o.columns=serializeColumns(a))}i.push(o)}));return i},d=serializeColumns(a);return JSON.stringify(((e={})[o]=d,e))},set:function(e){var t=this,i=JSON.parse(wijmo_1.asString(e));wijmo_1.assert(i,"Invalid columnLayout data.");this.columns.deferUpdate((function(){t.columns.clear();t._hasColumnGroups()&&(t.columnGroups=new ColumnGroupCollection);t.initialize(i)}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnGroups",{get:function(){return this._grpHdl.getGroupDefinitions()},set:function(e){this.columns.clear();this._grpHdl.createColumnGroups(wijmo_1.asArray(e))},enumerable:!0,configurable:!0});FlexGrid.prototype.getColumnGroups=function(){return this._grpHdl.columnGroups};Object.defineProperty(FlexGrid.prototype,"isReadOnly",{get:function(){return this._readOnly},set:function(e){if(e!=this._readOnly){this._readOnly=wijmo_1.asBoolean(e);this.finishEditing();this.invalidate(!0);this._addHdl.updateNewRowTemplate();wijmo_1.toggleClass(this.hostElement,wijmo_1.ControlStateClsNames.readOnly,this.isReadOnly);this._setAria("aria-readonly",this.isReadOnly?"true":"false")}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"bigCheckboxes",{get:function(){return this._bigChecks},set:function(e){this._bigChecks=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"skipMerged",{get:function(){return this._skipMerged},set:function(e){this._skipMerged=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"pasteEmptyCells",{get:function(){return this._pasteEmptyCells},set:function(e){this._pasteEmptyCells=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"isDisabled",{get:function(){return this._e&&null!=this._e.getAttribute("disabled")},set:function(e){if((e=wijmo_1.asBoolean(e,!0))!=this.isDisabled){var t=this._e;if(t){wijmo_1.enable(t,!e);this._updateTabIndex();this.invalidate()}}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"imeEnabled",{get:function(){return null!=this._imeHdl},set:function(e){if(wijmo_1.asBoolean(e)!=this.imeEnabled&&this.finishEditing()){var t=this.containsFocus();if(this._imeHdl){this._imeHdl.dispose();this._imeHdl=null}e&&(this._imeHdl=new _ImeHandler(this));t&&this.focus()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowResizing",{get:function(){return this._alResizing},set:function(e){this._alResizing=wijmo_1.asEnum(e,AllowResizing)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"deferResizing",{get:function(){return this._deferResizing},set:function(e){this._deferResizing=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoSizeMode",{get:function(){return this._autoSizeMode},set:function(e){this._autoSizeMode=wijmo_1.asEnum(e,AutoSizeMode)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"autoRowHeights",{get:function(){return this._autoHeights},set:function(e){this._autoHeights=wijmo_1.asBoolean(e);this._autoRowHeights()},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"quickAutoSize",{get:function(){return this._quickSize},set:function(e){this._quickSize=wijmo_1.asBoolean(e,!0)},enumerable:!0,configurable:!0});FlexGrid.prototype._getQuickAutoSize=function(){return wijmo_1.isBoolean(this._quickSize)?this._quickSize:!this.formatItem.hasHandlers&&null==this.itemFormatter};Object.defineProperty(FlexGrid.prototype,"allowSorting",{get:function(){return this._alSorting},set:function(e){wijmo_1.isBoolean(e)&&(e=e?AllowSorting.SingleColumn:AllowSorting.None);this._alSorting=wijmo_1.asEnum(e,AllowSorting)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"sortOrder",{get:function(){return this._sortOrder},set:function(e){e=wijmo_1.asEnum(e,SortOrder);this._sortOrder!=e&&(this._sortOrder=e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowPinning",{get:function(){return this._alPinning},set:function(e){if(e!=this._alPinning){wijmo_1.isBoolean(e)&&(e=e?AllowPinning.SingleColumn:AllowPinning.None);this._alPinning=wijmo_1.asEnum(e,AllowPinning);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowAddNew",{get:function(){return this._alAddNew},set:function(e){if(e!=this._alAddNew){this._alAddNew=wijmo_1.asBoolean(e);this._addHdl.updateNewRowTemplate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"newRowAtTop",{get:function(){return this._addHdl.newRowAtTop},set:function(e){this._addHdl.newRowAtTop=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowDelete",{get:function(){return this._alDelete},set:function(e){e!=this._alDelete&&(this._alDelete=wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowMerging",{get:function(){return this._alMerging},set:function(e){if((e=wijmo_1.asEnum(e,AllowMerging))!=this._alMerging){this._alMerging=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showSelectedHeaders",{get:function(){return this._ssHdr},set:function(e){if((e=wijmo_1.asEnum(e,HeadersVisibility))!=this._ssHdr){this._ssHdr=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showMarquee",{get:function(){return this._shMarquee},set:function(e){if(e!=this._shMarquee){this._shMarquee=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showPlaceholders",{get:function(){return this._shPlcHld},set:function(e){this._shPlcHld=wijmo_1.asBoolean(e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showSort",{get:function(){return this._shSort},set:function(e){if(e!=this._shSort){this._shSort=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showGroups",{get:function(){return this._shGroups},set:function(e){if(e!=this._shGroups){this._shGroups=wijmo_1.asBoolean(e);this._bindGrid(!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"alternatingRowStep",{get:function(){return this._altStep},set:function(e){if(e!=this._altStep){this._altStep=wijmo_1.asInt(e,!1,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showAlternatingRows",{get:function(){return this._altStep>0},set:function(e){wijmo_1._deprecated("showAlternatingRows","alternatingRowStep");this.alternatingRowStep=e?1:0},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showErrors",{get:function(){return this._shErr},set:function(e){if(e!=this._shErr){this._clearCells();this._shErr=wijmo_1.asBoolean(e)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"errorTip",{get:function(){return this._errorTip},set:function(e){if(e!=this._errorTip){this._clearCells();this._errorTip=wijmo_1.asType(e,wijmo_1.Tooltip,!0)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemValidator",{get:function(){return this._itemValidator},set:function(e){if(e!=this.itemValidator){this._itemValidator=wijmo_1.asFunction(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"validateEdits",{get:function(){return this._valEdt},set:function(e){this._setvalidateEdits(e)},enumerable:!0,configurable:!0});FlexGrid.prototype._setvalidateEdits=function(e){this._valEdt=wijmo_1.asBoolean(e)};Object.defineProperty(FlexGrid.prototype,"groupHeaderFormat",{get:function(){return this._gHdrFmt},set:function(e){if(e!=this._gHdrFmt){this._gHdrFmt=wijmo_1.asString(e);this._bindGrid(!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"allowDragging",{get:function(){return this._alDragging},set:function(e){if((e=wijmo_1.asEnum(e,AllowDragging))!=this._alDragging){this._alDragging=e;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"ariaLabel",{get:function(){return this._ariaLabel?this._ariaLabel:this._gridRoleElement()?this._gridRoleElement().getAttribute("aria-label"):this._ariaLabel},set:function(e){this._ariaLabel=e;this._setAria("aria-label",e)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemsSource",{get:function(){return this._items},set:function(e){var t=this;if(e!=this._items){var i=new wijmo_1.CancelEventArgs;if(this.onItemsSourceChanging(i)){if(this._cv){var o=this._cv;if(this._isServerCollectionView(this._cv)){(r=this.collectionView).loading.removeHandler(null,this);r.loaded.removeHandler(null,this)}o.currentChanged.removeHandler(null,this);o.collectionChanged.removeHandler(null,this);o.pageChanging&&o.pageChanging.removeHandler(null,this);o.pageChanged&&o.pageChanged.removeHandler(null,this);o.groupDescriptions&&o.groupDescriptions.collectionChanged.removeHandler(null,this);o instanceof wijmo_1.CollectionView&&o.sortConverter==this._bndSortConverter&&(o.sortConverter=null);this._cv=null}this._items=e;this._cv=this._getCollectionView(e);this._collapsedGroups=null;this._lastCount=0;if(this._cv){var n;(o=this._cv).collectionChanged.addHandler((function(e,i){return t._cvCollectionChanged(e,i)}),this);o.pageChanging&&o.pageChanging.addHandler((function(){t._saveCollapsedState()}),this);o.pageChanged&&o.pageChanged.addHandler((function(){t._restoreCollapsedState()}),this);o.groupDescriptions&&o.groupDescriptions.collectionChanged.addHandler((function(e,i){i.action!==wijmo_1.NotifyCollectionChangedAction.Add&&(t._collapsedGroups=null)}),this);if(this._isServerCollectionView(this._cv)){var r;(r=this.collectionView).groupLazyLoading&&this._isFlexSheetInstance()&&console.error("groupLazyLoading is not supported for FlexSheet.");r.loading.addHandler((function(e,i){n=t.selection}),this);r.loaded.addHandler((function(e,i){return t._restCvLoadedHandler(e,i,n)}),this)}o.currentChanged.addHandler((function(e,i){return t._cvCurrentChanged(e,i)}),this);if(o instanceof wijmo_1.CollectionView){e&&(o.trackChanges=Boolean(e.trackChanges));o.sortConverter&&!this._isFlexSheetInstance()||(o.sortConverter=this._bndSortConverter)}}this._isISChanging=!0;this.disposed||this._bindGrid(!0);this._isISChanging=!1;this.onItemsSourceChanged(i)}}},enumerable:!0,configurable:!0});FlexGrid.prototype._restCvLoadedHandler=function(e,t,i){var o=this;e.groupLazyLoading&&this.deferUpdate((function(){o._isGrpClpsChanging=!0;o.rows.deferUpdate((function(){for(var e=0;e<o.rows.length;e++)o.rows[e]instanceof GroupRow&&Object.keys(o.rows[e].dataItem.items[0]).length==o.rows[e].dataItem.level+1&&(o.rows[e].isCollapsed=!0)}));o._isGrpClpsChanging=!1}));if(e._virtualization){e.groupDescriptions.length&&this.deferUpdate((function(){o._loadVirtualizedItems()}));this._isGrpClpsChanging=!1}(e._virtualization||e.groupLazyLoading)&&this.selection&&-1==this.selection.row&&i&&-1!=i.row&&this.select(i,!1,this.cells);if(this._initialRestCvLoad){0==this.selectionMode&&-1!=this.selection.row&&this.select(-1,0);this._initialRestCvLoad=!1;if(this._isFlexSheetInstance()){this._selHdl.selection.col=0;this._selHdl.selection.col2=0}}};FlexGrid.prototype._loadVirtualizedItems=function(){for(var e=this.viewRange,t=this.collectionView,i=null,o=e.row;o<=e.row2;o++)if(!(this.rows[o]instanceof GroupRow)&&this.rows[o].dataItem instanceof wijmo_1._NullValue&&-1!==this.rows[o].visibleIndex)null===i&&(i=o);else if(null!==i){t.setWindow(i-this._getGroupCount(i),o-1);i=null}null!==i&&t.setWindow(i-this._getGroupCount(i),e.row2)};Object.defineProperty(FlexGrid.prototype,"collectionView",{get:function(){return this._cv},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editableCollectionView",{get:function(){return wijmo_1.tryCast(this._cv,"IEditableCollectionView")},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"childItemsPath",{get:function(){return this._childItemsPath},set:function(e){if(e!=this._childItemsPath){wijmo_1.assert(null==e||wijmo_1.isArray(e)||wijmo_1.isString(e),"childItemsPath should be an array or a string.");this._childItemsPath=e;this._bindGrid(!0)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rowHeaderPath",{get:function(){return this._rowHdrPath?this._rowHdrPath.path:null},set:function(e){if(e!=this.rowHeaderPath){e=wijmo_1.asString(e);this._rowHdrPath=e?new wijmo_1.Binding(e):null;this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cells",{get:function(){return this._gpCells},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnHeaders",{get:function(){return this._gpCHdr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columnFooters",{get:function(){return this._gpCFtr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rowHeaders",{get:function(){return this._gpRHdr},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"topLeftCells",{get:function(){return this._gpTL},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"bottomLeftCells",{get:function(){return this._gpBL},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"rows",{get:function(){return this._rows},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"columns",{get:function(){return this._cols},enumerable:!0,configurable:!0});FlexGrid.prototype.getColumn=function(e,t){if(this._hasColumnGroups()&&t){var i=this.getColumnGroups();return null!==i?i.getColumn(e):null}return this.columns.getColumn(e)};Object.defineProperty(FlexGrid.prototype,"frozenCells",{get:function(){return{top:this.rows.frozen,bottom:this.rows.frozenEnd,left:this.columns.frozen,right:this.columns.frozenEnd}},set:function(e){if(this._isFrozenObjectAllowed()){wijmo_1.assert("object"==typeof e,"Object of type IGridFreezeOptions expected");var t={top:e.top?e.top:0,bottom:e.bottom?e.bottom:0,left:e.left?e.left:0,right:e.right?e.right:0},i=0;if(t.top){i=this.rows.getDetailRowCountUptoRow(t.top);t.top+=i}else if(t.bottom){i=this.rows.getDetailRowCountUptoRow(-t.bottom);t.bottom+=i}this.rows.frozen=t.top;this.rows.frozenEnd=t.bottom;i&&(this.rows.frozenDetailChildren=i);this.columns.frozen=t.left;this.columns.frozenEnd=t.right}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"frozenRows",{get:function(){return this.rows.frozen-this.rows.frozenDetailChildren},set:function(e){var t=this.rows.getDetailRowCountUptoRow(e);this.rows.frozen=e+t;this.rows.frozenDetailChildren=t},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"frozenColumns",{get:function(){return this.columns.frozen},set:function(e){this.columns.frozen=e},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cloneFrozenCells",{get:function(){return this._fzClone},set:function(e){if(e!=this._fzClone){wijmo_1.setText(this._fCt,null);this._fzClone=wijmo_1.asBoolean(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"sortRowIndex",{get:function(){return this._sortRowIndex},set:function(e){if(e!=this._sortRowIndex){this._sortRowIndex=wijmo_1.asNumber(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editColumnIndex",{get:function(){return this._editColIndex},set:function(e){if(e!=this._editColIndex){this._editColIndex=wijmo_1.asNumber(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"scrollPosition",{get:function(){return this._ptScrl.clone()},set:function(e){var t=this._root,i=-e.x;if(this.rightToLeft)switch(FlexGrid._getRtlMode()){case"rev":i=t.scrollWidth-t.clientWidth+e.x;break;case"neg":i=e.x;break;default:i=-e.x}t.scrollLeft!=i&&(t.scrollLeft=i);t.scrollTop!=-e.y&&(t.scrollTop=-e.y);this._updateScrollPosition()&&(this._forceScrollUpdate=!0)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"commitEmptyEdits",{get:function(){return this._commitEmptyEdits},set:function(e){if(e!=this._commitEmptyEdits){this._commitEmptyEdits=wijmo_1.asBoolean(e);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"clientSize",{get:function(){return this._szClient},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"controlRect",{get:function(){this._rcBounds||(this._rcBounds=wijmo_1.getElementRect(this._root));return this._rcBounds},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"scrollSize",{get:function(){return new wijmo_1.Size(this._gpCells.width,this._heightBrowser)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"viewRange",{get:function(){return this._gpCells.viewRange},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"cellFactory",{get:function(){return this._cf},set:function(e){if(e!=this._cf){this._clearCells();this._cf=wijmo_1.asType(e,CellFactory,!1)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"itemFormatter",{get:function(){return this._itemFormatter},set:function(e){if(e!=this._itemFormatter){this._clearCells();this._itemFormatter=wijmo_1.asFunction(e)}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"groupSummaryPosition",{get:function(){return this.childItemsPath?GroupSummaryPosition.Top:this._groupSummaryPosition},set:function(e){if(e!==this._groupSummaryPosition){this._groupSummaryPosition=wijmo_1.asEnum(e,GroupSummaryPosition,!1);this._bindGrid(!1)}},enumerable:!0,configurable:!0});FlexGrid.prototype.canEditCell=function(e,t){return this._edtHdl._allowEdit(e,t)};FlexGrid.prototype.getCellData=function(e,t,i){return this.cells.getCellData(e,t,i)};FlexGrid.prototype.getRowDataItem=function(e,t){return this.rows[wijmo_1.asNumber(e,!1,!0)].dataItem};FlexGrid.prototype._getRowData=function(e){return this.cells._getRowData(e)};FlexGrid.prototype.getCellBoundingRect=function(e,t,i){return this.cells.getCellBoundingRect(e,t,i)};FlexGrid.prototype.setCellData=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!0);return this.cells.setCellData(e,t,i,o,n)};FlexGrid.prototype.hitTest=function(e,t){wijmo_1.isNumber(e)&&wijmo_1.isNumber(t)&&(e=new wijmo_1.Point(e,t));wijmo_1.isBoolean(t)&&t&&(this._rcBounds=null);return new HitTestInfo(this,e)};FlexGrid.prototype.getClipString=function(e,t,i,o){var n;n=this.skipMerged?ClipStringOptions.SkipMerged:null==t||wijmo_1.isBoolean(t)?t?ClipStringOptions.CSV:ClipStringOptions.Default:t;wijmo_1.assert(wijmo_1.isNumber(n),"Unexpected value for ClipStringOptions parameter.");return this._edtHdl.getClipString(e,n,i,o)};FlexGrid.prototype.setClipString=function(e,t){this._edtHdl.setClipString(e,t)};FlexGrid.prototype.focus=function(e){this.isDisabled||this._setFocus(e)};FlexGrid.prototype.dispose=function(){var t=this;this.disposed=!0;if(this._afClip){cancelAnimationFrame(this._afClip);this._afClip=null}if(this._afSticky){cancelAnimationFrame(this._afSticky);this._afSticky=null}if(this._updateContentAnim){cancelAnimationFrame(this._updateContentAnim);this._updateContentAnim=null}this._edtHdl&&this.finishEditing(!0);this.rows.clear();this.columns.clear();this._hdrRows.clear();this._hdrCols.clear();this._ftrRows.clear();if(this._setInvalidScrollTimer){clearTimeout(this._setInvalidScrollTimer);this._setInvalidScrollTimer=null}if(this._triggerInvalidateTimer){clearTimeout(this._triggerInvalidateTimer);this._triggerInvalidateTimer=null}if(this._invalidScrollWithWheelTimer){clearTimeout(this._invalidScrollWithWheelTimer);this._invalidScrollWithWheelTimer=null}if(this._startEditingTimer){clearTimeout(this._startEditingTimer);this._startEditingTimer=null}if(this._showAutoTipTimer){clearTimeout(this._showAutoTipTimer);this._showAutoTipTimer=null}if(this._toAutoHeights){clearTimeout(this._toAutoHeights);this._toAutoHeights=null}if(this._toErrorTips){clearTimeout(this._toErrorTips);this._toErrorTips=null}if(this._scrollEndTimer){clearTimeout(this._scrollEndTimer);this._scrollEndTimer=null}if(this._invalidateTimer){clearTimeout(this._invalidateTimer);this._invalidateTimer=null}if(this._errorTip){this._errorTip.dispose();this._errorTip=null}["_gpTL","_gpCHdr","_gpRHdr","_gpCells","_gpBL","_gpCFtr"].forEach((function(e){var i=t[e];i&&i.dispose();t[e]=null}));["_root","_mainContainer","_helperContainer","_eTL","_eTLCt","_eCHdr","_eCHdrCt","_eRHdr","_eRHdrCt","_eCt","_eBL","_eBLCt","_eCFtrCt","_eCFtr","_fCt","_eFocus","_eSz","_eMarquee","_eNoData","_srFocusHelper","_imeContainer","_srMessageHelper"].forEach((function(e){t[e]=null}));this._activeCell=null;this._activePanel=null;FlexGrid._ctrlTemplate=null;["_mouseHdl","_keyHdl","_edtHdl","_selHdl","_addHdl","_grpHdl","_imeHdl","_mrgMgr","_oMgr"].forEach((function(e){t[e]&&t[e].dispose&&t[e].dispose();t[e]=null}));CellFactory.dispose();e.prototype.dispose.call(this)};FlexGrid.prototype.refresh=function(t){void 0===t&&(t=!0);e.prototype.refresh.call(this,t);this.finishEditing();if(t){this._updateColumnTypes();this.scrollPosition=this._ptScrl;this._updateAriaRowCount();this._updateAriaColumnCount();this._updateDefaultSizes();clearTimeout(this._toInv);this._toInv=null}this.refreshCells(t);var i=this._e;i&&(this._szCtl=new wijmo_1.Size(i.offsetWidth,i.offsetHeight))};FlexGrid.prototype.refreshCells=function(e,t,i){this.isUpdating||this.disposed||(e?this._updateLayout():this._updateContent(t,i))};FlexGrid.prototype.refreshRange=function(e,t){for(var i=t||this.cells,o=e.topRow;o<=e.bottomRow;o++)for(var n=e.leftCol;n<=e.rightCol;n++){var r=i.getCellElement(o,n);if(r){var l=r[GridPanel._INDEX_KEY];this.cellFactory.updateCell(i,o,n,r,l.rng)}}this._useFrozenDiv()&&this._updateFrozenCells(!0,!0)};FlexGrid.prototype.autoSizeColumn=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=4);this.autoSizeColumns(e,e,t,i)};FlexGrid.prototype.autoSizeColumns=function(e,t,i,o){var n=this;void 0===i&&(i=!1);void 0===o&&(o=4);var r=0,l=i?this.topLeftCells:this.columnHeaders,s=i?this.bottomLeftCells:this.columnFooters,a=i?this.rowHeaders:this.cells,d=this.viewRange;e=null==e?0:wijmo_1.asInt(e);t=null==t?a.columns.length-1:wijmo_1.asInt(t);d.row=Math.max(0,d.row-1e3);d.row2=Math.min(d.row2+1e3,this.rows.length-1);this.finishEditing()&&this.columns.deferUpdate((function(){wijmo_1.setCss(n._eCt,{width:n._gpCells.width});for(var i=wijmo_1.createElement("<div "+FlexGrid._WJS_MEASURE+'="true"/>',a.hostElement,{visibility:"hidden"}),u=n._getCanvasContext(),c=e;c<=t&&c>-1&&c<a.columns.length;c++){var h=a.columns[c];if(h.isVisible){r=0;if(n.autoSizeMode&AutoSizeMode.Headers){for(var _=0;_<l.rows.length;_++)l.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(l,_,c,i),r));for(_=0;_<s.rows.length;_++)s.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(s,_,c,i),r))}if(n.autoSizeMode&AutoSizeMode.Cells&&d.row>-1&&d.row2>-1)if(h._getQuickAutoSize()){_=n._getWidestRow(a,d,c,u);r=Math.max(n._getDesiredWidth(a,_,c,i),r)}else for(_=d.row;_<=d.row2&&_<a.rows.length;_++)a.rows[_].isVisible&&(r=Math.max(n._getDesiredWidth(a,_,c,i),r));r>0&&(h.width=r+o+2)}}n.cellFactory.disposeCell(i);wijmo_1.removeChild(i)}))};FlexGrid.prototype.autoSizeRow=function(e,t,i){void 0===t&&(t=!1);void 0===i&&(i=0);this.autoSizeRows(e,e,t,i)};FlexGrid.prototype.autoSizeRows=function(e,t,i,o){var n=this;void 0===i&&(i=!1);void 0===o&&(o=0);var r=0,l=1==i?this.topLeftCells:null==i?this.bottomLeftCells:this.rowHeaders,s=1==i?this.columnHeaders:null==i?this.columnFooters:this.cells;o=wijmo_1.asNumber(o);e=null==e?0:wijmo_1.asInt(e);if((t=null==t?s.rows.length-1:wijmo_1.asInt(t))>=e&&this.finishEditing()){wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this.cachedHeights={};var a=wijmo_1.createElement("<div "+FlexGrid._WJS_MEASURE+'="true"/>',s.hostElement,{visibility:"hidden"});this.rows.deferUpdate((function(){for(var i={},d=n._autoSizeMode,u=AutoSizeMode,c=e;c<=t&&c>-1&&c<s.rows.length;c++){if(s.rows[c].isVisible){r=0;d&u.Headers&&(r=n._getDesiredRowHeight(l,c,a,i));d&u.Cells&&(r=Math.max(n._getDesiredRowHeight(s,c,a,i),r));r>0&&(s.rows[c].height=r+o)}}}));this.cellFactory.disposeCell(a);wijmo_1.removeChild(a)}};Object.defineProperty(FlexGrid.prototype,"treeIndent",{get:function(){return this._indent},set:function(e){if(e!=this._indent){this._indent=wijmo_1.asNumber(e,!1,!0);this.columns.onCollectionChanged()}},enumerable:!0,configurable:!0});FlexGrid.prototype.collapseGroupsToLevel=function(e){var t=this;if(this.finishEditing()){this._isServerCollectionView(this._cv)&&(this._grpClpsChng=!0);if(this.preserveOutlineState&&this._cv){var i=this._cv._fullGroups||this._cv.groups;if(i){this._collapsedGroups||(this._collapsedGroups=this._getMap());if(this._collapsedGroups){this._collapsedGroups.clear();this._updateAllGroupsCollapseState(i,e,0)}}}this.deferUpdate((function(){var i=t.rows;i.deferUpdate((function(){for(var t=0;t<i.length;t++){var o=i[t];o instanceof GroupRow&&!o.isSummary&&(o.isCollapsed=o.level>=e)}}))}))}this._grpClpsChng=!1};Object.defineProperty(FlexGrid.prototype,"selectionMode",{get:function(){return this._selHdl.selectionMode},set:function(e){if((e=wijmo_1.asEnum(e,SelectionMode))!=this.selectionMode){this._selHdl.selectionMode=e;this._updateTabIndex()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selection",{get:function(){return this._selHdl.selection.clone()},set:function(e){this._selHdl.selection=e},enumerable:!0,configurable:!0});FlexGrid.prototype.select=function(e,t,i){void 0===t&&(t=!0);return this._selHdl.select(e,t,!1,i)};FlexGrid.prototype.selectAll=function(){var e=this.rows.length,t=this.columns.length;return!(!e||!t)&&this.select(new CellRange(0,0,e-1,t-1),!1)};FlexGrid.prototype.getSelectedState=function(e,t){return this.cells.getSelectedState(e,t)};Object.defineProperty(FlexGrid.prototype,"selectedRows",{get:function(){var e=this,t=this.selectionMode,i=this.rows.filter((function(e){return e.isSelected}));if(0==i.length&&t!=SelectionMode.None&&t!=SelectionMode.ListBox){var o=[];this.selectedRanges.forEach((function(t){for(var i=t.topRow;i<=t.bottomRow&&i>-1&&i<e.rows.length;i++)o.indexOf(i)<0&&o.push(i)}));o.sort((function(e,t){return e-t}));i=o.map((function(t){return e.rows[t]}))}return i},set:function(e){var t=this;wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"This property can be set only in ListBox mode.");e=wijmo_1.asArray(e);this.deferUpdate((function(){for(var i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n)>-1;if(r&&o){o=!1;t.select(i,t.selection.col)}n.isSelected=r}}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selectedItems",{get:function(){var e=[];this.selectedRows.forEach((function(t){var i=t?t.dataItem:null;i&&e.indexOf(i)<0&&e.push(i)}));return e},set:function(e){var t=this;wijmo_1.assert(this.selectionMode==SelectionMode.ListBox,"This property can be set only in ListBox mode.");e=wijmo_1.asArray(e);this.deferUpdate((function(){for(var i=0,o=!0;i<t.rows.length;i++){var n=t.rows[i],r=e&&e.indexOf(n.dataItem)>-1;if(r&&o){o=!1;t.select(i,t.selection.col)}n.isSelected=r}}))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"selectedRanges",{get:function(){var e=[this.selection];this._selHdl.extendedSelection.forEach((function(t){e.push(t)}));return e},set:function(e){if((e=wijmo_1.asArray(e))&&e.length>0){this.select(e[0]);if(this.selectionMode==SelectionMode.MultiRange){var t=this._selHdl.extendedSelection;t.deferUpdate((function(){t.clear();for(var i=1;i<e.length;i++)t.push(e[i])}))}}},enumerable:!0,configurable:!0});FlexGrid.prototype.scrollIntoView=function(e,t,i){var o=this;(null==this._maxOffsetY||this._rows._dirty||this._cols._dirty)&&e>-1&&this._updateLayout();var n=this.scrollPosition,r=this._szClient,l=r.width,s=r.height-this._gpCFtr.rows.getTotalSize(),a=this.cells._getFrozenPos();e=wijmo_1.asInt(e);wijmo_1.isString(t)&&(t=this.columns.indexOf(t));t=wijmo_1.asInt(t);e=e>=this.rows.length?-1:e;t=t>=this.columns.length?-1:t;var d=null;try{var u=this.getMergedRange(this.cells,e,t,!1);d=u;var c=this.cells._getFrozenPos();this.rows._frozenInternal>=0?u&&u.rowSpan>1&&this._rows[e].pos>c.y+-this.scrollPosition.y&&this._rows[e].renderHeight*u.rowSpan<this.hostElement.clientHeight&&this._edtHdl._getCustomEditor(this)&&(e=u.bottomRow):u&&u.rowSpan>1&&this._rows[u.bottomRow].pos+this._rows[u.bottomRow].renderHeight>c.y+-this.scrollPosition.y&&this._rows[u.bottomRow].pos-this._rows[u.topRow].pos+this._rows[u.bottomRow].renderHeight<this.clientSize.height&&(e=u.bottomRow)}catch(e){}var h=this._rows[e];if(e>-1&&e<this._rows.length&&!this._rows.isFrozen(e)){var _=this._getCssPage(h.pos);if(_!=this._cssPage){for(var p=this._maxOffsetY,g=Math.round(p*_);g>h.pos;_-=.1)g=Math.round(p*_);this._offsetY=g}var f=h.pos-this._offsetY,m=f+h.renderSize;m>s-n.y&&(n.y=Math.max(-f,s-m));if(this.rows._frozenInternal>=0)f-a.y<-n.y&&(n.y=-(f-a.y));else{h.pos<-n.y&&(n.y=-h.pos);m+n.y-a.y>0&&(n.y-=m+n.y-a.y);0==Math.abs(n.y-(this._ptScrl.y-this._spDiff.y))&&(n.y=this._ptScrl.y)}_!=this._cssPage&&(this._cssPage=this._getCssPage(-n.y))}wijmo_1.isString(t)&&(t=this.columns.indexOf(t));if((t=wijmo_1.asInt(t))>-1&&t<this._cols.length&&!this._cols.isFrozen(t)){var w=this._cols[t],C=w.pos+w.renderSize;C>-n.x+l&&(n.x=Math.max(-w.pos,l-C));if(this.columns._frozenInternal>=0)w.pos-a.x<-n.x&&(n.x=-(w.pos-a.x));else{w.pos<-n.x&&(n.x=-w.pos);C+n.x-a.x>0&&(n.x-=C+n.x-a.x);0==Math.abs(n.x-(this._ptScrl.x-this._spDiff.x))&&(n.x=this._ptScrl.x);this.rightToLeft&&!this._rows.isFrozen(e)&&wijmo_1.isFirefox()&&n.x++}}if(!n.equals(this._ptScrl,1,.8)){var v=1,y=1;this.columns._frozenInternal<0&&(v=-1);this.rows._frozenInternal<0&&(y=-1);n.x!=this._ptScrl.x&&this._root.clientWidth-n.x<this._root.scrollWidth&&(0!==n.x?n.x-=1*v:this.rightToLeft&&(n.x+=1*v));0!==n.y&&n.y<this._ptScrl.y&&this._root.clientHeight-n.y<this._root.scrollHeight&&(n.y-=1*y);this.scrollPosition=n;if(i){this._updateScrollPosition();this._forceScrollUpdate=!1;this.refresh()}this._spDiff.x=this._ptScrl.x-n.x;this._spDiff.y=this._ptScrl.y-n.y;this._showAutoTipTimer=setTimeout((function(){var e=wijmo_1.getActiveElement();e.classList.contains(wijmo_1.ControlStateClsNames.invalid)&&o.errorTip._showAutoTip(void 0,e)}),50);return!0}if(e>-1&&t>-1){var b=this._root,R=b.scrollWidth==b.clientWidth,x=b.scrollHeight==b.clientHeight;if(R||x){var S=wijmo_1.getScrollableParent(this.hostElement);if(S.clientHeight==S.scrollHeight&&S.clientWidth==S.scrollWidth)return!1;var E=wijmo_1.getOffsetFromAncestor(this.hostElement,S),j=this.cells.getCellElement(e,t),H=d||new CellRange(e,t),F=H.getRenderSize(this.cells),z=this.rows[H.topRow].pos+this._eCHdr.clientHeight,T=this.columns[H.leftCol].pos+this._eRHdr.clientWidth,M=j?j.clientWidth:F.width,G=j?j.clientHeight:F.height,I=z+E.top,P=T+E.left,A=I+G,D=P+M,L=S.clientWidth,O=S.clientHeight,N=S.scrollTop,V=S.scrollLeft,k=N+O,B=V+L;this.stickyHeaders&&(N+=this._eCHdr.clientHeight-1);this.rightToLeft&&(P=(D=E.left+b.clientWidth-this._eRHdr.clientWidth-this.columns[H.leftCol].pos)-M);if(N<=I&&A<=k&&V<=P&&D<=B)return!1;var W=0,K=0;x&&(N>I?K=I-N:k<A&&(K=A-k));R&&(V>P?W=P-V:B<D&&(W=D-B));S.scrollBy(W,K);if(W||K){i&&(this._isSilentScroll=!0);return!0}}}return!1};FlexGrid.prototype.isRangeValid=function(e){return e&&e.isValid&&e.bottomRow<this.rows.length&&e.rightCol<this.columns.length};FlexGrid.prototype.startEditing=function(e,t,i,o,n){void 0===e&&(e=!0);return this._edtHdl.startEditing(e,t,i,o,n)};FlexGrid.prototype.finishEditing=function(e){return this._edtHdl.finishEditing(e)};Object.defineProperty(FlexGrid.prototype,"activeCell",{get:function(){return this._activeCell},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"activeEditor",{get:function(){var e=this._edtHdl;return e?e.activeEditor:null},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"editRange",{get:function(){var e=this._edtHdl&&this._edtHdl.editRange;return e?e.clone():null},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"mergeManager",{get:function(){return this._mrgMgr},set:function(e){if(e!=this._mrgMgr){this._mrgMgr=wijmo_1.asType(e,MergeManager,!0);this.invalidate()}},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"overlayManager",{get:function(){return this._oMgr},set:function(e){if(e!=this._oMgr){this._oMgr=wijmo_1.asType(e,OverlayManager,!0);this.invalidate()}},enumerable:!0,configurable:!0});FlexGrid.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._mrgMgr?this._mrgMgr.getMergedRange(e,t,i,o):null};Object.defineProperty(FlexGrid.prototype,"keyActionTab",{get:function(){return this._keyHdl._kaTab},set:function(e){this._keyHdl._kaTab=wijmo_1.asEnum(e,KeyAction)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"keyActionEnter",{get:function(){return this._keyHdl._kaEnter},set:function(e){this._keyHdl._kaEnter=wijmo_1.asEnum(e,KeyAction)},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"preserveWhiteSpace",{get:function(){return wijmo_1.hasClass(this.hostElement,FlexGrid._WJS_WSPRE)},set:function(e){wijmo_1.toggleClass(this.hostElement,FlexGrid._WJS_WSPRE,wijmo_1.asBoolean(e))},enumerable:!0,configurable:!0});Object.defineProperty(FlexGrid.prototype,"showDropDown",{get:function(){return this._shDropDown},set:function(e){if(e!=this._shDropDown){this._shDropDown=wijmo_1.asBoolean(e,!0);this.invalidate()}},enumerable:!0,configurable:!0});FlexGrid.prototype.toggleDropDownList=function(){if(!this._tglDropDown){this._tglDropDown=!0;this._edtHdl._toggleListBox(null);this._tglDropDown=!1}return null!=this._edtHdl._lbx};Object.defineProperty(FlexGrid,"defaultTypeWidth",{get:function(){return FlexGrid._defTypeWidth},enumerable:!0,configurable:!0});FlexGrid.prototype.onItemsSourceChanging=function(e){this.itemsSourceChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onItemsSourceChanged=function(e){this.itemsSourceChanged.raise(this,e)};FlexGrid.prototype.onScrollPositionChanged=function(e){this.scrollPositionChanged.raise(this,e);if(this._isServerCollectionView(this.collectionView)){var t=this.collectionView;if(t._virtualization&&t.groupDescriptions.length>0){var i=this.showGroups?this._getGroupCount(this.viewRange.row):0;t.setWindow(Math.floor((this.viewRange.row-i)/this._getRowsPerItem()),Math.ceil((this.viewRange.row2-i)/this._getRowsPerItem()))}t._virtualization&&0==t.groupDescriptions.length&&t.setWindow(Math.floor(this.viewRange.row/this._getRowsPerItem()),Math.ceil(this.viewRange.row2/this._getRowsPerItem()))}};FlexGrid.prototype.onSelectionChanging=function(e){this.selectionChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onSelectionChanged=function(e){this.selectionChanged.raise(this,e)};FlexGrid.prototype.onLoadingRows=function(e){this.loadingRows.raise(this,e);return!e.cancel};FlexGrid.prototype.onLoadedRows=function(e){this.loadedRows.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onUpdatingLayout=function(e){this.updatingLayout.raise(this,e);return!e.cancel};FlexGrid.prototype.onUpdatedLayout=function(e){this.updatedLayout.raise(this,e)};FlexGrid.prototype.onResizingColumn=function(e){this.resizingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onResizedColumn=function(e){this.resizedColumn.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onAutoSizingColumn=function(e){this.autoSizingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onAutoSizedColumn=function(e){this.autoSizedColumn.raise(this,e)};FlexGrid.prototype.onStarSizedColumns=function(e){this.starSizedColumns.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onDraggingColumn=function(e){this.draggingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggingColumnOver=function(e){this.draggingColumnOver.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggedColumn=function(e){this.draggedColumn.raise(this,e)};FlexGrid.prototype.onPinningColumn=function(e){this.pinningColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onPinnedColumn=function(e){this.pinnedColumn.raise(this,e)};FlexGrid.prototype.onResizingRow=function(e){this.resizingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onResizedRow=function(e){this.resizedRow.raise(this,e)};FlexGrid.prototype.onAutoSizingRow=function(e){this.autoSizingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onAutoSizedRow=function(e){this.autoSizedRow.raise(this,e)};FlexGrid.prototype.onDraggingRow=function(e){this.draggingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggingRowOver=function(e){this.draggingRowOver.raise(this,e);return!e.cancel};FlexGrid.prototype.onDraggedRow=function(e){this.draggedRow.raise(this,e)};FlexGrid.prototype.onGroupCollapsedChanging=function(e){this._isGrpClpsChanging||this.groupCollapsedChanging.raise(this,e);if(!e.cancel){if(this._isServerCollectionView(this.collectionView)){var t=this.collectionView,i=this.rows[e.row];!this.isUpdating&&t.groupLazyLoading&&this.preserveOutlineState&&t._updateExpandedGroups(i.dataItem,i.isCollapsed);t.groupLazyLoading&&i.isCollapsed&&Object.keys(i.dataItem.items[0]).length<=t.groupDescriptions.length&&!this._isGrpClpsChanging&&t.lazyLoadGroup(i.dataItem)}}return!e.cancel};FlexGrid.prototype.onGroupCollapsedChanged=function(e){this._isGrpClpsChanging||this.groupCollapsedChanged.raise(this,e);if(this._isServerCollectionView(this.collectionView)){if(this._cv._virtualization){var t=this.selection;t&&t.row>-1&&!this._grpClpsChng&&this._loadVirtualItems(t,e);if(t&&-1==t.row){t=e.range;this._loadVirtualItems(t,e)}}}};FlexGrid.prototype._loadVirtualItems=function(e,t){var i=this.collectionView,o=this.viewRange,n=Math.floor((e.row-this._getGroupCount(e.row))/this._getRowsPerItem()+(this.rows[t.row].isCollapsed?this.rows[e.row].dataItem.items.length:0)),r=Math.ceil((o.row2-this._getGroupCount(o.row2))/this._getRowsPerItem());if(n<=r&&i._isVirtualRefreshNeeded(n,r)){this._isGrpClpsChanging=!0;i.setWindow(n,r)}};FlexGrid.prototype._getGroupCount=function(e){for(var t=0,i=0;i<e;i++)this.rows[i]instanceof GroupRow&&t++;return t++};FlexGrid.prototype.onColumnGroupCollapsedChanging=function(e){this.columnGroupCollapsedChanging.raise(this,e);return!e.cancel};FlexGrid.prototype.onColumnGroupCollapsedChanged=function(e){this.columnGroupCollapsedChanged.raise(this,e)};FlexGrid.prototype.onSortingColumn=function(e){this.sortingColumn.raise(this,e);return!e.cancel};FlexGrid.prototype.onSortedColumn=function(e){this.sortedColumn.raise(this,e)};FlexGrid.prototype.onBeginningEdit=function(e){this._addHdl._beginningEdit(this,e);e.cancel||this.beginningEdit.raise(this,e);return!e.cancel};FlexGrid.prototype.onPrepareCellForEdit=function(e){this.prepareCellForEdit.raise(this,e)};FlexGrid.prototype.onCellEditEnding=function(e){this.cellEditEnding.raise(this,e);return!e.cancel&&!e.stayInEditMode};FlexGrid.prototype.onCellEditEnded=function(e){this.cellEditEnded.raise(this,e);this._autoRowHeights()};FlexGrid.prototype.onRowEditStarting=function(e){this._addHdl._rowEditStarting(this,e);e.cancel||this.rowEditStarting.raise(this,e);return!e.cancel};FlexGrid.prototype.onRowEditStarted=function(e){this.rowEditStarted.raise(this,e)};FlexGrid.prototype.onRowEditEnding=function(e){this._addHdl._rowEditEnding(this,e);this.rowEditEnding.raise(this,e)};FlexGrid.prototype.onRowEditEnded=function(e){this.rowEditEnded.raise(this,e);this._addHdl._rowEditEnded(this,e);this._autoRowHeights()};FlexGrid.prototype.onRowAdded=function(e){this.rowAdded.raise(this,e);return!e.cancel};FlexGrid.prototype.onDeletingRow=function(e){this.deletingRow.raise(this,e);return!e.cancel};FlexGrid.prototype.onDeletedRow=function(e){this.deletedRow.raise(this,e)};FlexGrid.prototype.onCopying=function(e){this.copying.raise(this,e);return!e.cancel};FlexGrid.prototype.onCopied=function(e){this.copied.raise(this,e)};FlexGrid.prototype.onPasting=function(e){this.pasting.raise(this,e);return!e.cancel};FlexGrid.prototype.onPasted=function(e){this.pasted.raise(this,e)};FlexGrid.prototype.onPastingCell=function(e){this.pastingCell.raise(this,e);return!e.cancel};FlexGrid.prototype.onPastedCell=function(e){this.pastedCell.raise(this,e)};FlexGrid.prototype.onFormatItem=function(e){this.formatItem.raise(this,e)};FlexGrid.prototype.onUpdatingView=function(e){this.updatingView.raise(this,e);return!e.cancel};FlexGrid.prototype.onUpdatedView=function(e){this.updatedView.raise(this,e)};FlexGrid.prototype.onGettingCellClipString=function(e){this.gettingCellClipString.raise(this,e)};FlexGrid.prototype.getMergedRangeRawData=function(e,t,i,o){void 0===o&&(o=!0);return this._mrgMgr?softMultirow()&&this instanceof softMultirow().MultiRow||softTransposed()&&this instanceof softTransposed().TransposedGrid||softTransposedMultirow()&&this instanceof softTransposedMultirow().TransposedMultiRow?this._mrgMgr.getMergedRange(e,t,i,o):this._mrgMgr._getMergedRange?this._mrgMgr._getMergedRange(e,t,i,o,!1):this._mrgMgr.getMergedRange(e,t,i,o):null};FlexGrid.prototype._createSelHdl=function(){return new _SelectionHandler(this)};FlexGrid.prototype._getTabIndex=function(){return this._orgTabIndex};FlexGrid.prototype._setTabOrder=function(e){this._orgTabIndex=e;this._updateTabIndex()};FlexGrid.prototype._updateTabIndex=function(){var e=this.isDisabled?-1:this._orgTabIndex,t=this._imeHdl;t&&t._updateImeFocus();var i=this._activeCell,o=this._root,n=this._eFocus;if(i){i.tabIndex=e;n.tabIndex=-1;o.tabIndex=-1}else if(this.selectionMode!=SelectionMode.None){n.tabIndex=e;o.tabIndex=-1}else{o.tabIndex=e;n.tabIndex=-1}};FlexGrid.prototype._autoRowHeights=function(){var e=this;if(this._autoHeights){this.rows.length>100&&[this.columnHeaders,this.rowHeaders].forEach((function(e){e._updateContent(!0,!1,e._getOffsetY())}));clearTimeout(this._toAutoHeights);this._toAutoHeights=setTimeout((function(){e._toAutoHeights=null;e.editRange||e._autoSizeRows()}),wijmo_1.Control._REFRESH_INTERVAL)}};FlexGrid.prototype._autoSizeRows=function(){var e=this.autoSizeMode,t=AutoSizeMode;if(e&t.Headers){this._autoSizeMode=t.Both;this.autoSizeRows(0,this.columnHeaders.rows.length-1,!0);this._autoSizeMode=e}e&t.Cells&&this.autoSizeRows()};FlexGrid.prototype._getShowErrors=function(){return this.showErrors&&this._hasValidation};FlexGrid.prototype._getHasValidation=function(){return this._hasValidation};FlexGrid.prototype._getError=function(e,t,i,o){if(wijmo_1.isFunction(this.itemValidator)){if(e==this.cells)return this.itemValidator(t,i,o);if(e==this.rowHeaders){var n=e.rows,r=this.columns,l=n[t].dataItem,s=null,a=[],d=t;if(g=this.getMergedRange(e,t,i,!1)){for(t=d=g.row;t<n.length&&(n[t].dataItem==l||g&&g.rowSpan>1&&g.row2>=t);t++)for(var u=0;u<r.length;u++)if(s=this.itemValidator(t,u,!1)){(C=this.getMergedRange(this.cells,t,u))&&(C.columnSpan>1&&C.col<u||C.rowSpan>1&&C.row<t)||a.push(s)}}else for(u=0;u<this.columns.length;u++){var c=this.itemValidator(t,u,!1);c&&a.push(c)}if(a.length){var h=!!(v=this.errorTip)&&v.isContentHtml;s=a.join(h?"<br/>":"\n")}return s}}var _=this._cv,p=_?_.getError:null;if(wijmo_1.isFunction(p)){n=e.rows,r=this.columns;if((l=n[t].dataItem)&&!(l instanceof wijmo_1.CollectionViewGroup))if(e==this.cells)for(;t<n.length&&n[t].dataItem==l;t++){return p(l,(f=this._getBindingColumn(this.cells,t,r[i])).binding,o)}else if(e==this.rowHeaders){if(!(s=p(l,null,!1))){var g;a=[],d=t;(g=this.getMergedRange(e,t,i,!1))&&(d=g.row);for(t=d;t<n.length&&(n[t].dataItem==l||g&&g.rowSpan>1&&g.row2>=t);t++)for(u=0;u<r.length;u++){var f=this._getBindingColumn(this.cells,t,r[u]),m=n[t].dataItem,w=m&&f&&f.binding?f._binding.getValue(m):null;if(s=f.binding&&m&&f.getIsRequired(n[t])&&this.editRange&&this.editRange.containsRow(t)&&(null==w||""===w)?this._edtHdl._getRequiredMsg():p(m,f.binding,!1)){var C;(C=this.getMergedRange(this.cells,t,u))&&(C.columnSpan>1&&C.col<u||C.rowSpan>1&&C.row<t)||a.push(s)}}if(a.length){var v;h=!!(v=this.errorTip)&&v.isContentHtml;s=a.join(h?"<br/>":"\n")}}return s}}return null};FlexGrid.prototype._setAria=function(e,t){var i=this._gridRoleElement();i&&wijmo_1.setAttribute(i,e,t)};FlexGrid.prototype._setFocus=function(e){if(this.hostElement){var t=wijmo_1.getActiveElement(),i=this.activeEditor,o=this._activeCell,n=this._eFocus,r=this._root,l=this._getTabIndex(),s=this.containsFocus();if(!e&&s&&this.selectionMode!=SelectionMode.None){if(this.rows.length>0&&this.selection.row>=0&&this.selection.col>=0){var a=this._getBindingColumn(this.cells,this.selection.row,this.columns[this.selection.col]),d=a&&a._edt;this._isInputElement(t)||!o||wijmo_1.contains(o,t)||this.imeEnabled||d||this._correctFocusOfActiveCell(o)}}else if(e||!s){if(i){if(!wijmo_1.contains(i,t)){i.focus();n.tabIndex=-1;r.tabIndex=-1}}else if(o)wijmo_1.contains(o,t)||this._correctFocusOfActiveCell(o);else if(!wijmo_1.contains(n,t)&&t!=r)if(this.selectionMode!=SelectionMode.None){n.tabIndex=l;this._setFocusNoScroll(n)}else{r.tabIndex=l;this._setFocusNoScroll(r)}if(!this.containsFocus())if(this.selectionMode!=SelectionMode.None){n.tabIndex=l;this._setFocusNoScroll(n)}else{r.tabIndex=l;this._setFocusNoScroll(r)}}}};FlexGrid.prototype._correctFocusOfActiveCell=function(e){var t=this._getTabIndex();if(wijmo_1.getActiveElement()!=this._root){wijmo_1.isIE()&&wijmo_1.hasClass(e,exports.FlexGridClsNames.group)&&(e=e.querySelector("."+CellFactory._WJC_COLLAPSE)||e);e.tabIndex=t}else e.tabIndex=t;this._setFocusNoScroll(e);this._eFocus.tabIndex=-1};FlexGrid.prototype._setFocusNoScroll=function(e){if(wijmo_1.getActiveElement()!=e){if(wijmo_1.supportsFocusOptions())this._imeHdl&&this._imeHdl._handlingCompositionStart||e.focus({preventScroll:!0});else{var t=this.scrollPosition,i=e.style,o=i.position;i.position="fixed";e.focus();i.position=o;this.scrollPosition=t}this._fixScroll()}};FlexGrid.prototype._clearAnchorCell=function(){this._anchorCell=null};FlexGrid.prototype._setAnchorCell=function(e,t){var i=this.getMergedRange(this.cells,e,t);this._anchorCell=i?new wijmo_1.Point(i.col,i.row):new wijmo_1.Point(t,e)};FlexGrid.prototype._getAnchorCell=function(){return this._anchorCell};FlexGrid.prototype._updateDefaultSizes=function(){var e=this._getDefaultRowHeight();this._rows._setDefaultSize(e);this._cols._setDefaultSize(4*e);this._hdrRows._setDefaultSize(e);this._hdrCols._setDefaultSize(Math.round(1.25*e));this._ftrRows._setDefaultSize(e);return e};FlexGrid.prototype._getDefaultRowHeight=function(){var e=this.hostElement,t=this._eFocus,i=null;if(!t.offsetHeight){i=wijmo_1.createElement('<div><div class="'+exports.FlexGridClsNames.cell+'">0</div></div>',document.body);e&&i.setAttribute("class",e.getAttribute("class"));t=i.children[0]}var o=t.offsetHeight;(Number.isNaN(o)||o<=6)&&(o=28);wijmo_1.removeChild(i);return o};FlexGrid.prototype._getCollectionView=function(e){return wijmo_1.asCollectionView(e)};FlexGrid.prototype._getCanvasContext=function(){var e=document.createElement("canvas").getContext("2d"),t=getComputedStyle(this.hostElement);e.font=t.fontSize+" "+t.fontFamily.split(",")[0];return e};FlexGrid.prototype._getWidestRow=function(e,t,i,o){for(var n=0,r=0,l=1===this._getRowsPerItem()&&e.columns[i].dataType==wijmo_1.DataType.Boolean,s=t.row;s<=t.row2;s++)if(e.rows[s].isVisible){var a=e.getCellData(s,i,!0),d=o.measureText(a).width,u=this.getMergedRange(e,s,i,!1);u&&u.columnSpan>1&&(d/=u.columnSpan);if(d>r){r=d;n=s}if(l)break;s+=u?u.rowSpan-1:0}return n};FlexGrid.prototype._getDesiredWidth=function(e,t,i,o){var n=this.getMergedRange(e,t,i,!1),r=o.style;this.cellFactory.updateCell(e,t,i,o,n);r.width=r.top=r.left="";return o.offsetWidth/(n&&n.columnSpan>1?n.columnSpan:1)};FlexGrid.prototype._getDesiredHeight=function(e,t,i,o){var n=o.style,r=this.getMergedRange(e,t,i,!1),l=r?r.rowSpan:1;this.cellFactory.updateCell(e,t,i,o,r);var s=o.innerHTML,a=this.cachedHeights[s],d=s.trim();if(!d||"<div></div>"===d){s=" ";var u=o;if(null==(a=this.cachedHeights[s])){d?u.firstElementChild.innerHTML=s:u.innerHTML=s;u.style.height=u.style.top=u.style.left=""}if(!e.rows[t].wordWrap&&!e.columns[i].wordWrap){if(-1==this.cachedDefaultHeight){n.height=n.top=n.left="";this.cachedDefaultHeight=u.offsetHeight}this.cachedHeights[s]=this.cachedDefaultHeight;return this.cachedDefaultHeight/l}}if(null==a||a<o.scrollHeight){n.height=n.top=n.left="";this.cachedHeights[s]=o.offsetHeight}return this.cachedHeights[s]/l};FlexGrid.prototype._getDesiredRowHeight=function(e,t,i,o){for(var n=0,r=(e.rows[t],this._getQuickAutoSize()),l=0;l<e.columns.length;l++){if(e.columns[l].isVisible){var s=this.getMergedRange(e,t,l,!1),a=void 0;if(r){var d={ct:e.cellType,col:l,spr:s&&s.rowSpan>1?s.rowSpan:1,spc:s&&s.columnSpan>1?s.columnSpan:1,data:e.getCellData(t,l,!0)||"1"},u=JSON.stringify(d);if(null==(a=o[u])){a=this._getDesiredHeight(e,t,l,i);o[u]=a}}else a=this._getDesiredHeight(e,t,l,i);n=Math.max(a,n);l+=s?s.columnSpan-1:0}}return n};FlexGrid.prototype._getSortRowIndex=function(){return null!=this._sortRowIndex?this._sortRowIndex:this.columnHeaders.rows.length-1};FlexGrid.prototype._getDeleteColumnIndex=function(){return 0};FlexGrid.prototype._getEditColumnIndex=function(){return null!=this._editColIndex?this._editColIndex:this.rowHeaders.columns.length-1};FlexGrid.prototype._sortConverter=function(e,t,i,o){var n,r=this;if(o){this._mappedColumns=null;this._cv&&this._cv.sortDescriptions.forEach((function(e){if((n=r.getColumn(e.property))&&n.dataMap){r._mappedColumns||(r._mappedColumns={});r._mappedColumns[n.binding]=n.dataMap}}));if(this._mouseHdl._htDown&&this._mouseHdl._htDown.col>-1){n=this.columns[this._mouseHdl._htDown.col];this._mappedColumns&&n.dataMap&&(this._mappedColumns[n.binding]=n.dataMap)}}if(this._mappedColumns){var l=this._mappedColumns[e.property];l&&l.sortByDisplayValues&&(i=l.getDisplayValue(i))}return i};FlexGrid.prototype._bindGrid=function(e){var t=this;this.finishEditing();this.deferUpdate((function(){t.autoGenerateColumns&&0==t._lastCount&&wijmo_1.hasItems(t._cv)&&(e=!0);var i;t.preserveSelectedState&&(i=t._getMap())&&t.rows.forEach((function(e){e.isSelected&&e.dataItem&&i.set(e.dataItem,!0)}));var o=null,n=t.selection&&t.rows&&(t.rows[t.selection.row]instanceof GroupRow||t.rows[t.selection.row2]instanceof GroupRow);if(t.preserveSelectedState&&!t._isSourceChanging&&t._cv&&n){var r=t.selection,l=t.rows[t.selection.row]instanceof GroupRow?t.selection.row:t.selection.row2;r.row>-1&&t.rows[l]&&(o=t.rows[l].dataItem)}var s,a=t._getMap();a&&t.rows.forEach((function(e){e.isReadOnly&&e.dataItem&&a.set(e.dataItem,!0)}));if(t.preserveOutlineState&&t.rows.maxGroupLevel>-1&&(s=t._getMap()))for(var d=0;d<t.rows.length;d++){var u=t.rows[d];if(u instanceof GroupRow&&u.isCollapsed&&u.dataItem){var c=u.dataItem;c instanceof wijmo_1.CollectionViewGroup&&(c=c._path);s.set(c,!0);t._collapsedGroups||(t._collapsedGroups=t._getMap());t._collapsedGroups&&t._collapsedGroups.set(c,!0)}}e&&t.columns.deferUpdate((function(){t._bindColumns()}));var h=new wijmo_1.CancelEventArgs;if(t.onLoadingRows(h)){t.rows.deferUpdate((function(){t._bindRows()}));t.onLoadedRows(h)}t._selHdl.extendedSelection.clear();var _=0;i&&i.size&&t.rows.forEach((function(e){var t=e.dataItem;if(t&&i.has(t)){e.isSelected=!0;_++}}));a&&a.size&&t.rows.forEach((function(e){var t=e.dataItem;t&&a.has(t)&&(e.isReadOnly=!0)}));if(0==_&&t.selectionMode==SelectionMode.ListBox)for(d=(r=t.selection).topRow;d<=r.bottomRow&&d>-1&&d<t.rows.length;d++)t.rows[d]._setFlag(RowColFlags.Selected,!0,!0);if(t._cv&&n&&o){var p=!1;for(r=t.selection.clone(),l=0;l<t.rows.length;l++)if(t.rows[l].dataItem===o){r.row=r.row2=l;p=!0;break}if(!p){r.row=-1;r.row2=-1}t._selHdl._adjustSelection(r,t.selectionMode,e&&!t._toInv)}if(s&&s.size){t._cv&&t._cv.groupOnServer&&t._cv._virtualization&&(t._isGrpClpsChanging=!0);t.rows.deferUpdate((function(){t.rows.forEach((function(e){if(e instanceof GroupRow){var t=e.dataItem;t instanceof wijmo_1.CollectionViewGroup&&(t=t._path);s.has(t)&&(e.isCollapsed=!0)}}))}));t._cv&&t._cv.groupOnServer&&t._cv._virtualization&&(t._isGrpClpsChanging=!1)}if(!t._lastCount){var g=t._cv;g&&g.items&&(t._lastCount=g.items.length)}}));if(this._cv){var i=e&&!this._toInv;this.activePanelType===CellType.Cell&&this._syncSelection(i)}else{var o=this.selection,n=new CellRange(-1,o.col,-1,o.col2);this.activePanelType===CellType.Cell&&this._selHdl._adjustSelection(n,this.selectionMode)}};FlexGrid.prototype._getMap=function(){return window.Map?new Map:null};FlexGrid.prototype._saveCollapsedState=function(){if(this.preserveOutlineState&&-1!==this.rows.maxGroupLevel){this._collapsedGroups||(this._collapsedGroups=this._getMap());for(var e=0;e<this.rows.length;e++){var t=this.rows[e];if(t instanceof GroupRow&&t.dataItem){var i=t.dataItem;i instanceof wijmo_1.CollectionViewGroup&&(i=i._path);t.isCollapsed?this._collapsedGroups.set(i,!0):this._collapsedGroups.delete(i)}}}};FlexGrid.prototype._restoreCollapsedState=function(){var e=this;if(this.preserveOutlineState&&this._collapsedGroups){var t=this._isServerCollectionView(this._cv);t&&this._cv&&this._cv.groupOnServer&&this._cv._virtualization&&(this._isGrpClpsChanging=!0);this.rows.deferUpdate((function(){e.rows.forEach((function(t){if(t instanceof GroupRow&&t.dataItem){var i=t.dataItem;i instanceof wijmo_1.CollectionViewGroup&&(i=i._path);t.isCollapsed=e._collapsedGroups.has(i)}}))}));t&&this._cv&&this._cv.groupOnServer&&this._cv._virtualization&&(this._isGrpClpsChanging=!1)}};FlexGrid.prototype._updateAllGroupsCollapseState=function(e,t,i){if(e&&this._collapsedGroups)for(var o=0;o<e.length;o++){var n=e[o],r=n._path;i>=t?this._collapsedGroups.set(r,!0):this._collapsedGroups.delete(r);n.groups&&n.groups.length>0&&this._updateAllGroupsCollapseState(n.groups,t,i+1)}};FlexGrid.prototype._cvCollectionChanged=function(e,t){this._isSourceChanging=!0;if(this.autoGenerateColumns&&0==this.columns.length){this._bindGrid(!0);this._isSourceChanging=!1}else{var i=wijmo_1.NotifyCollectionChangedAction;if(this.childItemsPath&&t.action!=i.Change){this._bindGrid(!1);this._isSourceChanging=!1}else{switch(t.action){case i.Change:this.invalidate();return;case i.Add:if(t.index==this._cv.items.length-1){var o=this.rows.length;this.rows[o-1]instanceof _NewRowTemplate&&o--;this.rows.insert(o,new Row(t.item));return}wijmo_1.assert(!1,"added item should be the last one.");break;case i.Remove:if((o=this._findRow(t.item))>-1){this.rows.removeAt(o);this._syncSelection(!1);return}wijmo_1.assert(!1,"removed item not found on grid.")}this._bindGrid(!1);this._isSourceChanging=!1}}};FlexGrid.prototype._cvCurrentChanged=function(e,t){this._syncSelection(!1)};FlexGrid.prototype._syncSelection=function(e){if(this._cv&&this.selectionMode!=SelectionMode.None){var t=this._selHdl,i=t.selection,o=i.row>-1&&i.row<this.rows.length?this.rows[i.row]:null,n=o?o.dataItem:null,r=this._cv;if(r instanceof wijmo_1.CollectionView&&r.isUpdating)return;if(this.newRowAtTop&&o instanceof _NewRowTemplate)return;n instanceof wijmo_1.CollectionViewGroup&&(n=null);var l=this._isISChanging;if(e||n!=r.currentItem||l&&i.row!==i.row2||i.row>=this.rows.length||i.row2>=this.rows.length||(0!==i.col||0!==i.col2)&&(i.col>=this.columns.length||i.col2>=this.columns.length)){var s=this.editableCollectionView;if(!this.childItemsPath||!s||!s.currentAddItem){var a=this._getRowIndex(r.currentPosition),d=this.getMergedRange(this._activePanel,a,i.col,!1);if(!(null!=d&&d._row<=i.row&&d._row2>=i.row2||a==i.row&&this.childItemsPath)){var u=l?i.col:i.col2;i=-1!==a&&(i.col>=this.columns.length||i.col2>=this.columns.length)?new CellRange(a,0):new CellRange(a,i.col,a,u);t._adjustSelection(i,this.selectionMode);this.selectionMode&&!this._updating&&this.scrollIntoView(i.row,-1)}}}}};FlexGrid.prototype._getRowIndex=function(e){if(this._cv){var t=this.rows;if(e>-1){for(var i=this._cv.items[e];e<t.length;e++)if(t[e].dataItem===i)return e;return-1}if(1==t.length&&t[0]instanceof _NewRowTemplate)return 0;var o=this.selection.row,n=o>-1?t[o]:null;return n&&(n instanceof GroupRow||null==n.dataItem)?o:-1}return this.selection.row};FlexGrid.prototype._getCvIndex=function(e){return e>-1&&e<this.rows.length?this.rows[e].dataIndex:-1};FlexGrid.prototype._findRow=function(e){for(var t=0;t<this.rows.length;t++)if(this.rows[t].dataItem==e)return t;return-1};FlexGrid.prototype._preWidth=function(){var e=this._root,t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0;return e.clientWidth-t};FlexGrid.prototype._updateLayout=function(){var e=new wijmo_1.CancelEventArgs;if(this.onUpdatingLayout(e)){var t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0,i=this._hdrVis&HeadersVisibility.Column?this._hdrRows.getTotalSize():0,o=this._ftrRows.getTotalSize(),n=this._rows.getTotalSize()+o;n<1&&(n=1);this._heightReal=n;this._heightBrowser=Math.min(n,FlexGrid._getMaxSupportedCssHeight());this._maxOffsetY=Math.max(0,n-this._heightBrowser);this.rows.length||wijmo_1.setCss(this._eSz,{height:"0px"});var r=this.overlayManager.updateNoDataOverlay(this,this._eNoData),l=getComputedStyle(this._eFocus);this._cellPadVert=parseInt(l.paddingTop)+parseInt(l.paddingBottom);this._cellPadHorz=parseInt(l.paddingLeft)+parseInt(l.paddingRight);this._cellPadLeft=parseInt(this.rightToLeft?l.paddingRight:l.paddingLeft);var s=this._heightBrowser+i-o,a=this._gpCells.width,d=this._heightBrowser;!a&&this.rows.length&&(a=.1);!d&&this.columns.length&&(d=.1);if(this.rightToLeft){wijmo_1.setCss(this._eTL,{right:0,top:0,width:t,height:i});wijmo_1.setCss(this._eCHdr,{right:t,top:0,height:i});wijmo_1.setCss(this._eRHdr,{right:0,top:i,width:t});wijmo_1.setCss(this._eCt,{right:t,top:i,width:a,height:d});wijmo_1.setCss(this._fCt,{right:t,top:i});wijmo_1.setCss(this._eBL,{right:0,top:s,width:t,height:o});wijmo_1.setCss(this._eCFtr,{right:t,top:s,height:o})}else{wijmo_1.setCss(this._eTL,{left:0,top:0,width:t,height:i});wijmo_1.setCss(this._eCHdr,{left:t,top:0,height:i});wijmo_1.setCss(this._eRHdr,{left:0,top:i,width:t});wijmo_1.setCss(this._eCt,{left:t,top:i,width:a,height:d});wijmo_1.setCss(this._fCt,{left:t,top:i});wijmo_1.setCss(this._eBL,{left:0,top:s,width:t,height:o});wijmo_1.setCss(this._eCFtr,{left:t,top:s,height:o})}this._stickyHdr&&this._updateStickyHeaders();var u=this.rows._frozenInternal||this.columns._frozenInternal;wijmo_1.setCss([this._eTL,this._eBL,this._eCFtr,this._eRHdr],{zIndex:u?"4":"3"});wijmo_1.setCss(this._eCHdr,{zIndex:u?"5":"3"});wijmo_1.setCss(this._eMarquee,{zIndex:u?"4":"1"});this._eCHdr.closest("."+exports.FlexGridClsNames.cell)&&wijmo_1.setCss(this._eCHdr,{zIndex:u?"5":"2"});wijmo_1.isIE()&&(this._fCt.style.zIndex=u?"3":"");var c=this._root,h=c.offsetWidth-c.clientWidth,_=c.offsetHeight-c.clientHeight;wijmo_1.setCss(this._eSz,{width:t+h+this._gpCells.width,height:i+_+this._heightBrowser+r});var p=null;if(this.columns._updateStarSizes(c.clientWidth-t)){p=c.clientWidth;wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this.onStarSizedColumns()}this._szClient=new wijmo_1.Size(c.clientWidth-t,c.clientHeight-i);this._szClientSB=new wijmo_1.Size(c.offsetWidth-t,c.offsetHeight-i);this._rcBounds=null;this._updateScrollHandler();this._updateContent(!1);h=c.offsetWidth-c.clientWidth;_=c.offsetHeight-c.clientHeight;wijmo_1.setCss(this._eSz,{width:t+h+this._gpCells.width,height:i+_+this._heightBrowser+r});var g=new wijmo_1.Size(this._szClient.width,this._szClient.height);this._szClient=new wijmo_1.Size(c.clientWidth-t,c.clientHeight-i);!(this.columns._frozenInternal<0||this.rows._frozenInternal<0)||g.width==this._szClient.width&&g.height==this._szClient.height||this._updateContent(!1);if(p&&p!=c.clientWidth&&this.columns._updateStarSizes(c.clientWidth-t)){wijmo_1.setCss(this._eCt,{width:this._gpCells.width});this._updateContent(!1)}wijmo_1.setCss([this._eCHdr,this._eCFtr,this._fCt],{width:this._szClient.width});wijmo_1.setCss([this._eRHdr,this._fCt],{height:this._szClient.height});if(o){s=Math.min(s,this._szClient.height+i-o);wijmo_1.setCss([this._eBL,this._eCFtr],{top:s})}this._alignTheTail(this.rows);this._alignTheTail(this.columns);this.onUpdatedLayout(e)}};FlexGrid.prototype.handleLoad=function(){var e=this._mainContainer||this._root.parentElement,t=this._root.style.overflowX,i=this._root.style.overflowY;wijmo_1.setCss(this._root,{"overflow-y":0!=this._root.scrollHeight&&this._root.scrollHeight===e.clientHeight?"hidden":"auto","overflow-x":0!=this._root.scrollWidth&&this._root.scrollWidth===e.clientWidth?"hidden":"auto"});t==this._root.style.overflowX&&i==this._root.style.overflowY||this.invalidate()};FlexGrid.prototype._updateStickyHeaders=function(){var e=!1,t=0;if(this._stickyHdr){for(var i=0,o=null,n=this.hostElement;n;n=n.parentElement)if("inline"!=getComputedStyle(n).display){var r=n.getBoundingClientRect();null==o&&(o=r.top);i=Math.max(i,r.top)}t=-(o=Math.max(0,i-o-1));e=o>0;this._rcBounds=null}this._eTL.style.top=this._eCHdr.style.top=e?-t+"px":"";wijmo_1.toggleClass(this._eTL,FlexGrid._WJS_STICKY,e);wijmo_1.toggleClass(this._eCHdr,FlexGrid._WJS_STICKY,e)};FlexGrid.prototype._updateScrollHandler=function(){this._clipToScreen=this._getClipToScreen();var e=this._stickyHdr||this._clipToScreen;if(e!=this._scrollHandlerAttached){this._scrollHandlerAttached=e;e?this.addEventListener(window,"scroll",this._scroll.bind(this),!0):this.removeEventListener(window,"scroll")}};FlexGrid.prototype._getClipToScreen=function(){if(this.rows.length<=FlexGrid._MIN_VIRT_ROWS)return!1;if(this._root.scrollHeight>this._root.clientHeight)return!1;for(var e=this.hostElement;e&&e!=document.documentElement;e=e.parentElement){if("auto"==getComputedStyle(e).overflow)return!1}return!0};FlexGrid.prototype._scroll=function(e){var t=this;if(wijmo_1.contains(e.target,this.hostElement)){if(this._clipToScreen){this._afClip&&cancelAnimationFrame(this._afClip);this._afClip=requestAnimationFrame((function(){if(t._isSilentScroll)queueMicrotask((function(){t._isSilentScroll=!1}));else{t._afClip=null;t.finishEditing();t._updateContent(!0)}}))}if(this._stickyHdr){var i=Date.now();if(i-this._lastStickyScroll>this._scrollStickyThrottleTimeout){this._afSticky&&cancelAnimationFrame(this._afSticky);this._afSticky=requestAnimationFrame((function(){t._afSticky=null;var e=new wijmo_1.CancelEventArgs;if(t.onUpdatingLayout(e)){t._updateStickyHeaders();t.onUpdatedLayout(e)}}));this._lastStickyScroll=i}this._handleScrollEnd()}}};FlexGrid.prototype._getCssPage=function(e){if(this._heightReal>this._heightBrowser){var t=this._szClient.height-this._gpCFtr.rows.getTotalSize();if(this._heightBrowser>t)return wijmo_1.clamp(Math.round(e/(this._heightBrowser-t)*10)/10,0,1)}return 0};FlexGrid.prototype._updateScrollPosition=function(){var e=this._root,t=e.scrollTop,i=e.scrollLeft;this.rightToLeft&&"rev"==FlexGrid._getRtlMode()&&(i=e.scrollWidth-e.clientWidth-i);var o=new wijmo_1.Point(-Math.abs(i),-t),n=this.columns.getTotalSize();this.rightToLeft&&"rev"!=FlexGrid._getRtlMode()&&(i=-i);if(wijmo_1.isSafari()&&(i<0||n>this._szClient.width&&i+this._szClient.width>n))return!1;if(!this._ptScrl.equals(o)){this._ptScrl=o;this._updateMarquee();this.onScrollPositionChanged();return!0}return!1};FlexGrid.prototype._updateContent=function(e,t){var i=this,o=this._root,n=this.hostElement,r=this.cells.hostElement,l=this._activeCell,s=wijmo_1.getActiveElement(),a=wijmo_1.contains(n,s),d=wijmo_1.closest(s,"."+exports.FlexGridClsNames.hostElement)==n?s:null,u=new wijmo_1.CancelEventArgs;if(this.onUpdatingView(u)){this._setAria("role",this.rows.maxGroupLevel<0?"grid":"treegrid");this._hasValidation=wijmo_1.isFunction(this._itemValidator)||this._cv&&wijmo_1.isFunction(this._cv.getError);var c=!t&&this._errorTip&&this._errorTip._tips.length,h=this._getCssPage(-this._ptScrl.y);if(h!=this._cssPage){this._cssPage=h;this._offsetY=Math.round(this._maxOffsetY*h)}this._updateScrollPosition();this._updateMarquee();var _=0,p=this._hdrVis;p&HeadersVisibility.Row&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Row)&&(_=this.rowHeaders.columns.length);var g=this._gpCells._updateContent(e,t,this._offsetY,_);if(p&HeadersVisibility.Column&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Column)){this._gpCHdr._updateContent(e,t,0,_);this.rightToLeft||(this._eCHdr.scrollLeft=0)}if(p&HeadersVisibility.Row&&(!t||this._ssHdr&p||this.headersFocusability&HeadersFocusability.Row)){this._gpRHdr._updateContent(e,t,this._offsetY);this._eRHdr.scrollTop=0}!p||this.headersFocusability!==HeadersFocusability.All&&t||this._gpTL._updateContent(e,t,0);if(this._gpCFtr.rows.length){this._gpBL._updateContent(e,t,0);this._gpCFtr._updateContent(e,t,0)}switch(this.activePanelType){case CellType.ColumnHeader:g=this._gpCHdr.activeCell;break;case CellType.RowHeader:g=this._gpRHdr.activeCell;break;case CellType.TopLeft:g=this._gpTL.activeCell;break;case CellType.BottomLeft:g=this._gpBL.activeCell;break;case CellType.ColumnFooter:g=this._gpCFtr.activeCell}if(c&&this._errorTip&&this._errorTip._tips.length){clearTimeout(this._toErrorTips);this._toErrorTips=setTimeout((function(){var e=i._errorTip;if(e){e.hide();for(var t=e._tips,o=0;o<t.length;o++){var n=t[o].element;if(!n.offsetHeight||!wijmo_1.hasClass(n,wijmo_1.ControlStateClsNames.invalid)){e.setTooltip(n,null);o--}}}}),40)}if(this._useFrozenDiv()){this._updateFrozenCells(t);g&&wijmo_1.hasClass(g,exports.FlexGridClsNames.frozen)&&(g=null)}this._fCt.style.display=this._fCt.childElementCount?"":"none";this._activeCell=g;if(d)if(d==o||d==this._eFocus||!wijmo_1.contains(n,d)||wijmo_1.contains(r,d)||this.imeEnabled){var f=g!==l;this._setFocus(f)}else{wijmo_1.getActiveElement()!==d&&d.focus();if(wijmo_1.isIE()&&d instanceof HTMLInputElement&&!d.type.match(/checkbox|radio|range/i)){var m=d.selectionStart,w=d.selectionEnd;d.setSelectionRange(m,w)}}!d&&g&&(g.tabIndex=this.isDisabled?-1:this._orgTabIndex);l&&l!=g&&(l.tabIndex=-1);if(this.selectionMode!=SelectionMode.None)this._eFocus.tabIndex=null!=g||this.isDisabled?-1:this._orgTabIndex;else{this._eFocus.tabIndex=-1;this._root.tabIndex=null!=g||this.isDisabled?-1:this._orgTabIndex}a&&this.focus();this._fixScroll();this._rcBounds=null;this._updateMarquee();this.onUpdatedView(u)}};FlexGrid.prototype._fixScroll=function(){var e=this._root;if(!this._updating){var t=this.hostElement,i=e?e.parentElement:null,o=this.rightToLeft;if(t){t.scrollTop&&(t.scrollTop=0);t.scrollLeft&&!o&&(t.scrollLeft=0)}if(i){i.scrollTop&&(i.scrollTop=0);i.scrollLeft&&!o&&(i.scrollLeft=0)}}var n=_getSafariVer();if(e&&n&&14==n.major&&n.minor>=1){e.style.transform="";e.style.transform="translateZ(0)"}};FlexGrid.prototype._clearCells=function(){for(var e in this)if("_"==e[0]){var t=this[e];t instanceof GridPanel&&t._clearCells()}this.invalidate()};FlexGrid.prototype._useFrozenDiv=function(){return wijmo_1.isBoolean(this._fzClone)?this._fzClone:wijmo_1.isIE()||wijmo_1.isFirefox()||wijmo_1.isSafari()||wijmo_1.isMobile()};FlexGrid.prototype._updateFrozenCells=function(e,t){void 0===t&&(t=!1);var i=this._fCt;(t||0===this.rows.frozen&&0===this.columns.frozen)&&wijmo_1.setText(i,null);if(this.rows._frozenInternal||this.columns._frozenInternal){var o=this._eCt.querySelectorAll("."+exports.FlexGridClsNames.frozen);if(e&&i.children.length==o.length){for(var n=0;n<o.length;n++)i.children[n].className=o[n].className;return}wijmo_1.setText(i,null);if(!this.activeEditor){var r=this._errorTip,l=navigator.userAgent.indexOf("MSIE")>=0;for(n=0;n<o.length;n++){var s=o[n];if(wijmo_1.closest(s,"."+exports.FlexGridClsNames.hostElement)==this.hostElement){var a=s[GridPanel._INDEX_KEY],d=s.firstElementChild,u=null;if(a&&d){var c=a.panel,h=this._getBindingColumn(c,a.row,c.columns[a.col]);u=wijmo_1.isFunction(h.cellTemplate)?d.onclick:null}if(l){var _="input[type=checkbox]",p=s.querySelector(_);s=s.cloneNode(!0);if(p){s.querySelector(_).checked=p.checked}}else{s=s.cloneNode(!0);softGridInteropBase()&&a&&s&&this.cellFactory instanceof softGridInteropBase().DirectiveCellFactoryBase&&this.cellFactory.updateCell(this.cells,a.row,a.col,s,this.mergeManager.getMergedRange(this.cells,a.row,a.col));var g=s.getAttribute("top-for-clone"),f=s.getAttribute("left-for-clone");g&&(s.style.top=g+"px");f?this.rightToLeft?s.style.right=f+"px":s.style.left=f+"px":s.style.left=Math.round(parseFloat(s.style.left))+"px"}d=s.firstElementChild;u&&d&&(d.onclick=u);s[GridPanel._INDEX_KEY]=a;if(r){var m=r.getTooltip(o[n]);m&&r.setTooltip(s,m)}i.appendChild(s)}}}}};FlexGrid.prototype._updateMarquee=function(){if(this.activePanelType==CellType.Cell){var e=this._eMarquee,t=this._getMarqueeRect();if(t&&t.width&&t.height){var i=this.cells.hostElement,o=e.firstChild,n=e.offsetWidth-o.offsetWidth,r=e.offsetHeight-o.offsetHeight;wijmo_1.setCss(e,{width:t.width+n,height:t.height+r,top:t.top+i.offsetTop-r/2,left:t.left+i.offsetLeft-n/2,display:""})}else e.style.display="none"}else this._hideMarquee()};FlexGrid.prototype._hideMarquee=function(){var e=this._eMarquee;wijmo_1.setCss(e,{display:"none"})};FlexGrid.prototype._getMarqueeRect=function(){if(!this._shMarquee||!this.selectionMode)return null;var e=this._selHdl.selection;if(!this.isRangeValid(e))return null;e=(e=(e=this.cells._getAdjustedSelection(e)).combine(this.getMergedRange(this.cells,e.topRow,e.leftCol,!1))).combine(this.getMergedRange(this.cells,e.bottomRow,e.rightCol,!1));var t=this.cells.getCellBoundingRect(e.topRow,e.leftCol,!0),i=this.cells.getCellBoundingRect(e.bottomRow,e.rightCol,!0);if(this.rows._frozenInternal){var o=this.rows._frozenInternal>=0?Math.min(this.rows.length,this.rows._frozenInternal):this.rows._lastFrozen,n=this.rows._frozenInternal>=0?this.cells.getCellBoundingRect(o-1,0,!0):this.cells.getCellBoundingRect(o,0,!0);if(this.rows._frozenInternal>=0){e.topRow>=o&&t.top<n.bottom&&(t.top=n.bottom);e.bottomRow>=o&&i.bottom<n.bottom&&(i.height=n.bottom-i.top)}else{e.bottomRow<o&&i.bottom>n.top&&(i.height-=i.bottom-n.top);e.topRow<o&&t.top>n.top&&(t.top=n.top);this.rows.isFrozen(this.rows._firstVisible)&&e.topRow===this.rows._firstVisible&&t.top++;if(wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()){e.bottomRow>=o&&i.top--;e.topRow>=o&&t.top--}}}if(this.columns._frozenInternal){var r=this.columns._frozenInternal>=0?Math.min(this.columns.length,this.columns._frozenInternal):this.columns._lastFrozen;n=this.columns._frozenInternal>=0?this.cells.getCellBoundingRect(0,r-1,!0):this.cells.getCellBoundingRect(0,r,!0);if(this.rightToLeft)if(this.columns._frozenInternal>=0){e.leftCol>=r&&t.right>n.left&&(t.left=n.left-t.width);e.rightCol>=r&&i.left>n.left&&(i.left=n.left)}else{if(e.rightCol<r&&i.left<n.right){i.left=n.right;if(t.right<=n.right){t.left=n.right;t.width=0}}if(e.leftCol<r&&t.right<n.right){t.left=n.right;t.width=0}}else if(this.columns._frozenInternal>=0){e.leftCol>=r&&t.left<n.right&&(t.left=n.right);e.rightCol>=r&&i.right<n.right&&(i.width=n.right-i.left)}else{e.rightCol<r&&i.right>n.left&&(i.left-=i.right-n.left);e.leftCol<r&&t.left>n.left&&(t.left=n.left)}}var l=0;this.columns._frozenInternal<0&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&this.columns.isFrozen(e.rightCol)&&t.right-i.left!=0&&(l=1);return this.rightToLeft?new wijmo_1.Rect(i.left,t.top,t.right-i.left-l,i.bottom-t.top):new wijmo_1.Rect(t.left,t.top,i.right-t.left-l,i.bottom-t.top)};FlexGrid.prototype._bindColumns=function(){for(var e=this.columns,t=0;t<e.length;t++){if(e[t]._getFlag(RowColFlags.AutoGenerated)){e.removeAt(t);t--}}var i=this._cv,o=i?i.items:null;o&&o.length&&this.autoGenerateColumns&&this._getColumnTypes(o).forEach((function(t){var i=new Column(t);i._setFlag(RowColFlags.AutoGenerated,!0);i.name=i.binding;i.header=wijmo_1.toHeaderCase(i.binding);var o=FlexGrid._defTypeWidth[i.dataType];if(null!=o){if(wijmo_1.isString(o)){var n=Math.round(parseFloat(o));o=o.indexOf("*")>-1?n*e.defaultSize:n}wijmo_1.isNumber(o)&&o>0&&(i.width=o)}e.push(i)}));this._updateColumnTypes()};FlexGrid.prototype._getColumnTypes=function(e){return wijmo_1.getTypes(e)};FlexGrid.prototype._updateColumnTypes=function(){var e=this._cv;if(wijmo_1.hasItems(e)){var t=e.items[0];this.columns.forEach((function(e){null==e.dataType&&e._binding&&(e.dataType=wijmo_1.getType(e._binding.getValue(t)))}))}};FlexGrid.prototype._getMapEditor=function(e,t){return t&&t.editor?null!=t.editor.isDroppedDown?t.dataMapEditor:null:!e||!e.dataMap||e instanceof GroupRow?t&&t.dataMap?t.dataMapEditor:null:e.dataMapEditor};FlexGrid.prototype._getBindingColumn=function(e,t,i){return i};FlexGrid.prototype._getBindingColumns=function(){return this.columns};FlexGrid.prototype._getRowsPerItem=function(){return 1};FlexGrid.prototype._isTransposed=function(){return!1};FlexGrid.prototype._getRowHeaderPath=function(){return this._rowHdrPath};FlexGrid.prototype._bindRows=function(){this.rows.clear();var e=this._cv;if(e&&e.items){var t=e.items,i=e.groups;if(this.childItemsPath)for(var o=0;o<t.length;o++)this._addNode(t,o,0);else if(null!=i&&i.length>0&&this.showGroups)for(o=0;o<i.length;o++)this._addGroup(i[o]);else for(o=0;o<t.length;o++)this._addBoundRow(t,o)}};FlexGrid.prototype._addBoundRow=function(e,t){var i=new Row(e[t]),o=this.rows;i._list=o;o[o.length++]=i};FlexGrid.prototype._addGroupRow=function(e){this.rows.push(new GroupRow(e))};FlexGrid.prototype._addNode=function(e,t,i){var o=e[t],n=this.childItemsPath,r=o[wijmo_1.isArray(n)?n[i]:n],l=new GroupRow(o);l.level=i;this.rows.push(l);if(wijmo_1.isArray(r))for(var s=0;s<r.length;s++)this._addNode(r,s,i+1)};FlexGrid.prototype._addGroup=function(e){this._addGroupRow(e);if(e.isBottomLevel)for(var t=e.items,i=0;i<t.length;i++)this._addBoundRow(t,i);else for(i=0;i<e.groups.length;i++)this._addGroup(e.groups[i]);if(this.groupSummaryPosition!=GroupSummaryPosition.Top){var o=e._clone();this._addGroupSummaryRow(o)}};FlexGrid.prototype._addGroupSummaryRow=function(e){var t=new GroupRow(e);t.isSummary=!0;this.rows.push(t)};FlexGrid._getSerializableProperties=function(e){var t=[];for(e=e.prototype;e!=Object.prototype;e=Object.getPrototypeOf(e))for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var n=i[o],r=Object.getOwnPropertyDescriptor(e,n);r&&r.set&&r.get&&"_"!=n[0]&&!n.match(/^(disabled|required|showDropDown)$/)&&t.push(n)}return t};FlexGrid.prototype._hasColumnGroups=function(){return this._grpHdl.hasColumnGroups()};FlexGrid.prototype._getColumnGroup=function(e,t){return this._grpHdl.getColumnGroup(e,t)};FlexGrid.prototype._canMoveColumnGroup=function(e,t,i,o){return this._grpHdl.canMoveColumnGroup(e,t,i,o)};FlexGrid.prototype._moveColumnGroup=function(e,t,i,o,n){return this._grpHdl.moveColumnGroup(e,t,i,o,n)};FlexGrid.prototype._copy=function(e,t){var i=this;if("columns"==e){var o=wijmo_1.asArray(t);if(o.some((function(e){return null!=e.columns})))this.columnGroups=o;else{this.columns.clear();o.forEach((function(e){var t=new Column(e);i.columns.push(t)}))}return!0}return!1};FlexGrid.prototype._isInputElement=function(e){return e instanceof HTMLElement&&!wijmo_1.hasClass(e,wijmo_1.GlyphClsNames.btnGlyph)&&("true"==e.contentEditable||null!=e.tagName.match(/^(INPUT|TEXTAREA|BUTTON|A|SELECT|OPTION)$/i)||e instanceof HTMLSpanElement&&e.parentElement&&null!=e.parentElement.tagName.match(/^(INPUT|TEXTAREA|BUTTON|A|SELECT|OPTION)$/i)&&!wijmo_1.hasClass(e.parentElement,wijmo_1.GlyphClsNames.btnGlyph))};FlexGrid.prototype._isNativeCheckbox=function(e){return e instanceof HTMLInputElement&&"checkbox"==e.type&&!e.disabled&&!e.readOnly&&wijmo_1.hasClass(e,CellFactory._WJC_CHECKBOX)&&wijmo_1.closest(e,"."+exports.FlexGridClsNames.hostElement)==this.hostElement};FlexGrid.prototype._wantsInput=function(e){return this._isInputElement(e)&&!this.activeEditor&&!this._isNativeCheckbox(e)&&!wijmo_1.hasClass(e,exports.FlexGridClsNames.gridIme)&&wijmo_1.contains(document.body,e)};FlexGrid._getMaxSupportedCssHeight=function(){if(!FlexGrid._maxCssHeight){var e=265e5;wijmo_1.isIE()?e=15e5:wijmo_1.isFirefox()&&(e=175e5);FlexGrid._maxCssHeight=e}return FlexGrid._maxCssHeight};FlexGrid._getRtlMode=function(){if(!FlexGrid._rtlMode){var e=wijmo_1.createElement('<div dir="rtl"><div></div></div>');wijmo_1.setCss(e,{visibility:"hidden",width:100,height:100,overflow:"auto"});wijmo_1.setCss(e.firstChild,{width:2e3,height:2e3});document.body.appendChild(e);var t=e.scrollLeft;e.scrollLeft=-1e3;var i=e.scrollLeft;wijmo_1.removeChild(e);FlexGrid._rtlMode=i<0?"neg":t>0?"rev":"std"}return FlexGrid._rtlMode};FlexGrid.prototype.getEmptyRequiredCell=function(e){return this._getEmptyRequiredCell(e)};FlexGrid.prototype._getEmptyRequiredCell=function(e){if(e>=0)for(var t=0;t<this.columns.length;t++){var i=this.getCellData(e,t,!1);if(this.columns[t].visible&&this.columns[t].getIsRequired(this.rows[e])&&(""===i||null==i)){if(!this.columns[t].isReadOnly&&!this.rows[e].isReadOnly)return t;console.warn("Incorrect data. Cell ("+e+", "+t+") is at the same time required, empty and read-only")}}return null};FlexGrid.prototype.adjustFrozenRowColSize=function(e,t,i){var o=t===FrozenRowCol.Column,n=o?this.columns:this.rows,r=o?this.columns._frozenInternal:this.rows._frozenInternal,l=o?this._szClient.width:this._szClient.height;if(!(e<0||e>=n.length)&&n.isFrozen(e)){var s=l-(o?r>=0?this.columns.slice(0,this.columns._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):this.columns.slice(this.columns.length+this.columns._frozenInternal,this.columns.length).reduce((function(e,t){return e+t.renderSize}),0):r>=0?this.rows.slice(0,this.rows._frozenInternal).reduce((function(e,t){return e+t.renderSize}),0):this.rows.slice(this.rows.length+this.rows._frozenInternal,this.rows.length).reduce((function(e,t){return e+t.renderSize}),0))-5,a=n[e].size||n[e].renderSize,d=i>s?a+s:a+i;n[e].size=d}};FlexGrid.prototype._adjustMaxContentWidth=function(){if(0!==this.rows.length&&0!==this.columns.length&&this._maxContent){var e=document.createElement("div");e.style.visibility="hidden";this.hostElement.appendChild(e);for(var t=0,i=1/0,o=new Array(this.columns.length).fill(0),n=0;n<this.columns.length;n++){for(var r=0,l=1/0,s=Math.min(this._contentEstimationLimit,this.rows.length),a=0;a<s;a++){var d=Math.round(a*this.rows.length/s),u=this._getDesiredWidth(this.cells,d,n,e);r=Math.max(r,u);l=Math.min(l,u)}o[n]=r;t+=r;i=Math.min(i,l)}this.hostElement.removeChild(e);var c=window.innerWidth,h=this.hostElement.parentElement?this.hostElement.parentElement.offsetWidth:c,_=window.getComputedStyle(this.hostElement),p=this.hostElement.getBoundingClientRect();_.minWidth.includes("content")&&(this.hostElement.style.minWidth=Math.min.apply(Math,o)+"px");"min-content"===_.maxWidth?this.hostElement.style.maxWidth=i+"px":"fit-content"===_.maxWidth||"max-content"===_.maxWidth?this.hostElement.style.maxWidth=t>h?h+"px":t+"px":this.hostElement.style.width=t>p.width?"100%":"";this.hostElement.parentElement.style.overflowX=t>c||t>h?"auto":"hidden";var g=window.innerHeight-(p.top+window.pageYOffset)-50;this.hostElement.style.maxHeight=g+"px"}};FlexGrid.prototype._isAllCellsSelected=function(){var e=this.selection;return 1===this.selectedRanges.length&&this.columns.length===e.columnSpan&&this.rows.length===e.rowSpan};FlexGrid.prototype._canResizeAllCellsWithoutCtrl=function(){return this._canOverRuleCtrlPress&&this.selectionMode===SelectionMode.MultiRange};FlexGrid.prototype._handleScrollEnd=function(){var e=this;null!==this._scrollEndTimer&&clearTimeout(this._scrollEndTimer);this._scrollEndTimer=window.setTimeout((function(){e._updateStickyHeaders()}),75)};FlexGrid.prototype._updateLayoutOnPin=function(){var e=this._root,t=this._hdrVis&HeadersVisibility.Row?this._hdrCols.getTotalSize():0,i=this._hdrVis&HeadersVisibility.Column?this._hdrRows.getTotalSize():0,o=e.offsetWidth-e.clientWidth,n=e.offsetHeight-e.clientHeight,r=e.offsetWidth-t-o,l=e.offsetHeight-i-n,s=e.scrollTop,a=Math.abs(e.scrollLeft),d=this.cells.height-l,u=this.cells.width-r;s>d&&e.scrollTo({top:d,left:a});a>u&&e.scrollTo({top:s,left:this.rightToLeft?-u:u})};FlexGrid.prototype._hasScroll=function(e,t){void 0===t&&(t=0);if(e.length&&e._frozenInternal&&e._frozenInternal<0){if(e instanceof ColumnCollection)return e.lastFrozen.pos+t>this._szClient.width+e.lastFrozen._antipos;if(e instanceof RowCollection)return e.lastFrozen.pos+t>this._szClient.height+e.lastFrozen._antipos}return!1};FlexGrid.prototype._alignTheTail=function(e){if(e._frozenInternal&&e._frozenInternal<0&&e._lastFrozen>0){var t=e[e._lastFrozen-1],i=t.pos+t.renderSize,o=this.scrollPosition;if(e instanceof ColumnCollection){var n=this._szClient.width+e.lastFrozen._antipos;if(i+this._ptScrl.x<n){var r=n-i-this._ptScrl.x;o.x+=r;this.scrollPosition=o}}else if(e instanceof RowCollection){n=this._szClient.height+e.lastFrozen._antipos;if(i+this._ptScrl.y<n){r=n-i-this._ptScrl.y;o.y+=r;this.scrollPosition=o}}}};FlexGrid.prototype._getRangesToResize=function(e,t,i){var o,n,r=i,l=this._getResizingInfo(t,e),s=l.isRowResizing,a=l.isColResizing,d=l.rangeBeingResized;o=this.selection.containsColumn(d.col);n=this.selection.containsRow(d.row);(a&&!o||s&&!n)&&(r=[d]);return r};FlexGrid.prototype._getResizingInfo=function(e,t){var i=this._mouseHdl,o={isRowResizing:i._szRowCol instanceof Row,isColResizing:i._szRowCol instanceof Column,rangeBeingResized:null};if(e){var n=this.hitTest(t);o.isRowResizing=n.edgeBottom;o.isColResizing=n.edgeRight;o.rangeBeingResized=n.range}else i._szArgs&&(o.rangeBeingResized=i._szArgs.range);return o};FlexGrid.prototype._handleRowColResizing=function(e,t){if(-1==t.row){if(!e.columns.isFrozen(t.col)||!t.data||!t.data.isPrimaryDragged)return;var i=t.getColumn(),o=(l=e.columns.getFrozenSize())-i.renderWidth+t.data.newSize,n=t.data.newSize>i.renderWidth,r=e.clientSize.width;if(o+FlexGrid._MAX_FROZEN_GAP_LIMIT>r&&n){t.data.maxSize=r-l+i.renderWidth;t.data.internalCancel=!0}}else{if(!e.rows.isFrozen(t.row)||!t.data||!t.data.isPrimaryDragged)return;var l,s=t.getRow(),a=(o=(l=e.rows.getFrozenSize())-s.renderHeight+t.data.newSize,n=t.data.newSize>s.renderHeight,e.clientSize.height);if(o+FlexGrid._MAX_FROZEN_GAP_LIMIT>a&&n){t.data.maxSize=a-l+s.renderHeight;t.data.internalCancel=!0}}};FlexGrid.prototype._getRowColResizedHandler=function(e,t){var i=this,o=new Set;return t?function(t,i){if(i.data){if(i.data.isPrimaryDragged){o.clear();queueMicrotask((function(){var t=e.rows.getFrozenSize(),i=Array.from(o).filter((function(t){return e.rows.isFrozen(t)}));if(t+FlexGrid._MAX_FROZEN_GAP_LIMIT>e.clientSize.height&&i.length>0){var n=t-i.reduce((function(t,i){return t+e.rows[i].renderHeight}),0),r=e.clientSize.height-n-2,l=Math.floor(r/i.length);e.rows.deferUpdate((function(){i.forEach((function(t){e.rows[t].height=l}))}))}}))}o.add(i.row)}}:function(t,n){if(n.data){if(n.data.isPrimaryDragged){o.clear();queueMicrotask((function(){var t=e.columns.getFrozenSize(),n=Array.from(o).filter((function(t){return e.columns.isFrozen(t)}));if(t+FlexGrid._MAX_FROZEN_GAP_LIMIT>e.clientSize.width&&n.length>0){var r=t-n.reduce((function(t,i){return t+e.columns[i].renderWidth}),0),l=e.clientSize.width-r-2,s=Math.floor(l/n.length);e.columns.deferUpdate((function(){n.forEach((function(t){e.columns[t].width=s}))}))}0==e.columns.getTotalSize()&&(i._invalidateTimer=setTimeout((function(){e.invalidate();i._invalidateTimer=null}),wijmo_1.Control._REFRESH_INTERVAL))}))}o.add(n.col)}}};FlexGrid.prototype._isFrozenObjectAllowed=function(){var e=this,t=!1;"flexgrid,wjflexgrid".split(",").forEach((function(i){e.constructor.name.toLowerCase().startsWith(i)&&(t=!0)}));return t};FlexGrid.prototype._isFlexSheetInstance=function(){return"flexsheet,wjflexsheet".split(",").indexOf(this.constructor.name.toLowerCase())>-1};FlexGrid.prototype._isServerCollectionView=function(e,t){t||(t=this);return softRestCV()&&t.collectionView instanceof softRestCV().RestCollectionView||softODataCV()&&t.collectionView instanceof softODataCV().ODataCollectionView};FlexGrid.prototype._updateAriaRowCount=function(){var e=this._gridRoleElement();if(e){var t=this.columnHeaders.rows.visibleLength,i=this.rows.visibleLength,o=this.columnFooters.rows.visibleLength;null!=t&&null!=i&&null!=o?this._setAria("aria-rowcount",t+i+o):e.removeAttribute("aria-rowcount")}};FlexGrid.prototype._updateAriaColumnCount=function(){var e=this._gridRoleElement();if(e){var t=this.rowHeaders.columns.visibleLength,i=this.columns.visibleLength;null!=t&&null!=i?this._setAria("aria-colcount",t+i):e.removeAttribute("aria-colcount")}};FlexGrid.prototype._ensureEditSelectionForParentGrid=function(){var e=wijmo_1.closest(this.hostElement,"."+exports.FlexGridClsNames.cell);if(e&&e[exports.FlexGridClsNames.cellIndex]){var t=e[exports.FlexGridClsNames.cellIndex],i=t.panel.grid,o=!1;if(i.editRange){i.finishEditing();o=!0}if(!i.selection||!i.selection.contains(t.row,t.col)){i._selHdl._adjustSelection(new CellRange(t.row,t.col),i.selectionMode);o=!0}o&&i.refresh()}};FlexGrid.prototype._createHelperContainer=function(){this._helperContainer=wijmo_1.createElement('<div wj-part="helper-container"><div wj-part="sr-message-helper" tabindex="-1" role="status" aria-live="polite" aria-atomic="true"></div><div wj-part="focus" class="'+exports.FlexGridClsNames.cell+'">0</div></div>',this.hostElement);this._imeContainer=wijmo_1.createElement('<div wj-part="ime-container"></div>',this.hostElement);this._srMessageHelper=this._helperContainer.querySelector('[wj-part="sr-message-helper"]');this._eFocus=this._helperContainer.querySelector('[wj-part="focus"]');wijmo_1.setCss(this._helperContainer,{position:"absolute",left:"-9999px",top:"0",width:"1px",height:"1px",overflow:"hidden"});wijmo_1.setCss(this._eFocus,{position:"fixed",left:"-32000px"});wijmo_1.setCss(this._imeContainer,{position:"absolute",left:"0",top:"0",width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"})};FlexGrid.prototype._gridRoleElement=function(){return this._mainContainer?this._mainContainer:this.hostElement};FlexGrid.prototype._modifyRole=function(e,t,i){i?e.removeAttribute("role"):e.getAttribute("role")||e.setAttribute("role",t)};FlexGrid.prototype._handleRefreshForA11y=function(){var e=this._eCHdr.querySelector('[role="row"]>[role="columnheader"]'),t=this._root.querySelector('[role="row"]>[role="gridcell"]');this._modifyRole(this._eCHdr,"rowgroup",!e);this._modifyRole(this._root,"rowgroup",!t)};FlexGrid.prototype.announceShortcut=function(e){var t=this._srMessageHelper;t&&(t.textContent=e)};FlexGrid.prototype.destroyScreenReaderShortCutNotifier=function(){this._srMessageHelper&&this._srMessageHelper.remove();this._srMessageHelper=null};FlexGrid.prototype.onRowColSelected=function(e){this.rowColSelected.raise(this,e)};FlexGrid.prototype.isAddingInvalidNewRow=function(e){var t=!this.rows[e]||this.rows[e]&&Object.getPrototypeOf(this.rows[e])!==Row.prototype?null:this.getEmptyRequiredCell(e),i=this.editableCollectionView;return this._getHasValidation()&&this.validateEdits&&null!==t&&i.currentAddItem};FlexGrid._WJS_STICKY=wijmo_1.ControlStateClsNames.sticky;FlexGrid._WJS_MEASURE=wijmo_1.ControlStateClsNames.measuring;FlexGrid._WJS_UPDATING=wijmo_1.ControlStateClsNames.updating;FlexGrid._WJS_WSPRE=exports.FlexGridClsNames.whiteSpacePre;FlexGrid._MIN_VIRT_ROWS=200;FlexGrid._RESIZE_SCRL_GAP=5;FlexGrid._MAX_FROZEN_GAP_LIMIT=2;FlexGrid._FLEXGRID_COUNT=1;FlexGrid._defTypeWidth=((_a={})[wijmo_1.DataType.Number]="0.714285714*",_a);FlexGrid._ctrlTemplate="";return FlexGrid}(wijmo_1.Control);exports.FlexGrid=FlexGrid;var AllowMerging,_ImeHandler=function(){function _ImeHandler(e){var t=this;this._updateImeFocusAsyncBnd=this._updateImeFocusAsync.bind(this);this._cmpstartBnd=this._compositionstart.bind(this);this._keypressBnd=this._keypress.bind(this);this._suspended=!1;this._handlingCompositionStart=!1;this._g=e;var i=wijmo_1.createElement('<textarea class="'+exports.FlexGridClsNames.gridEditor+" "+wijmo_1.InputFormElementsClsNames.formControl+" "+exports.FlexGridClsNames.gridIme+'"/>');wijmo_1.setCss(i,_ImeHandler._cssHidden);wijmo_1.disableAutoComplete(i);i.tabIndex=-1;wijmo_1.setAttribute(i,"aria-label",wijmo_1.culture.FlexGrid.ariaLabels.IMEInput);this._tbx=i;this._suspended=!1;this._maskProvider=new wijmo_1._MaskProvider(i);e._imeContainer.appendChild(i);this._updateImeFocus();var o=e.hostElement,n=e.addEventListener.bind(e),r=this._updateImeFocusAsyncBnd;n(o,"blur",r,!0);n(o,"focus",r,!0);n(i,"compositionstart",this._cmpstartBnd);wijmo_1.isiOS()&&n(o,"keypress",this._keypressBnd);e.selectionChanged.addHandler(r,this);e.cellEditEnded.addHandler(this._cellEditEnded,this);e.cellEditEnding.addHandler(this._cellEditEnding,this);n(o,"mousedown",(function(t){var i=wijmo_1.closest(wijmo_1.getActiveElement(),"."+exports.FlexGridClsNames.hostElement)==e.hostElement,o=e.hitTest(t);i&&o.panel==e.cells&&wijmo_1.hasClass(o.target,exports.FlexGridClsNames.cell)&&(e.isReadOnly||t.preventDefault())}));e.gotFocus.addHandler((function(){return t._updateImeFocus()}))}_ImeHandler.prototype.dispose=function(){var e=this._g,t=e.hostElement,i=this._tbx,o=e.removeEventListener.bind(e),n=this._updateImeFocusAsyncBnd;o(t,"blur",n);o(t,"focus",n);o(t,"keypress",this._keypressBnd);o(i,"compositionstart",this._cmpstartBnd);e.selectionChanged.removeHandler(n);e.cellEditEnded.removeHandler(this._cellEditEnded);e.cellEditEnding.removeHandler(this._cellEditEnding);if(this._setValueInSafariTimer){clearTimeout(this._setValueInSafariTimer);this._setValueInSafariTimer=null}if(this._aeFocusTimer){clearTimeout(this._aeFocusTimer);this._aeFocusTimer=null}if(this._tbxFocusTimer){clearTimeout(this._tbxFocusTimer);this._tbxFocusTimer=null}if(this._toFocus){clearTimeout(this._toFocus);this._toFocus=null}wijmo_1.removeChild(i);this._suspended=!1};_ImeHandler.prototype._compositionstart=function(e){var t=this,i=this._g;if(!i.activeEditor){var o=i._selHdl.selection;this._handlingCompositionStart=!0;var n=i.startEditing(!1,o.row,o.col,!1,e);this._handlingCompositionStart=!1;if(n){if(i.activeEditor&&"checkbox"!=i.activeEditor.type){o=i.editRange;var r=i._getBindingColumn(i.cells,o.row,i.columns[o.col]),l=r&&r._edt,s=i.activeEditor,a=this._tbx,d=i.getCellBoundingRect(o.row,o.col),u=i.cells.getCellElement(o.row,o.col);d.width=u.offsetWidth;d.height=u.offsetHeight;var c=u.getBoundingClientRect(),h=i._imeContainer.getBoundingClientRect(),_=c.left-h.left,p=c.top-h.top,g=u.querySelector("."+wijmo_1.InputFormElementsClsNames.btn+"."+wijmo_1.UtilitesClsNames.right);g&&(d.width-=g.offsetWidth);"minLength,maxLength,pattern".split(",").forEach((function(e){wijmo_1.setAttribute(a,e,s.getAttribute(e))}));var f=s instanceof HTMLTextAreaElement;wijmo_1.setAttribute(a,"wrap",f?"soft":"off");var m=getComputedStyle(u),w=m.paddingTop;if(o.rowSpan>1&&!f){var C=parseFloat(m.lineHeight);Number.isNaN(C)&&(C=1.2*parseFloat(m.fontSize));w=Math.max(0,(d.height-C)/2)+"px"}var v={position:"absolute",left:_,top:p,width:d.width-1,height:d.height-1,paddingTop:w,paddingLeft:m.paddingLeft,paddingRight:m.paddingRight,textAlign:m.textAlign,zIndex:u.style.zIndex};if(i.rightToLeft){v.right=parseInt(u.style.right)+parseInt(i.cells.hostElement.style.right);v.left=""}wijmo_1.setCss(a,v);if(l){var y=l._tbx.getBoundingClientRect(),b=a.getBoundingClientRect(),R=window.getComputedStyle(a),x=parseFloat(R.left),S=parseFloat(R.right),E=parseFloat(R.top);i.rightToLeft?wijmo_1.setCss(a,{right:S+b.right-y.right+"px",top:E+y.top-b.top+"px",width:y.width+"px",height:y.height+"px"}):wijmo_1.setCss(a,{left:x+y.left-b.left+"px",top:E+y.top-b.top+"px",width:y.width+"px",height:y.height+"px"})}i._edtHdl._edt=a;a.select();var j=s.value;if(wijmo_1.isSafari()){" "!=a.value&&" "!=a.value||(a.value=j);wijmo_1.setSelectionRange(a,a.value.length)}else this._setValueInSafariTimer=setTimeout((function(){" "!=a.value&&" "!=a.value||(a.value=j);wijmo_1.setSelectionRange(a,a.value.length)}),20);wijmo_1.Control.sharedState.InvalidScroll=wijmo_1.isEdge();a.placeholder=s.placeholder;s.placeholder="";s.value=""}}else{this._tbx.blur();this._tbxFocusTimer=setTimeout((function(){t._tbx.focus();i._setFocusNoScroll(i.hostElement)}),20)}}};_ImeHandler.prototype._cellEditEnding=function(){var e=this._maskProvider;e&&e.mask&&e._valueChanged()};_ImeHandler.prototype._cellEditEnded=function(){var e=this._tbx,t=this._g;if(this._enableIme()){var i=wijmo_1.getActiveElement();i.blur();if(t._isScrollingByWheel)this._aeFocusTimer=setTimeout((function(){i.focus();t._setFocusNoScroll(t.hostElement);e.value="";i.focus()}),20);else{i.focus();t._setFocusNoScroll(t.hostElement);i.focus()}e.value="";wijmo_1.setCss(e,_ImeHandler._cssHidden);this._updateImeFocus()}};_ImeHandler.prototype._keypress=function(e){if(!e.defaultPrevented&&e.target==this._tbx&&!(e.ctrlKey||e.altKey||e.metaKey||27==e.keyCode||this._g.activeEditor)){this._tbx.value="";this._compositionstart(e);e.stopPropagation()}};_ImeHandler.prototype._updateImeFocus=function(){var e=this._g,t=this._tbx,i=wijmo_1.getActiveElement(),o=e._getTabIndex();if(e.activeEditor||wijmo_1.closest(i,"."+exports.FlexGridClsNames.hostElement)!=e.hostElement)(e.isDisabled||o<0)&&t.tabIndex>=0&&(t.tabIndex=-1);else if(this._enableIme()&&!e._wantsInput(i)){if(i!=t){e.activeCell&&(e.activeCell.tabIndex=-1);t.tabIndex=o;t.disabled=!1;t.value="";this._showCellMessageForScreenReader();if(!e.isTouching)if(window&&window.top!=window.self){wijmo_1.setSelectionRange(t,0,0,!1);e._setFocusNoScroll(t)}else{wijmo_1.setSelectionRange(t,0);t.focus()}}var n=e._selHdl.selection,r=n.isValid?e._getBindingColumn(e.cells,n.row,e.columns[n.col]):null;this._maskProvider.mask=r?r.mask:null}else{t.tabIndex=-1;t.disabled=!0;t.value="";if(i==t){t.blur();var l=e.activeCell;if(l){l.tabIndex=o;l.focus()}else e.focus()}}};_ImeHandler.prototype._updateImeFocusAsync=function(){var e=this;this._toFocus&&clearTimeout(this._toFocus);this._toFocus=setTimeout((function(){e._toFocus=null;e._updateImeFocus()}),100)};_ImeHandler.prototype._resetTabIndex=function(){this._tbx.tabIndex=-1};_ImeHandler.prototype._suspendIME=function(){this._suspended=!0};_ImeHandler.prototype._resumeIME=function(){this._suspended=!1};_ImeHandler.prototype._enableIme=function(){var e=this._g,t=e._selHdl.selection;if(this._suspended)return!1;if(!e.canEditCell(t.row,t.col))return!1;var i=t.isValid?e._getBindingColumn(e.cells,t.row,e.columns[t.col]):null;return!(!i||i.dataType==wijmo_1.DataType.Boolean)&&!(i&&i.dataMap&&i.dataMapEditor==DataMapEditor.RadioButtons||i.dataMapEditor==DataMapEditor.Menu)};_ImeHandler.prototype._showCellMessageForScreenReader=function(){var e=this,t=wijmo_1.getActiveElement();if(t&&t!==this._tbx){var i=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.imeHandler.focusImeCell,o=t.parentElement.getAttribute("aria-rowindex"),n=t.getAttribute("aria-colindex"),r="",l="";if(t.id){var s=t.id.split("-"),a=Number(s[s.length-1]);!Number.isNaN(a)&&this._g.columnHeaders.columns[a]&&this._g.columnHeaders.rows.forEach((function(t,i){0!==i&&(r+=" ");var o=e._g.columnHeaders.getCellData(i,a,!1);wijmo_1.isNullOrUndefined(o)&&(o="");r+=o}));var d=Number(s[s.length-2]);!Number.isNaN(d)&&this._g.rowHeaders.rows[d]&&this._g.rowHeaders.columns.forEach((function(t,i){0!==i&&(l+=" ");var o=e._g.rowHeaders.getCellData(d,i,!1);wijmo_1.isNullOrUndefined(o)&&(o="");l+=o}))}i=wijmo_1.format(i,{value:t.textContent,rowIndex:o,colIndex:n,colName:r,rowName:l});this._g.announceShortcut(i)}};_ImeHandler._cssHidden={position:"fixed",width:"0px",left:-32e3,top:-32e3,overflow:"hidden"};return _ImeHandler}();exports._ImeHandler=_ImeHandler;!function(e){e[e.None=0]="None";e[e.Cells=1]="Cells";e[e.ColumnHeaders=2]="ColumnHeaders";e[e.RowHeaders=4]="RowHeaders";e[e.AllHeaders=6]="AllHeaders";e[e.All=7]="All"}(AllowMerging=exports.AllowMerging||(exports.AllowMerging={}));var MergeManager=function(){function MergeManager(e){null!=e&&console.error('** WARNING: the "grid" parameter has been deprecated. Please remove it.')}MergeManager.prototype.getMergedRange=function(e,t,i,o){void 0===o&&(o=!0);return this._getMergedRange(e,t,i,o)};MergeManager.prototype._getMergedRange=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!0);var r,l=e.grid,s=e.cellType,a=e.columns,d=e.rows,u=d[t],c=a[i];if(u instanceof _NewRowTemplate)return null;if(!(u instanceof Row&&c instanceof Column))return null;if(e==l.columnHeaders){var h=l._getColumnGroup(t,i);if(h){var _=h._rng,p=e.columns;if(p.isFrozen(_.col)!=p.isFrozen(_.col2)){_=_.clone();p.isFrozen(i)?p._frozenInternal>0?_.col2=p._frozenInternal-1:_.col=p.length+p._frozenInternal:p._frozenInternal>0?_.col=p._frozenInternal:_.col2=p.length+p._frozenInternal-1}return _}}if(l.showGroups&&!l.childItemsPath&&u instanceof GroupRow&&u.dataItem instanceof wijmo_1.CollectionViewGroup&&s==CellType.Cell){_=new CellRange(t,i);if(c.aggregate==wijmo_1.Aggregate.None){for(var g=a._frozenInternal>=0?a._frozenInternal:a.length+a._frozenInternal;_.col>0&&a[_.col-1].aggregate==wijmo_1.Aggregate.None&&_.col!=g;)_.col--;for(;_.col2<a.length-1&&a[_.col2+1].aggregate==wijmo_1.Aggregate.None&&_.col2+1!=g;)_.col2++}for(;_.col<i&&!a[_.col].visible;)_.col++;return _.isSingleCell?null:_}var f=!1,m=AllowMerging,w=CellType;switch(l.allowMerging){case m.None:f=!0;break;case m.Cells:f=s!=w.Cell;break;case m.ColumnHeaders:f=s!=w.ColumnHeader&&s!=w.TopLeft;break;case m.RowHeaders:f=s!=w.RowHeader&&s!=w.TopLeft;break;case m.AllHeaders:f=s==w.Cell}if(f)return null;if(s==w.Cell){var C=l.editableCollectionView,v=C?C.currentAddItem:null;if(v&&u.dataItem==v)return null}var y=e.grid.editableCollectionView;r=y?y.currentAddItem:null;if(a[i].allowMerging){_=new CellRange(t,i);var b=e._vrb,R=0,x=d.length-1;if(t>=d._frozenInternal){if(o&&(s==CellType.Cell||s==CellType.RowHeader)&&l._vtRows<d.length&&b){R=b.topRow;x=b.bottomRow}}else d.length>d._frozenInternal&&(x=d._frozenInternal-1);for(var S=e._getCellData(t,i,n),E=t-1;E>=R&&this._mergeCell(e,t,i,E,i,r,n,S);E--)_.row=E;for(var j=t+1;j<=x&&this._mergeCell(e,t,i,j,i,r,n,S);j++)_.row2=j;for(;_.row<t&&!d[_.row].visible;)_.row++;if(!_.isSingleCell)return _}if(d[t].allowMerging){_=new CellRange(t,i),b=e._vrb;var H=0,F=a.length-1;if(i>=a._frozenInternal){if(o&&(s==CellType.Cell||s==CellType.ColumnHeader)&&l._vtCols<a.length&&b){H=b.leftCol;F=b.rightCol}}else F=a._frozenInternal-1;S=e._getCellData(t,i,n);for(var z=i-1;z>=H&&this._mergeCell(e,t,i,t,z,r,n,S);z--)_.col=z;for(var T=i+1;T<=F&&this._mergeCell(e,t,i,t,T,r,n,S);T++)_.col2=T;for(;_.col<i&&!a[_.col].visible;)_.col++;if(!_.isSingleCell)return _}return null};MergeManager.prototype._mergeCell=function(e,t,i,o,n,r,l,s){void 0===l&&(l=!0);void 0===s&&(s=null);var a=e.rows[t],d=e.rows[o];if(!a||!d)return!1;if(a instanceof GroupRow||a instanceof _NewRowTemplate||d instanceof GroupRow||d instanceof _NewRowTemplate)return!1;if(r&&(a.dataItem==r||d.dataItem==r))return!1;if(t!=o&&e.rows.isFrozen(t)!=e.rows.isFrozen(o))return!1;if(i!=n&&e.columns.isFrozen(i)!=e.columns.isFrozen(n))return!1;if(t!=o){if(i>0&&(a.allowMerging&&this._mergeCell(e,t,i-1,t,i,r,l)||d.allowMerging&&this._mergeCell(e,o,i-1,o,i,r,l)))return!1;if(n<e.columns.length-1&&(a.allowMerging&&this._mergeCell(e,t,n,t,n+1,r,l)||d.allowMerging&&this._mergeCell(e,o,n,o,n+1,r,l)))return!1}var u=e._getCellData(o,n,l);null==s&&(s=e._getCellData(t,i,l));return!!(s==u||wijmo_1.isDate(s)&&wijmo_1.DateTime.equals(s,u))};return MergeManager}();exports.MergeManager=MergeManager;function toggleColumnPinning(e,t,i,o,n){var r=e.columns,l=r._frozenInternal,s=e.allowPinning;o&&s==AllowPinning.Both&&(s=n?AllowPinning.ColumnRange:AllowPinning.SingleColumn);var a=!r.isFrozen(t),d=l>=0?l:r._lastFrozen-1,u=l>=0?1:-1,c=a?t===d:t===d-u,h=e.rowHeaders.columns.length,_=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,p=e.getColumn(t).header,g=a?_.pin.pinColumnName:_.pin.unpinColumnName,f=new CellRangeEventArgs(e.cells,new CellRange(i,t));if(e.onPinningColumn(f)){var m=r._frozenInternal>=0?new Set(r.slice(0,r._frozenInternal).map((function(e,t){return t}))):new Set(r.slice(r.length+r._frozenInternal).map((function(e,t){return t+r.length+r._frozenInternal})));if(s==AllowPinning.SingleColumn){m.has(t)?m.delete(t):m.add(t);_resizeColumns(e,m);if(c)r._frozenInternal=a?r._frozenInternal+u:r._frozenInternal-u;else if(e._hasColumnGroups()){var w=e._getColumnGroup(i,t);e._canMoveColumnGroup(i,t,0,d)||w&&w._ownerList&&w._ownerList.owner&&w._ownerList.owner.collapseTo&&(w._ownerList.owner.collapseTo="");var C=w._ownerList.length>1?i:Math.max(i-1,0);if(r.isFrozen(t)){if(!C||!c||C&&e._getColumnGroup(i-1,t)!=e._getColumnGroup(i-1,t+1)){var v=l>=0?l:r._lastFrozen;e._moveColumnGroup(C,t,0,v,!1)}r._frozenInternal-=u}else{e._moveColumnGroup(C,t,0,d,!1);r._frozenInternal+=u}}else if(r.isFrozen(t)){g=_.pin.unpinColumnName;r.moveElement(t,d-u,!1);r._frozenInternal-=u}else{g=_.pin.pinColumnName;r.moveElement(t,d,!1);r._frozenInternal+=u}}if(s==AllowPinning.ColumnRange){if(r._frozenInternal>=0)for(var y=0;y<=t;y++)m.add(y);else if(r._frozenInternal<0)for(y=t;y<r.length;y++)m.add(y);_resizeColumns(e,m);if(t+1!=l&&r._frozenInternal>=0){r.frozen=t+1;g=_.pin.pinColumnIndex}else if(-(r.length-t)!=l&&r._frozenInternal<0){r._frozenInternal=-(r.length-t);g=_.pin.pinColumnIndex}else{r._frozenInternal=0;g=_.pin.unpin}}e._updateLayoutOnPin();e.onPinnedColumn(f);g=wijmo_1.format(g,{name:p,colIndex:t+h+1});e.announceShortcut(g)}}exports.toggleColumnPinning=toggleColumnPinning;function _resizeColumns(e,t){var i=e.columns;if(Array.from(t).reduce((function(e,t){return e+i[t].renderSize}),0)+5>e._szClient.width){var o=Array.from(t).sort((function(e,t){return e-t})),n=e._szClient.width-5*o.length;e.columns.length<=t.size&&(n=e._szClient.width);var r=Math.round(n/o.length);o.forEach((function(e){i[e].width=r}))}e.invalidate()}function toggleColumnSort(e,t,i,o,n,r,l){var s=e,a=s.allowSorting,d=s.collectionView,u=d?d.sortDescriptions:null;if(d&&d.canSort&&a!=AllowSorting.None){var c=t.columns[i],h=s._getBindingColumn(t,o,c),_=h?h._getBindingSort():null;if(h.allowSorting&&_){if(c&&h&&c._uid==h._uid){var p=s.getMergedRange(t,o,i,!1);if(p&&p.columnSpan>1)return}var g=new CellRangeEventArgs(t,new CellRange(o,i),n),f=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,m="";if(s.onSortingColumn(g)){s._edtHdl._commitRowEdits();for(var w=-1,C=null,v=0;v<u.length;v++)if(u[v].property==_){w=v;C=u[v];break}u.deferUpdate((function(){if(r&&l){u.clear();m=f.sort.clearSort}else if(C){var e=null!=h.sortOrder?h.sortOrder:s.sortOrder;if(r||C.ascending&&(e===SortOrder.DescAscNone||s.isTouching&&e===SortOrder.DescAsc)||!C.ascending&&(e===SortOrder.AscDescNone||s.isTouching&&e===SortOrder.AscDesc)){u.removeAt(w);m=f.sort.clearSort}else{t=!C.ascending;u[w]=new wijmo_1.SortDescription(_,t);m=t?f.sort.sortAscending:f.sort.sortDescending}}else{if(a!=AllowSorting.MultiColumn){u.clear();m=f.sort.clearSort}var t=null==h.sortOrder?s.sortOrder==SortOrder.AscDesc||s.sortOrder==SortOrder.AscDescNone:h.sortOrder==SortOrder.AscDesc||h.sortOrder==SortOrder.AscDescNone,i=new wijmo_1.SortDescription(_,t);u.push(i);m=t?f.sort.sortAscending:f.sort.sortDescending}}));m=wijmo_1.format(m,{name:c.header});s.announceShortcut(m);s.onSortedColumn(g)}}}}exports.toggleColumnSort=toggleColumnSort;var _MASK_PROVIDER="$WJ-MSKP",CellFactory=function(){function CellFactory(){}CellFactory.prototype.updateCell=function(e,t,i,o,n,r){var l;o.style.cssText="";var s=e.grid,a=s.rightToLeft,d=e.rows,u=e.columns,c=d[t],h=u[i],_=t,p=i,g=c instanceof GroupRow?c:null,f=!!g&&g.isSummary,m=g&&(s.groupSummaryPosition===GroupSummaryPosition.Bottom||s.groupSummaryPosition===GroupSummaryPosition.Auto&&!g.isCollapsed),w=c instanceof _NewRowTemplate?c:null,C=!!(softDetailRow()&&c instanceof softDetailRow().DetailRow),v=h.renderWidth,y=c.renderHeight,b=e.cellType,R=exports.FlexGridClsNames.cell,x="",S={display:""},E=CellType,j=0,H=0,F=!0;g&&i!=u.firstVisibleIndex?!f&&m&&(F=!1):f&&i==u.firstVisibleIndex&&(F=!1);0!=r&&o.firstElementChild&&(1==o.childNodes.length&&"checkbox"==o.firstElementChild.type||(o.textContent=""));if(s._useFrozenDiv()){o.getAttribute("left-for-clone")&&o.removeAttribute("left-for-clone");o.getAttribute("top-for-clone")&&o.removeAttribute("top-for-clone");if(u.isFrozen(i)&&u._frozenInternal<0){var z=s._szClient.width+h._antipos;(H=z<=h.pos?z:0)&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&H--;H&&wijmo_1.setAttribute(o,"left-for-clone",H)}if(d.isFrozen(t)&&d._frozenInternal<0){var T=s._szClient.height+c._antipos;(j=T<=c.pos?T:0)&&wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&j--;j!=Math.floor(j)&&(j=Math.round(j));if(j){s.columnFooters.rows.length>0&&(j-=s.columnFooters.height);wijmo_1.setAttribute(o,"top-for-clone",j)}}}if(n&&!n.isSingleCell){t=n.row;i=n.col;_=n.row2;p=n.col2;c=d[t];h=u[i];g=c instanceof GroupRow?c:null;y=(q=n.getRenderSize(e)).height;v=q.width}var M,G,I,P,A,D,L=s._getBindingColumn(e,t,h),O=L?L.dataType:c?c.dataType:void 0;I=b==E.RowHeader||b==E.Cell&&(!g||s.childItemsPath);D=L&&L.isContentHtml||c&&c.isContentHtml;G=b==E.Cell?s._getMapEditor(c,L):null;M=null;L&&(M=L.dataMap);null==M&&c&&(M=c.dataMap);P=I&&G==DataMapEditor.RadioButtons;A=O==wijmo_1.DataType.Boolean&&!M;var N=I&&G==DataMapEditor.Menu,V=h.pos,k=c.pos,B=s._ptScrl,W=d.length>d.frozenEnd,K=u.length>u.frozenEnd;if(s._useFrozenDiv()&&b==E.Cell&&!s.editRange)u.isFrozen(i)&&!d.isFrozen(_)?k+=B.y:d.isFrozen(t)&&!u.isFrozen(p)&&(V+=B.x);else{var q=s._szClient;if(d.isFrozen(_))if(d._frozenInternal>=0){k=Math.min(k,q.height);y=Math.min(y,Math.max(0,q.height-k));k-=B.y}else{k=Math.min(c.pos,q.height+c._antipos);d.isFrozen(d._firstVisible)||(k-=B.y);wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&W&&(k-=1)}if(u.isFrozen(p)&&!C){var U=0!=q.width?q.width:s._preWidth();if(u._frozenInternal>=0){V=Math.min(V,U);V-=B.x}else{V=Math.min(h.pos,U+h._antipos);V-=B.x;wijmo_1.isChromiumBased()&&!wijmo_1.isMobile()&&K&&(V-=1)}}}a?S.right=V+"px":S.left=V+"px";d.isFrozen(_)||(k-=e._getOffsetY());S.top=k+"px";S.width=v+"px";S.height=y+"px";var J=0;u.isFrozen(i)&&(J+=1);if(d.isFrozen(t)){d._frozenInternal<0&&s.columnFooters.rows.length>0&&(S.top=k-s.columnFooters.height+"px");J+=2;0===y&&(J=-1)}var Y=!1,X=s.alternatingRowStep;if(X&&(!n||n.row==n.row2)){Y=c.visibleIndex%(X+1)==0;1==X&&(Y=!Y)}if(b==E.Cell){g&&(R+=" "+exports.FlexGridClsNames.group);g&&f&&(R+=" "+exports.FlexGridClsNames.groupSummary);Y&&(R+=" "+exports.FlexGridClsNames.alt);(d.isFrozen(t)||u.isFrozen(i))&&(R+=" "+exports.FlexGridClsNames.frozen);w&&(R+=" "+exports.FlexGridClsNames.new);c&&c.cssClass&&(R+=" "+c.cssClass);L&&L.cssClass&&(R+=" "+L.cssClass);s.headersVisibility&HeadersVisibility.Row&&wijmo_1.setAttribute(o,"id","g-"+e.grid._ariaId+"-cell-"+t+"-"+i)}else{R+=" "+exports.FlexGridClsNames.header;Y&&(R+=" "+exports.FlexGridClsNames.headerAlt);c&&c.cssClass&&b==E.ColumnHeader&&(R+=" "+c.cssClass);L&&L.cssClass&&b==E.RowHeader&&(R+=" "+L.cssClass);var $=!1;b!=E.ColumnHeader&&b!=E.TopLeft||s.allowResizing&AllowResizing.Columns&&($=null!=s._mouseHdl._getResizeCol(e,p));$||b!=E.RowHeader||s.allowResizing&AllowResizing.Rows&&($=null!=s._mouseHdl._getResizeRow(e,_));$&&(R+=" "+exports.FlexGridClsNames.bigHeader)}var Z=b==E.Cell&&i==u.firstVisibleIndex&&g&&!_isEditingCell(s,t,i),Q=Z&&g.hasChildren,ee=b,te=s._isTransposed(),ie=(ee==E.ColumnHeader&&!te||ee==E.RowHeader&&te)&&s._hasColumnGroups()?s._getColumnGroup(t,i):null;c&&c.cssClassAll&&(R+=" "+c.cssClassAll);L&&L.cssClassAll&&(null==ie||0==ie.columns.length)&&(R+=" "+L.cssClassAll);ie&&ie.cssClassAll&&ie.columns.length>0&&(R+=" "+ie.cssClassAll);var oe=SelectedState,ne=e.getSelectedState(t,i,n);ne!=oe.None&&b==E.Cell&&!A&&s.editRange&&s.editRange.contains(t,i)&&(ne=oe.None);var re=!1,le=((l={})[E.RowHeader]="rh",l[E.ColumnHeader]="ch",l[E.TopLeft]="tl",l[E.BottomLeft]="bl",l[E.ColumnFooter]="cf",l)[b];if(le){s.headersVisibility&HeadersVisibility.Row&&"true"!==o.dataset.groupPanel&&wijmo_1.setAttribute(o,"id","g-"+e.grid._ariaId+"-"+le+"-"+t+"-"+i);re=!0}switch(ne){case oe.Active:R+=" "+wijmo_1.ControlStateClsNames.active;break;case oe.Cursor:R+=re?" "+exports.FlexGridClsNames.focusHeaderCell:" "+wijmo_1.ControlStateClsNames.selected;R+=" "+wijmo_1.ControlStateClsNames.active;break;case oe.Selected:R+=" "+wijmo_1.ControlStateClsNames.multiSelected}if(d.isFrozen(_))if(d._frozenInternal>0){R+=" "+exports.FlexGridClsNames.frozenRow;_===d._lastFrozen&&(R+=" "+exports.FlexGridClsNames.lastFrozenRow)}else{R+=" "+exports.FlexGridClsNames.frozenRowBottom;if(t===d._lastFrozenVisible)R+=" "+exports.FlexGridClsNames.lastFrozenRowBottom;else if(g&&d.length-t<Math.abs(d._frozenInternal)){for(var se=t-1,ae=!1;se>=d.length+d._frozenInternal;){if(d[se].isVisible){ae=!0;break}se--}ae||(R+=" "+exports.FlexGridClsNames.lastFrozenRowBottom)}}if(u._frozenInternal>0){if(p<=u._lastFrozen){R+=" "+exports.FlexGridClsNames.frozenColLeft;p===u._lastFrozen&&(R+=" "+exports.FlexGridClsNames.frozenCol)}}else if(u._frozenInternal<0&&p>=u._lastFrozen){R+=" "+exports.FlexGridClsNames.frozenColRight;if(i===u._lastFrozenVisible)R+=" "+exports.FlexGridClsNames.frozenColRightEdge;else if(u.length-i<Math.abs(u._frozenInternal)){for(var de=i-1,ue=!1;de>=u.length+u._frozenInternal;){if(u[de].isVisible){ue=!0;break}de--}ue||(R+=" "+exports.FlexGridClsNames.frozenColRightEdge)}}d._frozenInternal<0&&_==d._lastUnfrozenVisible&&(R+=" "+exports.FlexGridClsNames.lastVisibleRow);u._frozenInternal<0&&p==u._lastUnfrozenVisible&&(R+=" "+exports.FlexGridClsNames.lastVisibleCol);(L&&L.wordWrap||c&&c.wordWrap)&&(R+=" "+exports.FlexGridClsNames.wrap);(L&&L.multiLine||c&&c.multiLine)&&(R+=" "+exports.FlexGridClsNames.multiline);var ce=L?L.getAlignment(c):void 0;ce&&(x=" "+wijmo_1.UtilitesClsNames.align+"-"+ce);ie&&ie.align&&(x=" "+wijmo_1.UtilitesClsNames.align+"-"+ie.align);S.paddingLeft=S.paddingRight=S.paddingTop=S.paddingBottom="";if(b==E.Cell&&s.rows.maxGroupLevel>-1&&i==u.firstVisibleIndex&&s.treeIndent){var he=g?Math.max(0,g.level):d.maxGroupLevel+1,_e=Math.min(s.treeIndent*he+s._cellPadLeft,v-s._cellPadHorz)+"px";a?S.paddingRight=_e:S.paddingLeft=_e}v<=s._cellPadHorz&&null==o.getAttribute(FlexGrid._WJS_MEASURE)&&(S.paddingLeft=S.paddingRight=0);Q&&(x="");Q?wijmo_1.setAttribute(o,"aria-expanded",!g.isCollapsed):o.removeAttribute("aria-expanded");var pe=null,ge=null;if(0!=r&&L){pe=e.getCellData(t,i,!1);ge=e.getCellData(t,i,!0);g&&m&&!g.isSummary&&ee==E.Cell&&(ge="");if(Q&&!g.isSummary){var fe=_getTreeBtn(g,o);ge=g.getGroupHeader()||wijmo_1.escapeHtml(ge);(st=document.createElement("span")).classList.add(exports.FlexGridClsNames.elemCollapseSpace);o.innerHTML=fe.outerHTML+st.outerHTML+ge}else if(b!=E.ColumnHeader||_!=s._getSortRowIndex()&&L==h)if(b==E.RowHeader&&!ge&&function(){var e=!1;if(i==s._getEditColumnIndex()){var t=s.editableCollectionView,n=t?t.currentEditItem:null;ge=o.innerHTML=n&&c.dataItem==n?_getGlyph("pencil",getAriaLabels().pencil,!0):c instanceof _NewRowTemplate?_getGlyph("asterisk",getAriaLabels().asterisk,!0):"";e=!0}var r=L._tpl;if(r){_renderTemplate(r,o,pe,ge,c,L);e=!0}return e}());else if(b!=E.Cell||O!=wijmo_1.DataType.Boolean||M||g&&!wijmo_1.isBoolean(pe))if(b==E.Cell&&N&&_isEditingCell(s,t,i)){D&&M&&!M.isEditable&&(ge=wijmo_1.toPlainText(ge));o.textContent="";var me=document.createElement("span");me.style.flexGrow="1";me.textContent=ge;o.appendChild(me);(ve=document.createElement("input")).type="menu";ve.value=ge;s._edtHdl._edt=ve}else if(b==E.Cell&&!P&&_isEditingCell(s,t,i)){var we=L.inputType||c.inputType;we||(we=O!=wijmo_1.DataType.Number||M?"text":"tel");if(!M&&!L.mask&&!c.mask){var Ce=e.getCellData(t,i,!1);wijmo_1.isNumber(Ce)&&(ge=_getEditString(Ce,L.format||c.format))}o.innerHTML=(L.multiLine||c.multiLine)&&"checkbox"!=we?'<textarea wrap="soft"></textarea>':'<input type="'+we+'"/>';var ve=o.children[0];wijmo_1.addClass(ve,exports.FlexGridClsNames.gridEditor+" "+wijmo_1.InputFormElementsClsNames.formControl);wijmo_1.disableAutoComplete(ve);wijmo_1.setAriaLabel(ve,getAriaLabels().editCell);D&&M&&!M.isEditable&&(ge=wijmo_1.toPlainText(ge));ve.value=ge;ve.tabIndex=-1;ve.required=L.getIsRequired(c);wijmo_1.setAttribute(ve,"aria-required",ve.required);var ye=L.maxLength||c.maxLength;ye&&(ve.maxLength=ye);ve.style.textAlign=L.getAlignment(c);var be=L.mask||c.mask;if(be){ve[_MASK_PROVIDER]&&ve[_MASK_PROVIDER].dispose();ve[_MASK_PROVIDER]=new wijmo_1._MaskProvider(ve,be)}s.showPlaceholders&&(ve.placeholder=L.placeholder||"");(wijmo_1.isSafari()||wijmo_1.Control.sharedState.InvalidScroll)&&s._edtHdl&&s._edtHdl._edt&&(ve.value=s._edtHdl._edt.value);s._edtHdl._edt=ve}else{var Re=null;if(P){var xe=[],Se=e.getCellData(t,i,!1);M._cv.items.forEach((function(e,o){var n=e[M.selectedValuePath],r=n===Se?" checked":"",l=s.isReadOnly||c.isReadOnly||h.isReadOnly||!s._edtHdl._allowEdit(t,i)?" disabled":"",a=wijmo_1.escapeHtml(M.getDisplayValue(n));o===pe&&(Re=a);xe.push('<label><input type="radio" tabindex="-1"'+r+l+' data-idx="'+o+'" value="'+a+'"><span>'+a+"</span></label>")}));o.innerHTML=xe.join(" ");if(Re){ze=getAriaLabels();wijmo_1.setAriaLabel(o,Re+" "+ze.radioButtonChecked)}R+=" "+CellFactory._WJC_RADIOMAP}var Ee=I?L._tpl:null;Ee&&F?_renderTemplate(Ee,o,pe,ge,c,L):P||(b==E.Cell&&D?o.innerHTML=ge:o.textContent=ge||"");if(ie&&ie.collapseTo){var je=ie._rng;if(je&&(b==E.ColumnHeader&&je.columnSpan>1||b==E.RowHeader&&je.rowSpan>1)){var He=ie.isCollapsed;o.innerHTML='<div role="button" class="'+CellFactory._WJC_COLLAPSE+'" aria-hidden="true">'+_getGlyph(He?"plus":"minus")+"</div> "+o.innerHTML;wijmo_1.setAttribute(o,"aria-expanded",!He);He&&wijmo_1.addClass(o,wijmo_1.ControlStateClsNames.collapsed)}}}else{var Fe=o.firstChild;if(!g||F){if(!s._isNativeCheckbox(Fe)){var ze=getAriaLabels();o.innerHTML='<label><input type="checkbox" class="'+CellFactory._WJC_CHECKBOX+'" tabindex="-1" aria-label='+(pe?ze.checked:ze.unchecked)+"><span>​</span></label>";Fe=o.querySelector("input")}wijmo_1.setAttribute(o,"aria-selected",!0===pe?"true":"false");wijmo_1.setChecked(Fe,pe);Fe.disabled=!s.canEditCell(t,i);Fe.disabled&&(Fe.style.cursor="default")}else g&&(o.innerHTML="");s.editRange&&s.editRange.contains(t,i)&&(s._edtHdl._edt=Fe)}else{o.innerHTML=wijmo_1.escapeHtml(ge);var Te=L.currentSort;if(Te&&s.showSort){R+="+"==Te?" "+exports.FlexGridClsNames.sortAsc:" "+exports.FlexGridClsNames.sortDesc;var Me=_getSortGlyph(L);o.innerHTML+=" "+Me}s.allowPinning&&wijmo_1.contains(s.hostElement,o)&&_addPinButton(o,s.columns.isFrozen(i),h.header)}var Ge=n;Ge||!s||ie?ie&&(Ge=ie._rng):Ge=s.getMergedRange(e,t,i);o.removeAttribute("aria-rowspan");o.removeAttribute("aria-colspan");o.removeAttribute("aria-rowindex");if(Ge&&!Ge.isSingleCell){var Ie=ie&&ie.isCollapsed,Pe=re&&ie&&!ie.isCollapsed,Ae=re&&!ie;if(Ie)b===CellType.ColumnHeader&&Ge.rowSpan>1?wijmo_1.setAttribute(o,"aria-rowspan",Ge.rowSpan):b===CellType.RowHeader&&Ge.columnSpan>1&&wijmo_1.setAttribute(o,"aria-colspan",Ge.columnSpan);else if(Pe||Ae||!re){Ge.columnSpan>1&&wijmo_1.setAttribute(o,"aria-colspan",Ge.columnSpan);if(Ge.rowSpan>1){wijmo_1.setAttribute(o,"aria-rowspan",Ge.rowSpan);var De=wijmo_1.closest(o,"."+exports.FlexGridClsNames.row);if(De){var Le=De.getAttribute("aria-rowindex");Le&&""!==Le&&wijmo_1.setAttribute(o,"aria-rowindex",Le)}}}}if((G==DataMapEditor.DropDownList||G==DataMapEditor.Menu)&&s.showDropDown&&s.canEditCell(t,i)&&softInput()){var Oe=_getDropDownBtn();o.insertBefore(Oe,o.firstChild);_isEditingCell(s,t,i)&&(R+=" "+exports.FlexGridClsNames.hasDropDown)}}if(b==E.RowHeader||b==E.ColumnHeader){var Ne=b==E.RowHeader?!g&&!w&&c.allowDragging&&0!=(s.allowDragging&AllowDragging.Rows):(ie||h).allowDragging&&0!=(s.allowDragging&AllowDragging.Columns);wijmo_1.setAttribute(o,"draggable",Ne?"true":null)}w&&wijmo_1.setAttribute(o,"aria-label",getAriaLabels().newRowCell);b!==E.ColumnHeader&&b!=E.RowHeader||exports.colHdrAriaAttributes(o,h,e,s,ge,b===E.RowHeader);E.TopLeft===b&&wijmo_1.setAttribute(o,"role",isNullOrEmptyString(ge)?"gridcell":"rowheader");R+=x;o.className!=R&&(o.className=R);S.zIndex=0===J?"":J;var Ve=o.style;for(var ke in S)Ve[ke]!==S[ke]&&(Ve[ke]=S[ke]);if(s._edtHdl._edt&&s._edtHdl._edt.parentElement==o){var Be=s._root,We=Be.getBoundingClientRect(),Ke=o.getBoundingClientRect(),qe=We.top+Be.clientHeight-Ke.top,Ue=We.left+Be.clientWidth-Ke.left;if(u._frozenInternal<0){var Je=document.querySelector('[wj-part="rh"]').getBoundingClientRect(),Ye=e._getFrozenPos();if(Je.left+Je.width>Ke.left&&Ke.width>Ye.x&&K){Ue=Ye.x;o.style.left=o.offsetLeft+Ue-Ye.x+"px"}}if(d._frozenInternal<0){var Xe=document.querySelector('[wj-part="ch"]').getBoundingClientRect();Ye=e._getFrozenPos();if(Xe.top+Xe.height>Ke.top&&Ke.height>Ye.y&&W){qe=Ye.y;o.style.top=o.offsetTop+qe-Ye.y+"px"}}Ke.height>qe&&(o.style.height=qe+"px");Ke.width>Ue&&(o.style.width=Ue+"px")}!1===r&&L&&(pe=e.getCellData(t,i,!1));var $e=null==pe||""===pe,Ze=b===E.RowHeader;if(b==E.Cell||Ze){var Qe=s._getShowErrors(),et=null!=s._edtHdl._edt,tt=s._edtHdl.editRange&&s._edtHdl.editRange.containsRow(t);if(Qe&&(!et||!$e&&!Ze||et&&!tt)){var it="",ot=d[t].dataItem;it=L.binding&&ot&&L.getIsRequired(c)&&_isEditingCell(s,t,i)&&$e?s._edtHdl._getRequiredMsg():s._getError(e,t,i,!1);s._edtHdl._setCellError(o,it)}}s.itemFormatter&&s.itemFormatter(e,t,i,o);if(s.formatItem.hasHandlers){var nt=CellFactory._fmtItemArgs;if(nt){nt._p=e;nt._rng.setRange(t,i,_,p);nt._cell=o}else nt=CellFactory._fmtItemArgs=new FormatItemEventArgs(e,new CellRange(t,i,_,p),o);nt._updateContent=!1!==r;s.onFormatItem(nt)}var rt=g&&g.level>0,lt=I?L&&L._tpl:null;if(Z&&!Q&&rt&&(!1!==r&&L)&&!(lt&&F)){fe=_getTreeBtn(g,o);var st,at=o.firstChild;(st=document.createElement("span")).classList.add(exports.FlexGridClsNames.elemCollapseSpace);o.insertBefore(fe,at);o.insertBefore(st,at)}};CellFactory.prototype.disposeCell=function(e){delete e[GridPanel._INDEX_KEY];if(e[_MASK_PROVIDER]){e[_MASK_PROVIDER].dispose();delete e[_MASK_PROVIDER]}e.removeAttribute("draggable")};CellFactory.prototype._interopDisposeCell=function(e){};CellFactory.prototype.getEditorValue=function(e){var t=e._edtHdl._edt;if(t instanceof HTMLInputElement)switch(t.type){case"checkbox":return t.checked;case"radio":return t.value}if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){var i=t[_MASK_PROVIDER],o=i?i._applyMask():t.value,n=t.maxLength;if(wijmo_1.isNumber(n)&&n>-1&&o.length>n){var r=wijmo_1.culture.Globalize.numberFormat["%"]||"%",l=o.length&&o[o.length-1]==r;o=o.substr(0,n);l&&o.indexOf(r)<0&&(o+=r)}return o}return null};CellFactory.dispose=function(){CellFactory._ddBtn&&(CellFactory._ddBtn=null);CellFactory._tplCtx={row:null,col:null,value:null,text:null,item:null};CellFactory._fmtItemArgs=null};CellFactory._WJC_RADIOMAP=exports.FlexGridClsNames.radioMap;CellFactory._WJC_CHECKBOX=exports.FlexGridClsNames.cellCheck;CellFactory._WJC_COLLAPSE=exports.FlexGridClsNames.elemCollapse;CellFactory._WJC_DROPDOWN=exports.FlexGridClsNames.elemDropDown;CellFactory._WJC_PIN=exports.FlexGridClsNames.elemPin;CellFactory._tplDdBtn=_getButton(CellFactory._WJC_DROPDOWN,"down");CellFactory._tplCtx={row:null,col:null,value:null,text:null,item:null};return CellFactory}();exports.CellFactory=CellFactory;function getAriaLabels(){return wijmo_1.culture.FlexGrid.ariaLabels}function _renderTemplate(e,t,i,o,n,r){var l=CellFactory._tplCtx;l.value=i;l.text=o;l.item=n.dataItem;l.row=n;l.col=r;var s=wijmo_1.isString(e)?wijmo_1.evalTemplate(e,l):e(l,t);null!=s&&(t.innerHTML=s)}function _getEditString(e,t){t=t||"n";var i=wijmo_1.Globalize._parseNumericFormat(t);switch(i.spec){case"d":case"x":break;case"e":t=t.replace(/[0-9]/g,"");break;default:t="p"==i.spec?"P15":"r";i.scale&&(t+=Array(i.scale/3+1).join(","))}return wijmo_1.Globalize.formatNumber(e,t,!0)}function _isEditingCell(e,t,i){return e.editRange&&e.editRange.contains(t,i)}function _getDropDownBtn(){var e=CellFactory._ddBtn;if(!e){e=CellFactory._ddBtn=wijmo_1.createElement(CellFactory._tplDdBtn);wijmo_1.setAriaLabel(e,getAriaLabels().toggleDropDown);wijmo_1.setAttribute(e,"aria-expanded",!1)}return e.cloneNode(!0)}function _addPinButton(e,t,i){var o=t?getAriaLabels().pined:getAriaLabels().pinning,n=_getButton(CellFactory._WJC_PIN,"pin",o),r=wijmo_1.createElement(n);wijmo_1.toggleClass(r,wijmo_1.ControlStateClsNames.pinned,t);wijmo_1.setAttribute(r,"aria-pressed",t);e.insertBefore(r,e.firstChild)}function _getSortGlyph(e){var t,i,o=getAriaLabels(),n=e.grid.collectionView;if(n&&n.sortDescriptions.length>1){var r=e.currentSortIndex;if(r>-1){i=o.sortIndex+" "+(r+1);t='<span class="'+exports.FlexGridClsNames.sortIndex+'" aria-hidden= "true">'+(r+1)+"</span>"}}var l=_getGlyph("+"==e.currentSort?"up":"down",i,!0);t&&(l+=t);return l}function _getTreeBtn(e,t){var i=CellFactory._WJC_COLLAPSE,o=(e.isCollapsed?"":"down-")+(e.grid.rightToLeft?"left":"right"),n=wijmo_1.createElement('<button class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.GlyphClsNames.btnGlyph+" "+i+'" type="button" tabindex="-1">'+_getGlyph(o)+"</button>");wijmo_1.setAriaLabel(n,getAriaLabels().toggleGroup);wijmo_1.setAttribute(n,"aria-expanded",!e.isCollapsed);wijmo_1.setAttribute(t,"aria-expanded",!e.isCollapsed);if(!e.hasChildren){n.style.visibility="hidden";wijmo_1.setAttribute(n,"aria-hidden",!0);t.removeAttribute("aria-expanded")}return n}function _getGlyph(e,t,i){void 0===i&&(i=!1);return'<span class="'+(wijmo_1.GlyphClsNames.glyph+"-"+e)+'"'+(t?' aria-label="'+t+'"':"")+(t&&i?' role="button"':"")+"></span>"}function _getButton(e,t,i){return'<button class="'+wijmo_1.InputFormElementsClsNames.btn+" "+wijmo_1.GlyphClsNames.btnGlyph+" "+wijmo_1.UtilitesClsNames.right+" "+e+'" '+(void 0!==i?'aria-label = "'+i+'"':"")+' type="button" tabindex="-1">'+_getGlyph(t)+"</button>"}function isNullOrEmptyString(e){return null==e||0===e.length}exports.isNullOrEmptyString=isNullOrEmptyString;var KeyAction,_CustomEditor=function(){function _CustomEditor(e,t){this._col=wijmo_1.asType(e,Column);this._ctl=t;var i=this._ctl;this._tbx=t.hostElement.querySelector("input")||i&&i._tbx;wijmo_1.assert(this._col instanceof Column,"Invalid Column");wijmo_1.assert(this._ctl instanceof wijmo_1.Control,"Invalid edit control");wijmo_1.assert(this._tbx instanceof HTMLInputElement,"Input element not found in editor");this._prop=wijmo_1.isUndefined(i.value)?wijmo_1.isUndefined(i.checkedItems)?wijmo_1.isUndefined(i.text)?null:"text":"checkedItems":"value";wijmo_1.assert(null!=this._prop,"value, text properties not found in editor");var o=softInput();if(o){this._isDropDown=i instanceof o.DropDown;this._isComboBox=i instanceof o.ComboBox;this._isAutoComplete=i instanceof o.AutoComplete;this._isInputDateTime=i instanceof o.InputDateTime;this._isInputNumber=i instanceof o.InputNumber;this._isInputMask=i instanceof o.InputMask}this._updateFocusBnd=this._updateFocus.bind(this);this._keydownBnd=this._keydown.bind(this);this._cmpstartBnd=this._cmpstart.bind(this);this._mousedownBnd=this._mousedown.bind(this);this._connect();this._col.gridChanged.addHandler(this._connect,this);this._hideEditor();this._updateFocus()}Object.defineProperty(_CustomEditor.prototype,"grid",{get:function(){return this._g},enumerable:!0,configurable:!0});Object.defineProperty(_CustomEditor.prototype,"column",{get:function(){return this._col},enumerable:!0,configurable:!0});Object.defineProperty(_CustomEditor.prototype,"control",{get:function(){return this._ctl},enumerable:!0,configurable:!0});_CustomEditor.prototype.dispose=function(){this._disconnect();this._isDropDown&&(this._isDropDown=!1);this._g=this._col=this._ctl=this._tbx=null};_CustomEditor.prototype._connect=function(){var e=this._col?this._col.grid:null;if(e!=this._g){this._disconnect();if(e){var t=e.hostElement,i=e.addEventListener.bind(e),o=this._updateFocusBnd;this._g=e;this._ensureEditorsContainer(e);this._hideEditor();this._updateFocus();i(t,"keydown",this._keydownBnd,!0);i(t,"mousedown",this._mousedownBnd,!0);i(t,"mouseup",o,!0);i(t,"blur",o,!0);i(t,"focus",o);i(this._tbx,"compositionstart",this._cmpstartBnd);e.gotFocus.addHandler(o,this);e.selectionChanged.addHandler(o,this);e.prepareCellForEdit.addHandler(this._prepareCellForEdit,this);e.cellEditEnding.addHandler(this._cellEditEnding,this);e.cellEditEnded.addHandler(this._cellEditEnded,this)}}};_CustomEditor.prototype._disconnect=function(){var e=this._g;if(e){var t=e.hostElement,i=e.removeEventListener.bind(e),o=this._updateFocusBnd;i(t,"keydown",this._keydownBnd);i(t,"mousedown",this._mousedownBnd);i(t,"mouseup",o);i(t,"blur",o);i(t,"focus",o);i(this._tbx,"compositionstart",this._cmpstartBnd);e.gotFocus.removeHandler(o,this);e.selectionChanged.removeHandler(o,this);e.prepareCellForEdit.removeHandler(this._prepareCellForEdit,this);e.cellEditEnding.removeHandler(this._cellEditEnding,this);e.cellEditEnded.removeHandler(this._cellEditEnded,this);if(this._ieKeypressTimer){clearTimeout(this._ieKeypressTimer);this._ieKeypressTimer=null}if(this._ieActivateEditorTimer){clearTimeout(this._ieActivateEditorTimer);this._ieActivateEditorTimer=null}if(this._setSelectionRangeTimer){clearTimeout(this._setSelectionRangeTimer);this._setSelectionRangeTimer=null}this._g=null}};_CustomEditor.prototype._prepareCellForEdit=function(e,t){if(!t.cancel&&t.getColumn(!0)==this._col){var i=this.grid,o=this._ctl,n=this._tbx,r=this._prop,l=t.range,s=t.data,a=s&&void 0!==s.type?s.type:"",d=i.getCellData(l.row,l.col,"text"==r||this._isInputMask),u=!1,c="rtl"==getComputedStyle(o.hostElement).direction;o._rtlDir=c;wijmo_1.toggleClass(o.hostElement,wijmo_1.UtilitesClsNames.rtl,c);if(this._isComboBox){""!=d&&(o._emptyValueAction=!1);i._imeHdl&&i._imeHdl._handlingCompositionStart&&(o._composing=!0);this._isInputDateTime&&o._setDropdown(o._ddDate)}this._isAutoComplete&&o.reset();this._isInputMask&&(o._fullEdit=!0);if("checkedItems"==r){if(o.showFilterInput){o.showFilterInput=!1;o.showFilterInput=!0}if(null==d||0==d.length){o[r]=[];o.selectedIndex=0}}if(null!=d||!o.isRequired){if("checkedItems"==r){var h=[];if(o.selectedValuePath)for(var _loop_1=function(e){var t=o.collectionView.items.findIndex((function(t){return null!=d[e][o.selectedValuePath]&&t[o.selectedValuePath]===d[e][o.selectedValuePath]}));if(t>=0){o._lbx.toggleItemChecked(t);h.push(o.collectionView.items[t])}},_=0;_<d.length;_++)_loop_1(_);else wijmo_1.isArray(d)?h=d:d.length>0&&d.split(",").forEach((function(e){h.push(e.trim())}));o[r]=h}else o[r]=d;if(this._isAutoComplete){clearTimeout(o._toSearch);if((g=o.collectionView)&&(g.filter||o._rxHighlight)){o._rxHighlight=null;g.filter=null}if(d){var p=o._findNext(d,1,-1);o.selectedIndex!=p&&(o.selectedIndex=p);!o.containsFocus()&&o._focus&&o.onGotFocus()}}}switch(a){case"keydown":case"mousedown":if(wijmo_1.isUndefined(s.keyCode)||s.keyCode==wijmo_1.Key.F4||s.altKey){u=this._isDropDown;if(this._isAutoComplete&&(null==d||wijmo_1.isString(d))){var g;if(g=o.collectionView){if(g.filter||o._rxHighlight){o._rxHighlight=null;g.filter=null}p=d?o._findNext(d,1,-1):-1;o.selectedIndex!=p&&(o.selectedIndex=p)}}}}i.showPlaceholders&&!o.placeholder&&(n.placeholder=this._col.header);this.showEditor();i._edtHdl._fullEdit=!0;if(0==a.indexOf("key")&&32==s.keyCode){wijmo_1.setSelectionRange(n,n.value.length);s.preventDefault()}if(wijmo_1.isIE()&&!i.imeEnabled)if("keypress"==a&&s.key){this._ieKeypressTimer=setTimeout((function(){n.value=s.key;wijmo_1.setSelectionRange(n,1);var e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1);n.dispatchEvent(e)}));s.preventDefault()}else if("compositionstart"==a){var f=n.value.length;wijmo_1.setSelectionRange(n,f)}this._isDropDown&&(o.isDroppedDown=u)}};_CustomEditor.prototype._cellEditEnding=function(e,t){if(!t.cancel&&t.getColumn(!0)==this._col){var i=this.grid,o=this._ctl,n=this._prop;if(this._isAutoComplete){var r=o.selectedIndex;if(wijmo_1.isNumber(r)&&r<0){var l=o.collectionView;l&&1==l.items.length?o.selectedIndex=0:this._col.isRequired&&(t.cancel=!0)}}if(!t.cancel&&n){var s=!1;if(this._isInputMask){var a=o;if(null!=a){i._edtHdl._setCustomEditorValue(a._msk._applyMask());s=!0}}s||i._edtHdl._setCustomEditorValue(o[n])}}};_CustomEditor.prototype._cellEditEnded=function(e,t){this._hideEditor();this._updateFocus()};_CustomEditor.prototype._cmpstart=function(e){var t=this;this.grid.imeEnabled&&(wijmo_1.isIE()?this._ieActivateEditorTimer=setTimeout((function(){t._activateEditor(e)})):this._activateEditor(e))};_CustomEditor.prototype._keydown=function(e){if(!e.defaultPrevented&&this._checkColumn(e.target))if(this.grid.activeEditor){if(e.keyCode==wijmo_1.Key.Enter&&this._isDropDown){var t=this._ctl;if(t.isDroppedDown){t.isDroppedDown=!1;e.preventDefault();e.stopImmediatePropagation()}}}else if(this._isDropDown){var i=e.keyCode;switch(i){case wijmo_1.Key.F4:case wijmo_1.Key.Up:case wijmo_1.Key.Down:if(i==wijmo_1.Key.F4||e.altKey){this._activateEditor(e);e.preventDefault()}}}};_CustomEditor.prototype._checkColumn=function(e){var t=this._g;if(!t.imeEnabled&&!t.isReadOnly||null!=e&&this._imeEditor()===e){var i=t._selHdl.selection;return t._getBindingColumn(t.cells,i.row,t.columns[i.col])==this._col&&!this._col.isReadOnly&&!t.rows[i.row].isReadOnly}return!1};_CustomEditor.prototype._mousedown=function(e){if(!e.defaultPrevented&&0==e.button&&!e.shiftKey&&!e.ctrlKey&&!e.metaKey&&this._isDropDown&&wijmo_1.closestClass(e.target,CellFactory._WJC_DROPDOWN)){var t=this.grid,i=t.hitTest(e);if((!t._edtHdl||t._edtHdl.validate)&&!i._clickChildGrid&&i.getColumn(!0)==this._col){t._ensureEditSelectionForParentGrid();t.select(i.range);t.refresh();this._activateEditor(e);e.preventDefault()}}};_CustomEditor.prototype._activateEditor=function(e){var t=this.grid;if(!t.activeEditor){var i=t._selHdl.selection;if(i.isValid)return t.startEditing(!0,i.row,i.col,!0,e)}return!1};_CustomEditor.prototype.showEditor=function(){this.isOpen=!0;var e=this.grid,t=e.activeEditor,i=wijmo_1.closest(t,"."+exports.FlexGridClsNames.cell);if(i){var o=this._tbx,n=this._ctl.hostElement;wijmo_1.setCss(n,_CustomEditor._cssVisible);wijmo_1.toggleClass(o,exports.FlexGridClsNames.gridIme,!1);i.innerHTML="";i.appendChild(n);e._edtHdl._edt=o;if(this._imeEditor())this._initImeEditInput();else{o.select();o.focus();t.value=""}}};_CustomEditor.prototype._hideEditor=function(){this.isOpen=!1;var e=this.grid,t=this._ctl.hostElement,i=this._tbx;this._isDropDown&&(this._ctl.isDroppedDown=!1);i.setCustomValidity("");var o=i.value;i.value=o+" ";i.value=o;wijmo_1.setCss(t,_CustomEditor._cssHidden);wijmo_1.toggleClass(i,exports.FlexGridClsNames.gridIme,!0);if(e&&t.parentElement!=e._eEditorsContainer){this._ensureEditorsContainer(e);e._eEditorsContainer.appendChild(t)}this._ctl._composing&&(this._ctl._composing=!1)};_CustomEditor.prototype._resetTabIndex=function(){this._tbx.tabIndex=-1};_CustomEditor.prototype._updateFocus=function(){var e=this.grid;if(e&&!e.activeEditor){var t=e.hostElement,i="."+exports.FlexGridClsNames.hostElement,o=this._tbx,n=wijmo_1.getActiveElement(),r=e._getTabIndex();if(wijmo_1.closest(n,i)==t)if(wijmo_1.closest(o,i)!=t)this._hideEditor();else if(e.imeEnabled)o.tabIndex>-1&&(o.tabIndex=-1);else{var l=e._selHdl.selection,s=e._getBindingColumn(e.cells,l.row,e.columns[l.col]);if(s&&s==this._col&&e.canEditCell(l.row,l.col)){if(n!==o){e.activeCell&&(e.activeCell.tabIndex=-1);o.tabIndex=r;if(!o.readOnly&&!e.isTouching){o.select();o.focus()}}}else if(o.tabIndex>-1){o.tabIndex=-1;n==o&&e.focus(!0)}}}};_CustomEditor.prototype._initImeEditInput=function(){var e=this,t=this._imeEditor();if(t){var i=this._tbx,o=i&&i.style.color,n=this._ctl,compEndEh_1=function(){t.removeEventListener("compositionend",compEndEh_1);n._composing=!1;wijmo_1.setCss(t,_ImeHandler._cssHidden);if(i){i.style.color=o;var gotF_1=function(){n.gotFocus.removeHandler(gotF_1);e._g._edtHdl._edt=i;var o=t.value;if(o){i.value=o;e._isInputMask?e._setSelectionRangeTimer=setTimeout((function(){_CustomEditor._setSelectionRange(i,o.length,o.length)}),0):_CustomEditor._setSelectionRange(i,o.length,o.length);var r=document.createEvent("HTMLEvents");r.initEvent("input",!0,!1);i.dispatchEvent(r)}};n.gotFocus.addHandler(gotF_1);i.focus()}};t.addEventListener("compositionend",compEndEh_1);i&&(i.style.color="transparent")}};_CustomEditor._setSelectionRange=function(e,t,i){void 0===i&&(i=t);if(wijmo_1.contains(document.body,e)&&!e.disabled&&"none"!=e.style.display)try{e.setSelectionRange(wijmo_1.asNumber(t),wijmo_1.asNumber(i),wijmo_1.isIE()?null:"backward");e.focus()}catch(e){}};_CustomEditor.prototype._imeEditor=function(){var e=this.grid;if(e&&e.imeEnabled){var t=wijmo_1.getActiveElement();if(t&&(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&wijmo_1.hasClass(t,exports.FlexGridClsNames.gridIme))return t}return null};_CustomEditor.prototype._ensureEditorsContainer=function(e){if(e&&!e._eEditorsContainer){e._eEditorsContainer=wijmo_1.createElement('<div class="'+exports._CustomEditorClsNames.editorsContainer+'"></div>');var t=e._gridRoleElement();t&&"container"===t.parentElement.getAttribute("wj-part")?t.parentElement.appendChild(e._eEditorsContainer):e.hostElement.appendChild(e._eEditorsContainer)}};_CustomEditor._cssHidden={position:"fixed",left:-32e3,top:-32e3,width:"0px",height:"0px",overflow:"hidden",border:"none",display:"block"};_CustomEditor._cssVisible={position:"absolute",left:0,top:0,width:"100%",height:"100%",display:"inline-table"};return _CustomEditor}();exports._CustomEditor=_CustomEditor;!function(e){e[e.None=0]="None";e[e.MoveDown=1]="MoveDown";e[e.MoveAcross=2]="MoveAcross";e[e.Cycle=3]="Cycle";e[e.CycleOut=4]="CycleOut";e[e.CycleEditable=5]="CycleEditable"}(KeyAction=exports.KeyAction||(exports.KeyAction={}));var _KeyboardHandler=function(){function _KeyboardHandler(e){this._kaTab=KeyAction.None;this._kaEnter=KeyAction.MoveDown;this._isHeadersHandled=!1;this._g=e;var t=e.hostElement;e.addEventListener(t,"keypress",this._keypress.bind(this));e.addEventListener(t,"keydown",this._keydownHeaders.bind(this));e.addEventListener(t,"keydown",this._keydown.bind(this))}_KeyboardHandler.prototype._keydownMetaHeaders=function(e){if(!e.defaultPrevented){var t=this._g,i=t._getKeyCode(e),o=e.ctrlKey||e.metaKey,n=(e.altKey,e.shiftKey),r=!1;switch(i){case wijmo_1.Key.Left:case wijmo_1.Key.Right:case wijmo_1.Key.Up:case wijmo_1.Key.Down:case wijmo_1.Key.Enter:case wijmo_1.Key.Delete:case wijmo_1.Key.Back:case wijmo_1.Key.F2:case wijmo_1.Key.Home:case wijmo_1.Key.End:r=!0;break;case wijmo_1.Key.Space:(t.activePanelType!==CellType.ColumnHeader||o)&&(t.activePanelType!==CellType.RowHeader||n)?t.activePanelType===CellType.TopLeft&&(r=!0):r=!0}if(r){e.preventDefault();this._isHeadersHandled=!0}}};_KeyboardHandler.prototype._keydownHeaders=function(e){if(!e.defaultPrevented&&this._g.activePanelType!=CellType.Cell){var t=this._g,i=t.selection,o=e.ctrlKey||e.metaKey,n=e.shiftKey,r=e.altKey,l=e.target,s=(e.char||e.key,!1),a=t.activePanel,d=t.activePanelType,u=t._getKeyCode(e),c=this._getCustomEditor(t,i.row,i.col);if("INPUT"===l.tagName&&!c){var h=l.type;if("radio"!==h&&"checkbox"!==h)return}if(o||r||n)return this._keydownMetaHeaders(e);if(!s)switch(u){case wijmo_1.Key.Left:if(t.headersFocusability===HeadersFocusability.All&&t.headersVisibility===HeadersVisibility.All)if(d===CellType.ColumnHeader){var _=a.getNextVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).leftCol<=_){if((g=t._gpTL.getLastVisibleColumn())>=0){t.select(new CellRange(i.row,g),!0,t._gpTL);s=!0}}}else if(d===CellType.ColumnFooter){_=a.getNextVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).leftCol<=_){if((g=t._gpBL.getLastVisibleColumn())>=0){t.select(new CellRange(i.row,g),!0,t._gpBL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(0,-1);s=!0}break;case wijmo_1.Key.Right:if(d===CellType.RowHeader){var p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){if((g=t._gpCells.getNextVisibleColumn())>=0){t.select(i.row,g);s=!0}}}else if(d===CellType.TopLeft&&t.headersVisibility&HeadersVisibility.Column){p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){if((g=t._gpCHdr.getNextVisibleColumn())>=0){t.select(i.row,g,t._gpCHdr);s=!0}}}else if(d===CellType.BottomLeft&&t.headersVisibility===HeadersVisibility.All){p=a.getLastVisibleColumn();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).rightCol>=p){var g;if((g=t._gpCFtr.getNextVisibleColumn())>=0){t.select(i.row,g,t._gpCFtr);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(0,1);s=!0}break;case wijmo_1.Key.Down:if(d===CellType.ColumnHeader){var f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpCells.getNextVisibleRow())>=0){t.select(w,i.col);s=!0}}}else if(d===CellType.TopLeft&&t.headersVisibility&HeadersVisibility.Row){f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpRHdr.getNextVisibleRow())>=0){t.select(w,i.col,t._gpRHdr);s=!0}}}else if(d===CellType.RowHeader&&t.headersVisibility&HeadersVisibility.Row){f=a.getLastVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow>=f){if((w=t._gpBL.getNextVisibleRow())>=0){t.select(w,i.col,t._gpBL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(1,0);s=!0}break;case wijmo_1.Key.Up:if(t.headersFocusability===HeadersFocusability.All&&t.headersVisibility===HeadersVisibility.All)if(d===CellType.BottomLeft){f=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow<=f){if((w=t._gpRHdr.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0,t._gpRHdr);s=!0}}}else if(d===CellType.ColumnFooter){f=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).bottomRow<=f){if((w=t._gpCells.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0);s=!0}}}else if(d===CellType.RowHeader){var m=a.getNextVisibleRow();if((t.getMergedRange(a,i.row,i.col)||new CellRange(i.row,i.col)).topRow<=m){var w;if((w=t._gpTL.getLastVisibleRow())>=0){t.select(new CellRange(w,i.col),!0,t._gpTL);s=!0}}}if(!s){t._selHdl.moveSelectionWithinSelectedPanel(-1,0);s=!0}break;case wijmo_1.Key.Tab:if(!(s=this._performKeyAction(t.keyActionTab,n))&&!t.activeCell){t.focus(!0);if(t.imeEnabled){var C=t._imeHdl;C&&C._resetTabIndex()}else c&&c._resetTabIndex()}break;case wijmo_1.Key.Enter:case wijmo_1.Key.Space:var v=a.getCellElement(i.row,i.col);if(v){var y=v.querySelector("button");if(y){y.click();s=!0}else{var b=v.querySelector('[role="button"]');if(b){b.click();s=!0}else if(a.cellType===CellType.TopLeft){var R=SelectionMode;if(t.selectionMode!==R.None&&t.selectionMode!==R.Cell){t.selectAll();s=!0}}else{var x=v.querySelector("input");if(x&&!x.classList.contains("wj-column-selector")){x.click();s=!0}else if(!x&&d==CellType.ColumnHeader){v.click();s=!0}}}}s=!0;break;default:s=!0}if(s){e.preventDefault();this._isHeadersHandled=!0}}};_KeyboardHandler.prototype._keydown=function(e){if(this._isHeadersHandled)this._isHeadersHandled=!1;else{var t=this._g,i=t._edtHdl,o=t.selection,n=e.ctrlKey||e.metaKey,r=e.shiftKey,l=e.altKey,s=e.target,a=e.char||e.key,d=!0,u="Space"===e.code||" "===a;if(!n&&!l&&a&&1==a.length&&wijmo_1.closest(s,"."+exports.FlexGridClsNames.cell)&&s.firstElementChild){if(!u||!r){var c=s.querySelectorAll("."+CellFactory._WJC_RADIOMAP+" label input");if(c&&c.length){for(var h=-1,_=0;_<c.length;_++)if(c[_].checked){h=_;break}a=a.toLowerCase();for(_=0;_<c.length;_++){var p=c[(h+_+1)%c.length];if(u||p.value.toLowerCase()[0]==a){p.click();break}}e.preventDefault();return}}var g=s.querySelector(".wj-cell-maker");if(g&&u){g.click();e.preventDefault();return}}if(!t._wantsInput(s)){var f=wijmo_1.tryCast(t.rows[o.row],GroupRow),m=t.editableCollectionView,w=t._getKeyCode(e),C=SelMove,v=SelectionMode,y=e.defaultPrevented&&!(s instanceof HTMLInputElement),b=w===wijmo_1.Key.Up||w===wijmo_1.Key.Down||w===wijmo_1.Key.Left||w===wijmo_1.Key.Right||w===wijmo_1.Key.PageDown||w===wijmo_1.Key.PageUp||w===wijmo_1.Key.Home||w===wijmo_1.Key.End;if(((t.isRangeValid(o)||b)&&!y||n&&65==w)&&(!t.activeEditor||!i._keydown(e)||t._isNativeCheckbox(t.activeEditor))){if(t.autoClipboard){if(n&&(67==w||45==w)){var R=new CellRangeEventArgs(t.cells,o);if(t.onCopying(R)){var x=HeadersVisibility,S=0!=(t.copyHeaders&x.Column),E=0!=(t.copyHeaders&x.Row),j=t.getClipString(null,!1,S,E);wijmo_1._isMacOS()||(j+="\r\n");t._eFocus.focus();wijmo_1.Clipboard.copy(j);t.onCopied(R)}e.stopPropagation();return}if(n&&86==w||r&&45==w){t.isReadOnly||wijmo_1.Clipboard.paste((function(e){t.setClipString(e)}));e.stopPropagation();return}}(r||n)&&"Space"==e.code&&(w=wijmo_1.Key.Space);switch(w){case wijmo_1.Key.Space:if(r&&o.isValid)switch(t.selectionMode){case v.CellRange:case v.MultiRange:case v.Row:case v.RowRange:case v.ListBox:t.select(new CellRange(o.row,0,o.row,t.columns.length-1),!1);var H=o.row-t.rowHeaders.viewRange.row;if(t.headersVisibility!==HeadersVisibility.Column){var F=null;if(t.rowHeaders.hostElement){t.rowHeaders.hostElement.children[H]&&(F=t.rowHeaders.hostElement.children[H].querySelector("."+wijmo_1.ForeignClsNames.SelectorClsNames.columnSelector))}F&&!t.rows[o.row].isSelected&&F.click()}}else if(n&&o.isValid)switch(t.selectionMode){case v.CellRange:case v.MultiRange:t.select(new CellRange(0,o.col,t.rows.length-1,o.col),!1)}else{if(d=this._startEditing(!0,e))this._finishEditingTimer=setTimeout((function(){var e=t.activeEditor;if(e)if(e.disabled||e.readOnly&&!wijmo_1.closest(e,"."+wijmo_1.ControlClsNames.hostElement))t.finishEditing();else if("checkbox"==e.type){wijmo_1.setChecked(e,e.indeterminate||!e.checked);t.finishEditing()}}));else if(t.rows.maxGroupLevel>-1&&this._isGroupCell()){var z=t.rows[o.row];this._toggleGroupCollapse(!z.isCollapsed,!0)}d=!0}break;case 65:if(n)switch(t.selectionMode){case v.None:case v.Cell:break;default:t.selectAll()}else d=!1;break;case wijmo_1.Key.Left:if(n||l)d=!1;else{if(this._isGroupCell()&&!f.isCollapsed)this._toggleGroupCollapse(!0);else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Row&&t.headersVisibility&HeadersVisibility.Row){if(t.activePanel.getNextVisibleColumn()>=(t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).leftCol){t.select(o.row,t._gpRHdr.columns.length-1,t._gpRHdr);e.preventDefault();return}}if(!n){if(t.selectionMode==v.None)return;this._moveSelWithValid(C.None,n?C.Home:C.Prev,r)}}break;case wijmo_1.Key.Right:if(n||e.altKey)d=!1;else if(this._isGroupCell()&&f.isCollapsed)this._toggleGroupCollapse(!1);else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.None,n?C.End:C.Next,r)}break;case wijmo_1.Key.Up:if(n)d=!1;else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Column&&t.headersVisibility&HeadersVisibility.Column){var T=t.activePanel.getNextVisibleRow();if((t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).topRow<=T){var M=t._gpCHdr.getLastVisibleRow();if(M>=0){t.select(M,o.col,t._gpCHdr);e.preventDefault();return}}}if(!n)if(e.altKey&&i._toggleListBox(e))d=!0;else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.Prev,C.None,r)}break;case wijmo_1.Key.Down:if(n)d=!1;else if(o.isValid&&o.isSingleCell&&t.headersFocusability&HeadersFocusability.Column&&t.headersVisibility&HeadersVisibility.Column){var G=t.activePanel.getLastVisibleRow();if((t.getMergedRange(t.activePanel,o.row,o.col)||new CellRange(o.row,o.col)).topRow>=G){if(t._gpCFtr.getNextVisibleRow()>=0){t.select(0,o.col,t._gpCFtr);e.preventDefault();return}}}if(!n)if(e.altKey&&i._toggleListBox(e))d=!0;else{if(t.selectionMode==v.None)return;this._moveSelWithValid(C.Next,C.None,r)}break;case wijmo_1.Key.PageUp:this._moveSelWithValid(e.altKey?C.Home:C.PrevPage,C.None,r);if(t.rows._frozenInternal&&t.rows.isFrozen(t.selection.row)){var I=t.scrollPosition;I.y&&(t.scrollPosition=new wijmo_1.Point(I.x,0))}break;case wijmo_1.Key.PageDown:this._moveSelWithValid(e.altKey?C.End:C.NextPage,C.None,r);break;case wijmo_1.Key.Home:this._moveSelWithValid(n?C.Home:C.None,C.Home,r);break;case wijmo_1.Key.End:this._moveSelWithValid(n?C.End:C.None,C.End,r);break;case wijmo_1.Key.Tab:if(!(d=this._performKeyAction(t.keyActionTab,r))&&!t.activeCell){t.focus(!0);if(t.imeEnabled){var P=t._imeHdl;P&&P._resetTabIndex()}else{(A=this._getCustomEditor(t,o.row,o.col))&&A._resetTabIndex()}}break;case wijmo_1.Key.Enter:var A;t.rows[o.row]instanceof _NewRowTemplate||(d=this._performKeyAction(t.keyActionEnter,r));(A=this._getCustomEditor(t,o.row,o.col))||t.focus(!0);r||!m||null==m.currentEditItem||t.isAddingInvalidNewRow(o.row)||i._commitRowEdits();break;case wijmo_1.Key.Escape:d=!1;if(m&&(m.currentAddItem||m.currentEditItem)){var D=new CellRangeEventArgs(t.cells,t.selection);D.cancel=!0;t.onRowEditEnding(D);m.currentAddItem&&m.cancelNew();m.currentEditItem&&m.cancelEdit();t.onRowEditEnded(D);d=!0}t._mouseHdl.resetMouseState();break;case wijmo_1.Key.Delete:case wijmo_1.Key.Back:d=this._deleteSel(e);break;case wijmo_1.Key.F2:d=this._startEditing(!0,e);break;case wijmo_1.Key.F4:d=i._toggleListBox(e);break;case wijmo_1.Key.MinusKey:case wijmo_1.Key.HyphenMinusKey:d=!1;n&&t.allowDelete&&(d=this._deleteSel(e,!0));break;case wijmo_1.Key.PlusKey:d=!1;e.ctrlKey&&(d=this._addSel(e));break;case wijmo_1.Key.EqualPlusKey:d=!1;e.ctrlKey&&e.shiftKey&&(d=this._addSel(e));break;case wijmo_1.Key.S:d=!1;if(n&&r){this._sortByKeyboard(e);d=!0}break;case wijmo_1.Key.P:d=!1;if(n&&r){this._pinByKeyboard(e);d=!0}break;case wijmo_1.Key.F:d=!1;if(n&&l){var L=this._g,O=0!==L.frozenColumns||0!==L.frozenRows,N=wijmo_1.culture.FlexGrid.accessibilityHelperMessage,V=O?N.frozen.unfrozenColumn:N.frozen.frozenColumn;V=wijmo_1.format(V,{col:O?L.frozenColumns:o.col,row:O?L.frozenRows:o.row});L.announceShortcut(V);L.frozenColumns=O?0:o.col;L.frozenRows=O?0:o.row;d=!0}break;default:d=!1}if(d){t.containsFocus()||t.focus();e.preventDefault();e.stopPropagation()}}}}};_KeyboardHandler.prototype._performKeyAction=function(e,t){var i=KeyAction,o=SelMove;switch(e){case i.MoveDown:this._moveSel(t?o.Prev:o.Next,o.None,!1);return!0;case i.MoveAcross:this._moveSel(o.None,t?o.Prev:o.Next,!1);return!0;case i.Cycle:this._moveSel(o.None,t?o.PrevCell:o.NextCell,!1);return!0;case i.CycleEditable:this._moveSel(o.None,t?o.PrevEditableCell:o.NextEditableCell,!1);return!0;case i.CycleOut:var n=this._g.selection;this._moveSel(o.None,t?o.PrevCell:o.NextCell,!1);return!n.equals(this._g.selection)}return!1};_KeyboardHandler.prototype._keypress=function(e){var t=this,i=this._g;if(!i._wantsInput(e.target)&&!e.defaultPrevented){var o=i._edtHdl;if(i.activeEditor)o._keypress(e);else if(e.charCode>wijmo_1.Key.Space&&"AltLeft"!=e.code&&"AltRight"!=e.code)if(this._startEditing(!1,e)&&i.activeEditor){var n=wijmo_1.getActiveElement();if(n instanceof HTMLInputElement&&"checkbox"!=n.type||n instanceof HTMLTextAreaElement){var r=i._selHdl.selection,l=i.getCellData(r.row,r.col,!0),s=i.getCellData(r.row,r.col,!1),a=wijmo_1.culture.Globalize.numberFormat["%"]||"%",d=String.fromCharCode(e.charCode),u=wijmo_1.isNumber(s)&&l.indexOf(a)>-1||""==l&&n.value==a,c=!0,initEditor_1=function(){n.value=u?d+a:d;wijmo_1.setSelectionRange(n,1);n.dispatchEvent(o._evtInput);o._keypress(e);o._edtValue=n.value!=l?n.value:null};if(i.imeEnabled){var h=this._getCustomEditor(i,r.row,r.col),_=h&&h.control;if(_&&!_._focus){var gotF_2=function(){_.gotFocus.removeHandler(gotF_2);c=!1;initEditor_1()};_.gotFocus.addHandler(gotF_2)}}c&&initEditor_1();e.preventDefault()}}else if(i.autoSearch){var p=!1;r=i._selHdl.selection;if(e.charCode>32||32==e.charCode&&this._search){e.preventDefault();this._search+=String.fromCharCode(e.charCode);this._toSearch&&clearTimeout(this._toSearch);this._toSearch=setTimeout((function(){t._toSearch=null;t._search=""}),wijmo_1.Control._SEARCH_DELAY);var g=this._findNext(r.row,r.col);if(g<0&&this._search.length>1){this._search=this._search[this._search.length-1];g=this._findNext(r.row,r.col)}if(g>-1){p=!0;i.select(g,r.col)}}p||(this._search="")}}};_KeyboardHandler.prototype._getCustomEditor=function(e,t,i){var o=e._getBindingColumn(e.cells,t,e.columns[i]);return o&&o._edt};_KeyboardHandler.prototype._findNext=function(e,t){var i=this._g,o=i.rows.length;(e<0||1==this._search.length)&&e++;var n=this._search,r=i.caseSensitiveSearch;r||(n=n.toLowerCase());for(var l=i.columns[t].isContentHtml,s=0;s<o;s++){var a=(e+s)%o,d=i.getCellData(a,t,!0).trim();l&&(d=wijmo_1.toPlainText(d));r||(d=d.toLowerCase());if(0==d.indexOf(n))return a}return-1};_KeyboardHandler.prototype._moveSel=function(e,t,i){var o=this._g,n=o.selectionMode,r=o._selHdl;if(n!=SelectionMode.None){n==SelectionMode.MultiRange&&r.extendedSelection.clear();r.moveSelection(e,t,i)}};_KeyboardHandler.prototype._addSel=function(e){var t=this._g,i=t.editableCollectionView,o=t.selection,n=new CellRange,r=new CellEditEndingEventArgs(t.cells,n,e);if(!t._edtHdl._allowEdit()||!t.allowAddNew)return!1;t.deferUpdate((function(){i&&i.beginUpdate();if(t.onRowAdded(r)){var e=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.insertRow;t.announceShortcut(wijmo_1.format(e,{index:o.row}));t.rows.insert(o.row,new Row)}i&&i.endUpdate(!1)}));return!0};_KeyboardHandler.prototype._deleteSel=function(e,t){var i=this,o=this._g,n=o.rows,r=o.editableCollectionView,l=o.selection,s=[],a=new CellRange,d=new CellEditEndingEventArgs(o.cells,a,e),u=SelectionMode;if(!o._edtHdl._allowEdit())return!1;if(o.allowDelete&&(null==r||r.canRemove&&!r.isAddingNew&&!r.isEditingItem)){if(0==(s=n.filter((function(e){return e.isSelected}))).length)switch(o.selectionMode){case u.CellRange:case u.MultiRange:var c=o._getDeleteColumnIndex();o.selectedRanges.forEach((function(e){if(e.leftCol==c&&e.rightCol==o.columns.length-1||t)for(var i=e.topRow;i>-1&&i<=e.bottomRow;i++){var r=n[i];s.indexOf(r)<0&&s.push(r)}}));break;case u.Row:l.topRow>-1&&s.push(n[l.topRow]);break;case u.RowRange:for(var h=l.topRow;h>-1&&h<=l.bottomRow;h++)s.push(n[h])}s=s.reduce((function(e,t){e.find((function(e){return e.dataItem===t.dataItem}))||e.push(t);return e}),[])}if(s.length>0){var _=0;o.deferUpdate((function(){r&&r.beginUpdate();for(var e=s.length-1;e>=0;e--){var t=s[e];if(!(t instanceof _NewRowTemplate)){a.setRange(t.index,-1);o.onDeletingRow(d);if(!d.cancel){r&&t.dataItem?r.remove(t.dataItem):o.rows.removeAt(t.index);_++;var i=wijmo_1.culture.FlexGrid.accessibilityHelperMessage.deleteRow;o.announceShortcut(wijmo_1.format(i,{index:l.row}));o.onDeletedRow(d)}}}r&&r.endUpdate(!1)}));if(_>0){var p=l.topRow;p=Math.min(p,o.rows.length-1);for(;p>0&&o.rows[p]instanceof _NewRowTemplate;)p--;l.row=l.row2=p;o.select(l,!1);o.rows._frozenInternal>0&&o.rows.length<=o.rows._frozenInternal&&(o._ptScrl=new wijmo_1.Point(o._ptScrl.x,0));o.childItemsPath&&r&&r.refresh()}return!0}if(0==s.length){o.deferUpdate((function(){var t=o.scrollPosition,a=-1;s=n.filter((function(e){return e.isSelected}));switch(o.selectionMode){case u.Row:l.topRow>-1&&s.push(n[l.topRow]);break;case u.RowRange:for(var d=l.topRow;d>-1&&d<=l.bottomRow;d++)s.push(n[d])}var c=o.selectedRanges.length>1||s.length>1||l.isValid&&n[l.row].dataItem!=n[l.row2].dataItem;r&&r.beginUpdate();if(s.length){var h=new CellRange(0,0,0,o.columns.length-1);s.forEach((function(t){h.row=h.row2=t.index;i._deleteRange(e,h);a=h.bottomRow}))}else{i._deleteRange(e,l);a=l.bottomRow;o.selectionMode==u.MultiRange&&o._selHdl.extendedSelection.forEach((function(t){i._deleteRange(e,t);a=t.bottomRow}))}o.select(l,!1);o.scrollPosition=t;if(r){if(c&&r.currentEditItem){r.commitEdit();var _=new CellRangeEventArgs(o.cells,new CellRange(a,-1));o.onRowEditEnding(_);o.onRowEditEnded(_)}r.endUpdate(!1)}}));return!0}return!1};_KeyboardHandler.prototype._deleteRange=function(e,t){var i=this._g,o=i.editableCollectionView,n=new CellRange,r=new CellEditEndingEventArgs(i.cells,n,e),l=new CellRangeEventArgs(i.cells,new CellRange(t.topRow,-1));i._imeHdl&&i._imeHdl._suspendIME();for(var s=t.topRow;s<=t.bottomRow;s++){var a=i.rows[s];if(!a.isReadOnly)for(var d=t.leftCol;d<=t.rightCol;d++){var u=i._getBindingColumn(i.cells,s,i.columns[d]);if(!u.getIsRequired(a)&&!u.isReadOnly){var c=i.getCellData(s,d,!1);if(i.getCellData(s,d,!0)){n.setRange(s,d);r.cancel=!1;if(i.onBeginningEdit(r)){var h=a.dataItem,_=o?o.currentEditItem:null;if(h!=_&&d===t.leftCol){l._rng.setRange(s,-1);i.onRowEditStarting(l);i.onRowEditStarted(l)}if(o){o.editItem(h);i._edtHdl._edItem=h}i.setCellData(s,d,"",!0,!1);r.previousData=c;i.onCellEditEnding(r);i.onCellEditEnded(r);if(_&&h!=_&&d===t.rightCol){i.onRowEditEnding(l);i.onRowEditEnded(l)}}}}}}i._imeHdl&&i._imeHdl._resumeIME()};_KeyboardHandler.prototype._startEditing=function(e,t,i,o){return this._g._edtHdl.startEditing(e,i,o,!0,t)};_KeyboardHandler.prototype._sortByKeyboard=function(e){var t=this._g,i=t.selection;toggleColumnSort(t,t.activePanel,i.col,i.row,e)};_KeyboardHandler.prototype._pinByKeyboard=function(e){var t=this._g,i=t.selection;toggleColumnPinning(t,i.col,i.row,!1)};_KeyboardHandler.prototype._isGroupCell=function(){var e=this._g,t=e.selection,i=e.getMergedRange(e.cells,t.row,t.col)||new CellRange(t.row,t.col),o=e.activePanel;if(!e.rows[t.row])return!1;var n=o.getNextVisibleColumn(),r=e.rows[t.row],l=e.rows[t.topRow].dataItem instanceof wijmo_1.CollectionViewGroup,s=i&&i.leftCol<=n,a=l&&s,d=t.leftCol<=n||a;return o.cellType==CellType.Cell&&t.isValid&&d&&r&&r.hasChildren};_KeyboardHandler.prototype._toggleGroupCollapse=function(e,t){var i=this._g,o=i.selection,n=i.rows[o.row];if(n.hasChildren){n.isCollapsed=e;t&&i.scrollIntoView(o.row,-1)}};_KeyboardHandler.prototype._moveSelWithValid=function(e,t,i){var o=this._g;o.isRangeValid(o.selection)?this._moveSel(e,t,i):o.select(o.rows._firstVisible,o.columns._firstVisible)};_KeyboardHandler.prototype.dispose=function(){if(this._g){if(this._toSearch){clearTimeout(this._toSearch);this._toSearch=null}if(this._finishEditingTimer){clearTimeout(this._finishEditingTimer);this._finishEditingTimer=null}this._g=null;this._search=null}};return _KeyboardHandler}();exports._KeyboardHandler=_KeyboardHandler;exports.colHdrAriaAttributes=function(e,t,i,o,n,r){void 0===r&&(r=!1);var l=isNullOrEmptyString(n);wijmo_1.setAttribute(e,"role",l?"gridcell":r?"rowheader":"columnheader");if(t.describedById||i.columns.describedById){var s=[t.describedById,i.columns.describedById].join(" ").trim();wijmo_1.setAttribute(e,"aria-describedby",s||null)}if(o.allowSorting){var a=o._getBindingColumn(i,0,t);if(a&&!l)switch(a.currentSort){case"+":wijmo_1.setAttribute(e,"aria-sort","ascending");break;case"-":wijmo_1.setAttribute(e,"aria-sort","descending");break;default:e.removeAttribute("aria-sort")}}if(!o.isReadOnly){wijmo_1.setAttribute(e,"aria-readonly",t.isReadOnly);wijmo_1.setAttribute(e,"aria-required",t.isReadOnly?null:t.getIsRequired()&&!r)}var d=e.closest("."+exports.FlexGridClsNames.row);wijmo_1.setAttribute(d,"role","row")};var HitTestInfo=function(){function HitTestInfo(e,t){this._row=-1;this._col=-1;this._edge=0;this._clickChildGrid=!1;this._mergedRange=null;var i;if(t instanceof Element){if(wijmo_1.closest(t,"."+exports.FlexGridClsNames.hostElement)!=e.hostElement)return;e=t;this._target=t}if(!(e instanceof Element)||e instanceof FlexGrid){if(e instanceof FlexGrid){this._target=e.hostElement;i=this._g=e}else{if(!(e instanceof GridPanel))throw"First parameter should be a FlexGrid or GridPanel.";this._target=e.hostElement;this._p=e;i=this._g=this._p.grid}if(t instanceof MouseEvent){this._target=t.target;var o=wijmo_1.closest(this._target,"."+exports.FlexGridClsNames.hostElement);"mousedown"==t.type&&null!=o&&e instanceof FlexGrid&&o!=e.hostElement&&(this._clickChildGrid=!0);"mousedown"==t.type&&(i._rcBounds=null)}t=wijmo_1.mouseToPage(t);this._pt=t.clone();var n=i.controlRect,r=i._szClient,l=i.topLeftCells,s=i._eTL,a=i.headersVisibility,d=HeadersVisibility,u=a&d.Row?l.columns.getTotalSize():0,c=a&d.Column?l.rows.getTotalSize():0,h=a&d.Column?c+s.offsetTop:0,_=i._eBL,p=_.offsetHeight,g=getComputedStyle(i.hostElement),f=g&&g.borderLeftWidth?parseFloat(g.borderLeftWidth):0,m=g&&g.borderTopWidth?parseFloat(g.borderTopWidth):0;t.x-=n.left-f;t.y-=n.top-m;i.rightToLeft&&(t.x=n.width-t.x);this._p||t.x>=0&&t.y>=s.offsetTop&&r&&t.x<=r.width+u&&t.y<=r.height+c&&(t.y<h?this._p=t.x<u?i.topLeftCells:i.columnHeaders:t.y<_.offsetTop?this._p=t.x<u?i.rowHeaders:i.cells:this._p=t.x<u?i.bottomLeftCells:i.columnFooters);if(null!=this._p){var w=this._p.rows,C=this._p.columns,v=this._p.cellType,y=CellType,b=this._p._getFrozenPos(),R=v==y.TopLeft||v==y.ColumnHeader?c:v==y.BottomLeft||v==y.ColumnFooter?p:w.getTotalSize(),x=v==y.TopLeft||v==y.BottomLeft||v==y.RowHeader?u:C.getTotalSize();if(v==y.RowHeader||v==y.Cell){t.y-=c;this._inBottomFrozenArea=this._g.rows._frozenInternal&&this._g.rows._frozenInternal<0&&this._g._szClient.height&&this._g.rows.lastFrozen&&t.y>=Math.min(this._g.rows.lastFrozen.pos,this._g._szClient.height+this._g.rows.lastFrozen._antipos);if(this._p.rows._frozenInternal>=0){if(t.y>b.y||b.y<=0){t.y-=i._ptScrl.y;t.y+=this._p._getOffsetY()}}else(t.y<b.y||b.y>=this._g._szClient.height)&&(t.y-=i._ptScrl.y)}else v!=y.BottomLeft&&v!=y.ColumnFooter||(t.y-=_.offsetTop);if(v==y.ColumnHeader||v==y.Cell||v==y.ColumnFooter){t.x-=u;this._inRightFrozenArea=this._g.columns._frozenInternal&&this._g.columns._frozenInternal<0&&this._g.columns.lastFrozen&&this._g._szClient.width&&t.x>=Math.min(this._g.columns.lastFrozen.pos,Math.min(this._g.columns.lastFrozen.pos,this._g._szClient.width+this._g.columns.lastFrozen._antipos));this._p.columns._frozenInternal>=0?(t.x>b.x||b.x<=0)&&(t.x-=i._ptScrl.x):(t.x<b.x||b.x>=this._g._szClient.width)&&(t.x-=i._ptScrl.x)}v!=y.ColumnHeader&&v!=y.TopLeft||(t.y-=h-c);this._edge=0;var S=HitTestInfo._SZEDGE[this._g.isTouching?1:0];if(this._g.isTouching){S=HitTestInfo._SZEDGE[1];t.x-=S/2}this._row=t.y>R?-1:w.getItemAt(t.y);this._col=t.x>x?-1:C.getItemAt(t.x);(this._g.columns._frozenInternal<0||this._g.rows._frozenInternal<0)&&this.correctionForNegativeFrozen(t);if(this._row<0||this._col<0){this._p=null;return}if(this._col>-1){var E=C[this._col],j=this.grid.columns._frozenInternal<0&&this.grid.columns.isFrozen(this._col)?Math.min(E.pos,i._szClient.width+E._antipos):E.pos;if(t.x-j<=S){this._edge|=1;t.x-j<=S/2&&(this._edge|=64)}var H=j+E.renderSize-t.x;if(H<=S){this._edge|=4;H<=S/2&&(this._edge|=16)}}if(this._row>-1){var F=w[this._row],z=this.grid.rows._frozenInternal<0&&this.grid.rows.isFrozen(this._row)?Math.min(F.pos,i._szClient.height+F._antipos):F.pos;if(t.y-z<=S){this._edge|=2;t.y-z<=S/2&&(this._edge|=128)}var T=z+F.renderSize-t.y;if(T<=S){this._edge|=8;T<=S/2&&(this._edge|=32)}}}this.panel&&(this._mergedRange=this.grid.getMergedRange(this.panel,this.row,this.col))}else{var M=wijmo_1.closest(e,"."+exports.FlexGridClsNames.cell),G=M?M[GridPanel._INDEX_KEY]:null;if(G){this._target=e;this._row=G.row;this._col=G.col;this._rng=G.rng;this._p=G.panel;this._g=G.panel.grid}}}Object.defineProperty(HitTestInfo.prototype,"point",{get:function(){return this._pt},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"cellType",{get:function(){return this._p?this._p.cellType:CellType.None},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"panel",{get:function(){return this._p},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"grid",{get:function(){return this._p?this._p.grid:null},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"row",{get:function(){return this._row},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"mergedRange",{get:function(){return this._mergedRange},enumerable:!0,configurable:!0});HitTestInfo.prototype.getRow=function(){return this._p&&this._row>-1?this._p.rows[this._row]:null};Object.defineProperty(HitTestInfo.prototype,"col",{get:function(){return this._col},enumerable:!0,configurable:!0});HitTestInfo.prototype.getColumn=function(e){var t=this._p,i=t&&this._col>-1?t.columns[this._col]:null;if(i&&e){var o=t.grid;i=t.cellType===CellType.ColumnHeader&&o._hasColumnGroups()?o._getColumnGroup(this._row,this._col):o._getBindingColumn(t,this._row,i)}return i};Object.defineProperty(HitTestInfo.prototype,"range",{get:function(){this._rng||(this._rng=new CellRange(this._row,this._col));return this._rng},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeLeft",{get:function(){return this._considerMergedStatusOfCell(0!=(1&this._edge),"leftCol")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeTop",{get:function(){return this._considerMergedStatusOfCell(0!=(2&this._edge),"topRow")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeRight",{get:function(){return this._mergedRange&&this.panel.columns[this._mergedRange._col2]&&this.panel.columns[this._mergedRange._col2].isVisible?this._considerMergedStatusOfCell(0!=(4&this._edge),"rightCol"):0!=(4&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarRight",{get:function(){return this._considerMergedStatusOfCell(0!=(16&this._edge),"rightCol")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeBottom",{get:function(){return this._mergedRange&&this.panel.rows[this._mergedRange._row2]&&this.panel.rows[this._mergedRange._row2].isVisible?this._considerMergedStatusOfCell(0!=(8&this._edge),"bottomRow"):0!=(8&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarBottom",{get:function(){return this._considerMergedStatusOfCell(0!=(32&this._edge),"bottomRow")},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarLeft",{get:function(){return 0!=(64&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"edgeFarTop",{get:function(){return 0!=(128&this._edge)},enumerable:!0,configurable:!0});Object.defineProperty(HitTestInfo.prototype,"target",{get:function(){return this._target},enumerable:!0,configurable:!0});HitTestInfo.prototype.correctionForNegativeFrozen=function(e){var t=this._g._szClient.width,i=this._g._szClient.height;if(this._inRightFrozenArea||this._inBottomFrozenArea){if(this._inRightFrozenArea){for(var o=this._g.columns._lastFrozen;o<this._g.columns.length;o++)this._g.columns[o].isVisible&&e.x>=Math.min(this._g.columns[o].pos,t+this._g.columns[o]._antipos)&&e.x<=Math.min(this._g.columns[o].pos+this._g.columns[o].width,t)&&(this._col=o);this._col<this._g.columns.length+this._g.columns._frozenInternal&&(this._col=-1)}if(this._inBottomFrozenArea){for(o=this._g.rows._lastFrozen;o<this._g.rows.length;o++)this._g.rows[o].isVisible&&e.y>=Math.min(this._g.rows[o].pos,i+this._g.rows[o]._antipos)&&e.y<=Math.min(this._g.rows[o].pos+this._g.rows[o].height,i)&&(this._row=o);this._row<this._g.rows.length+this._g.rows._frozenInternal&&(this._row=-1)}}};HitTestInfo.prototype._considerMergedStatusOfCell=function(e,t){return!(!e||!(this.mergedRange&&this.mergedRange[t]===this.range[t]||null===this.mergedRange))};HitTestInfo._SZEDGE=[6,30];return HitTestInfo}();exports.HitTestInfo=HitTestInfo;var _LB_PAGE_SIZE=4,_EditHandler=function(){function _EditHandler(e){var t=this;this._rng=null;this._edt=null;this._edItem=null;this._edtCanceled=!1;this._list=null;this._mapSearch=null;this._fullEdit=!1;this._evtInput=null;this._evtChange=null;this._cstEdtValue=null;this._validating=!1;this._map=null;this._composing=!1;this._g=e;this._evtInput=document.createEvent("HTMLEvents");this._evtInput.initEvent("input",!0,!1);this._evtChange=document.createEvent("HTMLEvents");this._evtChange.initEvent("change",!0,!1);this._selectionChangingHandler=function(e,i){t._selectionChanging(i)};e.selectionChanging.addHandler(this._selectionChangingHandler);this._lostFocusHandler=function(){var e=wijmo_1.getActiveElement();e&&"fixed"==getComputedStyle(e).position?t.finishEditing():t._commitRowEdits()};e.lostFocus.addHandler(this._lostFocusHandler);var i=e.hostElement;this._mousedownHandler=function(i){if(!i.defaultPrevented&&0==i.button&&!e._mouseHdl._szRowCol){var o=e.hitTest(i);o.cellType!=CellType.Cell&&o.cellType!=CellType.None&&(t.finishEditing()||t.finishEditing(!0))}};e.addEventListener(i,"mousedown",this._mousedownHandler,!0);this._compositionendHandler=function(e){t._composing=!1;t._keypress.call(t,e)};e.addEventListener(i,"compositionend",this._compositionendHandler);this._compositionstartHandler=function(e){var i=t._getCustomEditor(t._g),o=null!=e?wijmo_1.closest(e.target,"."+exports.FlexGridClsNames.hostElement):null,n=wijmo_1.Control.getControl(o),r=n&&n._edtHdl?null!=n._edtHdl.activeEditor:null!=t.activeEditor;if(!i||r||t._g.imeEnabled)t._composing=!0;else{var l=window.getSelection(),s=l.rangeCount>0?l.getRangeAt(0):null,a=document.activeElement;if(null!=a){a.blur();window.getSelection().removeAllRanges();t._addRangeTimer=setTimeout((function(){null!=s&&window.getSelection().addRange(s);a.focus()}),20)}}};e.addEventListener(i,"compositionstart",this._compositionstartHandler)}_EditHandler.prototype.startEditing=function(e,t,i,o,n){void 0===e&&(e=!0);var r=this._g,l=r._selHdl.selection;t=wijmo_1.asNumber(t,!0,!0);i=wijmo_1.isString(i)?r.columns.indexOf(i):wijmo_1.asNumber(i,!0,!0);null==t&&(t=l.row);null==i&&(i=l.col);null==o&&(o=!0);if(!this._allowEdit(t,i))return!1;var s=r.getMergedRange(r.cells,t,i,!1);s||(s=new CellRange(t,i));var a=r.rows[t].dataItem;r.scrollIntoView(s.row,s.col,!0);if(!r.select(s,!0))return!1;if(!r.rows[t]||a!=r.rows[t].dataItem)return!1;if(this.activeEditor){if(s.equals(this._rng))return!0;if(!this.finishEditing())return!1}var d=new CellRangeEventArgs(r.cells,s,n);if(!r.onBeginningEdit(d))return!1;var u=r.editableCollectionView,c=!1;if(u){(c=(a=r.rows[t].dataItem)!=u.currentEditItem)&&r.onRowEditStarting(d);u.editItem(a);if(c){r.onRowEditStarted(d);this._edItem=a}}var h=r.rows[t],_=r._getBindingColumn(r.cells,t,r.columns[i]),p=_.dataMap||h.dataMap,g=DataMapEditor.RadioButtons,f=h.dataMap&&h.dataMapEditor==g||_.dataMap&&_.dataMapEditor==g;if((h.dataMap&&h.dataMapEditor==DataMapEditor.Menu||_.dataMap&&_.dataMapEditor==DataMapEditor.Menu)&&n&&"keypress"==n.type)return!1;this._fullEdit=wijmo_1.asBoolean(e);this._rng=s;this._list=null;p&&(this._map=p);if(p&&!f&&!_.editor){var m=p.useFilter?p.getFilteredItems(r.getRowDataItem(t,i)):p.getDisplayValues(a);(_.isContentHtml||h.isContentHtml)&&(m=m.map((function(e){return wijmo_1.toPlainText(e)})));this._list=m;this._mapSearch=p.search}if(f){var w=r._activeCell||r.hostElement.querySelector("."+exports.FlexGridClsNames.cell+"."+wijmo_1.ControlStateClsNames.active);if(w){var C=n?n.target:null;C instanceof HTMLSpanElement&&(C=wijmo_1.closest(C,"label"));C instanceof HTMLLabelElement&&(C=C.querySelector("input"));if(C instanceof HTMLInputElement)this._edt=C;else{var v=w.querySelectorAll("input[checked]");v.length>0?this._edt=v[0]:this._edt=w.querySelector("input")}this._updateRowHeaderCell(t)}}else s.isSingleCell?this._updateEditorCell(t,i,c):r.refresh(!1);var y=this._edt;if(y){if("checkbox"==y.type||"radio"==y.type||"menu"==y.type)this._fullEdit=!1;else if(o){var b=0,R=y.value.length,x=!1,S=wijmo_1.culture.Globalize.numberFormat["%"]||"%",E=r.getCellData(t,i,!1);wijmo_1.isNumber(E)?x=y.value.indexOf(S)>-1:null==E&&(x=/^p/i.test(_.format))&&y.value.indexOf(S)<0&&(y.value+=S);if(x){var j=y.value;b=0;R=j.length;for(;R>0&&(j[R-1]==S||" "==j[R-1]);)R--;for(;b<R&&j[b]==S;)b++}n&&"keydown"==n.type&&n.keyCode==wijmo_1.Key.Space&&(b=R);this._setSelectionRange(y,b,R,!0,wijmo_1.isEdge());wijmo_1.isIE()&&"right"==y.style.textAlign&&(y.style.paddingRight="1px")}r.onPrepareCellForEdit(d)}o&&!r.containsFocus()&&r.focus();return null!=y&&!y.disabled&&!y.readOnly};_EditHandler.prototype.finishEditing=function(e){var t=this._edt;if(!t||null==this._rng){this._removeListBox();return!0}var i=this._g,o=this._rng,n=new CellEditEndingEventArgs(i.cells,o),r=i.containsFocus();if(!e){var l=i.hostElement.querySelector("."+wijmo_1.ControlClsNames.hostElement+"."+wijmo_1.ControlStateClsNames.focused);if(l){var s=wijmo_1.Control.getControl(l);s&&s instanceof softInput().AutoComplete&&""==t.value&&s.reset();s&&(s.containsFocus()||s._focus)&&s.onLostFocus(n)}}n.cancel=e;if(!e&&i.validateEdits){if(E=this._getValidationError()){n.cancel=!0;var a=i.cells.getCellElement(o.row,o.col);if(a){this._setCellError(a,E);n.stayInEditMode=!0}}}this._cstEdtValue=null;n.data=i.cells.getCellData(o.topRow,o.leftCol,!1);if(!i.onCellEditEnding(n)&&n.stayInEditMode){r?this._selectTimer=setTimeout((function(){t.select()})):t.select();this._fullEdit=!0;return!1}if(!n.cancel){var d=null,u=!1;if(null!=this._lbx_SelectedValue){d=this._lbx_SelectedValue;u=!0}else{var c=this._cstEdtValue,h=this._map,_=this._lbx,p=i.columns[o.col].dataMapEditor===DataMapEditor.RadioButtons;if(c&&void 0!==c.value)d=c.value;else if(p&&this._edt.getAttribute("data-idx")){var g=parseInt(this._edt.getAttribute("data-idx"));d=h._cv.items[g][h.selectedValuePath]}else if(t&&_){var f=i._selHdl.selection,m=i.rows[f.row],w=i._getBindingColumn(i.cells,f.row,i.columns[f.col]);(t.value==this._lbx.selectedValue||wijmo_1.isString(this._lbx.selectedValue)&&0==this._lbx.selectedValue.indexOf(t.value))&&(this._lbx_SelectedValue=this._findKeyValue(m.dataMap||w.dataMap,w.isContentHtml||m.isContentHtml));d=this._lbx_SelectedValue}null==this._lbx_SelectedValue&&null==d&&(d=i.cellFactory.getEditorValue(i));u=null!=this._lbx_SelectedValue||p}for(var C=o.topRow;C<=o.bottomRow&&C<i.rows.length;C++)for(var v=o.leftCol;v<=o.rightCol&&v<i.columns.length;v++){w=i._getBindingColumn(i.cells,C,i.columns[v]),m=i.rows[C];var y=!(h=w&&w.dataMap||m&&m.dataMap)||h.serializeKeys;if(!u&&h){if(this.isEqualValue(h.getDisplayValue(n.data),d))continue;if(h.useFilter){for(var b=i.getRowDataItem(C,v),R=h.getFilteredItems(b),x=!1,S=0;S<R.length&&!(x=R[S][h._displayPath]==d);S++);if(!x)continue}}if(!i.cells.setCellData(C,v,d,y,!1,u)&&i.validateEdits){var E;if(E=this._getValidationError(!0)){n.cancel=!0;var j=i.cells.getCellElement(o.row,o.col);if(j){this._setCellError(j,E);n.stayInEditMode=!0}return!1}}}t.value==this._edtValue&&t.dispatchEvent(this._evtChange)}this._edt=null;this._rng=null;this._list=null;this._edtValue=null;this._edtCanceled=n.cancel;this._removeListBox();this._lbx_SelectedValue=null;var H=wijmo_1.closest(t,"."+exports.FlexGridClsNames.cell);if(wijmo_1.contains(H,wijmo_1.getActiveElement())){i._setFocusNoScroll(H);i._isScrollingByWheel=!1}!n.cancel&&n.refresh&&i._refreshOnEdit?i.refresh(!1):this._updateEditorCell(o.row,o.col,!1);r&&i.focus();i.onCellEditEnded(n);return!0};_EditHandler.prototype._setSelectionRange=function(e,t,i,o,n){void 0===o&&(o=!0);void 0===n&&(n=!1);if(!n)return wijmo_1.setSelectionRange(e,t,i,o);if(wijmo_1.contains(document.body,e)&&!e.disabled&&e.offsetHeight){try{e.setSelectionRange(t,i,"backward")}catch(e){}if(o)try{this._g._setFocusNoScroll(e);return!0}catch(e){}}return!1};_EditHandler.prototype._setCustomEditorValue=function(e){this._cstEdtValue={value:e}};_EditHandler.prototype._getCustomEditor=function(e){var t=null,i=e.selection;if(null!=i&&i.isValid){var o=e._getBindingColumn(e.cells,i.row,e.columns[i.col]);t=o&&o._edt}return t};_EditHandler.prototype._setCellError=function(e,t){var i=this._g;""==t&&(t=null);wijmo_1.toggleClass(e,wijmo_1.ControlStateClsNames.invalid,null!=t);wijmo_1.setAttribute(e,"aria-invalid",null!=t?"true":null);var o=i.errorTip,n=i.activeEditor;if(o){o.setTooltip(e,t);n&&wijmo_1.contains(e,n)&&wijmo_1.setAttribute(n,"title","")}else wijmo_1.setAttribute(e,"title",t);n&&e==i.activeCell&&!wijmo_1.contains(e,n)&&o&&o.setTooltip(n,t)};Object.defineProperty(_EditHandler.prototype,"activeEditor",{get:function(){return this._edt},enumerable:!0,configurable:!0});Object.defineProperty(_EditHandler.prototype,"editRange",{get:function(){return this._rng},enumerable:!0,configurable:!0});_EditHandler.prototype.getClipString=function(e,t,i,o){var n,r=this,l=this._g,s=l.selectionMode,a=[],d=0!=(t&ClipStringOptions.CSV),u=d?"\r\n":"\n",c=d?",":"\t",h=0!=(t&ClipStringOptions.InvisibleRows),_=SelectionMode,p=null!=e;if(!e&&s!=_.ListBox)for(var g=l.rows,f=0;f<g.length;f++)if(g[f].isSelected){s=_.ListBox;break}if(!e){l._selHdl._expandSelection();e=l.selection;switch(s){case _.Row:case _.RowRange:case _.ListBox:e.col=0;e.col2=l.columns.length-1;break;case _.MultiRange:var m=l.selectedRanges;if(m.length>1){var w=this._sameCols(m),C=this._sameRows(m);if(w||C){(m=m.slice()).sort((function(e,t){var i=e.topRow-t.topRow;return i||e.leftCol-t.leftCol}));for(var v=0;v<m.length;v++)for(var y=m[v],b=v+1;b<m.length;b++)if(y.contains(m[b])){m.splice(b,1);b--}if(w){var R=[];m.forEach((function(e){R.push(r.getClipString(e,t,i,o));i=!1}));return R.join(u)}if(C){var x;m.forEach((function(e){var n=r.getClipString(e,t,i,o).split(u);if(null==x){x=n;o=!1}else n.forEach((function(e,t){x[t]+=c+e}))}));return x.join(u)}}}}}var S=e.col>-1&&e.col2>-1;i&&S&&(n=l.columnHeaders).rows.forEach((function(i,l){if(h||i.isVisible){var s=r._getRowClipString(n,l,e,t,o);a.push(s)}}));if(e.row>-1&&e.row2>-1){n=l.cells;if(s!=_.ListBox||p){wijmo_1.assert(e.bottomRow<n.rows.length,"Row index must be less than the number of rows.");for(v=e.topRow;v<=e.bottomRow;v++)if(h||n.rows[v].isVisible){var E=this._getRowClipString(n,v,e,t,o);a.push(E)}}else n.rows.forEach((function(i,l){if(i.isSelected&&(h||i.isVisible)){var s=r._getRowClipString(n,l,e,t,o);a.push(s)}}))}return a.join(u)};_EditHandler.prototype._getRowClipString=function(e,t,i,o,n){var r=[],l=e.rows[t],s=ClipStringOptions,a=0!=(o&s.CSV),d=0!=(o&s.InvisibleColumns),u=0==(o&s.Unformatted),c=0!=(o&s.SkipMerged),h=e.grid;if(l.isVisible){if(n)for(var _=e.cellType==CellType.ColumnHeader?h.topLeftCells:h.rowHeaders,p=0;p<_.columns.length;p++)if(d||_.columns[p].isVisible){var g=_.getCellData(t,p,!0);c&&this._skipMergedCell(e,null,t,p)&&(g="");var f=new CellRangeEventArgs(e,new CellRange(t,p),g);h.onGettingCellClipString(f);r.push(this._getCellClipString(f.data,o))}var m=l instanceof GroupRow?l:null,w=m&&(h.groupSummaryPosition===GroupSummaryPosition.Bottom||h.groupSummaryPosition===GroupSummaryPosition.Auto&&!m.isCollapsed),C=m&&!m.isSummary&&w;if(i.col>-1&&i.col2>-1){wijmo_1.assert(i.rightCol<e.columns.length,"Column index must be less than the number of columns.");for(p=i.leftCol;p<=i.rightCol;p++)if(d||e.columns[p].isVisible){g=e.getCellData(t,p,u);C&&p!=e.columns.firstVisibleIndex&&(g=null);!g&&l instanceof GroupRow&&p==e.columns.firstVisibleIndex&&(g=wijmo_1.toPlainText(l.getGroupHeader()));c&&this._skipMergedCell(e,null,t,p)&&(g="");f=new CellRangeEventArgs(e,new CellRange(t,p),g);h.onGettingCellClipString(f);r.push(this._getCellClipString(f.data,o))}}}return r.join(a?",":"\t")};_EditHandler.prototype._skipMergedCell=function(e,t,i,o){var n=e.grid.getMergedRange(e,i,o,!1);if(n){if(t){n.row=Math.max(t.topRow,n.row);n.col=Math.max(t.leftCol,n.col)}if(n.row!=i||n.col!=o)return!0}return!1};_EditHandler.prototype._getCellClipString=function(e,t){wijmo_1.isString(e)||(e=wijmo_1.isDate(e)?e.toJSON():null!=e?e.toString():"");e=e.replace(/\t/g," ");var i=0!=(t&ClipStringOptions.QuoteAll);(i=i||/\n|^"|"$/.test(e))||0==(t&ClipStringOptions.CSV)||(i=e.indexOf(",")>-1);i&&(e='"'+(e=e.replace(/"/g,'""'))+'"');return e};_EditHandler.prototype._sameRows=function(e){for(var t=e[0],i=1;i<e.length;i++)if(e[i].topRow!=t.topRow||e[i].bottomRow!=t.bottomRow)return!1;return!0};_EditHandler.prototype._sameCols=function(e){for(var t=e[0],i=1;i<e.length;i++)if(e[i].leftCol!=t.leftCol||e[i].rightCol!=t.rightCol)return!1;return!0};_EditHandler.prototype.setClipString=function(e,t){var i,o,n=this,r=this._g,l=r.editableCollectionView,s=this._parseClipString(wijmo_1.asString(e)),a=r._getRowsPerItem(),d=r.selection,u=!1,c=s.length;t&&(d=t);i=r.rows[d.topRow]instanceof _NewRowTemplate&&r.newRowAtTop;o=d.rowSpan>1&&1===a||d.rowSpan-a!=0&&a>1;if(i&&o){u=!0;r.select(new CellRange(d.topRow,d.leftCol,d.topRow,d.rightCol))}var h=null==t,_=SelectionMode;if(h){r._selHdl._expandSelection();t=r.selection;switch(r.selectionMode){case _.Row:case _.RowRange:case _.ListBox:t.col=0;t.col2=r.columns.length-1;break;case _.MultiRange:var p=r.selectedRanges;if(p.length>1){l&&l.beginUpdate();p.forEach((function(t){r.setClipString(e,t)}));l&&l.endUpdate();r.selectedRanges=p;return}}}t=wijmo_1.asType(t,CellRange);this._expandClipRows(s,t);u||(c=s.length);var g=0;if(s.length)for(var f=t.leftCol,m=r.columns.length,w=0;w<s[0].length;w++)for(var C=f+w+g;C<m&&!r.columns[C].visible;){g++;C++}var v=h?new CellRange(t.topRow,t.leftCol,Math.min(t.topRow+s.length-1,r.rows.length-1),Math.min(t.leftCol+s[0].length-1+g,r.columns.length-1)):t,y=new CellRangeEventArgs(r.cells,v,e);if(!r.onPasting(y))return!1;v=new CellRange(t.topRow,t.leftCol);var b=new CellRangeEventArgs(r.cells,new CellRange(t.topRow,-1)),R=!1,x=0,S=t.topRow,E=r.rows,j=r.columns,H=s.length>a,F=this._deferPaste(t,s.length);wijmo_1.assert(a>=1,"Invalid RPI value = "+a);r.deferUpdate((function(){var e=-1;if(l&&F){e=l.currentPosition;l.beginUpdate()}for(var i=0;i<c&&S<E.length;i++,S++){var o=E[S];if(o.isVisible){if(!H||!o.isReadOnly){var d=o.dataItem,u=l?l.currentEditItem:null;if(u&&d!=u){r.onRowEditEnding(b);r.onRowEditEnded(b)}if(o instanceof _NewRowTemplate&&l){if(F){o.dataItem=l.addNew();b._rng.setRange(r.newRowAtTop?0:S,-1);if(!r.onRowEditStarting(b)){S--;l.cancelNew();continue}r.onRowEditStarted(b)}else if(1==a||(S+1)%a==1||0==i){b._rng.setRange(r.newRowAtTop?S%a:S,-1);if(!r.onRowEditStarting(b)){S--;continue}r.onRowEditStarted(b)}}else if(d!=u){b._rng.setRange(S,-1);r.onRowEditStarting(b);r.onRowEditStarted(b)}for(var h=s[i],_=t.leftCol,p=0;p<h.length&&_<j.length;p++,_++){var g=j[_];if(g.isVisible){if(!H||!g.isReadOnly){var f=r.getMergedRange(r.cells,S,_,!1);if(!(f&&(f.leftCol!=_||f.topRow!=S))&&n._allowEdit(S,_)){var m=h[p],w=g.maxLength||o.maxLength;w&&(m=m.substr(0,w));var C=new CellRangeEventArgs(r.cells,new CellRange(S+x,_),m);if(r.onPastingCell(C)){if(l){l.editItem(d);n._edItem=l.currentEditItem}var y=r.getCellData(S,_,!1),z=C.data,T=softInput();if(T){var M=r._getBindingColumn(r.cells,S,r.columns[_]),G=M.editor,I=null,P=null;if(G instanceof T.InputNumber){I=G.clamp.bind(G);if(z!=G.text){G._oldText=G.text;G._setText(z)}z=G.text;P=wijmo_1.DataType.Number}else if(G instanceof T.InputDate||G instanceof T.InputTime){I=G._clamp.bind(G);P=wijmo_1.DataType.Date}if(I){z=wijmo_1.changeType(z,P,M.format,y);wijmo_1.getType(z)==P&&(z=I(z))}}if((r.pasteEmptyCells||""!==z)&&r.setCellData(S,_,z)){C.data=y;r.onPastedCell(C);R=!0}}v.row2=Math.max(v.row2,S+x);v.col2=Math.max(v.col2,_)}}}else p--}if(n._edItem&&l instanceof wijmo_1.CollectionView){var A=new wijmo_1.NotifyCollectionChangedEventArgs(wijmo_1.NotifyCollectionChangedAction.Change,n._edItem,S);l.onCollectionChanged(A,l._edtClone)}if(o instanceof _NewRowTemplate&&l)if(F){o.dataItem=null;if(R){b._rng.setRange(r.newRowAtTop?0:S,-1);r.onRowEditEnding(b);r.onRowEditEnded(b);S--;x++;l.commitNew()}else l.cancelNew()}else if(H&&a>1&&(S+1)%a==0&&R){b._rng.setRange(r.newRowAtTop?S%a:S,-1);r.onRowEditEnding(b);r.onRowEditEnded(b);S-=a;x++}}}else i--}if(l)if(F){if(l.currentEditItem){l.commitEdit();r.onRowEditEnding(b);r.onRowEditEnded(b)}l.moveCurrentToPosition(e);l.endUpdate(!0)}else{var D=l.currentAddItem;!D&&0==t.row&&r.newRowAtTop&&E[0]instanceof _NewRowTemplate&&E[0].dataItem&&"{}"!=JSON.stringify(E[0].dataItem)&&(D=E[0].dataItem);if(D){l.editItem(D);n._edItem=D}else E[0]instanceof _NewRowTemplate&&E[0].dataItem&&(E[0].dataItem=null)}v.rowSpan>1&&0==v.topRow&&E[0]instanceof _NewRowTemplate&&(v.row=v.row2=0);r.select(v)}));r.onPasted(y);if(R&&wijmo_1.closest(r.hostElement,"form")){var z=document.createEvent("HTMLEvents"),T=wijmo_1.createElement("<input>",r.hostElement);z.initEvent("change",!0,!1);T.dispatchEvent(z);wijmo_1.removeChild(T)}};_EditHandler.prototype._deferPaste=function(e,t){var i=this._g.rows,o=i.length;if(t>1){if(o>1&&i[0].dataItem!=i[1].dataItem)return!0;if(1==o&&i[0]instanceof _NewRowTemplate)return!0}return!1};_EditHandler.prototype._parseClipString=function(e){var t=[],i=(e=(e=e.replace(/\r\n/g,"\n").replace(/\r/g,"\n")).replace(/\n$/,"")).length,isTabOrNewLineChar=function(e){return"\n"===e||"\t"===e},o=0,n=0;for(o=0;o<i;o++){var r=!1,l=!1,s=!1;if('"'===e[o]){for(var a=o+1,d=!1;a<i;)if('"'===e[a]){if(!(a+1<i&&'"'===e[a+1])){d=!0;break}a+=2}else a++;d&&(r=!0)}for(n=o;n<i&&!s;n++){var u=e[n];if('"'===u)r&&(l=!l);else if(isTabOrNewLineChar(u)&&!l){this._parseClipCell(t,e,o,n,"\n"==u);o=n;n==i-1&&(o=n+1);s=!0}}if(n==i){this._parseClipCell(t,e,o,n,!1);break}}0==t.length&&t.push([""]);return t};_EditHandler.prototype._parseClipCell=function(e,t,i,o,n){e.length||e.push([]);var r=t.substr(i,o-i),l=r.length;if(l>2&&'"'==r[0]&&'"'==r[l-1]){var s=r.substr(1,l-2),unquotedStringHasChar=function(e){return s.indexOf(e)>-1};(unquotedStringHasChar('""')||unquotedStringHasChar("\t")||unquotedStringHasChar("\n"))&&(r=s.replace(/""/g,'"'))}else"\t"==r&&(r="");e[e.length-1].push(r);n&&e.push([])};_EditHandler.prototype._expandClipRows=function(e,t){for(var i=e.length,o=0,n=0;n<i;n++)o=Math.max(o,e[n].length);for(var r=this._g,l=0,s=0,a=r._getRowsPerItem(),d=t.topRow;d<=t.bottomRow;d++){r.rows[d].isVisible&&l++;if(0===d&&r.allowAddNew&&r.newRowAtTop&&a<=1)break}for(var u=t.leftCol;u<=t.rightCol;u++)r.columns[u].isVisible&&s++;if(l>1||s>1){1==l&&(l=i);1==s&&(s=o);if(s%o==0&&l%i==0){for(u=o;u<s;u++)for(d=0;d<i;d++)e[d].push(e[d%i][u%o]);for(d=i;d<l;d++)e.push(e[d%i])}}};_EditHandler.prototype._updateEditorCell=function(e,t,i){var o=this._g;if(o._useFrozenDiv()&&(o.rows.isFrozen(e)||o.columns.isFrozen(t))||o.columns._frozenInternal<0||o._hasPendingUpdates())o.refresh(!1);else{var n=o.cells.getCellElement(e,t);if(n&&o.onUpdatingView(new wijmo_1.CancelEventArgs)){this._updateCell(n);(i||o._getHasValidation())&&this._updateRowHeaderCell(e);o.onUpdatedView()}}};_EditHandler.prototype._updateRowHeaderCell=function(e){var t=this._g;if(t.headersVisibility&HeadersVisibility.Row){var i=t.rowHeaders,o=t._getEditColumnIndex(),n=i.getCellElement(e,o);n&&this._updateCell(n)}};_EditHandler.prototype._updateCell=function(e){var t=new HitTestInfo(e,null),i=FlexGrid._WJS_UPDATING;if(t.panel){wijmo_1.addClass(e,i);t.grid.cellFactory.updateCell(t.panel,t.row,t.col,e,t.range);wijmo_1.removeClass(e,i)}};_EditHandler.prototype._getValidationError=function(e){var t=this,i=this._g,o="";if(i&&this._rng&&!this._validating){var n=this._rng.row,r=this._rng.col,l=i.activeEditor,s=i.cellFactory.getEditorValue(i),a=i.getCellData(n,r,!1);e&&(o=i._getError(i.cells,n,r,!0));if(!o&&i._getHasValidation()){l&&(o=l.validationMessage);if(!o){var d=i.columns[r],u=i.rows[n];!i._getBindingColumn(i.cells,n,d).getIsRequired(u)||null!=s&&""!==s||(o=this._getRequiredMsg())}if(!o&&i.setCellData(n,r,s,!0,!1)){o=i._getError(i.cells,n,r,!1);i.setCellData(n,r,a,!1,!1)}}if(!o){var c=wijmo_1.Control.getControl(wijmo_1.closest(l,"."+wijmo_1.ControlClsNames.hostElement));c==i&&wijmo_1.hasClass(l,exports.FlexGridClsNames.gridIme)&&null!=i.activeCell&&(c=i.activeCell.firstChild["$WJ-CTRL"]);if(c&&c!=i&&c.invalidInput.hasHandlers){this._invInputHandler=function(e,l){if(l.cancel){o=i._getError(i.cells,n,r,!0)||t._getBadInputMsg();l.cancel=""!=o}};this._validating=!0;var h=l.value;c.invalidInput.addHandler(this._invInputHandler);if(c._containsFocus()){var _=wijmo_1.closest(c.hostElement,"."+exports.FlexGridClsNames.cell);_&&_.focus()}var p=c.isDroppedDown;c.onLostFocus();c.invalidInput.removeHandler(this._invInputHandler);l.value=h;if(o)l.select();else if(p){c.isDroppedDown=!0;l.select()}this._validating=!1}}}return o};Object.defineProperty(_EditHandler.prototype,"validate",{get:function(){return!this._getValidationError()},enumerable:!0,configurable:!0});_EditHandler.prototype._getRequiredMsg=function(){if(!_EditHandler._msgRequired){var e=document.createElement("input");e.required=!0;_EditHandler._msgRequired=e.validationMessage}return _EditHandler._msgRequired};_EditHandler.prototype._getBadInputMsg=function(){if(!_EditHandler._msgBadInput){var e=document.createElement("input");e.pattern="x";e.value="a";_EditHandler._msgBadInput=e.validationMessage||"Bad Input"}return _EditHandler._msgBadInput};_EditHandler.prototype._allowEdit=function(e,t){var i=this._g;if(i.isReadOnly||i.selectionMode==SelectionMode.None)return!1;if(i.collectionView&&!i.editableCollectionView)return!1;if(null!=e){if(e<0||e>=i.rows.length)return!1;var o=i.rows[e];if(!o||o.isReadOnly||!o.isVisible)return!1}if(null!=t){if(t<0||t>=i.columns.length)return!1;var n=i._getBindingColumn(i.cells,e,i.columns[t]);if(!n||n.isReadOnly||!n.isVisible)return!1}return!0};_EditHandler.prototype._commitRowEdits=function(){var e=this._g;if(this.finishEditing()&&this._edItem){var t=e.editableCollectionView;if(t&&(t.currentEditItem||t.currentAddItem)){var i=new CellRangeEventArgs(e.cells,e.selection);e.onRowEditEnding(i);t.commitEdit();e.onRowEditEnded(i)}this._edItem=null}};_EditHandler.prototype._keydown=function(e){var t=this._edt;switch(e.keyCode){case wijmo_1.Key.F2:this._fullEdit=!this._fullEdit;e.preventDefault();return!0;case wijmo_1.Key.F4:this._toggleListBox(e);e.preventDefault();return!0;case wijmo_1.Key.Space:if(t&&"checkbox"==t.type&&!t.disabled&&!t.readOnly){wijmo_1.setChecked(t,t.indeterminate||!t.checked);this.finishEditing();e.preventDefault()}return!0;case wijmo_1.Key.Enter:e.preventDefault();if(t&&e.altKey){var i=e.target;if(i instanceof HTMLTextAreaElement&&"soft"==i.wrap){if(this._composing){i.blur();i.focus()}i.style.setProperty("ime-mode","auto","important");var o=i.value,n=i.selectionStart,r=i.selectionEnd;i.value=o.substr(0,n)+"\n"+o.substr(r);wijmo_1.setSelectionRange(i,n+1);i.blur();i.focus();i.style.imeMode=""}return!0}if(t&&this._lbx){var l=this._g,s=l._selHdl.selection,a=l.rows[s.row],d=l._getBindingColumn(l.cells,s.row,l.columns[s.col]);null!=t.value&&(t.value!=this._lbx.selectedValue&&0!=(wijmo_1.isString(this._lbx.selectedValue)&&this._lbx.selectedValue.indexOf(t.value))||""==t.value&&null!=this._lbx.selectedValue||(this._lbx_SelectedValue=this._findKeyValue(a.dataMap||d.dataMap,d.isContentHtml||a.isContentHtml)));this._toggleListBox(e);this.finishEditing();return!0}return!this.finishEditing();case wijmo_1.Key.Tab:e.preventDefault();return!this.finishEditing();case wijmo_1.Key.Escape:e.preventDefault();this.finishEditing(!0);return!0;case wijmo_1.Key.Up:case wijmo_1.Key.Down:case wijmo_1.Key.Left:case wijmo_1.Key.Right:case wijmo_1.Key.PageUp:case wijmo_1.Key.PageDown:case wijmo_1.Key.Home:case wijmo_1.Key.End:if(this._lbx)return this._keydownListBox(e);if(e.altKey)switch(e.keyCode){case wijmo_1.Key.Up:case wijmo_1.Key.Down:this._toggleListBox(e);e.preventDefault();return!0}if(this._fullEdit)switch(e.keyCode){case wijmo_1.Key.PageUp:case wijmo_1.Key.PageDown:e.preventDefault()}else if(this.finishEditing())return!1}return!0};_EditHandler.prototype._keydownListBox=function(e){var t=!0;if(this._lbx)switch(e.keyCode){case wijmo_1.Key.Up:e.altKey?this._toggleListBox(e):this._lbx.selectedIndex>0&&this._lbx.selectedIndex--;break;case wijmo_1.Key.Down:e.altKey?this._toggleListBox(e):this._lbx.selectedIndex++;break;case wijmo_1.Key.Home:case wijmo_1.Key.PageUp:this._lbx.selectedIndex=0;break;case wijmo_1.Key.End:case wijmo_1.Key.PageDown:this._lbx.selectedIndex=this._lbx.collectionView.items.length-1;break;default:t=!1}if(t){e.preventDefault();return!0}return!1};_EditHandler.prototype._keypress=function(e){if("AltLeft"!=e.code&&"AltRight"!=e.code){var t=this._edt,i=null!=e.key&&e.key.length>0?e.key.charCodeAt(0):32,o=this._list;if(wijmo_1.isEdge()){var n=t;n&&(1==n.value.length||0==n.selectionStart&&n.selectionEnd==n.value.length)&&(wijmo_1.Control.sharedState.InvalidScroll=!0)}if(t&&"checkbox"!=t.type&&wijmo_1.getActiveElement()==t&&o&&o.length>0&&i>=32){var r=t.selectionStart,l=t.value.substr(0,r);if(""==l&&null==e.key)return;if(e.target==t&&i){l+=String.fromCharCode(i);r++}var s=this._mapSearch,a=-1,d=this._map;if(s)for(var u=0;u<o.length;u++){var c=o[u];if(s(null==c?c:c.toString(),l)){a=u;break}}else d&&d.useFilter?(a=this._findStringInObjArray(o,d.displayMemberPath,l,!0))<0&&!this._g.caseSensitiveSearch&&(a=this._findStringInObjArray(o,d.displayMemberPath,l,!1)):(a=this._findString(o,l,!0))<0&&!this._g.caseSensitiveSearch&&(a=this._findString(o,l,!1));if(a>-1){var h=this._lbx;h&&(h.selectedIndex=a);var _=null;_=d&&d.useFilter?o[a][d.displayMemberPath]:o[a];t.value=_;wijmo_1.setSelectionRange(t,r,t.value.length);t.dispatchEvent(this._evtInput);e.preventDefault&&e.preventDefault()}else this._lbx&&(this._lbx_SelectedValue=null)}}else e.preventDefault()};_EditHandler.prototype._findString=function(e,t,i){i||(t=t.toLowerCase());for(var o=0;o<e.length;o++){var n=e[o];if(null!=n){n=n.toString();i||(n=n.toLowerCase());if(0==n.indexOf(t))return o}}return-1};_EditHandler.prototype._findStringInObjArray=function(e,t,i,o){o||(i=i.toLowerCase());for(var n=0;n<e.length;n++){var r=e[n];if(null!=r){r=r[t].toString();o||(r=r.toLowerCase());if(0==r.indexOf(i))return n}}return-1};_EditHandler.prototype._toggleListBox=function(e,t){var i=this._g,o=i._selHdl.selection,n=i.isTouching;t||(t=o);if(this._lbx){this._removeListBox();if(o.intersects(t)){i.activeEditor?i.activeEditor.focus():i.containsFocus()||i.focus();return!0}}if(!t.isValid)return!1;var r=i.rows[t.row],l=i._getBindingColumn(i.cells,t.row,i.columns[t.col]),s=r.dataMap||l.dataMap,a=i._getMapEditor(r,l);if(!s||a!=DataMapEditor.DropDownList&&a!=DataMapEditor.Menu||!softInput())return!1;if(null!=l.editor)return!1;if(!t.intersects(i.editRange)&&!this.startEditing(!0,t.row,t.col,!n,e))return!1;this._lbx=this._createListBox();var d=this._lbx;requestAnimationFrame((function(){return d.showSelection()}));n&&d.focus();return!0};_EditHandler.prototype._createListBox=function(){var e=this,t=this._g,i=t.activeEditor,o=this._rng,n=t.rows[o.row],r=t._getBindingColumn(t.cells,o.row,t.columns[o.col]),l=r.isContentHtml||n.isContentHtml,s=r.dataMap||n.dataMap,a=r.dropDownCssClass||n.dropDownCssClass,d=document.createElement("div");this._removeListBox();wijmo_1.addClass(d,mInput.DropDownClsNames.dropDownPanel+" "+exports.FlexGridClsNames.gridListBox);wijmo_1.addClass(d,a);wijmo_1.setAttribute(d,"dir",t.rightToLeft?"rtl":"ltr");var u=i?i.value:t.getCellData(o.row,o.col,!0),c=new mInput.ListBox(d,{maxHeight:n.renderHeight*_LB_PAGE_SIZE,isContentHtml:l}),h=t.getRowDataItem(o.row,o.col);if(s.useFilter){c.itemsSource=s.getFilteredItems(h);c.displayMemberPath=s._displayPath;c.selectedValuePath=s._keyPath}else c.itemsSource=s.getDisplayValues(h);if(s._displayPath==s._keyPath)c.selectedValue=u;else{var _=t.getCellData(o.row,o.col,!1),p=-1,g=this._findDuplicateValues(s,u,l),f=s._cv.items.findIndex((function(t){return e.isEqualValue(t[s._keyPath],_,l)}));if(f>-1){var m=s._cv.items[f][s._displayPath];if(this.isEqualValue(u,m,l))if(1==g.length)p=f>=c.itemsSource.length||!this.isEqualValue(this._getListBoxItemField(c,s.useFilter,f),u,l)?c.itemsSource.findIndex((function(t){return e.isEqualValue(m,s.useFilter?t[c.displayMemberPath]:t,l)})):f;else for(var w=-1,C=0;C<c.itemsSource.length;C++)if(this.isEqualValue(this._getListBoxItemField(c,s.useFilter,C),m,l)){w++;if(this.isEqualValue(g[w],_,l)){p=C;break}}}p<0&&(p=c.itemsSource.findIndex((function(t){return e.isEqualValue(u,s.useFilter?t[c.displayMemberPath]:t,l)})));p>=0?c.selectedIndex=p:c.selectedValue=null}c.addEventListener(d,"keydown",(function(i){switch(i.keyCode){case wijmo_1.Key.Enter:case wijmo_1.Key.Escape:e._removeListBox();t.focus()}}));c.addEventListener(d,"click",(function(){e._lbx&&(e._lbx_SelectedValue=e._findKeyValue(s,l));e._removeListBox();t.focus();e.finishEditing()}));c.gotFocus.addHandler((function(){c.containsFocus()&&i&&!wijmo_1.isEdge()&&i.focus()}));c.selectedIndexChanged.addHandler((function(){var i=t.activeEditor;if(i){var o=e._map,n=null==o?null:o._displayPath,r=e._list[c.selectedIndex];i.value=void 0===r||null==r?"":"object"==typeof r&&null!=n&&void 0!==r[n]?r[n]:r;i.dispatchEvent(e._evtInput);wijmo_1.setSelectionRange(i,0,i.value.length)}}));var v=t.cells.getCellElement(o.row,o.col);if(v){wijmo_1.showPopup(d,v,!1,!1,!1);var y=v.querySelector("."+CellFactory._WJC_DROPDOWN);wijmo_1.setAttribute(y,"aria-expanded",!0)}else{wijmo_1.showPopup(d,t.getCellBoundingRect(o.row,o.col));d[wijmo_1.Control._OWNR_KEY]=t.hostElement}return c};_EditHandler.prototype._getListBoxItemField=function(e,t,i){return i>=e.itemsSource.length?null:t?e.itemsSource[i][e.displayMemberPath]:e.itemsSource[i]};_EditHandler.prototype._findKeyValue=function(e,t){void 0===t&&(t=!1);if(e.useFilter){if(this._lbx.selectedValue)return this._lbx.selectedValue;if(this._lbx.selectedItem&&this._lbx.selectedValuePath)return this._lbx.selectedItem[this._lbx.selectedValuePath]}var i=this._lbx.selectedValue,o=this._findDuplicateValues(e,i,t),n=e.getKeyValue(i);if(this._lbx.selectedIndex>0&&o.length>1){for(var r=-1,l=0;l<=this._lbx.selectedIndex;l++)this.isEqualValue(this._lbx.itemsSource[l],i,t)&&r++;r>=0&&(n=o[r])}return n};_EditHandler.prototype._findDuplicateValues=function(e,t,i){void 0===i&&(i=!1);for(var o=[],n=e.getKeyValues(),r=0;r<n.length;r++)this.isEqualValue(e.getDisplayValue(n[r]),t,i)&&o.push(n[r]);return o};_EditHandler.prototype._removeListBox=function(){var e=this._lbx;if(e){this._lbx=null;wijmo_1.hidePopup(e.hostElement,(function(){e.dispose()}))}};_EditHandler.prototype.isEqualValue=function(e,t,i){void 0===i&&(i=!1);if(e instanceof Date&&t instanceof Date)return e.getTime()==t.getTime();null!=e&&null!=e||(e="");null!=t&&null!=t||(t="");Number.isNaN(e)&&(e="NaN");Number.isNaN(t)&&(t="NaN");if(i){wijmo_1.isString(e)&&e.indexOf("<")>-1&&(e=wijmo_1.toPlainText(e));wijmo_1.isString(t)&&t.indexOf("<")>-1&&(t=wijmo_1.toPlainText(t))}return e.toString()==t.toString()};_EditHandler.prototype._selectionChanging=function(e){var t=this;if(!this._g.isReadOnly)if(this.finishEditing()){var i=this._g._selHdl.selection.row;if(i!=e.row){var o=this._g.rows.length;if((i>-1&&i<o?this._g.rows[i].dataItem:null)!=(e.row>-1&&e.row<o?this._g.rows[e.row].dataItem:null)){var n=!this._g.rows[i]||this._g.rows[i]&&Object.getPrototypeOf(this._g.rows[i])!==Row.prototype?null:this._g.getEmptyRequiredCell(i);if(this._g.isAddingInvalidNewRow(i)){this._startEditingTimer=setTimeout((function(){t._g.select(new CellRange(i,n));t.startEditing(!0,i,n,!0,e)}));e.cancel=!0}else this._commitRowEdits()}}}else e.cancel=!0};_EditHandler.prototype.dispose=function(){if(this._g){this._g.selectionChanging.removeHandler(this._selectionChangingHandler);this._g.lostFocus.removeHandler(this._lostFocusHandler);var e=this._g.hostElement;this._g.removeEventListener(e,"mousedown",this._mousedownHandler,!0);this._g.removeEventListener(e,"compositionend",this._compositionendHandler);this._g.removeEventListener(e,"compositionstart",this._compositionstartHandler)}var t=wijmo_1.Control.getControl(wijmo_1.closest(this._g.activeEditor,"."+wijmo_1.ControlClsNames.hostElement));t&&t.invalidInput.removeHandler(this._invInputHandler);this._lbx&&this._removeListBox();if(this._selectTimer){clearTimeout(this._selectTimer);this._selectTimer=null}if(this._startEditingTimer){clearTimeout(this._startEditingTimer);this._startEditingTimer=null}if(this._addRangeTimer){clearTimeout(this._addRangeTimer);this._addRangeTimer=null}wijmo_1.removeChild(this._edt);this._edt=null;this._edItem=null;this._list=null;this._map=null;this._g=null};_EditHandler._msgRequired="";_EditHandler._msgBadInput="";return _EditHandler}();exports._EditHandler=_EditHandler;var AllowResizing,AutoSizeMode,AllowDragging,_AR_ALLCELLS=4,_AR_OVERFLOW=8,_WJC_DRAGSRC=wijmo_1.ControlStateClsNames.dragSrc,_WJC_FLEXGRID=exports.FlexGridClsNames.hostElement;!function(e){e[e.None=0]="None";e[e.Columns=1]="Columns";e[e.Rows=2]="Rows";e[e.Both=3]="Both";e[e.ColumnsAllCells=e.Columns|_AR_ALLCELLS]="ColumnsAllCells";e[e.RowsAllCells=e.Rows|_AR_ALLCELLS]="RowsAllCells";e[e.BothAllCells=e.Both|_AR_ALLCELLS]="BothAllCells";e[e.ColumnsOverflow=e.Columns|_AR_OVERFLOW]="ColumnsOverflow";e[e.RowsOverflow=e.Rows|_AR_OVERFLOW]="RowsOverflow";e[e.BothOverflow=e.Both|_AR_OVERFLOW]="BothOverflow";e[e.ColumnsAllCellsOverflow=e.ColumnsAllCells|_AR_OVERFLOW]="ColumnsAllCellsOverflow";e[e.RowsAllCellsOverflow=e.RowsAllCells|_AR_OVERFLOW]="RowsAllCellsOverflow";e[e.BothAllCellsOverflow=e.BothAllCells|_AR_OVERFLOW]="BothAllCellsOverflow"}(AllowResizing=exports.AllowResizing||(exports.AllowResizing={}));!function(e){e[e.None=0]="None";e[e.Headers=1]="Headers";e[e.Cells=2]="Cells";e[e.Both=3]="Both"}(AutoSizeMode=exports.AutoSizeMode||(exports.AutoSizeMode={}));!function(e){e[e.None=0]="None";e[e.Columns=1]="Columns";e[e.Rows=2]="Rows";e[e.Both=3]="Both"}(AllowDragging=exports.AllowDragging||(exports.AllowDragging={}));var _MouseHandler=function(){function _MouseHandler(e){var t=this;this._wasAllRowColHidden=!1;this._scrollbarStatusAtMouseDown=null;this._mousedownPoint=null;var i=e.hostElement,o=e.addEventListener.bind(e),n=e.removeEventListener.bind(e);this._g=e;o(i,"mousedown",(function(i){e._rcBounds=null;var r=i.target,l=wijmo_1.closestClass(r,_WJC_FLEXGRID),s=i.defaultPrevented&&null!=wijmo_1.closestClass(r,CellFactory._WJC_DROPDOWN);if(s&&null==(l=wijmo_1.closestClass(document.activeElement,_WJC_FLEXGRID))){var a=wijmo_1.Control.getControl(document.activeElement),d=null;a&&a.hostElement&&(a.hostElement["$WJ-OWNR"]&&a.hostElement["$WJ-OWNR"]["$WJ-CTRL"]?d=a.hostElement["$WJ-OWNR"]["$WJ-CTRL"].inputElement:a.hostElement.parentElement&&a.hostElement.parentElement["$WJ-OWNR"]&&a.hostElement.parentElement["$WJ-OWNR"]["$WJ-CTRL"]&&(d=a.hostElement.parentElement["$WJ-OWNR"]["$WJ-CTRL"].inputElement));l=wijmo_1.closestClass(d,_WJC_FLEXGRID)}var u=l&&l!=e.hostElement,c=u&&(l[wijmo_1.Control._CTRL_KEY]._imeHdl||e.imeEnabled);if((!i.defaultPrevented||c||s)&&0==i.button){if(!i.defaultPrevented){var h=t._g.activeCell;if(!e.containsFocus()||!h||h.classList.contains(wijmo_1.ControlStateClsNames.selected)){var _=r instanceof HTMLElement&&r.tabIndex>-1?r:e._eFocus;e._setFocusNoScroll(_)}t._focusTimer=setTimeout((function(){i.defaultPrevented||e.focus()}))}var p=e.hitTest(i),g=CellType;if(u||!e.activeEditor&&e._isInputElement(r)&&!t._hasRadioMap(i)&&!e._isNativeCheckbox(r)||s){switch(p.cellType){case g.Cell:if(u&&s||u||!e.activeEditor&&e._isInputElement(r)&&!t._hasRadioMap(i)&&!e._isNativeCheckbox(r)){var f=e.getMergedRange(p.panel,p.row,p.col,!1);e.select(null!=f?f:p.range,!1)}!i.defaultPrevented&&r instanceof HTMLElement&&"root"!=r.getAttribute("wj-part")&&r.focus();break;case g.ColumnHeader:case g.ColumnFooter:e.scrollIntoView(-1,p.col);break;case g.RowHeader:e.scrollIntoView(p.row,-1)}!i.defaultPrevented&&wijmo_1.isIE()&&p.cellType!=g.Cell&&e._isInputElement(r)&&r.focus();t._isDown=!0;t._htDown=p;return}if(e._isNativeCheckbox(r)&&wijmo_1.hasClass(r,"wj-column-selector")&&(p.cellType===g.RowHeader||p.cellType===g.ColumnHeader))return;var m=document;n(m,"mousemove");n(m,"mouseup");o(m,"mousemove",mouseMove);o(m,"mouseup",mouseUp);t._isDown=!0;t._mousedown(i)}}));var mouseMove=function(e){t._mousemove(e)},mouseUp=function(e){t._isDown=!1;n(document,"mousemove");n(document,"mouseup");t._mouseup(e)};o(i,"mouseenter",(function(t){e._rcBounds=null}));o(i,"mousemove",this._hover.bind(this));o(i,"dblclick",this._dblclick.bind(this));o(i,"click",this._click.bind(this));o(i,"selectstart",(function(t){e._isInputElement(t.target)||t.preventDefault()}));wijmo_1.isSafari()&&o(i,"mousewheel",(function(t){t.defaultPrevented||!t.wheelDeltaY||t.ctrlKey||t.metaKey||(e._isScrollingByWheel=!0)}));o(i,"wheel",(function(i){if(!i.defaultPrevented&&i.deltaY&&!i.ctrlKey&&!i.metaKey){var o=e._root,n=i.deltaY;if((i.shiftKey?o.scrollWidth>o.clientWidth:o.scrollHeight>o.clientHeight)&&wijmo_1.closestClass(i.target,_WJC_FLEXGRID)==e.hostElement){switch(i.deltaMode){case 1:n=e.rows.defaultSize*(n<0?-1:1);break;case 2:n=(i.shiftKey?o.clientWidth:o.clientHeight)*(n<0?-1:1);break;default:wijmo_1.isSafari()&&(n=wijmo_1.clamp(n,-150,150))}e._isScrollingByWheel=!0;wijmo_1.isEdge()&&(wijmo_1.Control.sharedState.InvalidScroll=!1);e.finishEditing(!1)&&(i.shiftKey?o.scrollLeft+=n:o.scrollTop+=n);clearTimeout(t._mouseWhellTimer);t._mouseWhellTimer=setTimeout((function(){e._isScrollingByWheel=!1}),1);i.preventDefault();i.stopImmediatePropagation()}}}));o(i,"dragstart",this._dragstart.bind(this));o(i,"dragover",this._dragover.bind(this));o(i,"dragleave",this._dragleave.bind(this));o(i,"drop",this._drop.bind(this));o(i,"dragend",this._dragend.bind(this))}_MouseHandler.prototype.resetMouseState=function(){var e=this._g,t=e.hostElement;if(this._updating){this._updating=!1;e.endUpdate()}this._dragSrc&&wijmo_1.removeClass(this._dragSrc,_WJC_DRAGSRC);this._showDragMarker(null);t&&(t.style.cursor="");wijmo_1.isSafari()&&this._szRowCol&&e.invalidate();e.removeEventListener(document,"mousemove");e.removeEventListener(document,"mouseup");this._eMouse=null;this._isDown=null;this._htDown=null;this._scrollbarStatusAtMouseDown=null;this._lbSelState=null;this._lbSelStateRows={};this._lbSel=null;this._szRowCol=null;this._szArgs=null;e._rcBounds=null;this._anchorCol=-1;this._mousedownPoint=null};_MouseHandler.prototype._mousedown=function(e){var t=this._g,i=e.target,o=t.hitTest(e),n=o.cellType,r=CellType,l=e.ctrlKey||e.metaKey;this._mousedownPoint={x:e.clientX,y:e.clientY};this._selDown=t.selection;this._selPanelType=t.activePanelType;this._ignoreClick=!1;if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid){if(wijmo_1.closestClass(i,CellFactory._WJC_DROPDOWN)){var s=t.hitTest(i);s.range&&this._selDown&&(!t.editRange||t.editRange.contains(o.row,o.col))||t.finishEditing();t._ensureEditSelectionForParentGrid();t._edtHdl._toggleListBox(e,s.range);e.preventDefault();this._ignoreClick=!0;return}var a=t.editRange;if(a&&a.contains(o.range)){wijmo_1.Control.sharedState.InvalidScroll=wijmo_1.isEdge();return}}var d=wijmo_1.getActiveElement();if(i!=d||!t._isInputElement(i))if(n!=r.None){this._htDown=o;this._eMouse=e;this._anchorCol=o.col;this._scrollbarStatusAtMouseDown={row:t._hasScroll(t.rows),col:t._hasScroll(t.columns)};if(o.panel){var u={height:t._root.clientHeight,width:t._root.clientWidth},c={height:t.cells.hostElement.clientHeight,width:t.cells.hostElement.clientWidth};this._szInitial={row:o.getRow().renderHeight,col:o.getColumn().renderWidth,canHaveHScrl:u.width-t.rowHeaders.columns.getTotalSize()-c.width!=0,canHaveVScrl:u.height-t.columnHeaders.rows.getTotalSize()-c.height!=0}}else this._szInitial=null;if(null==this._szRowCol){var h=t.allowResizing,_=AllowResizing;if((n==r.RowHeader||n==r.TopLeft)&&(o.edgeTop||o.edgeBottom)&&h&_.Rows&&this._getResizeRowHt(o))this._ignoreClick=!0;else if((n==r.ColumnHeader||n==r.TopLeft)&&(o.edgeLeft||o.edgeRight)&&h&_.Columns&&this._getResizeColHt(o))this._ignoreClick=!0;else{var p=t.allowDragging,g=AllowDragging;switch(n){case r.Cell:case r.RowHeader:if(l&&t.selectionMode==SelectionMode.ListBox){this._lbSelState=t.rows[o.row].isSelected;wijmo_1.closest(i,"."+exports.FlexGridClsNames.elemCollapse)&&(this._lbSelState=!1)}this._mouseSelect(e,e.shiftKey);if(n==r.RowHeader&&!(p&g.Rows)){e.preventDefault();t.focus()}break;case r.ColumnHeader:t.allowSorting||p&g.Columns||wijmo_1.closest(i,"button")||this._mouseSelect(e,e.shiftKey)}}}else{var f=t._eFocus;if(d!=f){f.tabIndex=0;f.focus()}this._ignoreClick=!0;this._handleResizing(e)}}else{t.finishEditing();i!=t._root&&i!=t._fCt&&t._edtHdl._commitRowEdits()}};_MouseHandler.prototype._mousemove=function(e){null==this._htDown&&wijmo_1.isEdge()&&(wijmo_1.Control.sharedState.InvalidScroll=!1);if(this._htDown&&!e.defaultPrevented){if(0==e.buttons&&this._eMouse&&e.timeStamp-this._eMouse.timeStamp>600){this.resetMouseState();return}this._eMouse=e;var t=!1;if(this._szRowCol){this._handleResizing(e);t=!0}else{var i=this._g,o=i.allowDragging,n=AllowDragging,r=CellType;switch(this._htDown.cellType){case r.Cell:this._mouseSelect(e,!0);t=!0;break;case r.RowHeader:if(!(o&n.Rows)){this._mouseSelect(e,!0);t=!0}break;case r.ColumnHeader:if(!(o&n.Columns||i.allowSorting)){this._mouseSelect(e,!0);t=!0}}}t&&wijmo_1.isMobile()&&e.preventDefault()}};_MouseHandler.prototype._mouseup=function(e){var t=this._g;if(!t.isTouching||!(this._dragSrc||e.target instanceof HTMLHtmlElement)){var i=t.hitTest(e),o=this._htDown;if(o&&!e.defaultPrevented){this._mousedownPoint&&t.isTouching&&e.clientX===this._mousedownPoint.x&&e.clientY===this._mousedownPoint.y&&(this._ignoreClick=!1);this._szArgs&&this._finishResizing(e,t._getRangesToResize(e,!1));if(!this._szArgs&&(null==i.panel&&null==o.panel||i.panel&&o.panel&&i.panel._uid==o.panel._uid)&&i.row==o.row&&i.col==o.col){var n=i.getColumn();if(n){if(!(n._getFlag(RowColFlags.HasTemplate)&&!n.cellTemplate)){var r=i.target;if(r!=o.target&&r instanceof HTMLElement){if(o.target instanceof HTMLInputElement){var l=i.point,s=o.point;Math.abs(l.x-s.x)+Math.abs(l.y-s.y)<10&&(r=r.querySelector("input")||r)}var a=document.createEvent("Event");a.initEvent("click",!0,!0);for(var d in e)/Key$|X$|Y$|^button|^(x|y|which)$/.test(d)&&(a[d]=e[d]);r.dispatchEvent(a)}}}}}this.resetMouseState()}};_MouseHandler.prototype._click=function(e){if(this._ignoreClick){this._ignoreClick=!1;e.preventDefault()}if(!e.defaultPrevented){var t=this._g,i=e.target,o=t.hitTest(i),n=wijmo_1.tryCast(i,HTMLInputElement),r="input."+CellFactory._WJC_CHECKBOX;if(!n){var l=wijmo_1.closest(i,"label");l&&(n=l.querySelector(r))}!n&&t.bigCheckboxes&&(n=i.querySelector(r));if(t._isNativeCheckbox(n)){if(n!=t.activeEditor){if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid){var s=t.getCellData(o.row,o.col,!1);if(t.startEditing(!1,o.row,o.col,!1,e)){t.activeEditor.checked=!s;t.finishEditing();t.focus()}else"boolean"!=typeof s&&null!=s||(n.checked=s)}}else t.finishEditing();return}if(this._hasRadioMap(e)){this._handleClick(e);return}var a=e.ctrlKey||e.metaKey;if(t.rows.maxGroupLevel>-1&&wijmo_1.closestClass(i,CellFactory._WJC_COLLAPSE)){var d=t.rows[o.row];if(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid&&d instanceof GroupRow){if(!d.hasChildren)return;a?t.collapseGroupsToLevel(d.isCollapsed?d.level+1:d.level):d.isCollapsed=!d.isCollapsed;t.scrollIntoView(o.row,-1);return}}if(!(a||e.shiftKey||t.activeEditor||t.activePanelType!==CellType.Cell||t._isInputElement(i))&&(null==o.panel&&null==t.cells||o.panel&&t.cells&&o.panel._uid==t.cells._uid)){var u=t._selHdl.selection,c=u.equals(this._selDown);if(!c&&t.cells){var h=this._selDown?t.getMergedRange(t.cells,this._selDown.row,this._selDown.col):null;if(h){var _=t.getMergedRange(t.cells,u.row,u.col);c=_&&_.equals(h)}}if(c&&this._selPanelType===CellType.Cell&&o.range.contains(u)){t.startEditing(!0,null,null,!0,e);return}}this._handleClick(e)}};_MouseHandler.prototype._handleClick=function(e){var t=this._g,i=e.target,o=t.hitTest(i),n=e.ctrlKey||e.metaKey,r=o.panel;if(!e.defaultPrevented&&o.grid&&t&&o.grid._uid==t._uid){if(r&&t.cells&&r._uid==t.cells._uid&&this._hasRadioMap(e)){var l=t._getBindingColumn(o.panel,o.row,o.getColumn()),s=wijmo_1.closest(i,"label"),a=s&&s.querySelector("input"),d=a&&parseInt(a.getAttribute("data-idx")),u=o.getColumn().dataMap||l&&l.dataMap||o.getRow().dataMap,c=void 0;null!=d&&(c=u._cv.items[d][u.selectedValuePath]);a&&!a.disabled&&t.startEditing(!1,o.row,o.col,!1,e)&&t.finishEditing()&&(t._edtHdl._edtCanceled?e.preventDefault():t.cells.setCellData(o.row,o.col,void 0!==c?c:s.textContent,!0,t.refreshOnEdit,void 0!==c));return}if(!t._isInputElement(i)){if(r&&t.topLeftCells&&r._uid==t.topLeftCells._uid){var h=SelectionMode;switch(t.selectionMode){case h.None:case h.Cell:break;default:t.selectAll()}return}if(r&&t.columnHeaders&&r._uid==t.columnHeaders._uid){if(t.allowPinning&&wijmo_1.closestClass(i,CellFactory._WJC_PIN))this._clickPin(e,o);else if(!t._isTransposed()&&wijmo_1.closestClass(e.target,CellFactory._WJC_COLLAPSE)){if(m=t._getColumnGroup(o.row,o.col))if(n){for(var _=m.isCollapsed,p=m.level,g=[],f=0;f<t.columns.length;f++)if((m=t._getColumnGroup(o.row,f))&&m.collapseTo&&m.level==p&&g.indexOf(m)<0){g.push(m);m.isCollapsed=!_}}else m.isCollapsed=!m.isCollapsed;t.scrollIntoView(-1,o.col)}else{i instanceof HTMLSpanElement&&i.parentElement instanceof HTMLLabelElement&&(i=i.parentElement.querySelector("input"));i instanceof HTMLInputElement||this._clickSort(e,o);t.focus();t.scrollIntoView(-1,o.col)}return}if(r&&t.rowHeaders&&r._uid==t.rowHeaders._uid){if(t._isTransposed()&&wijmo_1.closestClass(e.target,CellFactory._WJC_COLLAPSE)){var m;if(m=t._getColumnGroup(o.row,o.col))if(n){_=m.isCollapsed,p=m.level,g=[];for(var w=0;w<t.rows.length;w++)if((m=t._getColumnGroup(w,o.col))&&m.collapseTo&&m.level==p&&g.indexOf(m)<0){g.push(m);m.isCollapsed=!_}}else m.isCollapsed=!m.isCollapsed}return}if(r&&t.cells&&r._uid==t.cells._uid){if(o.row<0){this._clickSort(e,o);return}if(wijmo_1.closestClass(i,CellFactory._WJC_COLLAPSE)){var C=t.rows[o.row];C instanceof GroupRow&&(n?t.collapseGroupsToLevel(C.isCollapsed?C.level+1:C.level):C.isCollapsed=!C.isCollapsed);return}wijmo_1.closestClass(i,CellFactory._WJC_DROPDOWN)&&t._edtHdl._toggleListBox(e,o.range)}}}};_MouseHandler.prototype._hasRadioMap=function(e){var t=e.target;if(wijmo_1.closest(t,"label")){var i=wijmo_1.closestClass(t,CellFactory._WJC_RADIOMAP);return wijmo_1.closestClass(i,_WJC_FLEXGRID)==this._g.hostElement}return!1};_MouseHandler.prototype._clickSort=function(e,t){var i=e.ctrlKey||e.metaKey,o=e.shiftKey;toggleColumnSort(this._g,t.panel,t.col,t.row,e,i,o)};_MouseHandler.prototype._clickPin=function(e,t){toggleColumnPinning(this._g,t.col,t.row,!0,e.shiftKey)};_MouseHandler.prototype._dblclick=function(e){if(!e.defaultPrevented){var t,i=this._g,o=i.hitTest(e),n=e.ctrlKey||e.metaKey,r=o.range,l=o.cellType,s=CellType,a=i.allowResizing,d=AllowResizing,u=o._inRightFrozenArea&&i._hasScroll(i.columns),c=i._getRangesToResize(e,!0);c||(c=[i.selection]);if((o.edgeRight&&!u||o.edgeLeft&&u)&&a&d.Columns){if(l==s.TopLeft){if(o.panel.columns[o.col].allowResizing){t=new CellRangeEventArgs(o.panel,new CellRange(-1,o.col));if(i.onAutoSizingColumn(t)&&i.onResizingColumn(t)){this._ignoreClick=!0;i.autoSizeColumn(o.col,!0);i.onAutoSizedColumn(t);i.onResizedColumn(t);e.preventDefault()}}}else if(l==s.ColumnHeader||a&_AR_ALLCELLS){l==s.ColumnHeader&&(n||i._canResizeAllCellsWithoutCtrl())||(c=[r]);for(var h=0;h<c.length;h++)for(var _=c[h],p=l==s.RowHeader||l==s.BottomLeft,g=_.leftCol;g<=_.rightCol;g++)if(o.panel.columns[g].allowResizing){t=new CellRangeEventArgs(o.panel,new CellRange(-1,g));if(i.onAutoSizingColumn(t)&&i.onResizingColumn(t)){this._ignoreClick=!0;i.autoSizeColumn(g,p);i.onResizedColumn(t);i.onAutoSizedColumn(t);e.preventDefault()}}}this.resetMouseState()}else{var f=o._inBottomFrozenArea&&i._hasScroll(i.rows);if((o.edgeBottom&&!f||o.edgeTop&&f)&&a&d.Rows){if(l==s.TopLeft||l==s.BottomLeft){if(o.getRow().allowResizing){p=l==s.TopLeft||null;t=new CellRangeEventArgs(o.panel,new CellRange(o.row,-1));if(i.onAutoSizingRow(t)&&i.onResizingRow(t)){this._ignoreClick=!0;i.autoSizeRow(o.row,p);i.onResizedRow(t);i.onAutoSizedRow(t);e.preventDefault()}}}else if(l==s.RowHeader||a&_AR_ALLCELLS){var m=o.panel;p=m==i.columnHeaders||m==i.columnFooters&&null;(n||i._canResizeAllCellsWithoutCtrl())&&m&&i.cells||(c=[r]);for(h=0;h<c.length;h++)for(var w=c[h],C=w.topRow;C<=w.bottomRow;C++)if(m.rows[C].allowResizing){t=new CellRangeEventArgs(m,new CellRange(C,-1));if(i.onAutoSizingRow(t)&&i.onResizingRow(t)){this._ignoreClick=!0;i.autoSizeRow(C,p);i.onResizedRow(t);i.onAutoSizedRow(t);e.preventDefault()}}}this.resetMouseState()}else;}}};_MouseHandler.prototype._hover=function(e){if(!this._isDown){var t=this._g,i=t.hitTest(e),o="";this._szRowCol=this._getResizeColHt(i)||this._getResizeRowHt(i);if(this._szRowCol instanceof Column){o="col-resize";this._wasAllRowColHidden=0===t.columns.visibleLength}else if(this._szRowCol instanceof Row){o="row-resize";this._wasAllRowColHidden=0===t.rows.visibleLength}this._szStart=this._szRowCol?this._szRowCol.renderSize:0;t.hostElement.style.cursor=o;return i}return null};_MouseHandler.prototype._getResizeColHt=function(e){var t,i=this._g,o=i.allowResizing,n=e.cellType,r=CellType;if(o&AllowResizing.Columns&&(n==r.ColumnHeader||n==r.TopLeft||o&_AR_ALLCELLS)){if(e._inRightFrozenArea&&i._hasScroll(i.columns)){e.edgeLeft&&(t=e.getColumn());e.edgeFarLeft&&(t=this._getResizeCol(e.panel,e.col,!0)||e.getColumn());e.edgeRight&&(t=this._getResizeCol(e.panel,e.col)||t)}else{e.edgeRight&&(t=e.getColumn());e.edgeFarRight&&(t=this._getResizeCol(e.panel,e.col)||e.getColumn());e.edgeLeft&&(t=this._getResizeCol(e.panel,e.col,!0)||t)}}return t&&t.allowResizing?t:null};_MouseHandler.prototype._getDvMarker=function(){this._dvMarker||(this._dvMarker=wijmo_1.createElement('<div class="'+exports.FlexGridClsNames.marker+'"> </div>'));return this._dvMarker};_MouseHandler.prototype._getResizeRowHt=function(e){var t,i=this._g,o=i.allowResizing,n=AllowResizing,r=e.cellType,l=CellType;if(o&n.Rows&&(r==l.RowHeader||r==l.TopLeft||o&_AR_ALLCELLS)){if(e._inBottomFrozenArea&&i._hasScroll(i.rows)){e.edgeTop&&(t=e.getRow());e.edgeFarTop&&(t=this._getResizeRow(e.panel,e.row,!0)||e.getRow());e.edgeBottom&&(t=this._getResizeRow(e.panel,e.row)||t)}else{e.edgeBottom&&(t=e.getRow());e.edgeFarBottom&&(t=this._getResizeRow(e.panel,e.row)||e.getRow());e.edgeTop&&(t=this._getResizeRow(e.panel,e.row,!0)||t)}}return t&&t.allowResizing?t:null};_MouseHandler.prototype._getResizeCol=function(e,t,i){void 0===i&&(i=!1);var o=this._g,n=e.columns;if(i){for(var r=t-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}if(n==o.columns&&0!=(o.headersVisibility&HeadersVisibility.Row))for(r=(n=o.rowHeaders.columns).length-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}return null}for(r=t+1;r<n.length;r++){if((l=n[r]).isVisible)return this._asResizable(l)}if(t==n.length-1&&n==o.rowHeaders.columns){n=o.columns;for(r=0;r<n.length;r++){var l;if((l=n[r]).isVisible)return this._asResizable(l)}}return null};_MouseHandler.prototype._getResizeRow=function(e,t,i){void 0===i&&(i=!1);var o=this._g,n=e.rows;if(i){for(var r=t-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}if(n==o.rows&&0!=(o.headersVisibility&HeadersVisibility.Column))for(r=(n=o.columnHeaders.rows).length-1;r>=0;r--){if((l=n[r]).isVisible)return this._asResizable(l)}return null}for(r=t+1;r<n.length;r++){if((l=n[r]).isVisible)return this._asResizable(l)}if(t==n.length-1&&n==o.columnHeaders.rows){n=o.rows;for(r=0;r<n.length;r++){var l;if((l=n[r]).isVisible)return this._asResizable(l)}}return null};_MouseHandler.prototype._asResizable=function(e){return 0==e.renderSize&&e.allowResizing?e:null};_MouseHandler.prototype._mouseSelect=function(e,t){var i=this,o=this._g;if(e&&this._htDown&&this._htDown.panel&&o.selectionMode!=SelectionMode.None){var n=new HitTestInfo(this._htDown.panel,e);this._handleSelection(n,t);!wijmo_1.isIE9()&&e.button>=0&&e.target!=o._root&&((n=new HitTestInfo(o,e)).panel||(this._mouseSelectTimer=setTimeout((function(){i._isDown&&i._eMouse&&i._mouseSelect(i._eMouse,t)}),100)))}};_MouseHandler.prototype._handleResizing=function(e){"mousedown"==e.type&&(wijmo_1.isSafari()?wijmo_1.setAttribute(e.target,"draggable",null):e.preventDefault());var t=this._szRowCol,i=this._g,o=this._g.controlRect,n=i._szClientSB.width-i._szClient.width+FlexGrid._RESIZE_SCRL_GAP,r=i._szClientSB.height-i._szClient.height+FlexGrid._RESIZE_SCRL_GAP;if(t instanceof Column){var l=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.col:i._hasScroll(i.columns),s=wijmo_1.mouseToPage(e).x,a=i.columns._frozenInternal&&i.columns._frozenInternal<0&&i.columns.isFrozen(t.index),d=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(s-this._htDown.point.x)*(a&&l?-1:1)*(i.rightToLeft?-1:1))),u=y=(w=Math.round(o.left))+o.width,c=w;i.rightToLeft?w+=n:y-=n;var h=i.columns._frozenInternal<0&&i.columns.isFrozen(t.index),_=i.rightToLeft?-1:1;_=h?-_:_;var p=Math.abs(t.renderWidth-(this._szInitial?this._szInitial.col:0));if(i.columns.isFrozen(t.index)||!this._canResizeOverflow())if(s>y&&(!this._szInitial||this._szInitial.canHaveHScrl)){var g=Math.abs(Math.abs(this._htDown.point.x-y)-p)*_;this._htDown.point.x>=y&&this._htDown.point.x<=u&&(g=0);d=Math.max(t.renderWidth+g,0)}else if(s<w){g=Math.abs(Math.abs(w-this._htDown.point.x)-p)*_;this._htDown.point.x<=w&&this._htDown.point.x>=c&&(g=0);d=Math.max(t.renderWidth-g,0)}if(t.renderSize!=d){if(null==this._szArgs){var f=i.rowHeaders.columns.indexOf(t)>-1?i.rowHeaders:i.cells;this._szArgs=new CellRangeEventArgs(f,new CellRange(-1,t.index))}this._szArgs.data={newSize:d,isPrimaryDragged:!0};this._szArgs.cancel=!1;if(i.onResizingColumn(this._szArgs)){this._szArgs.data.maxSize&&(d=this._szArgs.data.maxSize);i.deferResizing?this._showResizeMarker(d):t.width=d}}}var m=this._szRowCol;if(m instanceof Row){l=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.row:i._hasScroll(i.rows);var w,C=wijmo_1.mouseToPage(e).y,v=i.rows._frozenInternal&&i.rows._frozenInternal<0&&i.rows.isFrozen(m.index),y=(d=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(C-this._htDown.point.y)*(v&&l?-1:1))),(w=Math.round(o.top))+o.height-r-i.columnFooters.rows.getTotalSize());_=i.rows._frozenInternal<0&&i.rows.isFrozen(m.index)?-1:1,p=Math.abs(m.renderHeight-(this._szInitial?this._szInitial.row:0));if(i.rows.isFrozen(m.index)||!this._canResizeOverflow())if(C>y&&(!this._szInitial||this._szInitial.canHaveVScrl)){var b=Math.abs(Math.abs(this._htDown.point.y-y)-p)*_;d=Math.max(m.renderHeight+b,0)}else if(C<w){b=Math.abs(Math.abs(w-this._htDown.point.y)-p)*_;d=Math.max(m.renderHeight-b,0)}if(m.renderSize!=d){if(null==this._szArgs){f=i.columnHeaders.rows.indexOf(m)>-1?i.columnHeaders:i.columnFooters.rows.indexOf(m)>-1?i.columnFooters:i.cells;this._szArgs=new CellRangeEventArgs(f,new CellRange(m.index,-1))}this._szArgs.data={newSize:d,isPrimaryDragged:!0};this._szArgs.cancel=!1;if(i.onResizingRow(this._szArgs)){this._szArgs.data.maxSize&&(d=this._szArgs.data.maxSize);i.deferResizing?this._showResizeMarker(d):m.height=d}}}this._szArgs&&e.preventDefault()};_MouseHandler.prototype._dragstart=function(e){var t=this._g,i=this._htDown,o=AllowDragging,n=CellType;if(i){this._dragSrc=null;this._htDrag=null;this._chldColGrpMarker=!1;if(!this._szRowCol){var r=new CellRangeEventArgs(i.panel,i.range),l=t.allowDragging,s=i.cellType,a=i.panel.rows,d=i.getColumn(!0);d&&d.allowDragging&&(s==n.ColumnHeader||s==n.TopLeft)&&l&o.Columns&&(t.onDraggingColumn(r)?this._dragSrc=e.target:e.preventDefault());if(!this._dragSrc&&i.row>-1&&a[i.row].allowDragging){var u=a[i.row];u instanceof GroupRow||u instanceof _NewRowTemplate||s==n.RowHeader&&l&o.Rows&&(t.onDraggingRow(r)?this._dragSrc=e.target:e.preventDefault())}}if(this._dragSrc&&e.dataTransfer&&!e.defaultPrevented){this._htDrag=i;wijmo_1._startDrag(e.dataTransfer,"move");e.stopPropagation();wijmo_1.addClass(this._dragSrc,_WJC_DRAGSRC);t.beginUpdate();this._updating=!0}}};_MouseHandler.prototype._dragend=function(e){this._dragSrc=null;this._htDrag=null;this.resetMouseState()};_MouseHandler.prototype._dragover=function(e){var t=this._g,i=this._hitTest(e),o=this._dragSrc?this._htDrag:null,n=CellType,r=!1;this._htDown&&(i.row>this._htDown.row?this.isDetailRow(i.row+1)&&(i._row+=1):i.row<this._htDown.row&&this.isDetailRow(i.row)&&(i._row-=1));if(o&&i.cellType==o.cellType){var l=new CellRangeEventArgs(i.panel,i.range,o);if(i.cellType==n.ColumnHeader&&t._hasColumnGroups()){l.cancel=!t._canMoveColumnGroup(o.row,o.col,i.row,i.col);r=t.onDraggingColumnOver(l)}else if(i.cellType==n.ColumnHeader){l.cancel=!t.columns.canMoveElement(o.col,i.col);r=t.onDraggingColumnOver(l)}else if(i.cellType==n.RowHeader){l.cancel=!t.rows.canMoveElement(o.row,i.row);r=t.onDraggingRowOver(l)}else if(i.cellType==n.TopLeft){l.cancel=!t.topLeftCells.columns.canMoveElement(o.col,i.col);r=t.onDraggingColumnOver(l)}}if(r){e.dataTransfer.dropEffect="move";e.preventDefault();e.stopPropagation();this._showDragMarker(i)}else this._showDragMarker(null);if(o&&t.autoScroll){var s=t.controlRect,a=t.scrollPosition,d=wijmo_1.Control._DRAG_SCROLL_EDGE,u=wijmo_1.Control._DRAG_SCROLL_STEP;if(o.panel==t.columnHeaders){e.pageX-s.left<d&&(a.x+=u);s.right-e.pageX<d&&(a.x-=u)}else if(o.panel==t.rowHeaders){e.pageY-s.top<d&&(a.y+=u);s.bottom-e.pageY<d&&(a.y-=u)}if(!a.equals(t._ptScrl)){t.scrollPosition=a;t._rcBounds=null}}};_MouseHandler.prototype._dragleave=function(e){this._showDragMarker(null)};_MouseHandler.prototype._drop=function(e){var t=this._g,i=this._hitTest(e),o=this._dragSrc?this._htDrag:null,n=CellType;if(o&&i.cellType==o.cellType){var r=t.selection,l=new CellRangeEventArgs(i.panel,i.range,o);if(i.cellType==n.ColumnHeader&&t._hasColumnGroups()){var s=t._getColumnGroup(o.row,o.col).columns.length,a=s>0?s:1,d=t.columns._frozenInternal;t._moveColumnGroup(o.row,o.col,i.row,i.col,this._chldColGrpMarker);d>=0?o.col<d&&i.col>=d?t.columns._frozenInternal-=a:o.col>=d&&i.col<d&&(t.columns._frozenInternal+=a):o.col<t.columns.length+d&&i.col>=t.columns.length+d?t.columns._frozenInternal-=a:o.col>=t.columns.length+d&&i.col<t.columns.length+d&&(t.columns._frozenInternal+=a);t.activePanelType===CellType.ColumnHeader||t.activePanelType===CellType.TopLeft?t.select(r.row,i.col,t.columnHeaders):t.select(r.row,i.col);t.onDraggedColumn(l)}else if(i.cellType==n.ColumnHeader){t.columns.moveElement(o.col,i.col);t.activePanelType===CellType.ColumnHeader||t.activePanelType===CellType.TopLeft?t.select(r.row,i.col,t.columnHeaders):t.select(r.row,i.col);t.onDraggedColumn(l)}else if(i.cellType==n.RowHeader){var u=i.row;i.row>this._htDown.row&&this.isDetailRow(i.row+1)?u+=1:i.row<this._htDown.row&&this.isDetailRow(i.row)&&(u-=1);this.isDetailRow(o.row)?this.moveDetailRow(o.row-1,u):this.isDetailRow(o.row+1)?this.moveDetailRow(o.row,u):t.rows.moveElement(o.row,u);t.select(i.row,r.col);t.onDraggedRow(l)}else if(i.cellType==n.TopLeft){t.topLeftCells.columns.moveElement(o.col,i.col);t.onDraggedColumn(l)}}this.resetMouseState()};_MouseHandler.prototype._hitTest=function(e){var t=this._g;t._rcBounds=null;return t.hitTest(e)};_MouseHandler.prototype._showResizeMarker=function(e){var t,i=this._g,o=i._ptScrl,n=this._szArgs.panel.cellType,r=CellType,l=this._getDvMarker(),s=i.cells.hostElement;l.parentElement!=s&&s.appendChild(l);if(this._szRowCol instanceof Column){t={left:this._szRowCol.pos+e-1,top:-1e3,right:"",bottom:0,width:3,height:""};n!=r.TopLeft&&n!=r.RowHeader||(t.left-=i._eTL.offsetWidth+o.x);n==r.Cell&&i.columns._frozenInternal>0&&i.columns.isFrozen(this._szRowCol.index)&&(t.left-=o.x);n==r.Cell&&i.columns._frozenInternal<0&&i.columns.isFrozen(this._szRowCol.index)&&(t.left=Math.min(this._szRowCol.pos,this._g._szClient.width+this._szRowCol._antipos)-e+this._szRowCol.renderWidth+1);i.rightToLeft&&(t.left=s.clientWidth-t.left-t.width)}else if(this._szRowCol instanceof Row){t={left:-1e3,top:this._szRowCol.pos+e-1,right:0,bottom:"",width:"",height:3};n!=r.TopLeft&&n!=r.ColumnHeader||(t.top-=i._eTL.offsetHeight+o.y);n==r.Cell&&i.rows._frozenInternal>0&&i.rows.isFrozen(this._szRowCol.index)&&(t.top-=o.y);n==r.Cell&&i.rows._frozenInternal<0&&i.rows.isFrozen(this._szRowCol.index)&&(t.top=Math.min(this._szRowCol.pos,this._g._szClient.height+this._szRowCol._antipos)-e+this._szRowCol.renderHeight+1)}wijmo_1.setCss(l,t)};_MouseHandler.prototype._showDragMarker=function(e){var t=this._getDvMarker();if(e&&e.panel){if(!e.range.equals(this._rngTarget)){this._rngTarget=e.range;var i=e.panel.hostElement;t.parentElement!=i&&i.appendChild(t);var o=this._g,n=o._ptScrl,r=CellType,l={left:0,top:0,width:6,height:6,right:"",bottom:""};switch(e.cellType){case r.ColumnHeader:var s=o._getColumnGroup(e.row,e.col);if(s){var a=s._rng,d=e.panel.rows,u=e.panel.columns;if(s.isEmpty&&null===s.binding){var c=d[a.bottomRow],h=u[a.leftCol],_=o.rightToLeft,p=_?t.parentElement.clientWidth-e.point.x:e.point.x,g=Math.max(h.renderWidth/5,_MouseHandler._SZ_MAX_COLGRP_EDGE),f=h.pos+g,m=h.pos+h.renderWidth-g,w=this._htDown&&e.col>this._htDown.col;if(!w&&p>f||w&&p<m){l.top=c.pos-l.height/2+c.renderHeight;l.left=_?t.parentElement.clientWidth-h.pos-h.renderWidth:h.pos;l.width=h.renderWidth;this._chldColGrpMarker=!0;break}}this._chldColGrpMarker=!1;l.top=0;l.height=0;for(var C=0;C<a.topRow;C++)l.top+=d[C].renderHeight;for(C=a.topRow;C<=a.bottomRow;C++)l.height+=d[C].renderHeight;l.left=0;if(this._htDown&&e.col>this._htDown.col){var v=u[a.rightCol];l.left=v.pos-l.width/2+v.renderWidth}else{var y=u[a.leftCol];l.left=y.pos-l.width/2}o.rightToLeft&&(l.left=t.parentElement.clientWidth-l.left-l.width);break}case r.TopLeft:case r.ColumnHeader:var b=e.panel.columns[e.col],R=o.columns._frozenInternal<0&&o.columns.isFrozen(e.col)?Math.min(b.pos,o._szClient.width+b._antipos):b.pos;l.left=R-l.width/2;l.height=e.panel.height;this._htDown&&e.col>this._htDown.col&&(l.left+=b.renderWidth);e.cellType==r.ColumnHeader&&o.columns.isFrozen(e.col)&&(l.left-=n.x);o.rightToLeft&&(l.left=t.parentElement.clientWidth-l.left-l.width);break;case r.RowHeader:c=e.getRow();var x=o.rows._frozenInternal<0&&o.rows.isFrozen(e.row)?Math.min(c.pos,o._szClient.height+c._antipos):c.pos;l.top=x-l.height/2;l.width=e.panel.width;e.row>this._htDown.row&&(l.top+=c.renderHeight);o.rows.isFrozen(e.row)&&(l.top-=n.y)}wijmo_1.setCss(t,l)}}else{wijmo_1.removeChild(t);this._rngTarget=null}};_MouseHandler.prototype._finishResizing=function(e,t){var i=this._g,o=i.selection,n=this._szArgs,r=this._eMouse,l=r&&(r.ctrlKey||r.metaKey),s=CellType,a=this._wasAllRowColHidden&&this._htDown.cellType===s.TopLeft&&n.panel.cellType===s.Cell;if(n&&(!n.cancel||n.data&&n.data.internalCancel)){var d=n.data||{};t||(t=[i.selection]);var u=this._g.controlRect,c=i._szClientSB.width-i._szClient.width+FlexGrid._RESIZE_SCRL_GAP,h=i._szClientSB.height-i._szClient.height+FlexGrid._RESIZE_SCRL_GAP,_=wijmo_1.mouseToPage(e),p=Math.round(u.left),g=p+u.width;i.rightToLeft?p+=c:g-=c;var f=Math.round(u.top),m=f+u.height-h-i.columnFooters.rows.getTotalSize(),w=_.y>=f&&_.y<m,C=_.x>=p&&_.x<g;if(n.col>-1&&this._szRowCol instanceof Column){var v=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.col:i._hasScroll(i.columns),y=n.col,b=wijmo_1.mouseToPage(e).x,R=this._szRowCol,x=i.columns._frozenInternal&&i.columns._frozenInternal<0&&i.columns.isFrozen(R.index),S=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(b-this._htDown.point.x)*(x&&v?-1:1)*(this._g.rightToLeft?-1:1)));this._htDown.cellType,s.TopLeft;if(C)n.panel.columns[y].width=Math.round(S);else if(i.deferResizing){var E=i.columns._frozenInternal<0&&i.columns.isFrozen(y),j=i.rightToLeft?-1:1;j=E?-j:j;if(i.columns.isFrozen(R.index)||!this._canResizeOverflow())if(_.x>g){var H=Math.abs(this._htDown.point.x-g)*j;S=Math.max(n.panel.columns[y].renderWidth+H,0)}else if(_.x<p){H=Math.abs(p-this._htDown.point.x)*j;S=Math.max(n.panel.columns[y].renderWidth-H,0)}n.panel.columns[y].width=Math.round(S)}i.onResizedColumn(n);for(var F=0;F<t.length;F++){o=t[F];if((l||i._canResizeAllCellsWithoutCtrl())&&(this._htDown.cellType==s.ColumnHeader||a)){for(var z=i.columns[y].size,T=o.leftCol;T<=o.rightCol;T++)if(i.columns[T].allowResizing&&T!=y){(n=new CellRangeEventArgs(i.cells,new CellRange(-1,T))).data=__assign({},d,{isPrimaryDragged:!1});if(i.onResizingColumn(n)){i.columns[T].size=z;i.onResizedColumn(n)}}i.columns.isFrozen(y)&&(i.columns[y].size=z)}}e.preventDefault()}if(n.row>-1&&this._szRowCol instanceof Row){v=this._scrollbarStatusAtMouseDown?this._scrollbarStatusAtMouseDown.row:i._hasScroll(i.rows);var M=n.row,G=wijmo_1.mouseToPage(e).y,I=this._szRowCol,P=i.rows._frozenInternal&&i.rows._frozenInternal<0&&i.rows.isFrozen(I.index);S=Math.round(Math.max(_MouseHandler._SZ_MIN,this._szStart+(G-this._htDown.point.y)*(P&&v?-1:1))),this._htDown.cellType,s.TopLeft;if(w){n.getRow().height=Math.round(S);if("setHeights"in i){(D=i).setHeights(Array.from(D.rows).map((function(e){return e.height})))}}else if(i.deferResizing){j=i.rows._frozenInternal<0&&i.rows.isFrozen(n.row)?-1:1;if(i.rows.isFrozen(I.index)||!this._canResizeOverflow())if(_.y>m){var A=Math.abs(this._htDown.point.y-m)*j;S=Math.max(n.getRow().renderHeight+A-i.columnFooters.rows.getTotalSize(),0)}else if(_.y<f){A=Math.abs(p-this._htDown.point.y)*j;S=Math.max(n.getRow().renderHeight-A-i.columnFooters.rows.getTotalSize(),0)}n.getRow().height=Math.round(S);if("setHeights"in i){var D;(D=i).setHeights(Array.from(D.rows).map((function(e){return e.height})))}}i.onResizedRow(n);for(F=0;F<t.length;F++){o=t[F];if((l||i._canResizeAllCellsWithoutCtrl())&&(this._htDown.cellType==s.RowHeader||a)){for(var L=i.rows[M].size,O=o.topRow;O<=o.bottomRow;O++)if(i.rows[O].allowResizing&&O!=M){(n=new CellRangeEventArgs(i.cells,new CellRange(O,-1))).data=__assign({},d,{isPrimaryDragged:!1});if(i.onResizingRow(n)){i.rows[O].size=L;i.rows[O].resizedManually=!0;i.onResizedRow(n)}}i.rows.isFrozen(M)&&(i.rows[M].size=L)}}n.panel.rows[M].resizedManually=!0;e.preventDefault()}}};_MouseHandler.prototype._handleSelection=function(e,t){var i=this._g,o=i._selHdl.selection,n=new CellRange(e.row,e.col),r=CellType,l=SelectionMode,s=null,a=this._eMouse&&(this._eMouse.ctrlKey||this._eMouse.metaKey),d=!1,u=e.col>=this._anchorCol;if(n.isValid)if(null==this._lbSelState){e.cellType!=r.ColumnHeader&&i._clearAnchorCell();switch(e.cellType){case r.RowHeader:n.col=0;n.col2=i.columns.length-1;break;case r.ColumnHeader:switch(i.selectionMode){case l.Row:case l.Cell:n.row=n.row2=o.row;t=!1;break;default:n.row=0;n.row2=i.rows.length-1;if(null!=(s=i._getColumnGroup(e.row,e.col))){if(i.anchorCursor){s._rng.col<=this._anchorCol&&this._anchorCol<=s._rng.col2&&(this._anchorCol=s._rng.col2);i._setAnchorCell(0,this._anchorCol)}else s._rng.col<this._anchorCol&&this._anchorCol<=s._rng.col2&&(this._anchorCol=s._rng.col);if(u){n.col=s._rng.col2;n.col2=s._rng.col}else{n.col=s._rng.col;n.col2=s._rng.col2;o.col2<n.col2&&(o.col2=n.col2)}}}}if(t){if(e.cellType==r.ColumnHeader){i.anchorCursor?null==i._getAnchorCell()&&i.selectionMode!=SelectionMode.Row&&i.selectionMode!=SelectionMode.Cell&&i._setAnchorCell(o.row,o.col):i._clearAnchorCell();n.row2=o.row2;!u&&o.col>o.col2?n.col2=o.col:n.col2=o.col2;null!=s&&u&&n.col2>s._rng.col&&(n.col2=s._rng.col)}else if(i.anchorCursor){n.row=o.row;n.col=o.col}else{n.row2=o.row2;n.col2=o.col2}if(!n.isValid){var c=this._htDown;c&&(n=new CellRange(c.row,c.col))}}if(wijmo_1.closestClass(this._eMouse.target,CellFactory._WJC_COLLAPSE)){a=!1;d=!0}if(i.selectionMode==SelectionMode.MultiRange){var h=i._selHdl,_=h.selection,p=h.extendedSelection,g=e.panel!=i.cells,f=h.cellRangeEventArgs;if(a){if(!t&&h._deselectRange(n)){h.selection.isValid&&(n=null);if(i._getProductInfo().indexOf("MultiRow")>-1){var m=[];for(E=0;E<p.length;E++){_.contains(p[E])&&m.push(E);f&&f.range.contains(p[E])&&!m.includes(E)&&m.push(E)}if(m.length>0){for(var w=m.length-1;w>=0;w--)p.splice(m[w],1);m=[]}}}else if(_.isValid&&(g||!_.intersects(n)))if(i._getProductInfo().indexOf("MultiRow")>-1){var C=!1;m=[];_=h.selection.clone();for(E=0;E<p.length&&!C;E++){p[E].equals(_)&&(C=!0);_.contains(p[E])&&m.push(E);f&&f.range.contains(p[E])&&!m.includes(E)&&m.push(E)}if(m.length>0){for(w=m.length-1;w>=0;w--)p.splice(m[w],1);m=[]}C||p.push(_)}else{var v=h.selection;(g?this._splitRange(v):[v.clone()]).forEach((function(e){for(var t=!1,i=0;i<p.length&&!t;i++)p[i].equals(e)&&(t=!0);t||p.push(e)}))}}else p.clear()}if(n){i.select(n,!1);if(!d)switch(e.cellType){case r.RowHeader:i.scrollIntoView(e.row,-1);break;case r.ColumnHeader:i.scrollIntoView(-1,e.col);break;default:i.scrollIntoView(e.row,e.col)}}else{var y=new CellRangeEventArgs(i.cells,new CellRange(e.row,e.col));i.onSelectionChanging(y);i.onSelectionChanged(y);i.invalidate()}}else{var b=this._htDown.row,R=e.row,x=this._lbSel;if(b>R){R=b;b=e.row}var S=this._lbSelStateRows||{};if(this._lbSel)for(var E=x.row;E<=x.row2;E++)(E<b||E>R)&&(i.rows[E].isSelected=S[E]);for(var E=b;E<=R;E++){S.hasOwnProperty(E)||(S[E]=i.rows[E].isSelected);i.rows[E].isSelected=!this._lbSelState}this._lbSel=new CellRange(b,0,R,0);i.scrollIntoView(e.row,e.col)}};_MouseHandler.prototype._splitRange=function(e){var t=this._g,i=t.columns.length,o=t.rows.length,n=[];if(e.columnSpan==i)for(var r=e.topRow;r<=e.bottomRow;r++)n.push(new CellRange(r,0,r,i-1));else if(e.rowSpan==o)for(var l=e.leftCol;l<=e.rightCol;l++)n.push(new CellRange(0,l,o-1,l));else n.push(e.clone());return n};_MouseHandler.prototype.isDetailRow=function(e){var t=this._g.rows[e];return!!t&&"DetailRow"===t.constructor.name};_MouseHandler.prototype.moveDetailRow=function(e,t){var i=this._g,o=i.rows[e],n=i.rows[e+1];if(e>t){i.rows.splice(e,2);i.rows.splice(t,0,o,n)}else if(e<t){i.rows.splice(e,2);i.rows.splice(t-1,0,o,n)}};_MouseHandler.prototype._canResizeOverflow=function(){var e=AllowResizing.ColumnsOverflow&AllowResizing.RowsOverflow&AllowResizing.BothOverflow&AllowResizing.ColumnsAllCellsOverflow&AllowResizing.RowsAllCellsOverflow&AllowResizing.BothAllCellsOverflow;return this._g.allowResizing&e};_MouseHandler.prototype.dispose=function(){this.resetMouseState();if(this._mouseSelectTimer){clearTimeout(this._mouseSelectTimer);this._mouseSelectTimer=null}if(this._mouseWhellTimer){clearTimeout(this._mouseWhellTimer);this._mouseWhellTimer=null}if(this._focusTimer){clearTimeout(this._focusTimer);this._focusTimer=null}wijmo_1.removeChild(this._dvMarker);this._dvMarker=null;this._htDown=null;this._szRowCol=null;this._selDown=null;this._dragSrc=null;this._htDrag=null;this._g=null};_MouseHandler._SZ_MIN=0;_MouseHandler._SZ_MAX_COLGRP_EDGE=50;return _MouseHandler}();exports._MouseHandler=_MouseHandler;var OverlayManager=function(){function OverlayManager(){this._oldNoDataHeight=0}OverlayManager.prototype.updateNoDataContent=function(e,t){t.innerHTML=e.noDataOverlayContent};OverlayManager.prototype.updateNoDataOverlay=function(e,t){var i=e.headersVisibility&HeadersVisibility.Column?e.columnHeaders.rows.getTotalSize():0,o=!(e.rows.length||!e.noDataOverlayContent);wijmo_1.setCss(t,{display:o?"flex":"none",position:"absolute",alignItems:"center",justifyContent:"center",top:i+"px",width:"100%",height:"calc(100% - "+i+"px)",minHeight:4*e.rows.defaultSize+"px",overflow:"auto"});wijmo_1.setAttribute(t,"aria-hidden","true");if(!o)return 0;this.updateNoDataContent(e,t);wijmo_1.setCss(t,{alignItems:t.clientHeight<t.scrollHeight?"start":"center"});if(this._oldNoDataHeight&&Math.abs(t.clientHeight-this._oldNoDataHeight)<=2)return this._oldNoDataHeight;this._oldNoDataHeight=t.clientHeight;return t.clientHeight};return OverlayManager}();exports.OverlayManager=OverlayManager;wijmo_1._registerModule("wijmo.grid",selfModule);
|