!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@blueprintjs/core"),require("@blueprintjs/icons"),require("classnames"),require("react")):"function"==typeof define&&define.amd?define(["@blueprintjs/core","@blueprintjs/icons","classnames","react"],t):"object"==typeof exports?exports.Blueprint=t(require("@blueprintjs/core"),require("@blueprintjs/icons"),require("classnames"),require("react")):(e.Blueprint=e.Blueprint||{},e.Blueprint.Table=t(e.Blueprint.Core,e.Blueprint.Icons,e.classNames,e.React))}(self,(function(e,t,n,r){return function(){"use strict";var o={820:function(e){var t=function(e,t){return e+n(t)},n=function(e){return null===e||"boolean"==typeof e||void 0===e?"":"number"==typeof e?e.toString():"string"==typeof e?e:Array.isArray(e)?e.reduce(t,""):function(e){return Object.prototype.hasOwnProperty.call(e,"props")}(e)&&Object.prototype.hasOwnProperty.call(e.props,"children")?n(e.props.children):""};n.default=n,e.exports=n},762:function(t){t.exports=e},634:function(e){e.exports=t},905:function(e){e.exports=n},359:function(e){e.exports=r}},l={};function i(e){var t=l[e];if(void 0!==t)return t.exports;var n=l[e]={exports:{}};return o[e](n,n.exports,i),n.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return function(){i.r(a),i.d(a,{Cell:function(){return en},Clipboard:function(){return Bn},Column:function(){return Un},ColumnHeaderCell:function(){return yo},ColumnHeaderCell2:function(){return yo},ColumnLoadingOption:function(){return dt},CopyCellsMenuItem:function(){return yr},DragSelectable:function(){return Yr},Draggable:function(){return pn},EditableCell:function(){return En},EditableCell2:function(){return Mn},EditableName:function(){return Po},Grid:function(){return Ht},HorizontalCellDivider:function(){return oo},JSONFormat:function(){return qt},JSONFormat2:function(){return qt},Orientation:function(){return vr},Rect:function(){return Rt},RegionCardinality:function(){return rt},Regions:function(){return vt},RenderMode:function(){return Gn},ResizeHandle:function(){return Sr},RowHeaderCell:function(){return So},RowHeaderCell2:function(){return So},RowLoadingOption:function(){return ft},SelectionModes:function(){return ht},Table:function(){return Ea},Table2:function(){return Xa},TableLoadingOption:function(){return pt},TruncatedFormat:function(){return At},TruncatedFormat2:function(){return At},TruncatedPopoverMode:function(){return Ft},Utils:function(){return at}});var e={};i.r(e),i.d(e,{expandFocusedRegion:function(){return Fr},getFocusedOrLastSelectedIndex:function(){return Ir},getInitialFocusedCell:function(){return jr},isFocusedCellAtRegionBottom:function(){return Lr},isFocusedCellAtRegionLeft:function(){return Dr},isFocusedCellAtRegionRight:function(){return _r},isFocusedCellAtRegionTop:function(){return xr},toFullCoordinates:function(){return Mr}});var t=i(905),n=i.n(t),r=i(359),o=i(762),l=o.Classes.getClassNamespace(),c=("".concat(l,"-table-body"),"".concat(l,"-table-body-cells")),u="".concat(l,"-table-body-scrolling-indicator-overlay"),s="".concat(l,"-table-body-is-scrolling-top"),d="".concat(l,"-table-body-is-scrolling-bottom"),f="".concat(l,"-table-body-is-scrolling-right"),p="".concat(l,"-table-body-is-scrolling-left"),h=("".concat(l,"-table-body-scroll-client"),"".concat(l,"-table-body-virtual-client")),v="".concat(l,"-table-bottom-container"),y="".concat(l,"-table-cell"),m="".concat(l,"-table-cell-client"),g="".concat(l,"-table-cell-ghost"),b="".concat(l,"-table-cell-interactive"),R="".concat(l,"-table-cell-ledger-even"),C="".concat(l,"-table-cell-ledger-odd"),w="".concat(l,"-table-column-header-tr"),O="".concat(l,"-table-column-headers"),S="".concat(l,"-table-column-header-cell"),E="".concat(l,"-table-column-name"),H="".concat(l,"-table-column-name-text"),P="".concat(l,"-table-container"),k="".concat(l,"-table-dragging"),T="".concat(l,"-table-editable-name"),I="".concat(l,"-table-editable-text"),j=("".concat(l,"-table-cell-text-placeholder"),"".concat(l,"-table-focus-region")),x="".concat(l,"-table-has-interaction-bar"),L="".concat(l,"-table-has-reorder-handle"),D="".concat(l,"-table-header"),_="".concat(l,"-table-header-active"),M="".concat(l,"-table-header-content"),F="".concat(l,"-table-header-reorderable"),A="".concat(l,"-table-header-selected"),z="".concat(l,"-table-horizontal-cell-divider"),N="".concat(l,"-table-horizontal-guide"),W="".concat(l,"-table-interaction-bar"),U="".concat(l,"-table-last-in-column"),G="".concat(l,"-table-last-in-row"),B="".concat(l,"-table-menu"),V="".concat(l,"-table-no-horizontal-scroll"),q=("".concat(l,"-table-no-layout"),"".concat(l,"-table-no-rows")),K="".concat(l,"-table-no-vertical-scroll"),Q="".concat(l,"-table-no-wrap-text"),Y="".concat(l,"-table-null"),X="".concat(l,"-table-overlay"),Z="".concat(l,"-table-overlay-layer"),$="".concat(l,"-table-reordering-cursor-overlay"),J="".concat(l,"-table-popover-whitespace-normal"),ee="".concat(l,"-table-popover-whitespace-pre"),te="".concat(l,"-table-quadrant"),ne="".concat(l,"-table-quadrant-body-container"),re="".concat(l,"-table-quadrant-left"),oe="".concat(l,"-table-quadrant-main"),le="".concat(l,"-table-quadrant-scroll-container"),ie="".concat(l,"-table-quadrant-stack"),ae="".concat(l,"-table-quadrant-top"),ce="".concat(l,"-table-quadrant-top-left"),ue="".concat(l,"-table-region"),se="".concat(l,"-table-reorder-handle"),de="".concat(l,"-table-reorder-handle-target"),fe="".concat(l,"-table-reordering"),pe="".concat(l,"-table-resize-guides"),he="".concat(l,"-table-resize-handle"),ve="".concat(l,"-table-resize-handle-target"),ye="".concat(l,"-table-resize-horizontal"),me="".concat(l,"-table-resize-sensor"),ge="".concat(l,"-table-resize-sensor-expand"),be="".concat(l,"-table-resize-sensor-shrink"),Re="".concat(l,"-table-resize-vertical"),Ce=("".concat(l,"-table-rounded-layout"),"".concat(l,"-table-row-headers")),we="".concat(l,"-table-row-headers-cells-container"),Oe="".concat(l,"-table-row-name"),Se="".concat(l,"-table-row-name-text"),Ee="".concat(l,"-table-selection-enabled"),He="".concat(l,"-table-selection-region"),Pe="".concat(l,"-table-th-menu"),ke="".concat(l,"-table-th-menu-container"),Te="".concat(l,"-table-th-menu-container-background"),Ie="".concat(l,"-table-th-menu-open"),je="".concat(l,"-table-th-menu-select-cells"),xe="".concat(l,"-table-thead"),Le="".concat(l,"-table-top-container"),De="".concat(l,"-table-truncated-cell"),_e="".concat(l,"-table-truncated-format"),Me="".concat(l,"-table-truncated-format-text"),Fe="".concat(l,"-table-truncated-popover"),Ae="".concat(l,"-table-truncated-popover-target"),ze="".concat(l,"-table-truncated-text"),Ne="".concat(l,"-table-truncated-value"),We="".concat(l,"-table-vertical-guide");function Ue(e,t){return"number"==typeof t?"".concat(e).concat(t):0===t.indexOf(e)?t:"".concat(e).concat(t)}function Ge(e){return Ue("".concat(l,"-table-col-"),e)}function Be(e){return Ue("".concat(l,"-table-row-"),e)}function Ve(e){return Ue("".concat(l,"-table-cell-col-"),e)}function qe(e){return Ue("".concat(l,"-table-cell-row-"),e)}function Ke(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function Xe(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Ke(e):t;var n}function Ze(e,t){return Ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ze(e,t)}function $e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ye(e);if(t){var o=Ye(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xe(this,n)}}var Je=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ze(e,t)}(a,e);var t,n,l,i=$e(a);function a(e){var t,n,r,o;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),t=i.call(this,e),n=Ke(t),o=void 0,(r="style")in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,t.style=t.calculateStyle(e.variableLength),t}return t=a,n=[{key:"componentDidUpdate",value:function(e){(!e.loading&&this.props.loading||e.variableLength!==this.props.variableLength)&&(this.style=this.calculateStyle(this.props.variableLength))}},{key:"render",value:function(){return this.props.loading?r.createElement("div",{className:o.Classes.SKELETON,style:this.style}):r.Children.only(this.props.children)}},{key:"calculateStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?75-5*Math.floor(11*Math.random()):100;return{width:"".concat(e,"%")}}}],n&&Qe(t.prototype,n),l&&Qe(t,l),a}(r.PureComponent),et=i(634);function tt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}var rt,ot="bp-table-text-no-measure",lt=o.IconSize.STANDARD,it=["font-style","font-variant","font-weight","font-size","font-family"],at={times:function(e,t){if(e<0)throw new Error("[Blueprint] times() cannot be called with negative numbers.");for(var n=Array(e),r=0;r<e;r++)n[r]=t(r);return n},accumulate:function(e){var t=[],n=0,r=!0,o=!1,l=void 0;try{for(var i,a=e[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){n+=i.value,t.push(n)}}catch(e){o=!0,l=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw l}}return t},toBase26Alpha:function(e){for(var t="";;){var n=e%26;if(t=String.fromCharCode(65+n)+t,(e-=n)<=0)return t;e=e/26-1}},toBase26CellName:function(e,t){return"".concat(at.toBase26Alpha(t)).concat(e+1)},binarySearch:function(e,t,n){for(var r=0;r<t;){var o=Math.floor((r+t)/2);n(o)<e?r=o+1:t=o}return t},assignSparseValues:function(e,t){if(null==t||e.length!==t.length)return e;e=e.slice();for(var n=0;n<e.length;n++){var r=t[n];null!=r&&(e[n]=r)}return e},measureElementTextContent:function(e){var t=document.createElement("canvas").getContext("2d"),n=getComputedStyle(e,null);return t.font=it.map((function(e){return n.getPropertyValue(e)})).join(" "),function(e,t){var n,r=t.querySelectorAll(".".concat(ot)),o=0;r&&r.length&&r.forEach((function(t){var n,r=e.measureText(null!==(n=t.textContent)&&void 0!==n?n:"");o+=r.width-lt}));var l=e.measureText(null!==(n=t.textContent)&&void 0!==n?n:"");return nt(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){tt(e,t,n[t])}))}return e}({},l),{width:l.width-o})}(t,e)},clamp:function(e,t,n){return null!=t&&e<t&&(e=t),null!=n&&e>n&&(e=n),e},guideIndexToReorderedIndex:function(e,t,n){return t<e?t:e<=t&&t<e+n?e:Math.max(0,t-n)},reorderedIndexToGuideIndex:function(e,t,n){return t<=e?t:t+n},reorderArray:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(0===r||r===e.length||t===n)return e.slice();if(!(r<0||r>e.length||t+r>e.length)){for(var o=e.slice(0,t),l=e.slice(t,t+r),i=e.slice(t+r),a=[],c=0,u=0,s=0,d=0;c<n;)u<o.length?(a.push(o[u]),u+=1):(a.push(i[d]),d+=1),c+=1;for(;s<r;)a.push(l[s]),s+=1,c+=1;for(;c<e.length;)u<o.length?(a.push(o[u]),u+=1):(a.push(i[d]),d+=1),c+=1;return a}},isLeftClick:function(e){return 0===e.button},getApproxCellHeight:function(e,t,n,r,o,l){var i=null==e?0:e.length,a=(t-o)/n;return(Math.ceil(i/a)+l)*r},compareSparseArrays:function(e,t){return void 0!==e&&void 0!==t&&e.length===t.length&&e.every((function(e,n){return e===t[n]}))}};function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ut(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function st(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ct(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}!function(e){e.CELLS="cells",e.FULL_ROWS="full-rows",e.FULL_COLUMNS="full-columns",e.FULL_TABLE="full-table"}(rt||(rt={}));var dt,ft,pt,ht={ALL:["full-table","full-columns","full-rows","cells"],COLUMNS_AND_CELLS:["full-columns","cells"],COLUMNS_ONLY:["full-columns"],NONE:[],ROWS_AND_CELLS:["full-rows","cells"],ROWS_ONLY:["full-rows"]};!function(e){e.CELLS="cells",e.HEADER="column-header"}(dt||(dt={})),function(e){e.CELLS="cells",e.HEADER="row-header"}(ft||(ft={})),function(e){e.CELLS="cells",e.COLUMN_HEADERS="column-header",e.ROW_HEADERS="row-header"}(pt||(pt={}));var vt=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"getRegionCardinality",value:function(e){return null!=e.cols&&null!=e.rows?"cells":null!=e.cols?"full-columns":null!=e.rows?"full-rows":"full-table"}},{key:"getFocusCellCoordinatesFromRegion",value:function(t){switch(e.getRegionCardinality(t)){case"full-table":return{col:0,row:0};case"full-columns":return{col:t.cols[0],row:0};case"full-rows":return{col:0,row:t.rows[0]};case"cells":return{col:t.cols[0],row:t.rows[0]}}}},{key:"copy",value:function(t){var n=e.getRegionCardinality(t);return"cells"===n?e.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1]):"full-columns"===n?e.column(t.cols[0],t.cols[1]):"full-rows"===n?e.row(t.rows[0],t.rows[1]):e.table()}},{key:"cell",value:function(e,t,n,r){return{cols:this.normalizeInterval(t,r),rows:this.normalizeInterval(e,n)}}},{key:"row",value:function(e,t){return{rows:this.normalizeInterval(e,t)}}},{key:"column",value:function(e,t){return{cols:this.normalizeInterval(e,t)}}},{key:"table",value:function(){return{}}},{key:"add",value:function(e,t){var n=e.slice();return n.push(t),n}},{key:"update",value:function(e,t,n){var r=e.slice();return null!=n?r.splice(n,1,t):(r.pop(),r.push(t)),r}},{key:"clampRegion",value:function(t,n,r){var o=e.copy(t);return null!=t.rows&&(o.rows[0]=at.clamp(t.rows[0],0,n),o.rows[1]=at.clamp(t.rows[1],0,n)),null!=t.cols&&(o.cols[0]=at.clamp(t.cols[0],0,r),o.cols[1]=at.clamp(t.cols[1],0,r)),o}},{key:"lastRegionIsEqual",value:function(t,n){if(null==t||0===t.length)return!1;var r=t[t.length-1];return e.regionsEqual(r,n)}},{key:"findMatchingRegion",value:function(t,n){if(null==t)return-1;for(var r=0;r<t.length;r++)if(e.regionsEqual(t[r],n))return r;return-1}},{key:"findContainingRegion",value:function(t,n){if(null==t)return-1;for(var r=0;r<t.length;r++)if(e.regionContains(t[r],n))return r;return-1}},{key:"hasFullColumn",value:function(t,n){if(null==t)return!1;var r=!0,o=!1,l=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var c=i.value,u=e.getRegionCardinality(c);if("full-table"===u)return!0;if("full-columns"===u&&e.intervalContainsIndex(c.cols,n))return!0}}catch(e){o=!0,l=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw l}}return!1}},{key:"hasFullRow",value:function(t,n){if(null==t)return!1;var r=!0,o=!1,l=void 0;try{for(var i,a=t[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var c=i.value,u=e.getRegionCardinality(c);if("full-table"===u)return!0;if("full-rows"===u&&e.intervalContainsIndex(c.rows,n))return!0}}catch(e){o=!0,l=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw l}}return!1}},{key:"hasFullTable",value:function(t){if(null==t)return!1;var n=!0,r=!1,o=void 0;try{for(var l,i=t[Symbol.iterator]();!(n=(l=i.next()).done);n=!0){var a=l.value;if("full-table"===e.getRegionCardinality(a))return!0}}catch(e){r=!0,o=e}finally{try{n||null==i.return||i.return()}finally{if(r)throw o}}return!1}},{key:"containsRegion",value:function(t,n){return e.overlapsRegion(t,n,!1)}},{key:"overlapsRegion",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.intervalOverlaps:e.intervalContains;if(null==t||null==n)return!1;var o=!0,l=!1,i=void 0;try{for(var a,c=t[Symbol.iterator]();!(o=(a=c.next()).done);o=!0){var u=a.value;switch(e.getRegionCardinality(u)){case"full-table":return!0;case"full-columns":if(r(u.cols,n.cols))return!0;continue;case"full-rows":if(r(u.rows,n.rows))return!0;continue;case"cells":if(r(u.cols,n.cols)&&r(u.rows,n.rows))return!0;continue}}}catch(e){l=!0,i=e}finally{try{o||null==c.return||c.return()}finally{if(l)throw i}}return!1}},{key:"eachUniqueFullColumn",value:function(t,n){if(null!=t&&0!==t.length&&null!=n){var r={};t.forEach((function(t){if("full-columns"===e.getRegionCardinality(t))for(var o=st(t.cols,2),l=o[0],i=o[1],a=l;a<=i;a++)r[a]||(r[a]=!0,n(a))}))}}},{key:"eachUniqueFullRow",value:function(t,n){if(null!=t&&0!==t.length&&null!=n){var r={};t.forEach((function(t){if("full-rows"===e.getRegionCardinality(t))for(var o=st(t.rows,2),l=o[0],i=o[1],a=l;a<=i;a++)r[a]||(r[a]=!0,n(a))}))}}},{key:"enumerateUniqueCells",value:function(t,n,r){if(null==t||0===t.length)return[];var o={},l=[],i=!0,a=!1,c=void 0;try{for(var u,s=t[Symbol.iterator]();!(i=(u=s.next()).done);i=!0){var d=u.value;e.eachCellInRegion(d,n,r,(function(e,t){var n="".concat(e,"-").concat(t);!0!==o[n]&&(o[n]=!0,l.push([e,t]))}))}}catch(e){a=!0,c=e}finally{try{i||null==s.return||s.return()}finally{if(a)throw c}}return l.sort(e.rowFirstComparator),l}},{key:"getCellRegionFromRegion",value:function(t,n,r){switch(e.getRegionCardinality(t)){case"full-table":return e.cell(0,0,n-1,r-1);case"full-columns":return e.cell(0,t.cols[0],n-1,t.cols[1]);case"full-rows":return e.cell(t.rows[0],0,t.rows[1],r-1);case"cells":return e.cell(t.rows[0],t.cols[0],t.rows[1],t.cols[1])}}},{key:"sparseMapCells",value:function(t,n){var r=e.getBoundingRegion(t);if(void 0!==r){var o=r.rows[1]+1-r.rows[0],l=r.cols[1]+1-r.cols[0],i=at.times(o,(function(){return new Array(l)}));return t.forEach((function(e){var t=st(e,2),o=t[0],l=t[1];i[o-r.rows[0]][l-r.cols[0]]=n(o,l)})),i}}},{key:"getBoundingRegion",value:function(e){var t,n,r,o,l=!0,i=!1,a=void 0;try{for(var c,u=e[Symbol.iterator]();!(l=(c=u.next()).done);l=!0){var s=st(c.value,2),d=s[0],f=s[1];t=void 0===t||d<t?d:t,n=void 0===n||d>n?d:n,r=void 0===r||f<r?f:r,o=void 0===o||f>o?f:o}}catch(e){i=!0,a=e}finally{try{l||null==u.return||u.return()}finally{if(i)throw a}}if(void 0!==t&&void 0!==n&&void 0!==r&&void 0!==o)return{cols:[r,o],rows:[t,n]}}},{key:"isValid",value:function(e){return!(null==e||null!=e.rows&&(e.rows[0]<0||e.rows[1]<0)||null!=e.cols&&(e.cols[0]<0||e.cols[1]<0))}},{key:"isRegionValidForTable",value:function(e,t,n){return!(0===t||0===n||null!=e.rows&&!yt(e.rows,0,t-1)||null!=e.cols&&!yt(e.cols,0,n-1))}},{key:"joinStyledRegionGroups",value:function(t,n,r){var o=[];return null!=n&&(o=o.concat(n)),null!=t&&t.length>0&&o.push({className:He,regions:t}),void 0!==r&&o.push({className:j,regions:[e.cell(r.row,r.col)]}),o}},{key:"regionsEqual",value:function(t,n){return e.intervalsEqual(t.rows,n.rows)&&e.intervalsEqual(t.cols,n.cols)}},{key:"expandRegion",value:function(t,n){var r=e.getRegionCardinality(t),o=e.getRegionCardinality(n);if(o!==r)return n;switch(o){case"full-rows":var l=Math.min(t.rows[0],n.rows[0]),i=Math.max(t.rows[1],n.rows[1]);return e.row(l,i);case"full-columns":var a=Math.min(t.cols[0],n.cols[0]),c=Math.max(t.cols[1],n.cols[1]);return e.column(a,c);case"cells":var u=Math.min(t.rows[0],n.rows[0]),s=Math.min(t.cols[0],n.cols[0]),d=Math.max(t.rows[1],n.rows[1]),f=Math.max(t.cols[1],n.cols[1]);return e.cell(u,s,d,f);default:return e.table()}}},{key:"eachCellInRegion",value:function(t,n,r,o){switch(e.getRegionCardinality(t)){case"full-table":for(var l=0;l<n;l++)for(var i=0;i<r;i++)o(l,i);break;case"full-columns":for(var a=0;a<n;a++)for(var c=t.cols[0];c<=t.cols[1];c++)o(a,c);break;case"full-rows":for(var u=t.rows[0];u<=t.rows[1];u++)for(var s=0;s<r;s++)o(u,s);break;case"cells":for(var d=t.rows[0];d<=t.rows[1];d++)for(var f=t.cols[0];f<=t.cols[1];f++)o(d,f)}}},{key:"regionContains",value:function(t,n){return e.overlapsRegion([t],n,!1)}},{key:"intervalsEqual",value:function(e,t){return null==e?null==t:null!=t&&e[0]===t[0]&&e[1]===t[1]}},{key:"intervalContainsIndex",value:function(e,t){return null!=e&&e[0]<=t&&e[1]>=t}},{key:"intervalContains",value:function(e,t){return null!=e&&null!=t&&e[0]<=t[0]&&t[1]<=e[1]}},{key:"intervalOverlaps",value:function(e,t){return null!=e&&null!=t&&!(e[1]<t[0]||e[0]>t[1])}},{key:"rowFirstComparator",value:function(e,t){var n=e[0]-t[0];return 0===n?e[1]-t[1]:n}},{key:"numericalComparator",value:function(e,t){return e-t}},{key:"normalizeInterval",value:function(t,n){null==n&&(n=t);var r=[t,n];return r.sort(e.numericalComparator),r}}],(n=null)&&ut(t.prototype,n),r&&ut(t,r),e}();function yt(e,t,n){return mt(e[0],t,n)&&mt(e[1],t,n)}function mt(e,t,n){return e>=t&&e<=n}function gt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Rt=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),bt(this,"left",void 0),bt(this,"top",void 0),bt(this,"width",void 0),bt(this,"height",void 0),this.left=t,this.top=n,this.width=r,this.height=o}var t,n,r;return t=e,r=[{key:"union",value:function(t,n){var r=e.wrap(t),o=e.wrap(n),l=Math.min(r.top,o.top),i=Math.min(r.left,o.left),a=Math.max(r.top+r.height,o.top+o.height);return new e(i,l,Math.max(r.left+r.width,o.left+o.width)-i,a-l)}},{key:"subtractOrigin",value:function(t,n){var r=e.wrap(t),o=e.wrap(n);return new e(r.left-o.left,r.top-o.top,r.width,r.height)}},{key:"style",value:function(e){return{height:"".concat(e.height,"px"),left:"".concat(e.left,"px"),position:"absolute",top:"".concat(e.top,"px"),width:"".concat(e.width,"px")}}},{key:"wrap",value:function(t){return n=t,(null!=(r=e)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](n):n instanceof r)?t:new e(t.left,t.top,t.width,t.height);var n,r}}],(n=[{key:"subtractOrigin",value:function(t){return e.subtractOrigin(this,t)}},{key:"union",value:function(t){return e.union(this,t)}},{key:"style",value:function(){return e.style(this)}},{key:"sizeStyle",value:function(){return{height:"".concat(this.height,"px"),width:"".concat(this.width,"px")}}},{key:"containsX",value:function(e){return e>=this.left&&e<=this.left+this.width}},{key:"containsY",value:function(e){return e>=this.top&&e<=this.top+this.height}},{key:"equals",value:function(e){return null!=e&&this.left===e.left&&this.top===e.top&&this.width===e.width&&this.height===e.height}}])&&gt(t.prototype,n),r&&gt(t,r),e}();function Ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Et(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Ct(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ct(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}bt(Rt,"ORIGIN",new Rt(0,0,0,0));var Ht=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.DEFAULT_BLEED,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.DEFAULT_GHOST_HEIGHT,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:e.DEFAULT_GHOST_WIDTH;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ot(this,"numCols",void 0),Ot(this,"numRows",void 0),Ot(this,"bleed",void 0),Ot(this,"columnWidths",void 0),Ot(this,"rowHeights",void 0),Ot(this,"cumulativeColumnWidths",void 0),Ot(this,"cumulativeRowHeights",void 0),Ot(this,"ghostHeight",void 0),Ot(this,"ghostWidth",void 0),Ot(this,"getCumulativeWidthBefore",(function(e){return 0===e?0:r.getCumulativeWidthAt(e-1)})),Ot(this,"getCumulativeWidthAt",(function(e){return 0===r.numCols?r.ghostWidth*e:e>=r.numCols?r.cumulativeColumnWidths[r.numCols-1]+r.ghostWidth*(e-r.numCols+1):r.cumulativeColumnWidths[e]})),Ot(this,"getCumulativeHeightBefore",(function(e){return 0===e?0:r.getCumulativeHeightAt(e-1)})),Ot(this,"getCumulativeHeightAt",(function(e){return 0===r.numRows?r.ghostHeight*e:e>=r.numRows?r.cumulativeRowHeights[r.numRows-1]+r.ghostHeight*(e-r.numRows+1):r.cumulativeRowHeights[e]})),this.columnWidths=n,this.rowHeights=t,this.cumulativeColumnWidths=at.accumulate(n),this.cumulativeRowHeights=at.accumulate(t),this.numCols=n.length,this.numRows=t.length,this.bleed=o,this.ghostHeight=l,this.ghostWidth=i}var t,n,r;return t=e,n=[{key:"getCellRect",value:function(e,t){var n=this.rowHeights[e],r=this.cumulativeRowHeights[e]-n,o=this.columnWidths[t],l=this.cumulativeColumnWidths[t]-o;return new Rt(l,r,o,n)}},{key:"getGhostCellRect",value:function(e,t){var n=0,r=0,o=0,l=0;return e>=this.rowHeights.length?(l=this.ghostHeight,r=this.getHeight()+this.ghostHeight*(e-this.numRows)):(l=this.rowHeights[e],r=this.cumulativeRowHeights[e]-l),t>=this.columnWidths.length?(o=this.ghostWidth,n=this.getWidth()+this.ghostWidth*(t-this.numCols)):(o=this.columnWidths[t],n=this.cumulativeColumnWidths[t]-o),new Rt(n,r,o,l)}},{key:"getRowRect",value:function(e){var t=this.rowHeights[e],n=this.cumulativeRowHeights[e]-t;return new Rt(0,n,this.getWidth(),t)}},{key:"getColumnRect",value:function(e){var t=this.columnWidths[e],n=this.cumulativeColumnWidths[e]-t;return new Rt(n,0,t,this.getHeight())}},{key:"getWidth",value:function(){return 0===this.numCols?0:this.cumulativeColumnWidths[this.numCols-1]}},{key:"getHeight",value:function(){return 0===this.numRows?0:this.cumulativeRowHeights[this.numRows-1]}},{key:"getRect",value:function(){return new Rt(0,0,this.getWidth(),this.getHeight())}},{key:"mapCellsInRect",value:function(e,t){var n=[];if(null==e)return n;for(var r=this.getRowIndicesInRect({rect:e}),o=r.rowIndexStart,l=r.rowIndexEnd,i=this.getColumnIndicesInRect(e),a=i.columnIndexStart,c=i.columnIndexEnd,u=o;u<=l;u++)for(var s=a;s<=c;s++)n.push(t(u,s));return n}},{key:"mapRowsInRect",value:function(e,t){var n=[];if(null==e)return n;for(var r=this.getRowIndicesInRect({rect:e}),o=r.rowIndexStart,l=r.rowIndexEnd,i=o;i<=l;i++)n.push(t(i));return n}},{key:"mapColumnsInRect",value:function(e,t){var n=[];if(null==e)return n;for(var r=this.getColumnIndicesInRect(e),o=r.columnIndexStart,l=r.columnIndexEnd,i=o;i<=l;i++)n.push(t(i));return n}},{key:"getRowIndicesInRect",value:function(t){var n=t.rect,r=t.includeGhostCells,o=void 0!==r&&r,l=t.columnHeaderHeight,i=void 0===l?0:l,a=t.limit,c=void 0===a?e.DEFAULT_MAX_ROWS:a;if(null==n)return{rowIndexEnd:0,rowIndexStart:0};var u=o?Math.max(this.numRows,e.DEFAULT_MAX_ROWS):this.numRows,s=n.top,d=void 0===s?0:s,f=n.height,p=this.getIndicesInInterval(d,d+(f-i),u,!o,this.getCumulativeHeightAt),h=p.start,v=p.end;return{rowIndexEnd:c>0&&v-h>c?h+c:v,rowIndexStart:h}}},{key:"getColumnIndicesInRect",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.DEFAULT_MAX_COLUMNS;if(null==t)return{columnIndexEnd:0,columnIndexStart:0};var o=n?Math.max(this.numCols,e.DEFAULT_MAX_COLUMNS):this.numCols,l=t.left,i=void 0===l?0:l,a=t.width,c=this.getIndicesInInterval(i,i+a,o,!n,this.getCumulativeWidthAt),u=c.start,s=c.end;return{columnIndexEnd:r>0&&s-u>r?u+r:s,columnIndexStart:u}}},{key:"isGhostIndex",value:function(e,t){return e>=this.numRows||t>=this.numCols}},{key:"isGhostColumn",value:function(e){return e>=this.numCols}},{key:"getExtremaClasses",value:function(e,t,n,r){return e===n&&t===r?[U,G]:e===n?[U]:t===r?[G]:[]}},{key:"getRegionStyle",value:function(e){switch(vt.getRegionCardinality(e)){case rt.CELLS:var t=Et(e.rows,2),n=t[0],r=t[1],o=Et(e.cols,2),l=o[0],i=o[1];if(this.isGhostIndex(n,l)||this.isGhostIndex(r,i))return{display:"none"};var a=this.getCellRect(n,l),c=this.getCellRect(r,i),u=0===l?0:1,s=0===n?0:1,d=a.union(c);return d.height+=s,d.left-=u,d.width+=u,d.top-=s,St(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ot(e,t,n[t])}))}return e}({},d.style()),{display:"block"});case rt.FULL_COLUMNS:var f=Et(e.cols,2),p=f[0],h=f[1];if(this.isGhostIndex(0,p)||this.isGhostIndex(0,h))return{display:"none"};var v=this.getCellRect(0,p),y=this.getCellRect(0,h),m=v.union(y),g=0===p?0:1;return{bottom:0,display:"block",left:m.left-g,top:0,width:m.width+g};case rt.FULL_ROWS:var b=Et(e.rows,2),R=b[0],C=b[1];if(this.isGhostIndex(R,0)||this.isGhostIndex(C,0))return{display:"none"};var w=this.getCellRect(R,0),O=this.getCellRect(C,0),S=w.union(O),E=0===R?0:1;return{display:"block",height:S.height+E,left:0,right:0,top:S.top-E};case rt.FULL_TABLE:return{bottom:0,display:"block",left:0,right:0,top:0};default:return{display:"none"}}}},{key:"getIndicesInInterval",value:function(e,t,n,r,o){var l=at.binarySearch(e,n-1,o),i=at.binarySearch(t,n-1,o);return l>=0&&e===o(l)&&(l+=1),{start:l=Math.max(0,l-this.bleed),end:i=r?Math.min(n-1,i+this.bleed):Math.min(n-1,i)}}}],n&&wt(t.prototype,n),r&&wt(t,r),e}();function Pt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Ot(Ht,"DEFAULT_BLEED",3),Ot(Ht,"DEFAULT_MAX_COLUMNS",50),Ot(Ht,"DEFAULT_MAX_ROWS",200),Ot(Ht,"DEFAULT_GHOST_HEIGHT",20),Ot(Ht,"DEFAULT_GHOST_WIDTH",150),Ot(Ht,"MIN_COLUMN_HEADER_HEIGHT",30),Ot(Ht,"MIN_ROW_HEADER_WIDTH",30);var Tt=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),kt(this,"tableElement",void 0),kt(this,"scrollContainerElement",void 0),kt(this,"cellContainerElement",void 0),kt(this,"grid",void 0),kt(this,"numFrozenRows",void 0),kt(this,"numFrozenColumns",void 0),kt(this,"convertCellIndexToClientX",void 0),kt(this,"convertCellMidpointToClientX",void 0),kt(this,"convertCellIndexToClientY",void 0),kt(this,"convertCellMidpointToClientY",void 0),kt(this,"toGridX",void 0),kt(this,"toGridY",void 0),this.tableElement=t,this.scrollContainerElement=n,this.cellContainerElement=r,this.convertCellIndexToClientX=function(e){return o.grid.getCumulativeWidthAt(e)},this.convertCellMidpointToClientX=function(e){return(o.grid.getCumulativeWidthBefore(e)+o.grid.getCumulativeWidthAt(e))/2},this.convertCellIndexToClientY=function(e){return o.grid.getCumulativeHeightAt(e)},this.convertCellMidpointToClientY=function(e){return(o.grid.getCumulativeHeightBefore(e)+o.grid.getCumulativeHeightAt(e))/2},this.toGridX=function(e){var t=o.cellContainerElement.getBoundingClientRect().left,n=o.scrollContainerElement.scrollLeft,r=e-(t+n);return null!=o.numFrozenColumns&&o.numFrozenColumns>0&&r<=o.grid.getCumulativeWidthBefore(o.numFrozenColumns)?r:r+n},this.toGridY=function(e){var t=o.cellContainerElement.getBoundingClientRect().top,n=o.scrollContainerElement.scrollTop,r=e-(t+n);return null!=o.numFrozenRows&&o.numFrozenRows>0&&r<=o.grid.getCumulativeHeightBefore(o.numFrozenRows)?r:r+n},this.numFrozenRows=0,this.numFrozenColumns=0}var t,n,r;return t=e,n=[{key:"setGrid",value:function(e){return this.grid=e,this}},{key:"setNumFrozenRows",value:function(e){return this.numFrozenRows=e,this}},{key:"setNumFrozenColumns",value:function(e){return this.numFrozenColumns=e,this}},{key:"getViewportRect",value:function(){return new Rt(this.scrollContainerElement.scrollLeft||0,this.scrollContainerElement.scrollTop||0,this.scrollContainerElement.clientWidth,this.scrollContainerElement.clientHeight)}},{key:"getWidestVisibleCellInColumn",value:function(t){for(var n=this.getColumnCellSelector(t),r=this.tableElement.querySelectorAll(n),o=0,l=0;l<r.length;l++){var i=at.measureElementTextContent(r.item(l)).width,a=Math.ceil(i)+2*e.CELL_HORIZONTAL_PADDING;a>o&&(o=a)}return o}},{key:"getTallestVisibleCellInColumn",value:function(e){for(var t=this.getColumnCellSelector(e),n=this.tableElement.querySelectorAll("".concat(t,".").concat(y)),r=0,o=0;o<n.length;o++){var l=n.item(o),i=l.querySelector(".".concat(Ne)),a=l.querySelector(".".concat(Me)),c=l.querySelector(".".concat(ze)),u=0;(u=null!=i?i.scrollHeight:null!=a?a.scrollHeight:null!=c?c.scrollHeight:l.scrollHeight)>r&&(r=u)}return r}},{key:"hasVerticalOverflowOrExactFit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht.MIN_COLUMN_HEADER_HEIGHT,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getViewportRect();return void 0!==this.grid&&this.grid.getHeight()>=t.height-e}},{key:"hasHorizontalOverflowOrExactFit",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ht.MIN_ROW_HEADER_WIDTH,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getViewportRect();return void 0!==this.grid&&this.grid.getWidth()>=t.width-e}},{key:"convertPointToColumn",value:function(e,t){var n=this.getTableRect();if(void 0===this.grid||!n.containsX(e))return-1;var r=this.toGridX(e),o=t?this.grid.numCols:this.grid.numCols-1,l=t?this.convertCellMidpointToClientX:this.convertCellIndexToClientX;return at.binarySearch(r,o,l)}},{key:"convertPointToRow",value:function(e,t){var n=this.getTableRect();if(void 0===this.grid||!n.containsY(e))return-1;var r=this.toGridY(e),o=t?this.grid.numRows:this.grid.numRows-1,l=t?this.convertCellMidpointToClientY:this.convertCellIndexToClientY;return at.binarySearch(r,o,l)}},{key:"convertPointToCell",value:function(e,t){var n=this.toGridX(e),r=this.toGridY(t);return{col:at.binarySearch(n,this.grid.numCols-1,this.convertCellIndexToClientX),row:at.binarySearch(r,this.grid.numRows-1,this.convertCellIndexToClientY)}}},{key:"getColumnCellSelector",value:function(e){var t=e<this.numFrozenColumns?re:oe,n=Ve(e);return".".concat(t," .").concat(n)}},{key:"getTableRect",value:function(){return Rt.wrap(this.tableElement.getBoundingClientRect())}}],n&&Pt(t.prototype,n),r&&Pt(t,r),e}();function It(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function jt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function Dt(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?It(e):t;var n}function _t(e,t){return _t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_t(e,t)}function Mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lt(e);if(t){var o=Lt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Dt(this,n)}}kt(Tt,"CELL_HORIZONTAL_PADDING",10);var Ft;!function(e){e.ALWAYS="always",e.NEVER="never",e.WHEN_TRUNCATED="when-truncated",e.WHEN_TRUNCATED_APPROX="when-truncated-approx"}(Ft||(Ft={}));var At=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_t(e,t)}(c,e);var t,l,i,a=Mt(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),xt(It(e=a.apply(this,arguments)),"state",{isPopoverOpen:!1,isTruncated:!1}),xt(It(e),"contentDiv",void 0),xt(It(e),"handleContentDivRef",(function(t){return e.contentDiv=t})),xt(It(e),"handlePopoverOpen",(function(){e.setState({isPopoverOpen:!0})})),xt(It(e),"handlePopoverClose",(function(){e.setState({isPopoverOpen:!1})})),e}return t=c,(l=[{key:"componentDidMount",value:function(){this.setTruncationState()}},{key:"componentDidUpdate",value:function(){this.setTruncationState()}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.detectTruncation,l=e.truncateLength,i=e.truncationSuffix,a=""+t,c=a;if(!o&&l>0&&c.length>l&&(c=c.substring(0,l)+i),this.shouldShowPopover(a)){var u=n()(this.props.className,_e);return r.createElement("div",{className:u},r.createElement("div",{className:Ne,ref:this.handleContentDivRef},c),this.renderPopover())}var s=n()(this.props.className,Me);return r.createElement("div",{className:s,ref:this.handleContentDivRef},c)}},{key:"renderPopover",value:function(){var e=this.props,t=e.children,l=e.preformatted;if(this.state.isPopoverOpen){var i=n()(Fe,l?ee:J),a=r.createElement("div",{className:i},t);return r.createElement(o.Popover,{className:Ae,content:a,isOpen:!0,onClose:this.handlePopoverClose,placement:"bottom",rootBoundary:"document"},r.createElement(et.More,null))}return r.createElement("span",{className:Ae,onClick:this.handlePopoverOpen},r.createElement(et.More,null))}},{key:"shouldShowPopover",value:function(e){var t=this.props,n=t.detectTruncation,r=t.measureByApproxOptions,o=t.showPopover,l=t.truncateLength;switch(o){case"always":return!0;case"never":default:return!1;case"when-truncated":return n?this.state.isTruncated:l>0&&e.length>l;case"when-truncated-approx":if(!n)return l>0&&e.length>l;if(null==this.props.parentCellHeight||null==this.props.parentCellWidth)return!1;var i=r.approximateCharWidth,a=r.approximateLineHeight,c=r.cellHorizontalPadding,u=r.numBufferLines,s=this.props.parentCellWidth;return at.getApproxCellHeight(e,s,i,a,c,u)>this.props.parentCellHeight}}},{key:"setTruncationState",value:function(){if(this.props.detectTruncation&&"when-truncated"===this.props.showPopover)if(null!=this.contentDiv){var e=this.state.isTruncated,t=this.contentDiv,n=t.clientHeight,r=t.clientWidth,o=t.scrollHeight,l=t.scrollWidth,i=e?l-25:l,a=e&&i===r||i>r||o>n;this.setState({isTruncated:a})}else this.setState({isTruncated:!1})}}])&&jt(t.prototype,l),i&&jt(t,i),c}(r.PureComponent);function zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wt(e){return Wt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wt(e)}function Ut(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Gt(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function Bt(e,t){return Bt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bt(e,t)}function Vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wt(e);if(t){var o=Wt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Gt(this,n)}}xt(At,"displayName","".concat(o.DISPLAYNAME_PREFIX,".TruncatedFormat")),xt(At,"defaultProps",{detectTruncation:!1,measureByApproxOptions:{approximateCharWidth:8,approximateLineHeight:18,cellHorizontalPadding:2*Tt.CELL_HORIZONTAL_PADDING,numBufferLines:0},preformatted:!1,showPopover:"when-truncated",truncateLength:2e3,truncationSuffix:"..."});var qt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Bt(e,t)}(a,e);var t,o,l,i=Vt(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,o=[{key:"render",value:function(){var e=this.props,t=e.children,o=e.omitQuotesOnStrings,l=e.stringify,i=this.props.showPopover,a=null==t;a&&(i=Ft.NEVER);var c=n()(this.props.className,Nt({},Y,a)),u="";return u=o&&"string"==typeof t?t:l(t),r.createElement(At,Ut(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Nt(e,t,n[t])}))}return e}({},this.props),{className:c,showPopover:i}),u)}}],o&&zt(t.prototype,o),l&&zt(t,l),a}(r.Component);function Kt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yt(e){return Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Yt(e)}function Xt(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function Zt(e,t){return Zt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Zt(e,t)}function $t(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yt(e);if(t){var o=Yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xt(this,n)}}Nt(qt,"displayName","".concat(o.DISPLAYNAME_PREFIX,".JSONFormat")),Nt(qt,"defaultProps",{omitQuotesOnStrings:!0,stringify:function(e){return JSON.stringify(e,null,2)}});var Jt=function(){return r.createElement(en,null)},en=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Zt(e,t)}(c,e);var t,l,i,a=$t(c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.apply(this,arguments)}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.deepCompareKeys(this.props.style,e.style)}},{key:"render",value:function(){var e,t,l=this.props,i=l.cellRef,a=l.tabIndex,c=l.onKeyDown,u=l.onKeyUp,s=l.onKeyPress,d=l.style,f=l.intent,p=l.interactive,h=l.loading,v=l.tooltip,m=l.truncated,g=l.className,R=l.wrapText,C=n()(y,o.Classes.intentClass(f),(Qt(e={},b,p),Qt(e,o.Classes.LOADING,h),Qt(e,De,m),e),g),w=n()((Qt(t={},ze,m),Qt(t,Q,!R),t)),O=r.Children.map(this.props.children,(function(e){var t=o.Utils.isElementOfType(e,At)||o.Utils.isElementOfType(e,qt);return null!=d&&r.isValidElement(e)&&t?r.cloneElement(e,{parentCellHeight:void 0===d.height?void 0:parseInt(d.height.toString(),10),parentCellWidth:void 0===d.width?void 0:parseInt(d.width.toString(),10)}):e})),S=r.createElement("div",{className:w},O);return r.createElement("div",{className:C,title:v,ref:i,style:d,tabIndex:a,onKeyDown:c,onKeyUp:u,onKeyPress:s},r.createElement(Je,{loading:null!=h&&h,variableLength:!0},S))}}])&&Kt(t.prototype,l),i&&Kt(t,i),c}(r.Component);function tn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Qt(en,"displayName","".concat(o.DISPLAYNAME_PREFIX,".Cell")),Qt(en,"defaultProps",{truncated:!0,wrapText:!1});var rn=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),nn(this,"handler",void 0),nn(this,"element",void 0),nn(this,"activationCoordinates",void 0),nn(this,"doubleClickTimeoutToken",void 0),nn(this,"isActivated",!1),nn(this,"isDragging",!1),nn(this,"lastCoordinates",void 0),nn(this,"handleMouseDown",(function(e){if((t.initCoordinateData(e),null!=t.handler&&null!=t.handler.onActivate)&&!1===t.handler.onActivate(e))return;t.isActivated=!0,t.maybeAlterEventChain(e),t.detachDocumentEventListeners(),t.attachDocumentEventListeners()})),nn(this,"handleMouseMove",(function(e){if(t.maybeAlterEventChain(e),t.isActivated&&(t.isDragging=!0),t.isDragging){var n,r,o=t.updateCoordinateData(e);if(void 0!==o)null===(r=t.handler)||void 0===r||null===(n=r.onDragMove)||void 0===n||n.call(r,e,o)}})),nn(this,"handleMouseUp",(function(n){if(t.maybeAlterEventChain(n),null!=t.handler)if(t.isDragging){var r,o,l,i,a=t.updateCoordinateData(n);if(void 0!==a)null===(o=t.handler)||void 0===o||null===(r=o.onDragMove)||void 0===r||r.call(o,n,a),null===(i=t.handler)||void 0===i||null===(l=i.onDragEnd)||void 0===l||l.call(i,n,a)}else t.isActivated&&(null!=t.handler.onDoubleClick?null==t.doubleClickTimeoutToken?t.doubleClickTimeoutToken=window.setTimeout((function(){var e,r;delete t.doubleClickTimeoutToken,null===(r=t.handler)||void 0===r||null===(e=r.onClick)||void 0===e||e.call(r,n)}),e.DOUBLE_CLICK_TIMEOUT_MSEC):(window.clearTimeout(t.doubleClickTimeoutToken),delete t.doubleClickTimeoutToken,t.handler.onDoubleClick(n)):null!=t.handler.onClick&&t.handler.onClick(n));t.isActivated=!1,t.isDragging=!1,t.detachDocumentEventListeners()}))}var t,n,r;return t=e,r=[{key:"isAdditive",value:function(e){return e.ctrlKey||e.metaKey}}],(n=[{key:"attach",value:function(e,t){return this.detach(),this.handler=t,this.element=e,this.isValidDragHandler(t)&&this.element.addEventListener("mousedown",this.handleMouseDown),this}},{key:"detach",value:function(){null!=this.element&&(this.element.removeEventListener("mousedown",this.handleMouseDown),this.detachDocumentEventListeners())}},{key:"isValidDragHandler",value:function(e){return null!=e&&(null!=e.onActivate||null!=e.onDragMove||null!=e.onDragEnd||null!=e.onClick||null!=e.onDoubleClick)}},{key:"attachDocumentEventListeners",value:function(){document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("mouseup",this.handleMouseUp)}},{key:"detachDocumentEventListeners",value:function(){document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp)}},{key:"initCoordinateData",value:function(e){this.activationCoordinates=[e.clientX,e.clientY],this.lastCoordinates=this.activationCoordinates}},{key:"updateCoordinateData",value:function(e){if(void 0!==this.activationCoordinates){var t,n=[e.clientX,e.clientY],r=null!==(t=this.lastCoordinates)&&void 0!==t?t:[0,0],o=[n[0]-r[0],n[1]-r[1]],l=[n[0]-this.activationCoordinates[0],n[1]-this.activationCoordinates[1]],i={activation:this.activationCoordinates,current:n,delta:o,last:r,offset:l};return this.lastCoordinates=[e.clientX,e.clientY],i}}},{key:"maybeAlterEventChain",value:function(e){var t,n;(null===(t=this.handler)||void 0===t?void 0:t.preventDefault)&&e.preventDefault(),(null===(n=this.handler)||void 0===n?void 0:n.stopPropagation)&&e.stopPropagation()}}])&&tn(t.prototype,n),r&&tn(t,r),e}();function on(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function an(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e){return cn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},cn(e)}function un(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?on(e):t;var n}function sn(e,t){return sn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sn(e,t)}function dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cn(e);if(t){var o=cn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return un(this,n)}}nn(rn,"DOUBLE_CLICK_TIMEOUT_MSEC",500);var fn=["stopPropagation","preventDefault"],pn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&sn(e,t)}(a,e);var t,n,l,i=dn(a);function a(){var e,t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),an(on(e=i.apply(this,arguments)),"events",new rn),an(on(e),"targetRef",null!==(t=e.props.targetRef)&&void 0!==t?t:r.createRef()),e}return t=a,(n=[{key:"render",value:function(){var e=r.Children.only(this.props.children);return void 0!==this.props.targetRef?e:r.cloneElement(e,{ref:this.targetRef})}},{key:"componentDidUpdate",value:function(e){!o.Utils.shallowCompareKeys(e,this.props,{include:fn})&&hn(this.targetRef.current)&&this.events.attach(this.targetRef.current,this.props)}},{key:"componentDidMount",value:function(){hn(this.targetRef.current)&&this.events.attach(this.targetRef.current,this.props)}},{key:"componentWillUnmount",value:function(){var e;hn(this.targetRef.current)&&(null===(e=this.events)||void 0===e||e.detach())}}])&&ln(t.prototype,n),l&&ln(t,l),a}(r.PureComponent);function hn(e){return null!=e&&(t=e,null!=(n=HTMLElement)&&"undefined"!=typeof Symbol&&n[Symbol.hasInstance]?!!n[Symbol.hasInstance](t):t instanceof n);var t,n}function vn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function yn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gn(e){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},gn(e)}function bn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){mn(e,t,n[t])}))}return e}function Rn(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Cn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function wn(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?vn(e):t;var n}function On(e,t){return On=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},On(e,t)}function Sn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gn(e);if(t){var o=gn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wn(this,n)}}an(pn,"defaultProps",{preventDefault:!0,stopPropagation:!1});var En=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&On(e,t)}(c,e);var t,l,i,a=Sn(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),mn(vn(t=a.call(this,e)),"cellRef",r.createRef()),mn(vn(t),"contentsRef",r.createRef()),mn(vn(t),"handleKeyPress",(function(){!t.state.isEditing&&t.props.isFocused&&t.setState({isEditing:!0,dirtyValue:"",savedValue:t.state.savedValue})})),mn(vn(t),"handleEdit",(function(){t.setState({isEditing:!0,dirtyValue:t.state.savedValue})})),mn(vn(t),"handleCancel",(function(e){t.setState({isEditing:!1,dirtyValue:void 0}),t.invokeCallback(t.props.onCancel,e)})),mn(vn(t),"handleChange",(function(e){t.setState({dirtyValue:e}),t.invokeCallback(t.props.onChange,e)})),mn(vn(t),"handleConfirm",(function(e){t.setState({isEditing:!1,savedValue:e,dirtyValue:void 0}),t.invokeCallback(t.props.onConfirm,e)})),mn(vn(t),"handleCellActivate",(function(e){return!0})),mn(vn(t),"handleCellDoubleClick",(function(e){t.handleEdit()})),t.state={isEditing:!1,savedValue:e.value},t}return t=c,(l=[{key:"componentDidMount",value:function(){this.checkShouldFocus()}},{key:"componentDidUpdate",value:function(e){var t=!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.deepCompareKeys(this.props,e,["style"]),n=this.props.value;t&&null!=n&&this.setState({savedValue:n,dirtyValue:n}),this.checkShouldFocus()}},{key:"shouldComponentUpdate",value:function(e,t){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.shallowCompareKeys(this.state,t)||!o.Utils.deepCompareKeys(this.props,e,["style"])}},{key:"render",value:function(){var e,t=this.props,l=(t.onCancel,t.onChange,t.onConfirm,t.truncated),i=t.wrapText,a=t.editableTextProps,c=Cn(t,["onCancel","onChange","onConfirm","truncated","wrapText","editableTextProps"]),u=this.state,s=u.isEditing,d=u.dirtyValue,f=u.savedValue,p=c.interactive||s;if(s){var h=a?a.className:null;e=r.createElement(o.EditableText,Rn(bn({},a),{isEditing:!0,className:n()(I,T,h),elementRef:this.contentsRef,intent:c.intent,minWidth:0,onCancel:this.handleCancel,onChange:this.handleChange,onConfirm:this.handleConfirm,onEdit:this.handleEdit,placeholder:"",selectAllOnFocus:!1,value:d}))}else{var v,y=n()(I,(mn(v={},ze,l),mn(v,Q,!i),v));e=r.createElement("div",{className:y,ref:this.contentsRef},f)}return r.createElement(en,Rn(bn({},c),{wrapText:i,truncated:!1,interactive:p,cellRef:this.cellRef,onKeyPress:this.handleKeyPress}),r.createElement(pn,{onActivate:this.handleCellActivate,onDoubleClick:this.handleCellDoubleClick,preventDefault:!1,stopPropagation:p,targetRef:this.contentsRef},e))}},{key:"renderHotkeys",value:function(){var e=this.props.tabIndex;return r.createElement(o.Hotkeys,{tabIndex:e},r.createElement(o.Hotkey,{key:"edit-cell",label:"Edit the currently focused cell",group:"Table",combo:"f2",onKeyDown:this.handleEdit}))}},{key:"checkShouldFocus",value:function(){var e;this.props.isFocused&&!this.state.isEditing&&(null===(e=this.cellRef.current)||void 0===e||e.focus())}},{key:"invokeCallback",value:function(e,t){var n=this.props,r=n.rowIndex,o=n.columnIndex;null==e||e(t,r,o)}}])&&yn(t.prototype,l),i&&yn(t,i),c}(r.Component);function Hn(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(e){return Tn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Tn(e)}function In(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){kn(e,t,n[t])}))}return e}function jn(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function xn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ln(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Hn(e):t;var n}function Dn(e,t){return Dn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Dn(e,t)}function _n(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tn(e);if(t){var o=Tn(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ln(this,n)}}mn(En,"displayName","".concat(o.DISPLAYNAME_PREFIX,".EditableCell")),mn(En,"defaultProps",{truncated:!0,wrapText:!1}),En=function(e,t,n,r){var o,l=arguments.length,i=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(l<3?o(i):l>3?o(t,n,i):o(t,n))||i);return l>3&&i&&Object.defineProperty(t,n,i),i}([o.HotkeysTarget],En);var Mn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dn(e,t)}(c,e);var t,l,i,a=_n(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),kn(Hn(e=a.apply(this,arguments)),"cellRef",r.createRef()),kn(Hn(e),"contentsRef",r.createRef()),kn(Hn(e),"state",{isEditing:!1,savedValue:e.props.value}),kn(Hn(e),"renderCell",(function(t){var l,i=t.handleKeyDown,a=t.handleKeyUp,c=e.props,u=c.editableTextProps,s=(c.onCancel,c.onChange,c.onConfirm,c.tabIndex),d=void 0===s?0:s,f=c.truncated,p=c.wrapText,h=xn(c,["editableTextProps","onCancel","onChange","onConfirm","tabIndex","truncated","wrapText"]),v=e.state,y=v.isEditing,m=v.dirtyValue,g=v.savedValue,b=h.interactive||y;if(y){var R=u?u.className:null;l=r.createElement(o.EditableText,jn(In({},u),{isEditing:!0,className:n()(I,T,R),elementRef:e.contentsRef,intent:h.intent,minWidth:0,onCancel:e.handleCancel,onChange:e.handleChange,onConfirm:e.handleConfirm,onEdit:e.handleEdit,placeholder:"",selectAllOnFocus:!1,value:m}))}else{var C,w=n()(I,(kn(C={},ze,f),kn(C,Q,!p),C));l=r.createElement("div",{className:w,ref:e.contentsRef},g)}return r.createElement(en,jn(In({},h),{wrapText:p,truncated:!1,interactive:b,cellRef:e.cellRef,onKeyDown:i,onKeyPress:e.handleKeyPress,onKeyUp:a,tabIndex:d}),r.createElement(pn,{onActivate:e.handleCellActivate,onDoubleClick:e.handleCellDoubleClick,preventDefault:!1,stopPropagation:b,targetRef:e.contentsRef},l))})),kn(Hn(e),"handleKeyPress",(function(){!e.state.isEditing&&e.props.isFocused&&e.setState({isEditing:!0,dirtyValue:"",savedValue:e.state.savedValue})})),kn(Hn(e),"handleEdit",(function(){e.setState({isEditing:!0,dirtyValue:e.state.savedValue})})),kn(Hn(e),"handleCancel",(function(t){e.setState({isEditing:!1,dirtyValue:void 0}),e.invokeCallback(e.props.onCancel,t)})),kn(Hn(e),"handleChange",(function(t){e.setState({dirtyValue:t}),e.invokeCallback(e.props.onChange,t)})),kn(Hn(e),"handleConfirm",(function(t){e.setState({isEditing:!1,savedValue:t,dirtyValue:void 0}),e.invokeCallback(e.props.onConfirm,t)})),kn(Hn(e),"handleCellActivate",(function(e){return!0})),kn(Hn(e),"handleCellDoubleClick",(function(t){e.handleEdit()})),kn(Hn(e),"hotkeys",[{combo:"f2",group:"Table",label:"Edit the currently focused cell",onKeyDown:e.handleEdit}]),e}return t=c,(l=[{key:"componentDidMount",value:function(){this.checkShouldFocus()}},{key:"componentDidUpdate",value:function(e){var t=!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.deepCompareKeys(this.props,e,["style"]),n=this.props.value;t&&null!=n&&this.setState({savedValue:n,dirtyValue:n}),this.checkShouldFocus()}},{key:"shouldComponentUpdate",value:function(e,t){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.shallowCompareKeys(this.state,t)||!o.Utils.deepCompareKeys(this.props,e,["style"])}},{key:"render",value:function(){return r.createElement(o.HotkeysTarget2,{hotkeys:this.hotkeys},this.renderCell)}},{key:"checkShouldFocus",value:function(){var e;this.props.isFocused&&!this.state.isEditing&&(null===(e=this.cellRef.current)||void 0===e||e.focus())}},{key:"invokeCallback",value:function(e,t){var n=this.props,r=n.rowIndex,o=n.columnIndex;null==e||e(t,r,o)}}])&&Pn(t.prototype,l),i&&Pn(t,i),c}(r.Component);function Fn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){return An=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},An(e)}function zn(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function Nn(e,t){return Nn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Nn(e,t)}function Wn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=An(e);if(t){var o=An(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zn(this,n)}}kn(Mn,"displayName","".concat(o.DISPLAYNAME_PREFIX,".EditableCell2")),kn(Mn,"defaultProps",{truncated:!0,wrapText:!1});var Un=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Nn(e,t)}(n,e);var t=Wn(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t.apply(this,arguments)}return n}(r.PureComponent);Fn(Un,"displayName","".concat(o.DISPLAYNAME_PREFIX,".Column")),Fn(Un,"defaultProps",{cellRenderer:Jt});var Gn,Bn={copyCells:function(e){var t=e.map((function(e){return e.join("\t")})).join("\n");return navigator.clipboard.writeText(t)},copyString:function(e){return navigator.clipboard.writeText(e)}};!function(e){e.BATCH="batch",e.BATCH_ON_UPDATE="batch-on-update",e.NONE="none"}(Gn||(Gn={}));var Vn="[Blueprint Table]",qn=Vn+" TableQuadrant onScroll need not be defined for any quadrant aside from the MAIN quadrant.",Kn=Vn+" Table cannot expand a FULL_COLUMNS selection using a multi-column region.",Qn=Vn+" Table cannot expand a FULL_COLUMNS selection using a multi-row region.",Yn=Vn+' Children of Table must be Columns"',Xn=Vn+" Table numFrozenColumns must be in less than or equal to the number of columns. Clamping the value for you.",Zn=Vn+" Table requires numFrozenColumns to be greater than or equal to 0.",$n=Vn+" Table numFrozenRows must be less than or equal to numRows. Clamping the value for you.",Jn=Vn+" Table requires numFrozenRows to be greater than or equal to 0.",er=Vn+" Table requires rowHeights.length to equal numRows when both props are provided.",tr=Vn+" Table requires numRows to be greater than or equal to 0.",nr=Vn+" Table requires columnWidths.length to equal the number of <Column>s if provided.",rr="".concat(Vn," Table resize method called while component is unmounted, this is a no-op."),or="".concat(Vn," cellRendererDependencies should either always be defined or undefined; this feature cannot be enabled during the component lifecycle"),lr=Vn+" Copy failed.";function ir(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ar(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ur(e){return ur=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ur(e)}function sr(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function dr(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fr(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?ir(e):t;var n}function pr(e,t){return pr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pr(e,t)}function hr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ur(e);if(t){var o=ur(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fr(this,n)}}var vr,yr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pr(e,t)}(a,e);var t,n,l,i=hr(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),cr(ir(e=i.apply(this,arguments)),"handleClick",(function(){var t=e.props,n=t.context,r=t.getCellData,o=t.onCopy,l=n.getUniqueCells(),i=vt.sparseMapCells(l,r);void 0!==i&&Bn.copyCells(i).then((function(){return null==o?void 0:o(!0)})).catch((function(e){console.error(lr,e),null==o||o(!1)}))})),e}return t=a,n=[{key:"render",value:function(){var e=this.props,t=(e.context,e.getCellData,e.onCopy,dr(e,["context","getCellData","onCopy"]));return r.createElement(o.MenuItem,sr(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){cr(e,t,n[t])}))}return e}({},t),{onClick:this.handleClick}))}}],n&&ar(t.prototype,n),l&&ar(t,l),a}(r.PureComponent);function mr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function br(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Rr(e)}function Cr(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?mr(e):t;var n}function wr(e,t){return wr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wr(e,t)}function Or(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Rr(e);if(t){var o=Rr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cr(this,n)}}!function(e){e[e.HORIZONTAL=1]="HORIZONTAL",e[e.VERTICAL=0]="VERTICAL"}(vr||(vr={}));var Sr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wr(e,t)}(a,e);var t,o,l,i=Or(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),br(mr(e=i.apply(this,arguments)),"state",{isDragging:!1}),br(mr(e),"handleActivate",(function(t){return e.setState({isDragging:!0}),e.props.onLayoutLock(!0),t.stopPropagation(),t.stopImmediatePropagation(),!0})),br(mr(e),"handleDragMove",(function(t,n){var r=e.props.orientation;null!=e.props.onResizeMove&&e.props.onResizeMove(n.offset[r],n.delta[r])})),br(mr(e),"handleDragEnd",(function(t,n){var r=e.props.orientation;e.setState({isDragging:!1}),e.props.onLayoutLock(!1),null!=e.props.onResizeMove&&e.props.onResizeMove(n.offset[r],n.delta[r]),null!=e.props.onResizeEnd&&e.props.onResizeEnd(n.offset[r])})),br(mr(e),"handleClick",(function(t){e.setState({isDragging:!1}),e.props.onLayoutLock(!1)})),br(mr(e),"handleDoubleClick",(function(t){e.setState({isDragging:!1}),e.props.onLayoutLock(!1),null!=e.props.onDoubleClick&&e.props.onDoubleClick()})),e}return t=a,(o=[{key:"render",value:function(){var e=this.props,t=e.onResizeMove,o=e.onResizeEnd,l=e.onDoubleClick,i=e.orientation;if(null!=t||null!=o||null!=l){var a,c=n()(ve,(br(a={},k,this.state.isDragging),br(a,ye,1===i),br(a,Re,0===i),a),this.props.className),u=n()(he,br({},k,this.state.isDragging));return r.createElement(pn,{onActivate:this.handleActivate,onClick:this.handleClick,onDoubleClick:this.handleDoubleClick,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove},r.createElement("div",{className:c},r.createElement("div",{className:u})))}}}])&&gr(t.prototype,o),l&&gr(t,l),a}(r.PureComponent);function Er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Hr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Hr(e,t,n[t])}))}return e}function kr(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Tr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Er(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ir(e,t){return 0===e.length?void 0:null!=t?t.focusSelectionIndex:e.length-1}function jr(e,t,n,r){if(e){if(null!=t)return t;if(null!=n)return n;if(r.length>0){var o=r.length-1;return kr(Pr({},vt.getFocusCellCoordinatesFromRegion(r[o])),{focusSelectionIndex:o})}return{col:0,row:0,focusSelectionIndex:0}}}function xr(e,t){return null!=e.rows&&t.row===e.rows[0]}function Lr(e,t){return null!=e.rows&&t.row===e.rows[1]}function Dr(e,t){return null!=e.cols&&t.col===e.cols[0]}function _r(e,t){return null!=e.cols&&t.col===e.cols[1]}function Mr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return kr(Pr({},e),{focusSelectionIndex:t})}function Fr(e,t){switch(vt.getRegionCardinality(t)){case rt.FULL_COLUMNS:var n=Tr(Ar(e,t,"col","cols"),2),r=n[0],o=n[1];return vt.column(r,o);case rt.FULL_ROWS:var l=Tr(Ar(e,t,"row","rows"),2),i=l[0],a=l[1];return vt.row(i,a);case rt.CELLS:var c=Tr(Ar(e,t,"row","rows"),2),u=c[0],s=c[1],d=Tr(Ar(e,t,"col","cols"),2),f=d[0],p=d[1];return vt.cell(u,f,s,p);default:return vt.table()}}function Ar(e,t,n,r){var o=e[n],l=Tr(t[r],2),i=l[0];if(i!==l[1]){if("rows"===r)throw new Error(Qn);if("cols"===r)throw new Error(Kn)}return o<=i?[o,i]:[i,o]}function zr(e){var t=null!=e?e:"undefined"!=typeof navigator?navigator.platform:void 0;return void 0!==t&&/Mac|iPod|iPhone|iPad/.test(t)}function Nr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Wr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ur(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e){return Gr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Gr(e)}function Br(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ur(e,t,n[t])}))}return e}function Vr(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function qr(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Nr(e):t;var n}function Kr(e,t){return Kr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kr(e,t)}function Qr(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Gr(e);if(t){var o=Gr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return qr(this,n)}}var Yr=function(t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Kr(e,t)}(c,t);var n,l,i,a=Qr(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Ur(Nr(e=a.apply(this,arguments)),"didExpandSelectionOnActivate",!1),Ur(Nr(e),"lastEmittedSelectedRegions",null),Ur(Nr(e),"handleActivate",(function(t){var n=e.props,r=n.locateClick,o=n.selectedRegions,l=n.selectedRegionTransform;if(e.shouldIgnoreMouseDown(t))return!1;var i=r(t);if(!vt.isValid(i))return!1;null!=l&&(i=l(i,t));var a=vt.findMatchingRegion(o,i),c=-1!==a;return c&&rn.isAdditive(t)?(e.handleClearSelectionAtIndex(a),!1):(c?e.handleClearAllSelectionsNotAtIndex(a):e.shouldExpandSelection(t)?e.handleExpandSelection(i):e.shouldAddDisjointSelection(t)?e.handleAddDisjointSelection(i):e.handleReplaceSelection(i),!0)})),Ur(Nr(e),"handleDragMove",(function(t,n){var r=e.props,o=r.enableMultipleSelection,l=r.focusedCell,i=r.locateClick,a=r.locateDrag,c=r.selectedRegions,u=r.selectedRegionTransform,s=o?a(t,n,e.didExpandSelectionOnActivate):i(t);if(void 0!==s&&vt.isValid(s)){null!=u&&(s=u(s,t,n));var d=e.didExpandSelectionOnActivate?e.expandSelectedRegions(c,s,l):vt.update(c,s);if(e.maybeInvokeSelectionCallback(d),!o){var f=d.length-1,p=d[f];e.invokeOnFocusCallbackForRegion(p,f)}}})),Ur(Nr(e),"handleDragEnd",(function(){e.finishInteraction()})),Ur(Nr(e),"handleClick",(function(){e.finishInteraction()})),Ur(Nr(e),"shouldExpandSelection",(function(t){return e.props.enableMultipleSelection&&t.shiftKey})),Ur(Nr(e),"shouldAddDisjointSelection",(function(t){return e.props.enableMultipleSelection&&rn.isAdditive(t)})),Ur(Nr(e),"handleClearSelectionAtIndex",(function(t){var n=e.props.selectedRegions.slice();if(n.splice(t,1),e.maybeInvokeSelectionCallback(n),n.length>0){var r=n.length-1;e.invokeOnFocusCallbackForRegion(n[r],r)}})),Ur(Nr(e),"handleClearAllSelectionsNotAtIndex",(function(t){var n=e.props.selectedRegions[t];e.maybeInvokeSelectionCallback([n]),e.invokeOnFocusCallbackForRegion(n,0)})),Ur(Nr(e),"handleExpandSelection",(function(t){var n=e.props,r=n.focusedCell,o=n.selectedRegions;e.didExpandSelectionOnActivate=!0;var l=e.expandSelectedRegions(o,t,r);e.maybeInvokeSelectionCallback(l),null!=o&&0!==o.length||e.invokeOnFocusCallbackForRegion(t)})),Ur(Nr(e),"handleAddDisjointSelection",(function(t){var n=e.props.selectedRegions,r=vt.add(n,t);e.maybeInvokeSelectionCallback(r),e.invokeOnFocusCallbackForRegion(t,r.length-1)})),Ur(Nr(e),"handleReplaceSelection",(function(t){var n=[t];e.maybeInvokeSelectionCallback(n),e.invokeOnFocusCallbackForRegion(t)})),Ur(Nr(e),"invokeOnFocusCallbackForRegion",(function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e.props.onFocusedCell,o=vt.getFocusCellCoordinatesFromRegion(t);r(e.focusedCellUtils.toFullCoordinates(o,n))})),Ur(Nr(e),"finishInteraction",(function(){var t,n;null===(t=(n=e.props).onSelectionEnd)||void 0===t||t.call(n,e.props.selectedRegions),e.didExpandSelectionOnActivate=!1,e.lastEmittedSelectedRegions=null})),e}return n=c,(l=[{key:"focusedCellUtils",get:function(){return Br({},e,this.props.focusedCellUtils)}},{key:"render",value:function(){var e=this.getDraggableHandlers();return r.createElement(pn,Vr(Br({},e),{preventDefault:!1,targetRef:this.props.targetRef}),this.props.children)}},{key:"getDraggableHandlers",value:function(){return null==this.props.onSelection?{}:{onActivate:this.handleActivate,onClick:this.handleClick,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove}}},{key:"shouldIgnoreMouseDown",value:function(e){var t=this.props,n=t.disabled,r=t.ignoredSelectors,o=void 0===r?[]:r,l=e.target,i=at.isLeftClick(e),a=i&&e.ctrlKey&&zr(),c="function"==typeof n?n(e):n;return!i||a||c||o.some((function(e){return null!=l.closest(e)}))}},{key:"maybeInvokeSelectionCallback",value:function(e){var t=this.props.onSelection;null!=this.lastEmittedSelectedRegions&&o.Utils.deepCompareKeys(this.lastEmittedSelectedRegions,e)||(t(e),this.lastEmittedSelectedRegions=e)}},{key:"expandSelectedRegions",value:function(e,t,n){if(0===e.length)return[t];if(null!=n){var r=this.focusedCellUtils.expandFocusedRegion(n,t);return vt.update(e,r)}var o=vt.expandRegion(e[e.length-1],t);return vt.update(e,o)}}])&&Wr(n.prototype,l),i&&Wr(n,i),c}(r.PureComponent);function Xr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e){return Jr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jr(e)}function eo(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Xr(e):t;var n}function to(e,t){return to=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},to(e,t)}function no(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Jr(e);if(t){var o=Jr(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return eo(this,n)}}Ur(Yr,"defaultProps",{disabled:!1,enableMultipleSelection:!1,selectedRegions:[]}),Ur(Yr,"displayName","".concat(o.DISPLAYNAME_PREFIX,".DragSelectable"));var ro=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&to(e,t)}(c,e);var t,l,i,a=no(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),$r(Xr(e=a.apply(this,arguments)),"state",{isActive:!1}),e}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:["style"]})||!o.Utils.deepCompareKeys(this.props,e,["style"])}},{key:"render",value:function(){var e,t,l,i=n()(D,($r(l={},_,this.props.isActive||this.state.isActive),$r(l,A,this.props.isSelected),$r(l,o.Classes.LOADING,this.props.loading),l),this.props.className),a=void 0!==this.props.menuRenderer;return r.createElement(o.ContextMenu,{className:i,content:null===(e=(t=this.props).menuRenderer)||void 0===e?void 0:e.call(t,this.props.index),disabled:!a,style:this.props.style,ref:this.props.targetRef},this.props.children)}}])&&Zr(t.prototype,l),i&&Zr(t,i),c}(r.Component);function oo(){return r.createElement("div",{className:z})}function lo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function io(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ao(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function co(e){return co=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},co(e)}function uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ao(e,t,n[t])}))}return e}function so(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function fo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function po(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?lo(e):t;var n}function ho(e,t){return ho=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ho(e,t)}function vo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=co(e);if(t){var o=co(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return po(this,n)}}var yo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ho(e,t)}(c,e);var t,l,i,a=vo(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),ao(lo(e=a.apply(this,arguments)),"state",{isActive:!1}),ao(lo(e),"handlePopoverOpened",(function(){return e.setState({isActive:!0})})),ao(lo(e),"handlePopoverClosing",(function(){return e.setState({isActive:!1})})),e}return t=c,i=[{key:"isHeaderMouseTarget",value:function(e){return e.classList.contains(D)||e.classList.contains(E)||e.classList.contains(W)||e.classList.contains(M)}}],(l=[{key:"render",value:function(){var e,t=this.props,o=t.enableColumnInteractionBar,l=t.enableColumnReordering,i=t.isColumnSelected,a=(t.menuIcon,t.name,t.nameRenderer,fo(t,["enableColumnInteractionBar","enableColumnReordering","isColumnSelected","menuIcon","name","nameRenderer"])),c=n()(a.className,S,(ao(e={},x,o),ao(e,L,null!=this.props.reorderHandle),e));return r.createElement(ro,so(uo({isReorderable:l,isSelected:i},a),{className:c}),this.renderName(),this.maybeRenderContent(),this.props.loading?void 0:this.props.resizeHandle)}},{key:"renderName",value:function(){var e,t=this.props,n=t.enableColumnInteractionBar,o=t.index,l=t.loading,i=t.name,a=t.nameRenderer,c=t.reorderHandle,u=this.maybeRenderDropdownMenu(),s=r.createElement("div",{className:ze},i),d=r.createElement(Je,{loading:null!=l&&l,variableLength:!0},null!==(e=null==a?void 0:a(i,o))&&void 0!==e?e:s);return n?r.createElement("div",{className:E,title:i},r.createElement("div",{className:W},c,u),r.createElement(oo,null),r.createElement("div",{className:H},d)):r.createElement("div",{className:E,title:i},c,u,r.createElement("div",{className:H},d))}},{key:"maybeRenderContent",value:function(){if(null!==this.props.children)return r.createElement("div",{className:M},this.props.children)}},{key:"maybeRenderDropdownMenu",value:function(){var e=this.props,t=e.index,l=e.menuIcon,i=e.menuPopoverProps,a=e.menuRenderer,c=e.selectCellsOnMenuClick;if(o.Utils.isFunction(a)){var u,s=n()(ke,ot,(ao(u={},Ie,this.state.isActive),ao(u,je,c),u));return r.createElement("div",{className:s},r.createElement("div",{className:Te}),r.createElement(o.Popover,uo({className:n()(Pe,null==i?void 0:i.className),content:a(t),onClosing:this.handlePopoverClosing,onOpened:this.handlePopoverOpened,placement:"bottom",rootBoundary:"document"},i),r.createElement(o.Icon,{icon:l})))}}}])&&io(t.prototype,l),i&&io(t,i),c}(o.AbstractPureComponent);function mo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bo(e){return bo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},bo(e)}function Ro(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Co(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function wo(e,t){return wo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wo(e,t)}function Oo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bo(e);if(t){var o=bo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Co(this,n)}}ao(yo,"displayName","".concat(o.DISPLAYNAME_PREFIX,".ColumnHeaderCell")),ao(yo,"defaultProps",{enableColumnInteractionBar:!1,isActive:!1,menuIcon:"chevron-down",selectCellsOnMenuClick:!0});var So=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wo(e,t)}(i,e);var t,n,o,l=Oo(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),l.apply(this,arguments)}return t=i,n=[{key:"render",value:function(){var e,t,n=this.props,o=(n.enableRowReordering,n.isRowSelected,n.name),l=n.nameRenderer,i=Ro(n,["enableRowReordering","isRowSelected","name","nameRenderer"]),a=r.createElement("div",{className:Se},o),c=r.createElement(Je,{loading:null!==(e=i.loading)&&void 0!==e&&e},null!==(t=null==l?void 0:l(o,i.index))&&void 0!==t?t:a);return r.createElement(ro,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){go(e,t,n[t])}))}return e}({isReorderable:this.props.enableRowReordering,isSelected:this.props.isRowSelected},i),r.createElement("div",{className:Oe},c),this.props.children,i.loading?void 0:i.resizeHandle)}}],n&&mo(t.prototype,n),o&&mo(t,o),i}(o.AbstractPureComponent);function Eo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ho(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,l=[],i=!0,a=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(l.push(r.value),!t||l.length!==t);i=!0);}catch(e){a=!0,o=e}finally{try{i||null==n.return||n.return()}finally{if(a)throw o}}return l}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Eo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Eo(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Po=r.forwardRef((function(e,t){var l=e.className,i=e.name,a=e.index,c=e.intent,u=e.onCancel,s=e.onChange,d=e.onConfirm,f=Ho(r.useState(i),2),p=f[0],h=f[1],v=Ho(r.useState(!1),2),y=v[0],m=v[1],g=Ho(r.useState(i),2),b=g[0],R=g[1];r.useEffect((function(){h(i),R(i)}),[i]);var C=r.useCallback((function(){m(!0),h(b)}),[b]),w=r.useCallback((function(e){m(!1),h(void 0),null==u||u(e,a)}),[u,a]),O=r.useCallback((function(e){h(e),null==s||s(e,a)}),[s,a]),S=r.useCallback((function(e){m(!1),R(e),h(void 0),null==d||d(e,a)}),[d,a]);return r.createElement(o.EditableText,{className:n()(l,T),defaultValue:i,elementRef:t,intent:c,minWidth:0,onCancel:w,onChange:O,onConfirm:S,onEdit:C,placeholder:"",selectAllOnFocus:!0,value:y?p:b})}));Po.displayName="".concat(o.DISPLAYNAME_PREFIX,".EditableName");var ko=i(820),To=i.n(ko);function Io(e,t,n,r,o){var l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,a=vt.getRegionCardinality(e),c=n,u=t,s=r(i),d=o(l);switch(a){case rt.CELLS:var f=o(e.rows[0]),p=r(e.cols[0]);c=xo(f,d),u=xo(p,s);break;case rt.FULL_ROWS:c=xo(o(e.rows[0]),d);break;case rt.FULL_COLUMNS:u=xo(r(e.cols[0]),s);break;default:c=0,u=0}return{scrollLeft:u,scrollTop:c}}function jo(e,t){return null==e?0:"horizontal"===t?e.offsetHeight-e.clientHeight:e.offsetWidth-e.clientWidth}function xo(e,t){return Math.max(e-t,0)}function Lo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Do(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mo(e){return Mo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Mo(e)}function Fo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){_o(e,t,n[t])}))}return e}function Ao(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function zo(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Lo(e):t;var n}function No(e,t){return No=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},No(e,t)}function Wo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mo(e);if(t){var o=Mo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zo(this,n)}}var Uo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&No(e,t)}(a,e);var t,n,l,i=Wo(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),_o(Lo(e=i.apply(this,arguments)),"selectedRegionStartIndex",void 0),_o(Lo(e),"selectedRegionLength",0),_o(Lo(e),"handleActivate",(function(t){if(e.shouldIgnoreMouseDown(t))return!1;var n=e.props.locateClick(t);if(!vt.isValid(n))return!1;var r=vt.getRegionCardinality(n),o=r===rt.FULL_COLUMNS,l=r===rt.FULL_ROWS;if(!o&&!l)return!1;var i=e.props.selectedRegions,a=void 0===i?[]:i,c=vt.findContainingRegion(a,n);if(c>=0){var u=a[c];if(vt.getRegionCardinality(u)!==r)return!1;var s=l?u.rows:u.cols;e.selectedRegionStartIndex=s[0],e.selectedRegionLength=s[1]-s[0]+1}else{e.maybeSelectRegion(n);var d=l?n.rows:n.cols;e.selectedRegionStartIndex=d[0],e.selectedRegionLength=d[1]-d[0]+1}return!0})),_o(Lo(e),"handleDragMove",(function(t,n){var r=e.selectedRegionStartIndex,o=e.props.locateDrag(t,n);if(void 0!==r&&void 0!==o){var l=e.selectedRegionLength,i=at.guideIndexToReorderedIndex(r,o,l);e.props.onReordering(r,i,l)}})),_o(Lo(e),"handleDragEnd",(function(t,n){var r=e.selectedRegionStartIndex,o=e.props.locateDrag(t,n);if(void 0!==r&&void 0!==o){var l=e.selectedRegionLength,i=at.guideIndexToReorderedIndex(r,o,l);e.props.onReordered(r,i,l);var a=e.props.toRegion(i,i+l-1);e.maybeSelectRegion(a),e.selectedRegionStartIndex=void 0,e.selectedRegionLength=0}})),e}return t=a,(n=[{key:"render",value:function(){var e=this.getDraggableHandlers();return r.createElement(pn,Ao(Fo({},e),{preventDefault:!1,targetRef:this.props.targetRef}),this.props.children)}},{key:"getDraggableHandlers",value:function(){return null==this.props.onReordered?{}:{onActivate:this.handleActivate,onDragEnd:this.handleDragEnd,onDragMove:this.handleDragMove}}},{key:"shouldIgnoreMouseDown",value:function(e){var t=this.props.disabled,n=o.Utils.isFunction(t)?null==t?void 0:t(e):t;return!at.isLeftClick(e)||n}},{key:"maybeSelectRegion",value:function(e){var t=[e];o.Utils.deepCompareKeys(t,this.props.selectedRegions)||(this.props.onSelection(t),this.props.onFocusedCell(Ao(Fo({},vt.getFocusCellCoordinatesFromRegion(e)),{focusSelectionIndex:0})))}}])&&Do(t.prototype,n),l&&Do(t,l),a}(r.PureComponent);function Go(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qo(e){return qo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},qo(e)}function Ko(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Go(e):t;var n}function Qo(e,t){return Qo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Qo(e,t)}function Yo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qo(e);if(t){var o=qo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ko(this,n)}}_o(Uo,"defaultProps",{selectedRegions:[]});var Xo=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qo(e,t)}(i,e);var t,n,o,l=Yo(i);function i(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),Vo(Go(e=l.apply(this,arguments)),"state",i.getDerivedStateFromProps(e.props,null)),Vo(Go(e),"onResizeMove",(function(t,n){var r,o;e.offsetSize(n),null===(r=(o=e.props).onSizeChanged)||void 0===r||r.call(o,e.state.size)})),Vo(Go(e),"onResizeEnd",(function(t){var n,r;e.setState({unclampedSize:e.state.size}),null===(n=(r=e.props).onResizeEnd)||void 0===n||n.call(r,e.state.size)})),e}return t=i,n=[{key:"componentDidUpdate",value:function(e){e.size!==this.props.size&&this.setState(i.getDerivedStateFromProps(this.props,null))}},{key:"render",value:function(){var e=r.Children.only(this.props.children),t=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Vo(e,t,n[t])}))}return e}({},e.props.style,this.getStyle());if(!1===this.props.isResizable)return r.cloneElement(e,{style:t});var n=this.renderResizeHandle();return r.cloneElement(e,{style:t,resizeHandle:n})}},{key:"renderResizeHandle",value:function(){var e=this.props,t=e.onLayoutLock,n=e.onDoubleClick,o=e.orientation;return r.createElement(Sr,{key:"resize-handle",onDoubleClick:n,onLayoutLock:t,onResizeEnd:this.onResizeEnd,onResizeMove:this.onResizeMove,orientation:o})}},{key:"getStyle",value:function(){return this.props.orientation===vr.VERTICAL?{flexBasis:"".concat(this.state.size,"px"),minWidth:"0px",width:"".concat(this.state.size,"px")}:{flexBasis:"".concat(this.state.size,"px"),height:"".concat(this.state.size,"px"),minHeight:"0px"}}},{key:"offsetSize",value:function(e){var t=this.state.unclampedSize+e;this.setState({size:at.clamp(t,this.props.minSize,this.props.maxSize),unclampedSize:t})}}],o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.size;return null==t?{size:n,unclampedSize:n}:null}}],n&&Bo(t.prototype,n),o&&Bo(t,o),i}(o.AbstractPureComponent);function Zo(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function $o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function el(e){return el=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},el(e)}function tl(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Zo(e):t;var n}function nl(e,t){return nl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},nl(e,t)}function rl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=el(e);if(t){var o=el(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return tl(this,n)}}Vo(Xo,"defaultProps",{isResizable:!0,minSize:0});var ol=["focusedCell","selectedRegions"],ll=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&nl(e,t)}(c,e);var t,l,i,a=rl(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Jo(Zo(t=a.call(this,e)),"activationIndex",null),Jo(Zo(t),"cellRefs",new Map),Jo(Zo(t),"reorderHandleRefs",new Map),Jo(Zo(t),"convertEventToIndex",(function(e){var n=t.props.getMouseCoordinate(e);return t.props.convertPointToIndex(n)})),Jo(Zo(t),"locateClick",(function(e){var n=e.target.closest(".".concat(ke));return n&&!n.classList.contains(je)?t.props.toRegion(-1):(t.activationIndex=t.convertEventToIndex(e),t.props.toRegion(t.activationIndex))})),Jo(Zo(t),"locateDragForSelection",(function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=t.props.getDragCoordinate(n.current),l=t.props.convertPointToIndex(o);return r?t.props.toRegion(l):null!==t.activationIndex?t.props.toRegion(t.activationIndex,l):{}})),Jo(Zo(t),"locateDragForReordering",(function(e,n){var r=t.props.getDragCoordinate(n.current),o=t.props.convertPointToIndex(r,!0);return o<0?void 0:o})),Jo(Zo(t),"renderCells",(function(){for(var e=t.props,n=e.indexStart,r=e.indexEnd,o=[],l=n;l<=r;l++){var i=t.renderNewCell(l);null!=i&&o.push(i)}return o})),Jo(Zo(t),"renderNewCell",(function(e){var n=t.props.getCellExtremaClasses(e,t.props.indexEnd);return(t.props.isGhostIndex(e)?t.props.ghostCellRenderer:t.renderCell)(e,n)})),Jo(Zo(t),"renderCell",(function(e,o){var l=t.props,i=l.getIndexClass,a=l.selectedRegions,c=t.props.headerCellRenderer(e);if(null==c)return null;var u,s=null!=c.props.loading?c.props.loading:t.props.loading,d=t.props.isCellSelected(e),f=t.isEntireCellTargetReorderable(e),p=n()(o,Jo({},F,f),t.props.getCellIndexClass(e),c.props.className),h=il(t.cellRefs,e),v=(Jo(u={className:p,index:e},t.props.headerCellIsSelectedPropName,d),Jo(u,t.props.headerCellIsReorderablePropName,f),Jo(u,"loading",s),Jo(u,"reorderHandle",t.maybeRenderReorderHandle(e)),Jo(u,"targetRef",h),u),y=r.createElement(Yr,{enableMultipleSelection:t.props.enableMultipleSelection,disabled:t.isDragSelectableDisabled,focusedCell:t.props.focusedCell,ignoredSelectors:[".".concat(de)],key:i(e),locateClick:t.locateClick,locateDrag:t.locateDragForSelection,onFocusedCell:t.props.onFocusedCell,onSelection:t.handleDragSelectableSelection,onSelectionEnd:t.handleDragSelectableSelectionEnd,selectedRegions:a,selectedRegionTransform:t.props.selectedRegionTransform,targetRef:h},r.createElement(Xo,{isResizable:t.props.isResizable,maxSize:t.props.maxSize,minSize:t.props.minSize,onDoubleClick:function(){var n,r;return null===(n=(r=t.props).handleResizeDoubleClick)||void 0===n?void 0:n.call(r,e)},onLayoutLock:t.props.onLayoutLock,onResizeEnd:function(n){return t.props.handleResizeEnd(e,n)},onSizeChanged:function(n){return t.props.handleSizeChanged(e,n)},orientation:t.props.resizeOrientation,size:t.props.getCellSize(e)},r.cloneElement(c,v)));return t.isReorderHandleEnabled()?y:t.wrapInDragReorderable(e,y,t.isDragReorderableDisabled,h)})),Jo(Zo(t),"handleDragSelectableSelection",(function(e){t.props.onSelection(e),t.setState({hasValidSelection:!1})})),Jo(Zo(t),"handleDragSelectableSelectionEnd",(function(){t.activationIndex=null,t.setState({hasValidSelection:!0})})),Jo(Zo(t),"isDragSelectableDisabled",(function(e){if(rn.isAdditive(e))return!1;var n=t.convertEventToIndex(e);return t.isEntireCellTargetReorderable(n)})),Jo(Zo(t),"isDragReorderableDisabled",(function(e){if(!t.isDragSelectableDisabled(e))return!0;var n=t.convertEventToIndex(e);return!t.isEntireCellTargetReorderable(n)})),Jo(Zo(t),"isEntireCellTargetReorderable",(function(e){var n=t.props,r=n.isReorderable,o=void 0!==r&&r,l=n.selectedRegions;return o&&t.props.isCellSelected(e)&&t.state.hasValidSelection&&vt.getRegionCardinality(l[0])===t.props.fullRegionCardinality&&1===l.length&&!t.isReorderHandleEnabled()})),t.state={hasValidSelection:t.isSelectedRegionsControlledAndNonEmpty(e)},t}return t=c,l=[{key:"componentDidUpdate",value:function(e,t){var n=this.isSelectedRegionsControlledAndNonEmpty(this.props);t.hasValidSelection!==n&&this.setState({hasValidSelection:n})}},{key:"shouldComponentUpdate",value:function(e,t){return!o.Utils.shallowCompareKeys(this.state,t)||!o.Utils.shallowCompareKeys(this.props,e,{exclude:ol})||!o.Utils.deepCompareKeys(this.props,e,ol)}},{key:"render",value:function(){return this.props.wrapCells(this.renderCells())}},{key:"isSelectedRegionsControlledAndNonEmpty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props;return null!=e.selectedRegions&&e.selectedRegions.length>0}},{key:"isReorderHandleEnabled",value:function(){return this.isColumnHeader()&&this.props.isReorderable}},{key:"maybeRenderReorderHandle",value:function(e){var t=il(this.reorderHandleRefs,e);return this.isReorderHandleEnabled()?this.wrapInDragReorderable(e,r.createElement("div",{className:de,ref:t},r.createElement("div",{className:n()(se,ot)},r.createElement(et.DragHandleVertical,{title:"Press down to drag"}))),!1,t):void 0}},{key:"isColumnHeader",value:function(){return this.props.fullRegionCardinality===rt.FULL_COLUMNS}},{key:"wrapInDragReorderable",value:function(e,t,n,o){return r.createElement(Uo,{disabled:n,key:this.props.getIndexClass(e),locateClick:this.locateClick,locateDrag:this.locateDragForReordering,onReordered:this.props.onReordered,onReordering:this.props.onReordering,onSelection:this.props.onSelection,onFocusedCell:this.props.onFocusedCell,selectedRegions:this.props.selectedRegions,targetRef:o,toRegion:this.props.toRegion},t)}}],l&&$o(t.prototype,l),i&&$o(t,i),c}(r.Component);function il(e,t){if(e.has(t))return e.get(t);var n=r.createRef();return e.set(t,n),n}function al(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ul(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sl(e){return sl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},sl(e)}function dl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fl(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?al(e):t;var n}function pl(e,t){return pl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},pl(e,t)}function hl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sl(e);if(t){var o=sl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return fl(this,n)}}var vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pl(e,t)}(a,e);var t,o,l,i=hl(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),ul(al(e=i.apply(this,arguments)),"wrapCells",(function(t){var o=e.props,l=o.columnIndexStart,i=o.grid.getRect().width,a=e.props.grid.getCumulativeWidthBefore(l),c={transform:"translateX(".concat(a||0,"px)"),width:i-a},u=n()(xe,w);return r.createElement("div",{style:{width:i}},r.createElement("div",{style:c,className:u,ref:e.props.measurableElementRef},t))})),ul(al(e),"convertPointToColumn",(function(t,n){return e.props.locator.convertPointToColumn(t,n)})),ul(al(e),"getCellExtremaClasses",(function(t,n){return e.props.grid.getExtremaClasses(0,t,1,n)})),ul(al(e),"getColumnWidth",(function(t){return e.props.grid.getColumnRect(t).width})),ul(al(e),"getDragCoordinate",(function(e){return e[0]})),ul(al(e),"getMouseCoordinate",(function(e){return e.clientX})),ul(al(e),"handleResizeEnd",(function(t,n){e.props.onResizeGuide(null),e.props.onColumnWidthChanged(t,n)})),ul(al(e),"handleResizeDoubleClick",(function(t){var n=e.props,r=n.minColumnWidth,o=n.maxColumnWidth,l=e.props.locator.getWidestVisibleCellInColumn(t),i=at.clamp(l,r,o);e.props.onResizeGuide(null),e.props.onColumnWidthChanged(t,i)})),ul(al(e),"handleSizeChanged",(function(t,n){var r=e.props.grid.getColumnRect(t);e.props.onResizeGuide([r.left+n])})),ul(al(e),"isCellSelected",(function(t){return vt.hasFullColumn(e.props.selectedRegions,t)})),ul(al(e),"isGhostIndex",(function(t){return e.props.grid.isGhostIndex(-1,t)})),ul(al(e),"renderGhostCell",(function(t,o){var l=e.props,i=l.grid,a=l.loading,c=i.getGhostCellRect(0,t),u={flexBasis:"".concat(c.width,"px"),width:"".concat(c.width,"px")};return r.createElement(yo,{className:n()(o),index:t,key:Ge(t),loading:a,style:u})})),ul(al(e),"toRegion",(function(e,t){return vt.column(e,t)})),e}return t=a,o=[{key:"componentDidMount",value:function(){var e,t;null===(e=(t=this.props).onMount)||void 0===e||e.call(t,"column")}},{key:"render",value:function(){var e=this.props,t=e.cellRenderer,n=(e.onColumnWidthChanged,e.minColumnWidth),o=e.maxColumnWidth,l=(e.defaultColumnWidth,e.columnIndexStart),i=e.columnIndexEnd,a=dl(e,["cellRenderer","onColumnWidthChanged","minColumnWidth","maxColumnWidth","defaultColumnWidth","columnIndexStart","columnIndexEnd"]);return r.createElement(ll,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ul(e,t,n[t])}))}return e}({convertPointToIndex:this.convertPointToColumn,fullRegionCardinality:rt.FULL_COLUMNS,getCellExtremaClasses:this.getCellExtremaClasses,getCellIndexClass:Ve,getCellSize:this.getColumnWidth,getDragCoordinate:this.getDragCoordinate,getIndexClass:Ge,getMouseCoordinate:this.getMouseCoordinate,ghostCellRenderer:this.renderGhostCell,handleResizeDoubleClick:this.handleResizeDoubleClick,handleResizeEnd:this.handleResizeEnd,handleSizeChanged:this.handleSizeChanged,headerCellIsReorderablePropName:"enableColumnReordering",headerCellIsSelectedPropName:"isColumnSelected",headerCellRenderer:t,indexEnd:i,indexStart:l,isCellSelected:this.isCellSelected,isGhostIndex:this.isGhostIndex,maxSize:o,minSize:n,resizeOrientation:vr.VERTICAL,selectedRegions:[],toRegion:this.toRegion,wrapCells:this.wrapCells},a))}}],o&&cl(t.prototype,o),l&&cl(t,l),a}(r.Component);function yl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ml(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function gl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bl(e){return bl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},bl(e)}function Rl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Cl(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?yl(e):t;var n}function wl(e,t){return wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wl(e,t)}function Ol(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bl(e);if(t){var o=bl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cl(this,n)}}ul(vl,"defaultProps",{isReorderable:!1,isResizable:!0,loading:!1});var Sl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wl(e,t)}(a,e);var t,o,l,i=Ol(a);function a(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),gl(yl(e=i.apply(this,arguments)),"wrapCells",(function(t){var n=e.props,o=n.rowIndexStart,l=n.grid.getRect().height,i=e.props.grid.getCumulativeHeightBefore(o),a={height:l-i,transform:"translateY(".concat(i||0,"px)")};return r.createElement("div",{style:{height:l}},r.createElement("div",{className:we,style:a},t))})),gl(yl(e),"convertPointToRow",(function(t,n){var r;return null===(r=e.props.locator)||void 0===r?void 0:r.convertPointToRow(t,n)})),gl(yl(e),"getCellExtremaClasses",(function(t,n){return e.props.grid.getExtremaClasses(t,0,n,1)})),gl(yl(e),"getRowHeight",(function(t){return e.props.grid.getRowRect(t).height})),gl(yl(e),"getDragCoordinate",(function(e){return e[1]})),gl(yl(e),"getMouseCoordinate",(function(e){return e.clientY})),gl(yl(e),"handleResizeEnd",(function(t,n){e.props.onResizeGuide(null),e.props.onRowHeightChanged(t,n)})),gl(yl(e),"handleSizeChanged",(function(t,n){var r=e.props.grid.getRowRect(t);e.props.onResizeGuide([r.top+n])})),gl(yl(e),"isCellSelected",(function(t){return vt.hasFullRow(e.props.selectedRegions,t)})),gl(yl(e),"isGhostIndex",(function(t){return e.props.grid.isGhostIndex(t,-1)})),gl(yl(e),"renderGhostCell",(function(t,o){var l=e.props.grid.getGhostCellRect(t,0);return r.createElement(So,{className:n()(o),index:t,key:Be(t),loading:e.props.loading,style:{height:"".concat(l.height,"px")}})})),gl(yl(e),"toRegion",(function(e,t){return vt.row(e,t)})),e}return t=a,o=[{key:"componentDidMount",value:function(){var e,t;null===(e=(t=this.props).onMount)||void 0===e||e.call(t,"row")}},{key:"render",value:function(){var e=this.props,t=(e.onRowHeightChanged,e.rowHeaderCellRenderer),n=e.minRowHeight,o=e.maxRowHeight,l=(e.defaultRowHeight,e.rowIndexStart),i=e.rowIndexEnd,a=Rl(e,["onRowHeightChanged","rowHeaderCellRenderer","minRowHeight","maxRowHeight","defaultRowHeight","rowIndexStart","rowIndexEnd"]);return r.createElement(ll,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){gl(e,t,n[t])}))}return e}({convertPointToIndex:this.convertPointToRow,fullRegionCardinality:rt.FULL_ROWS,getCellExtremaClasses:this.getCellExtremaClasses,getCellIndexClass:qe,getCellSize:this.getRowHeight,getDragCoordinate:this.getDragCoordinate,getIndexClass:Be,getMouseCoordinate:this.getMouseCoordinate,ghostCellRenderer:this.renderGhostCell,handleResizeEnd:this.handleResizeEnd,handleSizeChanged:this.handleSizeChanged,headerCellIsReorderablePropName:"enableRowReordering",headerCellIsSelectedPropName:"isRowSelected",headerCellRenderer:t,indexEnd:i,indexStart:l,isCellSelected:this.isCellSelected,isGhostIndex:this.isGhostIndex,maxSize:o,minSize:n,resizeOrientation:vr.HORIZONTAL,selectedRegions:[],toRegion:this.toRegion,wrapCells:this.wrapCells},a))}}],o&&ml(t.prototype,o),l&&ml(t,l),a}(r.Component);function El(e){return r.createElement(So,{index:e,name:"".concat(e+1)})}function Hl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}gl(Sl,"defaultProps",{rowHeaderCellRenderer:El});var kl=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,r;return t=e,r=[{key:"attach",value:function(t,n){var r=e.debounce(n),o=document.createElement("div");o.className=me,o.style.cssText=e.RESIZE_SENSOR_STYLE,o.innerHTML=e.RESIZE_SENSOR_HTML,t.appendChild(o),"static"===getComputedStyle(t,null).getPropertyValue("position")&&(t.style.position="relative");var l,i,a=o.childNodes[0],c=a.childNodes[0],u=o.childNodes[1],s=function(){c.style.width="100000px",c.style.height="100000px",a.scrollLeft=1e5,a.scrollTop=1e5,u.scrollLeft=1e5,u.scrollTop=1e5};s();var d=function(){if(null!=t){var e=t.offsetWidth,n=t.offsetHeight;e===l&&n===i||(l=e,i=n,r.trigger()),s()}};return a.addEventListener("scroll",d),u.addEventListener("scroll",d),function(){t.removeChild(o),r.cancelled=!0}}},{key:"debounce",value:function(e){var t={cancelled:!1,trigger:function(){t.triggered||t.cancelled||(t.triggered=!0,requestAnimationFrame((function(){t.triggered=!1,t.cancelled||e()})))},triggered:!1};return t}}],(n=null)&&Hl(t.prototype,n),r&&Hl(t,r),e}();function Tl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Il(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xl(e){return xl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xl(e)}function Ll(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Tl(e):t;var n}function Dl(e,t){return Dl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Dl(e,t)}function _l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xl(e);if(t){var o=xl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ll(this,n)}}Pl(kl,"RESIZE_SENSOR_STYLE","position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"),Pl(kl,"RESIZE_SENSOR_HTML",'<div class="'.concat(ge,'"\n        style="').concat(kl.RESIZE_SENSOR_STYLE,'"><div style="position: absolute; left: 0; top: 0; transition: 0s;"\n        ></div></div><div class="').concat(be,'" style="').concat(kl.RESIZE_SENSOR_STYLE,'"\n        ><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%;"></div></div>'));var Ml=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Dl(e,t)}(c,e);var t,l,i,a=_l(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),jl(Tl(e=a.apply(this,arguments)),"renderVerticalGuide",(function(e,t){var o={left:"".concat(e,"px")},l=n()(X,We,jl({},"".concat(We,"-flush-left"),0===e));return r.createElement("div",{className:l,key:t,style:o})})),jl(Tl(e),"renderHorizontalGuide",(function(e,t){var o={top:"".concat(e,"px")},l=n()(X,N,jl({},"".concat(N,"-flush-top"),0===e));return r.createElement("div",{className:l,key:t,style:o})})),e}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){return this.props.className!==e.className||!o.Utils.arraysEqual(this.props.verticalGuides,e.verticalGuides)||!o.Utils.arraysEqual(this.props.horizontalGuides,e.horizontalGuides)}},{key:"render",value:function(){var e=this.props,t=e.verticalGuides,o=e.horizontalGuides,l=e.className,i=null==t?void 0:t.map(this.renderVerticalGuide),a=null==o?void 0:o.map(this.renderHorizontalGuide);return r.createElement("div",{className:n()(l,Z)},i,a)}}])&&Il(t.prototype,l),i&&Il(t,i),c}(r.Component);function Fl(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Al(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function zl(e){return zl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},zl(e)}function Nl(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?Fl(e):t;var n}function Wl(e,t){return Wl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Wl(e,t)}function Ul(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zl(e);if(t){var o=zl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Nl(this,n)}}var Gl,Bl=["className"],Vl=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Wl(e,t)}(c,e);var t,l,i,a=Ul(c);function c(){var e,t,o,l;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),e=a.apply(this,arguments),t=Fl(e),l=function(t,o){var l=e.props,i=l.className,a=l.regionStyles;return r.createElement("div",{className:n()(X,ue,i),key:o,style:void 0===a?void 0:a[o]})},(o="renderRegion")in t?Object.defineProperty(t,o,{value:l,enumerable:!0,configurable:!0,writable:!0}):t[o]=l,e}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){var t,n,r,l;return!o.Utils.arraysEqual(null!==(t=this.props.regions)&&void 0!==t?t:[],null!==(n=e.regions)&&void 0!==n?n:[],vt.regionsEqual)||!o.Utils.arraysEqual(null!==(r=this.props.regionStyles)&&void 0!==r?r:[],null!==(l=e.regionStyles)&&void 0!==l?l:[],o.Utils.shallowCompareKeys)||!o.Utils.shallowCompareKeys(this.props,e,{include:Bl})}},{key:"render",value:function(){return r.createElement("div",{className:Z},this.renderRegionChildren())}},{key:"renderRegionChildren",value:function(){var e=this.props.regions;if(null!=e)return e.map(this.renderRegion)}}])&&Al(t.prototype,l),i&&Al(t,i),c}(r.Component);function ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kl(e){return Kl=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Kl(e)}function Ql(e,t){return!t||"object"!=((n=t)&&"undefined"!=typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t;var n}function Yl(e,t){return Yl=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Yl(e,t)}function Xl(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Kl(e);if(t){var o=Kl(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ql(this,n)}}!function(e){e.MAIN="main",e.TOP="top",e.LEFT="left",e.TOP_LEFT="top-left"}(Gl||(Gl={}));var Zl,$l,Jl,ei=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Yl(e,t)}(a,e);var t,o,l,i=Xl(a);function a(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.apply(this,arguments)}return t=a,(o=[{key:"render",value:function(){var e,t,o,l,i,a,c=this.props,u=c.grid,s=c.enableRowHeader,d=c.quadrantType,f=c.bodyRenderer,p=c.enableColumnHeader,h="top"===d||"top-left"===d,y="left"===d||"top-left"===d,m=n()(te,this.getQuadrantCssClass(),this.props.className),g=s&&(null===(e=(t=this.props).menuRenderer)||void 0===e?void 0:e.call(t)),b=s&&(null===(o=(l=this.props).rowHeaderCellRenderer)||void 0===o?void 0:o.call(l,h)),R=p&&(null===(i=(a=this.props).columnHeaderCellRenderer)||void 0===i?void 0:i.call(a,y)),C=f(d,h,y),w={height:u.getHeight(),width:u.getWidth()};return r.createElement("div",{className:m,style:this.props.style,ref:this.props.quadrantRef},r.createElement("div",{className:le,ref:this.props.scrollContainerRef,onScroll:this.props.onScroll,onWheel:this.props.onWheel},r.createElement("div",{className:Le},g,R),r.createElement("div",{className:v,style:w},b,r.createElement("div",{className:ne,ref:this.props.bodyRef},C))))}},{key:"validateProps",value:function(e){var t=e.quadrantType;null!=e.onScroll&&null!=t&&"main"!==t&&console.warn(qn)}},{key:"getQuadrantCssClass",value:function(){switch(this.props.quadrantType){case"main":return oe;case"top":return ae;case"left":return re;case"top-left":return ce;default:return}}}])&&ql(t.prototype,o),l&&ql(t,l),a}(o.AbstractComponent);function ti(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Jl={enableColumnHeader:!0,enableRowHeader:!0},($l="defaultProps")in(Zl=ei)?Object.defineProperty(Zl,$l,{value:Jl,enumerable:!0,configurable:!0,writable:!0}):Zl[$l]=Jl;var ri=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ni(this,"cachedRowHeaderWidth",0),ni(this,"cachedColumnHeaderHeight",0),ni(this,"cachedScrollLeft",0),ni(this,"cachedScrollTop",0),ni(this,"cachedScrollContainerClientWidth",void 0),ni(this,"cachedScrollContainerClientHeight",void 0),this.reset()}var t,n,r;return t=e,(n=[{key:"reset",value:function(){this.cachedRowHeaderWidth=0,this.cachedColumnHeaderHeight=0,this.cachedScrollLeft=0,this.cachedScrollTop=0}},{key:"getScrollOffset",value:function(e){return"scrollLeft"===e?this.cachedScrollLeft:this.cachedScrollTop}},{key:"getRowHeaderWidth",value:function(){return this.cachedRowHeaderWidth}},{key:"getColumnHeaderHeight",value:function(){return this.cachedColumnHeaderHeight}},{key:"getScrollContainerClientWidth",value:function(){return this.cachedScrollContainerClientWidth}},{key:"getScrollContainerClientHeight",value:function(){return this.cachedScrollContainerClientHeight}},{key:"setColumnHeaderHeight",value:function(e){this.cachedColumnHeaderHeight=e}},{key:"setRowHeaderWidth",value:function(e){this.cachedRowHeaderWidth=e}},{key:"setScrollOffset",value:function(e,t){"scrollLeft"===e?this.cachedScrollLeft=t:this.cachedScrollTop=t}},{key:"setScrollContainerClientWidth",value:function(e){this.cachedScrollContainerClientWidth=e}},{key:"setScrollContainerClientHeight",value:function(e){this.cachedScrollContainerClientHeight=e}}])&&ti(t.prototype,n),r&&ti(t,r),e}();function oi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function li(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ii(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ai(e){return ai=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ai(e)}function ci(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ii(e,t,n[t])}))}return e}function ui(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function si(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?oi(e):t}function di(e,t){return di=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},di(e,t)}function fi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ai(e);if(t){var o=ai(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return si(this,n)}}var pi=["enableRowHeader","loadingOptions","numFrozenColumns","numFrozenRows","numColumns","numRows","enableColumnInteractionBar","didHeadersMount","enableColumnHeader"],hi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&di(e,t)}(a,e);var t,n,l,i=fi(a);function a(e){var t,n,r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),ii(oi(t=i.call(this,e)),"quadrantRefs",(ii(n={},Gl.MAIN,{}),ii(n,Gl.TOP,{}),ii(n,Gl.LEFT,{}),ii(n,Gl.TOP_LEFT,{}),n)),ii(oi(t),"quadrantRefHandlers",(ii(r={},Gl.MAIN,t.generateQuadrantRefHandlers(Gl.MAIN)),ii(r,Gl.TOP,t.generateQuadrantRefHandlers(Gl.TOP)),ii(r,Gl.LEFT,t.generateQuadrantRefHandlers(Gl.LEFT)),ii(r,Gl.TOP_LEFT,t.generateQuadrantRefHandlers(Gl.TOP_LEFT)),r)),ii(oi(t),"wasMainQuadrantScrollTriggeredByWheelEvent",!1),ii(oi(t),"throttledHandleMainQuadrantScroll",void 0),ii(oi(t),"throttledHandleWheel",void 0),ii(oi(t),"cancelPendingViewSync",void 0),ii(oi(t),"cache",void 0),ii(oi(t),"renderTableOverlay",(function(){var e,n,r=t.cache.getColumnHeaderHeight(),o=jo(t.quadrantRefs[Gl.MAIN].scrollContainer,"vertical");return null===(e=(n=t.props).renderScrollIndicatorOverlay)||void 0===e?void 0:e.call(n,o,r)})),ii(oi(t),"renderMainQuadrantMenu",(function(){var e,n;return null===(e=(n=t.props).menuRenderer)||void 0===e?void 0:e.call(n,t.quadrantRefHandlers[Gl.MAIN].menu)})),ii(oi(t),"renderTopQuadrantMenu",(function(){var e,n;return null===(e=(n=t.props).menuRenderer)||void 0===e?void 0:e.call(n,t.quadrantRefHandlers[Gl.TOP].menu)})),ii(oi(t),"renderLeftQuadrantMenu",(function(){var e,n;return null===(e=(n=t.props).menuRenderer)||void 0===e?void 0:e.call(n,t.quadrantRefHandlers[Gl.LEFT].menu)})),ii(oi(t),"renderTopLeftQuadrantMenu",(function(){var e,n;return null===(e=(n=t.props).menuRenderer)||void 0===e?void 0:e.call(n,t.quadrantRefHandlers[Gl.TOP_LEFT].menu)})),ii(oi(t),"renderMainQuadrantColumnHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.MAIN].columnHeader,l=t.handleColumnResizeGuideMain,i=t.handleColumnsReordering;if(void 0!==o)return null===(n=(r=t.props).columnHeaderRenderer)||void 0===n?void 0:n.call(r,o,l,i,e)})),ii(oi(t),"renderTopQuadrantColumnHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.TOP].columnHeader,l=t.handleColumnResizeGuideTop,i=t.handleColumnsReordering;if(void 0!==o)return null===(n=(r=t.props).columnHeaderRenderer)||void 0===n?void 0:n.call(r,o,l,i,e)})),ii(oi(t),"renderLeftQuadrantColumnHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.LEFT].columnHeader,l=t.handleColumnResizeGuideLeft,i=t.handleColumnsReordering;if(void 0!==o)return null===(n=(r=t.props).columnHeaderRenderer)||void 0===n?void 0:n.call(r,o,l,i,e)})),ii(oi(t),"renderTopLeftQuadrantColumnHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.TOP_LEFT].columnHeader,l=t.handleColumnResizeGuideTopLeft,i=t.handleColumnsReordering;if(void 0!==o)return null===(n=(r=t.props).columnHeaderRenderer)||void 0===n?void 0:n.call(r,o,l,i,e)})),ii(oi(t),"renderMainQuadrantRowHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.MAIN].rowHeader;if(void 0!==o)return null===(n=(r=t.props).rowHeaderRenderer)||void 0===n?void 0:n.call(r,o,t.handleRowResizeGuideMain,t.handleRowsReordering,e)})),ii(oi(t),"renderTopQuadrantRowHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.TOP].rowHeader;if(void 0!==o)return null===(n=(r=t.props).rowHeaderRenderer)||void 0===n?void 0:n.call(r,o,t.handleRowResizeGuideTop,t.handleRowsReordering,e)})),ii(oi(t),"renderLeftQuadrantRowHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.LEFT].rowHeader;if(void 0!==o)return null===(n=(r=t.props).rowHeaderRenderer)||void 0===n?void 0:n.call(r,o,t.handleRowResizeGuideLeft,t.handleRowsReordering,e)})),ii(oi(t),"renderTopLeftQuadrantRowHeader",(function(e){var n,r,o=t.quadrantRefHandlers[Gl.TOP_LEFT].rowHeader;if(void 0!==o)return null===(n=(r=t.props).rowHeaderRenderer)||void 0===n?void 0:n.call(r,o,t.handleRowResizeGuideTopLeft,t.handleRowsReordering,e)})),ii(oi(t),"handleMainQuadrantScroll",(function(e){var n,r;if(t.wasMainQuadrantScrollTriggeredByWheelEvent)t.wasMainQuadrantScrollTriggeredByWheelEvent=!1;else{var o=t.quadrantRefs[Gl.MAIN].scrollContainer;if(null!=o){null===(n=(r=t.props).onScroll)||void 0===n||n.call(r,e);var l=o.scrollLeft,i=o.scrollTop;t.handleScrollOffsetChange("scrollLeft",l),t.handleScrollOffsetChange("scrollTop",i),t.syncQuadrantViewsDebounced()}}})),ii(oi(t),"handleWheel",(function(e){var n,r;null===(n=(r=t.props).onScroll)||void 0===n||n.call(r,e);var o=t.getNextScrollOffset("horizontal",e.deltaX),l=t.getNextScrollOffset("vertical",e.deltaY);null==o&&null==l||(t.wasMainQuadrantScrollTriggeredByWheelEvent=!0),void 0!==o&&(t.quadrantRefs[Gl.MAIN].scrollContainer.scrollLeft=o,t.handleScrollOffsetChange("scrollLeft",o)),void 0!==l&&(t.quadrantRefs[Gl.MAIN].scrollContainer.scrollTop=l,t.handleScrollOffsetChange("scrollTop",l)),t.syncQuadrantViewsDebounced()})),ii(oi(t),"getNextScrollOffset",(function(e,n){var r=t.props,l=r.grid,i=r.isHorizontalScrollDisabled,a=r.isVerticalScrollDisabled,c="horizontal"===e,u=c?"scrollLeft":"scrollTop";if(!(c?i:a)){var s=c?t.cache.getScrollContainerClientWidth():t.cache.getScrollContainerClientHeight();null==s&&(s=t.updateScrollContainerClientSize(c));var d=c?t.cache.getScrollContainerClientWidth()-t.cache.getRowHeaderWidth():t.cache.getScrollContainerClientHeight()-t.cache.getColumnHeaderHeight(),f=c?l.getWidth():l.getHeight(),p=Math.max(0,f-d),h=t.cache.getScrollOffset(u);return o.Utils.clamp(h+n,0,p)}})),ii(oi(t),"handleColumnResizeGuideMain",(function(e){t.invokeColumnResizeHandler(e,Gl.MAIN)})),ii(oi(t),"handleColumnResizeGuideTop",(function(e){t.invokeColumnResizeHandler(e,Gl.TOP)})),ii(oi(t),"handleColumnResizeGuideLeft",(function(e){t.invokeColumnResizeHandler(e,Gl.LEFT)})),ii(oi(t),"handleColumnResizeGuideTopLeft",(function(e){t.invokeColumnResizeHandler(e,Gl.TOP_LEFT)})),ii(oi(t),"invokeColumnResizeHandler",(function(e,n){var r,o,l=t.adjustVerticalGuides(e,n);null===(r=(o=t.props).handleColumnResizeGuide)||void 0===r||r.call(o,l)})),ii(oi(t),"handleRowResizeGuideMain",(function(e){t.invokeRowResizeHandler(e,Gl.MAIN)})),ii(oi(t),"handleRowResizeGuideTop",(function(e){t.invokeRowResizeHandler(e,Gl.TOP)})),ii(oi(t),"handleRowResizeGuideLeft",(function(e){t.invokeRowResizeHandler(e,Gl.LEFT)})),ii(oi(t),"handleRowResizeGuideTopLeft",(function(e){t.invokeRowResizeHandler(e,Gl.TOP_LEFT)})),ii(oi(t),"invokeRowResizeHandler",(function(e,n){var r,o,l=t.adjustHorizontalGuides(e,n);null===(r=(o=t.props).handleRowResizeGuide)||void 0===r||r.call(o,l)})),ii(oi(t),"handleColumnsReordering",(function(e,n,r){var o,l,i=at.reorderedIndexToGuideIndex(e,n,r),a=t.props.grid.getCumulativeWidthBefore(i),c=t.props.numFrozenColumns,u=i<=(void 0===c?0:c)?Gl.TOP_LEFT:Gl.TOP,s=t.adjustVerticalGuides([a],u);null===(o=(l=t.props).handleColumnsReordering)||void 0===o||o.call(l,s)})),ii(oi(t),"handleRowsReordering",(function(e,n,r){var o,l,i=at.reorderedIndexToGuideIndex(e,n,r),a=t.props.grid.getCumulativeHeightBefore(i),c=t.props.numFrozenRows,u=i<=(void 0===c?0:c)?Gl.TOP_LEFT:Gl.LEFT,s=t.adjustHorizontalGuides([a],u);null===(o=(l=t.props).handleRowsReordering)||void 0===o||o.call(l,s)})),ii(oi(t),"syncQuadrantViewsDebounced",(function(){var e,n,r=t.props.viewSyncDelay;r<0?t.syncQuadrantViews():(null===(e=(n=t).cancelPendingViewSync)||void 0===e||e.call(n),t.cancelPendingViewSync=t.setTimeout(t.syncQuadrantViews,r))})),ii(oi(t),"syncQuadrantViews",(function(){var e=t.quadrantRefs[Gl.MAIN].scrollContainer,n=t.measureDesiredRowHeaderWidth(),r=t.measureDesiredColumnHeaderHeight(),o=n+t.getSecondaryQuadrantGridSize("width"),l=r+t.getSecondaryQuadrantGridSize("height"),i=jo(e,"vertical"),a=jo(e,"horizontal"),c=t.maybeIncreaseToMinColHeaderHeight(r),u=t.maybeIncreaseToMinColHeaderHeight(l);t.cache.setRowHeaderWidth(n),t.cache.setColumnHeaderHeight(r),t.cache.setScrollContainerClientWidth(void 0),t.cache.setScrollContainerClientHeight(void 0),t.maybesSetQuadrantRowHeaderSizes(n),t.maybeSetQuadrantMenuElementSizes(n,c),t.maybeSetQuadrantSizes(o,u),t.maybeSetQuadrantPositionOffset(Gl.TOP,"right",i),t.maybeSetQuadrantPositionOffset(Gl.LEFT,"bottom",a),t.maybeSetQuadrantScrollOffset(Gl.LEFT,"scrollTop"),t.maybeSetQuadrantScrollOffset(Gl.TOP,"scrollLeft")})),ii(oi(t),"maybeSetQuadrantSizes",(function(e,n){var r=at.clamp(e,t.props.enableRowHeader?Ht.MIN_ROW_HEADER_WIDTH:0),o=at.clamp(n,t.props.enableColumnHeader?Ht.MIN_COLUMN_HEADER_HEIGHT:0);t.maybesSetQuadrantSize(Gl.LEFT,"width",r),t.maybesSetQuadrantSize(Gl.TOP,"height",o),t.maybesSetQuadrantSize(Gl.TOP_LEFT,"width",r),t.maybesSetQuadrantSize(Gl.TOP_LEFT,"height",o)})),ii(oi(t),"maybesSetQuadrantSize",(function(e,n,r){var o=t.quadrantRefs[e].quadrant;null!=o&&(o.style[n]="".concat(r,"px"))})),ii(oi(t),"maybeSetQuadrantPositionOffset",(function(e,n,r){var o=t.quadrantRefs[e].quadrant;null!=o&&(o.style[n]="".concat(r,"px"))})),ii(oi(t),"maybesSetQuadrantRowHeaderSizes",(function(e){var n=at.clamp(e,t.props.enableRowHeader?Ht.MIN_ROW_HEADER_WIDTH:0);t.maybeSetQuadrantRowHeaderSize(Gl.MAIN,n),t.maybeSetQuadrantRowHeaderSize(Gl.TOP,n),t.maybeSetQuadrantRowHeaderSize(Gl.LEFT,n),t.maybeSetQuadrantRowHeaderSize(Gl.TOP_LEFT,n)})),ii(oi(t),"maybeSetQuadrantRowHeaderSize",(function(e,n){var r=t.quadrantRefs[e].rowHeader;null!=r&&(r.style.width="".concat(n,"px"))})),ii(oi(t),"maybeSetQuadrantMenuElementSizes",(function(e,n){var r=at.clamp(e,t.props.enableRowHeader?Ht.MIN_ROW_HEADER_WIDTH:0);t.maybeSetQuadrantMenuElementSize(Gl.MAIN,r,n),t.maybeSetQuadrantMenuElementSize(Gl.TOP,r,n),t.maybeSetQuadrantMenuElementSize(Gl.LEFT,r,n),t.maybeSetQuadrantMenuElementSize(Gl.TOP_LEFT,r,n)})),ii(oi(t),"maybeSetQuadrantMenuElementSize",(function(e,n,r){var o=t.quadrantRefs[e].menu;null!=o&&(o.style.width="".concat(n,"px"),o.style.height="".concat(r,"px"))})),ii(oi(t),"maybeSetQuadrantScrollOffset",(function(e,n,r){var o=t.quadrantRefs[e].scrollContainer,l=null!=r?r:t.cache.getScrollOffset(n);null!=o&&(o[n]=l)})),ii(oi(t),"handleScrollOffsetChange",(function(e,n){t.cache.setScrollOffset(e,n);var r="scrollLeft"===e?Gl.TOP:Gl.LEFT;t.maybeSetQuadrantScrollOffset(r,e)})),t.throttledHandleMainQuadrantScroll=o.Utils.throttleReactEventCallback(t.handleMainQuadrantScroll),t.throttledHandleWheel=o.Utils.throttleReactEventCallback(t.handleWheel),t.cache=new ri,t}return t=a,n=[{key:"scrollToPosition",value:function(e,t){var n=this.quadrantRefs[Gl.MAIN].scrollContainer;null!=n&&(this.wasMainQuadrantScrollTriggeredByWheelEvent=!1,n.scrollLeft=e,n.scrollTop=t,this.syncQuadrantViews())}},{key:"synchronizeQuadrantViews",value:function(){this.syncQuadrantViews()}},{key:"componentDidMount",value:function(){this.emitRefs(),this.syncQuadrantViews()}},{key:"componentDidUpdate",value:function(e){(!o.Utils.shallowCompareKeys(this.props,e,{include:pi})||this.didFrozenColumnWidthsChange(e)||this.didFrozenRowHeightsChange(e))&&(this.emitRefs(),this.syncQuadrantViews())}},{key:"render",value:function(){var e=this.props,t=e.grid,n=e.enableRowHeader,o=e.bodyRenderer,l=e.throttleScrolling,i=e.enableColumnHeader,a=l?this.throttledHandleMainQuadrantScroll:this.handleMainQuadrantScroll,c={bodyRenderer:o,enableColumnHeader:i,enableRowHeader:n,grid:t,onWheel:l?this.throttledHandleWheel:this.handleWheel},u=this.shouldRenderLeftQuadrants(),s=u?r.createElement(ei,ui(ci({},c),{quadrantRef:this.quadrantRefHandlers[Gl.LEFT].quadrant,quadrantType:Gl.LEFT,columnHeaderCellRenderer:this.renderLeftQuadrantColumnHeader,menuRenderer:this.renderLeftQuadrantMenu,rowHeaderCellRenderer:this.renderLeftQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Gl.LEFT].scrollContainer})):void 0,d=u?r.createElement(ei,ui(ci({},c),{quadrantRef:this.quadrantRefHandlers[Gl.TOP_LEFT].quadrant,quadrantType:Gl.TOP_LEFT,columnHeaderCellRenderer:this.renderTopLeftQuadrantColumnHeader,menuRenderer:this.renderTopLeftQuadrantMenu,rowHeaderCellRenderer:this.renderTopLeftQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Gl.TOP_LEFT].scrollContainer})):void 0;return r.createElement("div",{className:ie},this.renderTableOverlay(),r.createElement(ei,ui(ci({},c),{bodyRef:this.props.bodyRef,onScroll:a,quadrantRef:this.quadrantRefHandlers[Gl.MAIN].quadrant,quadrantType:Gl.MAIN,columnHeaderCellRenderer:this.renderMainQuadrantColumnHeader,menuRenderer:this.renderMainQuadrantMenu,rowHeaderCellRenderer:this.renderMainQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Gl.MAIN].scrollContainer})),r.createElement(ei,ui(ci({},c),{quadrantRef:this.quadrantRefHandlers[Gl.TOP].quadrant,quadrantType:Gl.TOP,columnHeaderCellRenderer:this.renderTopQuadrantColumnHeader,menuRenderer:this.renderTopQuadrantMenu,rowHeaderCellRenderer:this.renderTopQuadrantRowHeader,scrollContainerRef:this.quadrantRefHandlers[Gl.TOP].scrollContainer})),s,d)}},{key:"generateQuadrantRefHandlers",value:function(e){var t=this;return["columnHeader","menu","quadrant","rowHeader","scrollContainer"].reduce((function(n,r){return n[r]=function(n){return t.quadrantRefs[e][r]=n},n}),{})}},{key:"emitRefs",value:function(){(0,o.setRef)(this.props.quadrantRef,this.quadrantRefs[Gl.MAIN].quadrant),(0,o.setRef)(this.props.rowHeaderRef,this.quadrantRefs[Gl.MAIN].rowHeader),(0,o.setRef)(this.props.columnHeaderRef,this.quadrantRefs[Gl.MAIN].columnHeader),(0,o.setRef)(this.props.scrollContainerRef,this.quadrantRefs[Gl.MAIN].scrollContainer)}},{key:"updateScrollContainerClientSize",value:function(e){var t=this.quadrantRefs[Gl.MAIN].scrollContainer;return e?(this.cache.setScrollContainerClientWidth(null==t?void 0:t.clientWidth),this.cache.getScrollContainerClientWidth()):(this.cache.setScrollContainerClientHeight(null==t?void 0:t.clientHeight),this.cache.getScrollContainerClientHeight())}},{key:"maybeIncreaseToMinColHeaderHeight",value:function(e){return this.props.enableColumnHeader&&e<=1?Ht.MIN_COLUMN_HEADER_HEIGHT:e}},{key:"didFrozenColumnWidthsChange",value:function(e){return this.props.numFrozenColumns>0&&this.props.grid!==e.grid&&this.props.grid.getCumulativeWidthAt(this.props.numFrozenColumns-1)!==e.grid.getCumulativeWidthAt(e.numFrozenColumns-1)}},{key:"didFrozenRowHeightsChange",value:function(e){return this.props.numFrozenRows>0&&this.props.grid!==e.grid&&this.props.grid.getCumulativeHeightAt(this.props.numFrozenRows-1)!==e.grid.getCumulativeHeightAt(e.numFrozenRows-1)}},{key:"getSecondaryQuadrantGridSize",value:function(e){var t,n=this.props,r=n.grid,o=n.numFrozenColumns,l=n.numFrozenRows,i=null!==(t="width"===e?o:l)&&void 0!==t?t:0,a="width"===e?r.getCumulativeWidthAt:r.getCumulativeHeightAt;return i>0?a(i-1):1}},{key:"measureDesiredRowHeaderWidth",value:function(){var e=this.quadrantRefs[Gl.MAIN].rowHeader;return null==e?0:(e.style.width="auto",at.clamp(e.clientWidth,Ht.MIN_ROW_HEADER_WIDTH))}},{key:"measureDesiredColumnHeaderHeight",value:function(){var e=this.quadrantRefs[Gl.MAIN].columnHeader;return null==e?0:at.clamp(e.clientHeight,Ht.MIN_COLUMN_HEADER_HEIGHT)}},{key:"shouldRenderLeftQuadrants",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=e.enableRowHeader,n=e.numFrozenColumns;return t||null!=n&&n>0}},{key:"adjustVerticalGuides",value:function(e,t){var n,r=t===Gl.LEFT||t===Gl.TOP_LEFT?0:this.cache.getScrollOffset("scrollLeft"),o=this.cache.getRowHeaderWidth();return null!==(n=null==e?void 0:e.map((function(e){return e-r+o})))&&void 0!==n?n:[]}},{key:"adjustHorizontalGuides",value:function(e,t){var n,r=t===Gl.TOP||t===Gl.TOP_LEFT?0:this.cache.getScrollOffset("scrollTop"),o=this.cache.getColumnHeaderHeight();return null!==(n=null==e?void 0:e.map((function(e){return e-r+o})))&&void 0!==n?n:[]}}],n&&li(t.prototype,n),l&&li(t,l),a}(o.AbstractComponent);function vi(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function yi(e){return function(e){if(Array.isArray(e))return vi(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return vi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vi(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}ii(hi,"defaultProps",{enableColumnHeader:!0,enableColumnInteractionBar:void 0,enableRowHeader:!0,isHorizontalScrollDisabled:!1,isVerticalScrollDisabled:!1,throttleScrolling:!0,viewSyncDelay:500});var mi={getApproximateCharWidth:8,getApproximateLineHeight:18,getCellHorizontalPadding:2*Tt.CELL_HORIZONTAL_PADDING,getNumBufferLines:1};function gi(e,t,n){return Object.keys(mi).reduce((function(r,o){var l=null==e?void 0:e[o];return r[o]="function"==typeof l?l(t,n):null!=l?l:mi[o],r}),{})}function bi(e,t,n,r){for(var o=t.length,l=[],i=0;i<e;i++){for(var a=0,c=0;c<o;c++){var u=gi(r,i,c),s=u.getApproximateCharWidth,d=u.getApproximateLineHeight,f=u.getCellHorizontalPadding,p=u.getNumBufferLines,h=n(i,c),v=at.getApproxCellHeight(h,t[c],s,d,f,p);v>a&&(a=v)}l.push(a)}return l}function Ri(e,t,n,r,o){var l=0;if(void 0===o)for(var i=e.getColumnIndicesInRect(t),a=i.columnIndexStart;a<=i.columnIndexEnd;a++)l=Math.max(l,n.getTallestVisibleCellInColumn(a));else{var c,u=(Array.isArray(o)?o:[o]).map((function(e){return n.getTallestVisibleCellInColumn(e)}));l=(c=Math).max.apply(c,yi(u))}return Array(r).fill(l)}function Ci(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wi(e){return wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wi(e)}function Oi(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Si(e,t){return Si=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Si(e,t)}function Ei(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wi(e);if(t){var o=wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Oi(this,n)}}var Hi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Si(e,t)}(i,e);var t,n,o,l=Ei(i);function i(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),l.apply(this,arguments)}return t=i,(n=[{key:"render",value:function(){var e=this.props,t=e.className,n=e.children,o=e.targetRef,l=e.style;return r.createElement("div",{className:t,style:l,ref:o},n)}},{key:"renderContextMenu",value:function(e){return this.props.renderContextMenu(e)}}])&&Ci(t.prototype,n),o&&Ci(t,o),i}(r.PureComponent);function Pi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ki(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Hi=function(e,t,n,r){var o,l=arguments.length,i=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(l<3?o(i):l>3?o(t,n,i):o(t,n))||i);return l>3&&i&&Object.defineProperty(t,n,i),i}([o.ContextMenuTargetLegacy],Hi);var Ti=function(){function e(t,n,r,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ki(this,"target",void 0),ki(this,"selectedRegions",void 0),ki(this,"numRows",void 0),ki(this,"numCols",void 0),ki(this,"regions",void 0),this.target=t,this.selectedRegions=n,this.numRows=r,this.numCols=o,this.regions=vt.overlapsRegion(n,t)?n:[t]}var t,n,r;return t=e,(n=[{key:"getTarget",value:function(){return this.target}},{key:"getSelectedRegions",value:function(){return this.selectedRegions}},{key:"getRegions",value:function(){return this.regions}},{key:"getUniqueCells",value:function(){return vt.enumerateUniqueCells(this.regions,this.numRows,this.numCols)}}])&&Pi(t.prototype,n),r&&Pi(t,r),e}(),Ii="blueprint-table-post-message",ji={callbacks:[],triggered:!1};"undefined"!=typeof window&&null!=window.addEventListener&&window.addEventListener("message",(function(e){if(e.source===window&&e.data===Ii){ji.triggered=!1;var t=null;ji.callbacks.length>0&&(t=ji.callbacks.shift()),ji.callbacks.length>0&&xi(),t&&t()}}),!1);var xi=function(){ji.triggered||(ji.triggered=!0,requestAnimationFrame((function(){requestAnimationFrame((function(){postMessage(Ii,"*")}))})))};function Li(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Di(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mi(e){return function(e){if(Array.isArray(e))return Li(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return Li(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Li(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Fi=function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_i(this,"currentObjects",{}),_i(this,"oldObjects",{}),_i(this,"batchArgs",{}),_i(this,"done",!0),_i(this,"callback",void 0),_i(this,"handleIdleCallback",(function(){var e=t.callback;delete t.callback,null==e||e()})),_i(this,"mapCurrentObjectKey",(function(e){return t.currentObjects[e]}))}var t,n,r;return t=e,n=[{key:"reset",value:function(){this.batchArgs={},this.oldObjects=this.currentObjects,this.currentObjects={}}},{key:"startNewBatch",value:function(){this.batchArgs={}}},{key:"addArgsToBatch",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.batchArgs[this.getKey(t)]=t}},{key:"removeOldAddNew",value:function(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.DEFAULT_ADD_LIMIT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.DEFAULT_REMOVE_LIMIT,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e.DEFAULT_UPDATE_LIMIT;this.setKeysDifference(this.currentObjects,this.batchArgs,o).forEach((function(e){return delete n.currentObjects[e]})),this.setKeysDifference(this.oldObjects,this.batchArgs,-1).forEach((function(e){return delete n.oldObjects[e]})),Object.keys(this.oldObjects).forEach((function(e){null==n.currentObjects[e]&&(n.currentObjects[e]=n.oldObjects[e])})),this.setKeysIntersection(this.oldObjects,this.currentObjects,l).forEach((function(e){delete n.oldObjects[e],n.currentObjects[e]=t.apply(void 0,n.batchArgs[e])})),this.setKeysDifference(this.batchArgs,this.currentObjects,r).forEach((function(e){return n.currentObjects[e]=t.apply(void 0,n.batchArgs[e])})),this.done=this.setHasSameKeys(this.batchArgs,this.currentObjects)&&0===Object.keys(this.oldObjects).length}},{key:"isDone",value:function(){return this.done}},{key:"getList",value:function(){return Object.keys(this.currentObjects).map(this.mapCurrentObjectKey)}},{key:"idleCallback",value:function(e){this.callback||(this.callback=e,function(e){ji.callbacks.push(e),xi()}(this.handleIdleCallback))}},{key:"cancelOutstandingCallback",value:function(){delete this.callback}},{key:"setList",value:function(e,t){var n=this;this.reset(),e.forEach((function(e,r){n.addArgsToBatch.apply(n,Mi(e)),n.currentObjects[n.getKey(e)]=t[r]})),this.done=!0}},{key:"getKey",value:function(t){return t.join(e.ARG_DELIMITER)}},{key:"setKeysDifference",value:function(e,t,n){return this.setKeysOperation(e,t,"difference",n)}},{key:"setKeysIntersection",value:function(e,t,n){return this.setKeysOperation(e,t,"intersect",n)}},{key:"setKeysOperation",value:function(e,t,n,r){for(var o=[],l=Object.keys(e),i=0;i<l.length&&(r<0||o.length<r);i++){var a=l[i];("difference"===n&&e[a]&&!t[a]||"intersect"===n&&e[a]&&t[a])&&o.push(a)}return o}},{key:"setHasSameKeys",value:function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;var o=!0,l=!1,i=void 0;try{for(var a,c=n[Symbol.iterator]();!(o=(a=c.next()).done);o=!0)if(void 0===t[a.value])return!1}catch(e){l=!0,i=e}finally{try{o||null==c.return||c.return()}finally{if(l)throw i}}return!0}}],n&&Di(t.prototype,n),r&&Di(t,r),e}();function Ai(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ni(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wi(e){return Wi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Wi(e)}function Ui(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?Ai(e):t}function Gi(e,t){return Gi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Gi(e,t)}function Bi(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Wi(e);if(t){var o=Wi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ui(this,n)}}_i(Fi,"DEFAULT_ADD_LIMIT",20),_i(Fi,"DEFAULT_UPDATE_LIMIT",20),_i(Fi,"DEFAULT_REMOVE_LIMIT",20),_i(Fi,"ARG_DELIMITER","|");var Vi=["viewportRect"],qi=["columnIndexEnd","columnIndexStart","rowIndexEnd","rowIndexStart"],Ki=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Gi(e,t)}(u,e);var t,l,i,a=Bi(u);function u(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),Ni(Ai(e=a.apply(this,arguments)),"batcher",new Fi),Ni(Ai(e),"didForceUpdate",!1),Ni(Ai(e),"renderNewCell",(function(t,n){var r=e.props,o=r.columnIndexEnd,l=r.grid,i=r.rowIndexEnd,a=l.getExtremaClasses(t,n,i,o),c=l.isGhostIndex(t,n);return e.renderCell(t,n,a,c)})),Ni(Ai(e),"renderCell",(function(t,o,l,i){var a,c=e.props,s=c.cellRenderer,d=c.focusedCell,f=c.loading,p=c.grid,h=i?Jt():s(t,o);h=null==h?Jt():h;var v=n()(function(e,t){return[qe(e),Ve(t)]}(t,o),l,(Ni(a={},g,i),Ni(a,C,t%2==1),Ni(a,R,t%2==0),a),h.props.className),y=u.cellReactKey(t,o),m=i?p.getGhostCellRect(t,o):p.getCellRect(t,o),b=null!=h.props.loading?h.props.loading:f,w=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Ni(e,t,n[t])}))}return e}({},h.props.style,Rt.style(m)),O=null!=d&&d.row===t&&d.col===o;return r.cloneElement(h,{className:v,isFocused:O,key:y,loading:b,style:w})})),Ni(Ai(e),"didViewportRectChange",(function(e,t){return(null!=e||null!=t)&&(null==e||null==t||!e.equals(t))})),e}return t=u,i=[{key:"cellReactKey",value:function(e,t){return"cell-".concat(e,"-").concat(t)}}],(l=[{key:"componentDidMount",value:function(){this.maybeInvokeOnCompleteRender()}},{key:"shouldComponentUpdate",value:function(e){return!o.Utils.shallowCompareKeys(e,this.props,{exclude:Vi})||this.didViewportRectChange(e.viewportRect,this.props.viewportRect)}},{key:"componentDidUpdate",value:function(e){this.didForceUpdate?this.didForceUpdate=!1:(!o.Utils.shallowCompareKeys(e,this.props,{exclude:qi})&&(this.batcher.reset(),this.didForceUpdate=!0,this.forceUpdate()),this.maybeInvokeOnCompleteRender())}},{key:"componentWillUnmount",value:function(){this.batcher.cancelOutstandingCallback()}},{key:"render",value:function(){var e=this.props.renderMode===Gn.BATCH?this.renderBatchedCells():this.renderAllCells();return r.createElement("div",{className:c},e)}},{key:"renderBatchedCells",value:function(){var e=this,t=this.props,n=t.columnIndexEnd,r=t.columnIndexStart,o=t.rowIndexEnd,l=t.rowIndexStart;this.batcher.startNewBatch();for(var i=l;i<=o;i++)for(var a=r;a<=n;a++)this.batcher.addArgsToBatch(i,a);return this.batcher.removeOldAddNew(this.renderNewCell),this.batcher.isDone()||this.batcher.idleCallback((function(){return e.forceUpdate()})),this.batcher.getList()}},{key:"renderAllCells",value:function(){for(var e=this.props,t=e.columnIndexEnd,n=e.columnIndexStart,r=e.rowIndexEnd,o=[],l=[],i=e.rowIndexStart;i<=r;i++)for(var a=n;a<=t;a++)o.push(this.renderNewCell(i,a)),l.push([i,a]);return this.batcher.setList(l,o),o}},{key:"maybeInvokeOnCompleteRender",value:function(){var e=this.props,t=e.onCompleteRender,n=e.renderMode;(n===Gn.NONE||n===Gn.BATCH&&this.batcher.isDone())&&(null==t||t())}}])&&zi(t.prototype,l),i&&zi(t,i),u}(o.AbstractComponent);function Qi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Xi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zi(e){return Zi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zi(e)}function $i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Ji(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?Qi(e):t}function ea(e,t){return ea=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ea(e,t)}function ta(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Zi(e);if(t){var o=Zi(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ji(this,n)}}Ni(Ki,"defaultProps",{renderMode:Gn.BATCH});var na,ra=["selectedRegions"],oa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ea(e,t)}(c,e);var t,l,i,a=ta(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Xi(Qi(e=a.apply(this,arguments)),"activationCell",null),Xi(Qi(e),"wrapperRef",r.createRef()),Xi(Qi(e),"renderContextMenu",(function(t){var n=e.props,r=n.grid,o=n.onFocusedCell,l=n.onSelection,i=n.bodyContextMenuRenderer,a=n.selectedRegions,c=void 0===a?[]:a,u=r.numRows,s=r.numCols;if(null!=i){var d=e.locateClick(t.nativeEvent),f=c;if(vt.findContainingRegion(c,d)<0){l(f=[d]);var p=$i(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Xi(e,t,n[t])}))}return e}({},vt.getFocusCellCoordinatesFromRegion(d)),{focusSelectionIndex:0});o(p)}var h=i(new Ti(d,f,u,s));return null==h?void 0:h}})),Xi(Qi(e),"handleSelectionEnd",(function(){e.activationCell=null})),Xi(Qi(e),"locateClick",(function(t){return e.activationCell=e.props.locator.convertPointToCell(t.clientX,t.clientY),vt.cell(e.activationCell.row,e.activationCell.col)})),Xi(Qi(e),"locateDrag",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==e.activationCell){var o=e.activationCell,l=e.props.locator.convertPointToCell(n.current[0],n.current[1]);return r?vt.cell(l.row,l.col):vt.cell(o.row,o.col,l.row,l.col)}})),e}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:ra})||!o.Utils.deepCompareKeys(this.props,e,ra)}},{key:"render",value:function(){var e=this.props,t=e.grid,o=e.numFrozenColumns,l=e.numFrozenRows,i=t.getRect().sizeStyle(),a={height:null!=l?t.getCumulativeHeightAt(l-1):i.height,width:null!=o?t.getCumulativeWidthAt(o-1):i.width};return r.createElement(Yr,{enableMultipleSelection:this.props.enableMultipleSelection,focusedCell:this.props.focusedCell,locateClick:this.locateClick,locateDrag:this.locateDrag,onFocusedCell:this.props.onFocusedCell,onSelection:this.props.onSelection,onSelectionEnd:this.handleSelectionEnd,selectedRegions:this.props.selectedRegions,selectedRegionTransform:this.props.selectedRegionTransform,targetRef:this.wrapperRef},r.createElement(Hi,{className:n()(h,m),renderContextMenu:this.renderContextMenu,style:a,targetRef:this.wrapperRef},r.createElement(Ki,{cellRenderer:this.props.cellRenderer,focusedCell:this.props.focusedCell,grid:t,loading:this.props.loading,onCompleteRender:this.props.onCompleteRender,renderMode:this.props.renderMode,columnIndexStart:this.props.columnIndexStart,columnIndexEnd:this.props.columnIndexEnd,rowIndexStart:this.props.rowIndexStart,rowIndexEnd:this.props.rowIndexEnd,viewportRect:this.props.viewportRect})))}}])&&Yi(t.prototype,l),i&&Yi(t,i),c}(o.AbstractComponent);function la(e,t,n){if(vt.getRegionCardinality(e)===rt.FULL_TABLE)return e;var r=vt.copy(e),o=0,l=0;if(null!=n){var i=xr(r,n),a=Lr(r,n),c=Dr(r,n),u=_r(r,n);t===na.UP?o=i&&!a?1:0:t===na.DOWN?o=a&&!i?0:1:l=t===na.LEFT?c&&!u?1:0:u&&!c?0:1}else o=t===na.DOWN?1:0,l=t===na.RIGHT?1:0;var s=function(e){switch(e){case na.UP:return{rows:-1,cols:0};case na.DOWN:return{rows:1,cols:0};case na.LEFT:return{rows:0,cols:-1};case na.RIGHT:return{rows:0,cols:1}}}(t);return null!=r.rows&&(r.rows[o]+=s.rows),null!=r.cols&&(r.cols[l]+=s.cols),r}function ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function aa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Xi(oa,"defaultProps",{loading:!1,renderMode:Gn.BATCH}),function(e){e.UP="up",e.DOWN="down",e.LEFT="left",e.RIGHT="right"}(na||(na={}));var ca=function(){function e(t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),aa(this,"props",void 0),aa(this,"state",void 0),aa(this,"tableHandlers",void 0),aa(this,"grid",void 0),aa(this,"selectAll",void 0),aa(this,"handleSelectAllHotkey",void 0),aa(this,"handleSelectionResizeUp",void 0),aa(this,"handleSelectionResizeDown",void 0),aa(this,"handleSelectionResizeLeft",void 0),aa(this,"handleSelectionResizeRight",void 0),aa(this,"handleSelectionResize",void 0),aa(this,"handleFocusMoveLeft",void 0),aa(this,"handleFocusMoveLeftInternal",void 0),aa(this,"handleFocusMoveRight",void 0),aa(this,"handleFocusMoveRightInternal",void 0),aa(this,"handleFocusMoveUp",void 0),aa(this,"handleFocusMoveUpInternal",void 0),aa(this,"handleFocusMoveDown",void 0),aa(this,"handleFocusMoveDownInternal",void 0),aa(this,"handleFocusMove",void 0),aa(this,"handleFocusMoveInternal",void 0),aa(this,"scrollBodyToFocusedCell",void 0),aa(this,"handleCopy",void 0),this.props=t,this.state=n,this.tableHandlers=r,this.selectAll=function(e){if(o.tableHandlers.getEnabledSelectionHandler(rt.FULL_TABLE)([vt.table()]),e){var t=vt.getFocusCellCoordinatesFromRegion(vt.table());o.tableHandlers.handleFocus(Mr(t))}},this.handleSelectAllHotkey=function(e){e.preventDefault(),e.stopPropagation(),o.selectAll(!1)},this.handleSelectionResizeUp=function(e){return o.handleSelectionResize(e,na.UP)},this.handleSelectionResizeDown=function(e){return o.handleSelectionResize(e,na.DOWN)},this.handleSelectionResizeLeft=function(e){return o.handleSelectionResize(e,na.LEFT)},this.handleSelectionResizeRight=function(e){return o.handleSelectionResize(e,na.RIGHT)},this.handleSelectionResize=function(e,t){e.preventDefault(),e.stopPropagation();var n=o.state,r=n.focusedCell,l=n.selectedRegions,i=Ir(l,r);if(void 0!==i){var a=la(l[i],t,r);o.updateSelectedRegionAtIndex(a,i)}},this.handleFocusMoveLeft=function(e){return o.handleFocusMove(e,"left")},this.handleFocusMoveLeftInternal=function(e){return o.handleFocusMoveInternal(e,"left")},this.handleFocusMoveRight=function(e){return o.handleFocusMove(e,"right")},this.handleFocusMoveRightInternal=function(e){return o.handleFocusMoveInternal(e,"right")},this.handleFocusMoveUp=function(e){return o.handleFocusMove(e,"up")},this.handleFocusMoveUpInternal=function(e){return o.handleFocusMoveInternal(e,"up")},this.handleFocusMoveDown=function(e){return o.handleFocusMove(e,"down")},this.handleFocusMoveDownInternal=function(e){return o.handleFocusMoveInternal(e,"down")},this.handleFocusMove=function(e,t){e.preventDefault(),e.stopPropagation();var n=o.state.focusedCell;if(null!=n){var r={col:n.col,focusSelectionIndex:0,row:n.row};switch(t){case"up":r.row-=1;break;case"down":r.row+=1;break;case"left":r.col-=1;break;case"right":r.col+=1}if(!(r.row<0||r.row>=o.grid.numRows||r.col<0||r.col>=o.grid.numCols)){var l=[vt.cell(r.row,r.col)],i=o.props.selectedRegionTransform,a=null!=i?l.map((function(t){return i(t,e)})):l;o.tableHandlers.handleSelection(a),o.tableHandlers.handleFocus(r),o.scrollBodyToFocusedCell(r)}}},this.handleFocusMoveInternal=function(e,t){e.preventDefault(),e.stopPropagation();var n=o.state,r=n.focusedCell,l=n.selectedRegions;if(null!=r){var i={col:r.col,focusSelectionIndex:r.focusSelectionIndex,row:r.row};if(null==r.focusSelectionIndex&&l.length>0){var a=vt.getCellRegionFromRegion(l[0],o.grid.numRows,o.grid.numCols);i={col:a.cols[0],focusSelectionIndex:0,row:a.rows[0]}}else{if(0===l.length)return void o.handleFocusMove(e,t);var c=vt.getCellRegionFromRegion(l[r.focusSelectionIndex],o.grid.numRows,o.grid.numCols);if(c.cols[0]===c.cols[1]&&c.rows[0]===c.rows[1]&&1===l.length)return void o.handleFocusMove(e,t);switch(t){case"up":i=o.moveFocusCell("row","col",!0,i,c);break;case"left":i=o.moveFocusCell("col","row",!0,i,c);break;case"down":i=o.moveFocusCell("row","col",!1,i,c);break;case"right":i=o.moveFocusCell("col","row",!1,i,c)}}i.row<0||i.row>=o.grid.numRows||i.col<0||i.col>=o.grid.numCols||(o.tableHandlers.handleFocus(i),o.scrollBodyToFocusedCell(i))}},this.scrollBodyToFocusedCell=function(e){var t=e.row,n=e.col,r=o.state.viewportRect;if(void 0!==r&&void 0!==o.grid){var l=r.top,i=r.left+r.width,a=r.top+r.height,c=r.left,u=o.grid.getCumulativeHeightBefore(t),s=o.grid.getCumulativeWidthAt(n),d=o.grid.getCumulativeHeightAt(t),f=o.grid.getCumulativeWidthBefore(n),p=d-u,h=s-f>r.width,v=p>r.height,y={};if(u<l||v)y.nextScrollTop=Math.max(0,u-1);else if(d>a){var m=d-a;y.nextScrollTop=l+m}if(f<c||h)y.nextScrollLeft=Math.max(0,f-1);else if(s>i){var g=s-i;y.nextScrollLeft=c+g}o.tableHandlers.syncViewportPosition(y)}},this.handleCopy=function(e){var t=o.props,n=t.getCellClipboardData,r=t.onCopy,l=o.state.selectedRegions;if(null!=n&&void 0!==o.grid){e.preventDefault(),e.stopPropagation();var i=vt.enumerateUniqueCells(l,o.grid.numRows,o.grid.numCols),a=vt.sparseMapCells(i,(function(e,t){return n(e,t,o.state.childrenArray[t].props.cellRenderer)}));null!=a&&Bn.copyCells(a).then((function(){return null==r?void 0:r(!0)})).catch((function(e){console.error(lr,e),null==r||r(!1)}))}}}var t,n,o;return t=e,(n=[{key:"setGrid",value:function(e){this.grid=e}},{key:"setProps",value:function(e){this.props=e}},{key:"setState",value:function(e){this.state=e}},{key:"updateSelectedRegionAtIndex",value:function(e,t){var n=this.props,o=n.children,l=n.numRows,i=this.state.selectedRegions,a=r.Children.count(o),c=Math.max(0,l-1),u=Math.max(0,a-1),s=vt.clampRegion(e,c,u),d=vt.update(i,s,t);this.tableHandlers.handleSelection(d)}},{key:"moveFocusCell",value:function(e,t,n,r,o){var l=this.state.selectedRegions,i="row"===e?"rows":"cols",a="row"===t?"rows":"cols",c=n?-1:1,u=n?1:0;if(r[e]+=c,(n?r[e]<o[i][0]:r[e]>o[i][1])&&(r[e]=o[i][u],r[t]+=c,n?r[t]<o[a][0]:r[t]>o[a][1])){var s=r.focusSelectionIndex+c;(n?s<0:s>=l.length)&&(s=n?l.length-1:0);var d=vt.getCellRegionFromRegion(l[s],this.grid.numRows,this.grid.numCols);r={col:d.cols[u],focusSelectionIndex:s,row:d.rows[u]}}return r}}])&&ia(t.prototype,n),o&&ia(t,o),e}();function ua(e){return da(e.numFrozenColumns,r.Children.count(e.children))}function sa(e){return da(e.numFrozenRows,e.numRows)}function da(e,t){return void 0===e?0:at.clamp(e,0,t)}function fa(e,t){return void 0!==e&&e.indexOf(t)>=0}function pa(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ha(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function va(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ya(e,t,n){return ya="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ma(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},ya(e,t,n||e)}function ma(e){return ma=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ma(e)}function ga(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){va(e,t,n[t])}))}return e}function ba(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Ra(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ca(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?pa(e):t}function wa(e,t){return wa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},wa(e,t)}function Oa(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ma(e);if(t){var o=ma(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ca(this,n)}}var Sa,Ea=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wa(e,t)}(c,e);var t,l,i,a=Oa(c);function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),va(pa(t=a.call(this,e)),"hotkeysImpl",void 0),va(pa(t),"grid",null),va(pa(t),"locator",void 0),va(pa(t),"resizeSensorDetach",void 0),va(pa(t),"refHandlers",{cellContainer:function(e){return t.cellContainerElement=e},columnHeader:function(e){return t.columnHeaderElement=e},quadrantStack:function(e){return t.quadrantStackInstance=e},rootTable:function(e){return t.rootTableElement=e},rowHeader:function(e){return t.rowHeaderElement=e},scrollContainer:function(e){return t.scrollContainerElement=e}}),va(pa(t),"cellContainerElement",void 0),va(pa(t),"columnHeaderElement",void 0),va(pa(t),"quadrantStackInstance",void 0),va(pa(t),"rootTableElement",void 0),va(pa(t),"rowHeaderElement",void 0),va(pa(t),"scrollContainerElement",void 0),va(pa(t),"didCompletelyMount",!1),va(pa(t),"renderMenu",(function(e){var o=n()(B,va({},Ee,c.isSelectionModeEnabled(t.props,rt.FULL_TABLE)));return r.createElement("div",{className:o,ref:e,onMouseDown:t.handleMenuMouseDown},t.maybeRenderRegions(t.styleMenuRegion))})),va(pa(t),"handleMenuMouseDown",(function(e){t.selectAll(!e.shiftKey)})),va(pa(t),"selectAll",(function(e){if(t.getEnabledSelectionHandler(rt.FULL_TABLE)([vt.table()]),e){var n=vt.getFocusCellCoordinatesFromRegion(vt.table());t.handleFocus(Mr(n))}})),va(pa(t),"columnHeaderCellRenderer",(function(e){var n=t.getColumnProps(e);if(void 0===n)return null;n.id,n.cellRenderer;var o=n.columnHeaderCellRenderer,l=Ra(n,["id","cellRenderer","columnHeaderCellRenderer"]),i=fa(n.loadingOptions,dt.HEADER)||fa(t.props.loadingOptions,pt.COLUMN_HEADERS);if(null!=o){var a,c=o(e);if(null!=c)return r.cloneElement(c,{enableColumnInteractionBar:t.props.enableColumnInteractionBar,loading:null!==(a=c.props.loading)&&void 0!==a?a:i})}var u=ga({enableColumnInteractionBar:t.props.enableColumnInteractionBar,index:e,loading:i},l);return null!=n.name?r.createElement(yo,u):r.createElement(yo,ba(ga({},u),{name:at.toBase26Alpha(e)}))})),va(pa(t),"renderColumnHeader",(function(e,o,l){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.state,u=a.focusedCell,s=a.selectedRegions,d=a.viewportRect,f=t.props,p=f.defaultColumnWidth,h=f.enableMultipleSelection,v=f.enableGhostCells,y=f.enableColumnReordering,m=f.enableColumnResizing,g=f.loadingOptions,b=f.maxColumnWidth,R=f.minColumnWidth,C=f.selectedRegionTransform;if(null!==t.grid&&void 0!==t.locator&&void 0!==d){var w=n()(O,va({},Ee,c.isSelectionModeEnabled(t.props,rt.FULL_COLUMNS))),S=t.grid.getColumnIndicesInRect(d,v),E=i?0:S.columnIndexStart,H=i?t.getMaxFrozenColumnIndex():S.columnIndexEnd;return r.createElement("div",{className:w},r.createElement(vl,{defaultColumnWidth:p,enableMultipleSelection:h,cellRenderer:t.columnHeaderCellRenderer,focusedCell:u,grid:t.grid,isReorderable:y,isResizable:m,loading:fa(g,pt.COLUMN_HEADERS),locator:t.locator,maxColumnWidth:b,measurableElementRef:e,minColumnWidth:R,onColumnWidthChanged:t.handleColumnWidthChanged,onFocusedCell:t.handleFocus,onLayoutLock:t.handleLayoutLock,onReordered:t.handleColumnsReordered,onReordering:l,onResizeGuide:o,onSelection:t.getEnabledSelectionHandler(rt.FULL_COLUMNS),selectedRegions:s,selectedRegionTransform:C,columnIndexStart:E,columnIndexEnd:H},t.props.children),t.maybeRenderRegions(t.styleColumnHeaderRegion))}})),va(pa(t),"renderRowHeader",(function(e,o,l){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.state,u=a.focusedCell,s=a.selectedRegions,d=a.viewportRect,f=t.props,p=f.defaultRowHeight,h=f.enableMultipleSelection,v=f.enableGhostCells,y=f.enableRowReordering,m=f.enableRowResizing,g=f.loadingOptions,b=f.maxRowHeight,R=f.minRowHeight,C=f.rowHeaderCellRenderer,w=f.selectedRegionTransform;if(null!==t.grid&&void 0!==t.locator&&void 0!==d){var O=n()(Ce,va({},Ee,c.isSelectionModeEnabled(t.props,rt.FULL_ROWS))),S=t.grid.getRowIndicesInRect({rect:d,includeGhostCells:v}),E=i?0:S.rowIndexStart,H=i?t.getMaxFrozenRowIndex():S.rowIndexEnd;return r.createElement("div",{className:O,ref:e},r.createElement(Sl,{defaultRowHeight:p,enableMultipleSelection:h,focusedCell:u,grid:t.grid,locator:t.locator,isReorderable:y,isResizable:m,loading:fa(g,pt.ROW_HEADERS),maxRowHeight:b,minRowHeight:R,onFocusedCell:t.handleFocus,onLayoutLock:t.handleLayoutLock,onResizeGuide:o,onReordered:t.handleRowsReordered,onReordering:l,onRowHeightChanged:t.handleRowHeightChanged,onSelection:t.getEnabledSelectionHandler(rt.FULL_ROWS),rowHeaderCellRenderer:C,selectedRegions:s,selectedRegionTransform:w,rowIndexStart:E,rowIndexEnd:H}),t.maybeRenderRegions(t.styleRowHeaderRegion))}})),va(pa(t),"bodyCellRenderer",(function(e,n){var o=t.getColumnProps(n);if(void 0!==o){o.id,o.loadingOptions;var l=o.cellRenderer,i=(o.columnHeaderCellRenderer,o.name,o.nameRenderer,Ra(o,["id","loadingOptions","cellRenderer","columnHeaderCellRenderer","name","nameRenderer"])),a=l(e,n);if(void 0!==a){var c,u=fa(o.loadingOptions,dt.CELLS)||fa(t.props.loadingOptions,pt.CELLS);return r.cloneElement(a,ba(ga({},i),{loading:null!==(c=a.props.loading)&&void 0!==c?c:u}))}}})),va(pa(t),"renderBody",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=t.state,i=l.focusedCell,a=l.numFrozenColumnsClamped,c=l.numFrozenRowsClamped,u=l.selectedRegions,s=l.viewportRect,d=t.props,f=d.enableMultipleSelection,p=d.enableGhostCells,h=d.loadingOptions,v=d.bodyContextMenuRenderer,y=d.selectedRegionTransform;if(null!==t.grid&&void 0!==t.locator&&void 0!==s){var m=t.grid.getRowIndicesInRect({rect:s,includeGhostCells:p}),g=t.grid.getColumnIndicesInRect(s,p),b=o?0:g.columnIndexStart+a,R=n?0:m.rowIndexStart+c,C=o?a-1:g.columnIndexEnd,w=n?c-1:m.rowIndexEnd,O=e===Gl.MAIN?t.handleCompleteRender:void 0;return r.createElement("div",null,r.createElement(oa,{enableMultipleSelection:f,cellRenderer:t.bodyCellRenderer,focusedCell:i,grid:t.grid,loading:fa(h,pt.CELLS),locator:t.locator,onCompleteRender:O,onFocusedCell:t.handleFocus,onSelection:t.getEnabledSelectionHandler(rt.CELLS),bodyContextMenuRenderer:v,renderMode:t.getNormalizedRenderMode(),selectedRegions:u,selectedRegionTransform:y,viewportRect:s,columnIndexStart:b,columnIndexEnd:C,rowIndexStart:R,rowIndexEnd:w,numFrozenColumns:o?a:void 0,numFrozenRows:n?c:void 0}),t.maybeRenderRegions(t.styleBodyRegion,e))}})),va(pa(t),"getEnabledSelectionHandler",(function(e){return c.isSelectionModeEnabled(t.props,e)?t.handleSelection:t.clearSelection})),va(pa(t),"handleCompleteRender",(function(){var e,n;null!=t.state.viewportRect&&(null===(e=(n=t.props).onCompleteRender)||void 0===e||e.call(n),t.didCompletelyMount=!0)})),va(pa(t),"styleBodyRegion",(function(e,n){var r=t.props.numFrozenColumns;if(null==t.grid)return{};var o=vt.getRegionCardinality(e),l=t.grid.getRegionStyle(e),i=(n===Gl.TOP_LEFT||n===Gl.LEFT)&&null!=r&&r>0,a=t.grid.getHeight(),c=t.grid.getWidth(),u="-".concat(1,"px");switch(o){case rt.CELLS:return l;case rt.FULL_COLUMNS:return l.top=u,l.height=a+1,l;case rt.FULL_ROWS:return l.left=u,l.width=c+1,i&&(l.right=u),l;case rt.FULL_TABLE:return l.left=u,l.top=u,l.width=c+1,l.height=a+1,i&&(l.right=u),l;default:return{display:"none"}}})),va(pa(t),"styleMenuRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);return r===rt.FULL_TABLE?(o.right="0px",o.bottom="0px",o.top="0px",o.left="0px",o.borderBottom="none",o.borderRight="none",o):{display:"none"}})),va(pa(t),"styleColumnHeaderRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);switch(r){case rt.FULL_TABLE:return o.left="-1px",o.borderLeft="none",o.bottom="-1px",o;case rt.FULL_COLUMNS:return o.bottom="-1px",o;default:return{display:"none"}}})),va(pa(t),"styleRowHeaderRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);switch(r){case rt.FULL_TABLE:return o.top="-1px",o.borderTop="none",o.right="-1px",o;case rt.FULL_ROWS:return o.right="-1px",o;default:return{display:"none"}}})),va(pa(t),"handleColumnWidthChanged",(function(e,n){var r=t.state.selectedRegions,o=t.state.columnWidths.slice();if(vt.hasFullTable(r))for(var l=0;l<o.length;l++)o[l]=n;vt.hasFullColumn(r,e)?vt.eachUniqueFullColumn(r,(function(e){o[e]=n})):o[e]=n,t.invalidateGrid(),t.setState({columnWidths:o});var i=t.props.onColumnWidthChanged;null!=i&&i(e,n)})),va(pa(t),"handleRowHeightChanged",(function(e,n){var r=t.state.selectedRegions,o=t.state.rowHeights.slice();if(vt.hasFullTable(r))for(var l=0;l<o.length;l++)o[l]=n;vt.hasFullRow(r,e)?vt.eachUniqueFullRow(r,(function(e){o[e]=n})):o[e]=n,t.invalidateGrid(),t.setState({rowHeights:o});var i=t.props.onRowHeightChanged;null!=i&&i(e,n)})),va(pa(t),"handleRootScroll",(function(e){null!=t.rootTableElement&&(t.rootTableElement.scrollLeft=0,t.rootTableElement.scrollTop=0)})),va(pa(t),"handleBodyScroll",(function(e){if(e.stopPropagation(),null!=t.locator&&!t.state.isLayoutLocked){var n=t.locator.getViewportRect();t.updateViewportRect(n)}})),va(pa(t),"clearSelection",(function(e){t.handleSelection([])})),va(pa(t),"syncViewportPosition",(function(e){var n=e.nextScrollLeft,r=e.nextScrollTop,o=t.state.viewportRect;if(null!=t.scrollContainerElement&&null!=t.columnHeaderElement&&void 0!==o&&(void 0!==n||void 0!==r)){if(void 0!==r){var l=t.shouldDisableVerticalScroll()?0:t.columnHeaderElement.clientHeight;t.scrollContainerElement.scrollTop=r+l}if(void 0!==n){var i=t.shouldDisableHorizontalScroll()||null==t.rowHeaderElement?0:t.rowHeaderElement.clientWidth;t.scrollContainerElement.scrollLeft=n+i}var a=new Rt(null!=n?n:0,null!=r?r:0,o.width,o.height);t.updateViewportRect(a)}})),va(pa(t),"handleFocus",(function(e){var n,r;t.props.enableFocusedCell&&(null==t.props.focusedCell&&t.setState({focusedCell:e}),null===(n=(r=t.props).onFocusedCell)||void 0===n||n.call(r,e))})),va(pa(t),"handleSelection",(function(e){null==t.props.selectedRegions&&t.setState({selectedRegions:e});var n=t.props.onSelection;null!=n&&n(e)})),va(pa(t),"handleColumnsReordering",(function(e){t.setState({isReordering:!0,verticalGuides:e})})),va(pa(t),"handleColumnsReordered",(function(e,n,r){var o,l;t.setState({isReordering:!1,verticalGuides:[]}),null===(o=(l=t.props).onColumnsReordered)||void 0===o||o.call(l,e,n,r)})),va(pa(t),"handleRowsReordering",(function(e){t.setState({isReordering:!0,horizontalGuides:e})})),va(pa(t),"handleRowsReordered",(function(e,n,r){var o,l;t.setState({isReordering:!1,horizontalGuides:[]}),null===(o=(l=t.props).onRowsReordered)||void 0===o||o.call(l,e,n,r)})),va(pa(t),"handleLayoutLock",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.setState({isLayoutLocked:e})})),va(pa(t),"updateViewportRect",(function(e){if(void 0!==e){var n=t.state.viewportRect;t.setState({viewportRect:e}),(null!=n&&!n.equals(e)||null==n&&null!=e)&&t.invokeOnVisibleCellsChangeCallback(e)}})),va(pa(t),"getMaxFrozenColumnIndex",(function(){return t.state.numFrozenColumnsClamped-1})),va(pa(t),"getMaxFrozenRowIndex",(function(){return t.state.numFrozenRowsClamped-1})),va(pa(t),"handleColumnResizeGuide",(function(e){t.setState({verticalGuides:e})})),va(pa(t),"handleRowResizeGuide",(function(e){t.setState({horizontalGuides:e})}));var o=e.children,l=e.columnWidths,i=e.defaultRowHeight,u=e.defaultColumnWidth,s=e.numRows,d=e.rowHeights,f=r.Children.toArray(o),p=c.createColumnIdIndex(f),h=f.map((function(){return u}));void 0!==l&&(h=at.assignSparseValues(h,l));var v=at.times(s,(function(){return i}));void 0!==d&&(v=at.assignSparseValues(v,d));var y=null==e.selectedRegions?[]:e.selectedRegions,m=jr(e.enableFocusedCell,e.focusedCell,void 0,y);return t.state={childrenArray:f,columnIdToIndex:p,columnWidths:h,didHeadersMount:!1,focusedCell:m,horizontalGuides:[],isLayoutLocked:!1,isReordering:!1,numFrozenColumnsClamped:ua(e),numFrozenRowsClamped:sa(e),rowHeights:v,selectedRegions:y,verticalGuides:[]},t.hotkeysImpl=new ca(e,t.state,{getEnabledSelectionHandler:t.getEnabledSelectionHandler,handleFocus:t.handleFocus,handleSelection:t.handleSelection,syncViewportPosition:t.syncViewportPosition}),t}return t=c,i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.children,l=e.defaultColumnWidth,i=e.defaultRowHeight,a=e.enableFocusedCell,u=e.focusedCell,s=e.numRows,d=e.selectedRegions,f=e.selectionModes,p=e.columnWidths,h=e.rowHeights;null==p&&(p=t.columnWidths),null==h&&(h=t.rowHeights);var v=r.Children.toArray(n),y=v!==t.childrenArray,m=v.length,g=p;if(p!==t.columnWidths||y){var b=v.map((function(e,n){var r=void 0===e.props.id?n:t.columnIdToIndex[String(e.props.id)];return t.columnWidths[r]}));g=Array(m).fill(l),g=at.assignSparseValues(g,b),g=at.assignSparseValues(g,p)}var R=h;h===t.rowHeights&&s===t.rowHeights.length||(R=Array(s).fill(i),R=at.assignSparseValues(R,h));var C=null!=d?d:t.selectedRegions.filter((function(t){var n=vt.getRegionCardinality(t);return c.isSelectionModeEnabled(e,n,f)&&vt.isRegionValidForTable(t,s,m)})),w=jr(a,u,t.focusedCell,C),O={childrenArray:v,columnIdToIndex:y?c.createColumnIdIndex(v):t.columnIdToIndex,columnWidths:g,focusedCell:w,numFrozenColumnsClamped:ua(e),numFrozenRowsClamped:sa(e),rowHeights:R,selectedRegions:C};return o.Utils.deepCompareKeys(t,O,c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST)?null:O}},{key:"createColumnIdIndex",value:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n].props.id;null!=r&&(t[String(r)]=n)}return t}},{key:"isSelectionModeEnabled",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.selectionModes,o=e.children,l=e.numRows,i=r.Children.count(o);return n.indexOf(t)>=0&&l>0&&i>0}}],(l=[{key:"resizeRowsByApproximateHeight",value:function(e,t){var n=bi(this.props.numRows,this.state.columnWidths,e,t);this.invalidateGrid(),this.setState({rowHeights:n})}},{key:"resizeRowsByTallestCell",value:function(e){if(null!=this.grid&&void 0!==this.state.viewportRect&&void 0!==this.locator){var t=Ri(this.grid,this.state.viewportRect,this.locator,this.state.rowHeights.length,e);this.invalidateGrid(),this.setState({rowHeights:t})}else console.warn(rr)}},{key:"scrollToRegion",value:function(e){var t=this.state,n=t.numFrozenColumnsClamped,r=t.numFrozenRowsClamped,o=t.viewportRect;if(void 0!==o&&null!==this.grid&&void 0!==this.quadrantStackInstance){var l=Io(e,o.left,o.top,this.grid.getCumulativeWidthBefore,this.grid.getCumulativeHeightBefore,r,n),i=l.scrollLeft,a=l.scrollTop,c=this.shouldDisableHorizontalScroll()?0:i,u=this.shouldDisableVerticalScroll()?0:a;this.quadrantStackInstance.scrollToPosition(c,u)}}},{key:"shouldComponentUpdate",value:function(e,t){var n={exclude:c.SHALLOW_COMPARE_PROP_KEYS_DENYLIST},r={exclude:c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST};return!(o.Utils.shallowCompareKeys(this.props,e,n)&&o.Utils.shallowCompareKeys(this.state,t,r)&&o.Utils.deepCompareKeys(this.props,e,c.SHALLOW_COMPARE_PROP_KEYS_DENYLIST)&&o.Utils.deepCompareKeys(this.state,t,c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST))}},{key:"render",value:function(){var e=this.props,t=e.children,o=e.className,l=e.enableRowHeader,i=e.loadingOptions,a=e.numRows,u=e.enableColumnInteractionBar,s=e.enableColumnHeader,d=this.state,f=d.horizontalGuides,p=d.numFrozenColumnsClamped,h=d.numFrozenRowsClamped,v=d.verticalGuides;this.gridDimensionsMatchProps()||this.invalidateGrid();var y,m=this.validateGrid(),g=n()(P,(va(y={},fe,this.state.isReordering),va(y,K,this.shouldDisableVerticalScroll()),va(y,V,this.shouldDisableHorizontalScroll()),va(y,Ee,c.isSelectionModeEnabled(this.props,rt.CELLS)),va(y,q,0===a),y),o);return r.createElement("div",{className:g,ref:this.refHandlers.rootTable,onScroll:this.handleRootScroll},r.createElement(hi,{bodyRef:this.refHandlers.cellContainer,bodyRenderer:this.renderBody,columnHeaderRenderer:this.renderColumnHeader,columnHeaderRef:this.refHandlers.columnHeader,enableColumnInteractionBar:u,enableRowHeader:l,grid:m,handleColumnResizeGuide:this.handleColumnResizeGuide,handleColumnsReordering:this.handleColumnsReordering,handleRowResizeGuide:this.handleRowResizeGuide,handleRowsReordering:this.handleRowsReordering,isHorizontalScrollDisabled:this.shouldDisableHorizontalScroll(),isVerticalScrollDisabled:this.shouldDisableVerticalScroll(),loadingOptions:i,numColumns:r.Children.count(t),numFrozenColumns:p,numFrozenRows:h,numRows:a,onScroll:this.handleBodyScroll,ref:this.refHandlers.quadrantStack,menuRenderer:this.renderMenu,rowHeaderRenderer:this.renderRowHeader,rowHeaderRef:this.refHandlers.rowHeader,scrollContainerRef:this.refHandlers.scrollContainer,enableColumnHeader:s}),r.createElement("div",{className:n()(Z,$)}),r.createElement(Ml,{className:pe,verticalGuides:v,horizontalGuides:f}))}},{key:"renderHotkeys",value:function(){var e=[this.maybeRenderCopyHotkey(),this.maybeRenderSelectAllHotkey(),this.maybeRenderFocusHotkeys(),this.maybeRenderSelectionResizeHotkeys()];return r.createElement(o.Hotkeys,null,e.filter((function(e){return void 0!==e})))}},{key:"componentDidMount",value:function(){var e=this;this.validateGrid(),null!=this.rootTableElement&&null!=this.scrollContainerElement&&null!=this.cellContainerElement&&(this.locator=new Tt(this.rootTableElement,this.scrollContainerElement,this.cellContainerElement),this.updateLocator(),this.updateViewportRect(this.locator.getViewportRect()),this.resizeSensorDetach=kl.attach(this.rootTableElement,(function(){var t;e.state.isLayoutLocked||e.updateViewportRect(null===(t=e.locator)||void 0===t?void 0:t.getViewportRect())})))}},{key:"componentWillUnmount",value:function(){null!=this.resizeSensorDetach&&(this.resizeSensorDetach(),delete this.resizeSensorDetach),this.didCompletelyMount=!1}},{key:"getSnapshotBeforeUpdate",value:function(){var e=this.state.viewportRect;if(void 0===e)return{};var t=this.validateGrid(),n=t.getCumulativeHeightAt(t.numRows-1),r=t.getCumulativeWidthAt(t.numCols-1),o=n<e.top+e.height?Math.max(0,n-e.height):void 0;return{nextScrollLeft:r<e.left+e.width?Math.max(0,r-e.width):void 0,nextScrollTop:o}}},{key:"componentDidUpdate",value:function(e,t,n){var l;ya(ma(c.prototype),"componentDidUpdate",this).call(this,e,t,n),this.hotkeysImpl.setState(this.state),this.hotkeysImpl.setProps(this.props),(r.Children.toArray(this.props.children)!==this.state.childrenArray||this.props.columnWidths!==t.columnWidths||this.props.rowHeights!==t.rowHeights||this.props.numRows!==e.numRows||this.props.forceRerenderOnSelectionChange&&this.props.selectedRegions!==e.selectedRegions)&&this.invalidateGrid(),null!=this.locator&&(this.validateGrid(),this.updateLocator()),o.Utils.arraysEqual(this.state.columnWidths,t.columnWidths)&&o.Utils.arraysEqual(this.state.rowHeights,t.rowHeights)||(null===(l=this.quadrantStackInstance)||void 0===l||l.synchronizeQuadrantViews(),this.syncViewportPosition(n))}},{key:"validateProps",value:function(e){var t=e.children,n=e.columnWidths,l=e.numFrozenColumns,i=e.numFrozenRows,a=e.numRows,c=e.rowHeights,u=r.Children.count(t);if(null!=a&&a<0)throw new Error(tr);if(null!=i&&i<0)throw new Error(Jn);if(null!=l&&l<0)throw new Error(Zn);if(null!=a&&null!=c&&c.length!==a)throw new Error(er);if(null!=u&&null!=n&&n.length!==u)throw new Error(nr);r.Children.forEach(t,(function(e){if(!o.Utils.isElementOfType(e,Un))throw new Error(Yn)})),null!=i&&null!=a&&i>a&&console.warn($n),null!=l&&l>u&&console.warn(Xn)}},{key:"gridDimensionsMatchProps",value:function(){var e=this.props,t=e.children,n=e.numRows;return null!=this.grid&&this.grid.numCols===r.Children.count(t)&&this.grid.numRows===n}},{key:"maybeRenderCopyHotkey",value:function(){return null!=this.props.getCellClipboardData?r.createElement(o.Hotkey,{key:"copy-hotkey",label:"Copy selected table cells",group:"Table",combo:"mod+c",onKeyDown:this.hotkeysImpl.handleCopy}):void 0}},{key:"maybeRenderSelectionResizeHotkeys",value:function(){var e=this.props,t=e.enableMultipleSelection,n=e.selectionModes.length>0;return t&&n?[r.createElement(o.Hotkey,{key:"resize-selection-up",label:"Resize selection upward",group:"Table",combo:"shift+up",onKeyDown:this.hotkeysImpl.handleSelectionResizeUp}),r.createElement(o.Hotkey,{key:"resize-selection-down",label:"Resize selection downward",group:"Table",combo:"shift+down",onKeyDown:this.hotkeysImpl.handleSelectionResizeDown}),r.createElement(o.Hotkey,{key:"resize-selection-left",label:"Resize selection leftward",group:"Table",combo:"shift+left",onKeyDown:this.hotkeysImpl.handleSelectionResizeLeft}),r.createElement(o.Hotkey,{key:"resize-selection-right",label:"Resize selection rightward",group:"Table",combo:"shift+right",onKeyDown:this.hotkeysImpl.handleSelectionResizeRight})]:void 0}},{key:"maybeRenderFocusHotkeys",value:function(){return null!=this.props.enableFocusedCell?[r.createElement(o.Hotkey,{key:"move left",label:"Move focus cell left",group:"Table",combo:"left",onKeyDown:this.hotkeysImpl.handleFocusMoveLeft}),r.createElement(o.Hotkey,{key:"move right",label:"Move focus cell right",group:"Table",combo:"right",onKeyDown:this.hotkeysImpl.handleFocusMoveRight}),r.createElement(o.Hotkey,{key:"move up",label:"Move focus cell up",group:"Table",combo:"up",onKeyDown:this.hotkeysImpl.handleFocusMoveUp}),r.createElement(o.Hotkey,{key:"move down",label:"Move focus cell down",group:"Table",combo:"down",onKeyDown:this.hotkeysImpl.handleFocusMoveDown}),r.createElement(o.Hotkey,{key:"move tab",label:"Move focus cell tab",group:"Table",combo:"tab",onKeyDown:this.hotkeysImpl.handleFocusMoveRightInternal,allowInInput:!0}),r.createElement(o.Hotkey,{key:"move shift-tab",label:"Move focus cell shift tab",group:"Table",combo:"shift+tab",onKeyDown:this.hotkeysImpl.handleFocusMoveLeftInternal,allowInInput:!0}),r.createElement(o.Hotkey,{key:"move enter",label:"Move focus cell enter",group:"Table",combo:"enter",onKeyDown:this.hotkeysImpl.handleFocusMoveDownInternal,allowInInput:!0}),r.createElement(o.Hotkey,{key:"move shift-enter",label:"Move focus cell shift enter",group:"Table",combo:"shift+enter",onKeyDown:this.hotkeysImpl.handleFocusMoveUpInternal,allowInInput:!0})]:[]}},{key:"maybeRenderSelectAllHotkey",value:function(){return c.isSelectionModeEnabled(this.props,rt.FULL_TABLE)?r.createElement(o.Hotkey,{key:"select-all-hotkey",label:"Select all",group:"Table",combo:"mod+a",onKeyDown:this.hotkeysImpl.handleSelectAllHotkey}):void 0}},{key:"shouldDisableVerticalScroll",value:function(){var e,t,n=this.props,r=n.enableColumnHeader,o=n.enableGhostCells,l=this.state.viewportRect;if(null===this.grid||void 0===l)return!1;var i=r?null!==(t=null===(e=this.columnHeaderElement)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:Ht.MIN_COLUMN_HEADER_HEIGHT:0,a=this.grid.getRowIndicesInRect({columnHeaderHeight:i,includeGhostCells:o,rect:l}),c=null!=l&&0===l.top,u=fa(this.props.loadingOptions,pt.ROW_HEADERS);return o&&this.grid.isGhostIndex(a.rowIndexEnd,0)&&(c||u)}},{key:"shouldDisableHorizontalScroll",value:function(){var e=this.props.enableGhostCells,t=this.state.viewportRect;if(null===this.grid||void 0===t)return!1;var n=this.grid.getColumnIndicesInRect(t,e),r=null!=t&&0===t.left,o=e&&this.grid.isGhostColumn(n.columnIndexEnd),l=fa(this.props.loadingOptions,pt.COLUMN_HEADERS);return o&&(r||l)}},{key:"getColumnProps",value:function(e){var t=this.state.childrenArray[e];return void 0===t?void 0:t.props}},{key:"isGuideLayerShowing",value:function(){return this.state.verticalGuides.length>0||this.state.horizontalGuides.length>0}},{key:"invalidateGrid",value:function(){this.grid=null}},{key:"validateGrid",value:function(){if(null==this.grid){var e=this.props,t=e.defaultRowHeight,n=e.defaultColumnWidth,r=e.numFrozenColumns,o=this.state,l=o.rowHeights,i=o.columnWidths,a=Math.max(Ht.DEFAULT_BLEED,r);this.grid=new Ht(l,i,a,t,n),this.invokeOnVisibleCellsChangeCallback(this.state.viewportRect),this.hotkeysImpl.setGrid(this.grid)}return this.grid}},{key:"maybeRenderRegions",value:function(e,t){var o;if(!this.isGuideLayerShowing()||this.state.isReordering)return vt.joinStyledRegionGroups(this.state.selectedRegions,null!==(o=this.props.styledRegionGroups)&&void 0!==o?o:[],this.state.focusedCell).map((function(o,l){var i=o.regions.map((function(n){return e(n,t)}));return r.createElement(Vl,{className:n()(o.className),key:l,regions:o.regions,regionStyles:i})}))}},{key:"updateLocator",value:function(){void 0!==this.locator&&null!=this.grid&&this.locator.setGrid(this.grid).setNumFrozenRows(this.state.numFrozenRowsClamped).setNumFrozenColumns(this.state.numFrozenColumnsClamped)}},{key:"invokeOnVisibleCellsChangeCallback",value:function(e){var t,n;if(null!=this.grid){var r=this.grid.getColumnIndicesInRect(e),o=this.grid.getRowIndicesInRect({rect:e});null===(t=(n=this.props).onVisibleCellsChange)||void 0===t||t.call(n,o,r)}}},{key:"getNormalizedRenderMode",value:function(){var e=this.props.renderMode;return e===Gn.BATCH||e===Gn.BATCH_ON_UPDATE&&this.didCompletelyMount?Gn.BATCH:Gn.NONE}}])&&ha(t.prototype,l),i&&ha(t,i),c}(o.AbstractComponent);function Ha(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.selectionModes,o=e.children,l=e.numRows,i=r.Children.count(o);return n.indexOf(t)>=0&&l>0&&i>0}function Pa(e,t){var n=e.getCellClipboardData,r=e.enableFocusedCell,o=e.enableMultipleSelection,l=e.selectionModes,i=[];null!=n&&i.push({combo:"mod+c",group:"Table",label:"Copy selected table cells",onKeyDown:t.handleCopy});var a=l.length>0;return o&&a&&i.push({combo:"shift+up",group:"Table",label:"Resize selection upward",onKeyDown:t.handleSelectionResizeUp},{combo:"shift+down",group:"Table",label:"Resize selection downward",onKeyDown:t.handleSelectionResizeDown},{combo:"shift+left",group:"Table",label:"Resize selection leftward",onKeyDown:t.handleSelectionResizeLeft},{combo:"shift+right",group:"Table",label:"Resize selection rightward",onKeyDown:t.handleSelectionResizeRight}),null!=r&&i.push({combo:"left",group:"Table",label:"Move focus cell left",onKeyDown:t.handleFocusMoveLeft},{combo:"right",group:"Table",label:"Move focus cell right",onKeyDown:t.handleFocusMoveRight},{combo:"up",group:"Table",label:"Move focus cell up",onKeyDown:t.handleFocusMoveUp},{combo:"down",group:"Table",label:"Move focus cell down",onKeyDown:t.handleFocusMoveDown},{allowInInput:!0,combo:"tab",group:"Table",label:"Move focus cell tab",onKeyDown:t.handleFocusMoveRightInternal},{allowInInput:!0,combo:"shift+tab",group:"Table",label:"Move focus cell shift tab",onKeyDown:t.handleFocusMoveLeftInternal},{allowInInput:!0,combo:"enter",group:"Table",label:"Move focus cell enter",onKeyDown:t.handleFocusMoveDownInternal},{allowInInput:!0,combo:"shift+enter",group:"Table",label:"Move focus cell shift enter",onKeyDown:t.handleFocusMoveUpInternal}),Ha(e,rt.FULL_TABLE)&&i.push({combo:"mod+a",group:"Table",label:"Select all",onKeyDown:t.handleSelectAllHotkey}),i}function ka(e,t){return e.length===t.length&&e.every((function(e,n){return e.key===t[n].key}))}function Ta(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ia(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ja(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xa(e){return xa=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},xa(e)}function La(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function Da(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?Ta(e):t}function _a(e,t){return _a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_a(e,t)}function Ma(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xa(e);if(t){var o=xa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Da(this,n)}}va(Ea,"displayName","".concat(o.DISPLAYNAME_PREFIX,".Table")),va(Ea,"defaultProps",{defaultColumnWidth:150,defaultRowHeight:20,enableColumnHeader:!0,enableColumnInteractionBar:!1,enableFocusedCell:!1,enableGhostCells:!1,enableMultipleSelection:!0,enableRowHeader:!0,forceRerenderOnSelectionChange:!1,getCellClipboardData:function(e,t,n){return To()(null==n?void 0:n(e,t))},loadingOptions:[],maxColumnWidth:9999,maxRowHeight:9999,minColumnWidth:50,minRowHeight:20,numFrozenColumns:0,numFrozenRows:0,numRows:0,renderMode:Gn.BATCH_ON_UPDATE,rowHeaderCellRenderer:El,selectionModes:ht.ALL}),va(Ea,"SHALLOW_COMPARE_PROP_KEYS_DENYLIST",["selectedRegions"]),va(Ea,"SHALLOW_COMPARE_STATE_KEYS_DENYLIST",["selectedRegions","viewportRect"]),Ea=function(e,t,n,r){var o,l=arguments.length,i=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(i=(l<3?o(i):l>3?o(t,n,i):o(t,n))||i);return l>3&&i&&Object.defineProperty(t,n,i),i}([o.HotkeysTarget],Ea),function(e){e.TOP="top",e.BOTTOM="bottom",e.RIGHT="right",e.LEFT="left",e.NONE="none"}(Sa||(Sa={}));var Fa=["selectedRegions"],Aa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_a(e,t)}(c,e);var t,l,i,a=Ma(c);function c(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),ja(Ta(e=a.apply(this,arguments)),"activationCell",null),ja(Ta(e),"containerRef",r.createRef()),ja(Ta(e),"renderContextMenu",(function(t){var n=t.mouseEvent,r=e.props,o=r.grid,l=r.bodyContextMenuRenderer,i=r.selectedRegions,a=void 0===i?[]:i,c=o.numRows,u=o.numCols;if(void 0!==l&&void 0!==n){var s=e.locateClick(n.nativeEvent),d=a;vt.findContainingRegion(a,s)<0&&(d=[s]);var f=l(new Ti(s,d,c,u));return null==f?void 0:f}})),ja(Ta(e),"handleContextMenu",(function(t){var n=e.props,r=n.onFocusedCell,o=n.onSelection,l=n.selectedRegions,i=void 0===l?[]:l,a=e.locateClick(t.nativeEvent);if(vt.findContainingRegion(i,a)<0){o([a]);var c=La(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){ja(e,t,n[t])}))}return e}({},vt.getFocusCellCoordinatesFromRegion(a)),{focusSelectionIndex:0});r(c)}})),ja(Ta(e),"handleSelectionEnd",(function(){e.activationCell=null})),ja(Ta(e),"locateClick",(function(t){return e.activationCell=e.props.locator.convertPointToCell(t.clientX,t.clientY),vt.cell(e.activationCell.row,e.activationCell.col)})),ja(Ta(e),"locateDrag",(function(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==e.activationCell){var o=e.activationCell,l=e.props.locator.convertPointToCell(n.current[0],n.current[1]);return r?vt.cell(l.row,l.col):vt.cell(o.row,o.col,l.row,l.col)}})),e}return t=c,(l=[{key:"shouldComponentUpdate",value:function(e){return!o.Utils.shallowCompareKeys(this.props,e,{exclude:Fa})||!o.Utils.deepCompareKeys(this.props,e,Fa)}},{key:"render",value:function(){var e=this.props,t=e.grid,l=e.numFrozenColumns,i=e.numFrozenRows,a=t.getRect().sizeStyle(),c={height:null!=i?t.getCumulativeHeightAt(i-1):a.height,width:null!=l?t.getCumulativeWidthAt(l-1):a.width};return r.createElement(Yr,{enableMultipleSelection:this.props.enableMultipleSelection,focusedCell:this.props.focusedCell,locateClick:this.locateClick,locateDrag:this.locateDrag,onFocusedCell:this.props.onFocusedCell,onSelection:this.props.onSelection,onSelectionEnd:this.handleSelectionEnd,selectedRegions:this.props.selectedRegions,selectedRegionTransform:this.props.selectedRegionTransform,targetRef:this.containerRef},r.createElement(o.ContextMenu,{className:n()(h,m),content:this.renderContextMenu,disabled:void 0===this.props.bodyContextMenuRenderer,onContextMenu:this.handleContextMenu,ref:this.containerRef,style:c},r.createElement(Ki,{cellRenderer:this.props.cellRenderer,focusedCell:this.props.focusedCell,grid:t,loading:this.props.loading,onCompleteRender:this.props.onCompleteRender,renderMode:this.props.renderMode,columnIndexStart:this.props.columnIndexStart,columnIndexEnd:this.props.columnIndexEnd,rowIndexStart:this.props.rowIndexStart,rowIndexEnd:this.props.rowIndexEnd,viewportRect:this.props.viewportRect})))}}])&&Ia(t.prototype,l),i&&Ia(t,i),c}(o.AbstractComponent);function za(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Na(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ua(e,t,n){return Ua="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ga(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n||e):o.value}},Ua(e,t,n||e)}function Ga(e){return Ga=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Ga(e)}function Ba(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){Wa(e,t,n[t])}))}return e}function Va(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function qa(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ka(e,t){return!t||"object"!==function(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}(t)&&"function"!=typeof t?za(e):t}function Qa(e,t){return Qa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Qa(e,t)}function Ya(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Ga(e);if(t){var o=Ga(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ka(this,n)}}ja(Aa,"defaultProps",{loading:!1,renderMode:Gn.BATCH});var Xa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qa(e,t)}(c,e);var t,l,i,a=Ya(c);function c(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),Wa(za(t=a.call(this,e)),"hotkeys",[]),Wa(za(t),"hotkeysImpl",void 0),Wa(za(t),"grid",null),Wa(za(t),"locator",void 0),Wa(za(t),"resizeSensorDetach",void 0),Wa(za(t),"refHandlers",{cellContainer:function(e){return t.cellContainerElement=e},columnHeader:function(e){t.columnHeaderElement=e,null!=e&&(t.columnHeaderHeight=Math.max(e.clientHeight,Ht.MIN_COLUMN_HEADER_HEIGHT))},quadrantStack:function(e){return t.quadrantStackInstance=e},rootTable:function(e){return t.rootTableElement=e},rowHeader:function(e){t.rowHeaderElement=e,null!=e&&(t.rowHeaderWidth=e.clientWidth)},scrollContainer:function(e){return t.scrollContainerElement=e}}),Wa(za(t),"cellContainerElement",void 0),Wa(za(t),"columnHeaderElement",void 0),Wa(za(t),"columnHeaderHeight",Ht.MIN_COLUMN_HEADER_HEIGHT),Wa(za(t),"quadrantStackInstance",void 0),Wa(za(t),"rootTableElement",void 0),Wa(za(t),"rowHeaderElement",void 0),Wa(za(t),"rowHeaderWidth",Ht.MIN_ROW_HEADER_WIDTH),Wa(za(t),"scrollContainerElement",void 0),Wa(za(t),"didColumnHeaderMount",!1),Wa(za(t),"didRowHeaderMount",!1),Wa(za(t),"didCompletelyMount",!1),Wa(za(t),"renderTableContents",(function(e){var o=e.handleKeyDown,l=e.handleKeyUp,i=t.props,a=i.children,c=i.className,u=i.enableRowHeader,s=i.loadingOptions,d=i.numRows,f=i.enableColumnInteractionBar,p=i.enableColumnHeader,h=t.state,v=h.horizontalGuides,y=h.numFrozenColumnsClamped,m=h.numFrozenRowsClamped,g=h.verticalGuides;t.gridDimensionsMatchProps()||t.invalidateGrid();var b,R=t.validateGrid(),C=n()(P,(Wa(b={},fe,t.state.isReordering),Wa(b,K,t.shouldDisableVerticalScroll()),Wa(b,V,t.shouldDisableHorizontalScroll()),Wa(b,Ee,Ha(t.props,rt.CELLS)),Wa(b,q,0===d),b),c);return r.createElement("div",{className:C,ref:t.refHandlers.rootTable,onScroll:t.handleRootScroll,onKeyDown:o,onKeyUp:l,tabIndex:0},r.createElement(hi,{bodyRef:t.refHandlers.cellContainer,bodyRenderer:t.renderBody,columnHeaderRenderer:t.renderColumnHeader,columnHeaderRef:t.refHandlers.columnHeader,didHeadersMount:t.state.didHeadersMount,enableColumnInteractionBar:f,enableRowHeader:u,grid:R,handleColumnResizeGuide:t.handleColumnResizeGuide,handleColumnsReordering:t.handleColumnsReordering,handleRowResizeGuide:t.handleRowResizeGuide,handleRowsReordering:t.handleRowsReordering,isHorizontalScrollDisabled:t.shouldDisableHorizontalScroll(),isVerticalScrollDisabled:t.shouldDisableVerticalScroll(),loadingOptions:s,numColumns:r.Children.count(a),numFrozenColumns:y,numFrozenRows:m,numRows:d,onScroll:t.handleBodyScroll,ref:t.refHandlers.quadrantStack,menuRenderer:t.renderMenu,rowHeaderRenderer:t.renderRowHeader,rowHeaderRef:t.refHandlers.rowHeader,scrollContainerRef:t.refHandlers.scrollContainer,enableColumnHeader:p,renderScrollIndicatorOverlay:t.renderScrollIndicatorOverlay}),r.createElement("div",{className:n()(Z,$)}),r.createElement(Ml,{className:pe,verticalGuides:g,horizontalGuides:v}))})),Wa(za(t),"renderMenu",(function(e){var o=n()(B,Wa({},Ee,Ha(t.props,rt.FULL_TABLE)));return r.createElement("div",{className:o,ref:e,onMouseDown:t.handleMenuMouseDown},t.maybeRenderRegions(t.styleMenuRegion))})),Wa(za(t),"handleMenuMouseDown",(function(e){t.selectAll(!e.shiftKey)})),Wa(za(t),"selectAll",(function(e){if(t.getEnabledSelectionHandler(rt.FULL_TABLE)([vt.table()]),e){var n=vt.getFocusCellCoordinatesFromRegion(vt.table());t.handleFocus(Mr(n))}})),Wa(za(t),"columnHeaderCellRenderer",(function(e){var n=t.getColumnProps(e);if(void 0===n)return null;n.id,n.cellRenderer;var o=n.columnHeaderCellRenderer,l=qa(n,["id","cellRenderer","columnHeaderCellRenderer"]),i=fa(n.loadingOptions,dt.HEADER)||fa(t.props.loadingOptions,pt.COLUMN_HEADERS);if(null!=o){var a,c=o(e);if(null!=c)return r.cloneElement(c,{enableColumnInteractionBar:t.props.enableColumnInteractionBar,loading:null!==(a=c.props.loading)&&void 0!==a?a:i})}var u=Ba({enableColumnInteractionBar:t.props.enableColumnInteractionBar,index:e,loading:i},l);return null!=n.name?r.createElement(yo,u):r.createElement(yo,Va(Ba({},u),{name:at.toBase26Alpha(e)}))})),Wa(za(t),"renderColumnHeader",(function(e,o,l){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.state,c=a.focusedCell,u=a.selectedRegions,s=a.viewportRect,d=t.props,f=d.defaultColumnWidth,p=d.enableMultipleSelection,h=d.enableGhostCells,v=d.enableColumnReordering,y=d.enableColumnResizing,m=d.enableRowHeader,g=d.loadingOptions,b=d.maxColumnWidth,R=d.minColumnWidth,C=d.selectedRegionTransform,w=n()(O,Wa({},Ee,Ha(t.props,rt.FULL_COLUMNS)));if(null===t.grid||void 0===t.locator||void 0===s)return r.createElement("div",{className:w,ref:e});var S=t.locator.hasHorizontalOverflowOrExactFit(m?t.rowHeaderWidth:0,s),E=t.grid.getColumnIndicesInRect(s,!S&&h),H=i?0:E.columnIndexStart,P=i?t.getMaxFrozenColumnIndex():E.columnIndexEnd;return r.createElement("div",{className:w,ref:e},r.createElement(vl,{defaultColumnWidth:f,enableMultipleSelection:p,cellRenderer:t.columnHeaderCellRenderer,focusedCell:c,grid:t.grid,isReorderable:v,isResizable:y,loading:fa(g,pt.COLUMN_HEADERS),locator:t.locator,maxColumnWidth:b,minColumnWidth:R,onColumnWidthChanged:t.handleColumnWidthChanged,onFocusedCell:t.handleFocus,onMount:t.handleHeaderMounted,onLayoutLock:t.handleLayoutLock,onReordered:t.handleColumnsReordered,onReordering:l,onResizeGuide:o,onSelection:t.getEnabledSelectionHandler(rt.FULL_COLUMNS),selectedRegions:u,selectedRegionTransform:C,columnIndexStart:H,columnIndexEnd:P},t.props.children),t.maybeRenderRegions(t.styleColumnHeaderRegion))})),Wa(za(t),"renderRowHeader",(function(e,o,l){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],a=t.state,c=a.focusedCell,u=a.selectedRegions,s=a.viewportRect,d=t.props,f=d.defaultRowHeight,p=d.enableColumnHeader,h=d.enableMultipleSelection,v=d.enableGhostCells,y=d.enableRowReordering,m=d.enableRowResizing,g=d.loadingOptions,b=d.maxRowHeight,R=d.minRowHeight,C=d.rowHeaderCellRenderer,w=d.selectedRegionTransform,O=n()(Ce,Wa({},Ee,Ha(t.props,rt.FULL_ROWS)));if(null===t.grid||void 0===t.locator||void 0===s)return r.createElement("div",{className:O,ref:e});var S=t.locator.hasVerticalOverflowOrExactFit(p?t.columnHeaderHeight:0,s),E=t.grid.getRowIndicesInRect({includeGhostCells:!S&&v,rect:s}),H=i?0:E.rowIndexStart,P=i?t.getMaxFrozenRowIndex():E.rowIndexEnd;return r.createElement("div",{className:O,ref:e},r.createElement(Sl,{defaultRowHeight:f,enableMultipleSelection:h,focusedCell:c,grid:t.grid,locator:t.locator,isReorderable:y,isResizable:m,loading:fa(g,pt.ROW_HEADERS),maxRowHeight:b,minRowHeight:R,onFocusedCell:t.handleFocus,onLayoutLock:t.handleLayoutLock,onMount:t.handleHeaderMounted,onResizeGuide:o,onReordered:t.handleRowsReordered,onReordering:l,onRowHeightChanged:t.handleRowHeightChanged,onSelection:t.getEnabledSelectionHandler(rt.FULL_ROWS),rowHeaderCellRenderer:C,selectedRegions:u,selectedRegionTransform:w,rowIndexStart:H,rowIndexEnd:P}),t.maybeRenderRegions(t.styleRowHeaderRegion))})),Wa(za(t),"bodyCellRenderer",(function(e,n){var o=t.getColumnProps(n);if(void 0!==o){o.id;var l=o.cellRenderer,i=(o.columnHeaderCellRenderer,o.name,o.nameRenderer,qa(o,["id","cellRenderer","columnHeaderCellRenderer","name","nameRenderer"])),a=l(e,n);if(void 0!==a){var c,u=fa(o.loadingOptions,dt.CELLS)||fa(t.props.loadingOptions,pt.CELLS);return r.cloneElement(a,Va(Ba({},i),{loading:null!==(c=a.props.loading)&&void 0!==c?c:u}))}}})),Wa(za(t),"renderBody",(function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=t.state,i=l.focusedCell,a=l.numFrozenColumnsClamped,c=l.numFrozenRowsClamped,u=l.selectedRegions,s=l.viewportRect,d=t.props,f=d.enableMultipleSelection,p=d.enableColumnHeader,h=d.enableGhostCells,v=d.enableRowHeader,y=d.loadingOptions,m=d.bodyContextMenuRenderer,g=d.selectedRegionTransform;if(null!==t.grid&&void 0!==t.locator&&void 0!==s){var b=t.locator.hasVerticalOverflowOrExactFit(p?t.columnHeaderHeight:0,s),R=t.locator.hasHorizontalOverflowOrExactFit(v?t.rowHeaderWidth:0,s),C=t.grid.getRowIndicesInRect({includeGhostCells:!b&&h,rect:s}),w=t.grid.getColumnIndicesInRect(s,!R&&h),O=o?0:w.columnIndexStart+a,S=n?0:C.rowIndexStart+c,E=o?a-1:w.columnIndexEnd,H=n?c-1:C.rowIndexEnd,P=e===Gl.MAIN?t.handleCompleteRender:void 0;return r.createElement("div",null,r.createElement(Aa,{enableMultipleSelection:f,cellRenderer:t.bodyCellRenderer,focusedCell:i,grid:t.grid,loading:fa(y,pt.CELLS),locator:t.locator,onCompleteRender:P,onFocusedCell:t.handleFocus,onSelection:t.getEnabledSelectionHandler(rt.CELLS),bodyContextMenuRenderer:m,renderMode:t.getNormalizedRenderMode(),selectedRegions:u,selectedRegionTransform:g,viewportRect:s,columnIndexStart:O,columnIndexEnd:E,rowIndexStart:S,rowIndexEnd:H,numFrozenColumns:o?a:void 0,numFrozenRows:n?c:void 0}),t.maybeRenderRegions(t.styleBodyRegion,e))}})),Wa(za(t),"getEnabledSelectionHandler",(function(e){return Ha(t.props,e)?t.handleSelection:t.clearSelection})),Wa(za(t),"renderScrollIndicatorOverlay",(function(e,o){var l=t.state.scrollDirection,i=function(t,n){return{marginRight:e,marginTop:o,opacity:t===n?1:0}},a=u;return r.createElement(r.Fragment,null,r.createElement("div",{className:n()(a,s),style:i(l,Sa.TOP)}),r.createElement("div",{className:n()(a,d),style:i(l,Sa.BOTTOM)}),r.createElement("div",{className:n()(a,f),style:i(l,Sa.RIGHT)}),r.createElement("div",{className:n()(a,p),style:i(l,Sa.LEFT)}))})),Wa(za(t),"handleHeaderMounted",(function(e){t.state.didHeadersMount||("column"===e?t.didColumnHeaderMount=!0:t.didRowHeaderMount=!0,t.didColumnHeaderMount&&t.didRowHeaderMount&&t.setState({didHeadersMount:!0}))})),Wa(za(t),"handleCompleteRender",(function(){var e,n,r=t.didColumnHeaderMount&&t.didRowHeaderMount;null!=t.state.viewportRect&&r&&(null===(e=(n=t.props).onCompleteRender)||void 0===e||e.call(n),t.didCompletelyMount=!0)})),Wa(za(t),"styleBodyRegion",(function(e,n){var r=t.props.numFrozenColumns;if(null==t.grid)return{};var o=vt.getRegionCardinality(e),l=t.grid.getRegionStyle(e),i=(n===Gl.TOP_LEFT||n===Gl.LEFT)&&null!=r&&r>0,a=t.grid.getHeight(),c=t.grid.getWidth(),u="-".concat(1,"px");switch(o){case rt.CELLS:return l;case rt.FULL_COLUMNS:return l.top=u,l.height=a+1,l;case rt.FULL_ROWS:return l.left=u,l.width=c+1,i&&(l.right=u),l;case rt.FULL_TABLE:return l.left=u,l.top=u,l.width=c+1,l.height=a+1,i&&(l.right=u),l;default:return{display:"none"}}})),Wa(za(t),"styleMenuRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);return r===rt.FULL_TABLE?(o.right="0px",o.bottom="0px",o.top="0px",o.left="0px",o.borderBottom="none",o.borderRight="none",o):{display:"none"}})),Wa(za(t),"styleColumnHeaderRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);switch(r){case rt.FULL_TABLE:return o.left="-1px",o.borderLeft="none",o.bottom="-1px",o;case rt.FULL_COLUMNS:return o.bottom="-1px",o;default:return{display:"none"}}})),Wa(za(t),"styleRowHeaderRegion",(function(e){var n=t.state.viewportRect;if(null==t.grid||null==n)return{};var r=vt.getRegionCardinality(e),o=t.grid.getRegionStyle(e);switch(r){case rt.FULL_TABLE:return o.top="-1px",o.borderTop="none",o.right="-1px",o;case rt.FULL_ROWS:return o.right="-1px",o;default:return{display:"none"}}})),Wa(za(t),"handleColumnWidthChanged",(function(e,n){var r,o,l=t.state.selectedRegions,i=t.state.columnWidths.slice();if(vt.hasFullTable(l))for(var a=0;a<i.length;a++)i[a]=n;vt.hasFullColumn(l,e)?vt.eachUniqueFullColumn(l,(function(e){i[e]=n})):i[e]=n,t.validateGrid({columnWidths:i}),t.setState({columnWidths:i}),null===(r=(o=t.props).onColumnWidthChanged)||void 0===r||r.call(o,e,n)})),Wa(za(t),"handleRowHeightChanged",(function(e,n){var r,o,l=t.state.selectedRegions,i=t.state.rowHeights.slice();if(vt.hasFullTable(l))for(var a=0;a<i.length;a++)i[a]=n;vt.hasFullRow(l,e)?vt.eachUniqueFullRow(l,(function(e){i[e]=n})):i[e]=n,t.validateGrid({rowHeights:i}),t.setState({rowHeights:i}),null===(r=(o=t.props).onRowHeightChanged)||void 0===r||r.call(o,e,n)})),Wa(za(t),"handleRootScroll",(function(e){null!=t.rootTableElement&&(t.rootTableElement.scrollLeft=0,t.rootTableElement.scrollTop=0)})),Wa(za(t),"handleBodyScroll",(function(e){if(e.stopPropagation(),null!=t.locator&&!t.state.isLayoutLocked){var n=t.locator.getViewportRect();t.updateViewportRect(n)}})),Wa(za(t),"clearSelection",(function(e){t.handleSelection([])})),Wa(za(t),"syncViewportPosition",(function(e){var n=e.nextScrollLeft,r=e.nextScrollTop,o=t.state.viewportRect;if(null!=t.scrollContainerElement&&null!=t.columnHeaderElement&&void 0!==o&&(void 0!==n||void 0!==r)){if(void 0!==r){var l=t.shouldDisableVerticalScroll()?0:t.columnHeaderElement.clientHeight;t.scrollContainerElement.scrollTop=r+l}if(void 0!==n){var i=t.shouldDisableHorizontalScroll()||null==t.rowHeaderElement?0:t.rowHeaderElement.clientWidth;t.scrollContainerElement.scrollLeft=n+i}var a=new Rt(null!=n?n:0,null!=r?r:0,o.width,o.height);t.updateViewportRect(a)}})),Wa(za(t),"handleFocus",(function(e){var n,r;t.props.enableFocusedCell&&(null==t.props.focusedCell&&t.setState({focusedCell:e}),null===(n=(r=t.props).onFocusedCell)||void 0===n||n.call(r,e))})),Wa(za(t),"handleSelection",(function(e){null==t.props.selectedRegions&&t.setState({selectedRegions:e});var n=t.props.onSelection;null!=n&&n(e)})),Wa(za(t),"handleColumnsReordering",(function(e){t.setState({isReordering:!0,verticalGuides:e})})),Wa(za(t),"handleColumnsReordered",(function(e,n,r){var o,l;t.setState({isReordering:!1,verticalGuides:[]}),null===(o=(l=t.props).onColumnsReordered)||void 0===o||o.call(l,e,n,r)})),Wa(za(t),"handleRowsReordering",(function(e){t.setState({isReordering:!0,horizontalGuides:e})})),Wa(za(t),"handleRowsReordered",(function(e,n,r){var o,l;t.setState({isReordering:!1,horizontalGuides:[]}),null===(o=(l=t.props).onRowsReordered)||void 0===o||o.call(l,e,n,r)})),Wa(za(t),"handleLayoutLock",(function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];t.setState({isLayoutLocked:e})})),Wa(za(t),"updateViewportRect",(function(e){if(void 0!==e){var n=t.state.viewportRect;t.setState({viewportRect:e}),(null!=n&&!n.equals(e)||null==n&&null!=e)&&t.invokeOnVisibleCellsChangeCallback(e)}})),Wa(za(t),"getMaxFrozenColumnIndex",(function(){return t.state.numFrozenColumnsClamped-1})),Wa(za(t),"getMaxFrozenRowIndex",(function(){return t.state.numFrozenRowsClamped-1})),Wa(za(t),"handleColumnResizeGuide",(function(e){t.setState({verticalGuides:e})})),Wa(za(t),"handleRowResizeGuide",(function(e){t.setState({horizontalGuides:e})}));var o=e.children,l=e.columnWidths,i=e.defaultRowHeight,h=e.defaultColumnWidth,v=e.enableRowHeader,y=e.numRows,m=e.rowHeights,g=e.selectedRegions,b=void 0===g?[]:g,R=e.enableColumnHeader,C=r.Children.toArray(o),w=c.createColumnIdIndex(C),S=C.map((function(){return h}));void 0!==l&&(S=at.assignSparseValues(S,l));var E=at.times(y,(function(){return i}));void 0!==m&&(E=at.assignSparseValues(E,m));var H=jr(e.enableFocusedCell,e.focusedCell,void 0,b);return t.state={childrenArray:C,columnIdToIndex:w,columnWidths:S,didHeadersMount:!1,focusedCell:H,horizontalGuides:[],isLayoutLocked:!1,isReordering:!1,numFrozenColumnsClamped:ua(e),numFrozenRowsClamped:sa(e),rowHeights:E,selectedRegions:b,verticalGuides:[]},t.hotkeysImpl=new ca(e,t.state,{getEnabledSelectionHandler:t.getEnabledSelectionHandler,handleFocus:t.handleFocus,handleSelection:t.handleSelection,syncViewportPosition:t.syncViewportPosition}),t.hotkeys=Pa(e,t.hotkeysImpl),!1===v&&(t.didRowHeaderMount=!0),!1===R&&(t.didColumnHeaderMount=!0),t}return t=c,l=[{key:"resizeRowsByApproximateHeight",value:function(e,t){var n=bi(this.props.numRows,this.state.columnWidths,e,t);this.invalidateGrid(),this.setState({rowHeights:n})}},{key:"resizeRowsByTallestCell",value:function(e){if(null!=this.grid&&void 0!==this.state.viewportRect&&void 0!==this.locator){var t=Ri(this.grid,this.state.viewportRect,this.locator,this.state.rowHeights.length,e);this.invalidateGrid(),this.setState({rowHeights:t})}else console.warn(rr)}},{key:"scrollToRegion",value:function(e){var t=this.state,n=t.numFrozenColumnsClamped,r=t.numFrozenRowsClamped,o=t.viewportRect;if(void 0!==o&&null!==this.grid&&void 0!==this.quadrantStackInstance){var l=Io(e,o.left,o.top,this.grid.getCumulativeWidthBefore,this.grid.getCumulativeHeightBefore,r,n),i=l.scrollLeft,a=l.scrollTop,c=this.shouldDisableHorizontalScroll()?0:i,u=this.shouldDisableVerticalScroll()?0:a;this.quadrantStackInstance.scrollToPosition(c,u)}}},{key:"scrollByOffset",value:function(e){var t;e&&(t=Math.abs(e.left)>Math.abs(e.top)?e.left<0?Sa.LEFT:Sa.RIGHT:e.top<0?Sa.TOP:Sa.BOTTOM),(this.shouldRenderScrollDirection(t)||null==t)&&this.setState({scrollDirection:t});var n=this.state.viewportRect;if(void 0!==n&&null!==this.grid&&void 0!==this.quadrantStackInstance&&null!==e){var r=n.left,o=n.top,l=this.shouldDisableHorizontalScroll()?0:r+e.left,i=this.shouldDisableVerticalScroll()?0:o+e.top;this.shouldRenderScrollDirection(this.state.scrollDirection)||this.setState({scrollDirection:null}),this.quadrantStackInstance.scrollToPosition(l,i)}}},{key:"shouldComponentUpdate",value:function(e,t){var n={exclude:c.SHALLOW_COMPARE_PROP_KEYS_DENYLIST},r={exclude:c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST};return!(o.Utils.shallowCompareKeys(this.props,e,n)&&o.Utils.shallowCompareKeys(this.state,t,r)&&o.Utils.deepCompareKeys(this.props,e,c.SHALLOW_COMPARE_PROP_KEYS_DENYLIST)&&o.Utils.deepCompareKeys(this.state,t,c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST))}},{key:"render",value:function(){return r.createElement(o.HotkeysTarget2,{hotkeys:this.hotkeys},this.renderTableContents)}},{key:"componentDidMount",value:function(){var e=this;this.validateGrid(),null!=this.rootTableElement&&null!=this.scrollContainerElement&&null!=this.cellContainerElement&&(this.locator=new Tt(this.rootTableElement,this.scrollContainerElement,this.cellContainerElement),this.updateLocator(),this.updateViewportRect(this.locator.getViewportRect()),this.resizeSensorDetach=kl.attach(this.rootTableElement,(function(){var t;e.state.isLayoutLocked||e.updateViewportRect(null===(t=e.locator)||void 0===t?void 0:t.getViewportRect())})),this.forceUpdate())}},{key:"componentWillUnmount",value:function(){null!=this.resizeSensorDetach&&(this.resizeSensorDetach(),delete this.resizeSensorDetach),this.didCompletelyMount=!1}},{key:"componentDidUpdate",value:function(e,t){Ua(Ga(c.prototype),"componentDidUpdate",this).call(this,e,t),this.hotkeysImpl.setState(this.state),this.hotkeysImpl.setProps(this.props);var n=!ka(r.Children.toArray(this.props.children),this.state.childrenArray);void 0!==this.props.cellRendererDependencies&&void 0===e.cellRendererDependencies&&console.error(or);var o,l,i=void 0!==this.props.cellRendererDependencies&&this.props.cellRendererDependencies.some((function(t,n){var r;return t!==(null!==(r=e.cellRendererDependencies)&&void 0!==r?r:[])[n]})),a=!at.compareSparseArrays(null!==(o=this.props.columnWidths)&&void 0!==o?o:this.state.columnWidths,t.columnWidths),u=!at.compareSparseArrays(null!==(l=this.props.rowHeights)&&void 0!==l?l:this.state.rowHeights,t.rowHeights);(n||i||a||u||this.props.numRows!==e.numRows||this.props.forceRerenderOnSelectionChange&&this.props.selectedRegions!==e.selectedRegions)&&this.invalidateGrid(),null!=this.locator&&(this.validateGrid(),this.updateLocator()),(this.props.getCellClipboardData!==e.getCellClipboardData||this.props.enableFocusedCell!==e.enableFocusedCell||this.props.enableMultipleSelection!==e.enableMultipleSelection||this.props.selectionModes!==e.selectionModes)&&(this.hotkeys=Pa(this.props,this.hotkeysImpl)),i&&this.forceUpdate()}},{key:"validateProps",value:function(e){var t=e.children,n=e.columnWidths,l=e.numFrozenColumns,i=e.numFrozenRows,a=e.numRows,c=e.rowHeights,u=r.Children.count(t);if(null!=a&&a<0)throw new Error(tr);if(null!=i&&i<0)throw new Error(Jn);if(null!=l&&l<0)throw new Error(Zn);if(null!=a&&null!=c&&c.length!==a)throw new Error(er);if(null!=u&&null!=n&&n.length!==u)throw new Error(nr);r.Children.forEach(t,(function(e){if(!o.Utils.isElementOfType(e,Un))throw new Error(Yn)})),null!=i&&null!=a&&i>a&&console.warn($n),null!=l&&l>u&&console.warn(Xn)}},{key:"gridDimensionsMatchProps",value:function(){var e=this.props,t=e.children,n=e.numRows;return null!=this.grid&&this.grid.numCols===r.Children.count(t)&&this.grid.numRows===n}},{key:"shouldDisableVerticalScroll",value:function(){var e=this.props,t=e.enableColumnHeader,n=e.enableGhostCells,r=this.state.viewportRect;if(null===this.grid||void 0===r)return!1;var o=this.grid.getRowIndicesInRect({columnHeaderHeight:t?this.columnHeaderHeight:0,includeGhostCells:n,rect:r}),l=null!=r&&0===r.top,i=fa(this.props.loadingOptions,pt.ROW_HEADERS);return n&&this.grid.isGhostIndex(o.rowIndexEnd,0)&&(l||i)}},{key:"shouldDisableHorizontalScroll",value:function(){var e=this.props.enableGhostCells,t=this.state.viewportRect;if(null===this.grid||void 0===t)return!1;var n=this.grid.getColumnIndicesInRect(t,e),r=null!=t&&0===t.left,o=fa(this.props.loadingOptions,pt.COLUMN_HEADERS);return e&&this.grid.isGhostColumn(n.columnIndexEnd)&&(r||o)}},{key:"shouldRenderScrollDirection",value:function(e){if(!this.scrollContainerElement||!this.state.viewportRect)return!1;var t=this.scrollContainerElement,n=this.state.viewportRect,r=n.left,o=n.top;switch(e){case"left":return r>0;case"right":return t.scrollWidth-t.offsetWidth!==r;case"top":return o>0;case"bottom":return t.scrollHeight-t.offsetHeight!==o;default:return!1}}},{key:"getColumnProps",value:function(e){var t=this.state.childrenArray[e];return void 0===t?void 0:t.props}},{key:"isGuideLayerShowing",value:function(){return this.state.verticalGuides.length>0||this.state.horizontalGuides.length>0}},{key:"invalidateGrid",value:function(){this.grid=null}},{key:"validateGrid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnWidths,n=e.rowHeights;if(null==this.grid||void 0!==t||void 0!==n){var r=this.props,o=r.defaultRowHeight,l=r.defaultColumnWidth,i=r.numFrozenColumns,a=Math.max(Ht.DEFAULT_BLEED,i);this.grid=new Ht(null!=n?n:this.state.rowHeights,null!=t?t:this.state.columnWidths,a,o,l),this.invokeOnVisibleCellsChangeCallback(this.state.viewportRect),this.hotkeysImpl.setGrid(this.grid)}return this.grid}},{key:"maybeRenderRegions",value:function(e,t){var o;if(!this.isGuideLayerShowing()||this.state.isReordering)return vt.joinStyledRegionGroups(this.state.selectedRegions,null!==(o=this.props.styledRegionGroups)&&void 0!==o?o:[],this.state.focusedCell).map((function(o,l){var i=o.regions.map((function(n){return e(n,t)}));return r.createElement(Vl,{className:n()(o.className),key:l,regions:o.regions,regionStyles:i})}))}},{key:"updateLocator",value:function(){void 0!==this.locator&&null!=this.grid&&this.locator.setGrid(this.grid).setNumFrozenRows(this.state.numFrozenRowsClamped).setNumFrozenColumns(this.state.numFrozenColumnsClamped)}},{key:"invokeOnVisibleCellsChangeCallback",value:function(e){var t,n;if(null!=this.grid){var r=this.grid.getColumnIndicesInRect(e),o=this.grid.getRowIndicesInRect({rect:e});null===(t=(n=this.props).onVisibleCellsChange)||void 0===t||t.call(n,o,r)}}},{key:"getNormalizedRenderMode",value:function(){var e=this.props.renderMode;return e===Gn.BATCH||e===Gn.BATCH_ON_UPDATE&&this.didCompletelyMount?Gn.BATCH:Gn.NONE}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.children,l=e.defaultColumnWidth,i=e.defaultRowHeight,a=e.enableFocusedCell,u=e.focusedCell,s=e.numRows,d=e.selectedRegions,f=e.selectionModes,p=e.columnWidths,h=e.rowHeights;null==p&&(p=t.columnWidths),null==h&&(h=t.rowHeights);var v=r.Children.toArray(n),y=!ka(v,t.childrenArray),m=v.length,g=p;if(p!==t.columnWidths||y){var b=v.map((function(e,n){var r=void 0===e.props.id?void 0:t.columnIdToIndex[e.props.id];return t.columnWidths[null!=r?r:n]}));g=Array(m).fill(l),g=at.assignSparseValues(g,b),g=at.assignSparseValues(g,p)}var R=h;h===t.rowHeights&&s===t.rowHeights.length||(R=Array(s).fill(i),R=at.assignSparseValues(R,h));var C=null!=d?d:t.selectedRegions.filter((function(t){var n=vt.getRegionCardinality(t);return Ha(e,n,f)&&vt.isRegionValidForTable(t,s,m)})),w=jr(a,u,t.focusedCell,C),O={childrenArray:v,columnIdToIndex:y?c.createColumnIdIndex(v):t.columnIdToIndex,columnWidths:g,focusedCell:w,numFrozenColumnsClamped:ua(e),numFrozenRowsClamped:sa(e),rowHeights:R,selectedRegions:C};return o.Utils.deepCompareKeys(t,O,c.SHALLOW_COMPARE_STATE_KEYS_DENYLIST)?null:O}},{key:"createColumnIdIndex",value:function(e){for(var t={},n=0;n<e.length;n++){var r=e[n].props.id;null!=r&&(t[String(r)]=n)}return t}}],l&&Na(t.prototype,l),i&&Na(t,i),c}(o.AbstractComponent);Wa(Xa,"displayName","".concat(o.DISPLAYNAME_PREFIX,".Table2")),Wa(Xa,"defaultProps",{defaultColumnWidth:150,defaultRowHeight:20,enableColumnHeader:!0,enableColumnInteractionBar:!1,enableFocusedCell:!1,enableGhostCells:!1,enableMultipleSelection:!0,enableRowHeader:!0,forceRerenderOnSelectionChange:!1,getCellClipboardData:function(e,t,n){return To()(n(e,t))},loadingOptions:[],maxColumnWidth:9999,maxRowHeight:9999,minColumnWidth:50,minRowHeight:20,numFrozenColumns:0,numFrozenRows:0,numRows:0,renderMode:Gn.BATCH_ON_UPDATE,rowHeaderCellRenderer:El,selectionModes:ht.ALL}),Wa(Xa,"SHALLOW_COMPARE_PROP_KEYS_DENYLIST",["selectedRegions"]),Wa(Xa,"SHALLOW_COMPARE_STATE_KEYS_DENYLIST",["selectedRegions","viewportRect"])}(),a}()}));