handsontable 0.0.0-next-be16baf-20230809 → 0.0.0-next-08765b9-20230809

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of handsontable might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var n=[,e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(3),o(4),o(5),o(6);var n=s(o(7)),r=o(216),i=o(260),l=s(o(123)),a=o(238),h=o(267),c=o(331),d=o(335),u=o(145);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(c.TextCellType),g.editors={BaseEditor:d.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="09/08/2023 12:41:43",g.version="0.0.0-next-be16baf-20230809",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.default=function(e,t){var o,s=this;let L=arguments.length>2&&void 0!==arguments[2]&&arguments[2],k=!1,F=this;const V=new h.default(F);let W,B,U,j,Y=!0;(0,R.hasValidParameter)(L)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const G=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",z=["rtl","ltr"].includes(G)?G:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",z),this.isRtl=function(){return"rtl"===z},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const K=new I.MetaManager(F,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),$=K.getTableMeta(),X=K.getGlobalMeta(),q=(0,A.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,D.set(this.guid,this),this.columnIndexMapper=new E.IndexMapper,this.rowIndexMapper=new E.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),B=new v.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const Q=e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?F.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let J=new O.Selection($,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>W.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,o)=>F._createCellRange(e,t,o),visualToRenderableCoords:Q,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?F.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>F.getCellMeta(e,t).disableVisualSelection});this.selection=J;const Z=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function ee(e){const t=(0,M.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),X.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function te(e,t){const o="className"===e?F.rootElement:F.table;if(Y)(0,n.addClass)(o,t);else{let s=[],r=[];X[e]&&(s=Array.isArray(X[e])?X[e]:(0,d.stringToArray)(X[e])),t&&(r=Array.isArray(t)?t:(0,d.stringToArray)(t));const i=(0,d.getDifferenceOfArrays)(s,r),l=(0,d.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}X[e]=t}function oe(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ne(e,t,o){if(!e.length)return;const s=F.getActiveEditor(),r=new oe;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=W.propToCol(l),c=F.getCellMeta(s,h);"numeric"===c.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=se(a)),F.getCellValidator(c)&&(r.addValidatorToQueue(),F.validateCell(e[o][3],c,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=F.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,$.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,c),t))}r.checkIfQueueIsEmpty()}function re(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if($.allowInsertRow)for(;e[o][0]>F.countRows()-1;){const{delta:e}=W.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===F.dataType&&(!$.columns||0===$.columns.length)&&$.allowInsertColumn)for(;W.propToCol(e[o][1])>F.countCols()-1;){const{delta:e}=W.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||W.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}F.forceFullRender=!0,U.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),j.lockEditor(),F._refreshBorders(null),j.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const s=F.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function ie(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function le(e,t){const o=F.getActiveEditor(),s=F.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",Z),this.rowIndexMapper.addLocalHook("cacheUpdated",Z),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e)})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,c.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,F.colToProp(s.col),r.row,F.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;k&&(h=!1),t.isTouched()&&(h=!t.value);const d=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();if(!1!==h)if(l)d?this.view.scrollViewportVertically(F.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(F.columnIndexMapper.getRenderableFromVisualIndex(e.col));else if(a&&!this.selection.isMultiple()){const e=Q(a.from);e.row<0&&e.col>=0?this.view.scrollViewportHorizontally(e.col):e.col<0&&e.row>=0?this.view.scrollViewportVertically(e.row):this.view.scrollViewport(e)}else this.view.scrollViewport(Q(e));d&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,F.colToProp(o.col),s.row,F.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})),this.selection.addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})),this.selection.addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})),this.selection.addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{j.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),U={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=F.countSourceRows();if($.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:c,startPhysicalIndex:u}=W.createRow(t,n,{source:r,mode:h});if(c){const e=J.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=F.toVisualRow(u);if(J.isSelectedByCorner())F.selectAll(!1,!1);else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;J.isSelectedByRowHeader()&&(r=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(o+c,r),!0),J.setRangeEnd(F._createCellCoords(s+c,n))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?F.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=W.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray($.colHeaders)){const e=[F.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply($.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=F.toVisualColumn(p);if(J.isSelectedByCorner())F.selectAll(!1,!1);else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;J.isSelectedByColumnHeader()&&(r=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(r,o+f),!0),J.setRangeEnd(F._createCellCoords(s,n+f))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?F.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeRow(o,s,r))return;const l=F.countRows(),a=$.fixedRowsTop;a>=n+1&&($.fixedRowsTop-=Math.min(s,a-n));const h=$.fixedRowsBottom;h&&n>=l-h&&($.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),U.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?F.countCols()-1:Math.max(o-t,0);let l=F.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeCol(o,s,r))return;const a=$.fixedColumnsStart;a>=n+1&&($.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray($.colHeaders)&&(void 0===l&&(l=-1),$.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),U.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||U.adjustRowsAndCols()},adjustRowsAndCols(){const e=$.minRows,t=$.minSpareRows,o=$.minCols,s=$.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&J.deselect(),e){const t=F.countRows();t<e&&W.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,$.maxRows-F.countSourceRows());W.createRow(F.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(o&&!$.columns&&t<o){const s=o-t;e+=s,W.createCol(t,s,{source:"auto"})}if(s&&!$.columns&&"array"===F.dataType&&e<s){t=F.countCols();const o=s-e,n=Math.min(o,$.maxCols-t);W.createCol(t,n,{source:"auto"})}}if(J.isSelected()){const e=F.countRows(),t=F.countCols();(0,d.arrayEach)(J.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&F.selectCell(n,r,i,l)}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,c.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,d.pivot)(t),w=n.length,y=Math.max(w,m),v=F.getData().slice(f),S=(0,d.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<S.length?g.push(n[l].concat(S[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(S[l]));F.populateFromArray(f,p,(0,d.pivot)(g));break;case"shift_right":const E=t.length,R=Math.max(E,C),b=F.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<E){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));F.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,M=0,O=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!$.allowInsertRow&&u.row>F.countRows()-1||u.row>=$.maxRows);r++){const t=r-_,n=I(t).length,d=o?o.col-e.col+1:0;if(a=o?d:Math.max(n,d),u.col=e.col,T=F.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&u.col>o.col&&d>n||!$.allowInsertColumn&&u.col>F.countCols()-1||u.col>=$.maxCols);l++){if(T=F.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){M+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-M),o=F.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)O=!1;else{const t=(0,c.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,c.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,c.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,c.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([u.row,u.col,e]),O=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}F.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){B.setData($.data),F.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(F.rootElement,"mobile"),this.updateSettings($,!0),this.view=new y.default(this),j=a.default.getInstance(F,$,J),(0,R.isRootInstance)(this)&&(0,N.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),Y&&null===F.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof Y&&(F.runHooks("afterChange",Y[0],Y[1]),Y=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return F.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=F.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,r=F.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(n),t=F.columnIndexMapper.getRenderableFromVisualIndex(s);F.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,s),F._registerImmediate((()=>{n.call(t,e,(o=>{F&&(o=F.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),F.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):F._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=ie(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[i][1]>=this.countCols()?n[i][1]:W.colToProp(n[i][1]),r.push([n[i][0],a,B.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const c=le(r,s);F.runHooks("afterSetDataAtCell",c,h),ne(c,h,(()=>{re(c,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=ie(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],B.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=le(r,s);F.runHooks("afterSetDataAtRowProp",h,a),ne(h,a,(()=>{re(h,a)}))},this.listen=function(){F&&!F.isListening()&&(D.forEach((e=>{F!==e&&e.unlisten()})),H=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(H=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return H===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?F._createCellCoords(s,n):null;return U.populateFromArray(F._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return W.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return W.spliceRow(e,t,o,...n)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(j.lockEditor(),this._refreshBorders(null),j.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:o,height:s}=F.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(o,s),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{W=e}),(e=>{W=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),U.adjustRowsAndCols()}),{hotInstance:F,dataMap:W,dataSource:B,internalSource:"updateData",source:t,metaManager:K,firstRun:Y})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{W=e}),(()=>{K.clearCellsCache(),F.initIndexMappers(),U.adjustRowsAndCols(),Y&&(Y=[null,"loadData"])}),{hotInstance:F,dataMap:W,dataSource:B,internalSource:"loadData",source:t,metaManager:K,firstRun:Y})},this.getInitialColumnCount=function(){const e=$.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===F.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=W.colToPropCache.length);else if((0,i.isDefined)($.dataSchema)){const e=W.getSchema();t=Array.isArray(e)?e.length:(0,c.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,i.isUndefined)(e)?W.getAll():W.getRange(F._createCellCoords(e,t),F._createCellCoords(o,s),W.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return W.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(o,s))},this.getCopyableData=function(e,t){return W.getCopyable(e,W.colToProp(t))},this.getSchema=function(){return W.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(Y?F.loadData:F.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?ee(e.language):"className"===s?te("className",e.className):"tableClassName"===s&&F.table?(te("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,F.addHook(s,e[s])):!t&&(0,c.hasOwnProperty)(e,s)&&(X[s]=e[s]));void 0===e.data&&void 0===$.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(W.createMap(),F.initIndexMappers());const a=F.countCols(),h=$.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||K.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&K.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,c.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let d=F.rootElement.style.height;""!==d&&(d=parseInt(F.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===u){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==u&&(F.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),U.adjustRowsAndCols(),F.view&&!Y&&(F.forceFullRender=!0,j.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!F.view||""!==d&&""!==u&&void 0!==u||d===u||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if($.getValue){if((0,r.isFunction)($.getValue))return $.getValue.call(F);if(e)return F.getData()[e[0][0]][$.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return $},this.clear=function(){this.selectAll(!1,!1),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){U.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s?null:F.view.getCellAtCoords(F._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),F._createCellCoords(n,r)},this.colToProp=function(e){return W.colToProp(e)},this.propToCol=function(e){return W.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return W.get(e,W.colToProp(t))},this.getDataAtRowProp=function(e,t){return W.get(e,t)},this.getDataAtCol=function(e){const t=[],o=W.getRange(F._createCellCoords(0,e),F._createCellCoords($.data.length-1,e),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=W.getRange(F._createCellCoords(0,W.propToCol(e)),F._createCellCoords($.data.length-1,W.propToCol(e)),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?B.getData():B.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?B.getData(!0):B.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=ie(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,B.getAtCell(t,o),s])})),(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;B.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=F.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return W.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),W.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,i]=n;let[,,l,a]=n,h=null,c=null;void 0===l&&(l=r),void 0===a&&(a=i);let d="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return c=s.type,h?t=h===c:h=c,t})),d=t?c:"mixed",t})),d},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=K.getCellMetaKeyValue(s,n,o);!1!==F.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(K.removeCellMeta(s,n,o),F.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&K.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,d.arrayEach)(s.reverse(),(t=>{K.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),F.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,c.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===F.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),K.setCellMeta(n,r,o,s),F.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return K.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),K.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return K.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||$.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new oe;e&&(s.onQueueEmpty=e);let n=F.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),F.validateCell(F.getDataAtCell(n,e),F.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=$.rowHeaders,o=e;return void 0!==o&&(o=F.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!$.rowHeaders},this.hasColHeaders=function(){if(void 0!==$.colHeaders&&null!==$.colHeaders)return!!$.colHeaders;for(let e=0,t=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=F.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=F.countCols();for(let o=0;o<t;o++)e.push(F.getColHeader(o));return e}let s=$.colHeaders;const n=F.toPhysicalColumn(o),i=function(e){const t=[],o=F.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)($.columns)&&$.columns(s)&&t.push(s);return t[e]}(n);return!1===$.colHeaders?s=null:$.columns&&(0,r.isFunction)($.columns)&&$.columns(i)&&$.columns(i).title?s=$.columns(i).title:$.columns&&$.columns[n]&&$.columns[n].title?s=$.columns[n].title:Array.isArray($.colHeaders)&&void 0!==$.colHeaders[n]?s=$.colHeaders[n]:(0,r.isFunction)($.colHeaders)?s=$.colHeaders(n):$.colHeaders&&"string"!=typeof $.colHeaders&&"number"!=typeof $.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=F.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.getCellMeta(0,e).width}if(void 0!==t&&t!==$.width||(t=$.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=$.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return W.getLength()},this.countCols=function(){const e=$.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(F.countRows()-1,(o=>{if(F.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(F.countCols()-1,(o=>{if(F.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return $.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return $.isEmptyCol.call(F,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(k=!0);const o=J.selectCells(e);return o&&t&&F.listen(),k=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return J.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return J.selectRows(e,t,o)},this.deselectCell=function(){J.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;k=!0,J.selectAll(e,t,o),k=!1};const ae=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?ae(this.rowIndexMapper,e):void 0,r=s?ae(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?F.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?F.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?F.view.scrollViewport(F._createCellCoords(i,l),n,s,o,r):a&&!1===h?F.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&F.view.scrollViewportHorizontally(l,s,r)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),o=this.rowIndexMapper.getRenderableFromVisualIndex(t.row),s=this.columnIndexMapper.getRenderableFromVisualIndex(t.col);this.view.scrollViewport(this._createCellCoords(o,s))?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),K.clearCache(),D.delete(this.guid),(0,R.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(F.rootElement),V.destroy(),j&&j.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),q.getItems().forEach((e=>{let[,t]=e;t.destroy()})),q.clear(),F.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(F),(0,c.objectEach)(F,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),F.isDestroyed=!0,W&&W.destroy(),W=null,U=null,J=null,j=null,F=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:q.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:q.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){T.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return T.default.getSingleton().has(e,F)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(F,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)($.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.destroyEditor(e),F.view.render(),t&&J.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const he=(0,P.createShortcutManager)({handleEvent(e){const t=F.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);q.addItem(e,new t(this))})),(0,x.registerAllShortcutContexts)(F),he.setActiveContextName("grid"),T.default.getSingleton().run(F,"construct")},o(8),o(78),o(94);var n=o(107),r=o(114),i=o(110),l=o(115),a=s(o(119)),h=s(o(126)),c=o(116),d=o(113),u=o(127),g=o(128),f=o(133),p=o(122),m=o(134),C=o(108),w=o(130),y=s(o(135)),v=s(o(217)),S=o(218),E=o(219),R=o(216),b=o(145),T=s(o(123)),_=o(238),M=o(239),O=o(244),I=o(260),N=o(276),A=o(131),P=o(325),x=o(278);let H=null;const D=new Map;new Set},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(75),l=o(77);s({target:"Array",proto:!0,arity:1,forced:o(13)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),o=r(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return i(t,o),o}})},(e,t,o)=>{var s=o(10),n=o(11).f,r=o(50),i=o(54),l=o(44),a=o(62),h=o(74);e.exports=function(e,t){var o,c,d,u,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):(s[f]||{}).prototype)for(c in t){if(u=t[c],d=e.dontCallGetSet?(g=n(o,c))&&g.value:o[c],!h(p?c:f+(m?".":"#")+c,e.forced)&&void 0!==d){if(typeof u==typeof d)continue;a(u,d)}(e.sham||d&&d.sham)&&r(u,"sham",!0),i(o,c,u,e)}}},function(e){var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(e,t,o)=>{var s=o(12),n=o(14),r=o(16),i=o(17),l=o(18),a=o(24),h=o(45),c=o(48),d=Object.getOwnPropertyDescriptor;t.f=s?d:function(e,t){if(e=l(e),t=a(t),c)try{return d(e,t)}catch(e){}if(h(e,t))return i(!n(r.f,e,t),e[t])}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,o)=>{var s=o(15),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!o.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,o)=>{var s=o(19),n=o(22);e.exports=function(e){return s(n(e))}},(e,t,o)=>{var s=o(20),n=o(13),r=o(21),i=Object,l=s("".split);e.exports=n((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?l(e,""):i(e)}:i},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.call,i=s&&n.bind.bind(r,r);e.exports=s?i:function(e){return function(){return r.apply(e,arguments)}}},(e,t,o)=>{var s=o(20),n=s({}.toString),r=s("".slice);e.exports=function(e){return r(n(e),8,-1)}},(e,t,o)=>{var s=o(23),n=TypeError;e.exports=function(e){if(s(e))throw n("Can't call method on "+e);return e}},e=>{e.exports=function(e){return null==e}},(e,t,o)=>{var s=o(25),n=o(29);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},(e,t,o)=>{var s=o(14),n=o(26),r=o(29),i=o(36),l=o(39),a=o(40),h=TypeError,c=a("toPrimitive");e.exports=function(e,t){if(!n(e)||r(e))return e;var o,a=i(e,c);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||r(o))return o;throw h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,o)=>{var s=o(27),n=o(28),r=n.all;e.exports=n.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:s(e)||e===r}:function(e){return"object"==typeof e?null!==e:s(e)}},(e,t,o)=>{var s=o(28),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},(e,t,o)=>{var s=o(30),n=o(27),r=o(31),i=o(32),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&r(t.prototype,l(e))}},(e,t,o)=>{var s=o(10),n=o(27);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},(e,t,o)=>{var s=o(20);e.exports=s({}.isPrototypeOf)},(e,t,o)=>{var s=o(33);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,o)=>{var s=o(34),n=o(13),r=o(10).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},(e,t,o)=>{var s,n,r=o(10),i=o(35),l=r.process,a=r.Deno,h=l&&l.versions||a&&a.version,c=h&&h.v8;c&&(n=(s=c.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&i&&(!(s=i.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=i.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,o)=>{var s=o(37),n=o(23);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},(e,t,o)=>{var s=o(27),n=o(38),r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,o)=>{var s=o(14),n=o(27),r=o(26),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!r(l=s(o,e)))return l;if(n(o=e.valueOf)&&!r(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!r(l=s(o,e)))return l;throw i("Can't convert object to primitive value")}},(e,t,o)=>{var s=o(10),n=o(41),r=o(45),i=o(47),l=o(33),a=o(32),h=s.Symbol,c=n("wks"),d=a?h.for||h:h&&h.withoutSetter||i;e.exports=function(e){return r(c,e)||(c[e]=l&&r(h,e)?h[e]:d("Symbol."+e)),c[e]}},(e,t,o)=>{var s=o(42),n=o(43);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,o)=>{var s=o(10),n=o(44),r="__core-js_shared__",i=s[r]||n(r,{});e.exports=i},(e,t,o)=>{var s=o(10),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},(e,t,o)=>{var s=o(20),n=o(46),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(n(e),t)}},(e,t,o)=>{var s=o(22),n=Object;e.exports=function(e){return n(s(e))}},(e,t,o)=>{var s=o(20),n=0,r=Math.random(),i=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++n+r,36)}},(e,t,o)=>{var s=o(12),n=o(13),r=o(49);e.exports=!s&&!n((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},(e,t,o)=>{var s=o(10),n=o(26),r=s.document,i=n(r)&&n(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},(e,t,o)=>{var s=o(12),n=o(51),r=o(17);e.exports=s?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},(e,t,o)=>{var s=o(12),n=o(48),r=o(52),i=o(53),l=o(24),a=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",g="writable";t.f=s?r?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=c(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:u in o?o[u]:s[u],enumerable:d in o?o[d]:s[d],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(i(e),t=l(t),i(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},(e,t,o)=>{var s=o(12),n=o(13);e.exports=s&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,o)=>{var s=o(26),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not an object")}},(e,t,o)=>{var s=o(27),n=o(51),r=o(55),i=o(44);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&r(o,h,l),l.global)a?e[t]=o:i(t,o);else{try{l.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=o:n.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},(e,t,o)=>{var s=o(20),n=o(13),r=o(27),i=o(45),l=o(12),a=o(56).CONFIGURABLE,h=o(57),c=o(58),d=c.enforce,u=c.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),C=s([].join),w=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),v=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!i(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&o&&i(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&i(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=d(e);return i(s,"source")||(s.source=C(y,"string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return r(this)&&u(this).source||h(this)}),"toString")},(e,t,o)=>{var s=o(12),n=o(45),r=Function.prototype,i=s&&Object.getOwnPropertyDescriptor,l=n(r,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&i(r,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},(e,t,o)=>{var s=o(20),n=o(27),r=o(43),i=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return i(e)}),e.exports=r.inspectSource},(e,t,o)=>{var s,n,r,i=o(59),l=o(10),a=o(26),h=o(50),c=o(45),d=o(43),u=o(60),g=o(61),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(i||d.state){var C=d.state||(d.state=new m);C.get=C.get,C.has=C.has,C.set=C.set,s=function(e,t){if(C.has(e))throw p(f);return t.facade=e,C.set(e,t),t},n=function(e){return C.get(e)||{}},r=function(e){return C.has(e)}}else{var w=u("state");g[w]=!0,s=function(e,t){if(c(e,w))throw p(f);return t.facade=e,h(e,w,t),t},n=function(e){return c(e,w)?e[w]:{}},r=function(e){return c(e,w)}}e.exports={set:s,get:n,has:r,enforce:function(e){return r(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return o}}}},(e,t,o)=>{var s=o(10),n=o(27),r=s.WeakMap;e.exports=n(r)&&/native code/.test(String(r))},(e,t,o)=>{var s=o(41),n=o(47),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},e=>{e.exports={}},(e,t,o)=>{var s=o(45),n=o(63),r=o(11),i=o(51);e.exports=function(e,t,o){for(var l=n(t),a=i.f,h=r.f,c=0;c<l.length;c++){var d=l[c];s(e,d)||o&&s(o,d)||a(e,d,h(t,d))}}},(e,t,o)=>{var s=o(30),n=o(20),r=o(64),i=o(73),l=o(53),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(l(e)),o=i.f;return o?a(t,o(e)):t}},(e,t,o)=>{var s=o(65),n=o(72).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},(e,t,o)=>{var s=o(20),n=o(45),r=o(18),i=o(66).indexOf,l=o(61),a=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,c=[];for(o in s)!n(l,o)&&n(s,o)&&a(c,o);for(;t.length>h;)n(s,o=t[h++])&&(~i(c,o)||a(c,o));return c}},(e,t,o)=>{var s=o(18),n=o(67),r=o(70),i=function(e){return function(t,o,i){var l,a=s(t),h=r(a),c=n(i,h);if(e&&o!=o){for(;h>c;)if((l=a[c++])!=l)return!0}else for(;h>c;c++)if((e||c in a)&&a[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,o)=>{var s=o(68),n=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):r(o,t)}},(e,t,o)=>{var s=o(69);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},(e,t,o)=>{var s=o(71);e.exports=function(e){return s(e.length)}},(e,t,o)=>{var s=o(68),n=Math.min;e.exports=function(e){return e>0?n(s(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,o)=>{var s=o(13),n=o(27),r=/#|\.prototype\./,i=function(e,t){var o=a[l(e)];return o==c||o!=h&&(n(t)?s(t):!!t)},l=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=i.data={},h=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,o)=>{"use strict";var s=o(12),n=o(76),r=TypeError,i=Object.getOwnPropertyDescriptor,l=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(n(e)&&!i(e,"length").writable)throw r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},(e,t,o)=>{var s=o(21);e.exports=Array.isArray||function(e){return"Array"==s(e)}},e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},(e,t,o)=>{var s=o(9),n=o(10),r=o(79),i=o(80),l="WebAssembly",a=n[l],h=7!==Error("e",{cause:7}).cause,c=function(e,t){var o={};o[e]=i(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},d=function(e,t){if(a&&a[e]){var o={};o[e]=i(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};c("Error",(function(e){return function(t){return r(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),c("URIError",(function(e){return function(t){return r(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.apply,i=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?i.bind(r):function(){return i.apply(r,arguments)})},(e,t,o)=>{"use strict";var s=o(30),n=o(45),r=o(50),i=o(31),l=o(81),a=o(62),h=o(84),c=o(85),d=o(86),u=o(90),g=o(91),f=o(12),p=o(42);e.exports=function(e,t,o,m){var C="stackTraceLimit",w=m?2:1,y=e.split("."),v=y[y.length-1],S=s.apply(null,y);if(S){var E=S.prototype;if(!p&&n(E,"cause")&&delete E.cause,!o)return S;var R=s("Error"),b=t((function(e,t){var o=d(m?t:e,void 0),s=m?new S(e):new S;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&i(E,this)&&c(s,this,b),arguments.length>w&&u(s,arguments[w]),s}));if(b.prototype=E,"Error"!==v?l?l(b,R):a(b,R,{name:!0}):f&&C in S&&(h(b,S,C),h(b,S,"prepareStackTrace")),a(b,S),!p)try{E.name!==v&&r(E,"name",v),E.constructor=b}catch(e){}return b}}},(e,t,o)=>{var s=o(82),n=o(53),r=o(83);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return n(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},(e,t,o)=>{var s=o(20),n=o(37);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},(e,t,o)=>{var s=o(27),n=String,r=TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw r("Can't set "+n(e)+" as a prototype")}},(e,t,o)=>{var s=o(51).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},(e,t,o)=>{var s=o(27),n=o(26),r=o(81);e.exports=function(e,t,o){var i,l;return r&&s(i=t.constructor)&&i!==o&&n(l=i.prototype)&&l!==o.prototype&&r(e,l),e}},(e,t,o)=>{var s=o(87);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},(e,t,o)=>{var s=o(88),n=String;e.exports=function(e){if("Symbol"===s(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}},(e,t,o)=>{var s=o(89),n=o(27),r=o(21),i=o(40)("toStringTag"),l=Object,a="Arguments"==r(function(){return arguments}());e.exports=s?r:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=l(e),i))?o:a?r(t):"Object"==(s=r(t))&&n(t.callee)?"Arguments":s}},(e,t,o)=>{var s={};s[o(40)("toStringTag")]="z",e.exports="[object z]"===String(s)},(e,t,o)=>{var s=o(26),n=o(50);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},(e,t,o)=>{var s=o(50),n=o(92),r=o(93),i=Error.captureStackTrace;e.exports=function(e,t,o,l){r&&(i?i(e,t):s(e,"stack",n(o,l)))}},(e,t,o)=>{var s=o(20),n=Error,r=s("".replace),i=String(n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(i);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=r(e,l,"");return e}},(e,t,o)=>{var s=o(13),n=o(17);e.exports=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},(e,t,o)=>{o(95),o(104)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==r},{clearImmediate:r})},(e,t,o)=>{var s,n,r,i,l=o(10),a=o(79),h=o(97),c=o(27),d=o(45),u=o(13),g=o(99),f=o(100),p=o(49),m=o(101),C=o(102),w=o(103),y=l.setImmediate,v=l.clearImmediate,S=l.process,E=l.Dispatch,R=l.Function,b=l.MessageChannel,T=l.String,_=0,M={},O="onreadystatechange";u((function(){s=l.location}));var I=function(e){if(d(M,e)){var t=M[e];delete M[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(T(e),s.protocol+"//"+s.host)};y&&v||(y=function(e){m(arguments.length,1);var t=c(e)?e:R(e),o=f(arguments,1);return M[++_]=function(){a(t,void 0,o)},n(_),_},v=function(e){delete M[e]},w?n=function(e){S.nextTick(N(e))}:E&&E.now?n=function(e){E.now(N(e))}:b&&!C?(i=(r=new b).port2,r.port1.onmessage=A,n=h(i.postMessage,i)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!u(P)?(n=P,l.addEventListener("message",A,!1)):n=O in p("script")?function(e){g.appendChild(p("script"))[O]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:y,clear:v}},(e,t,o)=>{var s=o(98),n=o(37),r=o(15),i=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:r?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,o)=>{var s=o(21),n=o(20);e.exports=function(e){if("Function"===s(e))return n(e)}},(e,t,o)=>{var s=o(30);e.exports=s("document","documentElement")},(e,t,o)=>{var s=o(20);e.exports=s([].slice)},e=>{var t=TypeError;e.exports=function(e,o){if(e<o)throw t("Not enough arguments");return e}},(e,t,o)=>{var s=o(35);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},(e,t,o)=>{var s=o(21);e.exports="undefined"!=typeof process&&"process"==s(process)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).set,i=o(105),l=n.setImmediate?i(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})},(e,t,o)=>{"use strict";var s,n=o(10),r=o(79),i=o(27),l=o(106),a=o(35),h=o(100),c=o(101),d=n.Function,u=/MSIE .\./.test(a)||l&&((s=n.Bun.version.split(".")).length<3||0==s[0]&&(s[1]<3||3==s[1]&&0==s[2]));e.exports=function(e,t){var o=t?2:1;return u?function(s,n){var l=c(arguments.length,1)>o,a=i(s)?s:d(s),u=l?h(arguments,o):[],g=l?function(){r(a,this,u)}:a;return t?e(g,n):e(g)}:e}},e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===g&&(g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return g},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=u(e,o);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=d,t.getWindowScrollTop=c,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(8),o(78);var s=o(108);function n(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.equalsIgnoreCase=function(){const e=[];for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];let n=o.length;for(;n;){n-=1;const t=(0,r.stringify)(o[n]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.sanitize=i,t.stripTags=function(e){return i(`${e}`,{ALLOWED_TAGS:[]})},t.substitute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,((e,o)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[o]?"":t[o]))},t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},o(8);var n=s(o(109)),r=o(110);function i(e,t){return n.default.sanitize(e,t)}},t=>{"use strict";t.exports=e},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="0.0.0-next-be16baf-20230809";let i,y="invalid",v="invalid";const S=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(c(`${c(h(t)+(h(d(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=d(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||S)if(S){const t=(0,n.default)("22/06/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(111)),r=o(112);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),c=e=>parseInt(e,10),d=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(d(g(e),h("12"),u("F")))/(h(d(g(e),u("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const C={invalid:()=>r.toSingleLine`
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var n=[,e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(3),o(4),o(5),o(6);var n=s(o(7)),r=o(216),i=o(260),l=s(o(123)),a=o(238),h=o(267),c=o(331),d=o(335),u=o(145);function g(e,t){const o=new n.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=u.CellCoords,t.CellRange=u.CellRange,(0,h.registerCellType)(c.TextCellType),g.editors={BaseEditor:d.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new n.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,i.metaSchemaFactory)(),g.hooks=l.default.getSingleton(),g.CellCoords=u.CellCoords,g.CellRange=u.CellRange,g.packageName="handsontable",g.buildDate="09/08/2023 12:56:04",g.version="0.0.0-next-08765b9-20230809",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};var f=g;t.default=f},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.default=function(e,t){var o,s=this;let L=arguments.length>2&&void 0!==arguments[2]&&arguments[2],k=!1,F=this;const V=new h.default(F);let W,B,U,j,Y=!0;(0,R.hasValidParameter)(L)&&(0,R.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const G=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",z=["rtl","ltr"].includes(G)?G:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",z),this.isRtl=function(){return"rtl"===z},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,_.getValidLanguageCode)(t.language);const K=new I.MetaManager(F,t,[I.DynamicCellMetaMod,I.ExtendMetaPropertiesMod]),$=K.getTableMeta(),X=K.getGlobalMeta(),q=(0,A.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,R.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,D.set(this.guid,this),this.columnIndexMapper=new E.IndexMapper,this.rowIndexMapper=new E.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),B=new v.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const Q=e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?F.columnIndexMapper.getRenderableFromVisualIndex(o):o)};let J=new O.Selection($,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>W.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,o)=>F._createCellRange(e,t,o),visualToRenderableCoords:Q,renderableToVisualCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?F.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>F.getCellMeta(e,t).disableVisualSelection});this.selection=J;const Z=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function ee(e){const t=(0,M.normalizeLanguageCode)(e);(0,_.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),X.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function te(e,t){const o="className"===e?F.rootElement:F.table;if(Y)(0,n.addClass)(o,t);else{let s=[],r=[];X[e]&&(s=Array.isArray(X[e])?X[e]:(0,d.stringToArray)(X[e])),t&&(r=Array.isArray(t)?t:(0,d.stringToArray)(t));const i=(0,d.getDifferenceOfArrays)(s,r),l=(0,d.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}X[e]=t}function oe(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ne(e,t,o){if(!e.length)return;const s=F.getActiveEditor(),r=new oe;let i=!0;r.onQueueEmpty=e=>{s&&i&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,l,,a]=e[o],h=W.propToCol(l),c=F.getCellMeta(s,h);"numeric"===c.type&&"string"==typeof a&&(0,w.isNumericLike)(a)&&(e[o][3]=se(a)),F.getCellValidator(c)&&(r.addValidatorToQueue(),F.validateCell(e[o][3],c,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){i=!1,e.splice(t,1),o.valid=!0;const s=F.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,$.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,c),t))}r.checkIfQueueIsEmpty()}function re(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if($.allowInsertRow)for(;e[o][0]>F.countRows()-1;){const{delta:e}=W.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===F.dataType&&(!$.columns||0===$.columns.length)&&$.allowInsertColumn)for(;W.propToCol(e[o][1])>F.countCols()-1;){const{delta:e}=W.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||W.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}F.forceFullRender=!0,U.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),j.lockEditor(),F._refreshBorders(null),j.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const s=F.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function ie(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function le(e,t){const o=F.getActiveEditor(),s=F.runHooks("beforeChange",e,t||"edit"),n=e.filter((e=>null!==e));return!1===s||0===n.length?(o&&o.cancelChanges(),[]):n}this.columnIndexMapper.addLocalHook("cacheUpdated",Z),this.rowIndexMapper.addLocalHook("cacheUpdated",Z),this.selection.addLocalHook("beforeSetRangeStart",(e=>{this.runHooks("beforeSetRangeStart",e)})),this.selection.addLocalHook("beforeSetRangeStartOnly",(e=>{this.runHooks("beforeSetRangeStartOnly",e)})),this.selection.addLocalHook("beforeSetRangeEnd",(e=>{this.runHooks("beforeSetRangeEnd",e)})),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,c.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),i=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,i),this.runHooks("afterSelectionByProp",s.row,F.colToProp(s.col),r.row,F.colToProp(r.col),t,i);const l=this.selection.isSelectedByAnyHeader(),a=this.selection.selectedRange.current();let h=!0;k&&(h=!1),t.isTouched()&&(h=!t.value);const d=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();if(!1!==h)if(l)d?this.view.scrollViewportVertically(F.rowIndexMapper.getRenderableFromVisualIndex(e.row)):u&&this.view.scrollViewportHorizontally(F.columnIndexMapper.getRenderableFromVisualIndex(e.col));else if(a&&!this.selection.isMultiple()){const e=Q(a.from);e.row<0&&e.col>=0?this.view.scrollViewportHorizontally(e.col):e.col<0&&e.row>=0?this.view.scrollViewportVertically(e.row):this.view.scrollViewport(e)}else this.view.scrollViewport(Q(e));d&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?((0,n.removeClass)(this.rootElement,"ht__selection--columns"),(0,n.addClass)(this.rootElement,"ht__selection--rows")):u?((0,n.removeClass)(this.rootElement,"ht__selection--rows"),(0,n.addClass)(this.rootElement,"ht__selection--columns")):(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,F.colToProp(o.col),s.row,F.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})),this.selection.addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})),this.selection.addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})),this.selection.addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})),this.selection.addLocalHook("beforeModifyTransformStart",(e=>{this.runHooks("modifyTransformStart",e)})),this.selection.addLocalHook("afterModifyTransformStart",((e,t,o)=>{this.runHooks("afterModifyTransformStart",e,t,o)})),this.selection.addLocalHook("beforeModifyTransformEnd",(e=>{this.runHooks("modifyTransformEnd",e)})),this.selection.addLocalHook("afterModifyTransformEnd",((e,t,o)=>{this.runHooks("afterModifyTransformEnd",e,t,o)})),this.selection.addLocalHook("afterDeselect",(()=>{j.destroyEditor(),this._refreshBorders(),(0,n.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("insertRowRequire",(e=>{this.alter("insert_row_above",e,1,"auto")})),this.selection.addLocalHook("insertColRequire",(e=>{this.alter("insert_col_start",e,1,"auto")})),U={alter(e,t){var o,s;let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,l=arguments.length>4?arguments[4]:void 0;const a=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[o,s]=t;const n=e[e.length-1],[r,i]=n,l=r+i;if(o<=l){const e=Math.max(s-(l-o),0);n[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const l=F.countSourceRows();if($.maxRows===l)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?l:0;const{delta:c,startPhysicalIndex:u}=W.createRow(t,n,{source:r,mode:h});if(c){const e=J.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=F.toVisualRow(u);if(J.isSelectedByCorner())F.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;J.isSelectedByRowHeader()&&(r=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(o+c,r),!0),J.setRangeEnd(F._createCellCoords(s+c,n))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?F.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=W.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray($.colHeaders)){const e=[F.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply($.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=F.toVisualColumn(p);if(J.isSelectedByCorner())F.selectAll();else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;J.isSelectedByColumnHeader()&&(r=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(r,o+f),!0),J.setRangeEnd(F._createCellCoords(s,n+f))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?F.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeRow(o,s,r))return;const l=F.countRows(),a=$.fixedRowsTop;a>=n+1&&($.fixedRowsTop-=Math.min(s,a-n));const h=$.fixedRowsBottom;h&&n>=l-h&&($.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),U.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?F.countCols()-1:Math.max(o-t,0);let l=F.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!W.removeCol(o,s,r))return;const a=$.fixedColumnsStart;a>=n+1&&($.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray($.colHeaders)&&(void 0===l&&(l=-1),$.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),U.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||U.adjustRowsAndCols()},adjustRowsAndCols(){const e=$.minRows,t=$.minSpareRows,o=$.minCols,s=$.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&J.deselect(),e){const t=F.countRows();t<e&&W.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,$.maxRows-F.countSourceRows());W.createRow(F.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(o&&!$.columns&&t<o){const s=o-t;e+=s,W.createCol(t,s,{source:"auto"})}if(s&&!$.columns&&"array"===F.dataType&&e<s){t=F.countCols();const o=s-e,n=Math.min(o,$.maxCols-t);W.createCol(t,n,{source:"auto"})}}if(J.isSelected()){const e=F.countRows(),t=F.countCols();(0,d.arrayEach)(J.selectedRange,(o=>{let s=!1,n=o.from.row,r=o.from.col,i=o.to.row,l=o.to.col;n>e-1?(n=e-1,s=!0,i>n&&(i=n)):i>e-1&&(i=e-1,s=!0,n>i&&(n=i)),r>t-1?(r=t-1,s=!0,l>r&&(l=r)):l>t-1&&(l=t-1,s=!0,r>l&&(r=l)),s&&F.selectCell(n,r,i,l)}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],u={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,c.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,d.pivot)(t),w=n.length,y=Math.max(w,m),v=F.getData().slice(f),S=(0,d.pivot)(v).slice(p,p+y);for(l=0;l<y;l+=1)if(l<w){for(r=0,i=n[l].length;r<C-i;r+=1)n[l].push(n[l][r%i]);l<S.length?g.push(n[l].concat(S[l])):g.push(n[l].concat(new Array(v.length).fill(null)))}else g.push(n[l%w].concat(S[l]));F.populateFromArray(f,p,(0,d.pivot)(g));break;case"shift_right":const E=t.length,R=Math.max(E,C),b=F.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<E){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(b[r]));F.populateFromArray(f,p,t);break;default:u.row=e.row,u.col=e.col;let T,_=0,M=0,O=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(i=o?A:Math.max(N,A),r=0;r<i&&!(o&&u.row>o.row&&A>N||!$.allowInsertRow&&u.row>F.countRows()-1||u.row>=$.maxRows);r++){const t=r-_,n=I(t).length,d=o?o.col-e.col+1:0;if(a=o?d:Math.max(n,d),u.col=e.col,T=F.getCellMeta(u.row,u.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!T.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&u.col>o.col&&d>n||!$.allowInsertColumn&&u.col>F.countCols()-1||u.col>=$.maxCols);l++){if(T=F.getCellMeta(u.row,u.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&T.skipColumnOnPaste){M+=1,u.col+=1,a+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==s){u.col+=1;continue}let e=I(t,l-M),o=F.getDataAtCell(u.row,u.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)O=!1;else{const t=(0,c.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,c.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,c.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,c.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([u.row,u.col,e]),O=!0,u.col+=1}u.row+=1}else _+=1,u.row+=1,i+=1}F.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){B.setData($.data),F.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(F.rootElement,"mobile"),this.updateSettings($,!0),this.view=new y.default(this),j=a.default.getInstance(F,$,J),(0,R.isRootInstance)(this)&&(0,N.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),Y&&null===F.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof Y&&(F.runHooks("afterChange",Y[0],Y[1]),Y=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return F.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=F.getCellValidator(t);function l(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,n=t.visualRow,r=F.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(n),t=F.columnIndexMapper.getRenderableFromVisualIndex(s);F.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var a;(0,i.isRegExp)(n)&&(a=n,n=function(e,t){t(a.test(e))}),(0,r.isFunction)(n)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,s),F._registerImmediate((()=>{n.call(t,e,(o=>{F&&(o=F.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),F.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):F._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=ie(e,t,o),r=[];let i,l,a,h=s;for(i=0,l=n.length;i<l;i++){if("object"!=typeof n[i])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof n[i][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");a=n[i][1]>=this.countCols()?n[i][1]:W.colToProp(n[i][1]),r.push([n[i][0],a,B.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const c=le(r,s);F.runHooks("afterSetDataAtCell",c,h),ne(c,h,(()=>{re(c,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=ie(e,t,o),r=[];let i,l,a=s;for(i=0,l=n.length;i<l;i++)r.push([n[i][0],n[i][1],B.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=le(r,s);F.runHooks("afterSetDataAtRowProp",h,a),ne(h,a,(()=>{re(h,a)}))},this.listen=function(){F&&!F.isListening()&&(D.forEach((e=>{F!==e&&e.unlisten()})),H=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(H=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return H===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,n,r,i){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const l="number"==typeof s?F._createCellCoords(s,n):null;return U.populateFromArray(F._createCellCoords(e,t),o,l,r,i)},this.spliceCol=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return W.spliceCol(e,t,o,...n)},this.spliceRow=function(e,t,o){for(var s=arguments.length,n=new Array(s>3?s-3:0),r=3;r<s;r++)n[r-3]=arguments[r];return W.spliceRow(e,t,o,...n)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,w.rangeEach)(o.row,s.row,(e=>{(0,w.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(j.lockEditor(),this._refreshBorders(null),j.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:o,height:s}=F.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(o,s),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,I.replaceData)(e,(e=>{W=e}),(e=>{W=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),U.adjustRowsAndCols()}),{hotInstance:F,dataMap:W,dataSource:B,internalSource:"updateData",source:t,metaManager:K,firstRun:Y})},this.loadData=function(e,t){(0,I.replaceData)(e,(e=>{W=e}),(()=>{K.clearCellsCache(),F.initIndexMappers(),U.adjustRowsAndCols(),Y&&(Y=[null,"loadData"])}),{hotInstance:F,dataMap:W,dataSource:B,internalSource:"loadData",source:t,metaManager:K,firstRun:Y})},this.getInitialColumnCount=function(){const e=$.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===F.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=W.colToPropCache.length);else if((0,i.isDefined)($.dataSchema)){const e=W.getSchema();t=Array.isArray(e)?e.length:(0,c.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,i.isUndefined)(e)?W.getAll():W.getRange(F._createCellCoords(e,t),F._createCellCoords(o,s),W.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return W.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(o,s))},this.getCopyableData=function(e,t){return W.getCopyable(e,W.colToProp(t))},this.getSchema=function(){return W.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(Y?F.loadData:F.updateData).bind(this);let s,n,l=!1;if((0,i.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?ee(e.language):"className"===s?te("className",e.className):"tableClassName"===s&&F.table?(te("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,F.addHook(s,e[s])):!t&&(0,c.hasOwnProperty)(e,s)&&(X[s]=e[s]));void 0===e.data&&void 0===$.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(W.createMap(),F.initIndexMappers());const a=F.countCols(),h=$.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||K.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&K.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,c.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let d=F.rootElement.style.height;""!==d&&(d=parseInt(F.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===u){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==u&&(F.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),U.adjustRowsAndCols(),F.view&&!Y&&(F.forceFullRender=!0,j.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!F.view||""!==d&&""!==u&&void 0!==u||d===u||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if($.getValue){if((0,r.isFunction)($.getValue))return $.getValue.call(F);if(e)return F.getData()[e[0][0]][$.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return $},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){U.alter(e,t,o,s,n)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,n=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;n=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===n||null===s?null:F.view.getCellAtCoords(F._createCellCoords(n,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let n=o,r=s;return o>=0&&(n=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),F._createCellCoords(n,r)},this.colToProp=function(e){return W.colToProp(e)},this.propToCol=function(e){return W.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return W.get(e,W.colToProp(t))},this.getDataAtRowProp=function(e,t){return W.get(e,t)},this.getDataAtCol=function(e){const t=[],o=W.getRange(F._createCellCoords(0,e),F._createCellCoords($.data.length-1,e),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=W.getRange(F._createCellCoords(0,W.propToCol(e)),F._createCellCoords($.data.length-1,W.propToCol(e)),W.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let n;return n=void 0===e?B.getData():B.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?B.getData(!0):B.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=ie(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,B.getAtCell(t,o),s])})),(0,d.arrayEach)(n,(e=>{let[t,o,s]=e;B.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=F.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return W.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),W.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const n=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,i]=n;let[,,l,a]=n,h=null,c=null;void 0===l&&(l=r),void 0===a&&(a=i);let d="mixed";return(0,w.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,w.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return c=s.type,h?t=h===c:h=c,t})),d=t?c:"mixed",t})),d},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=K.getCellMetaKeyValue(s,n,o);!1!==F.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(K.removeCellMeta(s,n,o),F.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),n=2;n<o;n++)s[n-2]=arguments[n];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&K.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,d.arrayEach)(s.reverse(),(t=>{K.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),F.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,c.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===F.runHooks("beforeSetCellMeta",e,t,o,s))return;let n=e,r=t;e<this.countRows()&&(n=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),K.setCellMeta(n,r,o,s),F.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return K.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),K.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return K.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||$.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,f.getRenderer)(o):(0,i.isUndefined)(o)?(0,f.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,p.getEditor)(o):(0,i.isUndefined)(o)?(0,p.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,m.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new oe;e&&(s.onQueueEmpty=e);let n=F.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),F.validateCell(F.getDataAtCell(n,e),F.getCellMeta(n,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;n-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=$.rowHeaders,o=e;return void 0!==o&&(o=F.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,w.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!$.rowHeaders},this.hasColHeaders=function(){if(void 0!==$.colHeaders&&null!==$.colHeaders)return!!$.colHeaders;for(let e=0,t=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=F.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=F.countCols();for(let o=0;o<t;o++)e.push(F.getColHeader(o));return e}let s=$.colHeaders;const n=F.toPhysicalColumn(o),i=function(e){const t=[],o=F.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)($.columns)&&$.columns(s)&&t.push(s);return t[e]}(n);return!1===$.colHeaders?s=null:$.columns&&(0,r.isFunction)($.columns)&&$.columns(i)&&$.columns(i).title?s=$.columns(i).title:$.columns&&$.columns[n]&&$.columns[n].title?s=$.columns[n].title:Array.isArray($.colHeaders)&&void 0!==$.colHeaders[n]?s=$.colHeaders[n]:(0,r.isFunction)($.colHeaders)?s=$.colHeaders(n):$.colHeaders&&"string"!=typeof $.colHeaders&&"number"!=typeof $.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=F.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.getCellMeta(0,e).width}if(void 0!==t&&t!==$.width||(t=$.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=$.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return W.getLength()},this.countCols=function(){const e=$.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(F.countRows()-1,(o=>{if(F.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,w.rangeEachReverse)(F.countCols()-1,(o=>{if(F.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return $.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return $.isEmptyCol.call(F,e)},this.selectCell=function(e,t,o,s){let n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.isUndefined)(e)&&!(0,i.isUndefined)(t)&&this.selectCells([[e,t,o,s]],n,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(k=!0);const o=J.selectCells(e);return o&&t&&F.listen(),k=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return J.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return J.selectRows(e,t,o)},this.deselectCell=function(){J.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;k=!0,J.selectAll(e,t,o),k=!1};const ae=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const n=!o,r=!s;let i=e,l=t;if(!(arguments.length>4&&void 0!==arguments[4])||arguments[4]){const o=Number.isInteger(e),s=Number.isInteger(t),n=o?ae(this.rowIndexMapper,e):void 0,r=s?ae(this.columnIndexMapper,t):void 0;if(null===n||null===r)return!1;i=o?F.rowIndexMapper.getRenderableFromVisualIndex(n):void 0,l=s?F.columnIndexMapper.getRenderableFromVisualIndex(r):void 0}const a=Number.isInteger(i),h=Number.isInteger(l);return a&&h?F.view.scrollViewport(F._createCellCoords(i,l),n,s,o,r):a&&!1===h?F.view.scrollViewportVertically(i,n,o):!(!h||!1!==a)&&F.view.scrollViewportHorizontally(l,s,r)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),o=this.rowIndexMapper.getRenderableFromVisualIndex(t.row),s=this.columnIndexMapper.getRenderableFromVisualIndex(t.col);this.view.scrollViewport(this._createCellCoords(o,s))?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),K.clearCache(),D.delete(this.guid),(0,R.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(F.rootElement),V.destroy(),j&&j.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),q.getItems().forEach((e=>{let[,t]=e;t.destroy()})),q.clear(),F.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(F),(0,c.objectEach)(F,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),F.isDestroyed=!0,W&&W.destroy(),W=null,U=null,J=null,j=null,F=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:q.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:q.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){T.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return T.default.getSingleton().has(e,F)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(F,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,_.getTranslatedPhrase)($.language,e,t)},this.toHTML=()=>(0,u.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,u.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.destroyEditor(e),F.view.render(),t&&J.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const he=(0,P.createShortcutManager)({handleEvent(e){const t=F.isListening(),o=void 0!==(null==e?void 0:e.key);return t&&o},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},(0,g.getPluginsNames)().forEach((e=>{const t=(0,g.getPlugin)(e);q.addItem(e,new t(this))})),(0,x.registerAllShortcutContexts)(F),he.setActiveContextName("grid"),T.default.getSingleton().run(F,"construct")},o(8),o(78),o(94);var n=o(107),r=o(114),i=o(110),l=o(115),a=s(o(119)),h=s(o(126)),c=o(116),d=o(113),u=o(127),g=o(128),f=o(133),p=o(122),m=o(134),C=o(108),w=o(130),y=s(o(135)),v=s(o(217)),S=o(218),E=o(219),R=o(216),b=o(145),T=s(o(123)),_=o(238),M=o(239),O=o(244),I=o(260),N=o(276),A=o(131),P=o(325),x=o(278);let H=null;const D=new Map;new Set},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(75),l=o(77);s({target:"Array",proto:!0,arity:1,forced:o(13)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=n(this),o=r(t),s=arguments.length;l(o+s);for(var a=0;a<s;a++)t[o]=arguments[a],o++;return i(t,o),o}})},(e,t,o)=>{var s=o(10),n=o(11).f,r=o(50),i=o(54),l=o(44),a=o(62),h=o(74);e.exports=function(e,t){var o,c,d,u,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||l(f,{}):(s[f]||{}).prototype)for(c in t){if(u=t[c],d=e.dontCallGetSet?(g=n(o,c))&&g.value:o[c],!h(p?c:f+(m?".":"#")+c,e.forced)&&void 0!==d){if(typeof u==typeof d)continue;a(u,d)}(e.sham||d&&d.sham)&&r(u,"sham",!0),i(o,c,u,e)}}},function(e){var t=function(e){return e&&e.Math==Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},(e,t,o)=>{var s=o(12),n=o(14),r=o(16),i=o(17),l=o(18),a=o(24),h=o(45),c=o(48),d=Object.getOwnPropertyDescriptor;t.f=s?d:function(e,t){if(e=l(e),t=a(t),c)try{return d(e,t)}catch(e){}if(h(e,t))return i(!n(r.f,e,t),e[t])}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},(e,t,o)=>{var s=o(15),n=Function.prototype.call;e.exports=s?n.bind(n):function(){return n.apply(n,arguments)}},(e,t,o)=>{var s=o(13);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,n=s&&!o.call({1:2},1);t.f=n?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},(e,t,o)=>{var s=o(19),n=o(22);e.exports=function(e){return s(n(e))}},(e,t,o)=>{var s=o(20),n=o(13),r=o(21),i=Object,l=s("".split);e.exports=n((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"==r(e)?l(e,""):i(e)}:i},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.call,i=s&&n.bind.bind(r,r);e.exports=s?i:function(e){return function(){return r.apply(e,arguments)}}},(e,t,o)=>{var s=o(20),n=s({}.toString),r=s("".slice);e.exports=function(e){return r(n(e),8,-1)}},(e,t,o)=>{var s=o(23),n=TypeError;e.exports=function(e){if(s(e))throw n("Can't call method on "+e);return e}},e=>{e.exports=function(e){return null==e}},(e,t,o)=>{var s=o(25),n=o(29);e.exports=function(e){var t=s(e,"string");return n(t)?t:t+""}},(e,t,o)=>{var s=o(14),n=o(26),r=o(29),i=o(36),l=o(39),a=o(40),h=TypeError,c=a("toPrimitive");e.exports=function(e,t){if(!n(e)||r(e))return e;var o,a=i(e,c);if(a){if(void 0===t&&(t="default"),o=s(a,e,t),!n(o)||r(o))return o;throw h("Can't convert object to primitive value")}return void 0===t&&(t="number"),l(e,t)}},(e,t,o)=>{var s=o(27),n=o(28),r=n.all;e.exports=n.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:s(e)||e===r}:function(e){return"object"==typeof e?null!==e:s(e)}},(e,t,o)=>{var s=o(28),n=s.all;e.exports=s.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},e=>{var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},(e,t,o)=>{var s=o(30),n=o(27),r=o(31),i=o(32),l=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return n(t)&&r(t.prototype,l(e))}},(e,t,o)=>{var s=o(10),n=o(27);e.exports=function(e,t){return arguments.length<2?(o=s[e],n(o)?o:void 0):s[e]&&s[e][t];var o}},(e,t,o)=>{var s=o(20);e.exports=s({}.isPrototypeOf)},(e,t,o)=>{var s=o(33);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},(e,t,o)=>{var s=o(34),n=o(13),r=o(10).String;e.exports=!!Object.getOwnPropertySymbols&&!n((function(){var e=Symbol();return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},(e,t,o)=>{var s,n,r=o(10),i=o(35),l=r.process,a=r.Deno,h=l&&l.versions||a&&a.version,c=h&&h.v8;c&&(n=(s=c.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!n&&i&&(!(s=i.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=i.match(/Chrome\/(\d+)/))&&(n=+s[1]),e.exports=n},e=>{e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},(e,t,o)=>{var s=o(37),n=o(23);e.exports=function(e,t){var o=e[t];return n(o)?void 0:s(o)}},(e,t,o)=>{var s=o(27),n=o(38),r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not a function")}},e=>{var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},(e,t,o)=>{var s=o(14),n=o(27),r=o(26),i=TypeError;e.exports=function(e,t){var o,l;if("string"===t&&n(o=e.toString)&&!r(l=s(o,e)))return l;if(n(o=e.valueOf)&&!r(l=s(o,e)))return l;if("string"!==t&&n(o=e.toString)&&!r(l=s(o,e)))return l;throw i("Can't convert object to primitive value")}},(e,t,o)=>{var s=o(10),n=o(41),r=o(45),i=o(47),l=o(33),a=o(32),h=s.Symbol,c=n("wks"),d=a?h.for||h:h&&h.withoutSetter||i;e.exports=function(e){return r(c,e)||(c[e]=l&&r(h,e)?h[e]:d("Symbol."+e)),c[e]}},(e,t,o)=>{var s=o(42),n=o(43);(e.exports=function(e,t){return n[e]||(n[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"})},e=>{e.exports=!1},(e,t,o)=>{var s=o(10),n=o(44),r="__core-js_shared__",i=s[r]||n(r,{});e.exports=i},(e,t,o)=>{var s=o(10),n=Object.defineProperty;e.exports=function(e,t){try{n(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},(e,t,o)=>{var s=o(20),n=o(46),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(n(e),t)}},(e,t,o)=>{var s=o(22),n=Object;e.exports=function(e){return n(s(e))}},(e,t,o)=>{var s=o(20),n=0,r=Math.random(),i=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++n+r,36)}},(e,t,o)=>{var s=o(12),n=o(13),r=o(49);e.exports=!s&&!n((function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},(e,t,o)=>{var s=o(10),n=o(26),r=s.document,i=n(r)&&n(r.createElement);e.exports=function(e){return i?r.createElement(e):{}}},(e,t,o)=>{var s=o(12),n=o(51),r=o(17);e.exports=s?function(e,t,o){return n.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},(e,t,o)=>{var s=o(12),n=o(48),r=o(52),i=o(53),l=o(24),a=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,d="enumerable",u="configurable",g="writable";t.f=s?r?function(e,t,o){if(i(e),t=l(t),i(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=c(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:u in o?o[u]:s[u],enumerable:d in o?o[d]:s[d],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(i(e),t=l(t),i(o),n)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw a("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},(e,t,o)=>{var s=o(12),n=o(13);e.exports=s&&n((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},(e,t,o)=>{var s=o(26),n=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw r(n(e)+" is not an object")}},(e,t,o)=>{var s=o(27),n=o(51),r=o(55),i=o(44);e.exports=function(e,t,o,l){l||(l={});var a=l.enumerable,h=void 0!==l.name?l.name:t;if(s(o)&&r(o,h,l),l.global)a?e[t]=o:i(t,o);else{try{l.unsafe?e[t]&&(a=!0):delete e[t]}catch(e){}a?e[t]=o:n.f(e,t,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return e}},(e,t,o)=>{var s=o(20),n=o(13),r=o(27),i=o(45),l=o(12),a=o(56).CONFIGURABLE,h=o(57),c=o(58),d=c.enforce,u=c.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),C=s([].join),w=l&&!n((function(){return 8!==f((function(){}),"length",{value:8}).length})),y=String(String).split("String"),v=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!i(e,"name")||a&&e.name!==t)&&(l?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&o&&i(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&i(o,"constructor")&&o.constructor?l&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=d(e);return i(s,"source")||(s.source=C(y,"string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return r(this)&&u(this).source||h(this)}),"toString")},(e,t,o)=>{var s=o(12),n=o(45),r=Function.prototype,i=s&&Object.getOwnPropertyDescriptor,l=n(r,"name"),a=l&&"something"===function(){}.name,h=l&&(!s||s&&i(r,"name").configurable);e.exports={EXISTS:l,PROPER:a,CONFIGURABLE:h}},(e,t,o)=>{var s=o(20),n=o(27),r=o(43),i=s(Function.toString);n(r.inspectSource)||(r.inspectSource=function(e){return i(e)}),e.exports=r.inspectSource},(e,t,o)=>{var s,n,r,i=o(59),l=o(10),a=o(26),h=o(50),c=o(45),d=o(43),u=o(60),g=o(61),f="Object already initialized",p=l.TypeError,m=l.WeakMap;if(i||d.state){var C=d.state||(d.state=new m);C.get=C.get,C.has=C.has,C.set=C.set,s=function(e,t){if(C.has(e))throw p(f);return t.facade=e,C.set(e,t),t},n=function(e){return C.get(e)||{}},r=function(e){return C.has(e)}}else{var w=u("state");g[w]=!0,s=function(e,t){if(c(e,w))throw p(f);return t.facade=e,h(e,w,t),t},n=function(e){return c(e,w)?e[w]:{}},r=function(e){return c(e,w)}}e.exports={set:s,get:n,has:r,enforce:function(e){return r(e)?n(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!a(t)||(o=n(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return o}}}},(e,t,o)=>{var s=o(10),n=o(27),r=s.WeakMap;e.exports=n(r)&&/native code/.test(String(r))},(e,t,o)=>{var s=o(41),n=o(47),r=s("keys");e.exports=function(e){return r[e]||(r[e]=n(e))}},e=>{e.exports={}},(e,t,o)=>{var s=o(45),n=o(63),r=o(11),i=o(51);e.exports=function(e,t,o){for(var l=n(t),a=i.f,h=r.f,c=0;c<l.length;c++){var d=l[c];s(e,d)||o&&s(o,d)||a(e,d,h(t,d))}}},(e,t,o)=>{var s=o(30),n=o(20),r=o(64),i=o(73),l=o(53),a=n([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(l(e)),o=i.f;return o?a(t,o(e)):t}},(e,t,o)=>{var s=o(65),n=o(72).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,n)}},(e,t,o)=>{var s=o(20),n=o(45),r=o(18),i=o(66).indexOf,l=o(61),a=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,c=[];for(o in s)!n(l,o)&&n(s,o)&&a(c,o);for(;t.length>h;)n(s,o=t[h++])&&(~i(c,o)||a(c,o));return c}},(e,t,o)=>{var s=o(18),n=o(67),r=o(70),i=function(e){return function(t,o,i){var l,a=s(t),h=r(a),c=n(i,h);if(e&&o!=o){for(;h>c;)if((l=a[c++])!=l)return!0}else for(;h>c;c++)if((e||c in a)&&a[c]===o)return e||c||0;return!e&&-1}};e.exports={includes:i(!0),indexOf:i(!1)}},(e,t,o)=>{var s=o(68),n=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?n(o+t,0):r(o,t)}},(e,t,o)=>{var s=o(69);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},e=>{var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},(e,t,o)=>{var s=o(71);e.exports=function(e){return s(e.length)}},(e,t,o)=>{var s=o(68),n=Math.min;e.exports=function(e){return e>0?n(s(e),9007199254740991):0}},e=>{e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},(e,t)=>{t.f=Object.getOwnPropertySymbols},(e,t,o)=>{var s=o(13),n=o(27),r=/#|\.prototype\./,i=function(e,t){var o=a[l(e)];return o==c||o!=h&&(n(t)?s(t):!!t)},l=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},a=i.data={},h=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},(e,t,o)=>{"use strict";var s=o(12),n=o(76),r=TypeError,i=Object.getOwnPropertyDescriptor,l=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=l?function(e,t){if(n(e)&&!i(e,"length").writable)throw r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},(e,t,o)=>{var s=o(21);e.exports=Array.isArray||function(e){return"Array"==s(e)}},e=>{var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},(e,t,o)=>{var s=o(9),n=o(10),r=o(79),i=o(80),l="WebAssembly",a=n[l],h=7!==Error("e",{cause:7}).cause,c=function(e,t){var o={};o[e]=i(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},d=function(e,t){if(a&&a[e]){var o={};o[e]=i(l+"."+e,t,h),s({target:l,stat:!0,constructor:!0,arity:1,forced:h},o)}};c("Error",(function(e){return function(t){return r(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),c("URIError",(function(e){return function(t){return r(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},(e,t,o)=>{var s=o(15),n=Function.prototype,r=n.apply,i=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?i.bind(r):function(){return i.apply(r,arguments)})},(e,t,o)=>{"use strict";var s=o(30),n=o(45),r=o(50),i=o(31),l=o(81),a=o(62),h=o(84),c=o(85),d=o(86),u=o(90),g=o(91),f=o(12),p=o(42);e.exports=function(e,t,o,m){var C="stackTraceLimit",w=m?2:1,y=e.split("."),v=y[y.length-1],S=s.apply(null,y);if(S){var E=S.prototype;if(!p&&n(E,"cause")&&delete E.cause,!o)return S;var R=s("Error"),b=t((function(e,t){var o=d(m?t:e,void 0),s=m?new S(e):new S;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&i(E,this)&&c(s,this,b),arguments.length>w&&u(s,arguments[w]),s}));if(b.prototype=E,"Error"!==v?l?l(b,R):a(b,R,{name:!0}):f&&C in S&&(h(b,S,C),h(b,S,"prepareStackTrace")),a(b,S),!p)try{E.name!==v&&r(E,"name",v),E.constructor=b}catch(e){}return b}}},(e,t,o)=>{var s=o(82),n=o(53),r=o(83);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return n(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},(e,t,o)=>{var s=o(20),n=o(37);e.exports=function(e,t,o){try{return s(n(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},(e,t,o)=>{var s=o(27),n=String,r=TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw r("Can't set "+n(e)+" as a prototype")}},(e,t,o)=>{var s=o(51).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},(e,t,o)=>{var s=o(27),n=o(26),r=o(81);e.exports=function(e,t,o){var i,l;return r&&s(i=t.constructor)&&i!==o&&n(l=i.prototype)&&l!==o.prototype&&r(e,l),e}},(e,t,o)=>{var s=o(87);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},(e,t,o)=>{var s=o(88),n=String;e.exports=function(e){if("Symbol"===s(e))throw TypeError("Cannot convert a Symbol value to a string");return n(e)}},(e,t,o)=>{var s=o(89),n=o(27),r=o(21),i=o(40)("toStringTag"),l=Object,a="Arguments"==r(function(){return arguments}());e.exports=s?r:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=l(e),i))?o:a?r(t):"Object"==(s=r(t))&&n(t.callee)?"Arguments":s}},(e,t,o)=>{var s={};s[o(40)("toStringTag")]="z",e.exports="[object z]"===String(s)},(e,t,o)=>{var s=o(26),n=o(50);e.exports=function(e,t){s(t)&&"cause"in t&&n(e,"cause",t.cause)}},(e,t,o)=>{var s=o(50),n=o(92),r=o(93),i=Error.captureStackTrace;e.exports=function(e,t,o,l){r&&(i?i(e,t):s(e,"stack",n(o,l)))}},(e,t,o)=>{var s=o(20),n=Error,r=s("".replace),i=String(n("zxcasd").stack),l=/\n\s*at [^:]*:[^\n]*/,a=l.test(i);e.exports=function(e,t){if(a&&"string"==typeof e&&!n.prepareStackTrace)for(;t--;)e=r(e,l,"");return e}},(e,t,o)=>{var s=o(13),n=o(17);e.exports=!s((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",n(1,7)),7!==e.stack)}))},(e,t,o)=>{o(95),o(104)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).clear;s({global:!0,bind:!0,enumerable:!0,forced:n.clearImmediate!==r},{clearImmediate:r})},(e,t,o)=>{var s,n,r,i,l=o(10),a=o(79),h=o(97),c=o(27),d=o(45),u=o(13),g=o(99),f=o(100),p=o(49),m=o(101),C=o(102),w=o(103),y=l.setImmediate,v=l.clearImmediate,S=l.process,E=l.Dispatch,R=l.Function,b=l.MessageChannel,T=l.String,_=0,M={},O="onreadystatechange";u((function(){s=l.location}));var I=function(e){if(d(M,e)){var t=M[e];delete M[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){l.postMessage(T(e),s.protocol+"//"+s.host)};y&&v||(y=function(e){m(arguments.length,1);var t=c(e)?e:R(e),o=f(arguments,1);return M[++_]=function(){a(t,void 0,o)},n(_),_},v=function(e){delete M[e]},w?n=function(e){S.nextTick(N(e))}:E&&E.now?n=function(e){E.now(N(e))}:b&&!C?(i=(r=new b).port2,r.port1.onmessage=A,n=h(i.postMessage,i)):l.addEventListener&&c(l.postMessage)&&!l.importScripts&&s&&"file:"!==s.protocol&&!u(P)?(n=P,l.addEventListener("message",A,!1)):n=O in p("script")?function(e){g.appendChild(p("script"))[O]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:y,clear:v}},(e,t,o)=>{var s=o(98),n=o(37),r=o(15),i=s(s.bind);e.exports=function(e,t){return n(e),void 0===t?e:r?i(e,t):function(){return e.apply(t,arguments)}}},(e,t,o)=>{var s=o(21),n=o(20);e.exports=function(e){if("Function"===s(e))return n(e)}},(e,t,o)=>{var s=o(30);e.exports=s("document","documentElement")},(e,t,o)=>{var s=o(20);e.exports=s([].slice)},e=>{var t=TypeError;e.exports=function(e,o){if(e<o)throw t("Not enough arguments");return e}},(e,t,o)=>{var s=o(35);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},(e,t,o)=>{var s=o(21);e.exports="undefined"!=typeof process&&"process"==s(process)},(e,t,o)=>{var s=o(9),n=o(10),r=o(96).set,i=o(105),l=n.setImmediate?i(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:n.setImmediate!==l},{setImmediate:l})},(e,t,o)=>{"use strict";var s,n=o(10),r=o(79),i=o(27),l=o(106),a=o(35),h=o(100),c=o(101),d=n.Function,u=/MSIE .\./.test(a)||l&&((s=n.Bun.version.split(".")).length<3||0==s[0]&&(s[1]<3||3==s[1]&&0==s[2]));e.exports=function(e,t){var o=t?2:1;return u?function(s,n){var l=c(arguments.length,1)>o,a=i(s)?s:d(s),u=l?h(arguments,o):[],g=l?function(){r(a,this,u)}:a;return t?e(g,n):e(g)}:e}},e=>{e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.add(...t)},t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=r,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=r(n,t,o),n&&(!o||o.contains(n)));)s.push(n),n=n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n.host:n.parentNode;const i=s.length;return i?s[i-1]:null},t.empty=l,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];a.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:h(e,t)},t.fastInnerText=h,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=u,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=n,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,n=e;for(;null!==n;){if(o===t){s=n;break}n.host&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE?n=n.host:(o+=1,n=n.parentNode)}return s},t.getParentWindow=function(e){return n(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return d(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return c(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let n=e.parentNode;for(;n&&n.style&&t.body!==n;){let{overflow:e,overflowX:t,overflowY:r}=n.style;if([e,t,r].includes("scroll"))return n;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(n)),s.includes(e)||s.includes(t)||s.includes(r))return n;if(n.clientHeight<=n.scrollHeight+1&&(s.includes(r)||s.includes(e)))return n;if(n.clientWidth<=n.scrollWidth+1&&(s.includes(t)||s.includes(e)))return n;n=n.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===g&&(g=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let n=t.offsetWidth;s===n&&(n=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-n}(e));return g},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const n=u(e,o);if(""!==n[t]&&void 0!==n[t])return n[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=u(s,o),t=["scroll","hidden","auto"],n=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),i=e.getPropertyValue("overflow-x");if(t.includes(n)||t.includes(r)||t.includes(i))return s;s=s.parentNode}return o},t.getWindowScrollLeft=d,t.getWindowScrollTop=c,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=f,t.isOutsideInput=p,t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if(s.style&&"none"===s.style.display)return!1;s=s.parentNode}return!0},t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let n,r,i,l=e;n=l.offsetLeft,r=l.offsetTop,i=l;for(;(l=l.offsetParent)&&l!==t.body;)n+=l.offsetLeft,r+=l.offsetTop,i=l;i&&"fixed"===i.style.position&&(n+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:n,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeClass=function(e,t){"string"==typeof t&&(t=t.split(" "));(t=i(t)).length>0&&e.classList.remove(...t)},t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.selectElementIfAllowed=function(e){p(e.ownerDocument.activeElement)||e.select()},t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const n=e.parentNode,r=n.style.display;n.style.display="block",e.setSelectionRange(t,o),n.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(8),o(78);var s=o(108);function n(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:n}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:i}=r;r=i&&e===n?i:r.parentNode}return null}function i(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const a=/(<(.*)>|&(.*);)/;function h(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(l(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function c(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function d(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let g;function f(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function p(e){return f(e)&&!1===e.hasAttribute("data-hot-input")}t.HTML_CHARACTERS=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.equalsIgnoreCase=function(){const e=[];for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];let n=o.length;for(;n;){n-=1;const t=(0,r.stringify)(o[n]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length},t.isPercentValue=function(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)},t.randomString=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()},t.sanitize=i,t.stripTags=function(e){return i(`${e}`,{ALLOWED_TAGS:[]})},t.substitute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return`${e}`.replace(/(?:\\)?\[([^[\]]+)]/g,((e,o)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[o]?"":t[o]))},t.toUpperCaseFirst=function(e){return e[0].toUpperCase()+e.substr(1)},o(8);var n=s(o(109)),r=o(110);function i(e,t){return n.default.sanitize(e,t)}},t=>{"use strict";t.exports=e},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="0.0.0-next-08765b9-20230809";let i,y="invalid",v="invalid";const S=function(e){let t=[][a],o=t;if(e[a]!==u("Z"))return!1;for(let t="",s="B<H4P+".split(""),n=u(s.shift());n;n=u(s.shift()||"A"))--n<""[a]?o|=(c(`${c(h(t)+(h(d(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=d(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||S)if(S){const t=(0,n.default)("22/06/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);i=(0,n.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(y="expired",v="expired"):(y="valid",v="valid")}else s?(y="non_commercial",v="valid"):(y="invalid",v="invalid");else y="missing",v="missing";p()&&(y="valid",v="valid");if(!m&&"valid"!==y){C[y]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===y?"info":"warn"](C[y]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==v&&t.parentNode){if(w[v]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[v]({keyValidityDate:i,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=l,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=i,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var n=s(o(111)),r=o(112);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),c=e=>parseInt(e,10),d=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(d(g(e),h("12"),u("F")))/(h(d(g(e),u("B"),~~![][a]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const C={invalid:()=>r.toSingleLine`
2
2
  The license key for Handsontable is invalid.\x20
3
3
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return r.toSingleLine`
4
4
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -22,10 +22,10 @@
22
22
  the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""}},e=>{"use strict";e.exports=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.toSingleLine=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];return(0,s.arrayReduce)(e,((e,t,s)=>e+t.replace(/\r?\n\s*/g,"")+(o[s]?o[s]:"")),"").trim()};var s=o(113)},(e,t,o)=>{"use strict";function s(e,t,o,s){let n=-1,r=e,i=o;Array.isArray(e)||(r=Array.from(e));const l=r.length;for(s&&l&&(n+=1,i=r[n]),n+=1;n<l;)i=t(i,r[n],n,r),n+=1;return i}function n(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length;for(;o<n&&!1!==t(s[o],o,s);)o+=1;return e}function r(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return r(e)/e.length},t.arrayEach=n,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];t(e,o,s)&&(i+=1,r[i]=e),o+=1}return r},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const n=s.length,r=[];let i=-1;for(;o<n;){const e=s[o];i+=1,r[i]=t(e,o,s),o+=1}return r},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=r,t.arrayUnique=function(e){const t=[];return n(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>!e.includes(t)))})),i},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let i=s;return n(r,(e=>{i=i.filter((t=>e.includes(t)))})),i},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t],i=new Set(s);return n(r,(e=>{n(e,(e=>{i.has(e)||i.add(e)}))})),Array.from(i)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let n=0;n<o;n++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][n]=e[n][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(8)},(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r);let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];const l=s.concat(r.reverse());let a;return a=l.length>=t?e.apply(this,l):o(l),a}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,r)}),o),t}},t.fastCall=function(e,t,o,s,r,i,l,a){if((0,n.isDefined)(a))return e.call(t,o,s,r,i,l,a);if((0,n.isDefined)(l))return e.call(t,o,s,r,i,l);if((0,n.isDefined)(i))return e.call(t,o,s,r,i);if((0,n.isDefined)(r))return e.call(t,o,s,r);if((0,n.isDefined)(s))return e.call(t,o,s);if((0,n.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),n=0;n<t;n++)s[n]=arguments[n];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[n,...r]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(r,((e,t)=>t(e)),n.apply(this,t))}},t.throttle=r,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=r(e,t);let n=o;function i(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return n?(n-=1,e.apply(this,o)):s.apply(this,o)}return i.clearHits=function(){n=o},i};var s=o(113),n=o(110);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let n=null;return function(){for(var r=arguments.length,i=new Array(r),l=0;l<r;l++)i[l]=arguments[l];const a=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=a,h=!0);const c=t-(a-o);return h?(s.lastCallThrottled=!1,e.apply(this,i)):(n&&clearTimeout(n),n=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,i),o=0,n=void 0}),c)),s}}},(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return i.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&i.mac.value},t.isLinuxOS=function(){return i.linux.value},t.isMacOS=function(){return i.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return i.win.value},t.setBrowserMeta=l,t.setPlatformMeta=a;var s=o(116);const n=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:n(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:n((e=>/CriOS/.test(e))),edge:n((e=>/Edge/.test(e))),edgeWebKit:n((e=>/EdgiOS/.test(e))),firefox:n((e=>/Firefox/.test(e))),firefoxWebKit:n((e=>/FxiOS/.test(e))),mobile:n((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:n(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},i={mac:n((e=>/^Mac/.test(e))),win:n((e=>/^Win/.test(e))),linux:n((e=>/^Linux/.test(e))),ios:n((e=>/iPhone|iPad|iPod/i.test(e)))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function a(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(i,(t=>{let{test:o}=t;o(e)}))}l(),a()},(e,t,o)=>{"use strict";t.__esModule=!0,t.clone=function(e){const t={};return i(e,((e,o)=>{t[o]=e})),t},t.createObjectPropListener=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const o=`_${t}`,s={_touched:!1,[o]:e,isTouched(){return this._touched}};return Object.defineProperty(s,t,{get(){return this[o]},set(e){this._touched=!0,this[o]=e},enumerable:!0,configurable:!0}),s},t.deepClone=n,t.deepExtend=function e(t,o){i(o,((s,n)=>{o[n]&&"object"==typeof o[n]?(t[n]||(Array.isArray(o[n])?t[n]=[]:"[object Date]"===Object.prototype.toString.call(o[n])?t[n]=o[n]:t[n]={}),e(t[n],o[n])):t[n]=o[n]}))},t.deepObjectSize=function(e){if(!r(e))return 0;const t=function(e){let o=0;return r(e)?i(e,((e,s)=>{"__children"!==s&&(o+=t(e))})):o+=1,o};return t(e)},t.defineGetter=function(e,t,o,s){s.value=o,s.writable=!1!==s.writable,s.enumerable=!1!==s.enumerable,s.configurable=!1!==s.configurable,Object.defineProperty(e,t,s)},t.duckSchema=function e(t){let o;Array.isArray(t)?o=t.length?new Array(t.length).fill(null):[]:(o={},i(t,((t,s)=>{"__children"!==s&&(t&&"object"==typeof t&&!Array.isArray(t)?o[s]=e(t):Array.isArray(t)?t.length&&"object"==typeof t[0]&&!Array.isArray(t[0])?o[s]=[e(t[0])]:o[s]=[]:o[s]=null)})));return o},t.extend=function(e,t,o){const s=Array.isArray(o);return i(t,((t,n)=>{(!1===s||o.includes(n))&&(e[n]=t)})),e},t.getProperty=function(e,t){const o=t.split(".");let s=e;return i(o,(e=>{if(s=s[e],void 0===s)return s=void 0,!1})),s},t.hasOwnProperty=l,t.inherit=function(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e},t.isObject=r,t.isObjectEqual=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},t.mixin=function(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,o=new Array(t>1?t-1:0),l=1;l<t;l++)o[l-1]=arguments[l];return(0,s.arrayEach)(o,(t=>{e.MIXINS.push(t.MIXIN_NAME),i(t,((t,o)=>{if(void 0!==e.prototype[o])throw new Error(`Mixin conflict. Property '${o}' already exist and cannot be overwritten.`);if("function"==typeof t)e.prototype[o]=t;else{const s=function(e,t){const o=`_${e}`;return function(){return void 0===this[o]&&(this[o]=(e=>{let t=e;return(Array.isArray(t)||r(t))&&(t=n(t)),t})(t)),this[o]}},i=function(e){const t=`_${e}`;return function(e){this[t]=e}};Object.defineProperty(e.prototype,o,{get:s(o,t),set:i(o),configurable:!0})}}))})),e},t.objectEach=i,t.setProperty=function(e,t,o){const s=t.split(".");let n=e;s.forEach(((e,t)=>{t!==s.length-1?(l(n,e)||(n[e]={}),n=n[e]):n[e]=o}))},o(117),o(8),o(78);var s=o(113);function n(e){return"object"==typeof e?JSON.parse(JSON.stringify(e)):e}function r(e){return"[object Object]"===Object.prototype.toString.call(e)}function i(e,t){for(const o in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,o))&&!1===t(e[o],o,e))break;return e}function l(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},(e,t,o)=>{var s=o(9),n=o(30),r=o(79),i=o(14),l=o(20),a=o(13),h=o(27),c=o(29),d=o(100),u=o(118),g=o(33),f=String,p=n("JSON","stringify"),m=l(/./.exec),C=l("".charAt),w=l("".charCodeAt),y=l("".replace),v=l(1..toString),S=/[\uD800-\uDFFF]/g,E=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,b=!g||a((function(){var e=n("Symbol")();return"[null]"!=p([e])||"{}"!=p({a:e})||"{}"!=p(Object(e))})),T=a((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),_=function(e,t){var o=d(arguments),s=u(t);if(h(s)||void 0!==e&&!c(e))return o[1]=function(e,t){if(h(s)&&(t=i(s,this,f(e),t)),!c(t))return t},r(p,null,o)},M=function(e,t,o){var s=C(o,t-1),n=C(o,t+1);return m(E,e)&&!m(R,n)||m(R,e)&&!m(E,s)?"\\u"+v(w(e,0),16):e};p&&s({target:"JSON",stat:!0,arity:3,forced:b||T},{stringify:function(e,t,o){var s=d(arguments),n=r(b?_:p,null,s);return T&&"string"==typeof n?y(n,S,M):n}})},(e,t,o)=>{var s=o(20),n=o(76),r=o(27),i=o(21),l=o(87),a=s([].push);e.exports=function(e){if(r(e))return e;if(n(e)){for(var t=e.length,o=[],s=0;s<t;s++){var h=e[s];"string"==typeof h?a(o,h):"number"!=typeof h&&"Number"!=i(h)&&"String"!=i(h)||a(o,l(h))}var c=o.length,d=!0;return function(e,t){if(d)return d=!1,t;if(n(this))return t;for(var s=0;s<c;s++)if(o[s]===e)return t}}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(120),r=o(107),i=o(121),l=o(122),a=s(o(126)),h=o(110);const c="editorManager.navigation";t.SHORTCUTS_GROUP_NAVIGATION=c;class d{constructor(e,t,o){this.instance=e,this.tableMeta=t,this.selection=o,this.eventManager=new a.default(e),this.destroyed=!1,this.lock=!1,this.activeEditor=void 0,this.cellProperties=void 0,this.instance.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.instance.isListening()&&this.openEditor("",e)})),this.instance.view._wt.update("onCellDblClick",((e,t,o)=>this.onCellDblClick(e,t,o)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{highlight:e}=this.instance.getSelectedRangeLast();if(e.isHeader())return;const{row:t,col:o}=e,s=this.instance.runHooks("modifyGetCellCoords",t,o);let n=t,i=o;Array.isArray(s)&&([n,i]=s),this.cellProperties=this.instance.getCellMeta(n,i);const{activeElement:a}=this.instance.rootDocument;if(a&&(0,r.isOutsideInput)(a)&&a.blur(),!this.isCellEditable())return void this.clearActiveEditor();const h=this.instance.getCell(t,o,!0);if(h){const e=this.instance.getCellEditor(this.cellProperties),s=this.instance.colToProp(i),r=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(n),i);this.activeEditor=(0,l.getEditorInstance)(e,this.instance),this.activeEditor.prepare(t,o,s,h,r,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isCellEditable()?(this.activeEditor||(this.instance.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.instance.getCellEditor(this.cellProperties),{row:t,col:o}=this.instance.getSelectedRangeLast().highlight,{rowIndexMapper:s,columnIndexMapper:n}=this.instance,r=s.isHidden(this.instance.toPhysicalRow(t))||n.isHidden(this.instance.toPhysicalColumn(o));return!(this.cellProperties.readOnly||!e||r)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}onAfterDocumentKeyDown(e){const t=this.instance.getSelectedRangeLast();if(!this.instance.isListening()||!t||t.highlight.isHeader()||(0,i.isImmediatePropagationStopped)(e))return;const{keyCode:o}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,n.isFunctionKey)(o)||(0,n.isCtrlMetaKey)(o)||s||this.isEditorOpened())){const t=this.instance.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>(0,h.isDefined)(this.instance.getSelected()),group:c};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.instance.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.instance.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.instance.selection.transformStart(0,-1*this.instance.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.instance.selection.transformStart(0,this.instance.getDirectionFactor())}}],o),this.openEditor("",e)}}onCellDblClick(e,t,o){"TD"===o.nodeName&&this.openEditor(null,e,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}const u=new WeakMap;d.getInstance=function(e,t,o){let s=u.get(e);return s||(s=new d(e,t,o),u.set(e,s)),s};var g=d;t.default=g},(e,t,o)=>{"use strict";t.__esModule=!0,t.isCtrlKey=function(e){const t=[];(0,n.isMacOS)()?t.push(r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX):t.push(r.CONTROL);return t.includes(e)},t.isCtrlMetaKey=function(e){return[r.CONTROL,r.COMMAND_LEFT,r.COMMAND_RIGHT,r.COMMAND_FIREFOX].includes(e)},t.isFunctionKey=function(e){return i.includes(e)},t.isKey=function(e,t){const o=t.split("|");let n=!1;return(0,s.arrayEach)(o,(t=>{if(e===r[t])return n=!0,!1})),n},t.isPrintableChar=function(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90},o(8);var s=o(113),n=o(115);const r={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:(0,n.isFirefox)()?182:174,AUDIO_MUTE:(0,n.isFirefox)()?181:173,AUDIO_UP:(0,n.isFirefox)()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90};t.KEY_CODES=r;const i=[r.ALT,r.ARROW_DOWN,r.ARROW_LEFT,r.ARROW_RIGHT,r.ARROW_UP,r.AUDIO_DOWN,r.AUDIO_MUTE,r.AUDIO_UP,r.BACKSPACE,r.CAPS_LOCK,r.DELETE,r.END,r.ENTER,r.ESCAPE,r.F1,r.F2,r.F3,r.F4,r.F5,r.F6,r.F7,r.F8,r.F9,r.F10,r.F11,r.F12,r.F13,r.F14,r.F15,r.F16,r.F17,r.F18,r.F19,r.HOME,r.INSERT,r.MEDIA_NEXT,r.MEDIA_PLAY_PAUSE,r.MEDIA_PREV,r.MEDIA_STOP,r.NULL,r.NUM_LOCK,r.PAGE_DOWN,r.PAGE_UP,r.PAUSE,r.SCROLL_LOCK,r.SHIFT,r.TAB]},(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.RegisteredEditor=u,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)i.get(e)||g(null,e),o=i.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=a(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()},t.registerEditor=g,o(78);var n=s(o(123)),r=s(o(125));const i=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:c,getValues:d}=(0,r.default)("editors");function u(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},n.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new u(t);"string"==typeof e&&l(e,o),i.set(t,o)}t.getRegisteredEditors=d,t.getRegisteredEditorNames=c,t.hasEditor=h},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(113),n=o(116),r=o(108),i=o(124),l=o(112),a=o(114);const h=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],c=l.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
23
23
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
24
24
  learn about the migration path.`,d=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),u=new Map([["beforeRemoveCellClassNames",'The hook "beforeRemoveCellClassNames" is deprecated and will be removed in the next major release.']]);class g{static getSingleton(){return f}constructor(){this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,s.arrayEach)(h,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,s.arrayEach)(t,(t=>this.add(e,t,o)));else{d.has(e)&&(0,i.warn)((0,r.substitute)(c,{hookName:e,removedInVersion:d.get(e)})),u.has(e)&&(0,i.warn)(u.get(e));const n=this.getBucket(o);if(void 0===n[e]&&(this.register(e),n[e]=[]),t.skip=!1,-1===n[e].indexOf(t)){let o=!1;t.initialHook&&(0,s.arrayEach)(n[e],((s,r)=>{if(s.initialHook)return n[e][r]=t,o=!0,!1})),o||n[e].push(t)}}return this}once(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,s.arrayEach)(t,(t=>this.once(e,t,o))):(t.runOnce=!0,this.add(e,t,o))}remove(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=this.getBucket(o);return void 0!==s[e]&&s[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=this.getBucket(t);return!(void 0===o[e]||!o[e].length)}run(e,t,o,s,n,r,i,l){{const h=this.globalBucket[t],c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const c=(0,a.fastCall)(h[d],e,o,s,n,r,i,l);void 0!==c&&(o=c),h[d]&&h[d].runOnce&&this.remove(t,h[d]),d+=1}}{const h=this.getBucket(e)[t],c=h?h.length:0;let d=0;if(c)for(;d<c;){if(!h[d]||h[d].skip){d+=1;continue}const c=(0,a.fastCall)(h[d],e,o,s,n,r,i,l);void 0!==c&&(o=c),h[d]&&h[d].runOnce&&this.remove(t,h[d],e),d+=1}}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.objectEach)(this.getBucket(e),((e,t,o)=>o[t].length=0))}register(e){this.isRegistered(e)||h.push(e)}deregister(e){this.isRegistered(e)&&h.splice(h.indexOf(e),1)}isDeprecated(e){return u.has(e)||d.has(e)}isRegistered(e){return h.indexOf(e)>=0}getRegistered(){return h}}const f=new g;var p=g;t.default=p},(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(110)},(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);const t=o.get(e);return{register:function(e,o){t.set(e,o)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const o=new Map;t.collection=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.getListenersCounter=function(){return n},o(8);var s=o(121);let n=0;var r=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,s.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),n+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,s=this.context.eventListeners[i],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(r&&s.eventManager!==this)continue;this.context.eventListeners.splice(i,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),n-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),n-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const n={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,n.bubbles,n.cancelable,n.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,n.ctrlKey,n.altKey,n.shiftKey,n.metaKey,n.button,n.relatedTarget||o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}};t.default=r},(e,t,o)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,o=["<table>"];for(let n=0;n<t;n+=1){const r=e[n],i=r.length,l=[];0===n&&o.push("<tbody>");for(let e=0;e<i;e+=1){const t=r[e],o=(0,s.isEmpty)(t)?"":t.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");l.push(`<td>${o}</td>`)}o.push("<tr>",...l,"</tr>"),n+1===t&&o.push("</tbody>")}return o.push("</table>"),o.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},s=t.createDocumentFragment(),i=t.createElement("div");s.appendChild(i);let l=e;if("string"==typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"")}</td>`}));i.insertAdjacentHTML("afterbegin",`${e}`),l=i.querySelector("table")}if(!l||!function(e){return"TABLE"===(e&&e.nodeName||"")}(l))return;const a=i.querySelector('meta[name$="enerator"]'),h=null!==l.querySelector("tbody th"),c=l.querySelector("tr"),d=c?Array.from(c.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,u=l.tFoot&&Array.from(l.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t}));p=e.length,f=p>0,p>1?o.nestedHeaders=Array.from(e).reduce(((e,t)=>{const o=Array.from(t.cells).reduce(((e,t,o)=>{if(h&&0===o)return e;const{colSpan:s,innerHTML:n}=t,r=s>1?{label:n,colspan:s}:n;return e.push(r),e}),[]);return e.push(o),e}),[]):f&&(o.colHeaders=Array.from(e[0].children).reduce(((e,t,o)=>(h&&0===o||e.push(t.innerHTML),e)),[]))}g.length&&(o.fixedRowsTop=g.length);u.length&&(o.fixedRowsBottom=u.length);const C=[...g,...Array.from(l.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...u];m=C.length;const w=new Array(m);for(let e=0;e<m;e++)w[e]=new Array(d);const y=[],v=[];for(let e=0;e<m;e++){const t=C[e],o=Array.from(t.cells),s=o.length;for(let t=0;t<s;t++){const s=o[t],{nodeName:i,innerHTML:l,rowSpan:h,colSpan:c}=s,d=w[e].findIndex((e=>void 0===e));if("TD"===i){if(h>1||c>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=d;e<d+c;e++)w[t][e]=null;const t=s.getAttribute("style");t&&t.includes("mso-ignore:colspan")||y.push({col:d,row:e,rowspan:h,colspan:c})}let t="";t=a&&/excel/gi.test(a.content)?l.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):l.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),w[e][d]=t.replace(r,(e=>n[e]))}else v.push(l)}}y.length&&(o.mergeCells=y);v.length&&(o.rowHeaders=v);w.length&&(o.data=w);return o},t.instanceToHTML=function(e){const t=e.hasColHeaders(),o=e.hasRowHeaders(),n=[t?-1:0,o?-1:0,e.countRows()-1,e.countCols()-1],r=e.getData(...n),i=r.length,l=i>0?r[0].length:0,a=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],d=o?1:0,u=t?1:0;for(let n=0;n<i;n+=1){const i=t&&0===n,a=[];for(let t=0;t<l;t+=1){const l=!i&&o&&0===t;let h="";if(i)h=`<th>${e.getColHeader(t-d)}</th>`;else if(l)h=`<th>${e.getRowHeader(n-u)}</th>`;else{const o=r[n][t],{hidden:i,rowspan:l,colspan:a}=e.getCellMeta(n-u,t-d);if(!i){const e=[];if(l&&e.push(`rowspan="${l}"`),a&&e.push(`colspan="${a}"`),(0,s.isEmpty)(o))h=`<td ${e.join(" ")}></td>`;else{const t=o.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}a.push(h)}const g=["<tr>",...a,"</tr>"].join("");i?h.splice(1,0,g):c.splice(-1,0,g)}return a.splice(1,0,h.join(""),c.join("")),a.join("")},o(8);var s=o(110);const n={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},r=new RegExp(Object.keys(n).map((e=>`(${e})`)).join("|"),"gi")},(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=d,t.getPluginsNames=function(){return[...a.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!d(e)},t.registerPlugin=function(e,t,o){[e,t,o]=function(e,t,o){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,o=t.PLUGIN_PRIORITY);return[e,t,o]}(e,t,o),void 0===d(e)&&function(e,t,o){const n=(0,s.toUpperCaseFirst)(e);if(c.hasItem(n))throw new Error(l(n));void 0===o?h.addItem(n):a.addItem(o,n);c.addItem(n,t)}(e,t,o)},o(78);var s=o(108),n=o(129),r=o(131),i=o(132);const l=e=>`There is already registered "${e}" plugin.`,a=(0,n.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),h=(0,i.createUniqueSet)({errorItemExists:l}),c=(0,r.createUniqueMap)({errorIdExists:l});function d(e){const t=(0,s.toUpperCaseFirst)(e);return c.getItem(t)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return e=(0,n.isFunction)(e)?e:a,t=(0,n.isFunction)(t)?t:h,{addItem:function(n,r){if(!(0,s.isNumeric)(n))throw new Error(t(n));if(o.has(n))throw new Error(e(n));o.set(n,r)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const[t,s]=l.get(e)||l.get(r);return[...o].sort(((e,o)=>e[0]<o[0]?t:s)).map((e=>e[1]))}}},o(78);var s=o(130),n=o(114);const r="asc";t.ASC=r;const i="desc";t.DESC=i;const l=new Map([[r,[-1,1]],[i,[1,-1]]]),a=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},(e,t)=>{"use strict";function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=typeof e;if("number"===o)return!isNaN(e)&&isFinite(e);if("string"===o){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);const o=Array.from(new Set([".",...t])).map((e=>`\\${e}`)).join("|");return new RegExp(`^[+-]?\\s*(((${o})?\\d+((${o})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"===o&&!(!e||"number"!=typeof e.valueOf()||e instanceof Date)}t.__esModule=!0,t.clamp=function(e,t,o){if(Math.min(e,t)===e)return t;if(Math.max(e,o)===e)return o;return e},t.isNumeric=o,t.isNumericLike=function(e){return o(e,[","])},t.rangeEach=function(e,t,o){let s=-1;"function"==typeof t?(o=t,t=e):s=e-1;for(;++s<=t&&!1!==o(s););},t.rangeEachReverse=function(e,t,o){let s=e+1;"function"==typeof t&&(o=t,t=0);for(;--s>=t&&!1!==o(s););},t.valueAccordingPercent=function(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function o(){return[...t]}function r(e){return t.has(e)}return e=(0,s.isFunction)(e)?e:n,{addItem:function(o,s){if(r(o))throw new Error(e(o));t.set(o,s)},clear:function(){t.clear()},getId:function(e){const[t]=o().find((t=>{let[o,s]=t;return e===s&&o}))||[null];return t},getItem:function(e){return t.get(e)},getItems:o,hasItem:r,removeItem:function(e){return t.delete(e)}}},o(78);var s=o(114);const n=e=>`The id '${e}' is already declared in a map.`},(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,s.isFunction)(e)?e:n,{addItem:function(o){if(t.has(o))throw new Error(e(o));t.add(o)},clear:function(){t.clear()},getItems:function(){return[...t]}}},o(78);var s=o(114);const n=e=>`'${e}' value is already declared in a unique set.`},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!l(e))throw Error(`No registered renderer found under "${e}" name`);return i(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);r(e,t)},o(78);var n=s(o(125));const{register:r,getItem:i,hasItem:l,getNames:a,getValues:h}=(0,n.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=a,t.hasRenderer=l},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!l(e))throw Error(`No registered validator found under "${e}" name`);return i(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);r(e,t)},o(78);var n=s(o(125));const{register:r,getItem:i,hasItem:l,getNames:a,getValues:h}=(0,n.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=a,t.hasValidator=l},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=s(o(140)),i=s(o(143)),l=o(107),a=s(o(126)),h=o(121),c=s(o(145)),d=o(215),u=o(216);function g(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const f=new WeakMap;var p=new WeakMap,m=new WeakMap;var C=class{constructor(e){(0,n.default)(this,"instance",void 0),(0,n.default)(this,"eventManager",void 0),(0,n.default)(this,"settings",void 0),(0,n.default)(this,"THEAD",void 0),(0,n.default)(this,"TBODY",void 0),(0,n.default)(this,"_wt",void 0),(0,n.default)(this,"activeWt",void 0),g(this,p,{writable:!0,value:0}),g(this,m,{writable:!0,value:0}),(0,n.default)(this,"postponedAdjustElementsSize",!1),this.instance=e,this.eventManager=new a.default(this.instance),this.settings=this.instance.getSettings(),f.set(this,{selectionMouseDown:!1,mouseDown:void 0,table:void 0,lastWidth:0,lastHeight:0}),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.instance.isRenderSuspended()||(this.instance.runHooks("beforeRender",this.instance.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.instance.forceFullRender),this.instance.runHooks("afterRender",this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.renderCall=!1)}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.instance.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(e)}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o,s,n){return this._wt.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wt.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wt.scrollViewportVertically(e,t,o)}createElements(){const e=f.get(this),{rootElement:t,rootDocument:o}=this.instance,s=t.getAttribute("style");s&&t.setAttribute("data-originalstyle",s),(0,l.addClass)(t,"handsontable"),e.table=o.createElement("TABLE"),(0,l.addClass)(e.table,"htCore"),this.instance.getSettings().tableClassName&&(0,l.addClass)(e.table,this.instance.getSettings().tableClassName),this.THEAD=o.createElement("THEAD"),e.table.appendChild(this.THEAD),this.TBODY=o.createElement("TBODY"),e.table.appendChild(this.TBODY),this.instance.table=e.table,this.instance.container.insertBefore(e.table,this.instance.container.firstChild)}registerEvents(){const e=f.get(this),{rootElement:t,rootDocument:o,selection:s}=this.instance,n=o.documentElement;this.eventManager.addEventListener(t,"mousedown",(t=>{if(e.selectionMouseDown=!0,!this.isTextSelectionAllowed(t.target)){const{rootWindow:e}=this.instance;(0,l.clearTextSelection)(e),t.preventDefault(),e.focus()}})),this.eventManager.addEventListener(t,"mouseup",(()=>{e.selectionMouseDown=!1})),this.eventManager.addEventListener(t,"mousemove",(t=>{e.selectionMouseDown&&!this.isTextSelectionAllowed(t.target)&&(this.settings.fragmentSelection&&(0,l.clearTextSelection)(this.instance.rootWindow),t.preventDefault())})),this.eventManager.addEventListener(n,"keyup",(e=>{s.isInProgress()&&!e.shiftKey&&s.finish()})),this.eventManager.addEventListener(n,"mouseup",(n=>{s.isInProgress()&&(0,h.isLeftClick)(n)&&s.finish(),e.mouseDown=!1;const r=(0,l.isOutsideInput)(o.activeElement);r&&(!r&&(s.isSelected()||s.isSelectedByAnyHeader()||t.contains(n.target)||(0,h.isRightClick)(n))||this.instance.unlisten())})),this.eventManager.addEventListener(n,"contextmenu",(t=>{s.isInProgress()&&(0,h.isRightClick)(t)&&(s.finish(),e.mouseDown=!1)})),this.eventManager.addEventListener(n,"touchend",(()=>{s.isInProgress()&&s.finish(),e.mouseDown=!1})),this.eventManager.addEventListener(n,"mousedown",(s=>{const r=s.target,i=s.x||s.clientX,a=s.y||s.clientY;let h=s.target;if(e.mouseDown||!t||!this.instance.view)return;const{holder:c}=this.instance.view._wt.wtTable;if(h===c){const e=(0,l.getScrollbarWidth)(o);if(o.elementFromPoint(i+e,a)!==c||o.elementFromPoint(i,a+e)!==c)return}else for(;h!==n;){if(null===h){if(s.isTargetWebComponent)break;return}if(h===t)return;h=h.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(r):this.settings.outsideClickDeselects)?this.instance.deselectCell():this.instance.destroyEditor(!1,!1)})),this.eventManager.addEventListener(e.table,"selectstart",(e=>{this.settings.fragmentSelection||(0,l.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:o}=e;return this.instance._createCellCoords(...this.translateFromRenderableToVisualIndex(t,o))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.instance.rowIndexMapper.getVisualFromRenderableIndex(e):e,s=t>=0?this.instance.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===o&&(o=e),null===s&&(s=t),[o,s]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),s=e.getNearestNotHiddenIndex(o-1,-1);return null===s?0:e.getRenderableFromVisualIndex(s)+1}countRenderableColumns(){return this.countRenderableIndexes(this.instance.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.instance.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.instance.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.instance.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,s){if(isNaN(e)||e<0)return 0;const n=o.getNearestNotHiddenIndex(e,t),r=o.getRenderableFromVisualIndex(n);if(!Number.isInteger(r))return 0;let i=0;return t<0?i=r+1:t>0&&(i=s-r),i}countNotHiddenFixedColumnsStart(){const e=this.instance.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.instance.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.instance.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.instance.columnIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.instance.rowIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.instance.countRenderedRows()>e&&this.instance.countRenderedCols()>t}initializeWalkontable(){const e=f.get(this),t={rtlMode:this.instance.isRtl(),externalRowCalculator:this.instance.getPlugin("autoRowSize")&&this.instance.getPlugin("autoRowSize").isEnabled(),table:e.table,isDataViewInstance:()=>(0,u.isRootInstance)(this.instance),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.instance.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||t.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||t.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,rowHeaders:()=>{const e=[];return this.instance.hasRowHeaders()&&e.push(((e,t)=>{const o=e>=0?this.instance.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(o,t)})),this.instance.runHooks("afterGetRowHeaderRenderers",e),(0,i.default)(this,m,e.length),e},columnHeaders:()=>{const e=[];return this.instance.hasColHeaders()&&e.push(((e,t)=>{const o=e>=0?this.instance.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(o,t)})),this.instance.runHooks("afterGetColumnHeaderRenderers",e),(0,i.default)(this,p,e.length),e},columnWidth:e=>{const t=this.instance.columnIndexMapper.getVisualFromRenderableIndex(e);return this.instance.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.instance.rowIndexMapper.getVisualFromRenderableIndex(e);return this.instance.getRowHeight(null===t?e:t)},cellRenderer:(e,t,o)=>{const[s,n]=this.translateFromRenderableToVisualIndex(e,t),r=this.instance.runHooks("modifyGetCellCoords",s,n);let i=s,l=n;Array.isArray(r)&&([i,l]=r);const a=this.instance.getCellMeta(i,l),h=this.instance.colToProp(l);let c=this.instance.getDataAtRowProp(i,h);this.instance.hasHook("beforeValueRender")&&(c=this.instance.runHooks("beforeValueRender",c,a)),this.instance.runHooks("beforeRenderer",o,s,n,h,c,a),this.instance.getCellRenderer(a)(this.instance,o,s,n,h,c,a),this.instance.runHooks("afterRenderer",o,s,n,h,c,a)},selections:this.instance.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.instance&&!this.instance.isDestroyed&&this.instance.refreshDimensions()},onContainerElementResize:()=>{this.instance&&!this.instance.isDestroyed&&this.instance.refreshDimensions()},onCellMouseDown:(t,o,s,n)=>{const r=this.translateFromRenderableToVisualCoords(o),i={row:!1,column:!1,cell:!1};this.instance.listen(),this.activeWt=n,e.mouseDown=!0,this.instance.runHooks("beforeOnCellMouseDown",t,r,s,i),(0,h.isImmediatePropagationStopped)(t)||((0,d.handleMouseEvent)(t,{coords:r,selection:this.instance.selection,controller:i,cellCoordsFactory:(e,t)=>this.instance._createCellCoords(e,t)}),this.instance.runHooks("afterOnCellMouseDown",t,r,s),this.activeWt=this._wt)},onCellContextMenu:(t,o,s,n)=>{const r=this.translateFromRenderableToVisualCoords(o);this.activeWt=n,e.mouseDown=!1,this.instance.selection.isInProgress()&&this.instance.selection.finish(),this.instance.runHooks("beforeOnCellContextMenu",t,r,s),(0,h.isImmediatePropagationStopped)(t)||(this.instance.runHooks("afterOnCellContextMenu",t,r,s),this.activeWt=this._wt)},onCellMouseOut:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.instance.runHooks("beforeOnCellMouseOut",e,n,o),(0,h.isImmediatePropagationStopped)(e)||(this.instance.runHooks("afterOnCellMouseOut",e,n,o),this.activeWt=this._wt)},onCellMouseOver:(t,o,s,n)=>{const r=this.translateFromRenderableToVisualCoords(o),i={row:!1,column:!1,cell:!1};this.activeWt=n,this.instance.runHooks("beforeOnCellMouseOver",t,r,s,i),(0,h.isImmediatePropagationStopped)(t)||(e.mouseDown&&(0,d.handleMouseEvent)(t,{coords:r,selection:this.instance.selection,controller:i,cellCoordsFactory:(e,t)=>this.instance._createCellCoords(e,t)}),this.instance.runHooks("afterOnCellMouseOver",t,r,s),this.activeWt=this._wt)},onCellMouseUp:(e,t,o,s)=>{const n=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.instance.runHooks("beforeOnCellMouseUp",e,n,o),(0,h.isImmediatePropagationStopped)(e)||this.instance.isDestroyed||(this.instance.runHooks("afterOnCellMouseUp",e,n,o),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.instance.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.instance.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onScrollVertically:()=>{this.instance.runHooks("afterScrollVertically"),this.instance.runHooks("afterScroll")},onScrollHorizontally:()=>{this.instance.runHooks("afterScrollHorizontally"),this.instance.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.instance.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,o)=>{const s=this.instance.rowIndexMapper,n=e<0;let r=e;n||(r=s.getVisualFromRenderableIndex(e));const i=this.instance.runHooks("beforeHighlightingRowHeader",r,t,o);return n?i:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(i,1))},onBeforeHighlightingColumnHeader:(e,t,o)=>{const s=this.instance.columnIndexMapper,n=e<0;let r=e;n||(r=s.getVisualFromRenderableIndex(e));const i=this.instance.runHooks("beforeHighlightingColumnHeader",r,t,o);return n?i:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(i,1))},onAfterDrawSelection:(e,t,o)=>{let s;const[n,r]=this.translateFromRenderableToVisualIndex(e,t),i=this.instance.selection.getSelectedRange();if(i.size()>0){const e=i.peekByIndex(null!=o?o:0);s=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.instance.runHooks("afterDrawSelection",n,r,s,o)},onBeforeDrawBorders:(e,t)=>{const[o,s,n,r]=e,i=[this.instance.rowIndexMapper.getVisualFromRenderableIndex(o),this.instance.columnIndexMapper.getVisualFromRenderableIndex(s),this.instance.rowIndexMapper.getVisualFromRenderableIndex(n),this.instance.columnIndexMapper.getVisualFromRenderableIndex(r)];return this.instance.runHooks("beforeDrawBorders",i,t)},onBeforeTouchScroll:()=>this.instance.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.instance.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const o=this.instance.columnIndexMapper.getVisualFromRenderableIndex(t);return this.instance.runHooks("beforeStretchingColumnWidth",e,o)},onModifyRowHeaderWidth:e=>this.instance.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,o)=>{const s=this.instance.rowIndexMapper,n=this.instance.columnIndexMapper,r=t>=0?n.getVisualFromRenderableIndex(t):t,i=e>=0?s.getVisualFromRenderableIndex(e):e,l=this.instance.runHooks("modifyGetCellCoords",i,r,o);if(Array.isArray(l)){const[e,t,o,r]=l;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(t,1)):t,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o,r>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1)):r]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const o=this.countRenderableRows(),s=e.startRow,n=e.endRow;if("number"==typeof t)e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1);else if("auto"===t){const t=Math.ceil(n/o*12);e.startRow=Math.max(s-t,0),e.endRow=Math.min(n+t,o-1)}}this.instance.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const o=this.countRenderableColumns(),s=e.startColumn,n=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)),"auto"===t){const t=Math.ceil(n/o*6);e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(n+t,o-1)}}this.instance.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.instance.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.instance.runHooks("beforeInitWalkontable",t),this._wt=new c.default(t),this.activeWt=this._wt;const o=this._wt.wtTable.spreader,{width:s,height:n}=this.instance.rootElement.getBoundingClientRect();this.setLastSize(s,n),this.eventManager.addEventListener(o,"mousedown",(e=>{e.target===o&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(o,"contextmenu",(e=>{e.target===o&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.instance.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.instance.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,l.isInput)(e))return!0;const t=(0,l.isChildOf)(e,this.instance.view._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return f.get(this).mouseDown}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.instance.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.instance.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.instance.runHooks("beforeViewRender",this.instance.forceFullRender,t)}afterRender(e){e&&this.instance.runHooks("afterViewRender",this.instance.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!(0,l.hasClass)(o,"relative"))return(0,l.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.instance.getRowHeader)}else{const{rootDocument:o,getRowHeader:s}=this.instance,n=o.createElement("div"),r=o.createElement("span");n.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,s),n.appendChild(r),t.appendChild(n)}this.instance.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.instance.getColHeader,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t.firstChild){const n=t.firstChild;(0,l.hasClass)(n,"relative")?this.updateCellHeader(n.querySelector(".colHeader"),e,o,s):((0,l.empty)(t),this.appendColHeader(e,t,o,s))}else{const{rootDocument:n}=this.instance,r=n.createElement("div"),i=n.createElement("span");r.className="relative",i.className="colHeader",this.updateCellHeader(i,e,o,s),r.appendChild(i),t.appendChild(r)}this.instance.runHooks("afterGetColHeader",e,t,s)}updateCellHeader(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,l.hasClass)(e,"colHeader")?n=r.wtTable.columnFilter.sourceToRendered(t):(0,l.hasClass)(e,"rowHeader")&&(n=r.wtTable.rowFilter.sourceToRendered(t))),n>-1?(0,l.fastInnerHTML)(e,o(t,s)):((0,l.fastInnerText)(e,String.fromCharCode(160)),(0,l.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){const o=f.get(this);[o.lastWidth,o.lastHeight]=[e,t]}getLastSize(){const e=f.get(this);return{width:e.lastWidth,height:e.lastHeight}}getFirstFullyVisibleRow(){return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.instance.rowIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.instance.columnIndexMapper.getVisualFromRenderableIndex(this.instance.view._wt.wtScroll.getLastVisibleColumn())}getColumnHeadersCount(){return(0,r.default)(this,p)}getRowHeadersCount(){return(0,r.default)(this,m)}destroy(){this._wt.destroy(),this.eventManager.destroy()}};t.default=C},(e,t,o)=>{var s=o(137);e.exports=function(e,t,o){return(t=s(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{var s=o(138).default,n=o(139);e.exports=function(e){var t=n(e,"string");return"symbol"===s(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{var s=o(138).default;e.exports=function(e,t){if("object"!==s(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!==s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{var s=o(141),n=o(142);e.exports=function(e,t){var o=n(e,t,"get");return s(e,o)},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e,t){return t.get?t.get.call(e):t.value},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to "+o+" private field on non-instance");return t.get(e)},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{var s=o(144),n=o(142);e.exports=function(e,t,o){var r=n(e,t,"set");return s(e,r,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},e=>{e.exports=function(e,t,o){if(t.set)t.set.call(e,o);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=o}},e.exports.__esModule=!0,e.exports.default=e.exports},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(146));t.ViewportColumnsCalculator=n.default;var r=s(o(153));t.ViewportRowsCalculator=r.default;var i=s(o(154));t.CellCoords=i.default;var l=s(o(155));t.CellRange=l.default;var a=s(o(156));t.default=a.default,t.Core=a.default;var h=o(197);t.Selection=h.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=h.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=h.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=h.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=h.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=h.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=h.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=h.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=h.CUSTOM_SELECTION_TYPE;var c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(167));t.Renderer=c;var d=o(169);t.OrderView=d.OrderView,t.SharedOrderView=d.SharedOrderView;var u=o(126);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}t.getListenersCounter=u.getListenersCounter},(e,t,o)=>{"use strict";t.__esModule=!0,o(8),o(147);var s=o(152);const n=new WeakMap;class r{static get DEFAULT_WIDTH(){return 50}constructor(){let{viewportSize:e,scrollOffset:t,totalItems:o,itemSizeFn:s,overrideFn:r,calculationType:i,stretchMode:l,stretchingItemWidthFn:a=(e=>e),inlineStartOffset:h}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.set(this,{viewportWidth:e,scrollOffset:t,totalColumns:o,columnWidthFn:s,overrideFn:r,calculationType:i,stretchingColumnWidthFn:a,inlineStartOffset:h}),this.count=0,this.startColumn=null,this.endColumn=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.stretchAllRatio=0,this.stretchLastWidth=0,this.stretch=l,this.totalTargetWidth=0,this.needVerifyLastColumnWidth=!0,this.stretchAllColumnsWidth=[],this.calculate()}calculate(){let e=0,t=!0;const o=[];let r,i=0,l=0;const a=n.get(this),h=a.calculationType,c=a.overrideFn,d=a.scrollOffset,u=Math.max(a.scrollOffset,0),g=a.totalColumns,f=a.viewportWidth,p=u>0?f+1:f;for(let n=0;n<g;n++)if(r=this._getColumnWidth(n),e<=u&&h!==s.FULLY_VISIBLE_TYPE&&(this.startColumn=n,i=r),e>=u&&e+(h===s.FULLY_VISIBLE_TYPE?r:0)<=u+p&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=n,i=r),this.endColumn=n),o.push(e),e+=r,l=r,h!==s.FULLY_VISIBLE_TYPE&&(this.endColumn=n),e>=u+f){t=!1;break}const m=d+f-p,C=h===s.FULLY_VISIBLE_TYPE?0:l,w=h===s.FULLY_VISIBLE_TYPE?i:0;if(m<-1*a.inlineStartOffset||d>o.at(-1)+C||-1*a.scrollOffset-a.viewportWidth>-1*w?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===g-1&&t)for(this.startColumn=this.endColumn;this.startColumn>0;){const e=o[this.endColumn]+r-o[this.startColumn-1];if((e<=f||h!==s.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),e>f)break}h===s.RENDER_TYPE&&null!==this.startColumn&&c&&c(this),this.startPosition=o[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),g<this.endColumn&&(this.endColumn=g-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}refreshStretching(e){if("none"===this.stretch)return;let t=e;this.totalTargetWidth=t;const o=n.get(this),s=o.totalColumns;let r=0;for(let e=0;e<s;e++){const s=this._getColumnWidth(e),n=o.stretchingColumnWidthFn(void 0,e);"number"==typeof n?t-=n:r+=s}const i=t-r;if("all"===this.stretch&&i>0)this.stretchAllRatio=t/r,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===this.stretch&&t!==1/0){const e=this._getColumnWidth(s-1),t=i+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===this.stretch&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===this.stretch&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;const s=n.get(this),r=s.totalColumns;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),n=s.stretchingColumnWidthFn(o,e);this.stretchAllColumnsWidth[e]=void 0===n?o:isNaN(n)?this._getColumnWidth(e):n}if(this.stretchAllColumnsWidth.length===r&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==this.totalTargetWidth&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=this.totalTargetWidth-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===n.get(this).totalColumns-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=n.get(this).columnWidthFn(e);return isNaN(t)&&(t=r.DEFAULT_WIDTH),t}}var i=r;t.default=i},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(68),l=o(148);s({target:"Array",proto:!0},{at:function(e){var t=n(this),o=r(t),s=i(e),l=s>=0?s:o+s;return l<0||l>=o?void 0:t[l]}}),l("at")},(e,t,o)=>{var s=o(40),n=o(149),r=o(51).f,i=s("unscopables"),l=Array.prototype;null==l[i]&&r(l,i,{configurable:!0,value:n(null)}),e.exports=function(e){l[i][e]=!0}},(e,t,o)=>{var s,n=o(53),r=o(150),i=o(72),l=o(61),a=o(99),h=o(49),c=o(60),d="prototype",u="script",g=c("IE_PROTO"),f=function(){},p=function(e){return"<"+u+">"+e+"</"+u+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},C=function(){try{s=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;C="undefined"!=typeof document?document.domain&&s?m(s):(t=h("iframe"),o="java"+u+":",t.style.display="none",a.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(s);for(var n=i.length;n--;)delete C[d][i[n]];return C()};l[g]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(f[d]=n(e),o=new f,f[d]=null,o[g]=e):o=C(),void 0===t?o:r.f(o,t)}},(e,t,o)=>{var s=o(12),n=o(52),r=o(51),i=o(53),l=o(18),a=o(151);t.f=s&&!n?Object.defineProperties:function(e,t){i(e);for(var o,s=l(t),n=a(t),h=n.length,c=0;h>c;)r.f(e,o=n[c++],s[o]);return e}},(e,t,o)=>{var s=o(65),n=o(72);e.exports=Object.keys||function(e){return s(e,n)}},(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1;t.FULLY_VISIBLE_TYPE=2;t.PARTIALLY_VISIBLE_TYPE=3},(e,t,o)=>{"use strict";t.__esModule=!0,o(8),o(147);var s=o(152);const n=new WeakMap;class r{static get DEFAULT_HEIGHT(){return 23}constructor(){let{viewportSize:e,scrollOffset:t,totalItems:o,itemSizeFn:s,overrideFn:r,calculationType:i,scrollbarHeight:l}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n.set(this,{viewportHeight:e,scrollOffset:t,totalRows:o,rowHeightFn:s,overrideFn:r,calculationType:i,horizontalScrollbarHeight:l}),this.count=0,this.startRow=null,this.endRow=null,this.startPosition=null,this.isVisibleInTrimmingContainer=!1,this.calculate()}calculate(){const e=n.get(this),t=e.calculationType,o=e.overrideFn,i=e.rowHeightFn,l=e.scrollOffset,a=Math.max(e.scrollOffset,0),h=e.totalRows,c=e.viewportHeight,d=e.horizontalScrollbarHeight||0;let u=0,g=!0;const f=[];let p,m=0,C=0;for(let e=0;e<h;e++)if(p=i(e),isNaN(p)&&(p=r.DEFAULT_HEIGHT),u<=a&&t!==s.FULLY_VISIBLE_TYPE&&(this.startRow=e,m=p),u>=a&&u+(t===s.FULLY_VISIBLE_TYPE?p:0)<=a+c-d&&(null===this.startRow&&(this.startRow=e,m=p),this.endRow=e),f.push(u),u+=p,C=p,t!==s.FULLY_VISIBLE_TYPE&&(this.endRow=e),u>=a+c-d){g=!1;break}const w=l+c-d,y=t===s.FULLY_VISIBLE_TYPE?m:0,v=t===s.FULLY_VISIBLE_TYPE?0:C;if(w<y||l>f.at(-1)+v?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===h-1&&g)for(this.startRow=this.endRow;this.startRow>0;){const e=f[this.endRow]+p-f[this.startRow-1];if((e<=c-d||t!==s.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),e>=c-d)break}t===s.RENDER_TYPE&&null!==this.startRow&&o&&o(this),this.startPosition=f[this.startRow],void 0===this.startPosition&&(this.startPosition=null),h<this.endRow&&(this.endRow=h-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}var i=r;t.default=i},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(136)),r=s(o(140)),i=s(o(143));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var a=new WeakMap;class h{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,n.default)(this,"row",null),(0,n.default)(this,"col",null),l(this,a,{writable:!0,value:!1}),(0,i.default)(this,a,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:o,countRowHeaders:s,countColHeaders:n}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-n||this.col<-s)&&!(this.row>=t||this.col>=o))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isSouthEastOf(e){return this.row>=e.row&&((0,r.default)(this,a)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&((0,r.default)(this,a)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&((0,r.default)(this,a)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&((0,r.default)(this,a)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}clone(){return new h(this.row,this.col,(0,r.default)(this,a))}toObject(){return{row:this.row,col:this.col}}}var c=h;t.default=c},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=s(o(140)),i=s(o(143)),l=s(o(154));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(0,n.default)(this,"highlight",null),(0,n.default)(this,"from",null),(0,n.default)(this,"to",null),a(this,h,{writable:!0,value:!1}),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),(0,i.default)(this,h,s)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,s=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return s.row<=t&&n.row>=t&&s.col<=o&&n.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopRightCorner().col>=e.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=e.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=e.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=e.getOuterTopLeftCorner().col}isOverlappingVertically(e){return this.getOuterBottomRightCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=e.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=e.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)}expandByRange(e){if(this.includesRange(e)||!this.overlaps(e))return!1;const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),s=this.getDirection(),n=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner(),i=Math.min(t.row,n.row),l=Math.min(t.col,n.col),a=Math.max(o.row,r.row),h=Math.max(o.col,r.col),c=this._createCellCoords(i,l),d=this._createCellCoords(a,h);return this.from=c,this.to=d,this.setDirection(s),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return(0,r.default)(this,h)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return(0,r.default)(this,h)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return(0,r.default)(this,h)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return(0,r.default)(this,h)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return(0,r.default)(this,h)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return(0,r.default)(this,h)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return(0,r.default)(this,h)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return(0,r.default)(this,h)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e,t){return!!(t&&t.includes(e)&&(this.getOuterTopLeftCorner().isEqual(this._createCellCoords(t.from.row,t.from.col))||this.getOuterTopRightCorner().isEqual(this._createCellCoords(t.from.row,t.to.col))||this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(t.to.row,t.from.col))||this.getOuterBottomRightCorner().isEqual(this._createCellCoords(t.to.row,t.to.col))))||(e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner()))}getOppositeCorner(e,t){if(!(e instanceof l.default))return!1;if(t){const{from:o,to:s}=t;if(t.includes(e)){if(this.getOuterTopStartCorner().isEqual(this._createCellCoords(o.row,o.col)))return this.getOuterBottomEndCorner();if(this.getOuterTopEndCorner().isEqual(this._createCellCoords(o.row,s.col)))return this.getOuterBottomStartCorner();if(this.getOuterBottomStartCorner().isEqual(this._createCellCoords(s.row,o.col)))return this.getOuterTopEndCorner();if(this.getOuterBottomEndCorner().isEqual(this._createCellCoords(s.row,s.col)))return this.getOuterTopStartCorner()}}return e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),s=Math.min(this.from.col,this.to.col),n=Math.max(this.from.col,this.to.col),r=Math.min(e.from.row,e.to.row),i=Math.max(e.from.row,e.to.row),l=Math.min(e.from.col,e.to.col),a=Math.max(e.from.col,e.to.col),h=[];return t===r&&h.push("top"),n===a&&h.push("right"),o===i&&h.push("bottom"),s===l&&h.push("left"),h}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)this.from.row===s&&this.from.col===n||this.to.row===s&&this.to.col===n||o.push(this._createCellCoords(s,n));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let n=e.col;n<=t.col;n++)e.row===s&&e.col===n?o.push(e):t.row===s&&t.col===n?o.push(t):o.push(this._createCellCoords(s,n));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let s=t.row;s<=o.row;s++)for(let n=t.col;n<=o.col;n++){if(!1===e(s,n))return}}clone(){return new c(this.highlight,this.from,this.to,(0,r.default)(this,h))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new l.default(e,t,(0,r.default)(this,h))}}var d=c;t.default=d},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(157)),r=s(o(189));class i{constructor(e){e instanceof r.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new i(e);return()=>t},this._wot=new n.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,o,s,n){return this._wot.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return this._wot.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wot.scrollViewportVertically(e,t,o)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,s,n){return this._wot.wtSettings.getSetting(e,t,o,s,n)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(158)),r=s(o(160)),i=s(o(211)),l=s(o(212)),a=s(o(213)),h=s(o(189)),c=o(202),d=o(116),u=o(107);class g extends h.default{constructor(e,t){super(e,new i.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new l.default(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new a.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new c.SelectionManager(this.wtSettings.getSetting("selections")),this.wtEvent=new n.default(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new r.default(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,d.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,s)=>{this.wtSettings.getSetting(s).length&&t.push(o),e.push(o)})),(0,u.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,u.addClass)(this.wtTable.wtRootElement.parentNode,t)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=g},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107),n=o(114),r=o(159),i=o(115),l=o(110);const a=new WeakMap;var h=class{constructor(e,t,o,s,n,r){let i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;this.wtSettings=o,this.domBindings=t,this.wtTable=n,this.selectionManager=r,this.parent=i,this.eventManager=s,this.facadeGetter=e,a.set(this,{selectedCellBeforeTouchEnd:void 0,dblClickTimeout:[null,null],dblClickOrigin:[null,null]}),this.registerEvents()}registerEvents(){this.eventManager.addEventListener(this.wtTable.holder,"contextmenu",(e=>this.onContextMenu(e))),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(this.wtTable.TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{this.eventManager.addEventListener(this.wtTable.holder,"touchstart",(e=>this.onTouchStart(e))),this.eventManager.addEventListener(this.wtTable.holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),this.eventManager.addEventListener(this.wtTable.holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||this.wtSettings.getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,this.wtSettings.getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{this.eventManager.addEventListener(this.wtTable.holder,"mouseup",(e=>this.onMouseUp(e))),this.eventManager.addEventListener(this.wtTable.holder,"mousedown",(e=>this.onMouseDown(e)))};(0,i.isMobileBrowser)()?e():((0,r.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=a.get(this),o=this.parentCell(e).coords;if(t.selectedCellBeforeTouchEnd&&o){const[e,s]=[o.row,t.selectedCellBeforeTouchEnd.from.row],[n,r]=[o.col,t.selectedCellBeforeTouchEnd.from.col];return e===s&&n===r}return!1}parentCell(e){const t={},o=this.wtTable.TABLE,n=(0,s.closestDown)(e,["TD","TH"],o);return n?(t.coords=this.wtTable.getCoords(n),t.TD=n):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"current")?(t.coords=this.selectionManager.getFocusSelection().cellRange.highlight,t.TD=this.wtTable.getCell(t.coords)):(0,s.hasClass)(e,"wtBorder")&&(0,s.hasClass)(e,"area")&&this.selectionManager.getAreaSelection().cellRange&&(t.coords=this.selectionManager.getAreaSelection().cellRange.to,t.TD=this.wtTable.getCell(t.coords)),t}onMouseDown(e){const t=a.get(this),o=this.domBindings.rootDocument.activeElement,r=(0,n.partial)(s.getParent,e.target),i=e.target;if(i===o||r(0)===o||r(1)===o)return;const l=this.parentCell(i);(0,s.hasClass)(i,"corner")?this.wtSettings.getSetting("onCellCornerMouseDown",e,i):l.TD&&this.wtSettings.has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,l.coords,l.TD),(0===e.button||this.touchApplied)&&l.TD&&(t.dblClickOrigin[0]=l.TD,clearTimeout(t.dblClickTimeout[0]),t.dblClickTimeout[0]=setTimeout((()=>{t.dblClickOrigin[0]=null}),1e3))}onContextMenu(e){if(this.wtSettings.has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!this.wtSettings.has("onCellMouseOver"))return;const t=this.wtTable.TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=this.parent||this;o&&o!==n.lastMouseOver&&(0,s.isChildOf)(o,t)&&(n.lastMouseOver=o,this.callListener("onCellMouseOver",e,this.wtTable.getCoords(o),o))}onMouseOut(e){if(!this.wtSettings.has("onCellMouseOut"))return;const t=this.wtTable.TABLE,o=(0,s.closestDown)(e.target,["TD","TH"],t),n=(0,s.closestDown)(e.relatedTarget,["TD","TH"],t),r=this.parent||this;o&&o!==n&&(0,s.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,this.wtTable.getCoords(o),o),null===n&&(r.lastMouseOver=null))}onMouseUp(e){const t=a.get(this),o=this.parentCell(e.target);o.TD&&this.wtSettings.has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&(o.TD===t.dblClickOrigin[0]&&o.TD===t.dblClickOrigin[1]?((0,s.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,o.coords,o.TD):this.callListener("onCellDblClick",e,o.coords,o.TD),t.dblClickOrigin[0]=null,t.dblClickOrigin[1]=null):o.TD===t.dblClickOrigin[0]&&(t.dblClickOrigin[1]=o.TD,clearTimeout(t.dblClickTimeout[1]),t.dblClickTimeout[1]=setTimeout((()=>{t.dblClickOrigin[1]=null}),500)))}onTouchStart(e){a.get(this).selectedCellBeforeTouchEnd=this.selectionManager.getFocusSelection().cellRange,this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,s=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,n=(0,l.isDefined)(s)&&s.row>=0&&s.col>=0;if(e.cancelable&&n&&this.wtSettings.getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,i.isIOS)()&&((0,i.isChromeWebKit)()||(0,i.isFirefoxWebKit)())&&this.selectedCellWasTouched(o)&&!t.includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,s){const n=this.wtSettings.getSettingPure(e);n&&n(t,o,s,this.facadeGetter())}destroy(){const e=a.get(this);clearTimeout(e.dblClickTimeout[0]),clearTimeout(e.dblClickTimeout[1]),this.eventManager.destroy()}};t.default=h},(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=o(107),i=o(159),l=o(113),a=o(120),h=o(115),c=o(161);var d=class{constructor(e,t,o,s,l,a){(0,n.default)(this,"wot",null),(0,n.default)(this,"topOverlay",null),(0,n.default)(this,"bottomOverlay",null),(0,n.default)(this,"inlineStartOverlay",null),(0,n.default)(this,"topInlineStartCornerOverlay",null),(0,n.default)(this,"bottomInlineStartCornerOverlay",null),(0,n.default)(this,"browserLineHeight",void 0),(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,i.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")}))}))),this.wot=e,this.wtSettings=s,this.domBindings=o,this.facadeGetter=t,this.wtTable=a;const{rootDocument:h,rootWindow:c}=this.domBindings;this.instance=this.wot,this.eventManager=l,this.scrollbarSize=(0,r.getScrollbarWidth)(h);const d="hidden"===c.getComputedStyle(a.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=d?a.holder:(0,r.getScrollableElement)(a.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=c.scrollX,this.lastScrollY=c.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),s=parseInt(o.lineHeight,10),n=1.2*parseInt(o.fontSize,10);this.browserLineHeight=s||n}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new c.TopOverlay(...e),this.bottomOverlay=new c.BottomOverlay(...e),this.inlineStartOverlay=new c.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new c.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new c.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:s}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),o!==s&&this.eventManager.addEventListener(s,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const n=t.devicePixelRatio&&t.devicePixelRatio>1,r=this.scrollableElement===t,i=this.wtSettings.getSetting("preventWheel"),l={passive:r};(i||n||!(0,h.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,i)),l);let a;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,i)),l)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(a),a=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize")}),200)})),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,n=e.target;this.keyPressed&&(s!==t&&n!==t&&!e.target.contains(s)||o!==t&&n!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:o}=this.domBindings,s=this.inlineStartOverlay.mainTableScrollableElement,n=this.topOverlay.mainTableScrollableElement,r=e.target,i=n!==o&&r!==o&&!r.contains(n),l=s!==o&&r!==o&&!r.contains(s);if(this.keyPressed&&(i||l))return;const a=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&a)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,a.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const s=this.scrollVertically(t),n=this.scrollHorizontally(o);return s||n}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,[s,n]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==s||this.lastScrollX!==e.scrollX,this.verticalScrolling=o.scrollTop!==n||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=s;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=s)}this.verticalScrolling&&(o.scrollTop=n),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,r.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,s=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return s&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:o}=this,s=this.wtSettings.getSetting("totalColumns"),n=this.wtSettings.getSetting("totalRows"),r=t.getRowHeaderWidth(),i=t.getColumnHeaderHeight(),l=o.hider.style;if(l.width=`${r+this.inlineStartOverlay.sumCellSizes(0,s)}px`,l.height=`${i+this.topOverlay.sumCellSizes(0,n)+1}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=o.wtRootElement,{scrollHeight:s,scrollWidth:n}=o.holder;this.hasScrollbarRight=e<s,this.hasScrollbarBottom=t<n,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,l.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)})),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,l.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}};t.default=d},(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},n=o(162);t.BottomInlineStartCornerOverlay=n.BottomInlineStartCornerOverlay;var r=o(191);t.BottomOverlay=r.BottomOverlay;var i=o(194);t.InlineStartOverlay=i.InlineStartOverlay;var l=o(186);t.Overlay=l.Overlay;var a=o(206);t.TopInlineStartCornerOverlay=a.TopInlineStartCornerOverlay;var h=o(209);t.TopOverlay=h.TopOverlay;var c=o(187);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=s(o(163)),i=o(186),l=o(187);class a extends i.Overlay{constructor(e,t,o,s,n,r){super(e,t,l.CLONE_BOTTOM_INLINE_START_CORNER,o,s),this.bottomOverlay=n,this.inlineStartOverlay=r}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${o}px`}else(0,n.resetCssTransform)(t),this.repositionOverlay();let o=(0,n.outerHeight)(this.clone.wtTable.TABLE);const s=(0,n.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${s}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let r=0;t.hasVerticalScroll()||(r+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(r+=(0,n.getScrollbarWidth)(o)),s.style.bottom=`${r}px`}}t.BottomInlineStartCornerOverlay=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(184)),i=s(o(185)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78),o(8);var n=s(o(136)),r=o(107),i=o(114),l=s(o(165)),a=s(o(166)),h=o(167),c=s(o(182)),d=s(o(183)),u=o(161);var g=class{constructor(e,t,o,s,i){(0,n.default)(this,"wtSettings",null),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"TBODY",null),(0,n.default)(this,"THEAD",null),(0,n.default)(this,"COLGROUP",null),(0,n.default)(this,"hasTableHeight",!0),(0,n.default)(this,"hasTableWidth",!0),(0,n.default)(this,"isTableVisible",!1),(0,n.default)(this,"tableOffset",0),(0,n.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const l=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(l))),this.rowUtils=new d.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new c.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr")),o.appendChild(e)),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,n=t.getSetting("totalRows"),i=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),c=h.length,d=t.getSetting("columnHeaders"),g=d.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),c&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(f=o.updateStateOfRendering()),p)this.isMaster&&s.createVisibleCalculators(),o&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=n>0?this.getFirstRenderedRow():0,t=i>0?this.getFirstRenderedColumn():0;this.rowFilter=new a.default(e,n,g),this.columnFilter=new l.default(t,i,c);let o=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),o=!0!==e.skipRender}if(o){let e;if(this.tableRenderer.setHeaderContentRenderers(h,d),(this.is(u.CLONE_BOTTOM)||this.is(u.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(u.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,r.outerWidth)(this.hider),o=(0,r.outerWidth)(this.TABLE);0!==t&&o!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(u.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(m=o.bottomOverlay.resetFixedPosition()||m),m=o.inlineStartOverlay.resetFixedPosition()||m,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(p),f&&o.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let n,i,l;const a=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,n=this.getColumnHeaderHeight(o),i=this.getColumnHeader(t,o),i&&(l=(0,r.innerHeight)(i),(!n&&s<l||n<l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),Array.isArray(a)?null!==a[o]&&void 0!==a[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]):isNaN(a)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(a[o]||a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a[o]||a))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,n=e.getSetting("columnHeaders").length;s<n;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(u.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const n=this.getRow(t);if(!n&&t>=0)throw new Error("TR was expected to be rendered but is not");const r=n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(e){let t=null,o=null;var s,n;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(e),s=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):o,n=(o<0?this.THEAD:this.TBODY).childNodes[s];return null==n?void 0:n.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],n=null==o?void 0:o.childNodes[s];n&&t.push(n)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let n=(0,r.index)(o),i=t.cellIndex;if((0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(n-=s.childNodes.length);else if((0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM,t,this.wtRootElement)){n=this.wtSettings.getSetting("totalRows")-s.childNodes.length+n}else n=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(n):this.rowFilter.renderedToSource(n);return i=(0,r.overlayContainsElement)(u.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_INLINE_START,t,this.wtRootElement)||(0,r.overlayContainsElement)(u.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(i):this.columnFilter.visibleRowHeadedColumnToSourceColumn(i),this.wot.createCellCoords(n,i)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,n,i;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,r.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),n=this.getTrForRow(s),i=n.querySelector("th"),o=i?(0,r.innerHeight)(i):(0,r.innerHeight)(n)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.outerWidth)(this.TABLE)}getHeight(){return(0,r.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,r.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,i.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}};t.default=g},(e,t)=>{"use strict";t.__esModule=!0;var o=class{constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},(e,t)=>{"use strict";t.__esModule=!0;var o=class{constructor(e,t,o){this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}};t.default=o},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(168));t.RowHeadersRenderer=n.default;var r=s(o(177));t.ColumnHeadersRenderer=r.default;var i=s(o(178));t.ColGroupRenderer=i.default;var l=s(o(179));t.RowsRenderer=l.default;var a=s(o(180));t.CellsRenderer=a.default;var h=s(o(181));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:c,columnUtils:d,cellRenderer:u}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:u}),this.renderer.setRenderers({rowHeaders:new n.default,columnHeaders:new r.default(t),colGroup:new i.default(o),rows:new l.default(s),cells:new a.default}),this.renderer.setAxisUtils(c,d)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(169),r=s(o(175));class i extends r.default{constructor(){super("TH"),this.orderViews=new WeakMap,this.sourceRowIndex=0}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new n.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:s,cells:n}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),i=s.getRenderedNode(r);this.sourceRowIndex=e;const l=this.obtainOrderView(i),a=n.obtainOrderView(i);l.appendView(a).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){l.render();const o=l.getCurrentNode();o.className="",o.removeAttribute("style"),t[s](e,o,s)}l.end()}}}t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(170));t.OrderView=n.default;var r=s(o(174));t.SharedOrderView=r.default},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(171),r=s(o(172));t.default=class{constructor(e,t,o){this.rootNode=e,this.nodesPool=t,this.sizeSet=new r.default,this.childNodeType=o.toUpperCase(),this.visualIndex=0,this.collectedNodes=[]}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(n.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let r=this.getRenderedChildCount();for(;r<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),r+=1}const i=o&&t.isPlaceOn(n.WORKING_SPACE_TOP);for(;r>s;)e.removeChild(i?e.firstChild:e.lastChild),r-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(n.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0;t.WORKING_SPACE_TOP=1;t.WORKING_SPACE_BOTTOM=2},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(173)),r=o(171);t.default=class{constructor(){this.size=new n.default,this.workingSpace=r.WORKING_SPACE_ALL,this.sharedSize=null}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof n.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=r.WORKING_SPACE_TOP,e.workingSpace=r.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=r.WORKING_SPACE_BOTTOM,e.workingSpace=r.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.currentSize=0,this.nextSize=0,this.currentOffset=0,this.nextOffset=0}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(170));class r extends n.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(176));t.default=class{constructor(e,t){this.nodesPool="string"==typeof e?new n.default(e):null,this.nodeType=e,this.rootNode=t,this.table=null,this.renderedNodes=0}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=s(o(175));class i extends r.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let o=this.rootNode.firstChild;if(e){const{columnsToRender:s}=this.table,n=s+t;for(let t=0,s=e;t<s;t++){for(o=this.rootNode.childNodes[t],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<n;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>n;)o.removeChild(o.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>e)for(let t=e;t<r;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,n.empty)(o)}render(){const{columnHeadersCount:e}=this.table;for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,n=this.rootNode.childNodes[t];for(let r=-1*s;r<o;r+=1){const o=this.table.renderedColumnToSource(r),i=n.childNodes[r+s];i.className="",i.removeAttribute("style"),e[t](o,i,t)}}}}t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(175)),r=o(107);class i extends n.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),o=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${o}px`}for(let o=0;o<e;o++){const e=this.table.renderedColumnToSource(o),s=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[o+t].style.width=`${s}px`}const o=this.rootNode.firstChild;o&&(0,r.addClass)(o,"rowHeader")}}t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(124),r=o(112),i=o(169),l=s(o(175));let a=!1;class h extends l.default{constructor(e){super("TR",e),this.orderView=new i.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!a&&e>1e3&&(a=!0,(0,n.warn)(r.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\x20
25
- the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let t=0;t<e;t++)this.orderView.render();this.orderView.end()}}t.default=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=o(169),i=s(o(175));class l extends i.default{constructor(){super("TD"),this.orderViews=new WeakMap,this.sourceRowIndex=0}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),i=o.getRenderedNode(r);this.sourceRowIndex=e;const l=this.obtainOrderView(i),a=s.obtainOrderView(i);l.prependView(a).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){l.render();const t=l.getCurrentNode(),s=this.table.renderedColumnToSource(o);(0,n.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),this.table.cellRenderer(e,s,t)}l.end()}}}t.default=l},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107);t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t,this.headerWidths=new Map}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let o=this.getWidth(e);if(t){const s=t.getStretchedColumnWidth(e,o);s&&(o=s)}return o}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:o,cloneSource:n}=this.dataAccessObject,r=n?n.wtTable.holder:t.holder,i=r.offsetHeight<r.scrollHeight?(0,s.getScrollbarWidth)():0;let l=e.getSetting("rowHeaderWidth");if(o.columnsRenderCalculator.refreshStretching(o.getViewportWidth()-i),l=e.getSetting("onModifyRowHeaderWidth",l),null!=l){const t=e.getSetting("rowHeaders").length,o=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(l)?l[e]:l;t=null==t?o:t,this.headerWidths.set(e,t)}}}}},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=o(116),l=o(113),a=o(124),h=o(187),c=s(o(188));t.Overlay=class{constructor(e,t,o,s,l){(0,n.default)(this,"wtSettings",null),(0,i.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=l,this.facadeGetter=t,this.wtSettings=s;const{TABLE:a,hider:h,spreader:c,holder:d,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=a,this.hider=h,this.spreader=c,this.holder=d,this.wtRootElement=u,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,a.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,n=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),i=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(l),top:l.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let d=null;return d=s?this.getRelativeCellPositionWithinWindow(r,n,c,h):this.getRelativeCellPositionWithinHolder(r,i,n,c,h),d}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const n=this.wot.wtTable.wtRootElement.getBoundingClientRect();let i=0,l=0;if(t){let e=n.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(n.left+n.width+(0,r.getScrollbarWidth)())),i=e<=0?-1*e:0}else i=s.start;if(e){l=this.clone.wtTable.TABLE.getBoundingClientRect().top-n.top}else l=s.top;return{start:o.start+i,top:o.top+l}}getRelativeCellPositionWithinHolder(e,t,o,s,n){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),i=this.wot.wtOverlays.topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=r-n.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();a=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(a=i-n.top);return{start:s.start-l,top:s.top-a}}makeClone(){if(-1===h.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=t.createElement("DIV"),n=t.createElement("TABLE"),i=e.wtRootElement.parentNode;s.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,n.className=e.TABLE.className,s.appendChild(n),i.appendChild(s);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===h.CLONE_TOP||"vertical"===l&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(i).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new c.default(n,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,s=t.style,n=e.parentNode.style;(0,l.arrayEach)([o,s,n],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},(e,t)=>{"use strict";t.__esModule=!0;const o="top";t.CLONE_TOP=o;const s="bottom";t.CLONE_BOTTOM=s;const n="inline_start";t.CLONE_INLINE_START=n;const r="top_inline_start_corner";t.CLONE_TOP_INLINE_START_CORNER=r;const i="bottom_inline_start_corner";t.CLONE_BOTTOM_INLINE_START_CORNER=i;const l=[o,s,n,r,i];t.CLONE_TYPES=l;const a=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[n,`ht_clone_${n} ht_clone_left`],[r,`ht_clone_${r} ht_clone_top_left_corner`],[i,`ht_clone_${i} ht_clone_bottom_left_corner`]]);t.CLONE_CLASS_NAMES=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=s(o(158)),i=s(o(189));class l extends i.default{constructor(e,t,o){super(e,t),(0,n.default)(this,"cloneSource",void 0),(0,n.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new r.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=l},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=o(107),i=o(108),l=s(o(126)),a=s(o(190)),h=s(o(154)),c=s(o(155));t.default=class{get eventManager(){return new l.default(this)}constructor(e,t){(0,n.default)(this,"wtTable",void 0),(0,n.default)(this,"wtScroll",void 0),(0,n.default)(this,"wtViewport",void 0),(0,n.default)(this,"wtOverlays",void 0),(0,n.default)(this,"selectionManager",void 0),(0,n.default)(this,"wtEvent",void 0),(0,n.default)(this,"guid",`wt_${(0,i.randomString)()}`),(0,n.default)(this,"drawInterrupted",!1),(0,n.default)(this,"drawn",!1),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new a.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,r.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new c.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),n=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<n)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<n&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<n)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,n){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(107);var i=class{constructor(e){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"lastScrolledColumnPos",-1),(0,n.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const r=this.scrollViewportHorizontally(e.col,o,n),i=this.scrollViewportVertically(e.row,t,s);return r||i}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),l=void 0===t&&void 0===o,{fixedColumnsStart:a,inlineStartOverlay:h}=this.dataAccessObject;if(l&&e<a)return!1;let c=!1;return-1===r?c=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(c=h.scrollTo(e,l?e>i:t)),c&&(this.lastScrolledColumnPos=e),c}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),l=void 0===t&&void 0===o,{fixedRowsBottom:a,fixedRowsTop:h,topOverlay:c}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let d=!1;return-1===r?d=c.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(d=c.scrollTo(e,l?e>i:o)),d&&(this.lastScrolledRowPos=e),d}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,fixedRowsTop:n,rootWindow:i}=this.dataAccessObject;let l=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),h=(0,r.innerHeight)(t.hider),c=(0,r.innerHeight)(i),d=(0,r.getScrollTop)(i,i);if(a.top+h-c<=d){let t=o.getColumnHeaderHeight();t+=e.sumCellSizes(0,n);for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),a.top+h-t<=d){l=o;break}}}return l}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:n}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.getScrollTop)(n,n);if(l.top>a){const t=(0,r.innerHeight)(n);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),l.top+h-a>=t){i=o-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:o,totalColumns:s,rootWindow:n}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.innerWidth)(t.hider),h=(0,r.innerWidth)(n),c=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=c){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=c){i=o;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:n,rootWindow:i}=this.dataAccessObject;let l=o.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let a=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(i,i));if(a>h){const e=(0,r.innerWidth)(i);let o=s.getRowHeaderWidth();for(let s=1;s<=n;s++)if(o+=t.sumCellSizes(s-1,s),a+o-h>=e){l=s-2;break}}}return l}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=s(o(192)),l=o(186),a=o(187);class h extends l.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_BOTTOM,o,s),(0,n.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const n=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),n}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let n=0;t.hasVerticalScroll()||(n+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(n+=(0,r.getScrollbarWidth)(o)),s.style.bottom=`${n}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,n=s.getSetting("defaultRowHeight");let r=e,i=0;for(;r<t;){const e=o.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=(0,r.getScrollbarWidth)(o),i=this.clone.wtTable.holder.parentNode.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===l){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=n),o=Math.min(o,e.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let n=0;t&&s.offsetHeight!==s.clientHeight&&(n=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=n,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let n=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,r.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(t,"innerBorderBottom"),n=!o):((0,r.removeClass)(t,"innerBorderBottom"),n=o)}return n}}t.BottomOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(184)),i=s(o(193)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(107),r=s(o(195)),i=o(186),l=o(197),a=o(187);class h extends i.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==t||s&&"horizontal"===s?(r=this.getScrollPosition(),(0,n.resetCssTransform)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,n.setOverlayPosition)(o,`${r}px`,"0px"));const i=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),i}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,n.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,n=0;for(;s<t;)n+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,n.getScrollbarWidth)(t),r=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===i){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),r.height=`${t}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const l=(0,n.outerWidth)(this.clone.wtTable.TABLE);r.width=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&s.offsetWidth!==s.clientWidth&&(r=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,n.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,o=this.wtSettings.getSetting("rowHeaders"),s=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,n.removeClass)(t,"emptyRows"):(0,n.addClass)(t,"emptyRows");let r=!1;if(s&&!o.length)(0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!s&&o.length){const o=(0,n.hasClass)(t,"innerBorderInlineStart");e?((0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart"),r=!o):((0,n.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),r=o)}return r}}t.InlineStartOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(196)),i=s(o(185)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},r=s(o(198));t.Selection=r.default;var i=o(200);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}));var l=o(201);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}));var a=o(202);t.SelectionManager=a.SelectionManager},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=s(o(199));class i{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,n.mixin)(i,r.default);var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(116),n=o(114);const r={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,o,s,r,i,l){if(this._localHooks[e]){const a=this._localHooks[e].length;for(let h=0;h<a;h++)(0,n.fastCall)(this._localHooks[e][h],this,t,o,s,r,i,l)}},clearLocalHooks(){return this._localHooks={},this}};(0,s.defineGetter)(r,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var i=r;t.default=i},(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header";t.HEADER_TYPE="header";t.AREA_TYPE="area";t.FOCUS_TYPE="focus";t.FILL_TYPE="fill";t.ROW_TYPE="row";t.COLUMN_TYPE="column";t.CUSTOM_SELECTION_TYPE="custom-selection"},(e,t)=>{"use strict";t.__esModule=!0;const o=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});t.CORNER_DEFAULT_STYLE=o},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(203);var n=s(o(140)),r=s(o(143)),i=o(107),l=o(204),a=s(o(205));function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var d=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,C=new WeakSet;function w(){const e=(0,n.default)(this,f).get((0,n.default)(this,d)),t=(0,n.default)(this,d).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{const t=(0,n.default)(this,d).wtTable.TABLE.querySelectorAll(`.${e}`);for(let o=0,s=t.length;o<s;o++)(0,i.removeClass)(t[o],e)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;c(t=this,o=C),o.add(t),h(this,d,{writable:!0,value:void 0}),h(this,u,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:new l.SelectionScanner}),h(this,f,{writable:!0,value:new WeakMap}),h(this,p,{writable:!0,value:new WeakSet}),h(this,m,{writable:!0,value:new Map}),(0,r.default)(this,u,e)}setActiveOverlay(e){return(0,r.default)(this,d,e),(0,n.default)(this,g).setActiveOverlay((0,n.default)(this,d)),(0,n.default)(this,f).has((0,n.default)(this,d))||(0,n.default)(this,f).set((0,n.default)(this,d),new Set),this}getFocusSelection(){return null!==(0,n.default)(this,u)?(0,n.default)(this,u).getFocus():null}getAreaSelection(){return null!==(0,n.default)(this,u)?(0,n.default)(this,u).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,n.default)(this,m).has(e)){const t=(0,n.default)(this,m).get(e);if(t.has((0,n.default)(this,d)))return t.get((0,n.default)(this,d));const o=new a.default((0,n.default)(this,d),e.settings);return t.set((0,n.default)(this,d),o),o}const t=new a.default((0,n.default)(this,d),e.settings);return(0,n.default)(this,m).set(e,new Map([[(0,n.default)(this,d),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=(0,n.default)(this,m).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){(0,n.default)(this,m).get(e).forEach((e=>e.destroy())),(0,n.default)(this,m).delete(e)}render(e){if(null===(0,n.default)(this,u))return;e&&function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,C,w).call(this);const t=Array.from((0,n.default)(this,u)),o=new Map;for(let e=0;e<t.length;e++){const s=t[e],{className:r,createLayers:i,selectionType:l}=s.settings;(0,n.default)(this,p).has(s)||((0,n.default)(this,p).add(s),s.addLocalHook("destroy",(()=>this.destroyBorders(s))));const a=this.getBorderInstance(s);if(s.isEmpty()){null==a||a.disappear();continue}if(r){(0,n.default)(this,g).setActiveSelection(s).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(r)&&!0===i?t.set(r,t.get(r)+1):t.set(r,1)}else o.set(e,new Map([[r,1]]))}))}const h=s.getCorners();(0,n.default)(this,d).getSetting("onBeforeDrawBorders",h,l),null==a||a.appear(h)}o.forEach(((e,t)=>{const o=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();o.forEach((e=>(0,n.default)(this,f).get((0,n.default)(this,d)).add(e))),(0,i.addClass)(t,o)}))}}},(e,t,o)=>{o(148)("flat")},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(107);function l(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var c=new WeakMap,d=new WeakMap,u=new WeakSet;function g(e){const{wtTable:t}=(0,n.default)(this,d),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let n=0;n<o;n+=1){const o=t.rowFilter.renderedToSource(n);for(let n=0;n<s;n+=1)e(o,t.columnFilter.renderedToSource(n))}}t.SelectionScanner=class{constructor(){var e,t;a(e=this,t=u),t.add(e),l(this,c,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,d,e),this}setActiveSelection(e){return(0,r.default)(this,c,e),this}scan(){const e=(0,n.default)(this,c).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:i}=(0,n.default)(this,d),l=i.getRenderedColumnsCount(),a=i.getColumnHeadersCount();let h=0;for(let u=-i.getRowHeadersCount();u<l;u++){const l=i.columnFilter.renderedToSource(u);if(!(l<o||l>r)){for(let u=-a;u<0;u++){if(u<t||u>s)continue;const g=u+a;let f=i.getColumnHeader(l,g);const p=(0,n.default)(this,d).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:(0,n.default)(this,c).settings.selectionType,columnCursor:h,selectionWidth:r-o+1});null!==p&&(p!==l&&(f=i.getColumnHeader(p,g)),e(f))}h+=1}}}scanRowsInHeadersRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:i}=(0,n.default)(this,d),l=i.getRenderedRowsCount(),a=i.getRowHeadersCount();let h=0;for(let u=-i.getColumnHeadersCount();u<l;u++){const l=i.rowFilter.renderedToSource(u);if(!(l<t||l>s)){for(let u=-a;u<0;u++){if(u<o||u>r)continue;const g=u+a;let f=i.getRowHeader(l,g);const p=(0,n.default)(this,d).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:(0,n.default)(this,c).settings.selectionType,rowCursor:h,selectionHeight:s-t+1});null!==p&&(p!==l&&(f=i.getRowHeader(p,g)),e(f))}h+=1}}}scanCellsRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:l}=(0,n.default)(this,d);h(this,u,g).call(this,((a,h)=>{if(a>=t&&a<=s&&h>=o&&h<=r){const t=l.getCell((0,n.default)(this,d).createCellCoords(a,h)),o=(0,n.default)(this,d).getSetting("onAfterDrawSelection",a,h,(0,n.default)(this,c).settings.layerLevel);"string"==typeof o&&(0,i.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,n.default)(this,c).getCorners(),{wtTable:s}=(0,n.default)(this,d);h(this,u,g).call(this,((r,i)=>{if(r>=t&&r<=o){const t=s.getCell((0,n.default)(this,d).createCellCoords(r,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,n.default)(this,c).getCorners(),{wtTable:s}=(0,n.default)(this,d);h(this,u,g).call(this,((r,i)=>{if(i>=t&&i<=o){const t=s.getCell((0,n.default)(this,d).createCellCoords(r,i));e(t)}}))}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107),n=o(121),r=o(116),i=o(115),l=o(201);var a=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=l.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,n.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(n){var i;((i=n).clientY<Math.floor(r.top)||i.clientY>Math.ceil(r.top+r.height)||i.clientX<Math.floor(r.left)||i.clientX>Math.ceil(r.left+r.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let n=0;n<5;n++){const r=o[n],i=t.createElement("div");i.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),s=i.style,s.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,s.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,s.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,this.main.appendChild(i)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,i.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:n}=this.wot;let r=n.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",n.bordersHolder=r,n.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,r.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,r.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,n,r){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),u=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-u-1,10)}px`,l[i]=`${parseInt(s-u-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[i]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+n,10),f-u-2*d),C=Math.min(parseInt(s+n-g/4,10),f-g-2*d);h[i]=`${m}px`,c[i]=`${C}px`;const w=Math.min(parseInt(o+r,10),p-u-2*d),y=Math.min(parseInt(o+r-g/4,10),p-g-2*d);h.top=`${w}px`,c.top=`${y}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",a.display="none",c.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:n}=this.wot;let r,l,a,h,c,d;const u=t.getRenderedRowsCount();for(let o=0;o<u;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){r=s,c=e[0];break}}for(let o=u-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){l=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){a=s,d=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===r||void 0===a)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(r,a));const p=r!==l||a!==h,m=p?t.getCell(this.wot.createCellCoords(l,h)):f,C=(0,s.offset)(f),w=p?(0,s.offset)(m):C,y=(0,s.offset)(t.TABLE),v=(0,s.outerWidth)(t.TABLE),S=C.top,E=C.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,T=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-y.left-v;T=E+e-w.left,b=n.innerWidth-E-e-t-1}else T=w.left+(0,s.outerWidth)(m)-E,b=E-y.left-1;if(this.isEntireColumnSelected(r,l)){const e=this.getDimensionsFromHeader("columns",a,h,c,y);let t=null;e&&([t,b,T]=e),t&&(f=t)}let _=S-y.top-1,M=w.top+(0,s.outerHeight)(m)-S;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",r,l,d,y);let t=null;e&&([t,_,M]=e),t&&(f=t)}const O=(0,s.getComputedStyle)(f,n);parseInt(O.borderTopWidth,10)>0&&(_+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,T=T>0?T-1:0);const I=R?"right":"left";this.topStyle.top=`${_}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${T}px`,this.topStyle.display="block",this.startStyle.top=`${_}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=_+M-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${T}px`,this.bottomStyle.display="block",this.endStyle.top=`${_}px`,this.endStyle[I]=b+T-N+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[x,H]=[l,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,i.isMobileBrowser)()||!A||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=_+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+T+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const r=e===n;r&&(e=o.documentElement);const i=parseInt(this.cornerDefaultStyle.width,10)/2,a=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=r?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,n=0;R?(n=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=n<0):(n=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=n>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+T+this.cornerCenterPointOffset-i)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(l===this.wot.getSetting("totalRows")-1){(r?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(_+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(l,h,_,b,T,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,n,r){const{wtTable:i}=this.wot,l=i.wtRootElement.parentNode;let a=null,h=null,c=null,d=null,u=null,g=null,f=null,p=null;switch(e){case"rows":a=function(){return i.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},c="ht__selection--rows",g="top";break;case"columns":a=function(){return i.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},c="ht__selection--columns",g="left"}if(l.classList.contains(c)){const e=this.wot.getSetting("columnHeaders").length;if(f=a(t,e-n),p=a(o,e-n),!f||!p)return!1;const i=(0,s.offset)(f),l=(0,s.offset)(p);return f&&p&&(d=i[g]-r[g]-1,u=l[g]+h(p)-i[g]),[f,d,u]}return!1}changeBorderStyle(e,t){const o=this[e].style,n=t[e];!n||n.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=n.color,"top"!==e&&"bottom"!==e||(o.height=`${n.width}px`),"start"!==e&&"end"!==e||(o.width=`${n.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,i.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}};t.default=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(107),i=s(o(207)),l=o(186),a=o(187);class h extends l.Overlay{constructor(e,t,o,s,r,i){super(e,t,a.CLONE_TOP_INLINE_START_CORNER,o,s),(0,n.default)(this,"topOverlay",void 0),(0,n.default)(this,"inlineStartOverlay",void 0),this.topOverlay=r,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,r.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,r.resetCssTransform)(e);let t=(0,r.outerHeight)(this.clone.wtTable.TABLE);const o=(0,r.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(208)),i=s(o(185)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=s(o(210)),l=o(186),a=o(197),h=o(187);class c extends l.Overlay{constructor(e,t,o,s){super(e,t,h.CLONE_TOP,o,s),(0,n.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,n=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();n=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,r.setOverlayPosition)(e,"0px",`${s}px`)}const i=this.adjustHeaderBordersPosition(s,n);return this.adjustElementsSize(),i}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,n=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);n+=void 0===e?o:e,s+=1}return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,r.getScrollbarWidth)(t),n=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===i){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),n.width=`${t}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,n=(o.cloneSource?o.cloneSource:o).wtTable.holder;let i=this.getTableParentOffset(),l=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&n.offsetHeight!==n.clientHeight&&(l=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),n=s.getSetting("totalRows");i+=this.sumCellSizes(0,e+1),i-=o.wtViewport.getViewportHeight()-this.sumCellSizes(n-t,n),i+=1}else i+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return i+=l,this.setScrollPosition(i)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,r.removeClass)(o,"emptyColumns"):(0,r.addClass)(o,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),n=this.cachedFixedRowsTop!==t,i=this.wtSettings.getSetting("columnHeaders");if((n||0===t)&&i.length>0){const t=(0,r.hasClass)(o,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(o,"innerBorderTop"),s=!t):((0,r.removeClass)(o,"innerBorderTop"),s=t)}}return s}}t.TopOverlay=c},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(208)),i=s(o(193)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=o(116);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=s(o(164)),i=s(o(196)),l=s(o(193)),a=o(116);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),r=(0,n.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let{width:h,height:c}=e.getBoundingClientRect();if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,n.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(c=0)}c=Math.min(c,a),i.height="auto"===s?"auto":`${c}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||c>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,l.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107),n=o(116),r=o(214);var i=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),c=r-(a?h.right-r:h.left);let d,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(c,r):Math.min(this.getContainerFillWidth(),c,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>d)return t.documentElement.clientWidth;if(n!==o&&(u=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===u||"hidden"===u||"auto"===u))return Math.max(d,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?d:Math.max(d,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n,i,l;this.rowHeaderWidth=NaN,n=t.getSetting("renderAllRows")&&e===r.RENDER_TYPE?1/0:this.getViewportHeight();let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),d=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),c&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(d-c,d),n-=l),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportSize:n,scrollOffset:a,totalItems:t.getSetting("totalRows"),itemSizeFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,scrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);i+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportSize:n,scrollOffset:i,totalItems:t.getSetting("totalColumns"),itemSizeFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:(e,o)=>t.getSetting("onBeforeStretchingColumnWidth",e,o),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),o=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:n,endRow:r}=this.rowsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:n,endColumn:r}=this.columnsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},r=s(o(146));t.ViewportColumnsCalculator=r.default;var i=s(o(153));t.ViewportRowsCalculator=i.default;var l=o(152);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:o,selection:n,controller:r,cellCoordsFactory:l}=t;i.get(e.type)({coords:o,selection:n,controller:r,cellCoordsFactory:l,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})},t.mouseDown=n,t.mouseOver=r;var s=o(121);function n(e){let{isShiftKey:t,isLeftClick:o,isRightClick:s,coords:n,selection:r,controller:i,cellCoordsFactory:l}=e;const a=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),c=r.isSelectedByRowHeader();if(t&&a)n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(n):(h||c)&&n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(l(n.row,n.col)):h&&n.row<0&&!i.column?r.setRangeEnd(l(a.to.row,n.col)):c&&n.col<0&&!i.row?r.setRangeEnd(l(n.row,a.to.col)):(!h&&!c&&n.col<0||h&&n.col<0)&&!i.row?r.selectRows(Math.max(a.from.row,0),n.row,n.col):(!h&&!c&&n.row<0||c&&n.row<0)&&!i.column&&r.selectColumns(Math.max(a.from.col,0),n.col,n.row);else{const e=!r.inInSelection(n),t=o||s&&e;n.row<0&&n.col>=0&&!i.column?t&&r.selectColumns(n.col,n.col,n.row):n.col<0&&n.row>=0&&!i.row?t&&r.selectRows(n.row,n.row,n.col):n.col>=0&&n.row>=0&&!i.cell?t&&r.setRangeStart(n):n.col<0&&n.row<0&&r.selectAll(!1,!1,n)}}function r(e){let{isLeftClick:t,coords:o,selection:s,controller:n,cellCoordsFactory:r}=e;if(!t)return;const i=s.isSelectedByRowHeader(),l=s.isSelectedByColumnHeader(),a=s.tableProps.countCols(),h=s.tableProps.countRows();l&&!n.column?s.setRangeEnd(r(h-1,o.col)):i&&!n.row?s.setRangeEnd(r(o.row,a-1)):n.cell||s.setRangeEnd(o)}const i=new Map([["mousedown",n],["mouseover",r],["touchstart",n]])},(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=new WeakMap;t.holder=o;const s=Symbol("rootInstance");t.rootInstanceSymbol=s},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(116),n=o(218),r=o(113),i=o(130),l=o(114);var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.hot=e,this.data=t,this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{}}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,r.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=void 0===t&&void 0===o;let a=null,h=null;if(a=this.modifyRowData(e),Array.isArray(a))h=[],r?a.forEach(((t,o)=>{h[o]=this.getAtPhysicalCell(e,o,a)})):(0,i.rangeEach)(t,o,(o=>{h[o-t]=this.getAtPhysicalCell(e,o,a)}));else if((0,s.isObject)(a)||(0,l.isFunction)(a))if(h=n?[]:{},!r||n){const r=0,l=this.countFirstRowKeys()-1;(0,i.rangeEach)(r,l,(i=>{const c=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(c)){const t=this.getAtPhysicalCell(e,c,a);n?h.push(t):(0,s.setProperty)(h,c,t)}}))}else(0,s.objectEach)(a,((t,o)=>{(0,s.setProperty)(h,o,this.getAtPhysicalCell(e,o,a))}));return h}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,s.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(o=n.value)}Number.isInteger(t)?this.data[e][t]=o:(0,s.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let n=null;if(o&&(n="string"==typeof t?(0,s.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,s.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,r=null,l=null,a=null;null===e||null===t?(s=!0,n=0,l=this.countRows()-1):(n=Math.min(e.row,t.row),r=Math.min(e.col,t.col),l=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,i.rangeEach)(n,l,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=a},(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(i(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=i(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=i,o(8);var s=o(116);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=n.length;function i(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},n=o(220);t.IndexMapper=n.IndexMapper;var r=o(234);t.getRegisteredMapsCounter=r.getRegisteredMapsCounter;var i=o(231);t.getIncreasedIndexes=i.getIncreasedIndexes,t.getDecreasedIndexes=i.getDecreasedIndexes,t.alterUtilsFactory=i.alterUtilsFactory;var l=o(221);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(113),r=o(221),i=o(232),l=s(o(199)),a=o(116),h=o(110),c=o(235);new Set;class d{constructor(){this.indexesSequence=new r.IndexesSequence,this.trimmingMapsCollection=new i.AggregatedCollection((e=>e.some((e=>!0===e))),!1),this.hidingMapsCollection=new i.AggregatedCollection((e=>e.some((e=>!0===e))),!1),this.variousMapsCollection=new i.MapCollection,this.hidingChangesObservable=new c.ChangesObservable({initialIndexValue:!1}),this.notTrimmedIndexesCache=[],this.notHiddenIndexesCache=[],this.isBatched=!1,this.indexesSequenceChanged=!1,this.indexesChangeSource=void 0,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1,this.renderablePhysicalIndexesCache=[],this.fromPhysicalToVisualIndexesCache=new Map,this.fromVisualToRenderableIndexesCache=new Map,this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,r.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof r.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof r.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,h.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,h.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let n=-1;return n=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===n?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[n]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,n.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),i=e.length,l=(0,r.getListWithRemovedItems)(this.getIndexesSequence(),o),a=l.filter((e=>!1===this.isTrimmed(e)));let h=l.indexOf(a[a.length-1])+1;if(t+i<s){const e=a[t];h=l.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,r.getListWithInsertedItems)(l,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,h.isDefined)(o)?o:this.getNumberOfIndexes(),r=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),i=(0,n.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(r,i),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(r,i),this.hidingMapsCollection.insertToEvery(r,i),this.variousMapsCollection.insertToEvery(r,i),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=d,(0,a.mixin)(d,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!d.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(d.get(e))(t)},o(78);var n=o(222);t.HidingMap=n.HidingMap;var r=o(224);t.IndexMap=r.IndexMap;var i=o(226);t.LinkedPhysicalIndexToValueMap=i.LinkedPhysicalIndexToValueMap;var l=o(223);t.PhysicalIndexToValueMap=l.PhysicalIndexToValueMap;var a=o(229);t.TrimmingMap=a.TrimmingMap;var h=o(230);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var c=o(227);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const d=new Map([["hiding",n.HidingMap],["index",r.IndexMap],["linkedPhysicalIndexToValue",i.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",l.PhysicalIndexToValueMap],["trimming",a.TrimmingMap]])},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(223),n=o(113);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(224),n=o(225);class r extends s.IndexMap{insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(130),r=o(116),i=o(114),l=s(o(199));class a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.indexedValues=[],this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,i.isFunction)(this.initValueOrFn)?(0,n.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,n.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=a,(0,r.mixin)(a,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,n){const r=o.length?o[0]:void 0;return[...e.slice(0,r),...o.map(((e,t)=>(0,s.isFunction)(n)?n(e,t):n)),...void 0===r?[]:e.slice(r)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(114),n=o(113)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(224),i=o(225),l=o(227),a=o(228),h=o(114);class c extends r.IndexMap{constructor(){super(...arguments),(0,n.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,i.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,a.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,i.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,a.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=c},(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(113)},(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],n=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+n:e))};var s=o(113)},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(223),n=o(113);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(224),n=o(227),r=o(231);class i extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,r.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,n.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,n.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,r.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=i},(e,t,o)=>{"use strict";t.__esModule=!0,o(78);var s=o(228);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var n=o(227),r=o(225);const i=new Map([["indexesSequence",{getListWithInsertedItems:n.getListWithInsertedItems,getListWithRemovedItems:n.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:r.getListWithInsertedItems,getListWithRemovedItems:r.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===i.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return i.get(e)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(233);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(234);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(234),n=o(113),r=o(110);class i extends s.MapCollection{constructor(e,t){super(),this.mergedValuesCache=[],this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,n.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,r.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,n.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,r.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l};var n=o(110),r=o(116),i=s(o(199));let l=0;class a{constructor(){this.collection=new Map}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,n.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,n.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=a,(0,r.mixin)(a,i.default)},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(236),l=o(237);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,h,{writable:!0,value:new Set}),a(this,c,{writable:!0,value:[]}),a(this,d,{writable:!0,value:[]}),a(this,u,{writable:!0,value:!1}),a(this,g,{writable:!0,value:!1}),(0,r.default)(this,g,null!=e&&e)}createObserver(){const e=new i.ChangesObserver;return(0,n.default)(this,h).add(e),e.addLocalHook("unsubscribe",(()=>{(0,n.default)(this,h).delete(e)})),e._writeInitialChanges((0,l.arrayDiff)((0,n.default)(this,c),(0,n.default)(this,d))),e}emit(e){let t=(0,n.default)(this,d);(0,n.default)(this,u)&&(0,n.default)(this,c).length===e.length||(0===e.length?e=new Array(t.length).fill((0,n.default)(this,g)):(0,r.default)(this,c,new Array(e.length).fill((0,n.default)(this,g))),(0,n.default)(this,u)||((0,r.default)(this,u,!0),t=(0,n.default)(this,c)));const o=(0,l.arrayDiff)(t,e);(0,n.default)(this,h).forEach((e=>e._write(o))),(0,r.default)(this,d,e)}}},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(143)),r=s(o(140)),i=o(116),l=s(o(199));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class c{constructor(){a(this,h,{writable:!0,value:[]})}subscribe(e){return this.addLocalHook("change",e),this._write((0,r.default)(this,h)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){(0,n.default)(this,h,e)}}t.ChangesObserver=c,(0,i.mixin)(c,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,n=0;for(;s<e.length&&n<t.length;s++,n++)e[s]!==t[n]&&o.push({op:"replace",index:n,oldValue:e[s],newValue:t[n]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;n<e.length;n++)o.push({op:"remove",index:n,oldValue:e[n],newValue:void 0});return o},o(8)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getDefaultLanguageDictionary=function(){return c.default},t.getLanguageDictionary=y,t.getLanguagesDictionaries=function(){return C()},t.getTranslatedPhrase=function(e,t,o){const s=y(e);if(null===s)return null;const n=s[t];if((0,i.isUndefined)(n))return null;const l=function(e,t){let o=e;return(0,r.arrayEach)((0,h.getPhraseFormatters)(),(s=>{o=s(e,t)})),o}(n,o);if(Array.isArray(l))return l[0];return l},t.getValidLanguageCode=function(e){let t=(0,l.normalizeLanguageCode)(e);v(t)||(t=g,(0,l.warnUserAboutLanguageRegistration)(e));return t},t.hasLanguageDictionary=v,t.registerLanguageDictionary=w;var n=o(116),r=o(113),i=o(110),l=o(239),a=s(o(125)),h=o(240),c=s(o(242));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243));t.dictionaryKeys=u;const g=c.default.languageCode;t.DEFAULT_LANGUAGE_CODE=g;const{register:f,getItem:p,hasItem:m,getValues:C}=(0,a.default)("languagesDictionaries");function w(e,t){let o=e,s=t;return(0,n.isObject)(e)&&(s=e,o=s.languageCode),function(e,t){e!==g&&(0,l.extendNotExistingKeys)(t,p(g))}(o,s),f(o,(0,n.deepClone)(s)),(0,n.deepClone)(s)}function y(e){return v(e)?(0,n.deepClone)(p(e)):null}function v(e){return m(e)}w(c.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.createCellHeadersRange=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,[n,r]=[o,s];e>t&&([n,r]=[r,n]);return`${n}-${r}`},t.extendNotExistingKeys=function(e,t){return(0,n.objectEach)(t,((t,o)=>{(0,s.isUndefined)(e[o])&&(e[o]=t)})),e},t.normalizeLanguageCode=function(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);if(t)return`${t[1].toLowerCase()}-${t[2].toUpperCase()}`;return e},t.warnUserAboutLanguageRegistration=function(e){(0,s.isDefined)(e)&&(0,r.error)(i.toSingleLine`Language with code "${e}" was not found. You should register particular language\x20
26
- before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var s=o(110),n=o(116),r=o(124),i=o(112)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getPhraseFormatters=t.getAll=function(){return l()},t.registerPhraseFormatter=t.register=a;var n=s(o(125)),r=s(o(241));const{register:i,getValues:l}=(0,n.default)("phraseFormatters");function a(e,t){i(e,t)}a("pluralize",r.default)},(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}var r={languageCode:"en-US",[s.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[s.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[s.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[s.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[s.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[s.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[s.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[s.CONTEXTMENU_ITEMS_UNDO]:"Undo",[s.CONTEXTMENU_ITEMS_REDO]:"Redo",[s.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[s.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[s.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[s.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[s.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[s.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[s.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[s.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[s.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[s.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[s.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[s.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[s.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[s.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[s.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[s.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[s.CONTEXTMENU_ITEMS_COPY]:"Copy",[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[s.CONTEXTMENU_ITEMS_CUT]:"Cut",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[s.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[s.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[s.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[s.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[s.FILTERS_CONDITIONS_NONE]:"None",[s.FILTERS_CONDITIONS_EMPTY]:"Is empty",[s.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[s.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[s.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[s.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[s.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[s.FILTERS_CONDITIONS_CONTAINS]:"Contains",[s.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[s.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[s.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[s.FILTERS_CONDITIONS_BETWEEN]:"Is between",[s.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[s.FILTERS_CONDITIONS_AFTER]:"After",[s.FILTERS_CONDITIONS_BEFORE]:"Before",[s.FILTERS_CONDITIONS_TODAY]:"Today",[s.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[s.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[s.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[s.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[s.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[s.FILTERS_LABELS_CONJUNCTION]:"And",[s.FILTERS_LABELS_DISJUNCTION]:"Or",[s.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[s.FILTERS_BUTTONS_CLEAR]:"Clear",[s.FILTERS_BUTTONS_OK]:"OK",[s.FILTERS_BUTTONS_CANCEL]:"Cancel",[s.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[s.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[s.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value"};t.default=r},(e,t)=>{"use strict";t.__esModule=!0;const o="ContextMenu:items";t.CONTEXT_MENU_ITEMS_NAMESPACE=o;const s=o,n=`${s}.noItems`;t.CONTEXTMENU_ITEMS_NO_ITEMS=n;const r=`${s}.insertRowAbove`;t.CONTEXTMENU_ITEMS_ROW_ABOVE=r;const i=`${s}.insertRowBelow`;t.CONTEXTMENU_ITEMS_ROW_BELOW=i;const l=`${s}.insertColumnOnTheLeft`;t.CONTEXTMENU_ITEMS_INSERT_LEFT=l;const a=`${s}.insertColumnOnTheRight`;t.CONTEXTMENU_ITEMS_INSERT_RIGHT=a;const h=`${s}.removeRow`;t.CONTEXTMENU_ITEMS_REMOVE_ROW=h;const c=`${s}.removeColumn`;t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=c;const d=`${s}.undo`;t.CONTEXTMENU_ITEMS_UNDO=d;const u=`${s}.redo`;t.CONTEXTMENU_ITEMS_REDO=u;const g=`${s}.readOnly`;t.CONTEXTMENU_ITEMS_READ_ONLY=g;const f=`${s}.clearColumn`;t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=f;const p=`${s}.copy`;t.CONTEXTMENU_ITEMS_COPY=p;const m=`${s}.copyWithHeaders`;t.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS=m;const C=`${s}.copyWithGroupHeaders`;t.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS=C;const w=`${s}.copyHeadersOnly`;t.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY=w;const y=`${s}.cut`;t.CONTEXTMENU_ITEMS_CUT=y;const v=`${s}.freezeColumn`;t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=v;const S=`${s}.unfreezeColumn`;t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=S;const E=`${s}.mergeCells`;t.CONTEXTMENU_ITEMS_MERGE_CELLS=E;const R=`${s}.unmergeCells`;t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=R;const b=`${s}.addComment`;t.CONTEXTMENU_ITEMS_ADD_COMMENT=b;const T=`${s}.editComment`;t.CONTEXTMENU_ITEMS_EDIT_COMMENT=T;const _=`${s}.removeComment`;t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=_;const M=`${s}.readOnlyComment`;t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=M;const O=`${s}.align`;t.CONTEXTMENU_ITEMS_ALIGNMENT=O;const I=`${s}.align.left`;t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=I;const N=`${s}.align.center`;t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=N;const A=`${s}.align.right`;t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=A;const P=`${s}.align.justify`;t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=P;const x=`${s}.align.top`;t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=x;const H=`${s}.align.middle`;t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=H;const D=`${s}.align.bottom`;t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=D;const L=`${s}.borders`;t.CONTEXTMENU_ITEMS_BORDERS=L;const k=`${s}.borders.top`;t.CONTEXTMENU_ITEMS_BORDERS_TOP=k;const F=`${s}.borders.right`;t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=F;const V=`${s}.borders.bottom`;t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=V;const W=`${s}.borders.left`;t.CONTEXTMENU_ITEMS_BORDERS_LEFT=W;const B=`${s}.borders.remove`;t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=B;const U=`${s}.nestedHeaders.insertChildRow`;t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=U;const j=`${s}.nestedHeaders.detachFromParent`;t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=j;const Y=`${s}.hideColumn`;t.CONTEXTMENU_ITEMS_HIDE_COLUMN=Y;const G=`${s}.showColumn`;t.CONTEXTMENU_ITEMS_SHOW_COLUMN=G;const z=`${s}.hideRow`;t.CONTEXTMENU_ITEMS_HIDE_ROW=z;const K=`${s}.showRow`;t.CONTEXTMENU_ITEMS_SHOW_ROW=K;const $="Filters:";t.FILTERS_NAMESPACE=$;const X=`${$}conditions`;t.FILTERS_CONDITIONS_NAMESPACE=X;const q=`${X}.none`;t.FILTERS_CONDITIONS_NONE=q;const Q=`${X}.isEmpty`;t.FILTERS_CONDITIONS_EMPTY=Q;const J=`${X}.isNotEmpty`;t.FILTERS_CONDITIONS_NOT_EMPTY=J;const Z=`${X}.isEqualTo`;t.FILTERS_CONDITIONS_EQUAL=Z;const ee=`${X}.isNotEqualTo`;t.FILTERS_CONDITIONS_NOT_EQUAL=ee;const te=`${X}.beginsWith`;t.FILTERS_CONDITIONS_BEGINS_WITH=te;const oe=`${X}.endsWith`;t.FILTERS_CONDITIONS_ENDS_WITH=oe;const se=`${X}.contains`;t.FILTERS_CONDITIONS_CONTAINS=se;const ne=`${X}.doesNotContain`;t.FILTERS_CONDITIONS_NOT_CONTAIN=ne;const re=`${X}.byValue`;t.FILTERS_CONDITIONS_BY_VALUE=re;const ie=`${X}.greaterThan`;t.FILTERS_CONDITIONS_GREATER_THAN=ie;const le=`${X}.greaterThanOrEqualTo`;t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=le;const ae=`${X}.lessThan`;t.FILTERS_CONDITIONS_LESS_THAN=ae;const he=`${X}.lessThanOrEqualTo`;t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=he;const ce=`${X}.isBetween`;t.FILTERS_CONDITIONS_BETWEEN=ce;const de=`${X}.isNotBetween`;t.FILTERS_CONDITIONS_NOT_BETWEEN=de;const ue=`${X}.after`;t.FILTERS_CONDITIONS_AFTER=ue;const ge=`${X}.before`;t.FILTERS_CONDITIONS_BEFORE=ge;const fe=`${X}.today`;t.FILTERS_CONDITIONS_TODAY=fe;const pe=`${X}.tomorrow`;t.FILTERS_CONDITIONS_TOMORROW=pe;const me=`${X}.yesterday`;t.FILTERS_CONDITIONS_YESTERDAY=me;const Ce=`${$}labels.filterByCondition`;t.FILTERS_DIVS_FILTER_BY_CONDITION=Ce;const we=`${$}labels.filterByValue`;t.FILTERS_DIVS_FILTER_BY_VALUE=we;const ye=`${$}labels.conjunction`;t.FILTERS_LABELS_CONJUNCTION=ye;const ve=`${$}labels.disjunction`;t.FILTERS_LABELS_DISJUNCTION=ve;const Se=`${$}values.blankCells`;t.FILTERS_VALUES_BLANK_CELLS=Se;const Ee=`${$}buttons.selectAll`;t.FILTERS_BUTTONS_SELECT_ALL=Ee;const Re=`${$}buttons.clear`;t.FILTERS_BUTTONS_CLEAR=Re;const be=`${$}buttons.ok`;t.FILTERS_BUTTONS_OK=be;const Te=`${$}buttons.cancel`;t.FILTERS_BUTTONS_CANCEL=Te;const _e=`${$}buttons.placeholder.search`;t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=_e;const Me=`${$}buttons.placeholder.value`;t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=Me;const Oe=`${$}buttons.placeholder.secondValue`;t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=Oe},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(245));t.Selection=r.default;var i=o(215);t.handleMouseEvent=i.handleMouseEvent;var l=o(259);t.detectSelectionType=l.detectSelectionType,t.normalizeSelectionFactory=l.normalizeSelectionFactory;var a=o(246);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(145),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(246)),l=s(o(257)),a=o(116),h=o(110),c=o(130),d=o(113),u=s(o(199)),g=s(o(258)),f=o(259),p=o(112);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}class C{constructor(e,t){var o=this;(0,n.default)(this,"settings",void 0),(0,n.default)(this,"tableProps",void 0),(0,n.default)(this,"inProgress",!1),(0,n.default)(this,"selectedRange",new l.default(((e,t,o)=>this.tableProps.createCellRange(e,t,o)))),(0,n.default)(this,"highlight",void 0),(0,n.default)(this,"transformation",void 0),(0,n.default)(this,"selectedByRowHeader",new Set),(0,n.default)(this,"selectedByColumnHeader",new Set),this.settings=e,this.tableProps=t,this.highlight=new i.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,o)=>this.tableProps.createCellRange(e,t,o)}),this.transformation=new g.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertColRequire",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const n="multiple"===this.settings.selectionMode,r=(0,h.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),i),(!n||n&&!r&&(0,h.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(i).current().setHighlight(s.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,o)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),o=this.tableProps.countRows(),s=this.tableProps.countCols(),n=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((o>0||s>0)&&(0===o&&t.col<0&&!n||0===s&&t.row<0&&!n))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const r=this.selectedRange.current();this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode?(r.setFrom(r.highlight),r.setTo(r.highlight)):r.setTo(t),o>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize();const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(i.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const a=this.getLayerLevel();a<this.highlight.layerLevel&&((0,d.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(a);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),u=this.highlight.createRowHeader(),g=this.highlight.createColumnHeader(),f=this.highlight.createActiveRowHeader(),p=this.highlight.createActiveColumnHeader(),m=this.highlight.createActiveCornerHeader(),C=this.highlight.createRowHighlight(),w=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),u.clear(),g.clear(),f.clear(),p.clear(),m.clear(),C.clear(),w.clear(),this.highlight.isEnabledFor(i.AREA_TYPE,r.highlight)&&(this.isMultiple()||a>=1)&&(h.add(r.from).add(r.to).commit(),c.add(r.from).add(r.to).commit(),1===a)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(a-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(a)}if(this.highlight.isEnabledFor(i.HEADER_TYPE,r.highlight)){if(!r.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(r.from.row,0),-1),t=this.tableProps.createCellCoords(r.to.row,-1),o=this.tableProps.createCellCoords(-1,Math.max(r.from.col,0)),s=this.tableProps.createCellCoords(-1,r.to.col);"single"===this.settings.selectionMode?(u.add(e).commit(),g.add(o).commit(),C.add(e).commit(),w.add(o).commit()):(u.add(e).add(t).commit(),g.add(o).add(s).commit(),C.add(e).add(t).commit(),w.add(o).add(s).commit())}const e=this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&(this.isSelectedByRowHeader()||this.isSelectedByCorner())),t=this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&(this.isSelectedByColumnHeader()||this.isSelectedByCorner()));e&&f.add(this.tableProps.createCellCoords(Math.max(r.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(r.to.row,0),-1)).commit(),t&&p.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(r.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(r.to.col,0))).commit(),e&&t&&m.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,a.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,o))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countCols();return(o>0&&t<0||0===o)&&e.getWidth()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),s=this.tableProps.countRows();return(o>0&&t<0||0===o)&&e.getHeight()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.tableProps.countRows(),r=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),a=t?-l:0,h=o?-i:0;if(0===a&&0===h&&(0===n||0===r))return;let d=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight,u=!1;s&&Number.isInteger(null==s?void 0:s.row)&&Number.isInteger(null==s?void 0:s.col)&&(u=s.row<0&&s.col<0,d=this.tableProps.createCellCoords((0,c.clamp)(s.row,a,n-1),(0,c.clamp)(s.col,h,r-1)));const g=this.tableProps.createCellCoords(a,h),f=this.tableProps.createCellCoords(n-1,r-1);this.clear(),this.setRangeStartOnly(g,void 0,d),u?(this.selectedByRowHeader.add(this.getLayerLevel()),this.selectedByColumnHeader.add(this.getLayerLevel())):h<0?this.selectedByRowHeader.add(this.getLayerLevel()):a<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish()}selectCells(e){const t=(0,f.detectSelectionType)(e);if(t===f.SELECTION_TYPE_EMPTY)return!1;if(t===f.SELECTION_TYPE_UNRECOGNIZED)throw new Error(p.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
25
+ the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let t=0;t<e;t++)this.orderView.render();this.orderView.end()}}t.default=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=o(169),i=s(o(175));class l extends i.default{constructor(){super("TD"),this.orderViews=new WeakMap,this.sourceRowIndex=0}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),i=o.getRenderedNode(r);this.sourceRowIndex=e;const l=this.obtainOrderView(i),a=s.obtainOrderView(i);l.prependView(a).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){l.render();const t=l.getCurrentNode(),s=this.table.renderedColumnToSource(o);(0,n.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),this.table.cellRenderer(e,s,t)}l.end()}}}t.default=l},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.rowHeaders=null,this.columnHeaders=null,this.colGroup=null,this.rows=null,this.cells=null,this.rowFilter=null,this.columnFilter=null,this.rowUtils=null,this.columnUtils=null,this.rowsToRender=0,this.columnsToRender=0,this.rowHeaderFunctions=[],this.rowHeadersCount=0,this.columnHeaderFunctions=[],this.columnHeadersCount=0,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),n.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=n}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107);t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t,this.headerWidths=new Map}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let o=this.getWidth(e);if(t){const s=t.getStretchedColumnWidth(e,o);s&&(o=s)}return o}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:o,cloneSource:n}=this.dataAccessObject,r=n?n.wtTable.holder:t.holder,i=r.offsetHeight<r.scrollHeight?(0,s.getScrollbarWidth)():0;let l=e.getSetting("rowHeaderWidth");if(o.columnsRenderCalculator.refreshStretching(o.getViewportWidth()-i),l=e.getSetting("onModifyRowHeaderWidth",l),null!=l){const t=e.getSetting("rowHeaders").length,o=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(l)?l[e]:l;t=null==t?o:t,this.headerWidths.set(e,t)}}}}},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e,t){this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=o(116),l=o(113),a=o(124),h=o(187),c=s(o(188));t.Overlay=class{constructor(e,t,o,s,l){(0,n.default)(this,"wtSettings",null),(0,i.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=l,this.facadeGetter=t,this.wtSettings=s;const{TABLE:a,hider:h,spreader:c,holder:d,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=a,this.hider=h,this.spreader=c,this.holder=d,this.wtRootElement=u,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,a.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,n=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),i=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),l=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(l),top:l.offsetTop},c={start:this.getRelativeStartPosition(e),top:e.offsetTop};let d=null;return d=s?this.getRelativeCellPositionWithinWindow(r,n,c,h):this.getRelativeCellPositionWithinHolder(r,i,n,c,h),d}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const n=this.wot.wtTable.wtRootElement.getBoundingClientRect();let i=0,l=0;if(t){let e=n.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(n.left+n.width+(0,r.getScrollbarWidth)())),i=e<=0?-1*e:0}else i=s.start;if(e){l=this.clone.wtTable.TABLE.getBoundingClientRect().top-n.top}else l=s.top;return{start:o.start+i,top:o.top+l}}getRelativeCellPositionWithinHolder(e,t,o,s,n){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),i=this.wot.wtOverlays.topOverlay.getScrollPosition();let l=0,a=0;if(o||(l=r-n.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();a=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(a=i-n.top);return{start:s.start-l,top:s.top-a}}makeClone(){if(-1===h.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=t.createElement("DIV"),n=t.createElement("TABLE"),i=e.wtRootElement.parentNode;s.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,n.className=e.TABLE.className,s.appendChild(n),i.appendChild(s);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===h.CLONE_TOP||"vertical"===l&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(i).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new c.default(n,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,s=t.style,n=e.parentNode.style;(0,l.arrayEach)([o,s,n],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},(e,t)=>{"use strict";t.__esModule=!0;const o="top";t.CLONE_TOP=o;const s="bottom";t.CLONE_BOTTOM=s;const n="inline_start";t.CLONE_INLINE_START=n;const r="top_inline_start_corner";t.CLONE_TOP_INLINE_START_CORNER=r;const i="bottom_inline_start_corner";t.CLONE_BOTTOM_INLINE_START_CORNER=i;const l=[o,s,n,r,i];t.CLONE_TYPES=l;const a=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[n,`ht_clone_${n} ht_clone_left`],[r,`ht_clone_${r} ht_clone_top_left_corner`],[i,`ht_clone_${i} ht_clone_bottom_left_corner`]]);t.CLONE_CLASS_NAMES=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=s(o(158)),i=s(o(189));class l extends i.default{constructor(e,t,o){super(e,t),(0,n.default)(this,"cloneSource",void 0),(0,n.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new r.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=l},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=o(107),i=o(108),l=s(o(126)),a=s(o(190)),h=s(o(154)),c=s(o(155));t.default=class{get eventManager(){return new l.default(this)}constructor(e,t){(0,n.default)(this,"wtTable",void 0),(0,n.default)(this,"wtScroll",void 0),(0,n.default)(this,"wtViewport",void 0),(0,n.default)(this,"wtOverlays",void 0),(0,n.default)(this,"selectionManager",void 0),(0,n.default)(this,"wtEvent",void 0),(0,n.default)(this,"guid",`wt_${(0,i.randomString)()}`),(0,n.default)(this,"drawInterrupted",!1),(0,n.default)(this,"drawn",!1),(0,n.default)(this,"domBindings",void 0),(0,n.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new a.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,r.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new c.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),n=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<n)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<n&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<n)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,n){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,n)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(107);var i=class{constructor(e){(0,n.default)(this,"dataAccessObject",void 0),(0,n.default)(this,"lastScrolledColumnPos",-1),(0,n.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,n){const r=this.scrollViewportHorizontally(e.col,o,n),i=this.scrollViewportVertically(e.row,t,s);return r||i}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleColumn(),i=this.getLastVisibleColumn(),l=void 0===t&&void 0===o,{fixedColumnsStart:a,inlineStartOverlay:h}=this.dataAccessObject;if(l&&e<a)return!1;let c=!1;return-1===r?c=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(c=h.scrollTo(e,l?e>i:t)),c&&(this.lastScrolledColumnPos=e),c}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:n}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>n)return!1;const r=this.getFirstVisibleRow(),i=this.getLastVisibleRow(),l=void 0===t&&void 0===o,{fixedRowsBottom:a,fixedRowsTop:h,topOverlay:c}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let d=!1;return-1===r?d=c.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(d=c.scrollTo(e,l?e>i:o)),d&&(this.lastScrolledRowPos=e),d}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,fixedRowsTop:n,rootWindow:i}=this.dataAccessObject;let l=t.getFirstVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),h=(0,r.innerHeight)(t.hider),c=(0,r.innerHeight)(i),d=(0,r.getScrollTop)(i,i);if(a.top+h-c<=d){let t=o.getColumnHeaderHeight();t+=e.sumCellSizes(0,n);for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),a.top+h-t<=d){l=o;break}}}return l}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:n}=this.dataAccessObject;let i=t.getLastVisibleRow();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.getScrollTop)(n,n);if(l.top>a){const t=(0,r.innerHeight)(n);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),l.top+h-a>=t){i=o-2;break}}}return i}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:o,totalColumns:s,rootWindow:n}=this.dataAccessObject;let i=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),a=(0,r.innerWidth)(t.hider),h=(0,r.innerWidth)(n),c=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=c){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=c){i=o;break}}}return i}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:n,rootWindow:i}=this.dataAccessObject;let l=o.getLastVisibleColumn();if(t.mainTableScrollableElement===i){let a=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;a=Math.abs(e.right-t)}else{a=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(i,i));if(a>h){const e=(0,r.innerWidth)(i);let o=s.getRowHeaderWidth();for(let s=1;s<=n;s++)if(o+=t.sumCellSizes(s-1,s),a+o-h>=e){l=s-2;break}}}return l}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=s(o(192)),l=o(186),a=o(187);class h extends l.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_BOTTOM,o,s),(0,n.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const n=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),n}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let n=0;t.hasVerticalScroll()||(n+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(n+=(0,r.getScrollbarWidth)(o)),s.style.bottom=`${n}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,n=s.getSetting("defaultRowHeight");let r=e,i=0;for(;r<t;){const e=o.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=(0,r.getScrollbarWidth)(o),i=this.clone.wtTable.holder.parentNode.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===l){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=n),o=Math.min(o,e.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let n=0;t&&s.offsetHeight!==s.clientHeight&&(n=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=n,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let n=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,r.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(t,"innerBorderBottom"),n=!o):((0,r.removeClass)(t,"innerBorderBottom"),n=o)}return n}}t.BottomOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(184)),i=s(o(193)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_BOTTOM)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(107),r=s(o(195)),i=o(186),l=o(197),a=o(187);class h extends i.Overlay{constructor(e,t,o,s){super(e,t,a.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==t||s&&"horizontal"===s?(r=this.getScrollPosition(),(0,n.resetCssTransform)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,n.setOverlayPosition)(o,`${r}px`,"0px"));const i=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),i}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,n.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,n=0;for(;s<t;)n+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,n.getScrollbarWidth)(t),r=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===i){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),r.height=`${t}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const l=(0,n.outerWidth)(this.clone.wtTable.TABLE);r.width=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&s.offsetWidth!==s.clientWidth&&(r=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,n.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,o=this.wtSettings.getSetting("rowHeaders"),s=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,n.removeClass)(t,"emptyRows"):(0,n.addClass)(t,"emptyRows");let r=!1;if(s&&!o.length)(0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!s&&o.length){const o=(0,n.hasClass)(t,"innerBorderInlineStart");e?((0,n.addClass)(t,"innerBorderLeft innerBorderInlineStart"),r=!o):((0,n.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),r=o)}return r}}t.InlineStartOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(196)),i=s(o(185)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_INLINE_START)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},r=s(o(198));t.Selection=r.default;var i=o(200);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}));var l=o(201);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}));var a=o(202);t.SelectionManager=a.SelectionManager},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=s(o(199));class i{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,n.mixin)(i,r.default);var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(116),n=o(114);const r={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,o,s,r,i,l){if(this._localHooks[e]){const a=this._localHooks[e].length;for(let h=0;h<a;h++)(0,n.fastCall)(this._localHooks[e][h],this,t,o,s,r,i,l)}},clearLocalHooks(){return this._localHooks={},this}};(0,s.defineGetter)(r,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});var i=r;t.default=i},(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header";t.HEADER_TYPE="header";t.AREA_TYPE="area";t.FOCUS_TYPE="focus";t.FILL_TYPE="fill";t.ROW_TYPE="row";t.COLUMN_TYPE="column";t.CUSTOM_SELECTION_TYPE="custom-selection"},(e,t)=>{"use strict";t.__esModule=!0;const o=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});t.CORNER_DEFAULT_STYLE=o},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(203);var n=s(o(140)),r=s(o(143)),i=o(107),l=o(204),a=s(o(205));function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var d=new WeakMap,u=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,C=new WeakSet;function w(){const e=(0,n.default)(this,f).get((0,n.default)(this,d)),t=(0,n.default)(this,d).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{const t=(0,n.default)(this,d).wtTable.TABLE.querySelectorAll(`.${e}`);for(let o=0,s=t.length;o<s;o++)(0,i.removeClass)(t[o],e)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;c(t=this,o=C),o.add(t),h(this,d,{writable:!0,value:void 0}),h(this,u,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:new l.SelectionScanner}),h(this,f,{writable:!0,value:new WeakMap}),h(this,p,{writable:!0,value:new WeakSet}),h(this,m,{writable:!0,value:new Map}),(0,r.default)(this,u,e)}setActiveOverlay(e){return(0,r.default)(this,d,e),(0,n.default)(this,g).setActiveOverlay((0,n.default)(this,d)),(0,n.default)(this,f).has((0,n.default)(this,d))||(0,n.default)(this,f).set((0,n.default)(this,d),new Set),this}getFocusSelection(){return null!==(0,n.default)(this,u)?(0,n.default)(this,u).getFocus():null}getAreaSelection(){return null!==(0,n.default)(this,u)?(0,n.default)(this,u).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,n.default)(this,m).has(e)){const t=(0,n.default)(this,m).get(e);if(t.has((0,n.default)(this,d)))return t.get((0,n.default)(this,d));const o=new a.default((0,n.default)(this,d),e.settings);return t.set((0,n.default)(this,d),o),o}const t=new a.default((0,n.default)(this,d),e.settings);return(0,n.default)(this,m).set(e,new Map([[(0,n.default)(this,d),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=(0,n.default)(this,m).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){(0,n.default)(this,m).get(e).forEach((e=>e.destroy())),(0,n.default)(this,m).delete(e)}render(e){if(null===(0,n.default)(this,u))return;e&&function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,C,w).call(this);const t=Array.from((0,n.default)(this,u)),o=new Map;for(let e=0;e<t.length;e++){const s=t[e],{className:r,createLayers:i,selectionType:l}=s.settings;(0,n.default)(this,p).has(s)||((0,n.default)(this,p).add(s),s.addLocalHook("destroy",(()=>this.destroyBorders(s))));const a=this.getBorderInstance(s);if(s.isEmpty()){null==a||a.disappear();continue}if(r){(0,n.default)(this,g).setActiveSelection(s).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(r)&&!0===i?t.set(r,t.get(r)+1):t.set(r,1)}else o.set(e,new Map([[r,1]]))}))}const h=s.getCorners();(0,n.default)(this,d).getSetting("onBeforeDrawBorders",h,l),null==a||a.appear(h)}o.forEach(((e,t)=>{const o=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();o.forEach((e=>(0,n.default)(this,f).get((0,n.default)(this,d)).add(e))),(0,i.addClass)(t,o)}))}}},(e,t,o)=>{o(148)("flat")},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(107);function l(e,t,o){a(e,t),t.set(e,o)}function a(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var c=new WeakMap,d=new WeakMap,u=new WeakSet;function g(e){const{wtTable:t}=(0,n.default)(this,d),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let n=0;n<o;n+=1){const o=t.rowFilter.renderedToSource(n);for(let n=0;n<s;n+=1)e(o,t.columnFilter.renderedToSource(n))}}t.SelectionScanner=class{constructor(){var e,t;a(e=this,t=u),t.add(e),l(this,c,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,d,e),this}setActiveSelection(e){return(0,r.default)(this,c,e),this}scan(){const e=(0,n.default)(this,c).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:i}=(0,n.default)(this,d),l=i.getRenderedColumnsCount(),a=i.getColumnHeadersCount();let h=0;for(let u=-i.getRowHeadersCount();u<l;u++){const l=i.columnFilter.renderedToSource(u);if(!(l<o||l>r)){for(let u=-a;u<0;u++){if(u<t||u>s)continue;const g=u+a;let f=i.getColumnHeader(l,g);const p=(0,n.default)(this,d).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:(0,n.default)(this,c).settings.selectionType,columnCursor:h,selectionWidth:r-o+1});null!==p&&(p!==l&&(f=i.getColumnHeader(p,g)),e(f))}h+=1}}}scanRowsInHeadersRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:i}=(0,n.default)(this,d),l=i.getRenderedRowsCount(),a=i.getRowHeadersCount();let h=0;for(let u=-i.getColumnHeadersCount();u<l;u++){const l=i.rowFilter.renderedToSource(u);if(!(l<t||l>s)){for(let u=-a;u<0;u++){if(u<o||u>r)continue;const g=u+a;let f=i.getRowHeader(l,g);const p=(0,n.default)(this,d).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:(0,n.default)(this,c).settings.selectionType,rowCursor:h,selectionHeight:s-t+1});null!==p&&(p!==l&&(f=i.getRowHeader(p,g)),e(f))}h+=1}}}scanCellsRange(e){const[t,o,s,r]=(0,n.default)(this,c).getCorners(),{wtTable:l}=(0,n.default)(this,d);h(this,u,g).call(this,((a,h)=>{if(a>=t&&a<=s&&h>=o&&h<=r){const t=l.getCell((0,n.default)(this,d).createCellCoords(a,h)),o=(0,n.default)(this,d).getSetting("onAfterDrawSelection",a,h,(0,n.default)(this,c).settings.layerLevel);"string"==typeof o&&(0,i.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,n.default)(this,c).getCorners(),{wtTable:s}=(0,n.default)(this,d);h(this,u,g).call(this,((r,i)=>{if(r>=t&&r<=o){const t=s.getCell((0,n.default)(this,d).createCellCoords(r,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,n.default)(this,c).getCorners(),{wtTable:s}=(0,n.default)(this,d);h(this,u,g).call(this,((r,i)=>{if(i>=t&&i<=o){const t=s.getCell((0,n.default)(this,d).createCellCoords(r,i));e(t)}}))}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107),n=o(121),r=o(116),i=o(115),l=o(201);var a=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=l.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,n.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(n){var i;((i=n).clientY<Math.floor(r.top)||i.clientY>Math.ceil(r.top+r.height)||i.clientX<Math.floor(r.left)||i.clientX>Math.ceil(r.left+r.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let n=0;n<5;n++){const r=o[n],i=t.createElement("div");i.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(i.className+=" hidden"),s=i.style,s.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,s.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,s.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,this.main.appendChild(i)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,i.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:n}=this.wot;let r=n.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",n.bordersHolder=r,n.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,r.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,r.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,n,r){const i=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:l,topHitArea:a,bottom:h,bottomHitArea:c}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),u=parseInt(l.width,10),g=parseInt(a.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();l.top=`${parseInt(o-u-1,10)}px`,l[i]=`${parseInt(s-u-1,10)}px`,a.top=`${parseInt(o-g/4*3,10)}px`,a[i]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+n,10),f-u-2*d),C=Math.min(parseInt(s+n-g/4,10),f-g-2*d);h[i]=`${m}px`,c[i]=`${C}px`;const w=Math.min(parseInt(o+r,10),p-u-2*d),y=Math.min(parseInt(o+r-g/4,10),p-g-2*d);h.top=`${w}px`,c.top=`${y}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",c.display="none"):(h.display="block",c.display="block")):(l.display="none",h.display="none",a.display="none",c.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",a.zIndex="9999"):(l.zIndex="",a.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:n}=this.wot;let r,l,a,h,c,d;const u=t.getRenderedRowsCount();for(let o=0;o<u;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){r=s,c=e[0];break}}for(let o=u-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){l=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){a=s,d=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===r||void 0===a)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(r,a));const p=r!==l||a!==h,m=p?t.getCell(this.wot.createCellCoords(l,h)):f,C=(0,s.offset)(f),w=p?(0,s.offset)(m):C,y=(0,s.offset)(t.TABLE),v=(0,s.outerWidth)(t.TABLE),S=C.top,E=C.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,T=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-y.left-v;T=E+e-w.left,b=n.innerWidth-E-e-t-1}else T=w.left+(0,s.outerWidth)(m)-E,b=E-y.left-1;if(this.isEntireColumnSelected(r,l)){const e=this.getDimensionsFromHeader("columns",a,h,c,y);let t=null;e&&([t,b,T]=e),t&&(f=t)}let _=S-y.top-1,M=w.top+(0,s.outerHeight)(m)-S;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",r,l,d,y);let t=null;e&&([t,_,M]=e),t&&(f=t)}const O=(0,s.getComputedStyle)(f,n);parseInt(O.borderTopWidth,10)>0&&(_+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,T=T>0?T-1:0);const I=R?"right":"left";this.topStyle.top=`${_}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${T}px`,this.topStyle.display="block",this.startStyle.top=`${_}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=_+M-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${T}px`,this.bottomStyle.display="block",this.endStyle.top=`${_}px`,this.endStyle[I]=b+T-N+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[x,H]=[l,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,i.isMobileBrowser)()||!A||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=_+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+T+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const r=e===n;r&&(e=o.documentElement);const i=parseInt(this.cornerDefaultStyle.width,10)/2,a=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=r?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,n=0;R?(n=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=n<0):(n=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=n>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+T+this.cornerCenterPointOffset-i)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(l===this.wot.getSetting("totalRows")-1){(r?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(_+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(l,h,_,b,T,M)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,n,r){const{wtTable:i}=this.wot,l=i.wtRootElement.parentNode;let a=null,h=null,c=null,d=null,u=null,g=null,f=null,p=null;switch(e){case"rows":a=function(){return i.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},c="ht__selection--rows",g="top";break;case"columns":a=function(){return i.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},c="ht__selection--columns",g="left"}if(l.classList.contains(c)){const e=this.wot.getSetting("columnHeaders").length;if(f=a(t,e-n),p=a(o,e-n),!f||!p)return!1;const i=(0,s.offset)(f),l=(0,s.offset)(p);return f&&p&&(d=i[g]-r[g]-1,u=l[g]+h(p)-i[g]),[f,d,u]}return!1}changeBorderStyle(e,t){const o=this[e].style,n=t[e];!n||n.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=n.color,"top"!==e&&"bottom"!==e||(o.height=`${n.width}px`),"start"!==e&&"end"!==e||(o.width=`${n.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,i.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}};t.default=a},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(107),i=s(o(207)),l=o(186),a=o(187);class h extends l.Overlay{constructor(e,t,o,s,r,i){super(e,t,a.CLONE_TOP_INLINE_START_CORNER,o,s),(0,n.default)(this,"topOverlay",void 0),(0,n.default)(this,"inlineStartOverlay",void 0),this.topOverlay=r,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,r.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,r.resetCssTransform)(e);let t=(0,r.outerHeight)(this.clone.wtTable.TABLE);const o=(0,r.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(208)),i=s(o(185)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP_INLINE_START_CORNER)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(116).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});var n=s;t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=s(o(210)),l=o(186),a=o(197),h=o(187);class c extends l.Overlay{constructor(e,t,o,s){super(e,t,h.CLONE_TOP,o,s),(0,n.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new i.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,n=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();n=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,r.setOverlayPosition)(e,"0px",`${s}px`)}const i=this.adjustHeaderBordersPosition(s,n);return this.adjustElementsSize(),i}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,n=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);n+=void 0===e?o:e,s+=1}return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,r.getScrollbarWidth)(t),n=this.clone.wtTable.holder.parentNode.style,i=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===i){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),n.width=`${t}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,n=(o.cloneSource?o.cloneSource:o).wtTable.holder;let i=this.getTableParentOffset(),l=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&n.offsetHeight!==n.clientHeight&&(l=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),n=s.getSetting("totalRows");i+=this.sumCellSizes(0,e+1),i-=o.wtViewport.getViewportHeight()-this.sumCellSizes(n-t,n),i+=1}else i+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return i+=l,this.setScrollPosition(i)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,r.removeClass)(o,"emptyColumns"):(0,r.addClass)(o,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),n=this.cachedFixedRowsTop!==t,i=this.wtSettings.getSetting("columnHeaders");if((n||0===t)&&i.length>0){const t=(0,r.hasClass)(o,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(o,"innerBorderTop"),s=!t):((0,r.removeClass)(o,"innerBorderTop"),s=t)}}return s}}t.TopOverlay=c},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(164)),r=s(o(208)),i=s(o(193)),l=o(116),a=o(161);class h extends n.default{constructor(e,t,o,s){super(e,t,o,s,a.CLONE_TOP)}}(0,l.mixin)(h,r.default),(0,l.mixin)(h,i.default);var c=h;t.default=c},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(107),i=o(116);t.default=class{constructor(e){(0,n.default)(this,"settings",{}),(0,n.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,i.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1}}update(e,t){return void 0===t?(0,i.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,n){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,n):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(107),r=s(o(164)),i=s(o(196)),l=s(o(193)),a=o(116);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,n.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,n.getStyle)(e,"height",t),r=(0,n.getStyle)(e,"overflow",t),i=this.holder.style,{scrollWidth:l,scrollHeight:a}=e;let{width:h,height:c}=e.getBoundingClientRect();if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,n.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(c=0)}c=Math.min(c,a),i.height="auto"===s?"auto":`${c}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||c>0,this.hasTableWidth=h>0}this.isTableVisible=(0,n.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const n=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*n;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,a.mixin)(h,i.default),(0,a.mixin)(h,l.default);var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107),n=o(116),r=o(214);var i=class{constructor(e,t,o,s,n){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=n,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,i=e.getSetting("totalColumns"),l=e.getSetting("preventOverflow"),a=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),c=r-(a?h.right-r:h.left);let d,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(c,r):Math.min(this.getContainerFillWidth(),c,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>d)return t.documentElement.clientWidth;if(n!==o&&(u=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===u||"hidden"===u||"auto"===u))return Math.max(d,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?d:Math.max(d,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,n=t.length;o<n;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n,i,l;this.rowHeaderWidth=NaN,n=t.getSetting("renderAllRows")&&e===r.RENDER_TYPE?1/0:this.getViewportHeight();let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),c=t.getSetting("fixedRowsBottom"),d=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),c&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(d-c,d),n-=l),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportSize:n,scrollOffset:a,totalItems:t.getSetting("totalRows"),itemSizeFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,scrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let n=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const l=t.getSetting("fixedColumnsStart");if(l&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,l);i+=e,n-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(n-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportSize:n,scrollOffset:i,totalItems:t.getSetting("totalColumns"),itemSizeFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingItemWidthFn:(e,o)=>t.getSetting("onBeforeStretchingColumnWidth",e,o),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),o=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:n,endRow:r}=this.rowsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:n,endColumn:r}=this.columnsRenderCalculator;return!(t<n||t===n&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,n.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},r=s(o(146));t.ViewportColumnsCalculator=r.default;var i=s(o(153));t.ViewportRowsCalculator=i.default;var l=o(152);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:o,selection:n,controller:r,cellCoordsFactory:l}=t;i.get(e.type)({coords:o,selection:n,controller:r,cellCoordsFactory:l,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})},t.mouseDown=n,t.mouseOver=r;var s=o(121);function n(e){let{isShiftKey:t,isLeftClick:o,isRightClick:s,coords:n,selection:r,controller:i,cellCoordsFactory:l}=e;const a=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),c=r.isSelectedByRowHeader();if(t&&a)n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(n):(h||c)&&n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(l(n.row,n.col)):h&&n.row<0&&!i.column?r.setRangeEnd(l(a.to.row,n.col)):c&&n.col<0&&!i.row?r.setRangeEnd(l(n.row,a.to.col)):(!h&&!c&&n.col<0||h&&n.col<0)&&!i.row?r.selectRows(Math.max(a.from.row,0),n.row,n.col):(!h&&!c&&n.row<0||c&&n.row<0)&&!i.column&&r.selectColumns(Math.max(a.from.col,0),n.col,n.row);else{const e=!r.inInSelection(n),t=o||s&&e;n.row<0&&n.col>=0&&!i.column?t&&r.selectColumns(n.col,n.col,n.row):n.col<0&&n.row>=0&&!i.row?t&&r.selectRows(n.row,n.row,n.col):n.col>=0&&n.row>=0&&!i.cell?t&&r.setRangeStart(n):n.col<0&&n.row<0&&r.selectAll(!0,!0,n)}}function r(e){let{isLeftClick:t,coords:o,selection:s,controller:n,cellCoordsFactory:r}=e;if(!t)return;const i=s.isSelectedByRowHeader(),l=s.isSelectedByColumnHeader(),a=s.tableProps.countCols(),h=s.tableProps.countRows();l&&!n.column?s.setRangeEnd(r(h-1,o.col)):i&&!n.row?s.setRangeEnd(r(o.row,a-1)):n.cell||s.setRangeEnd(o)}const i=new Map([["mousedown",n],["mouseover",r],["touchstart",n]])},(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=new WeakMap;t.holder=o;const s=Symbol("rootInstance");t.rootInstanceSymbol=s},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(116),n=o(218),r=o(113),i=o(130),l=o(114);var a=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this.hot=e,this.data=t,this.dataType="array",this.colToProp=()=>{},this.propToCol=()=>{}}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,r.arrayEach)(this.data,((o,s)=>{const n=this.getAtCell(s,e);t.push(n)})),t}getAtRow(e,t,o){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const r=void 0===t&&void 0===o;let a=null,h=null;if(a=this.modifyRowData(e),Array.isArray(a))h=[],r?a.forEach(((t,o)=>{h[o]=this.getAtPhysicalCell(e,o,a)})):(0,i.rangeEach)(t,o,(o=>{h[o-t]=this.getAtPhysicalCell(e,o,a)}));else if((0,s.isObject)(a)||(0,l.isFunction)(a))if(h=n?[]:{},!r||n){const r=0,l=this.countFirstRowKeys()-1;(0,i.rangeEach)(r,l,(i=>{const c=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(c)){const t=this.getAtPhysicalCell(e,c,a);n?h.push(t):(0,s.setProperty)(h,c,t)}}))}else(0,s.objectEach)(a,((t,o)=>{(0,s.setProperty)(h,o,this.getAtPhysicalCell(e,o,a))}));return h}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,s.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(o=n.value)}Number.isInteger(t)?this.data[e][t]=o:(0,s.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let n=null;if(o&&(n="string"==typeof t?(0,s.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,s.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(n=o.value)}return n}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,n=null,r=null,l=null,a=null;null===e||null===t?(s=!0,n=0,l=this.countRows()-1):(n=Math.min(e.row,t.row),r=Math.min(e.col,t.col),l=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,i.rangeEach)(n,l,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}};t.default=a},(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let n=0;n<e;n++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e=[];for(n=0;n<t;n++)e.push(i(n)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,n;for(s=0;s<e;s++){const e={};for(n=0;n<t;n++)e[`prop${n}`]=i(n)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,n)=>{s.push([o+t,n,e])})):Object.keys(e).forEach((n=>{s.push([o+t,n,e[n]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(n.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=i,o(8);var s=o(116);const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=n.length;function i(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},n=o(220);t.IndexMapper=n.IndexMapper;var r=o(234);t.getRegisteredMapsCounter=r.getRegisteredMapsCounter;var i=o(231);t.getIncreasedIndexes=i.getIncreasedIndexes,t.getDecreasedIndexes=i.getDecreasedIndexes,t.alterUtilsFactory=i.alterUtilsFactory;var l=o(221);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(113),r=o(221),i=o(232),l=s(o(199)),a=o(116),h=o(110),c=o(235);new Set;class d{constructor(){this.indexesSequence=new r.IndexesSequence,this.trimmingMapsCollection=new i.AggregatedCollection((e=>e.some((e=>!0===e))),!1),this.hidingMapsCollection=new i.AggregatedCollection((e=>e.some((e=>!0===e))),!1),this.variousMapsCollection=new i.MapCollection,this.hidingChangesObservable=new c.ChangesObservable({initialIndexValue:!1}),this.notTrimmedIndexesCache=[],this.notHiddenIndexesCache=[],this.isBatched=!1,this.indexesSequenceChanged=!1,this.indexesChangeSource=void 0,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1,this.renderablePhysicalIndexesCache=[],this.fromPhysicalToVisualIndexesCache=new Map,this.fromVisualToRenderableIndexesCache=new Map,this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,r.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof r.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof r.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,h.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,h.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,h.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let n=-1;return n=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===n?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[n]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,n.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),i=e.length,l=(0,r.getListWithRemovedItems)(this.getIndexesSequence(),o),a=l.filter((e=>!1===this.isTrimmed(e)));let h=l.indexOf(a[a.length-1])+1;if(t+i<s){const e=a[t];h=l.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,r.getListWithInsertedItems)(l,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,h.isDefined)(o)?o:this.getNumberOfIndexes(),r=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),i=(0,n.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(r,i),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(r,i),this.hidingMapsCollection.insertToEvery(r,i),this.variousMapsCollection.insertToEvery(r,i),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=d,(0,a.mixin)(d,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!d.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(d.get(e))(t)},o(78);var n=o(222);t.HidingMap=n.HidingMap;var r=o(224);t.IndexMap=r.IndexMap;var i=o(226);t.LinkedPhysicalIndexToValueMap=i.LinkedPhysicalIndexToValueMap;var l=o(223);t.PhysicalIndexToValueMap=l.PhysicalIndexToValueMap;var a=o(229);t.TrimmingMap=a.TrimmingMap;var h=o(230);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var c=o(227);Object.keys(c).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===c[e]||(t[e]=c[e]))}));const d=new Map([["hiding",n.HidingMap],["index",r.IndexMap],["linkedPhysicalIndexToValue",i.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",l.PhysicalIndexToValueMap],["trimming",a.TrimmingMap]])},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(223),n=o(113);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(224),n=o(225);class r extends s.IndexMap{insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(130),r=o(116),i=o(114),l=s(o(199));class a{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.indexedValues=[],this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,i.isFunction)(this.initValueOrFn)?(0,n.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,n.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=a,(0,r.mixin)(a,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,n){const r=o.length?o[0]:void 0;return[...e.slice(0,r),...o.map(((e,t)=>(0,s.isFunction)(n)?n(e,t):n)),...void 0===r?[]:e.slice(r)]},t.getListWithRemovedItems=function(e,t){return(0,n.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(114),n=o(113)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(224),i=o(225),l=o(227),a=o(228),h=o(114);class c extends r.IndexMap{constructor(){super(...arguments),(0,n.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,i.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,a.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,i.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,l.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,a.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=c},(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(113)},(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],n=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+n:e))};var s=o(113)},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(223),n=o(113);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,n.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(224),n=o(227),r=o(231);class i extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,r.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,n.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,n.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,r.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=i},(e,t,o)=>{"use strict";t.__esModule=!0,o(78);var s=o(228);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var n=o(227),r=o(225);const i=new Map([["indexesSequence",{getListWithInsertedItems:n.getListWithInsertedItems,getListWithRemovedItems:n.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:r.getListWithInsertedItems,getListWithRemovedItems:r.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===i.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return i.get(e)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(233);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var n=o(234);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(234),n=o(113),r=o(110);class i extends s.MapCollection{constructor(e,t){super(),this.mergedValuesCache=[],this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,n.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,r.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,n.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,r.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l};var n=o(110),r=o(116),i=s(o(199));let l=0;class a{constructor(){this.collection=new Map}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,n.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,n.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=a,(0,r.mixin)(a,i.default)},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(236),l=o(237);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,c=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,h,{writable:!0,value:new Set}),a(this,c,{writable:!0,value:[]}),a(this,d,{writable:!0,value:[]}),a(this,u,{writable:!0,value:!1}),a(this,g,{writable:!0,value:!1}),(0,r.default)(this,g,null!=e&&e)}createObserver(){const e=new i.ChangesObserver;return(0,n.default)(this,h).add(e),e.addLocalHook("unsubscribe",(()=>{(0,n.default)(this,h).delete(e)})),e._writeInitialChanges((0,l.arrayDiff)((0,n.default)(this,c),(0,n.default)(this,d))),e}emit(e){let t=(0,n.default)(this,d);(0,n.default)(this,u)&&(0,n.default)(this,c).length===e.length||(0===e.length?e=new Array(t.length).fill((0,n.default)(this,g)):(0,r.default)(this,c,new Array(e.length).fill((0,n.default)(this,g))),(0,n.default)(this,u)||((0,r.default)(this,u,!0),t=(0,n.default)(this,c)));const o=(0,l.arrayDiff)(t,e);(0,n.default)(this,h).forEach((e=>e._write(o))),(0,r.default)(this,d,e)}}},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(143)),r=s(o(140)),i=o(116),l=s(o(199));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class c{constructor(){a(this,h,{writable:!0,value:[]})}subscribe(e){return this.addLocalHook("change",e),this._write((0,r.default)(this,h)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){(0,n.default)(this,h,e)}}t.ChangesObserver=c,(0,i.mixin)(c,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,n=0;for(;s<e.length&&n<t.length;s++,n++)e[s]!==t[n]&&o.push({op:"replace",index:n,oldValue:e[s],newValue:t[n]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;n<e.length;n++)o.push({op:"remove",index:n,oldValue:e[n],newValue:void 0});return o},o(8)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getDefaultLanguageDictionary=function(){return c.default},t.getLanguageDictionary=y,t.getLanguagesDictionaries=function(){return C()},t.getTranslatedPhrase=function(e,t,o){const s=y(e);if(null===s)return null;const n=s[t];if((0,i.isUndefined)(n))return null;const l=function(e,t){let o=e;return(0,r.arrayEach)((0,h.getPhraseFormatters)(),(s=>{o=s(e,t)})),o}(n,o);if(Array.isArray(l))return l[0];return l},t.getValidLanguageCode=function(e){let t=(0,l.normalizeLanguageCode)(e);v(t)||(t=g,(0,l.warnUserAboutLanguageRegistration)(e));return t},t.hasLanguageDictionary=v,t.registerLanguageDictionary=w;var n=o(116),r=o(113),i=o(110),l=o(239),a=s(o(125)),h=o(240),c=s(o(242));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243));t.dictionaryKeys=u;const g=c.default.languageCode;t.DEFAULT_LANGUAGE_CODE=g;const{register:f,getItem:p,hasItem:m,getValues:C}=(0,a.default)("languagesDictionaries");function w(e,t){let o=e,s=t;return(0,n.isObject)(e)&&(s=e,o=s.languageCode),function(e,t){e!==g&&(0,l.extendNotExistingKeys)(t,p(g))}(o,s),f(o,(0,n.deepClone)(s)),(0,n.deepClone)(s)}function y(e){return v(e)?(0,n.deepClone)(p(e)):null}function v(e){return m(e)}w(c.default)},(e,t,o)=>{"use strict";t.__esModule=!0,t.createCellHeadersRange=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,[n,r]=[o,s];e>t&&([n,r]=[r,n]);return`${n}-${r}`},t.extendNotExistingKeys=function(e,t){return(0,n.objectEach)(t,((t,o)=>{(0,s.isUndefined)(e[o])&&(e[o]=t)})),e},t.normalizeLanguageCode=function(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);if(t)return`${t[1].toLowerCase()}-${t[2].toUpperCase()}`;return e},t.warnUserAboutLanguageRegistration=function(e){(0,s.isDefined)(e)&&(0,r.error)(i.toSingleLine`Language with code "${e}" was not found. You should register particular language\x20
26
+ before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var s=o(110),n=o(116),r=o(124),i=o(112)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getPhraseFormatters=t.getAll=function(){return l()},t.registerPhraseFormatter=t.register=a;var n=s(o(125)),r=s(o(241));const{register:i,getValues:l}=(0,n.default)("phraseFormatters");function a(e,t){i(e,t)}a("pluralize",r.default)},(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}var r={languageCode:"en-US",[s.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[s.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[s.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[s.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[s.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[s.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[s.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[s.CONTEXTMENU_ITEMS_UNDO]:"Undo",[s.CONTEXTMENU_ITEMS_REDO]:"Redo",[s.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[s.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[s.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[s.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[s.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[s.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[s.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[s.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[s.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[s.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[s.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[s.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[s.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[s.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[s.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[s.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[s.CONTEXTMENU_ITEMS_COPY]:"Copy",[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[s.CONTEXTMENU_ITEMS_CUT]:"Cut",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[s.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[s.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[s.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[s.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[s.FILTERS_CONDITIONS_NONE]:"None",[s.FILTERS_CONDITIONS_EMPTY]:"Is empty",[s.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[s.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[s.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[s.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[s.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[s.FILTERS_CONDITIONS_CONTAINS]:"Contains",[s.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[s.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[s.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[s.FILTERS_CONDITIONS_BETWEEN]:"Is between",[s.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[s.FILTERS_CONDITIONS_AFTER]:"After",[s.FILTERS_CONDITIONS_BEFORE]:"Before",[s.FILTERS_CONDITIONS_TODAY]:"Today",[s.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[s.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[s.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[s.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[s.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[s.FILTERS_LABELS_CONJUNCTION]:"And",[s.FILTERS_LABELS_DISJUNCTION]:"Or",[s.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[s.FILTERS_BUTTONS_CLEAR]:"Clear",[s.FILTERS_BUTTONS_OK]:"OK",[s.FILTERS_BUTTONS_CANCEL]:"Cancel",[s.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[s.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[s.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value"};t.default=r},(e,t)=>{"use strict";t.__esModule=!0;const o="ContextMenu:items";t.CONTEXT_MENU_ITEMS_NAMESPACE=o;const s=o,n=`${s}.noItems`;t.CONTEXTMENU_ITEMS_NO_ITEMS=n;const r=`${s}.insertRowAbove`;t.CONTEXTMENU_ITEMS_ROW_ABOVE=r;const i=`${s}.insertRowBelow`;t.CONTEXTMENU_ITEMS_ROW_BELOW=i;const l=`${s}.insertColumnOnTheLeft`;t.CONTEXTMENU_ITEMS_INSERT_LEFT=l;const a=`${s}.insertColumnOnTheRight`;t.CONTEXTMENU_ITEMS_INSERT_RIGHT=a;const h=`${s}.removeRow`;t.CONTEXTMENU_ITEMS_REMOVE_ROW=h;const c=`${s}.removeColumn`;t.CONTEXTMENU_ITEMS_REMOVE_COLUMN=c;const d=`${s}.undo`;t.CONTEXTMENU_ITEMS_UNDO=d;const u=`${s}.redo`;t.CONTEXTMENU_ITEMS_REDO=u;const g=`${s}.readOnly`;t.CONTEXTMENU_ITEMS_READ_ONLY=g;const f=`${s}.clearColumn`;t.CONTEXTMENU_ITEMS_CLEAR_COLUMN=f;const p=`${s}.copy`;t.CONTEXTMENU_ITEMS_COPY=p;const m=`${s}.copyWithHeaders`;t.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS=m;const C=`${s}.copyWithGroupHeaders`;t.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS=C;const w=`${s}.copyHeadersOnly`;t.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY=w;const y=`${s}.cut`;t.CONTEXTMENU_ITEMS_CUT=y;const v=`${s}.freezeColumn`;t.CONTEXTMENU_ITEMS_FREEZE_COLUMN=v;const S=`${s}.unfreezeColumn`;t.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN=S;const E=`${s}.mergeCells`;t.CONTEXTMENU_ITEMS_MERGE_CELLS=E;const R=`${s}.unmergeCells`;t.CONTEXTMENU_ITEMS_UNMERGE_CELLS=R;const b=`${s}.addComment`;t.CONTEXTMENU_ITEMS_ADD_COMMENT=b;const T=`${s}.editComment`;t.CONTEXTMENU_ITEMS_EDIT_COMMENT=T;const _=`${s}.removeComment`;t.CONTEXTMENU_ITEMS_REMOVE_COMMENT=_;const M=`${s}.readOnlyComment`;t.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT=M;const O=`${s}.align`;t.CONTEXTMENU_ITEMS_ALIGNMENT=O;const I=`${s}.align.left`;t.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT=I;const N=`${s}.align.center`;t.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER=N;const A=`${s}.align.right`;t.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT=A;const P=`${s}.align.justify`;t.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY=P;const x=`${s}.align.top`;t.CONTEXTMENU_ITEMS_ALIGNMENT_TOP=x;const H=`${s}.align.middle`;t.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE=H;const D=`${s}.align.bottom`;t.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM=D;const L=`${s}.borders`;t.CONTEXTMENU_ITEMS_BORDERS=L;const k=`${s}.borders.top`;t.CONTEXTMENU_ITEMS_BORDERS_TOP=k;const F=`${s}.borders.right`;t.CONTEXTMENU_ITEMS_BORDERS_RIGHT=F;const V=`${s}.borders.bottom`;t.CONTEXTMENU_ITEMS_BORDERS_BOTTOM=V;const W=`${s}.borders.left`;t.CONTEXTMENU_ITEMS_BORDERS_LEFT=W;const B=`${s}.borders.remove`;t.CONTEXTMENU_ITEMS_REMOVE_BORDERS=B;const U=`${s}.nestedHeaders.insertChildRow`;t.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD=U;const j=`${s}.nestedHeaders.detachFromParent`;t.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD=j;const Y=`${s}.hideColumn`;t.CONTEXTMENU_ITEMS_HIDE_COLUMN=Y;const G=`${s}.showColumn`;t.CONTEXTMENU_ITEMS_SHOW_COLUMN=G;const z=`${s}.hideRow`;t.CONTEXTMENU_ITEMS_HIDE_ROW=z;const K=`${s}.showRow`;t.CONTEXTMENU_ITEMS_SHOW_ROW=K;const $="Filters:";t.FILTERS_NAMESPACE=$;const X=`${$}conditions`;t.FILTERS_CONDITIONS_NAMESPACE=X;const q=`${X}.none`;t.FILTERS_CONDITIONS_NONE=q;const Q=`${X}.isEmpty`;t.FILTERS_CONDITIONS_EMPTY=Q;const J=`${X}.isNotEmpty`;t.FILTERS_CONDITIONS_NOT_EMPTY=J;const Z=`${X}.isEqualTo`;t.FILTERS_CONDITIONS_EQUAL=Z;const ee=`${X}.isNotEqualTo`;t.FILTERS_CONDITIONS_NOT_EQUAL=ee;const te=`${X}.beginsWith`;t.FILTERS_CONDITIONS_BEGINS_WITH=te;const oe=`${X}.endsWith`;t.FILTERS_CONDITIONS_ENDS_WITH=oe;const se=`${X}.contains`;t.FILTERS_CONDITIONS_CONTAINS=se;const ne=`${X}.doesNotContain`;t.FILTERS_CONDITIONS_NOT_CONTAIN=ne;const re=`${X}.byValue`;t.FILTERS_CONDITIONS_BY_VALUE=re;const ie=`${X}.greaterThan`;t.FILTERS_CONDITIONS_GREATER_THAN=ie;const le=`${X}.greaterThanOrEqualTo`;t.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL=le;const ae=`${X}.lessThan`;t.FILTERS_CONDITIONS_LESS_THAN=ae;const he=`${X}.lessThanOrEqualTo`;t.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL=he;const ce=`${X}.isBetween`;t.FILTERS_CONDITIONS_BETWEEN=ce;const de=`${X}.isNotBetween`;t.FILTERS_CONDITIONS_NOT_BETWEEN=de;const ue=`${X}.after`;t.FILTERS_CONDITIONS_AFTER=ue;const ge=`${X}.before`;t.FILTERS_CONDITIONS_BEFORE=ge;const fe=`${X}.today`;t.FILTERS_CONDITIONS_TODAY=fe;const pe=`${X}.tomorrow`;t.FILTERS_CONDITIONS_TOMORROW=pe;const me=`${X}.yesterday`;t.FILTERS_CONDITIONS_YESTERDAY=me;const Ce=`${$}labels.filterByCondition`;t.FILTERS_DIVS_FILTER_BY_CONDITION=Ce;const we=`${$}labels.filterByValue`;t.FILTERS_DIVS_FILTER_BY_VALUE=we;const ye=`${$}labels.conjunction`;t.FILTERS_LABELS_CONJUNCTION=ye;const ve=`${$}labels.disjunction`;t.FILTERS_LABELS_DISJUNCTION=ve;const Se=`${$}values.blankCells`;t.FILTERS_VALUES_BLANK_CELLS=Se;const Ee=`${$}buttons.selectAll`;t.FILTERS_BUTTONS_SELECT_ALL=Ee;const Re=`${$}buttons.clear`;t.FILTERS_BUTTONS_CLEAR=Re;const be=`${$}buttons.ok`;t.FILTERS_BUTTONS_OK=be;const Te=`${$}buttons.cancel`;t.FILTERS_BUTTONS_CANCEL=Te;const _e=`${$}buttons.placeholder.search`;t.FILTERS_BUTTONS_PLACEHOLDER_SEARCH=_e;const Me=`${$}buttons.placeholder.value`;t.FILTERS_BUTTONS_PLACEHOLDER_VALUE=Me;const Oe=`${$}buttons.placeholder.secondValue`;t.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE=Oe},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(245));t.Selection=r.default;var i=o(215);t.handleMouseEvent=i.handleMouseEvent;var l=o(259);t.detectSelectionType=l.detectSelectionType,t.normalizeSelectionFactory=l.normalizeSelectionFactory;var a=o(246);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(136)),r=o(145),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(246)),l=s(o(257)),a=o(116),h=o(110),c=o(130),d=o(113),u=s(o(199)),g=s(o(258)),f=o(259),p=o(112);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}class C{constructor(e,t){var o=this;(0,n.default)(this,"settings",void 0),(0,n.default)(this,"tableProps",void 0),(0,n.default)(this,"inProgress",!1),(0,n.default)(this,"selectedRange",new l.default(((e,t,o)=>this.tableProps.createCellRange(e,t,o)))),(0,n.default)(this,"highlight",void 0),(0,n.default)(this,"transformation",void 0),(0,n.default)(this,"selectedByRowHeader",new Set),(0,n.default)(this,"selectedByColumnHeader",new Set),this.settings=e,this.tableProps=t,this.highlight=new i.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,o)=>this.tableProps.createCellRange(e,t,o)}),this.transformation=new g.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertColRequire",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const n="multiple"===this.settings.selectionMode,r=(0,h.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),i),(!n||n&&!r&&(0,h.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(i).current().setHighlight(s.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,o)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),o=this.tableProps.countRows(),s=this.tableProps.countCols(),n=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((o>0||s>0)&&(0===o&&t.col<0&&!n||0===s&&t.row<0&&!n))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const r=this.selectedRange.current();this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode?(r.setFrom(r.highlight),r.setTo(r.highlight)):r.setTo(t),o>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize();const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(i.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const a=this.getLayerLevel();a<this.highlight.layerLevel&&((0,d.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(a);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),u=this.highlight.createRowHeader(),g=this.highlight.createColumnHeader(),f=this.highlight.createActiveRowHeader(),p=this.highlight.createActiveColumnHeader(),m=this.highlight.createActiveCornerHeader(),C=this.highlight.createRowHighlight(),w=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),u.clear(),g.clear(),f.clear(),p.clear(),m.clear(),C.clear(),w.clear(),this.highlight.isEnabledFor(i.AREA_TYPE,r.highlight)&&(this.isMultiple()||a>=1)&&(h.add(r.from).add(r.to).commit(),c.add(r.from).add(r.to).commit(),1===a)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(a-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(a)}if(this.highlight.isEnabledFor(i.HEADER_TYPE,r.highlight)){if(!r.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(r.from.row,0),-1),t=this.tableProps.createCellCoords(r.to.row,-1),o=this.tableProps.createCellCoords(-1,Math.max(r.from.col,0)),s=this.tableProps.createCellCoords(-1,r.to.col);"single"===this.settings.selectionMode?(u.add(e).commit(),g.add(o).commit(),C.add(e).commit(),w.add(o).commit()):(u.add(e).add(t).commit(),g.add(o).add(s).commit(),C.add(e).add(t).commit(),w.add(o).add(s).commit())}const e=this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&(this.isSelectedByRowHeader()||this.isSelectedByCorner())),t=this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&(this.isSelectedByColumnHeader()||this.isSelectedByCorner()));e&&f.add(this.tableProps.createCellCoords(Math.max(r.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(r.to.row,0),-1)).commit(),t&&p.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(r.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(r.to.col,0))).commit(),e&&t&&m.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,a.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,o))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countCols();return(o>0&&t<0||0===o)&&e.getWidth()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),s=this.tableProps.countRows();return(o>0&&t<0||0===o)&&e.getHeight()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{row:this.tableProps.countColHeaders()>0?-this.tableProps.countColHeaders():0,col:this.tableProps.countRowHeaders()>0?-this.tableProps.countRowHeaders():0};const s=this.tableProps.countRows(),n=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),i=this.tableProps.countColHeaders(),l=e?-i:0,a=t?-r:0;if(0===l&&0===a&&(0===s||0===n))return;const h=Number.isInteger(o.row)?o.row:0,d=Number.isInteger(o.col)?o.col:0,u=this.tableProps.createCellCoords(l,a),g=this.tableProps.createCellCoords((0,c.clamp)(h,l,s-1),(0,c.clamp)(d,a,n-1)),f=this.tableProps.createCellCoords(s-1,n-1);this.clear(),this.setRangeStartOnly(u,void 0,g),a<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish()}selectCells(e){const t=(0,f.detectSelectionType)(e);if(t===f.SELECTION_TYPE_EMPTY)return!1;if(t===f.SELECTION_TYPE_UNRECOGNIZED)throw new Error(p.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
27
27
  the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
28
- columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=(0,f.normalizeSelectionFactory)(t,{propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),s=this.settings.navigableHeaders,n={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:s?this.tableProps.countRowHeaders():0,countColHeaders:s?this.tableProps.countColHeaders():0},r=!e.some((e=>{const t=o(e),s=t.isValid(n);return!(s&&!t.containsHeaders()||s&&t.containsHeaders()&&t.isSingleHeader())}));return r&&(this.clear(),(0,d.arrayEach)(e,(e=>{const{from:t,to:s}=o(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(s.clone()),this.finish()}))),r}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s="string"==typeof e?this.tableProps.propToCol(e):e,n="string"==typeof t?this.tableProps.propToCol(t):t,i=this.tableProps.countRows(),l=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),h=0===a?0:-a,d=new r.CellCoords(h,s),u=new r.CellCoords(i-1,n),g=new r.CellRange(d,d,u).isValid({countRows:i,countCols:l,countRowHeaders:0,countColHeaders:a});if(g){const e=0===a?0:(0,c.clamp)(o,h,-1),t=i-1,r=this.tableProps.createCellCoords(e,s),l=this.tableProps.createCellCoords(t,n),d=this.tableProps.createCellCoords((0,c.clamp)(o,h,i-1),s);this.runLocalHooks("beforeSelectColumns",r,l,d),r.row=e,l.row=t,this.setRangeStartOnly(r,void 0,d),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(l),this.runLocalHooks("afterSelectColumns",r,l,d),this.finish()}return g}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.tableProps.countRows(),n=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),l=0===i?0:-i,a=new r.CellCoords(e,l),h=new r.CellCoords(t,n-1),d=new r.CellRange(a,a,h).isValid({countRows:s,countCols:n,countRowHeaders:i,countColHeaders:0});if(d){const s=0===i?0:(0,c.clamp)(o,l,-1),r=n-1,a=this.tableProps.createCellCoords(e,s),h=this.tableProps.createCellCoords(t,r),d=this.tableProps.createCellCoords(e,(0,c.clamp)(o,l,n-1));this.runLocalHooks("beforeSelectRows",a,h,d),a.col=s,h.col=r,this.setRangeStartOnly(a,void 0,d),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(h),this.runLocalHooks("afterSelectRows",a,h,d),this.finish()}return d}refresh(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),o=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),n=this.highlight.createColumnHeader(),r=this.highlight.createActiveRowHeader(),i=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t.commit(),o.commit(),s.commit(),n.commit(),r.commit(),i.commit(),l.commit(),a.commit(),h.commit()}this.highlight.useLayerLevel(t)}}(0,a.mixin)(C,u.default);var w=C;t.default=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8),o(78);var n=s(o(136)),r=o(247),i=o(249),l=o(250),a=o(251),h=o(252),c=o(253),d=o(254),u=o(255),g=o(256),f=o(145);t.ACTIVE_HEADER_TYPE=f.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=f.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=f.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=f.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=f.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=f.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=f.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=f.HIGHLIGHT_COLUMN_TYPE;var p=o(113);let m;function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var y=new WeakSet;m=Symbol.iterator;function v(e,t){const o=this.layerLevel;if(e.has(o))return e.get(o);const s=t({layerLevel:o,...this.options});return e.set(o,s),s}var S=class{constructor(e){C(this,y),(0,n.default)(this,"options",void 0),(0,n.default)(this,"layerLevel",0),(0,n.default)(this,"focus",void 0),(0,n.default)(this,"fill",void 0),(0,n.default)(this,"layeredAreas",new Map),(0,n.default)(this,"areas",new Map),(0,n.default)(this,"rowHeaders",new Map),(0,n.default)(this,"columnHeaders",new Map),(0,n.default)(this,"activeRowHeaders",new Map),(0,n.default)(this,"activeColumnHeaders",new Map),(0,n.default)(this,"activeCornerHeaders",new Map),(0,n.default)(this,"rowHighlights",new Map),(0,n.default)(this,"columnHighlights",new Map),(0,n.default)(this,"customSelections",[]),this.options=e,this.focus=(0,h.createHighlight)(e),this.fill=(0,d.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=!1;return t.isCell()&&(s=this.options.disabledCellSelection(t.row,t.col)),"string"==typeof s&&(s=[s]),!1===s||Array.isArray(s)&&!s.includes(o)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return w(this,y,v).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,y,v).call(this,this.areas,l.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,y,v).call(this,this.rowHeaders,u.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,y,v).call(this,this.columnHeaders,u.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,y,v).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,y,v).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,y,v).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,y,v).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,y,v).call(this,this.columnHighlights,a.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,c.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,p.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}};t.default=S},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(145);class i extends r.Selection{constructor(e,t){super(e,null),(0,n.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:o}=e,s=this.getNearestNotHiddenCoords(t,1),n=this.getNearestNotHiddenCoords(o,-1);return null===s||null===n?null:((s.row>n.row||s.col>n.col)&&(s=t,n=o),this.settings.createCellRange(s,s,n))}getNearestNotHiddenCoords(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const s=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===s)return null;const n=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return null===n?null:this.settings.createCellCoords(s,n)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o="N-S"===e.getVerticalDirection()?1:-1,s="W-E"===e.getHorizontalDirection()?1:-1,n=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==n&&null!==n.col&&null!==n.row||(r=this.getNearestNotHiddenCoords(t,o,s)),null!==r&&e.overlaps(r)){const t=e.highlight.clone();if(t.row>=0&&(t.row=r.row),t.col>=0&&(t.col=r.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==n&&null===r&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),s=this.settings.visualToRenderableCoords(t);return null===o.row||null===o.col||null===s.row||null===s.col?null:this.settings.createCellRange(o,o,s)}}var l=i;t.default=l},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...o}=e;return new r.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"highlight",...t,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_COLUMN_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...o}=e;return new r.default({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_FOCUS_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:o,...s}=e;return new r.default({...t,...s,selectionType:n.HIGHLIGHT_CUSTOM_SELECTION_TYPE},o)};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:n.HIGHLIGHT_FILL_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_HEADER_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_ROW_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);class s{constructor(e){this.ranges=[],this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}var n=s;t.default=n},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(116),l=s(o(199));function a(e,t){c(e,t),t.add(e)}function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var u=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakSet,m=new WeakSet,C=new WeakSet,w=new WeakSet,y=new WeakSet;class v{constructor(e,t){a(this,y),a(this,w),a(this,C),a(this,m),a(this,p),h(this,u,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:{x:0,y:0}}),(0,r.default)(this,u,e),(0,r.default)(this,g,t)}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d(this,p,S).call(this,{x:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countRowHeaders():0,y:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countColHeaders():0});const s=(0,n.default)(this,g).createCellCoords(e,t);let r=(0,n.default)(this,u).current().highlight;const i=(0,n.default)(this,g).visualToRenderableCoords(r);let l=0,a=0;if(this.runLocalHooks("beforeTransformStart",s),null!==i.row&&null!==i.col){const{width:e,height:t}=d(this,C,R).call(this),{x:i,y:h}=d(this,w,b).call(this,r),c=(0,n.default)(this,g).fixedRowsBottom(),u=(0,n.default)(this,g).minSpareRows(),f=(0,n.default)(this,g).minSpareCols(),p=(0,n.default)(this,g).autoWrapRow(),v=(0,n.default)(this,g).autoWrapCol(),S={row:h+s.row,col:i+s.col};if(S.row>=t){if(o&&u>0&&0===c)this.runLocalHooks("insertRowRequire",(0,n.default)(this,g).countRenderableRows());else if(v){const o=S.col+1;S.row=S.row-t,S.col=o>=e?o-e:o}}else if(S.row<0&&v){const o=S.col-1;S.row=t+S.row,S.col=o<0?e+o:o}if(S.col>=e){if(o&&f>0)this.runLocalHooks("insertColRequire",(0,n.default)(this,g).countRenderableColumns());else if(p){const o=S.row+1;S.row=o>=t?o-t:o,S.col=S.col-e}}else if(S.col<0&&p){const o=S.row-1;S.row=o<0?t+o:o,S.col=e+S.col}const _=(0,n.default)(this,g).createCellCoords(S.row,S.col),{rowDir:M,colDir:O}=d(this,m,E).call(this,_);l=M,a=O,r=d(this,y,T).call(this,_)}return this.runLocalHooks("afterTransformStart",r,l,a),r}transformEnd(e,t){d(this,p,S).call(this,{x:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countRowHeaders():0,y:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countColHeaders():0});const o=(0,n.default)(this,g).createCellCoords(e,t),s=(0,n.default)(this,u).current(),r=(0,n.default)(this,g).visualToRenderableCoords(s.highlight),i=s.to.clone();let l=0,a=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==r.row&&null!==r.col){const{x:e,y:t}=d(this,w,b).call(this,s.to),r={row:t+o.row,col:e+o.col},h=(0,n.default)(this,g).createCellCoords(r.row,r.col),{rowDir:c,colDir:u}=d(this,m,E).call(this,h);l=c,a=u;const f=d(this,y,T).call(this,h);0===o.row&&0!==o.col?i.col=f.col:0!==o.row&&0===o.col?i.row=f.row:(i.row=f.row,i.col=f.col)}return this.runLocalHooks("afterTransformEnd",i,l,a),i}}function S(e){let{x:t,y:o}=e;(0,r.default)(this,f,{x:t,y:o})}function E(e){const{width:t,height:o}=d(this,C,R).call(this);let s=0,n=0;return e.row<0?(s=-1,e.row=0):e.row>0&&e.row>=o&&(s=1,e.row=o-1),e.col<0?(n=-1,e.col=0):e.col>0&&e.col>=t&&(n=1,e.col=t-1),{rowDir:s,colDir:n}}function R(){return{width:(0,n.default)(this,f).x+(0,n.default)(this,g).countRenderableColumns(),height:(0,n.default)(this,f).y+(0,n.default)(this,g).countRenderableRows()}}function b(e){const{row:t,col:o}=(0,n.default)(this,g).visualToRenderableCoords(e);return{x:(0,n.default)(this,f).x+o,y:(0,n.default)(this,f).y+t}}function T(e){return e.col=e.col-(0,n.default)(this,f).x,e.row=e.row-(0,n.default)(this,f).y,(0,n.default)(this,g).renderableToVisualCoords(e)}(0,i.mixin)(v,l.default);var _=v;t.default=_},(e,t,o)=>{"use strict";t.__esModule=!0,t.detectSelectionType=f,t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){const t=f(e);if(t===i||t===l)return[];const o=p(t),s=new Set;(0,n.arrayEach)(e,(e=>{const{from:t,to:r}=o(e),i=Math.max(t.col,0),l=r.col-i+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>i+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=f(e);if(t===i||t===l)return[];const o=p(t),s=new Set;(0,n.arrayEach)(e,(e=>{const{from:t,to:r}=o(e),i=Math.max(t.row,0),l=r.row-i+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>i+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},o(78),o(8);var s=o(145),n=o(113),r=o(110);const i=0;t.SELECTION_TYPE_UNRECOGNIZED=i;const l=1;t.SELECTION_TYPE_EMPTY=l;const a=2;t.SELECTION_TYPE_ARRAY=a;const h=3;t.SELECTION_TYPE_OBJECT=h;const c=[h,a];t.SELECTION_TYPES=c;const d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],u=Symbol("root"),g=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(t!==u&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(e),n=t===u;let r=i;if(o){const t=e[0];if(0===e.length)r=l;else if(n&&t instanceof s.CellRange)r=h;else if(n&&Array.isArray(t))r=f(t,g);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!d[t].includes(typeof e)))&&(r=a)}}return r}function p(e){let{keepDirection:t=!1,propToCol:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(n){const i=e===h;let l=i?n.from.row:n[0],a=i?n.from.col:n[1],c=i?n.to.row:n[2],d=i?n.to.col:n[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof d&&(d=o(d))),(0,r.isUndefined)(c)&&(c=l),(0,r.isUndefined)(d)&&(d=a),!t){const e=l,t=a,o=c,s=d;l=Math.min(e,o),a=Math.min(t,s),c=Math.max(e,o),d=Math.max(t,s)}const u=new s.CellCoords(l,a),g=new s.CellCoords(c,d);return new s.CellRange(u,u,g)}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(261));t.DataMap=n.default;var r=s(o(264));t.MetaManager=r.default;var i=s(o(268));t.metaSchemaFactory=i.default;var l=o(273);t.replaceData=l.replaceData;var a=o(274);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(275);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(262),n=o(218),r=o(116),i=o(113),l=o(130),a=o(110);class h{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){this.instance=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,r.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,r.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,r.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.instance.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,a.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,a.isDefined)(t))return this.instance.toVisualColumn(t);const o=this.instance.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,r.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.instance.countSourceRows();let i=n,a=0,h=e;("number"!=typeof h||h>=n)&&(h=n),h<this.instance.countRows()&&(i=this.instance.toPhysicalRow(h));if(!1===this.instance.runHooks("beforeCreateRow",h,t,o)||null===i)return{delta:0};const c=this.tableMeta.maxRows,d=this.getSchema().length,u=[];for(;a<t&&n+a<c;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(d-1,(()=>e.push(null)))):"function"===this.instance.dataType?e=this.tableMeta.dataSchema(h+a):(e={},(0,r.deepExtend)(e,this.getSchema())),u.push(e),a+=1}this.instance.rowIndexMapper.insertIndexes(h,a),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,u);const g=this.instance.toVisualRow(i);return this.instance.countSourceRows()===u.length&&this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount()),a>0&&(null==e?this.metaManager.createRow(null,a):"auto"!==o&&this.metaManager.createRow(i,t)),this.instance.runHooks("afterCreateRow",g,a,o),this.instance.forceFullRender=!0,{delta:a,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,r=this.tableMeta.maxCols,i=this.instance.countSourceCols();let l=e;("number"!=typeof l||l>=i)&&(l=i);if(!1===this.instance.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=i;l<this.instance.countCols()&&(a=this.instance.toPhysicalColumn(l));const h=this.instance.countSourceRows();let c=this.instance.countCols(),d=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;d<t&&c<r;){if("number"!=typeof l||l>=c)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(u,0,null);d+=1,u+=1,c+=1}this.instance.columnIndexMapper.insertIndexes(l,d),d>0&&(null==e?this.metaManager.createColumn(null,d):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,d,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),r=this.instance.countSourceRows();s=(r+s)%r;if(!1===this.instance.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const i=n.length;if(this.filterData(s,i,n),s<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(n);const e=(0,a.isDefined)(this.tableMeta.columns)||(0,a.isDefined)(this.tableMeta.dataSchema);0===this.instance.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.instance.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.instance.runHooks("afterRemoveRow",s,i,n,o),this.instance.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.instance.countCols()+s)%this.instance.countCols();const n=this.visualColumnsToPhysical(s,t),r=n.slice(0).sort(((e,t)=>t-e));if(!1===this.instance.runHooks("beforeRemoveCol",s,t,n,o))return!1;let i=!0;const l=r.length,a=this.dataSource;for(let e=0;e<l;e++)i&&n[0]!==n[e]-e&&(i=!1);if(i)for(let e=0,o=this.instance.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.instance.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(n),0===this.instance.columnIndexMapper.getNotTrimmedIndexesLength()&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",s,t,n,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.instance.getDataAtCol(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let c=0;for(;c<o;)a.push(null),c+=1;return(0,i.to2dArray)(a),this.instance.populateFromArray(t,e,a,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.instance.getSourceDataAtRow(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let c=0;for(;c<o;)a.push(null),c+=1;return this.instance.populateFromArray(e,t,[a],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.instance.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.instance.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.instance.toPhysicalRow(e);let s=this.dataSource[o];const n=this.instance.runHooks("modifyRowData",o);s=isNaN(n)?n:s;let i=null;if(s&&s.hasOwnProperty&&(0,r.hasOwnProperty)(s,t))i=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;i=o}else"function"==typeof t&&(i=t(this.dataSource.slice(o,o+1)[0]));if(this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.instance.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.instance.toPhysicalRow(e);let n=o,i=this.dataSource[s];const l=this.instance.runHooks("modifyRowData",s);if(i=isNaN(l)?l:i,this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(n);this.instance.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}if(i&&i.hasOwnProperty&&(0,r.hasOwnProperty)(i,t))i[t]=n;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=i,r=0;for(r=0,o=e.length-1;r<o;r++)void 0===s[e[r]]&&(s[e[r]]={}),s=s[e[r]];s[e[r]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.instance.countSourceRows(),s=[];let n,r=(o+e)%o,i=t;for(;r<o&&i;)n=this.instance.toPhysicalRow(r),s.push(n),i-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.instance.countCols(),s=[];let n=(o+e)%o,r=t;for(;n<o&&r;){const e=this.instance.toPhysicalColumn(n);s.push(e),r-=1,n+=1}return s}clear(){for(let e=0;e<this.instance.countSourceRows();e++)for(let t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.instance.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,h.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,r,i;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const c=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=d;n++){i=[];const o=n>=0?this.instance.toPhysicalRow(n):n;for(r=Math.min(e.col,t.col);r<=u&&null!==o;r++)i.push(c.call(this,n,this.colToProp(r)));null!==o&&s.push(i)}return s}getText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.instance=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(263);t.parse=s.parse,t.stringify=s.stringify},(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let r,i=0,l=0;for(;e.length>0&&r!==e.length;)if(r=e.length,e.match(n))e=e.replace(n,""),i+=1,t[l][i]="";else if(e.match(o))e=e.replace(o,""),i=0,l+=1,t[l]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const n=e.slice(0,1);'"'===n&&(t+=1),o+=n,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[l][i]=o}return t},t.stringify=function(e){let t,o,s,n,r,i="";for(t=0,o=e.length;t<o;t+=1){for(n=e[t].length,s=0;s<n;s+=1)s>0&&(i+="\t"),r=e[t][s],"string"==typeof r?r.indexOf("\n")>-1?i+=`"${r.replace(/"/g,'""')}"`:i+=r:i+=null==r?"":r;t!==o-1&&(i+="\n")}return i};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,n=/^\t/},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(265)),r=s(o(269)),i=s(o(270)),l=s(o(272)),a=s(o(199)),h=o(116);class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=n,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=c,(0,h.mixin)(c,a.default)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=o(266),i=s(o(268));t.default=class{constructor(e){this.metaCtor=class{},this.meta=this.metaCtor.prototype,(0,n.extend)(this.meta,(0,i.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,n.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,s.objectEach)(r,((t,n)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(i[n]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(n))})),(0,s.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(78);var s=o(116),n=o(267)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getCellType=function(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,r.registerEditor)(e,o);s&&(0,i.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(78);var n=s(o(125)),r=o(122),i=o(133),l=o(134);const{register:a,getItem:h,hasItem:c,getNames:d,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=d,t.hasCellType=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(110),n=o(116);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,r,i;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(i=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,disableTabNavigation:!1,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(116),n=o(266);t.default=class{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,s.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=o(266),i=s(o(271));const l=["data","width"];t.default=class{constructor(e){this.globalMeta=e,this.metas=new i.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,n.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(113),n=o(266);class r{constructor(e){this.valueFactory=e,this.data=[],this.index=[],this.holes=new Set}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const r=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,r),...o,...this.index.slice(r)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,s.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(116),r=o(266),i=s(o(271));t.default=class{constructor(e){this.columnMeta=e,this.metas=new i.default((()=>this._createRow()))}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,n.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const r=this.metas.obtain(e).obtain(t);null===(n=r._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new i.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:a,dataMap:h,dataSource:c,internalSource:d,source:u,metaManager:g,firstRun:f}=s,p=(0,n.toUpperCaseFirst)(d),m=a.getSettings();Array.isArray(m.dataSchema)?a.dataType="array":(0,r.isFunction)(m.dataSchema)?a.dataType="function":a.dataType="object";h&&h.destroy();e=a.runHooks(`before${p}`,e,f,u);const C=new i.default(a,e,g);if(t(C),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${d} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=C.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=m.startRows;s<n;s++)if("object"!==a.dataType&&"function"!==a.dataType||!m.dataSchema)if("array"===a.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=m.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(a.dataType="array");m.data=e,C.dataSource=e,c.data=e,c.dataType=a.dataType,c.colToProp=C.colToProp.bind(C),c.propToCol=C.propToCol.bind(C),c.countCachedColumns=C.countCachedColumns.bind(C),o(C),a.runHooks(`after${p}`,e,f,u),f||(a.runHooks("afterChange",null,d),a.render())},o(8),o(78);var n=o(108),r=o(114),i=s(o(261)),l=o(116)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(123)),r=o(116),i=o(114);t.DynamicCellMetaMod=class{constructor(e){this.metaManager=e,this.metaSyncMemo=new Map,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),n.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:l}=e,a=this.metaManager.hot,h=a.colToProp(l);e.prop=h,a.runHooks("beforeGetCellMeta",n,l,e);const c=(0,r.hasOwnProperty)(e,"type")?e.type:null;let d=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;c&&(d?d.type=null!==(u=d.type)&&void 0!==u?u:c:d={type:c});d&&this.metaManager.updateCellMeta(o,s,d),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]]),this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,n="string"==typeof o,r=n?o:t,i=`_${r}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,i,s),n&&this.installPropWatcher(o,i,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,r),this[t]=n},enumerable:!0,configurable:!0})}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(277);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){let t;const{activate:o,deactivate:l}=(0,n.installFocusDetector)(e,{onFocusFromTop(){var o;const s=null!==(o=t)&&void 0!==o?o:r(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_above",s),e.selectCell(s.row,s.col)),e.listen()},onFocusFromBottom(){var o;const s=null!==(o=t)&&void 0!==o?o:i(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_below",s),e.selectCell(s.row,s.col)),e.listen()}});e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>o())),e.addHook("afterSelection",(()=>{var o;t=null===(o=e.getSelectedRangeLast())||void 0===o?void 0:o.highlight})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{var o;const{disableTabNavigation:s,autoWrapRow:n}=e.getSettings();if(s)return e.deselectCell(),e.unlisten(),!1;const l=e.selection.isSelected(),a=null===(o=e.getSelectedRangeLast())||void 0===o?void 0:o.highlight,h=r(e),c=i(e);return n||(h.row=a.row,c.row=a.row),!(t.shiftKey&&(!l||a.isEqual(h))||!(t.shiftKey||l&&!a.isEqual(c)))||(e.deselectCell(),e.unlisten(),!1)},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"before",relativeToGroup:s.GRID_GROUP,group:"focusCatcher"})};var s=o(278),n=o(324);function r(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let n=s&&e.countColHeaders()>0?-e.countColHeaders():0,r=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===n&&(n=t.getVisualFromRenderableIndex(n)),0===r&&(r=o.getVisualFromRenderableIndex(r)),null===n||null===r?null:e._createCellCoords(n,r)}function i(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let i=s.getRenderableIndexesLength()-1,l=n.getRenderableIndexesLength()-1;if(i<0){if(!r||0===e.countColHeaders())return null;i=-1}if(l<0){if(!r||0===e.countColHeaders())return null;l=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(i))&&void 0!==t?t:i,null!==(o=n.getVisualFromRenderableIndex(l))&&void 0!==o?o:l)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[n.shortcutsEditorContext,r.shortcutsGridContext].forEach((t=>t(e)))};var n=o(279),r=o(323),i=o(280);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),o=(0,n.createKeyboardShortcutCommandsPool)(e),r={group:s.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(e,t)=>o.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],r)};var s=o(280),n=o(281)},(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault";t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return c.forEach((o=>{let{name:s,callback:n}=o;t[s]=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return n(e,...o)}})),t};var s=o(282),n=o(287),r=o(302),i=o(319),l=o(320),a=o(321),h=o(322);const c=[...(0,s.getAllCommands)(),...(0,n.getAllCommands)(),...(0,r.getAllCommands)(),i.command,l.command,a.command,h.command]},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command]};var s=o(283),n=o(284),r=o(285),i=o(286)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorCloseAndSave",callback(e,t,o){const s=e._getEditorManager();s.closeEditorAndSaveChanges(e.getShortcutManager().isCtrlPressed()),s.moveSelectionAfterEnter(o.includes("shift"))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorFastOpen",callback(e,t){const{highlight:o}=e.getSelectedRangeLast();o.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(121);const n={name:"editorOpen",callback(e,t,o){const n=e._getEditorManager(),{highlight:r}=e.getSelectedRangeLast();r.isHeader()||(e.getSettings().enterBeginsEditing?n.cellProperties.readOnly?n.moveSelectionAfterEnter():n.openEditor(null,t,!0):n.moveSelectionAfterEnter(o.includes("shift")),(0,s.stopImmediatePropagation)(t))}};t.command=n},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command,l.command,a.command,h.command,c.command,d.command,u.command,g.command,f.command,p.command,m.command]};var s=o(288),n=o(289),r=o(290),i=o(291),l=o(292),a=o(293),h=o(294),c=o(295),d=o(296),u=o(297),g=o(298),f=o(299),p=o(300),m=o(301)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,-1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),r=Math.min(o.row-n,e.countRows()-1);e.selection.setRangeEnd(o),e.scrollViewportTo(r)}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selectAll(!0,!0,t):e.selectColumns(o.col,s.col,t.row)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(n.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(0,1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(n.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(n.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(0,1);t.setRangeStart(n.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selectAll(!0,!0,t):e.selectRows(o.row,s.row,t.col)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.max(t.row-e.countVisibleRows(),0),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),r=Math.max(o.row-n,0);e.selection.setRangeEnd(o),e.scrollViewportTo(r)}}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command,l.command,a.command,h.command,c.command,d.command,u.command,g.command,f.command,p.command,m.command,C.command,w.command]};var s=o(303),n=o(304),r=o(305),i=o(306),l=o(307),a=o(308),h=o(309),c=o(310),d=o(311),u=o(312),g=o(313),f=o(314),p=o(315),m=o(316),C=o(317),w=o(318)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=e.countVisibleRows()+o;s===e.countRows()-1?n=1:s+n>e.countRows()&&(n=e.countRows()-s-1),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo(0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionInlineEnd",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(-s.row,-s.col)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionInlineStart",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(s.row,s.col,!0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===o&&(o=-1),e.selection.setRangeStart(e._createCellCoords(o,t))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsBottom,10),r=o.getNearestNotHiddenIndex(e.countRows()-n-1,-1),i=s.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(r,i))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,s=parseInt(e.getSettings().fixedColumnsStart,10),n=e.getSelectedRangeLast().highlight.row,r=o.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(n,r))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,s=e.getSelectedRangeLast().highlight.row;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===n&&(n=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(s,n))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{row:s}=e.getSelectedRangeLast().highlight;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===n&&(n=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(s,n))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===o&&(o=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(o,t))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsTop,10),r=parseInt(e.getSettings().fixedColumnsStart,10),i=o.getNearestNotHiddenIndex(n,1),l=s.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(i,l))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=-(e.countVisibleRows()+o);s===-o?n=-1:s+n<o&&(n=-(s+o)),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo(0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),o=e.view.getFirstFullyVisibleRow()-1,s=e.view.getFirstFullyVisibleColumn()-1,n=e.view.getLastFullyVisibleRow()+1,r=e.view.getLastFullyVisibleColumn()+1,i=e._createCellCoords(o,s),l=e._createCellCoords(n,r);if(!e._createCellRange(i,i,l).includes(t)&&(t.row>=0||t.col>=0)){const o=Math.floor(e.countVisibleRows()/2),s=Math.floor(e.countVisibleCols()/2),n=[Math.max(t.row-o,0),Math.max(t.col-s,0)];t.col<0?n[1]=null:t.row<0&&(n[0]=null),e.scrollViewportTo(...n)}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"selectAll",callback(e){e.selectAll(!1,!1)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:o,col:s}=t[t.length-1].highlight.normalize(),n=e.getDataAtCell(o,s),r=new Map;for(let i=0;i<t.length;i++)t[i].forAll(((t,i)=>{if(t>=0&&i>=0&&(t!==o||i!==s)){const{readOnly:o}=e.getCellMeta(t,i);o||r.set(`${t}x${i}`,[t,i,n])}}));e.setDataAtCell(Array.from(r.values()))}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),o=(0,r.createKeyboardShortcutCommandsPool)(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,s.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:n.GRID_GROUP};t.addShortcuts([{keys:[["F2"]],callback:e=>o.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:n.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,s.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"],["Control/Meta","Shift","Space"]],callback:()=>o.selectAll()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],callback:()=>o.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],callback:()=>o.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],i)};var s=o(110),n=o(280),r=o(281)},(e,t)=>{"use strict";function o(e){const t=e.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),t}t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=e.rootDocument,n=e.rootElement,r=o(s),i=o(s);return r.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),i.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),n.firstChild.before(r),n.lastChild.after(i),{activate(){e._registerTimeout((()=>{r.tabIndex=0,i.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{r.tabIndex=-1,i.tabIndex=-1}),10)}}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(326);t.createShortcutManager=s.createShortcutManager},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(131),n=o(121),r=o(327),i=o(329);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:o,beforeKeyDown:l,afterKeyDown:a}=e;const h=(0,s.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,u=e=>h.getItem(e);let g=!1;const f=(0,i.useRecorder)(t,o,l,a,((e,t)=>{const o=u(d());let s=!1;if(!o.hasShortcut(t))return s;const r=o.getShortcuts(t);for(let o=0;o<r.length;o++){const{callback:i,runOnlyIf:l,preventDefault:a,stopPropagation:h,captureCtrl:c}=r[o];if(!1!==l(e)&&(g=c,s=!1===i(e,t),g=!1,a&&e.preventDefault(),h&&((0,n.stopImmediatePropagation)(e),e.stopPropagation()),s))break}return s}));return f.mount(),{addContext:e=>{const t=(0,r.createContext)(e);return h.addItem(e,t),t},getActiveContextName:d,getContext:u,setActiveContextName:e=>{c=e},isCtrlPressed:()=>!g&&(f.isPressed("control")||f.isPressed("meta")),releasePressedKeys:()=>f.releasePressedKeys(),destroy:()=>f.unmount()}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(131),n=o(328),r=o(110),i=o(114),l=o(116),a=o(112);t.createContext=e=>{const t=(0,s.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),o=function(){let{keys:e,callback:o,group:s,runOnlyIf:l=(()=>!0),captureCtrl:h=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:u,position:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,r.isUndefined)(s))throw new Error("You need to define the shortcut's group.");if(!1===(0,i.isFunction)(o))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(a.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
28
+ columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=(0,f.normalizeSelectionFactory)(t,{propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),s=this.settings.navigableHeaders,n={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:s?this.tableProps.countRowHeaders():0,countColHeaders:s?this.tableProps.countColHeaders():0},r=!e.some((e=>{const t=o(e),s=t.isValid(n);return!(s&&!t.containsHeaders()||s&&t.containsHeaders()&&t.isSingleHeader())}));return r&&(this.clear(),(0,d.arrayEach)(e,(e=>{const{from:t,to:s}=o(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(s.clone()),this.finish()}))),r}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s="string"==typeof e?this.tableProps.propToCol(e):e,n="string"==typeof t?this.tableProps.propToCol(t):t,i=this.tableProps.countRows(),l=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),h=0===a?0:-a,d=new r.CellCoords(h,s),u=new r.CellCoords(i-1,n),g=new r.CellRange(d,d,u).isValid({countRows:i,countCols:l,countRowHeaders:0,countColHeaders:a});if(g){const e=0===a?0:(0,c.clamp)(o,h,-1),t=i-1,r=this.tableProps.createCellCoords(e,s),l=this.tableProps.createCellCoords(t,n),d=this.tableProps.createCellCoords((0,c.clamp)(o,h,i-1),s);this.runLocalHooks("beforeSelectColumns",r,l,d),r.row=e,l.row=t,this.setRangeStartOnly(r,void 0,d),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(l),this.runLocalHooks("afterSelectColumns",r,l,d),this.finish()}return g}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.tableProps.countRows(),n=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),l=0===i?0:-i,a=new r.CellCoords(e,l),h=new r.CellCoords(t,n-1),d=new r.CellRange(a,a,h).isValid({countRows:s,countCols:n,countRowHeaders:i,countColHeaders:0});if(d){const s=0===i?0:(0,c.clamp)(o,l,-1),r=n-1,a=this.tableProps.createCellCoords(e,s),h=this.tableProps.createCellCoords(t,r),d=this.tableProps.createCellCoords(e,(0,c.clamp)(o,l,n-1));this.runLocalHooks("beforeSelectRows",a,h,d),a.col=s,h.col=r,this.setRangeStartOnly(a,void 0,d),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(h),this.runLocalHooks("afterSelectRows",a,h,d),this.finish()}return d}refresh(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),o=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),n=this.highlight.createColumnHeader(),r=this.highlight.createActiveRowHeader(),i=this.highlight.createActiveColumnHeader(),l=this.highlight.createActiveCornerHeader(),a=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t.commit(),o.commit(),s.commit(),n.commit(),r.commit(),i.commit(),l.commit(),a.commit(),h.commit()}this.highlight.useLayerLevel(t)}}(0,a.mixin)(C,u.default);var w=C;t.default=w},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8),o(78);var n=s(o(136)),r=o(247),i=o(249),l=o(250),a=o(251),h=o(252),c=o(253),d=o(254),u=o(255),g=o(256),f=o(145);t.ACTIVE_HEADER_TYPE=f.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=f.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=f.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=f.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=f.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=f.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=f.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=f.HIGHLIGHT_COLUMN_TYPE;var p=o(113);let m;function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var y=new WeakSet;m=Symbol.iterator;function v(e,t){const o=this.layerLevel;if(e.has(o))return e.get(o);const s=t({layerLevel:o,...this.options});return e.set(o,s),s}var S=class{constructor(e){C(this,y),(0,n.default)(this,"options",void 0),(0,n.default)(this,"layerLevel",0),(0,n.default)(this,"focus",void 0),(0,n.default)(this,"fill",void 0),(0,n.default)(this,"layeredAreas",new Map),(0,n.default)(this,"areas",new Map),(0,n.default)(this,"rowHeaders",new Map),(0,n.default)(this,"columnHeaders",new Map),(0,n.default)(this,"activeRowHeaders",new Map),(0,n.default)(this,"activeColumnHeaders",new Map),(0,n.default)(this,"activeCornerHeaders",new Map),(0,n.default)(this,"rowHighlights",new Map),(0,n.default)(this,"columnHighlights",new Map),(0,n.default)(this,"customSelections",[]),this.options=e,this.focus=(0,h.createHighlight)(e),this.fill=(0,d.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=!1;return t.isCell()&&(s=this.options.disabledCellSelection(t.row,t.col)),"string"==typeof s&&(s=[s]),!1===s||Array.isArray(s)&&!s.includes(o)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return w(this,y,v).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,y,v).call(this,this.areas,l.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,y,v).call(this,this.rowHeaders,u.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,y,v).call(this,this.columnHeaders,u.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,y,v).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,y,v).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,y,v).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,y,v).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,y,v).call(this,this.columnHighlights,a.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,c.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,p.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}};t.default=S},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(136)),r=o(145);class i extends r.Selection{constructor(e,t){super(e,null),(0,n.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:o}=e,s=this.getNearestNotHiddenCoords(t,1),n=this.getNearestNotHiddenCoords(o,-1);return null===s||null===n?null:((s.row>n.row||s.col>n.col)&&(s=t,n=o),this.settings.createCellRange(s,s,n))}getNearestNotHiddenCoords(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const s=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===s)return null;const n=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return null===n?null:this.settings.createCellCoords(s,n)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o="N-S"===e.getVerticalDirection()?1:-1,s="W-E"===e.getHorizontalDirection()?1:-1,n=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==n&&null!==n.col&&null!==n.row||(r=this.getNearestNotHiddenCoords(t,o,s)),null!==r&&e.overlaps(r)){const t=e.highlight.clone();if(t.row>=0&&(t.row=r.row),t.col>=0&&(t.col=r.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==n&&null===r&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),s=this.settings.visualToRenderableCoords(t);return null===o.row||null===o.col||null===s.row||null===s.col?null:this.settings.createCellRange(o,o,s)}}var l=i;t.default=l},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...o}=e;return new r.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"highlight",...t,selectionType:n.HIGHLIGHT_AREA_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_COLUMN_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...o}=e;return new r.default({className:"current",border:{width:2,color:"#4b89ff",cornerVisible:t},...o,selectionType:n.HIGHLIGHT_FOCUS_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:o,...s}=e;return new r.default({...t,...s,selectionType:n.HIGHLIGHT_CUSTOM_SELECTION_TYPE},o)};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:n.HIGHLIGHT_FILL_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_HEADER_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:n.HIGHLIGHT_ROW_TYPE})};var n=o(145),r=s(o(248))},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);class s{constructor(e){this.ranges=[],this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}var n=s;t.default=n},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0;var n=s(o(140)),r=s(o(143)),i=o(116),l=s(o(199));function a(e,t){c(e,t),t.add(e)}function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var u=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakSet,m=new WeakSet,C=new WeakSet,w=new WeakSet,y=new WeakSet;class v{constructor(e,t){a(this,y),a(this,w),a(this,C),a(this,m),a(this,p),h(this,u,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:{x:0,y:0}}),(0,r.default)(this,u,e),(0,r.default)(this,g,t)}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d(this,p,S).call(this,{x:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countRowHeaders():0,y:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countColHeaders():0});const s=(0,n.default)(this,g).createCellCoords(e,t);let r=(0,n.default)(this,u).current().highlight;const i=(0,n.default)(this,g).visualToRenderableCoords(r);let l=0,a=0;if(this.runLocalHooks("beforeTransformStart",s),null!==i.row&&null!==i.col){const{width:e,height:t}=d(this,C,R).call(this),{x:i,y:h}=d(this,w,b).call(this,r),c=(0,n.default)(this,g).fixedRowsBottom(),u=(0,n.default)(this,g).minSpareRows(),f=(0,n.default)(this,g).minSpareCols(),p=(0,n.default)(this,g).autoWrapRow(),v=(0,n.default)(this,g).autoWrapCol(),S={row:h+s.row,col:i+s.col};if(S.row>=t){if(o&&u>0&&0===c)this.runLocalHooks("insertRowRequire",(0,n.default)(this,g).countRenderableRows());else if(v){const o=S.col+1;S.row=S.row-t,S.col=o>=e?o-e:o}}else if(S.row<0&&v){const o=S.col-1;S.row=t+S.row,S.col=o<0?e+o:o}if(S.col>=e){if(o&&f>0)this.runLocalHooks("insertColRequire",(0,n.default)(this,g).countRenderableColumns());else if(p){const o=S.row+1;S.row=o>=t?o-t:o,S.col=S.col-e}}else if(S.col<0&&p){const o=S.row-1;S.row=o<0?t+o:o,S.col=e+S.col}const _=(0,n.default)(this,g).createCellCoords(S.row,S.col),{rowDir:M,colDir:O}=d(this,m,E).call(this,_);l=M,a=O,r=d(this,y,T).call(this,_)}return this.runLocalHooks("afterTransformStart",r,l,a),r}transformEnd(e,t){d(this,p,S).call(this,{x:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countRowHeaders():0,y:(0,n.default)(this,g).navigableHeaders()?(0,n.default)(this,g).countColHeaders():0});const o=(0,n.default)(this,g).createCellCoords(e,t),s=(0,n.default)(this,u).current(),r=(0,n.default)(this,g).visualToRenderableCoords(s.highlight),i=s.to.clone();let l=0,a=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==r.row&&null!==r.col){const{x:e,y:t}=d(this,w,b).call(this,s.to),r={row:t+o.row,col:e+o.col},h=(0,n.default)(this,g).createCellCoords(r.row,r.col),{rowDir:c,colDir:u}=d(this,m,E).call(this,h);l=c,a=u;const f=d(this,y,T).call(this,h);0===o.row&&0!==o.col?i.col=f.col:0!==o.row&&0===o.col?i.row=f.row:(i.row=f.row,i.col=f.col)}return this.runLocalHooks("afterTransformEnd",i,l,a),i}}function S(e){let{x:t,y:o}=e;(0,r.default)(this,f,{x:t,y:o})}function E(e){const{width:t,height:o}=d(this,C,R).call(this);let s=0,n=0;return e.row<0?(s=-1,e.row=0):e.row>0&&e.row>=o&&(s=1,e.row=o-1),e.col<0?(n=-1,e.col=0):e.col>0&&e.col>=t&&(n=1,e.col=t-1),{rowDir:s,colDir:n}}function R(){return{width:(0,n.default)(this,f).x+(0,n.default)(this,g).countRenderableColumns(),height:(0,n.default)(this,f).y+(0,n.default)(this,g).countRenderableRows()}}function b(e){const{row:t,col:o}=(0,n.default)(this,g).visualToRenderableCoords(e);return{x:(0,n.default)(this,f).x+o,y:(0,n.default)(this,f).y+t}}function T(e){return e.col=e.col-(0,n.default)(this,f).x,e.row=e.row-(0,n.default)(this,f).y,(0,n.default)(this,g).renderableToVisualCoords(e)}(0,i.mixin)(v,l.default);var _=v;t.default=_},(e,t,o)=>{"use strict";t.__esModule=!0,t.detectSelectionType=f,t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){const t=f(e);if(t===i||t===l)return[];const o=p(t),s=new Set;(0,n.arrayEach)(e,(e=>{const{from:t,to:r}=o(e),i=Math.max(t.col,0),l=r.col-i+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>i+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=f(e);if(t===i||t===l)return[];const o=p(t),s=new Set;(0,n.arrayEach)(e,(e=>{const{from:t,to:r}=o(e),i=Math.max(t.row,0),l=r.row-i+1;(0,n.arrayEach)(Array.from(new Array(l),((e,t)=>i+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,n.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},o(78),o(8);var s=o(145),n=o(113),r=o(110);const i=0;t.SELECTION_TYPE_UNRECOGNIZED=i;const l=1;t.SELECTION_TYPE_EMPTY=l;const a=2;t.SELECTION_TYPE_ARRAY=a;const h=3;t.SELECTION_TYPE_OBJECT=h;const c=[h,a];t.SELECTION_TYPES=c;const d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],u=Symbol("root"),g=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u;if(t!==u&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(e),n=t===u;let r=i;if(o){const t=e[0];if(0===e.length)r=l;else if(n&&t instanceof s.CellRange)r=h;else if(n&&Array.isArray(t))r=f(t,g);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!d[t].includes(typeof e)))&&(r=a)}}return r}function p(e){let{keepDirection:t=!1,propToCol:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(n){const i=e===h;let l=i?n.from.row:n[0],a=i?n.from.col:n[1],c=i?n.to.row:n[2],d=i?n.to.col:n[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof d&&(d=o(d))),(0,r.isUndefined)(c)&&(c=l),(0,r.isUndefined)(d)&&(d=a),!t){const e=l,t=a,o=c,s=d;l=Math.min(e,o),a=Math.min(t,s),c=Math.max(e,o),d=Math.max(t,s)}const u=new s.CellCoords(l,a),g=new s.CellCoords(c,d);return new s.CellRange(u,u,g)}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(261));t.DataMap=n.default;var r=s(o(264));t.MetaManager=r.default;var i=s(o(268));t.metaSchemaFactory=i.default;var l=o(273);t.replaceData=l.replaceData;var a=o(274);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(275);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(262),n=o(218),r=o(116),i=o(113),l=o(130),a=o(110);class h{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){this.instance=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.colToPropCache=void 0,this.propToColCache=void 0,this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,n=0,i=!1;if("function"==typeof t){const t=(0,r.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=i?t(o):t[o];if((0,r.isObject)(e)){if(void 0!==e.data){const t=i?n:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}n+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,n=t,i=o;return void 0===n&&(n=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,r.objectEach)(e,((e,t)=>{null===e?(s=i+t,this.colToPropCache.push(s),this.propToColCache.set(s,n),n+=1):n=this.recursiveDuckColumns(e,n,`${t}.`)})),n}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.instance.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,a.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,a.isDefined)(t))return this.instance.toVisualColumn(t);const o=this.instance.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,r.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=this.instance.countSourceRows();let i=n,a=0,h=e;("number"!=typeof h||h>=n)&&(h=n),h<this.instance.countRows()&&(i=this.instance.toPhysicalRow(h));if(!1===this.instance.runHooks("beforeCreateRow",h,t,o)||null===i)return{delta:0};const c=this.tableMeta.maxRows,d=this.getSchema().length,u=[];for(;a<t&&n+a<c;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(d-1,(()=>e.push(null)))):"function"===this.instance.dataType?e=this.tableMeta.dataSchema(h+a):(e={},(0,r.deepExtend)(e,this.getSchema())),u.push(e),a+=1}this.instance.rowIndexMapper.insertIndexes(h,a),"below"===s&&(i=Math.min(i+1,n)),this.spliceData(i,0,u);const g=this.instance.toVisualRow(i);return this.instance.countSourceRows()===u.length&&this.instance.columnIndexMapper.initToLength(this.instance.getInitialColumnCount()),a>0&&(null==e?this.metaManager.createRow(null,a):"auto"!==o&&this.metaManager.createRow(i,t)),this.instance.runHooks("afterCreateRow",g,a,o),this.instance.forceFullRender=!0,{delta:a,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.instance.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const n=this.dataSource,r=this.tableMeta.maxCols,i=this.instance.countSourceCols();let l=e;("number"!=typeof l||l>=i)&&(l=i);if(!1===this.instance.runHooks("beforeCreateCol",l,t,o))return{delta:0};let a=i;l<this.instance.countCols()&&(a=this.instance.toPhysicalColumn(l));const h=this.instance.countSourceRows();let c=this.instance.countCols(),d=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;d<t&&c<r;){if("number"!=typeof l||l>=c)if(h>0)for(let e=0;e<h;e+=1)void 0===n[e]&&(n[e]=[]),n[e].push(null);else n.push([null]);else for(let e=0;e<h;e++)n[e].splice(u,0,null);d+=1,u+=1,c+=1}this.instance.columnIndexMapper.insertIndexes(l,d),d>0&&(null==e?this.metaManager.createColumn(null,d):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,d,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const n=this.visualRowsToPhysical(s,t),r=this.instance.countSourceRows();s=(r+s)%r;if(!1===this.instance.runHooks("beforeRemoveRow",s,n.length,n,o))return!1;const i=n.length;if(this.filterData(s,i,n),s<this.instance.countRows()){this.instance.rowIndexMapper.removeIndexes(n);const e=(0,a.isDefined)(this.tableMeta.columns)||(0,a.isDefined)(this.tableMeta.dataSchema);0===this.instance.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.instance.columnIndexMapper.setIndexesSequence([])}return n.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.instance.runHooks("afterRemoveRow",s,i,n,o),this.instance.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.instance.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.instance.countCols()+s)%this.instance.countCols();const n=this.visualColumnsToPhysical(s,t),r=n.slice(0).sort(((e,t)=>t-e));if(!1===this.instance.runHooks("beforeRemoveCol",s,t,n,o))return!1;let i=!0;const l=r.length,a=this.dataSource;for(let e=0;e<l;e++)i&&n[0]!==n[e]-e&&(i=!1);if(i)for(let e=0,o=this.instance.countSourceRows();e<o;e++)a[e].splice(n[0],t),0===e&&this.metaManager.removeColumn(n[0],t);else for(let e=0,t=this.instance.countSourceRows();e<t;e++)for(let t=0;t<l;t++)a[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.instance.countCols()&&(this.instance.columnIndexMapper.removeIndexes(n),0===this.instance.columnIndexMapper.getNotTrimmedIndexesLength()&&this.instance.rowIndexMapper.setIndexesSequence([])),this.instance.runHooks("afterRemoveCol",s,t,n,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.instance.getDataAtCol(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let c=0;for(;c<o;)a.push(null),c+=1;return(0,i.to2dArray)(a),this.instance.populateFromArray(t,e,a,null,null,"spliceCol"),n}spliceRow(e,t,o){const s=this.instance.getSourceDataAtRow(e),n=s.slice(t,t+o),r=s.slice(t+o);for(var l=arguments.length,a=new Array(l>3?l-3:0),h=3;h<l;h++)a[h-3]=arguments[h];(0,i.extendArray)(a,r);let c=0;for(;c<o;)a.push(null),c+=1;return this.instance.populateFromArray(e,t,[a],null,null,"spliceRow"),n}spliceData(e,t,o){if(!1!==this.instance.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.instance.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.instance.toPhysicalRow(e);let s=this.dataSource[o];const n=this.instance.runHooks("modifyRowData",o);s=isNaN(n)?n:s;let i=null;if(s&&s.hasOwnProperty&&(0,r.hasOwnProperty)(s,t))i=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;i=o}else"function"==typeof t&&(i=t(this.dataSource.slice(o,o+1)[0]));if(this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(i);this.instance.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.instance.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.instance.toPhysicalRow(e);let n=o,i=this.dataSource[s];const l=this.instance.runHooks("modifyRowData",s);if(i=isNaN(l)?l:i,this.instance.hasHook("modifyData")){const e=(0,r.createObjectPropListener)(n);this.instance.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(n=e.value)}if(i&&i.hasOwnProperty&&(0,r.hasOwnProperty)(i,t))i[t]=n;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=i,r=0;for(r=0,o=e.length-1;r<o;r++)void 0===s[e[r]]&&(s[e[r]]={}),s=s[e[r]];s[e[r]]=n}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],n):i[t]=n}visualRowsToPhysical(e,t){const o=this.instance.countSourceRows(),s=[];let n,r=(o+e)%o,i=t;for(;r<o&&i;)n=this.instance.toPhysicalRow(r),s.push(n),i-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.instance.countCols(),s=[];let n=(o+e)%o,r=t;for(;n<o&&r;){const e=this.instance.toPhysicalColumn(n);s.push(e),r-=1,n+=1}return s}clear(){for(let e=0;e<this.instance.countSourceRows();e++)for(let t=0;t<this.instance.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.instance.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.instance.countRows()-1,0),col:Math.max(this.instance.countCols()-1,0)};return e.row-t.row!=0||this.instance.countSourceRows()?this.getRange(e,t,h.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let n,r,i;const l=this.tableMeta.maxRows,a=this.tableMeta.maxCols;if(0===l||0===a)return[];const c=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,d=Math.min(Math.max(l-1,0),Math.max(e.row,t.row)),u=Math.min(Math.max(a-1,0),Math.max(e.col,t.col));for(n=Math.min(e.row,t.row);n<=d;n++){i=[];const o=n>=0?this.instance.toPhysicalRow(n):n;for(r=Math.min(e.col,t.col);r<=u&&null!==o;r++)i.push(c.call(this,n,this.colToProp(r)));null!==o&&s.push(i)}return s}getText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,s.stringify)(this.getRange(e,t,h.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.instance=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var c=h;t.default=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(263);t.parse=s.parse,t.stringify=s.stringify},(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let r,i=0,l=0;for(;e.length>0&&r!==e.length;)if(r=e.length,e.match(n))e=e.replace(n,""),i+=1,t[l][i]="";else if(e.match(o))e=e.replace(o,""),i=0,l+=1,t[l]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const n=e.slice(0,1);'"'===n&&(t+=1),o+=n,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[l][i]=o}return t},t.stringify=function(e){let t,o,s,n,r,i="";for(t=0,o=e.length;t<o;t+=1){for(n=e[t].length,s=0;s<n;s+=1)s>0&&(i+="\t"),r=e[t][s],"string"==typeof r?r.indexOf("\n")>-1?i+=`"${r.replace(/"/g,'""')}"`:i+=r:i+=null==r?"":r;t!==o-1&&(i+="\n")}return i};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,n=/^\t/},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(265)),r=s(o(269)),i=s(o(270)),l=s(o(272)),a=s(o(199)),h=o(116);class c{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new n.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new i.default(this.globalMeta),this.cellMeta=new l.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:n}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=n,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=c,(0,h.mixin)(c,a.default)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=o(266),i=s(o(268));t.default=class{constructor(e){this.metaCtor=class{},this.meta=this.metaCtor.prototype,(0,n.extend)(this.meta,(0,i.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,n.extend)(this.meta,e),(0,r.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,n.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};(0,s.objectEach)(r,((t,n)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(n,o)&&(i[n]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(n))})),(0,s.extend)(e,i)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(78);var s=o(116),n=o(267)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getCellType=function(e){if(!c(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:n}=t;o&&(0,r.registerEditor)(e,o);s&&(0,i.registerRenderer)(e,s);n&&(0,l.registerValidator)(e,n);a(e,t)},o(78);var n=s(o(125)),r=o(122),i=o(133),l=o(134);const{register:a,getItem:h,hasItem:c,getNames:d,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=d,t.hasCellType=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(110),n=o(116);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",isEmptyCol(e){let t,o,n;for(t=0,o=this.countRows();t<o;t++)if(n=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(n))return!1;return!0},isEmptyRow(e){let t,o,r,i;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(i=this.getCellMeta(e,t),(0,n.isObjectEqual)(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,disableTabNavigation:!1,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(116),n=o(266);t.default=class{constructor(e){const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,s.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(116),r=o(266),i=s(o(271));const l=["data","width"];t.default=class{constructor(e){this.globalMeta=e,this.metas=new i.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,n.extend)(o,t),(0,r.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,r.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(113),n=o(266);class r{constructor(e){this.valueFactory=e,this.data=[],this.index=[],this.holes=new Set}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const r=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,r),...o,...this.index.slice(r)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,s.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}t.default=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(116),r=o(266),i=s(o(271));t.default=class{constructor(e){this.columnMeta=e,this.metas=new i.default((()=>this._createRow()))}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,n.extend)(s,o),(0,r.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var n;const r=this.metas.obtain(e).obtain(t);null===(n=r._automaticallyAssignedMetaProps)||void 0===n||n.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,r.assert)((()=>(0,r.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new i.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:a,dataMap:h,dataSource:c,internalSource:d,source:u,metaManager:g,firstRun:f}=s,p=(0,n.toUpperCaseFirst)(d),m=a.getSettings();Array.isArray(m.dataSchema)?a.dataType="array":(0,r.isFunction)(m.dataSchema)?a.dataType="function":a.dataType="object";h&&h.destroy();e=a.runHooks(`before${p}`,e,f,u);const C=new i.default(a,e,g);if(t(C),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${d} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=C.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=m.startRows;s<n;s++)if("object"!==a.dataType&&"function"!==a.dataType||!m.dataSchema)if("array"===a.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=m.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(a.dataType="array");m.data=e,C.dataSource=e,c.data=e,c.dataType=a.dataType,c.colToProp=C.colToProp.bind(C),c.propToCol=C.propToCol.bind(C),c.countCachedColumns=C.countCachedColumns.bind(C),o(C),a.runHooks(`after${p}`,e,f,u),f||(a.runHooks("afterChange",null,d),a.render())},o(8),o(78);var n=o(108),r=o(114),i=s(o(261)),l=o(116)},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(123)),r=o(116),i=o(114);t.DynamicCellMetaMod=class{constructor(e){this.metaManager=e,this.metaSyncMemo=new Map,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),n.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:n,visualCol:l}=e,a=this.metaManager.hot,h=a.colToProp(l);e.prop=h,a.runHooks("beforeGetCellMeta",n,l,e);const c=(0,r.hasOwnProperty)(e,"type")?e.type:null;let d=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;c&&(d?d.type=null!==(u=d.type)&&void 0!==u?u:c:d={type:c});d&&this.metaManager.updateCellMeta(o,s,d),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]]),this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,n="string"==typeof o,r=n?o:t,i=`_${r}`;this.metaManager.globalMeta.meta[i]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,i,s),n&&this.installPropWatcher(o,i,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(n){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,n,r),this[t]=n},enumerable:!0,configurable:!0})}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(277);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){let t;const{activate:o,deactivate:l}=(0,n.installFocusDetector)(e,{onFocusFromTop(){var o;const s=null!==(o=t)&&void 0!==o?o:r(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_above",s),e.selectCell(s.row,s.col)),e.listen()},onFocusFromBottom(){var o;const s=null!==(o=t)&&void 0!==o?o:i(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_below",s),e.selectCell(s.row,s.col)),e.listen()}});e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>o())),e.addHook("afterSelection",(()=>{var o;t=null===(o=e.getSelectedRangeLast())||void 0===o?void 0:o.highlight})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:t=>{var o;const{disableTabNavigation:s,autoWrapRow:n}=e.getSettings();if(s)return e.deselectCell(),e.unlisten(),!1;const l=e.selection.isSelected(),a=null===(o=e.getSelectedRangeLast())||void 0===o?void 0:o.highlight,h=r(e),c=i(e);return n||(h.row=a.row,c.row=a.row),!(t.shiftKey&&(!l||a.isEqual(h))||!(t.shiftKey||l&&!a.isEqual(c)))||(e.deselectCell(),e.unlisten(),!1)},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"before",relativeToGroup:s.GRID_GROUP,group:"focusCatcher"})};var s=o(278),n=o(324);function r(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let n=s&&e.countColHeaders()>0?-e.countColHeaders():0,r=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===n&&(n=t.getVisualFromRenderableIndex(n)),0===r&&(r=o.getVisualFromRenderableIndex(r)),null===n||null===r?null:e._createCellCoords(n,r)}function i(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let i=s.getRenderableIndexesLength()-1,l=n.getRenderableIndexesLength()-1;if(i<0){if(!r||0===e.countColHeaders())return null;i=-1}if(l<0){if(!r||0===e.countColHeaders())return null;l=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(i))&&void 0!==t?t:i,null!==(o=n.getVisualFromRenderableIndex(l))&&void 0!==o?o:l)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[n.shortcutsEditorContext,r.shortcutsGridContext].forEach((t=>t(e)))};var n=o(279),r=o(323),i=o(280);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===i[e]||(t[e]=i[e]))}))},(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),o=(0,n.createKeyboardShortcutCommandsPool)(e),r={group:s.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"],["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],callback:(e,t)=>o.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],r)};var s=o(280),n=o(281)},(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault";t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return c.forEach((o=>{let{name:s,callback:n}=o;t[s]=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return n(e,...o)}})),t};var s=o(282),n=o(287),r=o(302),i=o(319),l=o(320),a=o(321),h=o(322);const c=[...(0,s.getAllCommands)(),...(0,n.getAllCommands)(),...(0,r.getAllCommands)(),i.command,l.command,a.command,h.command]},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command]};var s=o(283),n=o(284),r=o(285),i=o(286)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorCloseAndSave",callback(e,t,o){const s=e._getEditorManager();s.closeEditorAndSaveChanges(e.getShortcutManager().isCtrlPressed()),s.moveSelectionAfterEnter(o.includes("shift"))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"editorFastOpen",callback(e,t){const{highlight:o}=e.getSelectedRangeLast();o.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(121);const n={name:"editorOpen",callback(e,t,o){const n=e._getEditorManager(),{highlight:r}=e.getSelectedRangeLast();r.isHeader()||(e.getSettings().enterBeginsEditing?n.cellProperties.readOnly?n.moveSelectionAfterEnter():n.openEditor(null,t,!0):n.moveSelectionAfterEnter(o.includes("shift")),(0,s.stopImmediatePropagation)(t))}};t.command=n},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command,l.command,a.command,h.command,c.command,d.command,u.command,g.command,f.command,p.command,m.command]};var s=o(288),n=o(289),r=o(290),i=o(291),l=o(292),a=o(293),h=o(294),c=o(295),d=o(296),u=o(297),g=o(298),f=o(299),p=o(300),m=o(301)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,-1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),r=Math.min(o.row-n,e.countRows()-1);e.selection.setRangeEnd(o),e.scrollViewportTo(r)}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selectAll(!0,!0,t):e.selectColumns(o.col,s.col,t.row)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(n.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(0,1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(n.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(n.clone()),i&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:n,to:r}=e.getSelectedRangeLast(),i=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||i){const s=o.getNearestNotHiddenIndex(0,1);t.setRangeStart(n.clone()),i&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selectAll(!0,!0,t):e.selectRows(o.row,s.row,t.col)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.max(t.row-e.countVisibleRows(),0),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,1);if(null!==s){const o=e._createCellCoords(s,t.col),n=t.row-e.view.getFirstFullyVisibleRow(),r=Math.max(o.row-n,0);e.selection.setRangeEnd(o),e.scrollViewportTo(r)}}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command,l.command,a.command,h.command,c.command,d.command,u.command,g.command,f.command,p.command,m.command,C.command,w.command]};var s=o(303),n=o(304),r=o(305),i=o(306),l=o(307),a=o(308),h=o(309),c=o(310),d=o(311),u=o(312),g=o(313),f=o(314),p=o(315),m=o(316),C=o(317),w=o(318)},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=e.countVisibleRows()+o;s===e.countRows()-1?n=1:s+n>e.countRows()&&(n=e.countRows()-s-1),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo(0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionInlineEnd",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(-s.row,-s.col)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionInlineStart",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(s.row,s.col,!0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===o&&(o=-1),e.selection.setRangeStart(e._createCellCoords(o,t))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsBottom,10),r=o.getNearestNotHiddenIndex(e.countRows()-n-1,-1),i=s.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(r,i))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,s=parseInt(e.getSettings().fixedColumnsStart,10),n=e.getSelectedRangeLast().highlight.row,r=o.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(n,r))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,s=e.getSelectedRangeLast().highlight.row;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===n&&(n=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(s,n))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{row:s}=e.getSelectedRangeLast().highlight;let n=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===n&&(n=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(s,n))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===o&&(o=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(o,t))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,n=parseInt(e.getSettings().fixedRowsTop,10),r=parseInt(e.getSettings().fixedColumnsStart,10),i=o.getNearestNotHiddenIndex(n,1),l=s.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(i,l))}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let n=-(e.countVisibleRows()+o);s===-o?n=-1:s+n<o&&(n=-(s+o)),e.selection.transformStart(n,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo(0)}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),o=e.view.getFirstFullyVisibleRow()-1,s=e.view.getFirstFullyVisibleColumn()-1,n=e.view.getLastFullyVisibleRow()+1,r=e.view.getLastFullyVisibleColumn()+1,i=e._createCellCoords(o,s),l=e._createCellCoords(n,r);if(!e._createCellRange(i,i,l).includes(t)&&(t.row>=0||t.col>=0)){const o=Math.floor(e.countVisibleRows()/2),s=Math.floor(e.countVisibleCols()/2),n=[Math.max(t.row-o,0),Math.max(t.col-s,0)];t.col<0?n[1]=null:t.row<0&&(n[0]=null),e.scrollViewportTo(...n)}}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"selectAll",callback(e){e.selectAll()}};t.command=o},(e,t)=>{"use strict";t.__esModule=!0;const o={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:o,col:s}=t[t.length-1].highlight.normalize(),n=e.getDataAtCell(o,s),r=new Map;for(let i=0;i<t.length;i++)t[i].forAll(((t,i)=>{if(t>=0&&i>=0&&(t!==o||i!==s)){const{readOnly:o}=e.getCellMeta(t,i);o||r.set(`${t}x${i}`,[t,i,n])}}));e.setDataAtCell(Array.from(r.values()))}};t.command=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),o=(0,r.createKeyboardShortcutCommandsPool)(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,s.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:n.GRID_GROUP};t.addShortcuts([{keys:[["F2"]],callback:e=>o.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:n.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,s.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"],["Control/Meta","Shift","Space"]],callback:()=>o.selectAll()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],callback:()=>o.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],callback:()=>o.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],i)};var s=o(110),n=o(280),r=o(281)},(e,t)=>{"use strict";function o(e){const t=e.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),t}t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const s=e.rootDocument,n=e.rootElement,r=o(s),i=o(s);return r.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),i.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),n.firstChild.before(r),n.lastChild.after(i),{activate(){e._registerTimeout((()=>{r.tabIndex=0,i.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{r.tabIndex=-1,i.tabIndex=-1}),10)}}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(326);t.createShortcutManager=s.createShortcutManager},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(131),n=o(121),r=o(327),i=o(329);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:o,beforeKeyDown:l,afterKeyDown:a}=e;const h=(0,s.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,u=e=>h.getItem(e);let g=!1;const f=(0,i.useRecorder)(t,o,l,a,((e,t)=>{const o=u(d());let s=!1;if(!o.hasShortcut(t))return s;const r=o.getShortcuts(t);for(let o=0;o<r.length;o++){const{callback:i,runOnlyIf:l,preventDefault:a,stopPropagation:h,captureCtrl:c}=r[o];if(!1!==l(e)&&(g=c,s=!1===i(e,t),g=!1,a&&e.preventDefault(),h&&((0,n.stopImmediatePropagation)(e),e.stopPropagation()),s))break}return s}));return f.mount(),{addContext:e=>{const t=(0,r.createContext)(e);return h.addItem(e,t),t},getActiveContextName:d,getContext:u,setActiveContextName:e=>{c=e},isCtrlPressed:()=>!g&&(f.isPressed("control")||f.isPressed("meta")),releasePressedKeys:()=>f.releasePressedKeys(),destroy:()=>f.unmount()}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(131),n=o(328),r=o(110),i=o(114),l=o(116),a=o(112);t.createContext=e=>{const t=(0,s.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),o=function(){let{keys:e,callback:o,group:s,runOnlyIf:l=(()=>!0),captureCtrl:h=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:u,position:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,r.isUndefined)(s))throw new Error("You need to define the shortcut's group.");if(!1===(0,i.isFunction)(o))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(a.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
29
29
  using the KeyboardEvent.key properties:\x20
30
30
  https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const f={callback:o,group:s,runOnlyIf:l,captureCtrl:h,preventDefault:c,stopPropagation:d};(0,r.isDefined)(u)&&([f.relativeToGroup,f.position]=[u,g]),e.forEach((e=>{const o=(0,n.normalizeKeys)(e);if(t.hasItem(o)){const e=t.getItem(o);let s=e.findIndex((e=>e.group===u));-1!==s?"before"===g?s-=1:s+=1:s=e.length,e.splice(s,0,f)}else t.addItem(o,[f])}))},h=e=>{const o=(0,n.normalizeKeys)(e);t.removeItem(o)};return{addShortcut:o,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,l.objectEach)(t,((o,s)=>{!1===Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=t[s])})),o(e)}))},getShortcuts:e=>{const o=(0,n.normalizeKeys)(e),s=t.getItem(o);return(0,r.isDefined)(s)?s.slice():[]},hasShortcut:e=>{const o=(0,n.normalizeKeys)(e);return t.hasItem(o)},removeShortcutsByKeys:h,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[o,s]=t;const r=s.filter((t=>t.group!==e));0===r.length?h((0,n.getKeysList)(o)):(s.length=0,s.push(...r))}))}}}},(e,t)=>{"use strict";t.__esModule=!0;const o=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return o.has(t)?o.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new RegExp("^(?:Key|Digit)([A-Z0-9])$");t.normalizeEventKey=e=>{let{key:t,code:o}=e;return(s.test(o)?o.replace(s,"$1"):t).toLowerCase()}},(e,t,o)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,o,s,c){const d=e=>a.includes(e),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return e.altKey&&o.push("alt"),t&&(e.ctrlKey||e.metaKey)?o.push("control/meta"):(e.ctrlKey&&o.push("control"),e.metaKey&&o.push("meta")),e.shiftKey&&o.push("shift"),o},g=e=>{if(!1===t(e))return;const i=o(e);if(229===e.keyCode||!1===i||(0,r.isImmediatePropagationStopped)(e))return;const a=(0,n.normalizeEventKey)(e);let g=[];d(a)?h.press(a):g=u(e);const f=[a].concat(g);!c(e,f)&&((0,l.isMacOS)()&&g.includes("meta")||!(0,l.isMacOS)()&&g.includes("control"))&&c(e,[a].concat(u(e,!0))),s(e)},f=e=>{if(!1===t(e))return;const o=(0,n.normalizeEventKey)(e);!1!==d(o)&&h.release(o)},p=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(;t;)t.document.documentElement.addEventListener("keydown",g),t.document.documentElement.addEventListener("keyup",f),t.document.documentElement.addEventListener("blur",p),t=(0,i.getParentWindow)(t)},unmount:()=>{let t=e;for(;t;)t.document.documentElement.removeEventListener("keydown",g),t.document.documentElement.removeEventListener("keyup",f),t.document.documentElement.removeEventListener("blur",p),t=(0,i.getParentWindow)(t)},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},o(8);var s=o(330),n=o(328),r=o(121),i=o(107),l=o(115);const a=["meta","alt","shift","control"],h=(0,s.createKeysObserver)()},(e,t)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(332);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(333),n=o(341);const r="text";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.TextEditor,renderer:n.textRenderer};t.TextCellType=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(334);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(335),r=s(o(126)),i=o(115),l=o(107),a=o(130),h=o(120),c=o(338),d=o(110),u=o(119),g=o(336),f=o(340);const p="ht_editor_hidden",m="textEditor",C="text";t.EDITOR_TYPE=C;class w extends n.BaseEditor{static get EDITOR_TYPE(){return C}constructor(e){super(e),this.eventManager=new r.default(this),this.autoResize=(0,c.autoResize)(),this.TEXTAREA=void 0,this.textareaStyle=void 0,this.TEXTAREA_PARENT=void 0,this.textareaParentStyle=void 0,this.layerClass=void 0,this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement();this.hot.getShortcutManager().setActiveContextName("editor"),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),this.registerShortcuts()}close(){this.autoResize.unObserve(),this.hot.rootDocument.activeElement===this.TEXTAREA&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,o,s,r,l){const a=this.state;if(super.prepare(e,t,o,s,r,l),!l.readOnly){this.refreshDimensions(!0);const{allowInvalid:e,fragmentSelection:t}=l;e&&(this.TEXTAREA.value=""),a!==n.EDITOR_STATE.FINISHED&&this.hideEditableElement();!t&&!(0,i.isMobileBrowser)()&&this.focus()}}beginEditing(e,t){this.state===n.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.tabIndex=-1,(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,i.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,p)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,a.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,l.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,p)&&(0,l.removeClass)(this.TEXTAREA_PARENT,p),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==n.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:r,height:i,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const h=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const c=(0,l.getComputedStyle)(this.TEXTAREA),d=parseInt(c.paddingLeft,10)+parseInt(c.paddingRight,10),u=parseInt(c.paddingTop,10)+parseInt(c.paddingBottom,10),g=s-d,f=i-u,p=r-d,m=a-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){this.eventManager.addEventListener(this.TEXTAREA,"cut",(e=>e.stopPropagation())),this.eventManager.addEventListener(this.TEXTAREA,"paste",(e=>e.stopPropagation())),(0,i.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,d.isDefined)(this.hot.getSelected()),group:m},o=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(o.row,o.col,!0)}},{keys:[["Shift","Tab"]],callback:e=>{const t=this.hot.getSettings(),o="function"==typeof t.tabMoves?t.tabMoves(e):t.tabMoves;this.hot.selection.transformStart(-o.row,-o.col)}},{keys:[["Control","Enter"]],callback:()=>(o(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(o(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(o(),!1)},{keys:[["PageUp"]],callback:()=>{this.hot.selection.transformStart(-this.hot.countVisibleRows(),0)}},{keys:[["PageDown"]],callback:()=>{this.hot.selection.transformStart(this.hot.countVisibleRows(),0)}},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["Control/Meta","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}},{keys:[["Control/Meta","Shift","Z"]],preventDefault:!1,callback:()=>{this.hot._registerTimeout((()=>{this.autoResize.resize()}),10)}}],t)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(u.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(m),e.removeShortcutsByGroup(g.SHORTCUTS_GROUP_EDITOR)}onAfterDocumentKeyDown(e){-1===[h.KEY_CODES.ARROW_UP,h.KEY_CODES.ARROW_RIGHT,h.KEY_CODES.ARROW_DOWN,h.KEY_CODES.ARROW_LEFT].indexOf(e.keyCode)&&this.autoResize.resize(String.fromCharCode(e.keyCode))}}t.TextEditor=w},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(336);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(110),r=o(116),i=o(119),l=s(o(337)),a=o(107);const h="base";t.EDITOR_TYPE=h;const c=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});t.EDITOR_STATE=c;const d="baseEditor";t.SHORTCUTS_GROUP_EDITOR=d;class u{static get EDITOR_TYPE(){return h}constructor(e){this.hot=e,this.instance=e,this.state=c.VIRGIN,this._opened=!1,this._fullEditMode=!1,this._closeCallback=null,this.TD=null,this.row=null,this.col=null,this.prop=null,this.originalValue=null,this.cellProperties=null,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,n,r){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=n,this.cellProperties=r,this.state=c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,r,i;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),r=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[o,s,r,i]=[this.row,this.col,null,null];const l=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(l)&&([o,s]=l);const a=this.hot.getShortcutManager().getContext("editor"),h={runOnlyIf:()=>(0,n.isDefined)(this.hot.getSelected()),group:d};this.isInFullEditMode()&&a.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],h),this.hot.populateFromArray(o,s,e,r,i,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),r=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,r)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,n.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(this.isWaiting())return;const n=this.hot.getShortcutManager().getContext("editor");if(n.removeShortcutsByGroup(d),n.removeShortcutsByGroup(i.SHORTCUTS_GROUP_NAVIGATION),this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=c.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,n=this.hot.rootWindow,r=(0,a.offset)(t),i=(0,a.outerWidth)(t),l=(0,a.offset)(this.hot.rootElement),h=(0,a.outerWidth)(this.hot.rootElement),c=o.topOverlay.holder,d=o.inlineStartOverlay.holder,u=c!==n?c.scrollTop:0,g=d!==n?d.scrollLeft:0,f=n.innerWidth-l.left-h,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,C=["master","inline_start"].includes(m)?u:0,w=["master","top","bottom"].includes(m)?g:0,y=r.top===l.top?0:1;let v=r.top-l.top-y-C,S=0;S=this.hot.isRtl()?n.innerWidth-r.left-i-f-1+w:r.left-l.left-1-w,["top","top_inline_start_corner"].includes(m)&&(v+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(S+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const E=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),T=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(E&&R<=0||R===T)&&(v+=1),b<=0&&(S+=1);const _=s.rowsRenderCalculator.startPosition,M=s.columnsRenderCalculator.startPosition,O=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,a.getScrollbarWidth)(this.hot.rootDocument),A=t.offsetTop+_-I;let P=0;if(this.hot.isRtl()){const e=t.offsetLeft;P=e>=0?p.getWidth()-t.offsetLeft:Math.abs(e),P+=M-O-i}else P=t.offsetLeft+M-O;const x=(0,a.getComputedStyle)(this.TD,this.hot.rootWindow),H=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(x[H],10)>0?0:1,L=parseInt(x.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+D,F=(0,a.outerHeight)(t)+L,V=(0,a.hasVerticalScrollbar)(c)?N:0,W=(0,a.hasHorizontalScrollbar)(d)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-V+D;return{top:v,start:S,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-W+L,23),width:k,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=u,(0,r.mixin)(u,l.default)},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(113),n=o(116);const r={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){(0,s.arrayEach)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,n.objectEach)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,n.defineGetter)(r,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});var i=r;t.default=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(339);t.autoResize=s.autoResize},(e,t)=>{"use strict";t.__esModule=!0,t.autoResize=function(){var e,t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},o=document.body,s=document.createTextNode(""),n=document.createElement("SPAN"),r=function(e,t,o){e.addEventListener(t,o,!1)},i=function(e,t,o){e.removeEventListener(t,o,!1)},l=function(r){var i,l;r?/^[a-zA-Z \.,\\\/\|0-9]$/.test(r)||(r="."):r="",void 0!==s.textContent?s.textContent=e.value+r:s.data=e.value+r,n.style.position="absolute",n.style.fontSize=c(e).fontSize,n.style.fontFamily=c(e).fontFamily,n.style.whiteSpace="pre",o.appendChild(n),i=n.clientWidth+2,o.removeChild(n),e.style.height=t.minHeight+"px",t.minWidth>i?e.style.width=t.minWidth+"px":i>t.maxWidth?e.style.width=t.maxWidth+"px":e.style.width=i+"px",l=e.scrollHeight?e.scrollHeight-1:0,t.minHeight>l?e.style.height=t.minHeight+"px":t.maxHeight<l?(e.style.height=t.maxHeight+"px",e.style.overflowY="visible"):e.style.height=l+"px"},a=function(){window.setTimeout(l,0)},h=function(o,i,h){e=o,function(o){if(o&&o.minHeight)if("inherit"==o.minHeight)t.minHeight=e.clientHeight;else{var r=parseInt(o.minHeight);isNaN(r)||(t.minHeight=r)}if(o&&o.maxHeight)if("inherit"==o.maxHeight)t.maxHeight=e.clientHeight;else{var i=parseInt(o.maxHeight);isNaN(i)||(t.maxHeight=i)}if(o&&o.minWidth)if("inherit"==o.minWidth)t.minWidth=e.clientWidth;else{var l=parseInt(o.minWidth);isNaN(l)||(t.minWidth=l)}if(o&&o.maxWidth)if("inherit"==o.maxWidth)t.maxWidth=e.clientWidth;else{var a=parseInt(o.maxWidth);isNaN(a)||(t.maxWidth=a)}n.firstChild||(n.className="autoResize",n.style.display="inline-block",n.appendChild(s))}(i),"TEXTAREA"==e.nodeName&&(e.style.resize="none",e.style.overflowY="",e.style.height=t.minHeight+"px",e.style.minWidth=t.minWidth+"px",e.style.maxWidth=t.maxWidth+"px",e.style.overflowY="hidden"),h&&(r(e,"change",l),r(e,"cut",a),r(e,"paste",a),r(e,"drop",a),r(e,"keydown",a),r(e,"focus",l),r(e,"compositionstart",a),r(e,"compositionupdate",a),r(e,"compositionend",a)),l()};function c(e){return e.currentStyle||document.defaultView.getComputedStyle(e)}return{init:function(e,t,o){h(e,t,o)},unObserve:function(){i(e,"change",l),i(e,"cut",a),i(e,"paste",a),i(e,"drop",a),i(e,"keydown",a),i(e,"focus",l),i(e,"compositionstart",a),i(e,"compositionupdate",a),i(e,"compositionend",a)},resize:l}}},(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),n=t.value.split("\n");let r=o,i=0;for(let t=0;t<n.length;t++){const s=n[t];0!==t&&(i+=n[t-1].length+1);const l=i+s.length;if("home"===e?r=i:"end"===e&&(r=l),o<=l)break}(0,s.setCaretPosition)(t,r)};var s=o(107)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(342);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=l;var s=o(343),n=o(107),r=o(110);const i="text";function l(e,t,o,i,l,a,h){s.baseRenderer.apply(this,[e,t,o,i,l,a,h]);let c=a;if(!c&&h.placeholder&&(c=h.placeholder),c=(0,r.stringify)(c),h.trimWhitespace&&(c=c.trim()),h.rendererTemplate){(0,n.empty)(t);const s=e.rootDocument.createElement("TEMPLATE");s.setAttribute("bind","{{}}"),s.innerHTML=h.rendererTemplate,HTMLTemplateElement.decorate(s),s.model=e.getSourceDataAtRow(o),t.appendChild(s)}else(0,n.fastInnerText)(t,c)}t.RENDERER_TYPE=i,l.RENDERER_TYPE=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(344);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=r,o(8);var s=o(107);const n="base";function r(e,t,o,n,r,i,l){const a=[],h=[];l.className&&(0,s.addClass)(t,l.className),l.readOnly&&a.push(l.readOnlyCellClassName),!1===l.valid&&l.invalidCellClassName?a.push(l.invalidCellClassName):h.push(l.invalidCellClassName),!1===l.wordWrap&&l.noWordWrapClassName&&a.push(l.noWordWrapClassName),!i&&l.placeholder&&a.push(l.placeholderCellClassName),(0,s.removeClass)(t,h),(0,s.addClass)(t,a)}t.RENDERER_TYPE=n,r.RENDERER_TYPE=n},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,s.registerAllEditors)(),(0,n.registerAllRenderers)(),(0,r.registerAllValidators)(),(0,i.registerAllCellTypes)(),(0,l.registerAllPlugins)()};var s=o(346);t.registerAllEditors=s.registerAllEditors;var n=o(367);t.registerAllRenderers=n.registerAllRenderers;var r=o(383);t.registerAllValidators=r.registerAllValidators;var i=o(393);t.registerAllCellTypes=i.registerAllCellTypes;var l=o(410);t.registerAllPlugins=l.registerAllPlugins},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(n.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(r.CheckboxEditor),(0,f.registerEditor)(i.DateEditor),(0,f.registerEditor)(l.DropdownEditor),(0,f.registerEditor)(a.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(c.PasswordEditor),(0,f.registerEditor)(d.SelectEditor),(0,f.registerEditor)(u.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(347);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(335);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var r=o(351);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var i=o(353);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var l=o(357);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(349);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(359);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var c=o(361);t.PasswordEditor=c.PasswordEditor,t.PASSWORD_EDITOR=c.EDITOR_TYPE;var d=o(363);t.SelectEditor=d.SelectEditor,t.SELECT_EDITOR=d.EDITOR_TYPE;var u=o(333);t.TextEditor=u.TextEditor,t.TEXT_EDITOR=u.EDITOR_TYPE;var g=o(365);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(122);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(348);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=o(349),i=o(113),l=o(107),a=o(110),h=o(108),c=o(120),d=o(341);const u=new WeakMap,g="autocomplete";t.EDITOR_TYPE=g;class f extends r.HandsontableEditor{static get EDITOR_TYPE(){return g}constructor(e){super(e),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],r=e.length;let i,l,c,d,u=t.length;if(0===r){for(c=0;c<u;c++)n.push(c);return n}for(c=0;c<u;c++){if(l=(0,h.stripTags)((0,a.stringify)(t[c])),o)d=l.indexOf(e);else{const t=this.cellProperties.locale;d=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==d&&(i=l.length-d-r,s.push({baseIndex:c,index:d,charsLeft:i,value:l}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),c=0,u=s.length;c<u;c++)n.push(s[c].baseIndex);return n})),this.query=null,this.strippedChoices=[],this.rawChoices=[],u.set(this,{skipOne:!1,isMacOS:this.hot.rootWindow.navigator.platform.indexOf("Mac")>-1})}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,a.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll")}open(){const e=u.get(this);super.open();const t=this.htEditor.getInstance(),o=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown;this.showEditableElement(),this.focus();let s=(0,l.getScrollbarWidth)();0===s&&e.isMacOS&&(s+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),t.updateSettings({colWidths:o?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:o?(0,l.outerWidth)(this.TEXTAREA)+s:void 0,renderer:(e,t,o,s,n,r,i)=>{(0,d.textRenderer)(e,t,o,s,n,r,i);const{filteringCaseSensitive:l,allowHtml:h,locale:c}=this.cellProperties,u=this.query;let g,f,p=(0,a.stringify)(r);p&&!h&&(g=!0===l?p.indexOf(u):p.toLocaleLowerCase(c).indexOf(u.toLocaleLowerCase(c)),-1!==g&&(f=p.substr(g,u.length),p=p.replace(f,`<strong>${f}</strong>`))),t.innerHTML=p},autoColumnSize:!0}),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close()}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,n=this.cellProperties.filter;let r=null,a=null,h=e;s&&(r=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const c=Array.isArray(r)?r.length:0;if(!1===n)c&&(a=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&c<=t);t++)c?e.push(h[r[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,i.pivot)([h])),this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),n=(0,l.outerHeight)(this.TEXTAREA),r=this.getDropdownHeight(),i=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),c=s.top-h.top-a+i,d=e.scrollHeight-c-a-n,u=r>d&&c>d;return u?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(u?c:d,r),u}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,n=0,r=null;do{n=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=n,s+=1}while(o<e);r=o-n,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(o-n)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getInstance().getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,i.arrayMap)(e,(e=>(0,a.stringify)(e)));return(0,i.arrayMap)(o,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===c.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===c.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){const t=u.get(this);if(t.skipOne=!1,(0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let o=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(o+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value),t.skipOne=!0}),o)}}}t.AutocompleteEditor=f},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(350);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(333),n=o(107),r=o(121),i=o(116),l=o(119);const a="handsontableEditor",h="handsontable";t.EDITOR_TYPE=h;class c extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,n.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r);const l=this,a={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&l.setValue(o),l.instance.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,i.extend)(a,r.handsontable),this.htOptions=a}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getInstance().getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:a,relativeToGroup:l.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor.getInstance();if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,r.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(n=t.getSelectedLast()[0],s=Math.max(0,n-1)):(n=t.getSelectedLast()[0],s=n-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor.getInstance();let s,n;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;n=t.getSelectedLast()[0],s=Math.min(e,n+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.HandsontableEditor=c},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(352);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(335),n=o(107);const r="checkbox";t.EDITOR_TYPE=r;class i extends s.BaseEditor{static get EDITOR_TYPE(){return r}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,n.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(354);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=s(o(111)),r=s(o(355)),i=o(333),l=s(o(126)),a=o(107),h=o(116),c=o(120);o(356);const d="date";t.EDITOR_TYPE=d;const u="dateEditor";class g extends i.TextEditor{static get EDITOR_TYPE(){return d}constructor(e){super(e),this.defaultDateFormat="DD/MM/YYYY",this.isCellEdited=!1,this.parentDestroyed=!1,this.$datePicker=null}init(){if("function"!=typeof n.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof r.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.instance.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,a.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);new l.default(this).addEventListener(this.datePicker,"mousedown",(e=>e.stopPropagation()))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:u})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.instance._registerTimeout((()=>{this.instance._refreshBorders()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(u),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,s=this.instance.view.isMouseDown(),i=!!e&&(0,c.isFunctionKey)(e.keyCode);let l;this.datePicker.style.display="block",this.$datePicker=new r.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,a.outerHeight)(this.TD)}px`;let h=this.hot.rootWindow.pageXOffset;h=this.hot.isRtl()?t.right-(0,a.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${h}px`,this.originalValue?(l=this.originalValue,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||s||this.setValue("")):this.cellProperties.defaultDate?(l=this.cellProperties.defaultDate,(0,n.default)(l,o,!0).isValid()&&this.$datePicker.setMoment((0,n.default)(l,o),!0),i||s||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,h.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,n.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),this.hideDatepicker(),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=g},e=>{"use strict";e.exports=t},()=>{},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(358);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(347),r=s(o(123));const i="dropdown";t.EDITOR_TYPE=i;class l extends n.AutocompleteEditor{static get EDITOR_TYPE(){return i}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=l,r.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.getCellMeta(t,this.propToCol(o));s.editor===l&&void 0===s.strict&&(s.filter=!1,s.strict=!0)}))},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(360);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(333);const n="numeric";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(362);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(333),n=o(107);const r="password";t.EDITOR_TYPE=r;class i extends s.TextEditor{static get EDITOR_TYPE(){return r}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,(0,n.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(364);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(335),n=o(107),r=o(116);const i="ht_editor_visible",l="selectEditor",a="select";t.EDITOR_TYPE=a;class h extends s.BaseEditor{static get EDITOR_TYPE(){return a}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,n.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,n.hasClass)(this.select,i)&&(0,n.removeClass)(this.select,i),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,i,l){super.prepare(e,t,o,s,i,l);const a=this.cellProperties.selectOptions;let h;h="function"==typeof a?this.prepareOptions(a(this.row,this.col,this.prop)):this.prepareOptions(a),(0,n.empty)(this.select),(0,r.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,n.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:r}=this.getEditedCellRect(),l=this.select.style;l.height=`${r}px`,l.width=`${o}px`,l.top=`${e}px`,l[this.hot.isRtl()?"right":"left"]=`${t}px`,l.margin="0px",(0,n.addClass)(this.select,i)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:l};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.SelectEditor=h},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(366);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(333);const n="time";t.EDITOR_TYPE=n;class r extends s.TextEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,n,r){super.prepare(e,t,o,s,n,r),this.TEXTAREA.dir="ltr"}}t.TimeEditor=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,d.registerRenderer)(s.autocompleteRenderer),(0,d.registerRenderer)(n.baseRenderer),(0,d.registerRenderer)(r.checkboxRenderer),(0,d.registerRenderer)(i.htmlRenderer),(0,d.registerRenderer)(l.numericRenderer),(0,d.registerRenderer)(a.passwordRenderer),(0,d.registerRenderer)(h.textRenderer),(0,d.registerRenderer)(c.timeRenderer)};var s=o(368);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var n=o(343);t.baseRenderer=n.baseRenderer,t.BASE_RENDERER=n.RENDERER_TYPE;var r=o(373);t.checkboxRenderer=r.checkboxRenderer,t.CHECKBOX_RENDERER=r.RENDERER_TYPE;var i=o(370);t.htmlRenderer=i.htmlRenderer,t.HTML_RENDERER=i.RENDERER_TYPE;var l=o(376);t.numericRenderer=l.numericRenderer,t.NUMERIC_RENDERER=l.RENDERER_TYPE;var a=o(379);t.passwordRenderer=a.passwordRenderer,t.PASSWORD_RENDERER=a.RENDERER_TYPE;var h=o(341);t.textRenderer=h.textRenderer,t.TEXT_RENDERER=h.RENDERER_TYPE;var c=o(381);t.timeRenderer=c.timeRenderer,t.TIME_RENDERER=c.RENDERER_TYPE;var d=o(133);t.registerRenderer=d.registerRenderer,t.getRegisteredRendererNames=d.getRegisteredRendererNames,t.getRegisteredRenderers=d.getRegisteredRenderers,t.getRenderer=d.getRenderer,t.hasRenderer=d.hasRenderer},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(369);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.autocompleteRenderer=h;var n=o(370),r=o(341),i=s(o(126)),l=o(107);o(372);const a="autocomplete";function h(e,t,o,s,a,h,c){const{rootDocument:d}=e,u=c.allowHtml?n.htmlRenderer:r.textRenderer,g=d.createElement("DIV");if(g.className="htAutocompleteArrow",g.appendChild(d.createTextNode(String.fromCharCode(9660))),u.apply(this,[e,t,o,s,a,h,c]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(g,t.firstChild),(0,l.addClass)(t,"htAutocomplete"),!e.acArrowListener){const n=new i.default(e);e.acArrowListener=function(n){(0,l.hasClass)(n.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(o,s),t)},n.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{n.destroy()}))}}t.RENDERER_TYPE=a,h.RENDERER_TYPE=a},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(371);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=i;var s=o(343),n=o(107);const r="html";function i(e,t,o,r,i,l,a){s.baseRenderer.apply(this,[e,t,o,r,i,l,a]),(0,n.fastInnerHTML)(t,null==l?"":l,!1)}t.RENDERER_TYPE=r,i.RENDERER_TYPE=r},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(374);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.checkboxRenderer=C,o(8);var n=o(343),r=s(o(126)),i=o(107),l=o(110),a=o(278);o(375);var h=s(o(123));const c=new WeakMap,d=new WeakMap,u="htBadValue",g="data-row",f="data-col",p="checkboxRenderer",m="checkbox";function C(e,t,o,s,h,m,C){const{rootDocument:y}=e;n.baseRenderer.apply(this,[e,t,o,s,h,m,C]),function(e){let t=d.get(e);if(!t){const{rootElement:o}=e;t=new r.default(e),t.addEventListener(o,"click",(t=>function(e,t){const{target:o}=e;if(!w(o))return;if(!o.hasAttribute(g)||!o.hasAttribute(f))return;const s=parseInt(o.getAttribute(g),10),n=parseInt(o.getAttribute(f),10),r=t.getCellMeta(s,n);r.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(o,"mouseup",(t=>function(e,t){const{target:o}=e;if(!w(o))return;if(!o.hasAttribute(g)||!o.hasAttribute(f))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!w(o))return;if(!o.hasAttribute(g)||!o.hasAttribute(f))return;const s=parseInt(o.getAttribute(g),10),n=parseInt(o.getAttribute(f),10),r=t.getCellMeta(s,n);if(!r.readOnly){let o=null;o=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(s,n,o)}}(t,e))),d.set(e,t)}}(e);let v=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("autocomplete","off"),t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(y);const S=C.label;let E=!1;if(void 0===C.checkedTemplate&&(C.checkedTemplate=!0),void 0===C.uncheckedTemplate&&(C.uncheckedTemplate=!1),(0,i.empty)(t),m===C.checkedTemplate||(0,l.stringify)(m).toLocaleLowerCase(C.locale)===(0,l.stringify)(C.checkedTemplate).toLocaleLowerCase(C.locale)?v.checked=!0:m===C.uncheckedTemplate||(0,l.stringify)(m).toLocaleLowerCase(C.locale)===(0,l.stringify)(C.uncheckedTemplate).toLocaleLowerCase(C.locale)?v.checked=!1:(0,l.isEmpty)(m)?(0,i.addClass)(v,"noValue"):(v.style.display="none",(0,i.addClass)(v,u),E=!0),v.setAttribute(g,o),v.setAttribute(f,s),!E&&S){let n="";if(S.value)n="function"==typeof S.value?S.value.call(this,o,s,h,m):S.value;else if(S.property){const t=e.getDataAtRowProp(o,S.property);n=null!==t?t:""}const r=function(e,t,o){const s=e.createElement("label");return s.className="htCheckboxRendererLabel "+(o?"fullWidth":""),s.appendChild(e.createTextNode(t)),s.cloneNode(!0)}(y,n,!0!==S.separated);"before"===S.position?S.separated?(t.appendChild(r),t.appendChild(v)):(r.appendChild(v),v=r):S.position&&"after"!==S.position||(S.separated?(t.appendChild(v),t.appendChild(r)):(r.insertBefore(v,r.firstChild),v=r))}function R(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const o=e.getSelectedRange();if(o)for(let s=0;s<o.length;s++){const{row:n,col:r}=o[s].getTopStartCorner(),{row:i,col:l}=o[s].getBottomEndCorner(),a=[];for(let o=n;o<=i;o+=1)for(let s=r;s<=l;s+=1){const n=e.getCellMeta(o,s);if("checkbox"!==n.type)return;if(!0===n.readOnly)continue;void 0===n.checkedTemplate&&(n.checkedTemplate=!0),void 0===n.uncheckedTemplate&&(n.uncheckedTemplate=!1);const r=e.getDataAtCell(o,s);!1===t?[n.checkedTemplate,n.checkedTemplate.toString()].includes(r)?a.push([o,s,n.uncheckedTemplate]):[n.uncheckedTemplate,n.uncheckedTemplate.toString(),null,void 0].includes(r)&&a.push([o,s,n.checkedTemplate]):a.push([o,s,n.uncheckedTemplate])}a.length>0&&e.setDataAtCell(a)}}function b(){const t=e.getSelectedRange();if(t){for(let o=0;o<t.length;o++){const s=t[o].getTopStartCorner(),n=t[o].getBottomEndCorner();for(let t=s.row;t<=n.row;t++)for(let o=s.col;o<=n.col;o++){const s=e.getCellMeta(t,o);if("checkbox"!==s.type)return!1;const n=e.getCell(t,o);if(null==n)return!0;if(n.querySelectorAll("input[type=checkbox]").length>0&&!s.readOnly)return!0}}return!1}}(!S||S&&!S.separated)&&t.appendChild(v),E&&t.appendChild(y.createTextNode("#bad-value#")),c.has(e)||(c.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:p};t.addShortcuts([{keys:[["space"]],callback:()=>(R(),!b())},{keys:[["enter"]],callback:()=>(R(),!b()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(R(!0),!b()),relativeToGroup:a.EDITOR_EDIT_GROUP,position:"before"}],o)}())}function w(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}t.RENDERER_TYPE=m,h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:n,row:r,column:i,prop:l}=t;if(n===m){if(s){const{value:t,property:n}=s;let a=o;if(t)a="function"==typeof t?t(r,i,l,o):t;else if(n){const e=this.getDataAtRowProp(r,n);a=null!==e?e:o}e=a}return e}})),C.RENDERER_TYPE=m},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(377);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.numericRenderer=a,o(8);var n=s(o(378)),r=o(341),i=o(130);const l="numeric";function a(e,t,o,s,l,a,h){let c=a;if((0,i.isNumeric)(c)){const e=h.numericFormat,o=e&&e.culture||"-",s=e&&e.pattern,r=h.className||"",i=r.length?r.split(" "):[];if(void 0!==o&&!n.default.languages()[o]){const e=o.replace("-",""),t=n.default.allLanguages?n.default.allLanguages[o]:n.default[e];t&&n.default.registerLanguage(t)}n.default.setLanguage(o),c=(0,n.default)(c).format(s||"0"),i.indexOf("htLeft")<0&&i.indexOf("htCenter")<0&&i.indexOf("htRight")<0&&i.indexOf("htJustify")<0&&i.push("htRight"),i.indexOf("htNumeric")<0&&i.push("htNumeric"),h.className=i.join(" "),t.dir="ltr"}(0,r.textRenderer)(e,t,o,s,l,c,h)}t.RENDERER_TYPE=l,a.RENDERER_TYPE=l},e=>{"use strict";e.exports=s},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(380);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=l;var s=o(341),n=o(107),r=o(130);const i="password";function l(e,t,o,i,l,a,h){s.textRenderer.apply(this,[e,t,o,i,l,a,h]);const c=h.hashLength||t.innerHTML.length,d=h.hashSymbol||"*";let u="";(0,r.rangeEach)(c-1,(()=>{u+=d})),(0,n.fastInnerHTML)(t,u)}t.RENDERER_TYPE=i,l.RENDERER_TYPE=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(382);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=r;var s=o(341);const n="time";function r(e,t,o,n,r,i,l){s.textRenderer.apply(this,[e,t,o,n,r,i,l]),t.dir="ltr"}t.RENDERER_TYPE=n,r.RENDERER_TYPE=n},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,l.registerValidator)(s.autocompleteValidator),(0,l.registerValidator)(n.dateValidator),(0,l.registerValidator)(r.numericValidator),(0,l.registerValidator)(i.timeValidator)};var s=o(384);t.autocompleteValidator=s.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=s.VALIDATOR_TYPE;var n=o(386);t.dateValidator=n.dateValidator,t.DATE_VALIDATOR=n.VALIDATOR_TYPE;var r=o(389);t.numericValidator=r.numericValidator,t.NUMERIC_VALIDATOR=r.VALIDATOR_TYPE;var i=o(391);t.timeValidator=i.timeValidator,t.TIME_VALIDATOR=i.VALIDATOR_TYPE;var l=o(134);t.registerValidator=l.registerValidator,t.getRegisteredValidatorNames=l.getRegisteredValidatorNames,t.getRegisteredValidators=l.getRegisteredValidators,t.getValidator=l.getValidator,t.hasValidator=l.hasValidator},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(385);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.autocompleteValidator=s.autocompleteValidator},(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=s;const o="autocomplete";function s(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,n(o,t)):n(o,t)(this.source):t(!0)}function n(e,t){const o=e;return function(e){let s=!1;for(let t=0,n=e.length;t<n;t++)if(o===e[t]){s=!0;break}t(s)}}t.VALIDATOR_TYPE=o,s.VALIDATOR_TYPE=o},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(387);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.correctFormat=s.correctFormat,t.dateValidator=s.dateValidator},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.correctFormat=c,t.dateValidator=h;var n=s(o(111)),r=o(122),i=o(353),l=o(388);const a="date";function h(e,t){const o=(0,r.getEditorInstance)(i.EDITOR_TYPE,this.instance);let s=e,l=!0;null==s&&(s="");let a=(0,n.default)(s,this.dateFormat||o.defaultDateFormat,!0).isValid(),h=(0,n.default)(new Date(s)).isValid()||a;if(this.allowEmpty&&""===s&&(h=!0,a=!0),h||(l=!1),!h&&a&&(l=!0),h&&!a)if(!0===this.correctFormat){const e=c(s,this.dateFormat),t=this.instance.toVisualRow(this.row),o=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,o,e,"dateValidator"),l=!0}else l=!1;t(l)}function c(e,t){const o=(0,n.default)((0,l.getNormalizedDate)(e)),s=(0,n.default)(e,t),r=e.search(/[A-z]/g)>-1;let i;return i=o.isValid()&&o.format("x")===s.format("x")||!s.isValid()||r?o:s,i.format(t)}t.VALIDATOR_TYPE=a,h.VALIDATOR_TYPE=a},(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(390);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.numericValidator=s.numericValidator},(e,t,o)=>{"use strict";t.__esModule=!0,t.numericValidator=r;var s=o(130);const n="numeric";function r(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):t(""!==o&&(0,s.isNumeric)(e))}t.VALIDATOR_TYPE=n,r.VALIDATOR_TYPE=n},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(392);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.timeValidator=s.timeValidator},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.timeValidator=l;var n=s(o(111));const r=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],i="time";function l(e,t){const o=this.timeFormat||"h:mm:ss a";let s=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const l=/^\d{1,2}$/.test(i);l&&(i+=":00");const a=(0,n.default)(i,r,!0).isValid()?(0,n.default)(i):(0,n.default)(i,o);let h=a.isValid(),c=(0,n.default)(i,o,!0).isValid()&&!l;if(this.allowEmpty&&""===i&&(h=!0,c=!0),h||(s=!1),!h&&c&&(s=!0),h&&!c)if(!0===this.correctFormat){const e=a.format(o),t=this.instance.toVisualRow(this.row),n=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,n,e,"timeValidator"),s=!0}else s=!1;t(s)}t.VALIDATOR_TYPE=i,l.VALIDATOR_TYPE=i},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,u.registerCellType)(s.AutocompleteCellType),(0,u.registerCellType)(n.CheckboxCellType),(0,u.registerCellType)(r.DateCellType),(0,u.registerCellType)(i.DropdownCellType),(0,u.registerCellType)(l.HandsontableCellType),(0,u.registerCellType)(a.NumericCellType),(0,u.registerCellType)(h.PasswordCellType),(0,u.registerCellType)(c.TextCellType),(0,u.registerCellType)(d.TimeCellType)};var s=o(394);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(396);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var r=o(398);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var i=o(400);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var l=o(402);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(404);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(406);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var c=o(331);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=o(408);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var u=o(267);t.registerCellType=u.registerCellType,t.getCellType=u.getCellType,t.getRegisteredCellTypeNames=u.getRegisteredCellTypeNames,t.getRegisteredCellTypes=u.getRegisteredCellTypes,t.hasCellType=u.hasCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(395);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(347),n=o(368),r=o(384);const i="autocomplete";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.AutocompleteCellType=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(397);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(351),n=o(373);const r="checkbox";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:n.checkboxRenderer};t.CheckboxCellType=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(399);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(353),n=o(368),r=o(386);const i="date";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DateEditor,renderer:n.autocompleteRenderer,validator:r.dateValidator};t.DateCellType=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(401);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(357),n=o(368),r=o(384);const i="dropdown";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.DropdownEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator};t.DropdownCellType=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(403);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(349),n=o(368);const r="handsontable";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:n.autocompleteRenderer};t.HandsontableCellType=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(405);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(359),n=o(376),r=o(389);const i="numeric";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.NumericEditor,renderer:n.numericRenderer,validator:r.numericValidator,dataType:"number"};t.NumericCellType=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(407);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(361),n=o(379);const r="password";t.CELL_TYPE=r;const i={CELL_TYPE:r,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1};t.PasswordCellType=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(409);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(365),n=o(381),r=o(391);const i="time";t.CELL_TYPE=i;const l={CELL_TYPE:i,editor:s.TimeEditor,renderer:n.timeRenderer,validator:r.timeValidator};t.TimeCellType=l},(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,k.registerPlugin)(s.AutoColumnSize),(0,k.registerPlugin)(n.Autofill),(0,k.registerPlugin)(r.AutoRowSize),(0,k.registerPlugin)(l.BindRowsWithHeaders),(0,k.registerPlugin)(a.CollapsibleColumns),(0,k.registerPlugin)(h.ColumnSorting),(0,k.registerPlugin)(c.ColumnSummary),(0,k.registerPlugin)(d.Comments),(0,k.registerPlugin)(u.ContextMenu),(0,k.registerPlugin)(g.CopyPaste),(0,k.registerPlugin)(f.CustomBorders),(0,k.registerPlugin)(p.DragToScroll),(0,k.registerPlugin)(m.DropdownMenu),(0,k.registerPlugin)(C.ExportFile),(0,k.registerPlugin)(w.Filters),(0,k.registerPlugin)(y.Formulas),(0,k.registerPlugin)(v.HiddenColumns),(0,k.registerPlugin)(S.HiddenRows),(0,k.registerPlugin)(E.ManualColumnFreeze),(0,k.registerPlugin)(R.ManualColumnMove),(0,k.registerPlugin)(b.ManualColumnResize),(0,k.registerPlugin)(T.ManualRowMove),(0,k.registerPlugin)(_.ManualRowResize),(0,k.registerPlugin)(M.MergeCells),(0,k.registerPlugin)(O.MultiColumnSorting),(0,k.registerPlugin)(I.MultipleSelectionHandles),(0,k.registerPlugin)(N.NestedHeaders),(0,k.registerPlugin)(A.NestedRows),(0,k.registerPlugin)(P.PersistentState),(0,k.registerPlugin)(x.Search),(0,k.registerPlugin)(H.TouchScroll),(0,k.registerPlugin)(D.TrimRows),(0,k.registerPlugin)(L.UndoRedo)};var s=o(411);t.AutoColumnSize=s.AutoColumnSize;var n=o(417);t.Autofill=n.Autofill;var r=o(420);t.AutoRowSize=r.AutoRowSize;var i=o(413);t.BasePlugin=i.BasePlugin;var l=o(422);t.BindRowsWithHeaders=l.BindRowsWithHeaders;var a=o(426);t.CollapsibleColumns=a.CollapsibleColumns;var h=o(428);t.ColumnSorting=h.ColumnSorting;var c=o(441);t.ColumnSummary=c.ColumnSummary;var d=o(445);t.Comments=d.Comments;var u=o(468);t.ContextMenu=u.ContextMenu;var g=o(477);t.CopyPaste=g.CopyPaste;var f=o(489);t.CustomBorders=f.CustomBorders;var p=o(498);t.DragToScroll=p.DragToScroll;var m=o(500);t.DropdownMenu=m.DropdownMenu;var C=o(503);t.ExportFile=C.ExportFile;var w=o(509);t.Filters=w.Filters;var y=o(556);t.Formulas=y.Formulas;var v=o(563);t.HiddenColumns=v.HiddenColumns;var S=o(568);t.HiddenRows=S.HiddenRows;var E=o(573);t.ManualColumnFreeze=E.ManualColumnFreeze;var R=o(578);t.ManualColumnMove=R.ManualColumnMove;var b=o(584);t.ManualColumnResize=b.ManualColumnResize;var T=o(586);t.ManualRowMove=T.ManualRowMove;var _=o(592);t.ManualRowResize=_.ManualRowResize;var M=o(594);t.MergeCells=M.MergeCells;var O=o(603);t.MultiColumnSorting=O.MultiColumnSorting;var I=o(609);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(611);t.NestedHeaders=N.NestedHeaders;var A=o(628);t.NestedRows=A.NestedRows;var P=o(637);t.PersistentState=P.PersistentState;var x=o(640);t.Search=x.Search;var H=o(642);t.TouchScroll=H.TouchScroll;var D=o(644);t.TrimRows=D.TrimRows;var L=o(646);t.UndoRedo=L.UndoRedo;var k=o(128);t.registerPlugin=k.registerPlugin,t.getPlugin=k.getPlugin,t.getPluginsNames=k.getPluginsNames},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(412);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoColumnSize=s.AutoColumnSize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(413),r=o(113),i=o(159),l=s(o(415)),a=s(o(123)),h=o(116),c=o(130),d=s(o(416)),u=o(108),g=o(145),f=o(219),p=o(110);a.default.getSingleton().register("modifyAutoColumnSizeSeed");const m="autoColumnSize";t.PLUGIN_KEY=m;t.PLUGIN_PRIORITY=10;const C=new WeakMap;class w extends n.BasePlugin{static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){super(e),C.set(this,{cachedColumnHeaders:[]}),this.ghostTable=new l.default(this.hot),this.samplesGenerator=new d.default(((e,t)=>{const o=this.hot.getCellMeta(e,t);let s="";o.spanned||(s=this.hot.getDataAtCell(e,t));let n="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(n=this.hot.runHooks("modifyAutoColumnSizeSeed",n,o,s)),{value:s,bundleSeed:n}})),this.firstCalculation=!0,this.inProgress=!1,this.measuredColumns=0,this.columnWidthsMap=new f.PhysicalIndexToValueMap,this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o)))}isEnabled(){return!1!==this.hot.getSettings()[m]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[m];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.addHook("beforeChangeRender",(e=>this.onBeforeChange(e))),this.addHook("afterFormulasValuesUpdate",(e=>this.onAfterFormulasValuesUpdate(e))),this.addHook("beforeViewRender",(e=>this.onBeforeViewRender(e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>this.onAfterInit())),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,o)=>this.onBeforeColumnResize(e,t,o)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),o=this.getLastVisibleColumn();-1!==t&&-1!==o&&this.calculateColumnsWidth({from:t,to:o},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,n="number"==typeof t?{from:t,to:t}:t;(0,c.rangeEach)(s.from,s.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),o||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,n);(0,r.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addColumn(t,o)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const o=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(o,t)}))}),!0),this.measuredColumns=s.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const o=this.hot.countCols()-1;let s=null;this.inProgress=!0;const n=()=>{if(!this.hot)return(0,i.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+w.CALCULATION_STEP,o)},e),t=t+w.CALCULATION_STEP+1,t<o?s=(0,i.requestAnimationFrame)(n):((0,i.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateColumnsWidth({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?n():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[m],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[m];let t=w.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,u.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof o&&(o=Math.max(o,g.ViewportColumnsCalculator.DEFAULT_WIDTH))),o}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader(),{cachedColumnHeaders:t}=C.get(this);return(0,r.arrayReduce)(e,((e,o,s)=>{const n=t.length;return(n-1<s||t[s]!==o)&&e.push(s),n-1<s?t.push(o):t[s]=o,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,r.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}onBeforeViewRender(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}onAfterLoadData(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}onBeforeChange(e){const t=(0,r.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}onBeforeColumnResize(e,t,o){let s=e;return o&&(this.calculateColumnsWidth(t,void 0,!0),s=this.getColumnWidth(t,void 0,!1)),s}onAfterInit(){C.get(this).cachedColumnHeaders=this.hot.getColHeader()}onAfterFormulasValuesUpdate(e){const t=(0,r.arrayFilter)(e,(e=>{var t;return(0,p.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),o=(0,r.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(o)))}destroy(){this.ghostTable.clean(),super.destroy()}}t.AutoColumnSize=w},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(414);t.PLUGIN_KEY=s.PLUGIN_KEY,t.BasePlugin=s.BasePlugin},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(116),n=o(113),r=o(128),i=o(267),l=o(122),a=o(133),h=o(134);function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const d=new Map([["plugin",r.hasPlugin],["cell-type",i.hasCellType],["editor",l.hasEditor],["renderer",a.hasRenderer],["validator",h.hasValidator]]),u="base";t.PLUGIN_KEY=u;const g=new WeakMap,f=[];let p=null;var m=new WeakSet;function C(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let o=0;o<t.length;o++)if(void 0!==e[t[o]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return u}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){c(this,m),(0,s.defineGetter)(this,"hot",e,{writable:!1}),g.set(this,{hooks:{}}),p=null,this.pluginName=null,this.pluginsInitializedCallbacks=[],this.isPluginsReady=!1,this.enabled=!1,this.initialized=!1,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[o,s]=t.split(":");if(!d.has(o))throw new Error(`Unknown plugin dependency type "${o}" was found.`);d.get(o)(s)||e.push(` - ${s} (${o})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");f.push(t)}}p||(p=(0,r.getPluginsNames)()),p.indexOf("UndoRedo")>=0&&p.splice(p.indexOf("UndoRedo"),1),p.indexOf(this.pluginName)>=0&&p.splice(p.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===p.length){if(f.length>0){const e=[`${f.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){this.eventManager&&this.eventManager.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){g.get(this).hooks[e]=g.get(this).hooks[e]||[];const o=g.get(this).hooks[e];this.hot.addHook(e,t),o.push(t),g.get(this).hooks[e]=o}removeHooks(e){(0,n.arrayEach)(g.get(this).hooks[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=g.get(this).hooks;(0,s.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,n.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,m,C).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){this.eventManager&&this.eventManager.destroy(),this.clearHooks(),(0,s.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(107),n=o(113);var r=class{constructor(e){this.hot=e,this.container=null,this.injected=!1,this.rows=[],this.columns=[],this.samples=null,this.settings={useHeaders:!0}}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.rows,(t=>{e(t.row,(0,s.outerHeight)(t.table)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.columns,(t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(){const e=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&e.appendChild(this.createColElement(-1)),this.samples.forEach((t=>{(0,n.arrayEach)(t.strings,(t=>{e.appendChild(this.createColElement(t.col))}))})),e}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,s),o.appendChild(s)),this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const n=s.col,r=this.hot.getCellMeta(e,n);r.col=n,r.row=e;const i=this.hot.getCellRenderer(r),l=t.createElement("td");l.setAttribute("ghost-table",1),i(this.hot,l,e,n,this.hot.colToProp(n),s.value,r),o.appendChild(l)}))})),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const s=e.createElement("th");o.push([-1,s]),t.appendChild(s)}this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const n=s.col,r=e.createElement("th");o.push([n,r]),t.appendChild(r)}))})),this.table.tHead.appendChild(t),(0,n.arrayEach)(o,(e=>{const[t,o]=e;this.hot.view.appendColHeader(t,o)}))}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const n=s.row,r=this.hot.getCellMeta(n,e);r.col=e,r.row=n;const i=this.hot.getCellRenderer(r),l=t.createElement("td"),a=t.createElement("tr");l.setAttribute("ghost-table",1),i(this.hot,l,n,e,this.hot.colToProp(e),s.value,r),a.appendChild(l),o.appendChild(a)}))})),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e){const t=this.hot.rootDocument.createElement("col");return t.style.width=`${this.hot.view._wt.wtTable.getStretchedColumnWidth(e)}px`,t}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),n=t.createElement("table"),r=t.createElement("thead"),i=t.createElement("tbody"),l=t.createElement("colgroup"),a=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&n.appendChild(l),this.isHorizontal()&&(a.appendChild(h),r.appendChild(a),n.style.tableLayout="auto",n.style.width="auto"),n.appendChild(r),this.isVertical()&&i.appendChild(a),n.appendChild(i),(0,s.addClass)(n,e),o.appendChild(n),{fragment:o,table:n,tHead:r,tBody:i,colGroup:l,tr:a,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),n=t.createElement("div"),r=`htGhostTable htAutoSize ${e.trim()}`;return(0,s.addClass)(n,r),o.appendChild(n),{fragment:o,container:n}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};t.default=r},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(116),n=o(130),r=o(110);class i{static get SAMPLE_COUNT(){return 3}constructor(e){this.samples=null,this.dataFactory=e,this.customSampleCount=null,this.allowDuplicates=!1}getSampleCount(){return this.customSampleCount?this.customSampleCount:i.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const s=new Map,{from:r,to:i}="number"==typeof o?{from:o,to:o}:o;return(0,n.rangeEach)(r,i,(o=>{const n=this.generateSample(e,t,o);s.set(o,n)})),s}generateSample(e,t,o){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const i=new Map,l="row"===e?"col":"row",a=[];return(0,n.rangeEach)(t.from,t.to,(t=>{const{value:n,bundleSeed:h}="row"===e?this.dataFactory(o,t):this.dataFactory(t,o),c="string"==typeof h&&h.length>0;let d;d=c?h:(0,s.isObject)(n)?`${Object.keys(n).length}`:Array.isArray(n)?`${n.length}`:`${(0,r.stringify)(n).length}`,i.has(d)||i.set(d,{needed:this.getSampleCount(),strings:[]});const u=i.get(d);if(u.needed){(!(a.indexOf(n)>-1)||this.allowDuplicates||c)&&(u.strings.push({value:n,[l]:t}),a.push(n),u.needed-=1)}})),i}}var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(418);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Autofill=s.Autofill},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(413),r=s(o(123)),i=o(107),l=o(113),a=s(o(126)),h=o(419);r.default.getSingleton().register("modifyAutofillRange"),r.default.getSingleton().register("beforeAutofill"),r.default.getSingleton().register("afterAutofill");const c="autofill";t.PLUGIN_KEY=c;t.PLUGIN_PRIORITY=20;const d=["fillHandle"];class u extends n.BasePlugin{static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[c,...d]}constructor(e){super(e),this.eventManager=new a.default(this),this.addingStarted=!1,this.mouseDownOnCellCorner=!1,this.mouseDragOutside=!1,this.handleDraggedCells=0,this.directions=[],this.autoInsertRow=!1}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>this.onAfterCellCornerMouseDown(e))),this.addHook("afterOnCellCornerDblClick",(e=>this.onCellCornerDblClick(e))),this.addHook("beforeOnCellMouseOver",((e,t)=>this.onBeforeCellMouseOver(t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:o}=e.getTopStartCorner(),{row:s,col:n}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:o,endRow:s,endCol:n}]),i=[],a=[],h=[];return(0,l.arrayEach)(r,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===i.indexOf(t)&&i.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(i,(e=>{const t=[];(0,l.arrayEach)(a,(o=>{t.push(this.hot.getCopyableData(e,o))})),h.push(t)})),h}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,o,s]=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.getSelectedRangeLast(),r=n.getTopStartCorner(),i=n.getBottomEndCorner();this.resetSelectionOfDraggedArea();const l=[r.row,r.col,i.row,i.col],a=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,e),Math.min(r.col,t),Math.max(i.row,o),Math.max(i.col,s)],l),{directionOfDrag:c,startOfDragCoords:d,endOfDragCoords:u}=(0,h.getDragDirectionAndRange)(l,a,((e,t)=>this.hot._createCellCoords(e,t)));if(d&&d.row>-1&&d.col>-1){const e=this.getSelectionData(),t=n.clone(),o=this.hot._createCellRange(d,d,u),s=this.hot.runHooks("beforeAutofill",e,t,o,c);if(!1===s)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=s;const i=s;if(["up","left"].indexOf(c)>-1&&(1!==i.length||0!==i[0].length))if(r=[],"up"===c){const e=u.row-d.row+1,t=e%i.length;for(let o=0;o<e;o++)r.push(i[(o+(i.length-t))%i.length])}else{const e=u.col-d.col+1,t=e%i[0].length;for(let o=0;o<i.length;o++){r.push([]);for(let s=0;s<e;s++)r[o].push(i[o][(s+(i[o].length-t))%i[o].length])}}this.hot.populateFromArray(d.row,d.col,r,u.row,u.col,`${this.pluginName}.fill`,null),this.setSelection(a),this.hot.runHooks("afterAutofill",r,t,o,c),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),o=t.getBottomEndCorner();let s=e;if(this.directions.includes(h.DIRECTIONS.vertical)&&this.directions.includes(h.DIRECTIONS.horizontal)){const n=t.getTopStartCorner();(o.col<=e.col||n.col>=e.col)&&(s=this.hot._createCellCoords(o.row,e.col)),(o.row<e.row||n.row>e.row)&&(s=this.hot._createCellCoords(e.row,o.col))}else if(this.directions.includes(h.DIRECTIONS.vertical))s=this.hot._createCellCoords(e.row,o.col);else{if(!this.directions.includes(h.DIRECTIONS.horizontal))return;s=this.hot._createCellCoords(o.row,e.col)}return this.reduceSelectionAreaIfNeeded(s)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();e[2]<o-1&&t[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),o=this.hot.countRows();let s;for(let n=e[2]+1;n<o;n++){for(let o=e[1];o<=e[3];o++){if(t[n][o])return-1}const o=t[n][e[1]-1],r=t[n][e[3]+1];(o||r)&&(s=n)}return s}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,o=(0,i.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,i.outerHeight)(this.hot.table),s=(0,i.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,i.outerWidth)(this.hot.table);return e.clientY>o&&e.clientX<=s}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(e,"mousemove",(e=>this.onMouseMove(e)))}onCellCornerDblClick(){this.selectAdjacent()&&this.fillIn()}onAfterCellCornerMouseDown(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}onBeforeCellMouseOver(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}onMouseUp(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}onMouseMove(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,h.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}t.Autofill=u},(e,t,o)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,o){let s,n,r;t[0]===e[0]&&t[1]<e[1]?(r="left",s=o(t[0],t[1]),n=o(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",s=o(t[0],e[3]+1),n=o(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(r="up",s=o(t[0],t[1]),n=o(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",s=o(e[2]+1,t[1]),n=o(t[2],t[3]));s&&s.normalize();n&&n.normalize();return{directionOfDrag:r,startOfDragCoords:s,endOfDragCoords:n}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(r),t.autoInsertRow=!0):(0,s.isObject)(e)?((0,n.isDefined)(e.autoInsertRow)?e.direction===r.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,n.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(r)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var s=o(116),n=o(110);const r={horizontal:"horizontal",vertical:"vertical"};t.DIRECTIONS=r},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(421);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoRowSize=s.AutoRowSize},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(413),r=o(113),i=o(159),l=o(107),a=s(o(415)),h=o(116),c=o(130),d=s(o(416)),u=o(108),g=o(219);const f="autoRowSize";t.PLUGIN_KEY=f;t.PLUGIN_PRIORITY=40;class p extends n.BasePlugin{static get PLUGIN_KEY(){return f}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),this.rowHeightsMap=void 0,this.headerHeight=null,this.ghostTable=new a.default(this.hot),this.samplesGenerator=new d.default(((e,t)=>{let o;return e>=0?o=this.hot.getDataAtCell(e,t):-1===e&&(o=this.hot.getColHeader(t)),{value:o}})),this.firstCalculation=!0,this.inProgress=!1,this.measuredRows=0,this.rowHeightsMap=new g.PhysicalIndexToValueMap,this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,o)=>this.onBeforeRowResize(e,t,o)))}isEnabled(){const e=this.hot.getSettings()[f];return!0===e||(0,h.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.addHook("beforeChangeRender",(e=>this.onBeforeChange(e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>this.onBeforeViewRender(e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,o)=>this.onBeforeRowResize(e,t,o)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,n="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,n);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,c.rangeEach)(s.from,s.to,(e=>{if(o||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,n);(0,r.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addRow(t,o)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=s.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const o=this.hot.countRows()-1;let s=null;this.inProgress=!0;const n=()=>{if(!this.hot)return(0,i.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+p.CALCULATION_STEP,o)},e),t=t+p.CALCULATION_STEP+1,t<o?s=(0,i.requestAnimationFrame)(n):((0,i.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateRowsHeight({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?n():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[f],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[f];let t=p.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,u.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const o=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let s=t;return null!==o&&o>(t||0)&&(s=o),s}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:o}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,c.rangeEach)(Math.min(t,o),Math.max(t,o),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,r.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}onBeforeViewRender(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,o=this.getFirstVisibleRow(),s=this.getLastVisibleRow();if(-1!==o&&-1!==s){if(this.calculateRowsHeight({from:o,to:s},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}onBeforeRowMove(e,t){this.clearCacheByRange({from:e,to:t}),this.calculateAllRowsHeight()}onBeforeRowResize(e,t,o){let s=e;return o&&(this.calculateRowsHeight(t,void 0,!0),s=this.getRowHeight(t)),s}onAfterLoadData(){this.hot.view?this.recalculateAllRowsHeight():setTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}),0)}onBeforeChange(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}destroy(){this.ghostTable.clean(),super.destroy()}}t.AutoRowSize=p},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(423);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.BindRowsWithHeaders=s.BindRowsWithHeaders},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(413),r=s(o(424)),i=s(o(425));const l="bindRowsWithHeaders";t.PLUGIN_KEY=l;t.PLUGIN_PRIORITY=210;const a=new Map([["loose",r.default],["strict",i.default]]);class h extends n.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return 210}constructor(e){super(e),this.headerIndexes=null}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[l];"string"!=typeof e&&(e="loose");const t=a.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>this.onModifyRowHeader(e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}onModifyRowHeader(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}destroy(){super.destroy()}}t.BindRowsWithHeaders=h},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(219);const{getListWithInsertedItems:n,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class i extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,s.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=n(o,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=r(this.indexedValues,e);this.indexedValues=(0,s.getDecreasedIndexes)(t,e),super.remove(e)}}var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(219);const{getListWithInsertedItems:n,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class i extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=n(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=r(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var l=i;t.default=l},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(427);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CollapsibleColumns=s.CollapsibleColumns},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78),o(8);var n=s(o(136)),r=s(o(140)),i=s(o(143)),l=o(413),a=o(113),h=o(130),c=o(124),d=o(107),u=s(o(126)),g=o(121);function f(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const p="collapsibleColumns";t.PLUGIN_KEY=p;t.PLUGIN_PRIORITY=290;const m=["nestedHeaders"],C="collapsibleIndicator",w=p,y=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var v=new WeakMap;class S extends l.BasePlugin{constructor(){super(...arguments),(0,n.default)(this,"nestedHeadersPlugin",null),(0,n.default)(this,"eventManager",new u.default(this)),(0,n.default)(this,"headerStateManager",null),f(this,v,{writable:!0,value:null})}static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[p,...m]}isEnabled(){return!!this.hot.getSettings()[p]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,c.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,i.default)(this,v,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>this.onInit())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.addHook("afterGetColHeader",(function(){return e.onAfterGetColHeader(...arguments)})),this.addHook("beforeOnCellMouseDown",((e,t,o)=>this.onBeforeOnCellMouseDown(e,t,o))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,i.default)(this,v,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:o}=this.hot.getSelectedRangeLast().highlight,{collapsible:s,isCollapsed:n,columnIndex:r}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,o))&&void 0!==e?e:{};s&&(n?this.expandSection({row:t,col:r}):this.collapseSection({row:t,col:r}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:w})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(w)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,s=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,n=function(e){e&&e.parentNode.removeChild(e)};(0,h.rangeEach)(0,e-1,(e=>{const r=t.childNodes[e],i=o.childNodes[e],l=s?s.childNodes[e]:null;(0,h.rangeEach)(0,r.childNodes.length-1,(e=>{let t=r.childNodes[e].querySelector(`.${C}`);n(t),i&&i.childNodes[e]&&(t=i.childNodes[e].querySelector(`.${C}`),n(t)),s&&l&&l.childNodes[e]&&(t=l.childNodes[e].querySelector(`.${C}`),n(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:o,origColspan:s,headerLevel:n,columnIndex:r,isCollapsed:i}=t;if(!0===o&&s>1&&(i&&"expand"===e||!i&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(n),col:r}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!y.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const o=(0,a.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let s=o.length>0;(0,a.arrayEach)(o,(e=>{var o;let{row:n,col:r}=e;const{collapsible:i,isCollapsed:l}=null!==(o=this.headerStateManager.getHeaderSettings(n,r))&&void 0!==o?o:{};if(!i||l&&"collapse"===t||!l&&"expand"===t)return s=!1,!1}));const n=[],i=[];s&&(0,a.arrayEach)(o,(e=>{let{row:o,col:s}=e;const{colspanCompensation:r,affectedColumns:l,rollbackModification:a}=this.headerStateManager.triggerNodeModification(t,o,s);r>0&&(i.push(...l),n.push(a))}));const l=this.getCollapsedColumns();let h=[];"collapse"===t?h=(0,a.arrayUnique)([...l,...i]):"expand"===t&&(h=(0,a.arrayFilter)(l,(e=>!i.includes(e))));const c=y.get(t);if(!1===this.hot.runHooks(c.beforeHook,l,h,s))return void(0,a.arrayEach)(n,(e=>{e()}));this.hot.batchExecution((()=>{(0,a.arrayEach)(i,(e=>{(0,r.default)(this,v).setValueAtIndex(this.hot.toPhysicalColumn(e),c.hideColumn)}))}),!0);const d=this.getCollapsedColumns().length!==l.length;this.hot.runHooks(c.afterHook,l,h,s,d),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,r.default)(this,v).getHiddenIndexes()}onAfterGetColHeader(e,t,o){var s;const{collapsible:n,origColspan:r,isCollapsed:i}=null!==(s=this.headerStateManager.getHeaderSettings(o,e))&&void 0!==s?s:{},l=n&&r>1&&e>=this.hot.getSettings().fixedColumnsStart;let a=t.querySelector(`.${C}`);var h;l?(a||(a=this.hot.rootDocument.createElement("div"),(0,d.addClass)(a,C),t.querySelector("div:first-child").appendChild(a)),(0,d.removeClass)(a,["collapsed","expanded"]),i?((0,d.addClass)(a,"collapsed"),(0,d.fastInnerText)(a,"+")):((0,d.addClass)(a,"expanded"),(0,d.fastInnerText)(a,"-"))):null===(h=a)||void 0===h||h.remove()}onBeforeOnCellMouseDown(e,t){(0,d.hasClass)(e.target,C)&&((0,d.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,d.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,g.stopImmediatePropagation)(e))}onInit(){this.updatePlugin()}onAfterLoadData(e,t){t||this.updatePlugin()}destroy(){(0,i.default)(this,v,null),super.destroy()}}t.CollapsibleColumns=S},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(429);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSorting=s.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=s.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=s.REPLACE_COLUMN_CONFIG_STRATEGY},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(107),r=o(110),i=o(116),l=o(114),a=o(113),h=o(413),c=o(219),d=s(o(123)),u=o(430),g=o(431),f=o(432),p=o(433),m=o(434);const C="columnSorting";t.PLUGIN_KEY=C;t.PLUGIN_PRIORITY=50;const w="append";t.APPEND_COLUMN_CONFIG_STRATEGY=w;const y="replace";t.REPLACE_COLUMN_CONFIG_STRATEGY=y;const v=C;(0,m.registerRootComparator)(C,p.rootComparator),d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");class S extends h.BasePlugin{static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return 50}constructor(e){super(e),this.columnStatesManager=null,this.columnMetaCache=null,this.pluginKey=C,this.indexesSequenceCache=null}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new u.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new c.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>this.onAfterGetColHeader(e,t))),this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>this.loadOrSortBySettings())),this.addHook("afterLoadData",(function(){return e.onAfterLoadData(...arguments)})),this.hot.view&&this.loadOrSortBySettings(),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const o=(0,g.getHeaderSpanElement)(t);!1!==(0,g.isFirstLevelColumnHeader)(e,t)&&null!==o&&this.updateHeaderClasses(o)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}sort(e){const t=this.getSortConfig(),o=this.getNormalizedSortConfigs(e),s=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",t,o,s)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new c.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),s&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o),this.saveAllSortSettings(o)),this.hot.runHooks("afterColumnSort",t,s?o:t,s),s&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,r.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,g.areValidSortStates)(e)&&e.every((e=>{let{column:o}=e;return o<=t&&o>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,a.arrayMap)(e,(e=>{let{column:t,...o}=e;return{column:this.hot.toPhysicalColumn(t),...o}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,o=e=>{let{column:t,...o}=e;return{column:this.hot.toVisualColumn(t),...o}};return(0,r.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,a.arrayMap)(t.initialConfig,o)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,r.isDefined)(t)){const o=(0,g.getNextSortOrder)(t);return(0,r.isDefined)(o)?{column:e,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:(0,g.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w;const o=this.columnStatesManager.getIndexOfColumnInSortQueue(e),s=-1!==o,n=this.getSortConfig(),i=this.getColumnNextConfig(e);if(s){if((0,r.isUndefined)(i))return[...n.slice(0,o),...n.slice(o+1)];if(t===w)return[...n.slice(0,o),...n.slice(o+1),i];if(t===y)return[...n.slice(0,o),i,...n.slice(o+1)]}return(0,r.isDefined)(i)?n.concat(i):n}getPluginColumnConfig(e){if((0,i.isObject)(e)){const t=e[this.pluginKey];if((0,i.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),s=this.hot.getCellMeta(0,e),n=Object.getPrototypeOf(s);return Array.isArray(n.columns)?Object.assign(o,t,this.getPluginColumnConfig(n.columns[e])):(0,l.isFunction)(n.columns)?Object.assign(o,t,this.getPluginColumnConfig(n.columns(e))):Object.assign(o,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),o=Object.create(t);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),o}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],o=this.hot.countRows(),s=t=>(0,a.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(o);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(s(e)));const n=(0,a.arrayMap)(t,(e=>e[0]));(0,m.sort)(t,this.pluginKey,(0,a.arrayMap)(e,(e=>e.sortOrder)),(0,a.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<o;e+=1)t.push([e].concat(s(e)));const r=(0,a.arrayMap)(t,(e=>e[0])),i=new Map((0,a.arrayMap)(n,((e,t)=>[e,r[t]]))),l=(0,a.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>i.has(e)?i.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(l)}loadOrSortBySettings(){const e=this.getAllSavedSortSettings();if((0,i.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}sortBySettings(e){if((0,i.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,i.isObject)(t))&&this.sort(t)}else this.hot.render()}onAfterGetColHeader(e,t){const o=(0,g.getHeaderSpanElement)(t);if(!1===(0,g.isFirstLevelColumnHeader)(e,t)||null===o)return;const s=this.getFirstCellSettings(e)[this.pluginKey],n=s.indicator,r=s.headerAction;this.updateHeaderClasses(o,this.columnStatesManager,e,n,r)}updateHeaderClasses(e){if((0,n.removeClass)(e,(0,f.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];(0,n.addClass)(e,(0,f.getClassesToAdd)(...o))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,r.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}onAfterLoadData(e){!0===e&&this.hot.view&&this.loadOrSortBySettings()}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&"SPAN"===e.target.nodeName}onBeforeOnCellMouseDown(e,t,o,s){!1!==(0,g.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(s.column=!0)}onAfterOnCellMouseDown(e,t){!1!==(0,g.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}t.ColumnSorting=S},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(116),n=o(219),r=o(110);const i=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){this.hot=e,this.sortingStates=new n.LinkedPhysicalIndexToValueMap,this.sortEmptyCells=false,this.indicator=true,this.headerAction=true,this.compareFunctionFactory=void 0,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,s.isObject)(e)&&(0,s.objectEach)(e,((e,t)=>{i.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[o]=t;return o===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,s.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,o]=e;return{column:this.hot.toVisualColumn(t),...o}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,r.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},(e,t,o)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,s.isObject)(e))return!1;const{column:t,sortOrder:o}=e;return Number.isInteger(t)&&[r,i].includes(o)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${l}`)},t.getNextSortOrder=function(e){if(e===i)return;if(e===r)return i;return r},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const o=t.parentNode.parentNode.childNodes;if(Array.from(o).indexOf(t.parentNode)-o.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,o){return-1===e&&t>=0&&!1===(0,n.isRightClick)(o)};var s=o(116),n=o(121);const r="asc";t.ASC_SORT_STATE=r;const i="desc";t.DESC_SORT_STATE=i;const l="colHeader";t.HEADER_SPAN_CLASS=l},(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o,n){const h=[i];n&&h.push(l);if(!1===o)return h.push(r),h;const c=e.getSortOrderOfColumn(t);(0,s.isDefined)(c)&&h.push(a.get(c));return h},t.getClassesToRemove=function(){return Array.from(a.values()).concat(l,r,i)},o(8);var s=o(110),n=o(431);const r="indicatorDisabled",i="columnSorting",l="sortAction",a=new Map([[n.ASC_SORT_STATE,"ascending"],[n.DESC_SORT_STATE,"descending"]])},(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,n){const[,...r]=o,[,...i]=n;return function(o){const n=e[o],l=t[o],a=r[o],h=i[o],c=l.columnSorting;return(c.compareFunctionFactory?c.compareFunctionFactory:(0,s.getCompareFunctionFactory)(l.type))(n,l,c)(a,h)}(0)}};var s=o(434)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(435);t.registerRootComparator=s.registerRootComparator,t.getRootComparator=s.getRootComparator,t.getCompareFunctionFactory=s.getCompareFunctionFactory;var n=o(440);t.FIRST_AFTER_SECOND=n.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=n.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=n.DO_NOT_SWAP,t.sort=n.sort},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(d(e))return c(e);return c(n.COLUMN_DATA_TYPE)};var n=o(436),r=o(437),i=o(438),l=o(439),a=s(o(125));const{register:h,getItem:c,hasItem:d}=(0,a.default)("sorting.compareFunctionFactory"),{register:u,getItem:g}=(0,a.default)("sorting.mainSortComparator");t.getRootComparator=g,t.registerRootComparator=u,h(r.COLUMN_DATA_TYPE,r.compareFunctionFactory),h(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),h(l.COLUMN_DATA_TYPE,l.compareFunctionFactory),h(n.COLUMN_DATA_TYPE,n.compareFunctionFactory)},(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const r=t.locale;return function(t,i){const{sortEmptyCells:l}=o;return"string"==typeof t&&(t=t.toLocaleLowerCase(r)),"string"==typeof i&&(i=i.toLocaleLowerCase(r)),t===i?n.DO_NOT_SWAP:(0,s.isEmpty)(t)?(0,s.isEmpty)(i)?n.DO_NOT_SWAP:l&&"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:(0,s.isEmpty)(i)?l&&"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(i)?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(i)?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:t>i?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP)}};var s=o(110),n=o(434);t.COLUMN_DATA_TYPE="default"},(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(t,r){const i=parseFloat(t),l=parseFloat(r),{sortEmptyCells:a}=o;if(i===l||isNaN(i)&&isNaN(l))return n.DO_NOT_SWAP;if(a){if((0,s.isEmpty)(t))return"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND;if((0,s.isEmpty)(r))return"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND}return isNaN(i)?n.FIRST_AFTER_SECOND:isNaN(l)?n.FIRST_BEFORE_SECOND:i<l?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:i>l?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP}};var s=o(110),n=o(434);t.COLUMN_DATA_TYPE="numeric"},(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const i=t.checkedTemplate,l=t.uncheckedTemplate,{sortEmptyCells:a}=o;return function(h,c){const d=(0,r.isEmpty)(h),u=(0,r.isEmpty)(c),g=d?l:h,f=u?l:c,p=g===l||g===i,m=f===l||f===i;if(!1===a){if(d&&!1===u)return s.FIRST_AFTER_SECOND;if(!1===d&&u)return s.FIRST_BEFORE_SECOND}return!1===p&&m?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:p&&!1===m?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!1===p&&!1===m?(0,n.compareFunctionFactory)(e,t,o)(h,c):g===l&&f===i?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:g===i&&f===l?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var s=o(434),n=o(436),r=o(110);t.COLUMN_DATA_TYPE="checkbox"},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(s,l){const{sortEmptyCells:a}=o;if(s===l)return i.DO_NOT_SWAP;if((0,r.isEmpty)(s))return(0,r.isEmpty)(l)?i.DO_NOT_SWAP:a&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,r.isEmpty)(l))return a&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND;const h=t.dateFormat,c=(0,n.default)(s,h),d=(0,n.default)(l,h);return c.isValid()?d.isValid()?d.isAfter(c)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:d.isBefore(c)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP:i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND}};var n=s(o(111)),r=o(110),i=o(434);t.COLUMN_DATA_TYPE="date"},(e,t,o)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const o=(0,s.getRootComparator)(t);for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];e.sort(o(...r))};var s=o(435);t.DO_NOT_SWAP=0;t.FIRST_BEFORE_SECOND=-1;t.FIRST_AFTER_SECOND=1},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(442);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSummary=s.ColumnSummary},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(413),r=o(116),i=s(o(443)),l=o(112),a=o(444);const h="columnSummary";t.PLUGIN_KEY=h;t.PLUGIN_PRIORITY=220;class c extends n.BasePlugin{static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return 220}constructor(e){super(e),this.endpoints=null}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[h],this.endpoints=new i.default(this,this.settings),this.addHook("afterInit",(function(){return e.onAfterInit(...arguments)})),this.addHook("afterChange",(function(){return e.onAfterChange(...arguments)})),this.addHook("beforeCreateRow",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,o))),this.addHook("beforeCreateCol",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,o))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...o)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...o)})),this.addHook("afterCreateRow",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,o))),this.addHook("afterCreateCol",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,o))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...o)})),this.addHook("afterRowMove",(function(){return e.onAfterRowMove(...arguments)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,r.objectEach)(e.ranges,(o=>{t+=this.getPartialSum(o,e.sourceColumn)})),t}getPartialSum(e,t){let o=0,s=e[1]||e[0],n=null,r=0;do{if(n=this.getCellValue(s,t),n=(0,a.isNullishOrNaN)(n)?null:n,null!==n){const e=(`${n}`.split(".")[1]||[]).length||1;e>r&&(r=e)}o+=n||0,s-=1}while(s>=e[0]);return Math.round(o*10**r)/10**r}calculateMinMax(e,t){let o=null;return(0,r.objectEach)(e.ranges,(s=>{const n=this.getPartialMinMax(s,e.sourceColumn,t);if(null===o&&null!==n&&(o=n),null!==n)switch(t){case"min":o=Math.min(o,n);break;case"max":o=Math.max(o,n)}})),null===o?"Not enough data":o}getPartialMinMax(e,t,o){let s,n=null,r=e[1]||e[0];do{if(s=this.getCellValue(r,t),s=(0,a.isNullishOrNaN)(s)?null:s,null===n)n=s;else if(null!==s)switch(o){case"min":n=Math.min(n,s);break;case"max":n=Math.max(n,s)}r-=1}while(r>=e[0]);return n}countEmpty(e,t){let o,s=0,n=e[1]||e[0];do{o=this.getCellValue(n,t),o=(0,a.isNullishOrNaN)(o)?null:o,null===o&&(s+=1),n-=1}while(n>=e[0]);return s}countEntries(e){let t=0;const o=e.ranges;return(0,r.objectEach)(o,(o=>{const s=void 0===o[1]?1:o[1]-o[0]+1,n=this.countEmpty(o,e.sourceColumn);t+=s,t-=n})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const o=this.hot.toVisualRow(e),s=this.hot.toVisualColumn(t);let n=this.hot.getSourceDataAtCell(e,t),r="";if(null!==o&&null!==s&&(r=this.hot.getCellMeta(o,s).className||""),r.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof n&&(n=n.replace(/,/,".")),n=parseFloat(n)),isNaN(n)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
31
31
  numeric format. Cannot do the calculation.`);return n}onAfterInit(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}onAfterChange(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}onAfterRowMove(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}}t.ColumnSummary=c},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8);var s=o(113),n=o(124);var r=class{constructor(e,t){this.plugin=e,this.hot=this.plugin.hot,this.endpoints=[],this.settings=t,this.settingsType="array",this.currentEndpoint=null,this.cellsToSetCache=[]}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,s.arrayEach)(o,(e=>{const o={};this.assignSetting(e,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,o,"reversedRowCoords",!1),this.assignSetting(e,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"sourceColumn",e.destinationColumn),this.assignSetting(e,o,"type","sum"),this.assignSetting(e,o,"forceNumeric",!1),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"customFunction",null),this.assignSetting(e,o,"readOnly",!0),this.assignSetting(e,o,"roundFloat",!1),t.push(o)})),t;this.settingsType="function"}assignSetting(e,t,o,s){if("ranges"!==o||void 0!==e[o]){if("ranges"!==o||0!==e[o].length)if(void 0===e[o]){if(s instanceof Error)throw s;t[o]=s}else"destinationRow"===o&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}else t[o]=s}resetSetupBeforeStructureAlteration(e,t,o){if("function"!==this.settingsType)return;const n=e.indexOf("row")>-1?"row":"col",r=this.getAllEndpoints();(0,s.arrayEach)(r,(s=>{"row"===n&&s.destinationRow>=t&&("insert_row"===e?s.alterRowOffset=o:"remove_row"===e&&(s.alterRowOffset=-1*o)),"col"===n&&s.destinationColumn>=t&&("insert_col"===e?s.alterColumnOffset=o:"remove_col"===e&&(s.alterColumnOffset=-1*o))})),this.resetAllEndpoints(r,!1)}resetSetupAfterStructureAlteration(e,t,o,n,r){let i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const l=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),c=0===e.indexOf("move_row"),d=t;(0,s.arrayEach)(h,(e=>{"row"===l&&e.destinationRow>=d&&(e.alterRowOffset=a*o),"col"===l&&e.destinationColumn>=d&&(e.alterColumnOffset=a*o)})),this.resetAllEndpoints(h,!c),c?(0,s.arrayEach)(h,(e=>{this.extendEndpointRanges(e,d,n[0],n.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,s.arrayEach)(h,(e=>{this.shiftEndpointCoordinates(e,d)})),i&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,n){(0,s.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?o>e[1]?e[1]+=n:o<e[0]&&(e[0]-=n):o>=e[0]&&o<=e[1]&&(e[1]-=n,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,o=[],n=[];(0,s.arrayEach)(t,(e=>{const t=[];if(e[1])for(let o=e[0];o<=e[1];o++)t.push(this.hot.toPhysicalRow(o));else t.push(this.hot.toPhysicalRow(e[0]));n.push(t)})),(0,s.arrayEach)(n,(e=>{let t=[];(0,s.arrayEach)(e,((s,n)=>{0===n?t.push(s):e[n]!==e[n-1]+1&&(t.push(e[n-1]),o.push(t),t=[],t.push(s)),n===e.length-1&&(t.push(s),o.push(t))}))})),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,s.arrayEach)(e.ranges,(o=>{(0,s.arrayEach)(o,((s,n)=>{s>=t&&(o[n]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,o=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,s.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,s.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,s.arrayEach)(e,((e,o,n)=>{`${e[2]||""}`!=`${e[3]}`&&(0,s.arrayEach)(this.getAllEndpoints(),((e,s)=>{this.hot.propToCol(n[o][1])===e.sourceColumn&&-1===t.indexOf(s)&&t.push(s)}))})),(0,s.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.alterRowOffset||0,s=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?s:0)),""])}setEndpointValue(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const n=this.hot.toVisualRow(e.destinationRow);if(null!==n){const o=this.hot.getCellMeta(n,e.destinationColumn);"init"!==t&&o.readOnly===e.readOnly||(o.readOnly=e.readOnly,o.className="columnSummaryResult")}e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),o?this.hot.setDataAtCell(s,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([s,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,n.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};t.default=r},(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(446);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Comments=s.Comments},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78),o(8);var n=s(o(136)),r=s(o(143)),i=s(o(140)),l=o(107),a=o(121),h=o(116),c=s(o(126)),d=o(413),u=s(o(447)),g=s(o(448)),f=o(449),p=s(o(464)),m=s(o(465)),C=s(o(466));function w(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}o(467);const y="comments";t.PLUGIN_KEY=y;t.PLUGIN_PRIORITY=60;const v="comment";t.META_COMMENT=v;const S="value";t.META_COMMENT_VALUE=S;const E="style";t.META_STYLE=E;const R="readOnly";t.META_READONLY=R;const b=y,T=`plugin:${y}`;var _=new WeakMap,M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap;class x extends d.BasePlugin{constructor(){super(...arguments),(0,n.default)(this,"range",{}),(0,n.default)(this,"eventManager",null),w(this,_,{writable:!0,value:null}),w(this,M,{writable:!0,value:null}),w(this,O,{writable:!0,value:!1}),w(this,I,{writable:!0,value:!1}),w(this,N,{writable:!0,value:{}}),w(this,A,{writable:!0,value:null}),w(this,P,{writable:!0,value:""})}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return 60}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){this.enabled||((0,i.default)(this,_)||(0,r.default)(this,_,new u.default(this.hot.rootDocument,this.hot.isRtl())),this.eventManager||(this.eventManager=new c.default(this)),(0,i.default)(this,M)||(0,r.default)(this,M,new g.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,o,s,n,r)=>this.onAfterRenderer(e,r))),this.addHook("afterScroll",(()=>this.onAfterScroll())),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>this.onAfterDocumentKeyDown(e))),(0,i.default)(this,M).addLocalHook("hide",(()=>this.hide())),(0,i.default)(this,M).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,i.default)(this,M).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(T);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,r.default)(this,I,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(T),this.hot._registerTimeout((()=>{(0,r.default)(this,I,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,i.default)(this,_).isVisible()},group:b}),o.addShortcut({keys:[["Escape"]],callback:()=>{(0,i.default)(this,_).setValue((0,i.default)(this,P)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:b}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,i.default)(this,_).isVisible()},group:b})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(b)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>this.onMouseOver(e))),this.eventManager.addEventListener(e,"mousedown",(e=>this.onMouseDown(e))),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp())),this.eventManager.addEventListener(t,"focus",(()=>this.onEditorFocus())),this.eventManager.addEventListener(t,"blur",(()=>this.onEditorBlur())),this.eventManager.addEventListener(t,"mousedown",(e=>this.onEditorMouseDown(e))),this.eventManager.addEventListener(t,"mouseup",(e=>this.onEditorMouseUp(e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,l.closest)(e.target,"TD","TBODY");return!!(t&&(0,l.hasClass)(t,"htCommentCell")&&(0,l.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,i.default)(this,_).getValue();let o="";null!=e?o=e:null!=t&&(o=t);const s=this.range.from.row,n=this.range.from.col;this.updateCommentMeta(s,n,{[S]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,v),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,S)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,S)}show(){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:e,col:t}}=this.range;if(e<0||e>this.hot.countSourceRows()-1||t<0||t>this.hot.countSourceCols()-1)return!1;const o=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,i.default)(this,M).cancelHiding(),(0,i.default)(this,_).setValue(o[v]?o[v][S]:""),(0,i.default)(this,_).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,i.default)(this,_).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,i.default)(this,_).isVisible()))return;const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{row:n,col:r}=this.range.from;let a=o.getRenderableFromVisualIndex(n),h=s.getRenderableFromVisualIndex(r);const c=null===a;(0,i.default)(this,_).setPosition(0,0),null===a&&(a=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1))),null===h&&(h=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)));const d=null===a,u=null===h;a=null!==(e=a)&&void 0!==e?e:0,h=null!==(t=h)&&void 0!==t?t:0;const{rootWindow:g,view:{_wt:f}}=this.hot,{wtTable:p}=f,m=f.getCell({row:a,col:h},!0),C=this.getCommentMeta(n,r,E);C?(0,i.default)(this,_).setSize(C.width,C.height):(0,i.default)(this,_).resetSize();const w=u?0:p.getStretchedColumnWidth(h),y=c&&!d?(0,l.outerHeight)(m):0,{left:v,top:S,width:b,height:T}=m.getBoundingClientRect(),{width:M,height:O}=(0,i.default)(this,_).getSize(),{innerWidth:I,innerHeight:N}=this.hot.rootWindow,A=this.hot.rootDocument.documentElement;let P=v+g.scrollX+w,x=S+g.scrollY+y;this.hot.isRtl()&&(P-=M+w),this.hot.isLtr()&&v+b+M>I?P=v+g.scrollX-M-1:this.hot.isRtl()&&P<-(A.scrollWidth-A.clientWidth)&&(P=v+g.scrollX+w+1),S+O>N&&(x-=O-T+1),(0,i.default)(this,_).setPosition(P,x),(0,i.default)(this,_).setReadOnlyState(this.getCommentMeta(n,r,R))}focusEditor(){(0,i.default)(this,_).focus()}updateCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t)[v];let n;s?(n=(0,h.deepClone)(s),(0,h.deepExtend)(n,o)):n=o,this.hot.setCellMeta(e,t,v,n)}getCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t);if(s[v])return s[v][o]}onMouseDown(e){if(this.hot.view&&this.hot.view._wt&&!(0,i.default)(this,O)&&!this.targetIsCommentTextArea(e)){const t=(0,l.closest)(e.target,"TD","TBODY");let o=null;t&&(o=this.hot.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}onMouseOver(e){const{rootDocument:t}=this.hot;if(!((0,i.default)(this,O)||(0,i.default)(this,_).isFocused()||(0,l.hasClass)(e.target,"wtBorder")||(0,i.default)(this,A)===e.target)&&(0,i.default)(this,_))if((0,r.default)(this,A,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,i.default)(this,M).show(t)}else(0,l.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,i.default)(this,M).hide()}onMouseUp(){(0,r.default)(this,O,!1)}onAfterRenderer(e,t){t[v]&&t[v][S]&&(0,l.addClass)(e,t.commentedCellClassName)}onEditorBlur(){(0,r.default)(this,P,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}onEditorFocus(){(0,r.default)(this,P,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(T)}onEditorMouseDown(e){(0,r.default)(this,N,{width:(0,l.outerWidth)(e.target),height:(0,l.outerHeight)(e.target)})}onEditorMouseUp(e){const t=(0,l.outerWidth)(e.target),o=(0,l.outerHeight)(e.target);t===(0,i.default)(this,N).width+1&&o===(0,i.default)(this,N).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[E]:{width:t,height:o}})}onAfterDocumentKeyDown(e){(0,i.default)(this,_).isVisible()&&(0,a.stopImmediatePropagation)(e)}onAfterScroll(){(0,i.default)(this,I)||this.hide()}addToContextMenu(e){e.items.push({name:f.SEPARATOR},(0,p.default)(this),(0,m.default)(this),(0,C.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[y];if((0,h.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,i.default)(this,_).getInputElement()}destroy(){(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,i.default)(this,M)&&(0,i.default)(this,M).destroy(),super.destroy()}}t.Comments=x},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107);class n{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){this.rootDocument=e,this.isRtl=t,this.container=null,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hidden=!0,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:(0,s.outerWidth)(this.getInputElement()),height:(0,s.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,s.addClass)(this.container,n.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,s.addClass)(e,n.CLASS_EDITOR),(0,s.addClass)(t,n.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${n.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}var r=n;t.default=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(114),r=o(116),i=s(o(199));class l{constructor(e){this.wasLastActionShow=!0,this.showDebounced=null,this.hidingTimer=null,this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,n.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,r.mixin)(l,i.default);var a=l;t.default=a},(e,t,o)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===y.indexOf(e)&&(v[e]=t)},t.predefinedItems=function(){const e={};return(0,s.objectEach)(v,((t,o)=>{e[o]=t()})),e};var s=o(116),n=w(o(450));t.ALIGNMENT=n.KEY;var r=w(o(453));t.CLEAR_COLUMN=r.KEY;var i=w(o(454));t.COLUMN_LEFT=i.KEY;var l=w(o(455));t.COLUMN_RIGHT=l.KEY;var a=w(o(456));t.READ_ONLY=a.KEY;var h=w(o(457));t.REDO=h.KEY;var c=w(o(458));t.REMOVE_COLUMN=c.KEY;var d=w(o(459));t.REMOVE_ROW=d.KEY;var u=w(o(460));t.ROW_ABOVE=u.KEY;var g=w(o(461));t.ROW_BELOW=g.KEY;var f=w(o(452));t.SEPARATOR=f.KEY;var p=w(o(462));t.NO_ITEMS=p.KEY;var m=w(o(463));function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(C=function(e){return e?o:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=C(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}t.UNDO=m.KEY;const y=[u.KEY,g.KEY,i.KEY,l.KEY,r.KEY,d.KEY,c.KEY,m.KEY,h.KEY,a.KEY,n.KEY,f.KEY,p.KEY];t.ITEMS=y;const v={[f.KEY]:f.default,[p.KEY]:p.default,[u.KEY]:u.default,[g.KEY]:g.default,[i.KEY]:i.default,[l.KEY]:l.default,[r.KEY]:r.default,[d.KEY]:d.default,[c.KEY]:c.default,[m.KEY]:m.default,[h.KEY]:h.default,[a.KEY]:a.default,[n.KEY]:n.default}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,name(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${l}:left`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htLeft"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htLeft";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:center`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htCenter"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htCenter";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:right`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htRight"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htRight";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:justify`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htJustify"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",n="htJustify";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{name:n.KEY},{key:`${l}:top`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htTop"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htTop";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:middle`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htMiddle"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htMiddle";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${l}:bottom`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htBottom"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",n="htBottom";this.runHooks("beforeCellAlignment",t,e,o,n),(0,s.align)(e,o,n,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1}]}}};var s=o(451),n=o(452),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const l="alignment";t.KEY=l},(e,t,o)=>{"use strict";t.__esModule=!0,t.align=function(e,t,o,n,r){(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&function(e,t,o,s,n,r){const a=n(e,t);let h=s;a.className&&(h="vertical"===o?i(a.className,s):l(a.className,s));r(e,t,"className",h)}(e,s,t,o,n,r)}))}))},t.checkSelectionConsistency=function(e,t){let o=!1;Array.isArray(e)&&(0,s.arrayEach)(e,(e=>(e.forAll(((e,s)=>{if(e>=0&&s>=0&&t(e,s))return o=!0,!1})),o)));return o},t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.KEY,o=e.slice(0);return o=a(o,t),o=function(e,t){let o=e.slice(0);return o.reverse(),o=a(o,t),o.reverse(),o}(o,t),o=function(e){const t=[];return(0,s.arrayEach)(e,((e,o)=>{o>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(o),o},t.getAlignmentClasses=function(e,t){const o={};return(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&(o[e]||(o[e]=[]),o[e][s]=t(e,s))}))})),o},t.getDocumentOffsetByElement=function(e,t){const o={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:s,left:n}=e.getBoundingClientRect();o.top=s,o.left=n}return o},t.hasSubMenu=function(e){return(0,n.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,n.hasClass)(e,"htDisabled")},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isSelectionDisabled=function(e){return(0,n.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,n.hasClass)(e,"htSeparator")},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeSelection=function(e){return(0,s.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},t.prepareHorizontalAlignClass=l,t.prepareVerticalAlignClass=i,o(8);var s=o(113),n=o(107),r=o(452);function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function l(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}function a(e,t){const o=e.slice(0);for(let e=0;e<o.length&&o[e].name===t;)o.shift();return o}},(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:o}};const o="---------";t.KEY=o},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const o=t[0].start.col,s=t[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t[0].start.row,t[0].end.row),s,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="clear_column";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="col_left";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="col_right";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:l,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_READ_ONLY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,n.arrayEach)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&this.setCellMeta(e,o,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var s=o(451),n=o(113),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const l="make_read_only";t.KEY=l},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="redo";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this.getSelected()),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var s=o(259),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const i="remove_col";t.KEY=i},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this.getSelected()),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var s=o(259),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const i="remove_row";t.KEY=i},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="row_above";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="row_below";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var s=o(243);const n="no_items";t.KEY=n},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const r="undo";t.KEY=r},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.highlight.isHeader()||(0===this.countRenderedRows()||0===this.countRenderedCols()))}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{t>=0&&o>=0&&e.removeCommentAtCell(t,o,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.highlight.isHeader()||(0===this.countRenderedRows()||0===this.countRenderedCols()))}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((t,o)=>e.getCommentMeta(t,o,r.META_READONLY)))?(0,n.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{if(t>=0&&o>=0){const s=!!e.getCommentMeta(t,o,r.META_READONLY);e.updateCommentMeta(t,o,{[r.META_READONLY]:!s})}}))},disabled(){const t=this.getSelectedRangeLast();return!t||(!!t.highlight.isHeader()||(!e.getCommentAtCell(t.highlight.row,t.highlight.col)||(0===this.countRenderedRows()||0===this.countRenderedCols())))}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(s,r,l):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(451),r=o(446);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(469);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ContextMenu=s.ContextMenu},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(413),r=s(o(123)),i=o(113),l=o(116),a=s(o(470)),h=s(o(126)),c=s(o(473)),d=s(o(474)),u=o(451),g=o(107),f=o(449);o(476);const p="contextMenu";t.PLUGIN_KEY=p;t.PLUGIN_PRIORITY=70;const m=p;r.default.getSingleton().register("afterContextMenuDefaultOptions"),r.default.getSingleton().register("beforeContextMenuShow"),r.default.getSingleton().register("afterContextMenuShow"),r.default.getSingleton().register("afterContextMenuHide"),r.default.getSingleton().register("afterContextMenuExecute");class C extends n.BasePlugin{static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.ROW_ABOVE,f.ROW_BELOW,f.SEPARATOR,f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_ROW,f.REMOVE_COLUMN,f.SEPARATOR,f.UNDO,f.REDO,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){super(e),this.eventManager=new h.default(this),this.commandExecutor=new a.default(this.hot),this.itemsFactory=null,this.menu=null}isEnabled(){return!!this.hot.getSettings()[p]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[p];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new d.default(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>this.onMenuBeforeOpen())),this.menu.addLocalHook("afterOpen",(()=>this.onMenuAfterOpen())),this.menu.addLocalHook("afterClose",(()=>this.onMenuAfterClose())),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),this.addHook("afterOnCellContextMenu",(e=>this.onAfterOnCellContextMenu(e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.unregisterShortcuts(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","\\"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.hot._registerTimeout((()=>{this.menu.selectFirstCell()}))},runOnlyIf:()=>this.hot.getSelectedRangeLast()&&!this.menu.isOpened(),group:m})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(m)}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}prepareMenuItems(){this.itemsFactory=new c.default(this.hot,C.DEFAULT_ITEMS);const e=this.hot.getSettings()[p],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,i.arrayEach)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}onAfterOnCellContextMenu(e){const t=this.hot.getSettings(),o=t.rowHeaders,s=t.colHeaders;const n=e.target;if(this.close(),(0,g.hasClass)(n,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!o&&!s&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(n)||(0,g.hasClass)(n,"current")&&(0,g.hasClass)(n,"wtBorder")))return;const r=(0,u.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+r.top,left:e.clientX+r.left})}onMenuBeforeOpen(){this.hot.runHooks("beforeContextMenuShow",this)}onMenuAfterOpen(){this.hot.runHooks("afterContextMenuShow",this)}onMenuAfterClose(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}t.ContextMenu=C,C.SEPARATOR={name:f.SEPARATOR}},(e,t,o)=>{"use strict";t.__esModule=!0,o(78),o(8),o(471);var s=o(113),n=o(116);var r=class{constructor(e){this.hot=e,this.commands={},this.commonCallback=null}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),r=1;r<t;r++)o[r-1]=arguments[r];const i=e.split(":"),l=i[0],a=2===i.length?i[1]:null;let h=this.commands[l];if(!h)throw new Error(`Menu command '${l}' not exists.`);if(a&&h.submenu&&(h=function(e,t){let o;return(0,s.arrayEach)(t,(t=>{const s=t.key?t.key.split(":"):null;if(Array.isArray(s)&&s[1]===e)return o=t,!1})),o}(a,h.submenu.items)),!0===h.disabled)return;if("function"==typeof h.disabled&&!0===h.disabled.call(this.hot))return;if((0,n.hasOwnProperty)(h,"submenu"))return;const c=[];"function"==typeof h.callback&&c.push(h.callback),"function"==typeof this.commonCallback&&c.push(this.commonCallback),o.unshift(i.join(":")),(0,s.arrayEach)(c,(e=>e.apply(this.hot,o)))}};t.default=r},(e,t,o)=>{"use strict";var s=o(9),n=o(46),r=o(70),i=o(75),l=o(472),a=o(77);s({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=n(this),o=r(t),s=arguments.length;if(s){a(o+s);for(var h=o;h--;){var c=h+s;h in t?t[c]=t[h]:l(t,c)}for(var d=0;d<s;d++)t[d]=arguments[d]}return i(t,o+s)}})},(e,t,o)=>{"use strict";var s=o(38),n=TypeError;e.exports=function(e,t){if(!delete e[t])throw n("Cannot delete property "+s(t)+" of "+s(e))}},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(116),n=o(113),r=o(449);var i=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.hot=e,this.predefinedItems=(0,r.predefinedItems)(),this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,s.objectEach)(e,((e,o)=>{let s="";e.name===r.SEPARATOR?(t[r.SEPARATOR]=e,s=r.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,t[o]=e,s=e.key):(t[e.key]=e,s=e.key),this.defaultOrderPattern.push(s)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=[];let l=e;l&&l.items?l=l.items:Array.isArray(l)||(l=t);(0,s.isObject)(l)?(0,s.objectEach)(l,((e,t)=>{let n=o["string"==typeof e?e:t];n||(n=e),(0,s.isObject)(e)?(0,s.extend)(n,e):"string"==typeof n&&(n={name:n}),void 0===n.key&&(n.key=t),i.push(n)})):(0,n.arrayEach)(l,((e,t)=>{let n=o[e];!n&&r.ITEMS.indexOf(e)>=0||(n||(n={name:e,key:`${t}`}),(0,s.isObject)(e)&&(0,s.extend)(n,e),void 0===n.key&&(n.key=t),i.push(n))}));return i}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}};t.default=i},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=s(o(475)),r=o(449),i=o(451),l=s(o(7)),a=s(o(126)),h=o(113),c=o(115),d=o(107),u=o(121),g=o(114),f=o(110),p=o(116),m=s(o(199));const C="menu",w=C;class y{constructor(e,t){this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.eventManager=new a.default(this),this.container=this.createContainer(this.options.name),this.hotMenu=null,this.hotSubMenus={},this.parentMenu=this.options.parent||null,this.menuItems=null,this.origOutsideClickDeselects=null,this.keyEvent=!1,this.offset={above:0,below:0,left:0,right:0},this._afterScrollCallback=null,this.registerEvents()}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,d.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.offset[e]=t}isSubMenu(){return null!==this.parentMenu}open(){var e=this;this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const t=(0,g.debounce)((e=>this.openSubMenu(e)),300),o=this.options.minWidth||215;let s=!1,n=(0,h.arrayFilter)(this.menuItems,(e=>(e.key===r.NO_ITEMS&&(s=!0),(0,i.isItemHidden)(e,this.hot))));if(n.length<1&&!s)n.push((0,r.predefinedItems)()[r.NO_ITEMS]);else if(0===n.length)return;n=(0,i.filterSeparators)(n,r.SEPARATOR);let a=!1;const p={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,f.isDefined)(e)&&e<o?o:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,maxCols:1,columns:[{data:"name",renderer:(e,t,o,s,n,r)=>this.menuItemRenderer(e,t,o,s,n,r)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",afterOnCellMouseOver:(e,o)=>{this.isAllSubMenusClosed()?t(o.row):this.openSubMenu(o.row)},rowHeights:e=>n[e].name===r.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,c.isWindowsOS)()&&a&&this.hasSelectedItem()&&this.close(!0)},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(a=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,c.isWindowsOS)()&&(0,u.isRightClick)(e)||!a||!this.hasSelectedItem()||((0,c.isMobileBrowser)()||(0,c.isIpadOS)()?setTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new l.default(this.container,p),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.addHook("afterSelection",(function(){return e.onAfterSelection(...arguments)})),this.hotMenu.init(),this.hotMenu.listen();const m=this.hotMenu.getShortcutManager(),y=m.addContext(w),v={...{group:C},runOnlyIf:e=>!1===(0,d.isInput)(e.target)||!1===this.container.contains(e.target)};m.setActiveContextName("menu"),y.addShortcuts([{keys:[["Escape"]],callback:()=>{this.keyEvent=!0,this.close(),this.keyEvent=!1}},{keys:[["ArrowDown"]],callback:()=>{const e=this.hotMenu.getSelectedLast();this.keyEvent=!0,e?this.selectNextCell(e[0],e[1]):this.selectFirstCell(),this.keyEvent=!1}},{keys:[["ArrowUp"]],callback:()=>{const e=this.hotMenu.getSelectedLast();this.keyEvent=!0,e?this.selectPrevCell(e[0],e[1]):this.selectLastCell(),this.keyEvent=!1}},{keys:[["ArrowRight"]],callback:()=>{const e=this.hotMenu.getSelectedLast();if(this.keyEvent=!0,e){const t=this.openSubMenu(e[0]);t&&t.selectFirstCell()}this.keyEvent=!1}},{keys:[["ArrowLeft"]],callback:()=>{const e=this.hotMenu.getSelectedLast();this.keyEvent=!0,e&&this.isSubMenu()&&(this.close(),this.parentMenu&&this.parentMenu.hotMenu.listen()),this.keyEvent=!1}},{keys:[["Enter"]],callback:e=>{const t=this.hotMenu.getSelectedLast();this.keyEvent=!0,this.hotMenu.getSourceDataAtRow(t[0]).submenu||(this.executeCommand(e),this.close(!0)),this.keyEvent=!1}},{keys:[["PageUp"]],callback:()=>{const e=this.hotMenu.getSelectedLast();this.keyEvent=!0,e?this.hotMenu.selection.transformStart(-this.hotMenu.countVisibleRows(),0):this.selectFirstCell(),this.keyEvent=!1}},{keys:[["PageDown"]],callback:()=>{const e=this.hotMenu.getSelectedLast();this.keyEvent=!0,e?this.hotMenu.selection.transformStart(this.hotMenu.countVisibleRows(),0):this.selectLastCell(),this.keyEvent=!1}}],v),this.blockMainTableCallbacks(),this.runLocalHooks("afterOpen")}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isOpened()&&(e&&this.parentMenu?this.parentMenu.close():(this.closeAllSubMenus(),this.container.style.display="none",this.releaseMainTableCallbacks(),this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.parentMenu&&this.parentMenu.hotMenu.listen()))}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,i.hasSubMenu)(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),s=new y(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return s.setMenuItems(o.submenu.items),s.open(),s.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=s,s}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];o&&(o.destroy(),delete this.hotSubMenus[t.key])}closeAllSubMenus(){(0,h.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),s=o?(0,i.normalizeSelection)(o):[];this.runLocalHooks("executeCommand",t.key,s,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,s,e)}isCommandPassive(e){const{isCommand:t,name:o,disabled:s,submenu:n}=e,i=!0===s||"function"==typeof s&&!0===s.call(this.hot);return!1===t||o===r.SEPARATOR||!0===i||n}setPosition(e){const t=new n.default(e,this.container.ownerDocument.defaultView);this.options.keepInViewport?(t.fitsBelow(this.container)?this.setPositionBelowCursor(t):t.fitsAbove(this.container)?this.setPositionAboveCursor(t):this.setPositionBelowCursor(t),this.hot.isLtr()?this.setHorizontalPositionForLtr(t):this.setHorizontalPositionForRtl(t)):(this.setPositionBelowCursor(t),this.setPositionOnRightOfCursor(t))}setHorizontalPositionForRtl(e){e.fitsOnLeft(this.container)?this.setPositionOnLeftOfCursor(e):this.setPositionOnRightOfCursor(e)}setHorizontalPositionForLtr(e){e.fitsOnRight(this.container)?this.setPositionOnRightOfCursor(e):this.setPositionOnLeftOfCursor(e)}setPositionAboveCursor(e){let t=this.offset.above+e.top-this.container.offsetHeight;this.isSubMenu()&&(t=e.top+e.cellHeight-this.container.offsetHeight+3),this.container.style.top=`${t}px`}setPositionBelowCursor(e){let t=this.offset.below+e.top+1;this.isSubMenu()&&(t=e.top-1),this.container.style.top=`${t}px`}setPositionOnRightOfCursor(e){let t=e.left;if(this.isSubMenu()){const{right:o}=this.parentMenu.container.getBoundingClientRect();t+=e.cellWidth+o-(e.left+e.cellWidth)}else t+=this.offset.right;this.container.style.left=`${t}px`}setPositionOnLeftOfCursor(e){let t=this.offset.left+e.left-this.container.offsetWidth;if(this.isSubMenu()){const{left:o}=this.parentMenu.container.getBoundingClientRect();t-=e.left-o}this.container.style.left=`${t}px`}selectFirstCell(){const e=this.hotMenu.getCell(0,0);(0,i.isSeparator)(e)||(0,i.isDisabled)(e)||(0,i.isSelectionDisabled)(e)?this.selectNextCell(0,0):this.hotMenu.selectCell(0,0)}selectLastCell(){const e=this.hotMenu.countRows()-1,t=this.hotMenu.getCell(e,0);(0,i.isSeparator)(t)||(0,i.isDisabled)(t)||(0,i.isSelectionDisabled)(t)?this.selectPrevCell(e,0):(this.hotMenu.selectCell(e,0,void 0,void 0,!1),this.hotMenu.scrollViewportTo(e,0,!0,!1))}selectNextCell(e,t){const o=e+1,s=o<this.hotMenu.countRows()?this.hotMenu.getCell(o,t):null;s&&((0,i.isSeparator)(s)||(0,i.isDisabled)(s)||(0,i.isSelectionDisabled)(s)?this.selectNextCell(o,t):this.hotMenu.selectCell(o,t))}selectPrevCell(e,t){const o=e-1,s=o>=0?this.hotMenu.getCell(o,t):null;s&&((0,i.isSeparator)(s)||(0,i.isDisabled)(s)||(0,i.isSelectionDisabled)(s)?this.selectPrevCell(o,t):this.hotMenu.selectCell(o,t))}menuItemRenderer(e,t,o,s,n,i){const l=e.getSourceDataAtRow(o),a=this.hot.rootDocument.createElement("div"),h=e=>e.disableSelection;let c=i;var u;"function"==typeof c&&(c=c.call(this.hot)),(0,d.empty)(t),(0,d.addClass)(a,"htItemWrapper"),t.appendChild(a),u=l,new RegExp(r.SEPARATOR,"i").test(u.name)?(0,d.addClass)(t,"htSeparator"):"function"==typeof l.renderer?((0,d.addClass)(t,"htCustomMenuRenderer"),t.appendChild(l.renderer(e,a,o,s,n,c))):(0,d.fastInnerHTML)(a,c),(e=>!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(this.hot))(l)?((0,d.addClass)(t,"htDisabled"),this.eventManager.addEventListener(t,"mouseenter",(()=>e.deselectCell()))):h(l)?((0,d.addClass)(t,"htSelectionDisabled"),this.eventManager.addEventListener(t,"mouseenter",(()=>e.deselectCell()))):(e=>(0,p.hasOwnProperty)(e,"submenu"))(l)?((0,d.addClass)(t,"htSubmenu"),h(l)?this.eventManager.addEventListener(t,"mouseenter",(()=>e.deselectCell())):this.eventManager.addEventListener(t,"mouseenter",(()=>e.selectCell(o,s,void 0,void 0,!1,!1)))):((0,d.removeClass)(t,["htSubmenu","htDisabled"]),h(l)?this.eventManager.addEventListener(t,"mouseenter",(()=>e.deselectCell())):this.eventManager.addEventListener(t,"mouseenter",(()=>e.selectCell(o,s,void 0,void 0,!1,!1))))}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let o,s=e;return s&&((0,g.isFunction)(s)&&(s=s.call(this.hot),s=null===s||(0,f.isUndefined)(s)?"":s.toString()),s=s.replace(/[^A-z0-9]/g,"_"),s=`${this.options.className}Sub_${s}`,o=t.querySelector(`.${this.options.className}.${s}`)),o||(o=t.createElement("div"),(0,d.addClass)(o,`htMenu ${this.options.className}`),s&&(0,d.addClass)(o,s),this.options.container.appendChild(o)),o}blockMainTableCallbacks(){this._afterScrollCallback=function(){},this.hot.addHook("afterScrollVertically",this._afterScrollCallback),this.hot.addHook("afterScrollHorizontally",this._afterScrollCallback)}releaseMainTableCallbacks(){this._afterScrollCallback&&(this.hot.removeHook("afterScrollVertically",this._afterScrollCallback),this.hot.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,s=e.holder.style,n=parseInt(o.width,10),i=(0,h.arrayReduce)(t,((e,t)=>e+(t.name===r.SEPARATOR?1:26)),0);s.width=`${n+3}px`,s.height=`${i+3}px`,o.height=s.height}onAfterSelection(e,t,o,s,n){!1===this.keyEvent&&(n.value=!0)}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,d.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,d.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,d.hasClass)(e.target,"htCore")&&(0,d.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}(0,p.mixin)(y,m.default);var v=y;t.default=v},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(107);var n=class{constructor(e,t){const o=(0,s.getWindowScrollTop)(t),n=(0,s.getWindowScrollLeft)(t);let r,i,l,a,h,c;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(r=parseInt(e.top,10),l=parseInt(e.left,10),h=e.height||0,c=e.width||0,i=r,a=l,r+=o,l+=n):"event"===this.type&&(r=parseInt(e.pageY,10),l=parseInt(e.pageX,10),h=e.target.clientHeight,c=e.target.clientWidth,i=r-o,a=l-n),this.top=r,this.topRelative=i,this.left=l,this.leftRelative=a,this.scrollTop=o,this.scrollLeft=n,this.cellHeight=h,this.cellWidth=c}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}};t.default=n},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(478);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CopyPaste=s.CopyPaste},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,o(8);var n=s(o(136)),r=s(o(140)),i=s(o(143)),l=o(413),a=s(o(123)),h=o(262),c=o(113),d=o(108),u=o(107),g=s(o(479)),f=s(o(480)),p=s(o(481)),m=s(o(482)),C=s(o(483)),w=s(o(484)),y=o(486),v=o(487),S=o(127);function E(e,t,o){R(e,t),t.set(e,o)}function R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}o(488),a.default.getSingleton().register("afterCopyLimit"),a.default.getSingleton().register("modifyCopyableRange"),a.default.getSingleton().register("beforeCut"),a.default.getSingleton().register("afterCut"),a.default.getSingleton().register("beforePaste"),a.default.getSingleton().register("afterPaste"),a.default.getSingleton().register("beforeCopy"),a.default.getSingleton().register("afterCopy");const b="copyPaste";t.PLUGIN_KEY=b;t.PLUGIN_PRIORITY=80;const T=["fragmentSelection"],_=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var M=new WeakMap,O=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet;class D extends l.BasePlugin{constructor(){var e,t;super(...arguments),R(e=this,t=H),t.add(e),(0,n.default)(this,"columnsLimit",1/0),(0,n.default)(this,"rowsLimit",1/0),(0,n.default)(this,"pasteMode","overwrite"),(0,n.default)(this,"uiContainer",this.hot.rootDocument.body),E(this,M,{writable:!0,value:!1}),E(this,O,{writable:!0,value:!1}),E(this,I,{writable:!0,value:!1}),E(this,N,{writable:!0,value:"cells-only"}),E(this,A,{writable:!0,value:!1}),E(this,P,{writable:!0,value:!1}),E(this,x,{writable:!0,value:new v.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),(0,n.default)(this,"copyableRanges",[]),(0,n.default)(this,"focusableElement",void 0)}static get PLUGIN_KEY(){return b}static get SETTING_KEYS(){return[b,...T]}static get PLUGIN_PRIORITY(){return 80}isEnabled(){return!!this.hot.getSettings()[b]}enablePlugin(){if(this.enabled)return;const{[b]:e}=this.hot.getSettings();var t,o;"object"==typeof e&&(this.pasteMode=null!==(t=e.pasteMode)&&void 0!==t?t:this.pasteMode,this.rowsLimit=isNaN(e.rowsLimit)?this.rowsLimit:e.rowsLimit,this.columnsLimit=isNaN(e.columnsLimit)?this.columnsLimit:e.columnsLimit,(0,i.default)(this,M,!!e.copyColumnHeaders),(0,i.default)(this,O,!!e.copyColumnGroupHeaders),(0,i.default)(this,I,!!e.copyColumnHeadersOnly),this.uiContainer=null!==(o=e.uiContainer)&&void 0!==o?o:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>this.onAfterContextMenuDefaultOptions(e))),this.addHook("afterOnCellMouseUp",(()=>this.onAfterOnCellMouseUp())),this.addHook("afterSelectionEnd",(()=>this.onAfterSelectionEnd())),this.addHook("beforeKeyDown",(()=>this.onBeforeKeyDown())),this.focusableElement=(0,y.createElement)(this.uiContainer),this.focusableElement.addLocalHook("copy",(e=>this.onCopy(e))).addLocalHook("cut",(e=>this.onCut(e))).addLocalHook("paste",(e=>this.onPaste(e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.getOrCreateFocusableElement(),super.updatePlugin()}disablePlugin(){this.focusableElement&&(0,y.destroyElement)(this.focusableElement),super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,i.default)(this,N,e),(0,i.default)(this,A,!0),this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,i.default)(this,P,!0),this.getOrCreateFocusableElement(),this.focusableElement.focus(),this.hot.rootDocument.execCommand("cut")}getRangedCopyableData(e){return(0,h.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:o,columns:s}=(0,v.normalizeRanges)(e);return(0,c.arrayEach)(o,(e=>{const o=[];(0,c.arrayEach)(s,(t=>{e<0?o.push(this.hot.getColHeader(t,e)):o.push(this.hot.getCopyableData(e,t))})),t.push(o)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const o=new w.default;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.getOrCreateFocusableElement(),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,r.default)(this,x).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,r.default)(this,N)?t.set("headers",(0,r.default)(this,x).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,r.default)(this,N)?t.set("headers",(0,r.default)(this,x).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,r.default)(this,N)&&t.set("headers",(0,r.default)(this,x).getAllColumnHeadersRange()),t.set("cells",(0,r.default)(this,x).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:o,endRow:s,endCol:n}=e;return{startRow:t,startCol:o,endRow:s,endCol:n}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:e,startCol:t,endRow:s,endCol:n}=o;this.hot.runHooks("afterCopyLimit",s-e+1,n-t+1,this.rowsLimit,this.columnsLimit)}}getOrCreateFocusableElement(){var e;const t=null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.TEXTAREA;t?this.focusableElement.setFocusableElement(t):this.focusableElement.useSecondaryElement()}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const o=e.length,s=e[0].length,n=[],{row:r,col:i}=t.getTopStartCorner(),{row:l,col:a}=t.getBottomEndCorner();let h=r,c=i,d=r,u=i;for(;n.length<o||h<=l;){const{skipRowOnPaste:t,visualRow:l}=this.hot.getCellMeta(h,i);if(h=l+1,!0===t)continue;d=l,c=i;const g=[],f=n.length%o;for(;g.length<s||c<=a;){const{skipColumnOnPaste:t,visualCol:o}=this.hot.getCellMeta(r,c);if(c=o+1,!0===t)continue;u=o;const n=g.length%s;g.push(e[f][n])}n.push(g)}return this.hot.populateFromArray(r,i,n,void 0,void 0,"CopyPaste.paste",this.pasteMode),[r,i,d,u]}onCopy(e){if(!this.hot.isListening()&&!(0,r.default)(this,A)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,A,!1);const t=this.getRangedData(this.copyableRanges),o=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,H,L).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,o)){const s=(0,h.stringify)(t);if(e&&e.clipboardData){const o=(0,S._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",s),e.clipboardData.setData("text/html",[_,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",s);this.hot.runHooks("afterCopy",t,this.copyableRanges,o)}(0,i.default)(this,N,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,r.default)(this,P)||this.isEditorOpened())return;this.setCopyableText(),(0,i.default)(this,P,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const o=(0,h.stringify)(t);if(e&&e.clipboardData){const s=(0,S._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",[_,s].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",o);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const o=(0,d.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(o&&/(<table)|(<TABLE)/g.test(o)){t=(0,S.htmlToGridSettings)(o,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,h.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[o,s,n,r]=this.populateValues(t);this.hot.selectCell(o,s,Math.min(this.hot.countRows()-1,n),Math.min(this.hot.countCols()-1,r)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}onAfterContextMenuDefaultOptions(e){e.items.push({name:"---------"},(0,g.default)(this)),(0,r.default)(this,M)&&e.items.push((0,m.default)(this)),(0,r.default)(this,O)&&e.items.push((0,p.default)(this)),(0,r.default)(this,I)&&e.items.push((0,f.default)(this)),e.items.push((0,C.default)(this))}onAfterOnCellMouseUp(){!this.hot.isListening()||this.isEditorOpened()||this.hot.getSettings().fragmentSelection||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}onAfterSelectionEnd(){this.isEditorOpened()||(this.getOrCreateFocusableElement(),this.hot.getSettings().fragmentSelection&&this.focusableElement.getFocusableElement()!==this.hot.rootDocument.activeElement&&(0,u.getSelectionText)()||(this.setCopyableText(),this.focusableElement.focus()))}onBeforeKeyDown(){if(!this.hot.isListening()||this.isEditorOpened())return;const e=this.hot.rootDocument.activeElement,t=this.hot.getActiveEditor();!t||e!==this.focusableElement.getFocusableElement()&&e!==t.select||(this.getOrCreateFocusableElement(),this.focusableElement.focus())}destroy(){this.focusableElement&&((0,y.destroyElement)(this.focusableElement),this.focusableElement=null),super.destroy()}}function L(e){const{rows:t}=(0,v.normalizeRanges)(e);let o=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)o+=1;return{columnHeadersCount:o}}t.CopyPaste=D},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(243)},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(243),n=o(130)},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(243),n=o(130)},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,n.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(243),n=o(130)},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(485));t.default=class{constructor(){this.clipboardData=new n.default}}},(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.createElement=function(e){const t=new h(e);let o=c.get(e);return o=isNaN(o)?0:o,c.set(e,o+1),t},t.deactivateElement=d,t.destroyElement=function(e){if(!(e instanceof h))return;let t=c.get(e.container);t=isNaN(t)?0:t,t>0&&(t-=1);if(d(e),t<=0){t=0;const o=f.get(e.container);o&&o.parentNode&&(o.parentNode.removeChild(o),f.delete(e.container)),e.mainElement=null}c.set(e.container,t)};var n=s(o(126)),r=s(o(199)),i=o(116),l=o(115),a=o(107);class h{constructor(e){this.rootDocument=e.defaultView?e:e.ownerDocument,this.mainElement=null,this.eventManager=new n.default(this),this.listenersCount=new WeakSet,this.container=e}useSecondaryElement(){const e=function(e){const t=f.get(e);if(t)return t.parentElement||e.appendChild(t),t;const o=(e.defaultView?e:e.ownerDocument).createElement("textarea");return f.set(e,o),o.setAttribute("data-hot-input",""),o.className="HandsontableCopyPaste",o.tabIndex=-1,o.autocomplete="off",o.wrap="hard",o.value=" ",e.appendChild(o),o}(this.container);this.listenersCount.has(e)||(this.listenersCount.add(e),g(this.eventManager,e,this)),this.mainElement=e}setFocusableElement(e){this.listenersCount.has(e)||(this.listenersCount.add(e),g(this.eventManager,e,this)),this.mainElement=e}getFocusableElement(){return this.mainElement}focus(){this.mainElement.value=" ",(0,l.isMobileBrowser)()||(0,a.selectElementIfAllowed)(this.mainElement)}}(0,i.mixin)(h,r.default);const c=new WeakMap;function d(e){e.eventManager.clear()}const u=(e,t)=>o=>t.runLocalHooks(e,o);function g(e,t,o){e.addEventListener(t,"copy",u("copy",o)),e.addEventListener(t,"cut",u("cut",o)),e.addEventListener(t,"paste",u("paste",o))}const f=new WeakMap},(e,t,o)=>{"use strict";o(78);var s=o(1);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],o=[];return(0,i.arrayEach)(e,(e=>{const s=Math.min(e.startRow,e.endRow),n=Math.max(e.startRow,e.endRow);(0,l.rangeEach)(s,n,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),i=Math.max(e.startCol,e.endCol);(0,l.rangeEach)(r,i,(e=>{-1===o.indexOf(e)&&o.push(e)}))})),{rows:t,columns:o}},o(8);var n=s(o(140)),r=s(o(143)),i=o(113),l=o(130);function a(e,t){c(e,t),t.add(e)}function h(e,t,o){c(e,t),t.set(e,o)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var u=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,C=new WeakMap,w=new WeakSet,y=new WeakSet;function v(e,t){return Math.min(t,Math.max(e+(0,n.default)(this,m).call(this)-1,e))}function S(e,t){return Math.min(t,Math.max(e+(0,n.default)(this,p).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:o,rowsLimit:s,columnsLimit:n,countColumnHeaders:i}=e;a(this,y),a(this,w),h(this,u,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:void 0}),h(this,p,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:void 0}),h(this,C,{writable:!0,value:void 0}),(0,r.default)(this,g,t),(0,r.default)(this,f,o),(0,r.default)(this,p,s),(0,r.default)(this,m,n),(0,r.default)(this,C,i)}setSelectedRange(e){(0,r.default)(this,u,e)}getCellsRange(){if(0===(0,n.default)(this,g).call(this)||0===(0,n.default)(this,f).call(this))return null;const{row:e,col:t}=(0,n.default)(this,u).getTopStartCorner(),{row:o,col:s}=(0,n.default)(this,u).getBottomEndCorner(),r=d(this,y,S).call(this,e,o),i=d(this,w,v).call(this,t,s);return{isRangeTrimmed:o!==r||s!==i,startRow:e,startCol:t,endRow:r,endCol:i}}getMostBottomColumnHeadersRange(){if(0===(0,n.default)(this,f).call(this)||0===(0,n.default)(this,C).call(this))return null;const{col:e}=(0,n.default)(this,u).getTopStartCorner(),{col:t}=(0,n.default)(this,u).getBottomEndCorner(),o=d(this,w,v).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===(0,n.default)(this,f).call(this)||0===(0,n.default)(this,C).call(this))return null;const{col:e}=(0,n.default)(this,u).getTopStartCorner(),{col:t}=(0,n.default)(this,u).getBottomEndCorner(),o=d(this,w,v).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-(0,n.default)(this,C).call(this),startCol:e,endRow:-1,endCol:o}}}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(490);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CustomBorders=s.CustomBorders},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8),o(78);var n=s(o(136)),r=o(413),i=o(116),l=o(130),a=o(113),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243)),c=o(491),d=o(493),u=o(244);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}const f="customBorders";t.PLUGIN_KEY=f;t.PLUGIN_PRIORITY=90;class p extends r.BasePlugin{constructor(){super(...arguments),(0,n.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return f}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[f]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>this.onAfterContextMenuDefaultOptions(e))),this.addHook("init",(()=>this.onAfterInit())),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],s=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),s=(0,d.normalizeBorder)(t));const n=(0,u.detectSelectionType)(e),r=(0,u.normalizeSelectionFactory)(n);(0,a.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,a.arrayEach)(o,(o=>{this.prepareBorderFromCustomAdded(e,t,s,(0,d.toInlinePropName)(o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,u.detectSelectionType)(e),o=(0,u.normalizeSelectionFactory)(t),s=[];return(0,a.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,a.arrayEach)(this.savedBorders,(o=>{o.row===e&&o.col===t&&s.push((0,d.denormalizeBorder)(o))}))}))})),s}clearBorders(e){e?this.setBorders(e):((0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const o=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,o,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:o})}prepareBorderFromCustomAdded(e,t,o,s){const n=this.hot.countRows(),r=this.hot.countCols();if(e>=n||t>=r)return;let i=(0,d.createEmptyBorders)(e,t);o&&(i=(0,d.extendDefaultBorder)(i,o),(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(i.id===e.settings.id)return Object.assign(e.settings,o),i.id=e.settings.id,i.top=e.settings.top,i.bottom=e.settings.bottom,i.start=e.settings.start,i.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(i)),this.insertBorderIntoSettings(i,s)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),s=Math.min(e.to.col,this.hot.countCols()-1);(0,l.rangeEach)(e.from.row,o,(o=>{(0,l.rangeEach)(e.from.col,s,(s=>{const n=(0,d.createEmptyBorders)(o,s);let r=0;o===e.from.row&&(0,i.hasOwnProperty)(t,"top")&&(r+=1,n.top=t.top),o===e.to.row&&(0,i.hasOwnProperty)(t,"bottom")&&(r+=1,n.bottom=t.bottom),s===e.from.col&&(0,i.hasOwnProperty)(t,"start")&&(r+=1,n.start=t.start),s===e.to.col&&(0,i.hasOwnProperty)(t,"end")&&(r+=1,n.end=t.end),r>0&&(this.hot.setCellMeta(o,s,"borders",(0,d.denormalizeBorder)(n)),this.insertBorderIntoSettings(n))}))}))}removeAllBorders(e,t){const o=(0,d.createId)(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,s){let n=this.hot.getCellMeta(e,t).borders;if(n=n&&void 0!==n.border?(0,d.normalizeBorder)(n):(0,d.createEmptyBorders)(e,t),s){n[o]=(0,d.createSingleEmptyBorder)();if(4===this.countHide(n))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(n))}}else{n[o]=(0,d.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(n,o,s)||this.insertBorderIntoSettings(n),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(n))}}prepareBorder(e,t,o){(0,a.arrayEach)(e,(e=>{let{start:s,end:n}=e;if(s.row===n.row&&s.col===n.col)"noBorders"===t?this.removeAllBorders(s.row,s.col):this.setBorder(s.row,s.col,t,o);else switch(t){case"noBorders":(0,l.rangeEach)(s.col,n.col,(e=>{(0,l.rangeEach)(s.row,n.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(s.row,e,t,o)}));break;case"bottom":(0,l.rangeEach)(s.col,n.col,(e=>{this.setBorder(n.row,e,t,o)}));break;case"start":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,s.col,t,o)}));break;case"end":(0,l.rangeEach)(s.row,n.row,(e=>{this.setBorder(e,n.col,t,o)}))}}))}createCustomBorders(e){(0,a.arrayEach)(e,(e=>{const t=(0,d.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:o,start:s,end:n}=e,r=[t,o,s,n];return(0,a.arrayReduce)(r,((e,t)=>{let o=e;return t&&t.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(e){const t=(0,a.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,a.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,a.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,a.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,a.arrayEach)(this.savedBorders,((o,s)=>{if(e.id===o.id)return this.savedBorders[s]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,o){let s=!1;return(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(n);return(0,a.arrayEach)(e,(e=>{e.toggleHiddenClass(t,o)})),s=!0,!1}})),s}checkCustomSelections(e,t,o){const s=this.countHide(e);let n=!1;return 4===s?(this.removeAllBorders(e.row,e.col),n=!0):(0,a.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){if(s.visualCellRange=t,s.commit(),o){const t=this.hot.view._wt.selectionManager.getBorderInstances(s);(0,a.arrayEach)(t,(t=>{t.changeBorderStyle(o,e)}))}return n=!0,!1}})),n}changeBorderSettings(){const e=this.hot.getSettings()[f];if(Array.isArray(e)){const t=(0,i.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,d.hasLeftRightTypeOptions)(e),o=(0,d.hasStartEndTypeOptions)(e);if(t&&o)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}onAfterContextMenuDefaultOptions(e){this.hot.getSettings()[f]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,c.top)(this),(0,c.right)(this),(0,c.bottom)(this),(0,c.left)(this),(0,c.noBorders)(this)]}})}onAfterInit(){this.changeBorderSettings()}destroy(){super.destroy()}}t.CustomBorders=p},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=s(o(492));t.bottom=n.default;var r=s(o(494));t.left=r.default;var i=s(o(495));t.noBorders=i.default;var l=s(o(496));t.right=l.default;var a=s(o(497));t.top=a.default},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,n.checkSelectionBorders)(this,"bottom")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"bottom");e.prepareBorder(o,"bottom",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(493);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let o=!1;return(0,r.arrayEach)(e.getSelectedRange(),(n=>{n.forAll(((n,r)=>{if(n<0||r<0)return;const i=e.getCellMeta(n,r).borders;if(i){if(!t)return o=!0,!1;if(!(0,s.hasOwnProperty)(i[t],"hide")||!1===i[t].hide)return o=!0,!1}}))})),o},t.createDefaultCustomBorder=l,t.createDefaultHtBorder=h,t.createEmptyBorders=function(e,t){return{id:i(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=i,t.createSingleEmptyBorder=a,t.denormalizeBorder=function(e){(0,n.isDefined)(e.start)&&(e.left=e.start);(0,n.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,s.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,s.hasOwnProperty)(t,"top")&&(0,n.isDefined)(t.top)&&(t.top?((0,s.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,s.hasOwnProperty)(t,"bottom")&&(0,n.isDefined)(t.bottom)&&(t.bottom?((0,s.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,s.hasOwnProperty)(t,"start")&&(0,n.isDefined)(t.start)&&(t.start?((0,s.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,s.hasOwnProperty)(t,"end")&&(0,n.isDefined)(t.end)&&(t.end?((0,s.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.left)||(0,n.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,n.isDefined)(e.start)||(0,n.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,o;((0,n.isDefined)(e.start)||(0,n.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,n.isDefined)(e.end)||(0,n.isDefined)(e.right))&&(e.end=null!==(o=e.end)&&void 0!==o?o:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=c.get(e))&&void 0!==t?t:e};var s=o(116),n=o(110),r=o(113);function i(e,t){return`border_row${e}col${t}`}function l(){return{width:1,color:"#000"}}function a(){return{hide:!0}}function h(){return{width:1,color:"#000",cornerVisible:!1}}const c=new Map([["left","start"],["right","end"]])},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const r=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(493);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,o){e.prepareBorder(o,"noBorders")},disabled(){return!(0,n.checkSelectionBorders)(this)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(493);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,n.checkSelectionBorders)(this,t)&&(e=(0,n.markSelected)(e)),e},callback(o,s){const r=(0,n.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(493);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,n.checkSelectionBorders)(this,"top")&&(e=(0,n.markSelected)(e)),e},callback(t,o){const s=(0,n.checkSelectionBorders)(this,"top");e.prepareBorder(o,"top",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=n?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(s,i,l):s[i]=e[i]}s.default=e,o&&o.set(e,s);return s}(o(243)),n=o(493);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(499);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DragToScroll=s.DragToScroll},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(413),r=s(o(126)),i=o(121),l=o(107);const a="dragToScroll";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=100;class h extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 100}constructor(e){super(e),this.eventManager=new r.default(this),this.boundaries=null,this.callback=null,this.listening=!1}isEnabled(){return!!this.hot.getSettings()[a]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>this.setupListening(e))),this.addHook("afterOnCellCornerMouseDown",(e=>this.setupListening(e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(e){this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,s=0;t<this.boundaries.top?s=t-this.boundaries.top:t>this.boundaries.bottom&&(s=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,s)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,l.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}setupListening(e){if((0,i.isRightClick)(e))return;const t=this.hot.view._wt.wtTable.holder;t!==this.hot.rootWindow&&(this.setBoundaries(t.getBoundingClientRect()),this.setCallback(((e,o)=>{e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),o<0?t.scrollTop-=20:o>0&&(t.scrollTop+=20)})),this.listen())}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}t.DragToScroll=h},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(501);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DropdownMenu=s.DropdownMenu},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(413),r=o(113),i=o(116),l=s(o(470)),a=o(451),h=s(o(126)),c=o(107),d=s(o(473)),u=s(o(474)),g=s(o(123)),f=o(449);o(502),g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const p="dropdownMenu";t.PLUGIN_KEY=p;t.PLUGIN_PRIORITY=230;const m="changeType",C=p;class w extends n.BasePlugin{static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_COLUMN,f.SEPARATOR,f.CLEAR_COLUMN,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){super(e),this.eventManager=new h.default(this),this.commandExecutor=new l.default(this.hot),this.itemsFactory=null,this.menu=null,this.hot.addHook("afterGetColHeader",((e,t)=>this.onAfterGetColHeader(e,t)))}isEnabled(){return this.hot.getSettings()[p]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new d.default(this.hot,w.DEFAULT_ITEMS);const t=this.hot.getSettings()[p],o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const s=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new u.default(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",s),this.menu.setMenuItems(s),this.menu.addLocalHook("beforeOpen",(()=>this.onMenuBeforeOpen())),this.menu.addLocalHook("afterOpen",(()=>this.onMenuAfterOpen())),this.menu.addLocalHook("afterClose",(()=>this.onMenuAfterClose())),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),(0,r.arrayEach)(s,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),o=(0,a.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),s=this.hot.getCell(-1,t.col,!0),n=s.getBoundingClientRect();this.open({left:n.left+o.left,top:n.top+s.offsetHeight+o.top},{left:n.width}),this.hot._registerTimeout((()=>{this.menu.selectFirstCell()}))}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Shift","Enter"]],callback:e,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader())&&!this.menu.isOpened()},group:C},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!this.menu.isOpened()},group:C}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(C)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>this.onTableClick(e)))}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,i.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}onTableClick(e){if(e.stopPropagation(),(0,c.hasClass)(e.target,m)){const t=(0,a.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),o=e.target.getBoundingClientRect();this.open({left:o.left+t.left,top:o.top+e.target.offsetHeight+3+t.top},{left:o.width})}}onAfterGetColHeader(e,t){const o=t.parentNode;if(!o)return;const s=o.parentNode.childNodes,n=Array.prototype.indexOf.call(s,o);if(e<0||n!==s.length-1)return;const r=t.querySelector(`.${m}`);if(this.enabled&&r)return;if(!this.enabled)return void(r&&r.parentNode.removeChild(r));const i=this.hot.rootDocument.createElement("button");i.className=m,i.type="button",i.tabIndex=-1,i.onclick=function(){return!1},t.firstChild.insertBefore(i,t.firstChild.firstChild)}onMenuBeforeOpen(){this.hot.runHooks("beforeDropdownMenuShow",this)}onMenuAfterOpen(){this.hot.runHooks("afterDropdownMenuShow",this)}onMenuAfterClose(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}t.DropdownMenu=w,w.SEPARATOR={name:f.SEPARATOR}},(e,t,o)=>{"use strict";o.r(t)},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(504);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ExportFile=s.ExportFile},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(78);var n=o(413),r=s(o(505)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=l(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(506));function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(l=function(e){return e?o:t})(e)}const a="exportFile";t.PLUGIN_KEY=a;t.PLUGIN_PRIORITY=240;class h extends n.BasePlugin{static get PLUGIN_KEY(){return a}static get PLUGIN_PRIORITY(){return 240}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:s}=this.hot,n=this._createTypeFormatter(e,t),r=this._createBlob(n),i=s.URL||s.webkitURL,l=o.createElement("a"),a=`${n.options.filename}.${n.options.fileExtension}`;if(void 0!==l.download){const e=i.createObjectURL(r);l.style.display="none",l.setAttribute("href",e),l.setAttribute("download",a),o.body.appendChild(l),l.dispatchEvent(new MouseEvent("click")),o.body.removeChild(l),setTimeout((()=>{i.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,a)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!i.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,i.default)(e,new r.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=h},(e,t,o)=>{"use strict";t.__esModule=!0,o(8);var s=o(130);var n=class{constructor(e){this.hot=e,this.options={}}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:o,endCol:n}=this._getDataRange(),r=this.options,i=[];return(0,s.rangeEach)(e,o,(e=>{const o=[];!r.exportHiddenRows&&this._isHiddenRow(e)||((0,s.rangeEach)(t,n,(t=>{!r.exportHiddenColumns&&this._isHiddenColumn(t)||o.push(this.hot.getDataAtCell(e,t))})),i.push(o))})),i}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),n=this.hot.getRowHeader();(0,s.rangeEach)(t,o,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(n[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:o}=this._getDataRange(),n=this.hot.getColHeader();(0,s.rangeEach)(t,o,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(n[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,s=0,n=t,r=e]=this.options.range;return o=Math.max(o,0),s=Math.max(s,0),n=Math.min(n,t),r=Math.min(r,e),{startRow:o,startCol:s,endRow:n,endCol:r}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}};t.default=n},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,t.default=function(e,t,o){if("function"==typeof r[e])return new r[e](t,o);return null};var n=s(o(507));t.TYPE_CSV="csv";t.TYPE_EXCEL="excel";t.TYPE_PDF="pdf";const r={csv:n.default};t.EXPORT_TYPES=r},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0;var n=o(113),r=o(110),i=s(o(508));const l=String.fromCharCode(13),a=String.fromCharCode(34),h=String.fromCharCode(10);class c extends i.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const s=o.length>0,r=this.dataProvider.getRowHeaders(),i=r.length>0;let l=e.bom?String.fromCharCode(65279):"";return s&&(o=(0,n.arrayMap)(o,(e=>this._escapeCell(e,!0))),i&&(l+=e.columnDelimiter),l+=o.join(e.columnDelimiter),l+=e.rowDelimiter),(0,n.arrayEach)(t,((t,o)=>{o>0&&(l+=e.rowDelimiter),i&&(l+=this._escapeCell(r[o])+e.columnDelimiter),l+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),l}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,r.stringify)(e);return""!==o&&(t||o.indexOf(l)>=0||o.indexOf(a)>=0||o.indexOf(h)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`),o}}var d=c;t.default=d},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(116),n=o(108);class r{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,s.clone)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=(0,s.extend)((0,s.clone)(r.DEFAULT_OPTIONS),t),t=(0,s.extend)(t,e),t.filename=(0,n.substitute)(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}}var i=r;t.default=i},(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(510);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},(e,t,o)=>{"use strict";var s=o(1);t.__esModule=!0,o(8);var n=o(413),r=o(113),i=o(112),l=o(124),a=o(130),h=s(o(126)),c=o(107),d=o(449),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=R(t);if(o&&o.has(e))return o.get(e);var s={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var i=n?Object.getOwnPropertyDescriptor(e,r):null;i&&(i.get||i.set)?Object.defineProperty(s,r,i):s[r]=e[r]}s.default=e,o&&o.set(e,s);return s}(o(243)),g=s(o(511)),f=s(o(546)),p=s(o(548)),m=s(o(551)),C=s(o(552)),w=s(o(553)),y=s(o(554)),v=o(536),S=o(513),E=o(219);function R(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(R=function(e){return e?o:t})(e)}o(555);const b="filters";t.PLUGIN_KEY=b;t.PLUGIN_PRIORITY=250;const T=b;class _ extends n.BasePlugin{static get PLUGIN_KEY(){return b}static get PLUGIN_PRIORITY(){return 250}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),this.eventManager=new h.default(this),this.dropdownMenuPlugin=null,this.conditionCollection=null,this.conditionUpdateObserver=null,this.components=new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]]),this.filtersRowsMap=null,this.hot.addHook("afterGetColHeader",((e,t)=>this.onAfterGetColHeader(e,t)))}isEnabled(){return!!this.hot.getSettings()[b]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new E.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>this.onActionBarSubmit("accept"))),e.addLocalHook("cancel",(()=>this.onActionBarSubmit("cancel"))),e.addLocalHook("change",(t=>this.onComponentChange(e,t))),e),s=()=>`${this.hot.getTranslatedPhrase(u.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,n=()=>`${this.hot.getTranslatedPhrase(u.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new g.default(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>this.onSelectUIClosed())),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new f.default(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new g.default(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>this.onSelectUIClosed())),this.components.set("filter_by_condition2",o(e))}this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new p.default(this.hot,{id:"filter_by_value",name:n}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new m.default(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new C.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new y.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>this.updateComponents(e)))),this.components.forEach((e=>e.show())),this.addHook("beforeDropdownMenuSetItems",(e=>this.onBeforeDropdownMenuSetItems(e))),this.addHook("afterDropdownMenuDefaultOptions",(e=>this.onAfterDropdownMenuDefaultOptions(e))),this.addHook("afterDropdownMenuShow",(()=>this.onAfterDropdownMenuShow())),this.addHook("afterDropdownMenuHide",(()=>this.onAfterDropdownMenuHide())),this.addHook("afterChange",(e=>this.onAfterChange(e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{this.clearConditions(),this.filter()},group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:S.OPERATION_AND;const n=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(n,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const e=this._createDataFilter(),t=!this.conditionCollection.isEmpty();let o=[];const s=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",s))if(t){const t=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),o=(0,r.arrayMap)(e.filter(),(e=>e.meta.visualRow));const s=(0,v.createArrayAssertion)(o);(0,a.rangeEach)(this.hot.countSourceRows()-1,(e=>{s(e)||t.push(e)})),(0,r.arrayEach)(t,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),o.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",s),this.hot.view.adjustElementsSize(!0),this.hot.render()}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,r.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var n;const{row:r,col:i,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:d,locale:u}=this.hot.getCellMeta(s,t),g=null!==(n=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==n?n:e;o.push({meta:{row:r,col:i,visualCol:l,visualRow:a,type:h,instance:c,dateFormat:d,locale:u},value:(0,v.toEmptyString)(g)})})),o}onAfterChange(e){e&&(0,r.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,v.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}onAfterDropdownMenuShow(){this.restoreComponents(Array.from(this.components.values()))}onAfterDropdownMenuHide(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}onBeforeDropdownMenuSetItems(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.menu.addLocalHook("afterOpen",(()=>{this.dropdownMenuPlugin.menu.hotMenu.updateSettings({hiddenRows:!0})}))}onAfterDropdownMenuDefaultOptions(e){e.items.push({name:d.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}getOperationBasedOnArguments(e,t,o,s){let n=e;return n===S.OPERATION_OR&&t.command.key!==S.CONDITION_NONE&&o.command.key!==S.CONDITION_NONE&&s.command.key!==S.CONDITION_NONE?n=S.OPERATION_OR_THEN_VARIABLE:s.command.key!==S.CONDITION_NONE&&(t.command.key!==S.CONDITION_NONE&&o.command.key!==S.CONDITION_NONE||(n=S.OPERATION_AND)),n}onActionBarSubmit(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),n=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),i=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,n,r);this.conditionUpdateObserver.groupChanges();let l=this.conditionCollection.getColumnStackPosition(t);-1===l&&(l=void 0),this.conditionCollection.removeConditions(t),s.command.key!==S.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,i,l),n.command.key!==S.CONDITION_NONE&&this.conditionCollection.addCondition(t,n,i,l)),r.command.key!==S.CONDITION_NONE&&this.conditionCollection.addCondition(t,r,i,l),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter(),this.hot.selectCell(0,e.visualIndex)}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}onComponentChange(e,t){this.updateDependentComponentsVisibility(),e.constructor!==g.default||t.inputsCount||this.setListeningDropdownMenu()}onSelectUIClosed(){this.setListeningDropdownMenu()}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}onAfterGetColHeader(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,c.addClass)(t,"htFiltersActive"):(0,c.removeClass)(t,"htFiltersActive")}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new w.default(e,(e=>this.getDataMapAtColumn(e)))}updateComponents(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,n=o.filter((e=>e.name===S.CONDITION_BY_VALUE)),r=o.filter((e=>e.name!==S.CONDITION_BY_VALUE));if(n.length>=2||r.length>=3)(0,l.warn)(i.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20