handsontable 14.0.0-next-07c0a60-20231107 → 14.0.0-next-c080457-20231107

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,11 +25,11 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 14.0.0-next-07c0a60-20231107
29
- * Release date: 15/11/2023 (built at 07/11/2023 09:28:16)
28
+ * Version: 14.0.0-next-c080457-20231107
29
+ * Release date: 15/11/2023 (built at 07/11/2023 12:05:49)
30
30
  */
31
31
  !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={2964:()=>{},54894:(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/},29270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54894);t.parse=s.parse,t.stringify=s.stringify},13698:(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=d(e).fontSize,n.style.fontFamily=d(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 d(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}}},95881:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13698);t.autoResize=s.autoResize},17137:(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1,t.FULLY_VISIBLE_TYPE=2,t.PARTIALLY_VISIBLE_TYPE=3},46003:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},r=s(o(65658));t.ViewportColumnsCalculator=r.default;var i=s(o(36107));t.ViewportRowsCalculator=i.default;var l=o(17137);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]))}))},65658:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517),o(51344);var s=o(17137);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,d=a.overrideFn,c=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=c+f-p,C=h===s.FULLY_VISIBLE_TYPE?0:l,w=h===s.FULLY_VISIBLE_TYPE?i:0;if(m<-1*a.inlineStartOffset||c>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&&d&&d(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}}t.default=r},36107:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517),o(51344);var s=o(17137);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,d=e.viewportHeight,c=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+d-c&&(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+d-c){g=!1;break}const w=l+d-c,E=t===s.FULLY_VISIBLE_TYPE?m:0,S=t===s.FULLY_VISIBLE_TYPE?0:C;if(w<E||l>f.at(-1)+S?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<=d-c||t!==s.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),e>=d-c)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)}}t.default=r},82325:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=s(o(42538)),i=s(o(48427));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}isRtl(){return(0,r.default)(this,a)}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}assign(e){return Number.isInteger(null==e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof h&&(0,i.default)(this,a,e.isRtl()),this}clone(){return new h(this.row,this.col,(0,r.default)(this,a))}toObject(){return{row:this.row,col:this.col}}}t.default=h},2961:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(93231)),r=s(o(42538)),i=s(o(48427)),l=s(o(82325));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 d{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),d=this._createCellCoords(i,l),c=this._createCellCoords(a,h);return this.from=d,this.to=c,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 d(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))}}t.default=d},25984:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(93231)),r=o(83302),i=o(18609),l=s(o(75244)),a=s(o(52188)),h=s(o(82325)),d=s(o(2961));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 d.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")}}}}},49755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=s(o(83154)),i=s(o(25984));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},59189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(83154)),r=s(o(87831)),i=s(o(64057)),l=s(o(94915)),a=s(o(57293)),h=s(o(25984)),d=o(86143),c=o(22232),u=o(83302);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 d.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,c.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},83154:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(85015),r=o(7374),i=o(37595),l=o(93315);const a=new WeakMap;t.default=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(!["TD","TH"].includes(o.nodeName)&&(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()}}},70559:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(59189)),r=s(o(25984));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},65946:(e,t)=>{"use strict";t.__esModule=!0;t.default=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))}}},22350:(e,t)=>{"use strict";t.__esModule=!0;t.default=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))}}},21280:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(65658));t.ViewportColumnsCalculator=n.default;var r=s(o(36107));t.ViewportRowsCalculator=r.default;var i=s(o(82325));t.CellCoords=i.default;var l=s(o(2961));t.CellRange=l.default;var a=s(o(70559));t.default=a.default,t.Core=a.default;var h=o(88361);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 d=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={__proto__:null},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}(o(96649));t.Renderer=d;var c=o(1909);t.OrderView=c.OrderView,t.SharedOrderView=c.SharedOrderView;var u=o(75244);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},75391:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=o(83302),i=o(22232),l=o(50095),a=o(69173),h=o(3984),d=s(o(49755)),c=o(5386);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:d,holder:c,wtRootElement:u}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=a,this.hider=h,this.spreader=d,this.holder=c,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},d={start:this.getRelativeStartPosition(e),top:e.offsetTop};let c=null;return c=s?this.getRelativeCellPositionWithinWindow(r,n,d,h):this.getRelativeCellPositionWithinHolder(r,i,n,d,h),c}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,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,n=o.createElement("DIV"),i=o.createElement("TABLE"),l=e.wtRootElement.parentNode;n.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,n.setAttribute("dir",this.isRtl()?"rtl":"ltr"),n.style.position="absolute",n.style.top=0,n.style.overflow="visible",this.isRtl()?n.style.right=0:n.style.left=0,t.getSetting("ariaTags")&&(0,r.setAttribute)(n,[(0,c.A11Y_PRESENTATION)()]),i.className=e.TABLE.className;e.TABLE.getAttribute("role")&&i.setAttribute("role",e.TABLE.getAttribute("role")),n.appendChild(i),l.appendChild(n);const a=this.wtSettings.getSetting("preventOverflow");return!0===a||"horizontal"===a&&this.type===h.CLONE_TOP||"vertical"===a&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=s:"hidden"===s.getComputedStyle(l).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new d.default(i,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()}}},99260:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=o(83302),i=s(o(86363)),l=o(75391),a=o(3984);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},79720:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(58654)),i=o(75391),l=o(3984);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},3984:(e,t)=>{"use strict";t.__esModule=!0;const o=t.CLONE_TOP="top",s=t.CLONE_BOTTOM="bottom",n=t.CLONE_INLINE_START="inline_start",r=t.CLONE_TOP_INLINE_START_CORNER="top_inline_start_corner",i=t.CLONE_BOTTOM_INLINE_START_CORNER="bottom_inline_start_corner";t.CLONE_TYPES=[o,s,n,r,i],t.CLONE_CLASS_NAMES=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`]])},89381:(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},n=o(79720);t.BottomInlineStartCornerOverlay=n.BottomInlineStartCornerOverlay;var r=o(99260);t.BottomOverlay=r.BottomOverlay;var i=o(34170);t.InlineStartOverlay=i.InlineStartOverlay;var l=o(75391);t.Overlay=l.Overlay;var a=o(40387);t.TopInlineStartCornerOverlay=a.TopInlineStartCornerOverlay;var h=o(82148);t.TopOverlay=h.TopOverlay;var d=o(3984);Object.keys(d).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===d[e]||(t[e]=d[e]))}))},34170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=o(83302),r=s(o(32173)),i=o(75391),l=o(88361),a=o(3984);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},82148:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=o(83302),i=s(o(85043)),l=o(75391),a=o(88361),h=o(3984);class d 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=d},40387:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302),i=s(o(56754)),l=o(75391),a=o(3984);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},87831:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(93231)),r=o(83302),i=o(7374),l=o(50095),a=o(80151),h=o(37595),d=o(89381);t.default=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:d}=this.domBindings;this.instance=this.wot,this.eventManager=l,this.scrollbarSize=(0,r.getScrollbarWidth)(h);const c="hidden"===d.getComputedStyle(a.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=c?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=d.scrollX,this.lastScrollY=d.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 d.TopOverlay(...e),this.bottomOverlay=new d.BottomOverlay(...e),this.inlineStartOverlay=new d.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new d.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new d.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)}))}}},46593:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(94191));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(){}}},91767:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=o(1909),i=s(o(46593)),l=o(5386);class a 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 a=0;a<e;a++){const e=this.table.renderedRowToSource(a),h=o.getRenderedNode(a);this.sourceRowIndex=e;const d=this.obtainOrderView(h),c=s.obtainOrderView(h);d.prependView(c).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){d.render();const t=d.getCurrentNode(),s=this.table.renderedColumnToSource(o);var r,i;if((0,n.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),(0,n.removeAttribute)(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,s,t),this.table.isAriaEnabled())(0,n.setAttribute)(t,[...t.hasAttribute("role")?[]:[(0,l.A11Y_GRIDCELL)()],(0,l.A11Y_TABINDEX)(-1),(0,l.A11Y_COLINDEX)(s+(null!==(r=null===(i=this.table.rowUtils)||void 0===i||null===(i=i.dataAccessObject)||void 0===i?void 0:i.rowHeaders.length)&&void 0!==r?r:0)+1)])}d.end()}}}t.default=a},84888:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(46593)),r=o(83302);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},90802:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(46593)),i=o(5386);class l 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;this.table.isAriaEnabled()&&(0,n.setAttribute)(this.rootNode,[(0,i.A11Y_PRESENTATION)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,r=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,n.setAttribute)(r,[(0,i.A11Y_ROW)(),(0,i.A11Y_ROWINDEX)(t+1)]);for(let l=-1*s;l<o;l+=1){const o=this.table.renderedColumnToSource(l),a=r.childNodes[l+s];a.className="",a.removeAttribute("style"),(0,n.removeAttribute)(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,n.setAttribute)(a,[(0,i.A11Y_COLINDEX)(l+1+this.table.rowHeadersCount),(0,i.A11Y_TABINDEX)(-1),...l<0?[(0,i.A11Y_PRESENTATION)()]:[(0,i.A11Y_COLUMNHEADER)(),(0,i.A11Y_SCOPE_COL)()]]),e[t](o,a,t)}}}}t.default=l},96649:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(68384));t.RowHeadersRenderer=n.default;var r=s(o(90802));t.ColumnHeadersRenderer=r.default;var i=s(o(84888));t.ColGroupRenderer=i.default;var l=s(o(77267));t.RowsRenderer=l.default;var a=s(o(91767));t.CellsRenderer=a.default;var h=s(o(46538));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:d,columnUtils:c,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(d,c)}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()}}},68384:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(1909),r=s(o(46593)),i=o(83302),l=o(5386);class a 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),a=s.getRenderedNode(r);this.sourceRowIndex=e;const h=this.obtainOrderView(a),d=n.obtainOrderView(a);h.appendView(d).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){h.render();const o=h.getCurrentNode();o.className="",o.removeAttribute("style"),(0,i.removeAttribute)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,i.setAttribute)(o,[(0,l.A11Y_ROWHEADER)(),(0,l.A11Y_SCOPE_ROW)(),(0,l.A11Y_COLINDEX)(s+1),(0,l.A11Y_TABINDEX)(-1)]),t[s](e,o,s)}h.end()}}}t.default=a},77267:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(69173),r=o(28236),i=o(1909),l=s(o(46593)),a=o(83302),h=o(5386);let d=!1;class c 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;!d&&e>1e3&&(d=!0,(0,n.warn)(r.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\x20
32
- the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,a.setAttribute)(this.rootNode,[(0,h.A11Y_PRESENTATION)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),n=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,a.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(n+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=c},46538:(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)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}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":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302);t.default=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 d=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===r?d=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(d=h.scrollTo(e,l?e>i:t)),d&&(this.lastScrolledColumnPos=e),d}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:d}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let c=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===r?c=d.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(c=d.scrollTo(e,l?e>i:o)),c&&(this.lastScrolledRowPos=e),c}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),d=(0,r.innerHeight)(i),c=(0,r.getScrollTop)(i,i);if(a.top+h-d<=c){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<=c){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),d=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=d){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=d){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}}},67175:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(24449),r=o(22232),i=o(37595),l=o(97132);t.default=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:d}=this.selectionHandles.styles,c=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*c),C=Math.min(parseInt(s+n-g/4,10),f-g-2*c);h[i]=`${m}px`,d[i]=`${C}px`;const w=Math.min(parseInt(o+r,10),p-u-2*c),E=Math.min(parseInt(o+r-g/4,10),p-g-2*c);h.top=`${w}px`,d.top=`${E}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",d.display="none"):(h.display="block",d.display="block")):(l.display="none",h.display="none",a.display="none",d.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,d,c;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,d=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,c=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,E=(0,s.offset)(t.TABLE),S=(0,s.outerWidth)(t.TABLE),v=C.top,y=C.left,R=this.wot.wtSettings.getSetting("rtlMode");let _=0,b=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-E.left-S;b=y+e-w.left,_=n.innerWidth-y-e-t-1}else b=w.left+(0,s.outerWidth)(m)-y,_=y-E.left-1;if(this.isEntireColumnSelected(r,l)){const e=this.getDimensionsFromHeader("columns",a,h,d,E);let t=null;e&&([t,_,b]=e),t&&(f=t)}let T=v-E.top-1,M=w.top+(0,s.outerHeight)(m)-v;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",r,l,c,E);let t=null;e&&([t,T,M]=e),t&&(f=t)}const O=(0,s.getComputedStyle)(f,n);parseInt(O.borderTopWidth,10)>0&&(T+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(_+=1,b=b>0?b-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${_}px`,this.topStyle.width=`${b}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${_}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+M-A+"px",this.bottomStyle[I]=`${_}px`,this.bottomStyle.width=`${b}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=_+b-A+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let N=this.settings.border.cornerVisible;N="function"==typeof N?N(this.settings.layerLevel):N;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[H,x]=[l,h];if(P&&Array.isArray(P)&&([,,H,x]=P),(0,i.isMobileBrowser)()||!N||this.isPartRange(H,x))this.cornerStyle.display="none";else{this.cornerStyle.top=T+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=_+b+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+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(T+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(l,h,T,_,b,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,d=null,c=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)},d="ht__selection--rows",g="top";break;case"columns":a=function(){return i.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},d="ht__selection--columns",g="left"}if(l.classList.contains(d)){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&&(c=i[g]-r[g]-1,u=l[g]+h(p)-i[g]),[f,c,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)}}},97132:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},23009:(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"},88361:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},r=s(o(33468));t.Selection=r.default;var i=o(23009);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(97132);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(86143);t.SelectionManager=a.SelectionManager},86143:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(9815);var n=s(o(42538)),r=s(o(48427)),i=o(83302),l=o(7161),a=s(o(67175));function h(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=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,c)),t=(0,n.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=(0,n.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let r=[];Array.isArray(null===(t=(0,n.default)(this,u).options)||void 0===t?void 0:t.cellAttributes)&&(r=(0,n.default)(this,u).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=(0,n.default)(this,u).options)||void 0===o?void 0:o.headerAttributes)&&(r=[...r,...(0,n.default)(this,u).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,i.removeClass)(s[t],e),(0,i.removeAttribute)(s[t],r)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;d(t=this,o=C),o.add(t),h(this,c,{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,c,e),(0,n.default)(this,g).setActiveOverlay((0,n.default)(this,c)),(0,n.default)(this,f).has((0,n.default)(this,c))||(0,n.default)(this,f).set((0,n.default)(this,c),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,c)))return t.get((0,n.default)(this,c));const o=new a.default((0,n.default)(this,c),e.settings);return t.set((0,n.default)(this,c),o),o}const t=new a.default((0,n.default)(this,c),e.settings);return(0,n.default)(this,m).set(e,new Map([[(0,n.default)(this,c),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,c).getSetting("onBeforeDrawBorders",h,l),null==a||a.appear(h)}o.forEach(((e,t)=>{var o,s;const r=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();r.forEach((e=>(0,n.default)(this,f).get((0,n.default)(this,c)).add(e))),(0,i.addClass)(t,r),"TD"===t.nodeName&&Array.isArray(null===(o=(0,n.default)(this,u).options)||void 0===o?void 0:o.cellAttributes)?(0,i.setAttribute)(t,(0,n.default)(this,u).options.cellAttributes):"TH"===t.nodeName&&Array.isArray(null===(s=(0,n.default)(this,u).options)||void 0===s?void 0:s.headerAttributes)&&(0,i.setAttribute)(t,(0,n.default)(this,u).options.headerAttributes)}))}}},7161:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(83302);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 d=new WeakMap,c=new WeakMap,u=new WeakSet;function g(e){const{wtTable:t}=(0,n.default)(this,c),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,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,c,e),this}setActiveSelection(e){return(0,r.default)(this,d,e),this}scan(){const e=(0,n.default)(this,d).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,d).getCorners(),{wtTable:i}=(0,n.default)(this,c),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,c).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:(0,n.default)(this,d).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,d).getCorners(),{wtTable:i}=(0,n.default)(this,c),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,c).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:(0,n.default)(this,d).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,d).getCorners(),{wtTable:l}=(0,n.default)(this,c);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,c).createCellCoords(a,h)),o=(0,n.default)(this,c).getSetting("onAfterDrawSelection",a,h,(0,n.default)(this,d).settings.layerLevel);"string"==typeof o&&(0,i.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,n.default)(this,d).getCorners(),{wtTable:s}=(0,n.default)(this,c);h(this,u,g).call(this,((r,i)=>{if(r>=t&&r<=o){const t=s.getCell((0,n.default)(this,c).createCellCoords(r,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,n.default)(this,d).getCorners(),{wtTable:s}=(0,n.default)(this,c);h(this,u,g).call(this,((r,i)=>{if(i>=t&&i<=o){const t=s.getCell((0,n.default)(this,c).createCellCoords(r,i));e(t)}}))}}},33468:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=s(o(65718));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);t.default=i},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=o(83302),i=o(22232);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,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically: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,ariaTags:!0}}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]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var n=s(o(93231)),r=o(83302),i=o(85015),l=s(o(65946)),a=s(o(22350)),h=o(96649),d=s(o(35863)),c=s(o(72772)),u=o(89381),g=o(5386);t.default=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 c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new d.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",this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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"),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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"),d=h.length,c=t.getSetting("columnHeaders"),g=c.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),d&&!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,d);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,c),(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}}},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(92117)),l=o(22232),a=o(89381);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);t.default=h},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(37610)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(45460)),i=s(o(37610)),l=s(o(92117)),a=o(22232);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 h=e.offsetWidth,d=e.offsetHeight;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&&(d=0)}d=Math.min(d,a),i.height="auto"===s?"auto":`${d}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||d>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);t.default=h},92117:(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(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},37610:(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(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},6214:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},6271:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},15491:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(92117)),l=o(22232),a=o(89381);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);t.default=h},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},35863:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302);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)}}}}},94191:(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)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));t.OrderView=n.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));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},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(81787),r=s(o(96747));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(){}}},79193:(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}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(79193)),r=o(81787);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()}}},72772:(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}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(22232),r=o(46003);t.default=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(),d=r-(a?h.right-r:h.left);let c,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(d,r):Math.min(this.getContainerFillWidth(),d,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>c)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(c,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?c:Math.max(c,(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"),d=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),d&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(c-d,c),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}))}}},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var n=s(o(78900)),r=o(45433),i=o(3177),l=s(o(56307)),a=o(22489),h=o(65324),d=o(57924),c=o(48253),u=o(21280);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)(d.TextCellType),g.editors={BaseEditor:c.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="07/11/2023 09:28:16",g.version="14.0.0-next-07c0a60-20231107",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};t.default=g},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),n=o(16124),r=o(67156);const i=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:i,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator}},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),n=o(8877);const r=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:n.checkboxRenderer}},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),n=o(56522),r=o(82951);const i=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:i,editor:s.DateEditor,renderer:n.dateRenderer,validator:r.dateValidator}},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),n=o(16124),r=o(67156);const i=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:i,editor:s.DropdownEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator}},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),n=o(67981);const r=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:n.handsontableRenderer}},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(n.CheckboxCellType),(0,g.registerCellType)(r.DateCellType),(0,g.registerCellType)(i.DropdownCellType),(0,g.registerCellType)(l.HandsontableCellType),(0,g.registerCellType)(a.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(d.SelectCellType),(0,g.registerCellType)(c.TextCellType),(0,g.registerCellType)(u.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(42855);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var i=o(65867);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var l=o(243);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(68683);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var d=o(12256);t.SelectCellType=d.SelectCellType,t.SELECT_TYPE=d.CELL_TYPE;var c=o(57924);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var u=o(8228);t.TimeCellType=u.TimeCellType,t.TIME_TYPE=u.CELL_TYPE;var g=o(65324);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),n=o(78416),r=o(71);const i=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:i,editor:s.NumericEditor,renderer:n.numericRenderer,validator:r.numericValidator,dataType:"number"}},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),n=o(76978);const r=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:r,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1}},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!d(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(91683);var n=s(o(63800)),r=o(83605),i=o(7462),l=o(80239);const{register:a,getItem:h,hasItem:d,getNames:c,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=c,t.hasCellType=d},12256:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2145);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},2145:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93333),n=o(73619);const r=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:r,editor:s.SelectEditor,renderer:n.selectRenderer}},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(50695);const r=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:r,editor:s.TextEditor,renderer:n.textRenderer}},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),n=o(43853),r=o(85342);const i=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:i,editor:s.TimeEditor,renderer:n.timeRenderer,validator:r.timeValidator}},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o,s=this;let k=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=!1,V=this;const W=new h.default(V);let B,U,Y,j,G,z=!0;(0,_.hasValidParameter)(k)&&(0,_.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const K=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",$=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",$),this.isRtl=function(){return"rtl"===$},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new A.MetaManager(V,t,[A.DynamicCellMetaMod,A.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,_.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,w.randomString)()}`,L.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterRowSequenceChange",e)})),U=new v.default(V),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:V.rowIndexMapper,columnIndexMapper:V.columnIndexMapper,countCols:()=>V.countCols(),countRows:()=>V.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!V.getActiveEditor()&&V.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>V.getShortcutManager(),createCellCoords:(e,t)=>V._createCellCoords(e,t),createCellRange:(e,t,o)=>V._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?V.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?V.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>V.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,O.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(V.runHooks("beforeLanguageChange",t),Q.language=t,V.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?V.rootElement:V.table;if(z)(0,n.addClass)(o,t);else{let s=[],r=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,u.stringToArray)(Q[e])),t&&(r=Array.isArray(t)?t:(0,u.stringToArray)(t));const i=(0,u.getDifferenceOfArrays)(s,r),l=(0,u.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}Q[e]=t}function se(){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 ne(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function re(e,t,o){if(!e.length)return;const s=V.getActiveEditor(),r=new se;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=B.propToCol(l),d=V.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,E.isNumericLike)(a)&&(e[o][3]=ne(a)),V.getCellValidator(d)&&(r.addValidatorToQueue(),V.validateCell(e[o][3],d,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=V.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,q.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function ie(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(q.allowInsertRow)for(;e[o][0]>V.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===V.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[o][1])>V.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||B.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}V.forceFullRender=!0,Y.adjustRowsAndCols(),V.runHooks("beforeChangeRender",e,t),j.lockEditor(),V._refreshBorders(null),j.unlockEditor(),V.view.adjustElementsSize(),V.runHooks("afterChange",e,t||"edit");const s=V.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function le(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ae(e,t){const o=V.getActiveEditor(),s=V.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",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.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,V.colToProp(s.col),r.row,V.colToProp(r.col),t,i);let l=!0;F&&(l=!1),t.isTouched()&&(l=!t.value);const a=this.selection.selectedRange.current(),h=this.selection.isSelectedByAnyHeader(),c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();if(!1!==l)if(h)c?this.scrollViewportTo({row:e.row}):u&&this.scrollViewportTo({col:e.col});else if(a&&!this.selection.isMultiple()){const{row:e,col:t}=a.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((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,V.colToProp(o.col),s.row,V.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),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("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).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)})).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)})).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)})).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)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={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,u.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=V.countSourceRows();if(q.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:d,startPhysicalIndex:c}=B.createRow(t,n,{source:r,mode:h});if(d){const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=V.toVisualRow(c);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;Z.isSelectedByRowHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(V._createCellCoords(o+d,r),!0),Z.setRangeEnd(V._createCellCoords(s+d,n))}else V._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?V.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=B.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[V.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=V.toVisualColumn(p);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;Z.isSelectedByColumnHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(V._createCellCoords(r,o+f),!0),Z.setRangeEnd(V._createCellCoords(s,n+f))}else V._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,u.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?V.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeRow(o,s,r))return;const l=V.countRows(),a=q.fixedRowsTop;a>=n+1&&(q.fixedRowsTop-=Math.min(s,a-n));const h=q.fixedRowsBottom;h&&n>=l-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),Y.adjustRowsAndCols(),V._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,u.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?V.countCols()-1:Math.max(o-t,0);let l=V.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeCol(o,s,r))return;const a=q.fixedColumnsStart;a>=n+1&&(q.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(q.colHeaders)&&(void 0===l&&(l=-1),q.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),Y.adjustRowsAndCols(),V._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(0===V.countRows()&&0===V.countCols()&&Z.deselect(),e){const t=V.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=V.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-V.countSourceRows());B.createRow(V.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=V.countEmptyCols(!0));let t=V.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,B.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===V.dataType&&e<s){t=V.countCols();const o=s-e,n=Math.min(o,q.maxCols-t);B.createCol(t,n,{source:"auto"})}}if(Z.isSelected()){const e=V.countRows(),t=V.countCols();(0,u.arrayEach)(Z.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&&V.selectCell(n,r,i,l)}))}V.view&&V.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],c={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,u.pivot)(t),w=n.length,E=Math.max(w,m),S=V.getData().slice(f),v=(0,u.pivot)(S).slice(p,p+E);for(l=0;l<E;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<v.length?g.push(n[l].concat(v[l])):g.push(n[l].concat(new Array(S.length).fill(null)))}else g.push(n[l%w].concat(v[l]));V.populateFromArray(f,p,(0,u.pivot)(g));break;case"shift_right":const y=t.length,R=Math.max(y,C),_=V.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<y){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<_.length)for(let e=0;e<_[r].length;e+=1)t[r].push(_[r][e]);else t[r].push(...new Array(_[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(_[r]));V.populateFromArray(f,p,t);break;default:c.row=e.row,c.col=e.col;let b,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},A=t.length,N=o?o.row-e.row+1:0;for(i=o?N:Math.max(A,N),r=0;r<i&&!(o&&c.row>o.row&&N>A||!q.allowInsertRow&&c.row>V.countRows()-1||c.row>=q.maxRows);r++){const t=r-T,n=I(t).length,u=o?o.col-e.col+1:0;if(a=o?u:Math.max(n,u),c.col=e.col,b=V.getCellMeta(c.row,c.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!b.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&c.col>o.col&&u>n||!q.allowInsertColumn&&c.col>V.countCols()-1||c.col>=q.maxCols);l++){if(b=V.getCellMeta(c.row,c.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&b.skipColumnOnPaste){M+=1,c.col+=1,a+=1;continue}if(b.readOnly&&"UndoRedo.undo"!==s){c.col+=1;continue}let e=I(t,l-M),o=V.getDataAtCell(c.row,c.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,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([c.row,c.col,e]),O=!0,c.col+=1}c.row+=1}else T+=1,c.row+=1,i+=1}V.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){U.setData(q.data),V.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(V.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new S.default(this),j=a.default.getInstance(V,q,Z),G=new c.FocusManager(V),(0,_.isRootInstance)(this)&&(0,N.installFocusCatcher)(V),V.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===V.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(V.rootElement,(()=>{V.view._wt.wtOverlays.updateLastSpreaderSize(),V.render(),V.view.adjustElementsSize()})),"object"==typeof z&&(V.runHooks("afterChange",z[0],z[1]),z=!1),V.runHooks("afterInit")},this._createCellCoords=function(e,t){return V.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return V.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=V.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=V.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=V.rowIndexMapper.getRenderableFromVisualIndex(n),t=V.columnIndexMapper.getRenderableFromVisualIndex(s);V.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=V.runHooks("beforeValidate",e,t.visualRow,t.prop,s),V._registerImmediate((()=>{n.call(t,e,(o=>{V&&(o=V.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),V.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):V._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=le(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]:B.colToProp(n[i][1]),r.push([n[i][0],a,U.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ae(r,s);V.runHooks("afterSetDataAtCell",d,h),re(d,h,(()=>{ie(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=le(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],U.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ae(r,s);V.runHooks("afterSetDataAtRowProp",h,a),re(h,a,(()=>{ie(h,a)}))},this.listen=function(){V&&!V.isListening()&&(L.forEach((e=>{V!==e&&e.unlisten()})),D=V.guid,V.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,V.runHooks("afterUnlisten"))},this.isListening=function(){return D===V.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];V._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?V._createCellCoords(s,n):null;return Y.populateFromArray(V._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 B.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 B.spliceRow(e,t,o,...n)},this.getSelected=function(){if(Z.isSelected())return(0,u.arrayMap)(Z.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(Z.isSelected())return Array.from(Z.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(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,u.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,E.rangeEach)(o.row,s.row,(e=>{(0,E.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(!V.view)return;const{width:e,height:t}=V.view.getLastSize(),{width:o,height:s}=V.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===V.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||V.view._wt.wtOverlays.scrollableElement===V.rootWindow)&&(V.view.setLastSize(o,s),V.render()),V.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(e=>{B=e,V.columnIndexMapper.fitToLength(this.getInitialColumnCount()),V.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:V,dataMap:B,dataSource:U,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),V.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:V,dataMap:B,dataSource:U,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===V.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==V.dataType&&"function"!==V.dataType||(t=B.colToPropCache.length);else if((0,i.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,d.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)?B.getAll():B.getRange(V._createCellCoords(e,t),V._createCellCoords(o,s),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return B.getCopyableText(V._createCellCoords(e,t),V._createCellCoords(o,s))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(z?V.loadData:V.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?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&V.table?(oe("tableClassName",e.tableClassName),V.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,V.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),V.initIndexMappers());const a=V.countCols(),h=q.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&X.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{V.setCellMetaObject(e.row,e.col,e)})),V.runHooks("afterCellMetaReset");let c=V.rootElement.style.height;""!==c&&(c=parseInt(V.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){V.rootElement.getAttribute("style")&&V.rootElement.setAttribute("data-initialstyle",V.rootElement.getAttribute("style"))}if(null===u){const e=V.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?V.rootElement.setAttribute("style",e):(V.rootElement.style.height="",V.rootElement.style.overflow="")}else void 0!==u&&(V.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,V.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),V.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(V.view&&(V.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),V.view._wt.exportSettingsAsClassNames()),V.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),V.view&&!z&&(V.forceFullRender=!0,j.lockEditor(),V._refreshBorders(null),V.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!V.view||""!==c&&""!==u&&void 0!==u||c===u||V.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=V.getSelectedLast();if(q.getValue){if((0,r.isFunction)(q.getValue))return q.getValue.call(V);if(e)return V.getData()[e[0][0]][q.getValue]}else if(e)return V.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){Y.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:V.view.getCellAtCoords(V._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)),V._createCellCoords(n,r)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.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 B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],o=B.getRange(V._createCellCoords(0,e),V._createCellCoords(q.data.length-1,e),B.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=B.getRange(V._createCellCoords(0,B.propToCol(e)),V._createCellCoords(q.data.length-1,B.propToCol(e)),B.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?U.getData():U.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?U.getData(!0):U.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return U.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=le(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,u.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,U.getAtCell(t,o),s])})),(0,u.arrayEach)(n,(e=>{let[t,o,s]=e;U.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=V.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return U.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return U.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(V._createCellCoords(e,0),V._createCellCoords(e,this.countCols()-1),B.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,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,E.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,E.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=X.getCellMetaKeyValue(s,n,o);!1!==V.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(X.removeCellMeta(s,n,o),V.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&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,u.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,u.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),V.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===V.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)),X.setCellMeta(n,r,o,s),V.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===V.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,i.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,i.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,C.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 se;e&&(s.onQueueEmpty=e);let n=V.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=V.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),V.validateCell(V.getDataAtCell(n,e),V.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=q.rowHeaders,o=e;return void 0!==o&&(o=V.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,E.rangeEach)(V.countRows()-1,(e=>{t.push(V.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!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=V.countCols();e<t;e++)if(V.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=V.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=V.countCols();for(let o=0;o<t;o++)e.push(V.getColHeader(o));return e}let s=q.colHeaders;const n=V.toPhysicalColumn(o),i=function(e){const t=[],o=V.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(n);return!1===q.colHeaders?s=null:q.columns&&(0,r.isFunction)(q.columns)&&q.columns(i)&&q.columns(i).title?s=q.columns(i).title:q.columns&&q.columns[n]&&q.columns[n].title?s=q.columns[n].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[n]?s=q.colHeaders[n]:(0,r.isFunction)(q.colHeaders)?s=q.colHeaders(n):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,y.spreadsheetColumnLabel)(o)),s=V.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=V.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.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=V._getColWidthFromSettings(e);return t=V.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.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=V._getRowHeightFromSettings(e);return t=V.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return U.countRows()},this.countSourceCols=function(){return U.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return V.view._wt.drawn?V.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,E.rangeEachReverse)(V.countRows()-1,(o=>{if(V.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,E.rangeEachReverse)(V.countCols()-1,(o=>{if(V.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(V,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(V,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])&&(F=!0);const o=Z.selectCells(e);return o&&t&&V.listen(),F=!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 Z.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 Z.selectRows(e,t,o)},this.deselectCell=function(){Z.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;F=!0,Z.selectAll(e,t,o),F=!1};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(){let e,t,o,s,{row:n,col:r,verticalSnap:i,horizontalSnap:l,considerHiddenIndexes:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==i&&(e="top"===i,t=!e),void 0!==l&&(o="start"===l,s=!o);let h=n,d=r;if(void 0===a||a){const e=Number.isInteger(n)&&n>=0,t=Number.isInteger(r)&&r>=0,o=e?he(this.rowIndexMapper,n):void 0,s=t?he(this.columnIndexMapper,r):void 0;if(null===o||null===s)return!1;h=e?V.rowIndexMapper.getRenderableFromVisualIndex(o):n,d=t?V.columnIndexMapper.getRenderableFromVisualIndex(s):r}const c=Number.isInteger(h),u=Number.isInteger(d);return c&&h>=0&&u&&d>=0?V.view.scrollViewport(V._createCellCoords(h,d),e,s,t,o):c&&h>=0&&(u&&d<0||!u)?V.view.scrollViewportVertically(h,e,t):!!(u&&d>=0&&(c&&h<0||!c))&&V.view.scrollViewportHorizontally(d,s,o)},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();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(V._clearTimeouts(),V._clearImmediates(),V.view&&V.view.destroy(),U&&U.destroy(),U=null,this.getShortcutManager().destroy(),X.clearCache(),L.delete(this.guid),(0,_.isRootInstance)(V)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(V.rootElement),W.destroy(),j&&j.destroy(),V.batchExecution((()=>{V.rowIndexMapper.unregisterAll(),V.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),V.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(V),(0,d.objectEach)(V,((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)})),V.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,Z=null,j=null,V=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,w.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return V},this.addHook=function(e,t){T.default.getSingleton().add(e,t,V)},this.hasHook=function(e){return T.default.getSingleton().has(e,V)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,V)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,V)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(V,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.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,u.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,u.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),V.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===V.rootWindow.getComputedStyle(V.rootElement).direction},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1};const de=(0,H.createShortcutManager)({handleEvent:()=>V.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||V.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&de.releasePressedKeys()})),this.getShortcutManager=function(){return de},this.getFocusManager=function(){return G},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,x.registerAllShortcutContexts)(V),de.setActiveContextName("grid"),T.default.getSingleton().run(V,"construct")},o(63517),o(91683),o(97552);var n=o(83302),r=o(85015),i=o(93315),l=o(37595),a=s(o(6116)),h=s(o(75244)),d=o(22232),c=o(51400),u=o(50095),g=o(52870),f=o(52036),p=o(7462),m=o(83605),C=o(80239),w=o(18609),E=o(68145),S=s(o(54833)),v=s(o(43951)),y=o(65320),R=o(33165),_=o(45433),b=o(21280),T=s(o(56307)),M=o(22489),O=o(8222),I=o(69167),A=o(3177),N=o(41808),P=o(42386),H=o(47152),x=o(29282);let D=null;const L=new Map;new Set},89055:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=r(e),n=r(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(n),{activate(){e._registerTimeout((()=>{s.tabIndex=0,n.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,n.tabIndex=-1}),10)}}};var s=o(83302),n=o(5386);function r(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,n.A11Y_PRESENTATION)()]),t}},58954:(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()}}),a={wrapped:!1,flipped:!1};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.addHook("beforeRowWrap",((e,t,o)=>{a.wrapped=!0,a.flipped=o})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:o=>{const{disableTabNavigation:s,autoWrapRow:n}=e.getSettings();if(s||!e.selection.isSelected()||n&&a.wrapped&&a.flipped||!n&&a.wrapped)return n&&a.wrapped&&a.flipped&&(t=o.shiftKey?r(e):i(e)),a.wrapped=!1,a.flipped=!1,e.deselectCell(),e.unlisten(),!1;o.preventDefault()},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"after",relativeToGroup:s.GRID_GROUP,group:"focusCatcher"})};var s=o(29282),n=o(89055);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)}},41808:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58954);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},85631:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683),o(63517);var s=o(29270),n=o(65320),r=o(22232),i=o(50095),l=o(68145),a=o(93315);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 d=this.tableMeta.maxRows,c=this.getSchema().length,u=[];for(;a<t&&n+a<d;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(c-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 d=this.instance.countCols(),c=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;c<t&&d<r;){if("number"!=typeof l||l>=d)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);c+=1,u+=1,d+=1}this.instance.columnIndexMapper.insertIndexes(l,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,c,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,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 d=0;for(;d<o;)a.push(null),d+=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 d=0;for(;d<o;)a.push(null),d+=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 d=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=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<=c;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(d.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}}t.default=h},43951:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(22232),n=o(65320),r=o(50095),i=o(68145),l=o(85015);t.default=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 d=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(d)){const t=this.getAtPhysicalCell(e,d,a);n?h.push(t):(0,s.setProperty)(h,d,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}}},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(85631));t.DataMap=n.default;var r=s(o(10146));t.MetaManager=r.default;var i=s(o(87574));t.metaSchemaFactory=i.default;var l=o(73046);t.replaceData=l.replaceData;var a=o(24298);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(23373)),r=s(o(34624)),i=s(o(22142)),l=s(o(7083)),a=s(o(65718)),h=o(22232);class d{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=d,(0,h.mixin)(d,a.default)},32156:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(50095),n=o(8972);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},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(22232),r=o(8972),i=s(o(32156));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))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(32156));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}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(87574));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)}}},34624:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(8972);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)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),n=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,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",imeFastEdit:!1,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})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(56307)),r=o(22232),i=o(85015);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 d=(0,r.hasOwnProperty)(e,"type")?e.type:null;let c=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;d&&(c?c.type=null!==(u=c.type)&&void 0!==u?u:d:c={type:d});c&&this.metaManager.updateCellMeta(o,s,c),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["ariaTags",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["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})}}},8972:(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(91683);var s=o(22232),n=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:d,dataMap:c,dataSource:u,internalSource:g,source:f,metaManager:p,firstRun:m}=s,C=(0,n.toUpperCaseFirst)(g),w=d.getSettings();Array.isArray(w.dataSchema)?d.dataType="array":(0,r.isFunction)(w.dataSchema)?d.dataType="function":d.dataType="object";c&&c.destroy();e=d.runHooks(`before${C}`,e,m,f);const E=new i.default(d,e,p);if(t(E),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=E.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=w.startRows;s<n;s++)if("object"!==d.dataType&&"function"!==d.dataType||!w.dataSchema)if("array"===d.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=w.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(d.dataType="array");w.data=e,E.dataSource=e,u.data=e,u.dataType=d.dataType,u.colToProp=E.colToProp.bind(E),u.propToCol=E.propToCol.bind(E),u.countCachedColumns=E.countCachedColumns.bind(E),o(E),d.runHooks(`after${C}`,e,m,f),m||(d.runHooks("afterChange",null,g),d.render());d.getSettings().ariaTags&&(0,a.setAttribute)(d.rootElement,[(0,h.A11Y_ROWCOUNT)(d.countRows()),(0,h.A11Y_COLCOUNT)(d.countCols())])},o(63517),o(91683);var n=o(18609),r=o(85015),i=s(o(85631)),l=o(22232),a=o(83302),h=o(5386)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(80151),r=o(24449),i=o(83605),l=s(o(75244)),a=o(93315);const h=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";class d{constructor(e,t,o){this.instance=e,this.tableMeta=t,this.selection=o,this.eventManager=new l.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,r=o;if(Array.isArray(s)&&([n,r]=s),this.cellProperties=this.instance.getCellMeta(n,r),!this.isCellEditable())return void this.clearActiveEditor();const l=this.instance.getCell(t,o,!0);if(l){const e=this.instance.getCellEditor(this.cellProperties),s=this.instance.colToProp(r),a=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(n),r);this.activeEditor=(0,i.getEditorInstance)(e,this.instance),this.activeEditor.prepare(t,o,s,l,a,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.getSelectedRangeLast();if(!e)return!1;const t=this.instance.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:n,columnIndexMapper:r}=this.instance,i=n.isHidden(this.instance.toPhysicalRow(o))||r.isHidden(this.instance.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||i)}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,r.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,a.isDefined)(this.instance.getSelected()),group:h};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 c=new WeakMap;d.getInstance=function(e,t,o){let s=c.get(e);return s||(s=new d(e,t,o),c.set(e,s)),s};t.default=d},87857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(93231)),r=o(93273),i=o(50095),l=o(83302),a=o(93315),h=o(18609),d=o(80151),c=o(50695),u=o(5386);const g=new WeakMap,f=t.EDITOR_TYPE="autocomplete";class p extends r.HandsontableEditor{static get EDITOR_TYPE(){return f}constructor(e){super(e),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],r=e.length;let i,l,d,c,u=t.length;if(0===r){for(d=0;d<u;d++)n.push(d);return n}for(d=0;d<u;d++){if(l=(0,h.stripTags)((0,a.stringify)(t[d])),o)c=l.indexOf(e);else{const t=this.cellProperties.locale;c=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=l.length-c-r,s.push({baseIndex:d,index:c,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})),d=0,u=s.length;d<u;d++)n.push(s[d].baseIndex);return n})),this.query=null,this.strippedChoices=[],this.rawChoices=[],g.set(this,{skipOne:!1,isMacOS:this.hot.rootWindow.navigator.platform.indexOf("Mac")>-1,idPrefix:e.guid.slice(0,9)})}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"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_TEXT)(),(0,u.A11Y_COMBOBOX)(),(0,u.A11Y_HASPOPUP)("listbox"),(0,u.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,n,r){const i=g.get(this);super.prepare(e,t,o,s,n,r),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_EXPANDED)("false"),(0,u.A11Y_CONTROLS)(`${i.idPrefix}-listbox-${e}-${t}`)])}open(){const e=g.get(this);super.open();const t=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,o=this.hot.getSettings().ariaTags,s=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==s?void 0:s.length,{row:r,col:i}=this;this.showEditableElement(),this.focus();let h=(0,l.getScrollbarWidth)();0===h&&e.isMacOS&&(h+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:t?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:t?(0,l.outerWidth)(this.TEXTAREA)+h:void 0,autoColumnSize:!0,renderer:(e,t,r,i,h,d,g)=>{(0,c.textRenderer)(e,t,r,i,h,d,g);const{filteringCaseSensitive:f,allowHtml:p,locale:m}=this.cellProperties,C=this.query;let w,E,S=(0,a.stringify)(d);S&&!p&&(w=!0===f?S.indexOf(C):S.toLocaleLowerCase(m).indexOf(C.toLocaleLowerCase(m)),-1!==w&&(E=S.substr(w,C.length),S=S.replace(E,`<strong>${E}</strong>`))),o&&(0,l.setAttribute)(t,[(0,u.A11Y_OPTION)(),...s?[(0,u.A11Y_SETSIZE)(n)]:[],...s?[(0,u.A11Y_POSINSET)(s.indexOf(d)+1)]:[],["id",`${this.htEditor.rootElement.id}_${r}-${i}`]]),t.innerHTML=S},afterSelection:(e,t)=>{if(o){const o=this.htEditor.getCell(e,t,!0);(0,l.setAttribute)(o,[(0,u.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,u.A11Y_ACTIVEDESCENDANT)(o.id))}}}),o&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,u.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,u.A11Y_LISTBOX)(),(0,u.A11Y_LIVE)("polite"),(0,u.A11Y_RELEVANT)("text"),["id",`${e.idPrefix}-listbox-${r}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,u.A11Y_EXPANDED)("true"))),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_EXPANDED)("false")])}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 d=Array.isArray(r)?r.length:0;if(!1===n)d&&(a=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&d<=t);t++)d?e.push(h[r[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,i.pivot)([h])),0===h.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",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),d=s.top-h.top-a+i,c=e.scrollHeight-d-a-n,u=r>c&&d>c;return u?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(u?d:c,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.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===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){const t=g.get(this);if(t.skipOne=!1,(0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let o=10;if(e.keyCode===d.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=p},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=o(93315),r=o(22232),i=o(6116),l=s(o(4748)),a=o(83302);const h=t.EDITOR_TYPE="base",d=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),c=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class u{static get EDITOR_TYPE(){return h}constructor(e){this.hot=e,this.instance=e,this.state=d.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=d.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:c};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!==d.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=d.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(c),n.removeShortcutsByGroup(i.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.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=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.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===d.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),d=o.topOverlay.holder,c=o.inlineStartOverlay.holder,u=d!==n?d.scrollTop:0,g=c!==n?c.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,E=r.top===l.top?0:1;let S=r.top-l.top-E-C,v=0;v=this.hot.isRtl()?n.innerWidth-r.left-i-f-1+w:r.left-l.left-1-w,["top","top_inline_start_corner"].includes(m)&&(S+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const y=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),_=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),b=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(y&&R<=0||R===b)&&(S+=1),_<=0&&(v+=1);const T=s.rowsRenderCalculator.startPosition,M=s.columnsRenderCalculator.startPosition,O=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),A=(0,a.getScrollbarWidth)(this.hot.rootDocument);let N=t.offsetTop;if(["inline_start","master"].includes(m)&&(N+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;N+=e.getWorkspaceHeight()-t.getHeight()-A}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=M-O-i):["top","master","bottom"].includes(m)&&(P+=M-O);const H=(0,a.getComputedStyle)(this.TD,this.hot.rootWindow),x=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(H[x],10)>0?0:1,L=parseInt(H.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+D,F=(0,a.outerHeight)(t)+L,V=(0,a.hasVerticalScrollbar)(d)?A:0,W=(0,a.hasHorizontalScrollbar)(c)?A:0,B=this.hot.view.maximumVisibleElementWidth(P)-V+D;return{top:S,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(N)-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)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302);const r=t.EDITOR_TYPE="checkbox";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},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(33034)),r=s(o(32134)),i=o(5071),l=s(o(75244)),a=o(83302),h=o(5386),d=o(22232),c=o(80151);o(2964);const u=t.EDITOR_TYPE="date",g="dateEditor";class f extends i.TextEditor{static get EDITOR_TYPE(){return u}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.hot.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);const e=new l.default(this);e.addEventListener(this.datePicker,"mousedown",(e=>{(0,a.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})),e.addEventListener(this.TEXTAREA,"keydown",(e=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault()}))}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),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("true")]),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:g})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()})),this.TD&&this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("false")]);this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(g),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.hot.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,d.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),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=f},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(25815),r=s(o(56307));const i=t.EDITOR_TYPE="dropdown";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)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302),r=o(24449),i=o(22232),l=o(6116),a=o(5386);const h="handsontableEditor",d=t.EDITOR_TYPE="handsontable";class c extends s.TextEditor{static get EDITOR_TYPE(){return d}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(),this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TD,[(0,a.A11Y_EXPANDED)("true")])}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TD,[(0,a.A11Y_EXPANDED)("false")])}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,ariaTags:!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.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:h,relativeToGroup:l.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor;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;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;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(h)}}t.HandsontableEditor=c},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(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)(d.PasswordEditor),(0,f.registerEditor)(c.SelectEditor),(0,f.registerEditor)(u.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(48253);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var i=o(58437);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var l=o(9535);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(93273);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var d=o(63630);t.PasswordEditor=d.PasswordEditor,t.PASSWORD_EDITOR=d.EDITOR_TYPE;var c=o(93333);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var u=o(5071);t.TextEditor=u.TextEditor,t.TEXT_EDITOR=u.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);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},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n=t.EDITOR_TYPE="numeric";class r extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302);const r=t.EDITOR_TYPE="password";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},83605:(e,t,o)=>{"use strict";var s=o(73203);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(91683);var n=s(o(56307)),r=s(o(63800));const i=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:d,getValues:c}=(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=c,t.getRegisteredEditorNames=d,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302),r=o(22232);const i="ht_editor_visible",l="selectEditor",a=t.EDITOR_TYPE="select";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},67547:(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(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(48253),r=s(o(75244)),i=o(37595),l=o(83302),a=o(68145),h=o(80151),d=o(95881),c=o(93315),u=o(6116),g=o(97296),f=o(67547),p=o(5386);const m="ht_editor_hidden",C="textEditor",w=t.EDITOR_TYPE="text";class E extends n.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),this.eventManager=new r.default(this),this.autoResize=(0,d.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(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,o,s,r,i){const l=this.state;if(super.prepare(e,t,o,s,r,i),!i.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=i;e&&(this.TEXTAREA.value=""),l!==n.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}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"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,p.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_HIDDEN)()]),(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,m),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,m)}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,m)&&(0,l.removeClass)(this.TEXTAREA_PARENT,m),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 d=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(d.paddingLeft,10)+parseInt(d.paddingRight,10),u=parseInt(d.paddingTop,10)+parseInt(d.paddingBottom,10),g=s-c,f=i-u,p=r-c,m=a-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){(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.state===n.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===n.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:C},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(C),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=E},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n=t.EDITOR_TYPE="time";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},75244:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListenersCounter=function(){return n},o(63517);var s=o(24449);let n=0;t.default=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)}}},51400:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(69173),l=o(83302);function a(e,t){d(e,t),t.add(e)}function h(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const u=Object.freeze({CELL:"cell",MIXED:"mixed"});var g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,C=new WeakSet,w=new WeakSet,E=new WeakSet,S=new WeakSet;function v(){return(0,n.default)(this,g).getSelectedRangeLast().highlight}function y(){const e=c(this,C,v).call(this);return(0,n.default)(this,g).getCell(e.row,e.col,!0)}function R(){const e=c(this,w,y).call(this),{activeElement:t}=(0,n.default)(this,g).rootDocument;t&&(0,l.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e),this.getFocusMode()===u.MIXED&&"TD"===e.nodeName&&(0,n.default)(this,g).addHookOnce("afterSelectionEnd",(()=>{this.refocusToEditorTextarea()}))}function _(e){e.imeFastEdit&&this.getFocusMode()!==u.MIXED?this.setFocusMode(u.MIXED):e.imeFastEdit||this.getFocusMode()===u.CELL||this.setFocusMode(u.CELL)}t.FocusManager=class{constructor(e){var t=this;a(this,S),a(this,E),a(this,w),a(this,C),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:void 0}),h(this,p,{writable:!0,value:50}),h(this,m,{writable:!0,value:null});const o=e.getSettings();(0,r.default)(this,g,e),(0,r.default)(this,f,o.imeFastEdit?u.MIXED:u.CELL),(0,n.default)(this,g).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,S,_).call(t,...o)})),(0,n.default)(this,g).addHook("afterSelection",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,E,R).call(t,...o)}))}getFocusMode(){return(0,n.default)(this,f)}setFocusMode(e){Object.values(u).includes(e)?(0,r.default)(this,f,e):(0,i.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,n.default)(this,p)}setRefocusDelay(e){(0,r.default)(this,p,e)}setRefocusElementGetter(e){(0,r.default)(this,m,e)}getRefocusElement(){return"function"==typeof(0,n.default)(this,m)?(0,n.default)(this,m).call(this):null===(e=(0,n.default)(this,g).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){var t;const o=c(this,C,v).call(this),s=e||c(this,w,y).call(this);let r=(0,n.default)(this,g).runHooks("modifyFocusedElement",o.row,o.col,s);r instanceof HTMLElement||(r=s),!r||null!==(t=(0,n.default)(this,g).getActiveEditor())&&void 0!==t&&t.isOpened()||r.focus({preventScroll:!0})}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,n.default)(this,p);const t=this.getRefocusElement();(0,n.default)(this,g).getSettings().imeFastEdit&&t&&(0,n.default)(this,g)._registerTimeout((()=>{t.select()}),e)}}},5386:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_DESCRIPTION=e=>["aria-description",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},50095:(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(63517)},37595:(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(22232);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()},69173:(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(93315)},65320:(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(63517);var s=o(22232);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}},48150:(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}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.appendElement=function(e,t){let{tagName:o,className:s,attributes:n}=t;const r=e.ownerDocument.createElement(o);s&&h(r,s);n&&n.length&&c(r,n);return e.appendChild(r),r},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=i,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=i(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 r=s.length;return r?s[r-1]:null},t.empty=u,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=C,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=r,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 r(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(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===w&&(w=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 w},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=C(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=C(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=m,t.getWindowScrollTop=p,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=E,t.isOutsideInput=S,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},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("none"===C(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,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&&"offsetLeft"in l;)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.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=a(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=d,t.removeContentEditableFromElementAndDeselect=y,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.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,o),t(),y(e,o)},t.selectElementIfAllowed=function(e){S(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,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(63517),o(91683);var s=o(18609),n=o(5386);function r(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function i(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 l(e){return e&&e.length?e.filter((e=>!!e)):[]}function a(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=l(t)).length>0&&e.classList.add(...t)}function d(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=a(t,!0);o=l(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function u(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(u(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let w;function E(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function S(e){return E(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,r=s.createRange(),i=s.defaultView.getSelection();c(e,"contenteditable",!0),o&&c(e,...(0,n.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}function y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&d(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},24449:(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.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(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)}},85015:(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(50095),n=o(93315);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 d=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}),d)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="14.0.0-next-07c0a60-20231107";let i,E="invalid",S="invalid";const v=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|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||v)if(v){const t=(0,n.default)("15/11/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?(E="expired",S="expired"):(E="valid",S="valid")}else s?(E="non_commercial",S="valid"):(E="invalid",S="invalid");else E="missing",S="missing";p()&&(E="valid",S="valid");if(!m&&"valid"!==E){C[E]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===E?"info":"warn"](C[E]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==S&&t.parentNode){if(w[S]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[S]({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(33034)),r=o(28236);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(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`
32
+ the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,a.setAttribute)(this.rootNode,[(0,h.A11Y_PRESENTATION)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),n=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,a.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(n+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=c},46538:(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)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}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":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302);t.default=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 d=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===r?d=h.scrollTo(e,l?e>this.lastScrolledColumnPos:t):(l&&(e<r||e>i)||!l)&&(d=h.scrollTo(e,l?e>i:t)),d&&(this.lastScrolledColumnPos=e),d}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:d}=this.dataAccessObject;if(l&&(e<h||e>n-a-1))return!1;let c=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===r?c=d.scrollTo(e,l?e>this.lastScrolledRowPos:o):(l&&(e<r||e>i)||!l)&&(c=d.scrollTo(e,l?e>i:o)),c&&(this.lastScrolledRowPos=e),c}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),d=(0,r.innerHeight)(i),c=(0,r.getScrollTop)(i,i);if(a.top+h-d<=c){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<=c){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),d=Math.abs((0,r.getScrollLeft)(n,n));if(l.left+a-h<=d){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.left+a-t<=d){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}}},67175:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(24449),r=o(22232),i=o(37595),l=o(97132);t.default=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:d}=this.selectionHandles.styles,c=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*c),C=Math.min(parseInt(s+n-g/4,10),f-g-2*c);h[i]=`${m}px`,d[i]=`${C}px`;const w=Math.min(parseInt(o+r,10),p-u-2*c),E=Math.min(parseInt(o+r-g/4,10),p-g-2*c);h.top=`${w}px`,d.top=`${E}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",a.display="block",this.isPartRange(e,t)?(h.display="none",d.display="none"):(h.display="block",d.display="block")):(l.display="none",h.display="none",a.display="none",d.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,d,c;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,d=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,c=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,E=(0,s.offset)(t.TABLE),S=(0,s.outerWidth)(t.TABLE),v=C.top,y=C.left,R=this.wot.wtSettings.getSetting("rtlMode");let _=0,b=0;if(R){const e=(0,s.outerWidth)(f),t=n.innerWidth-E.left-S;b=y+e-w.left,_=n.innerWidth-y-e-t-1}else b=w.left+(0,s.outerWidth)(m)-y,_=y-E.left-1;if(this.isEntireColumnSelected(r,l)){const e=this.getDimensionsFromHeader("columns",a,h,d,E);let t=null;e&&([t,_,b]=e),t&&(f=t)}let T=v-E.top-1,M=w.top+(0,s.outerHeight)(m)-v;if(this.isEntireRowSelected(a,h)){const e=this.getDimensionsFromHeader("rows",r,l,c,E);let t=null;e&&([t,T,M]=e),t&&(f=t)}const O=(0,s.getComputedStyle)(f,n);parseInt(O.borderTopWidth,10)>0&&(T+=1,M=M>0?M-1:0),parseInt(O[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(_+=1,b=b>0?b-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${_}px`,this.topStyle.width=`${b}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${_}px`,this.startStyle.height=`${M}px`,this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+M-A+"px",this.bottomStyle[I]=`${_}px`,this.bottomStyle.width=`${b}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=_+b-A+"px",this.endStyle.height=`${M+1}px`,this.endStyle.display="block";let N=this.settings.border.cornerVisible;N="function"==typeof N?N(this.settings.layerLevel):N;const P=this.wot.getSetting("onModifyGetCellCoords",l,h);let[H,x]=[l,h];if(P&&Array.isArray(P)&&([,,H,x]=P),(0,i.isMobileBrowser)()||!N||this.isPartRange(H,x))this.cornerStyle.display="none";else{this.cornerStyle.top=T+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=_+b+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+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(T+M+this.cornerCenterPointOffset-a)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,i.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(l,h,T,_,b,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,d=null,c=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)},d="ht__selection--rows",g="top";break;case"columns":a=function(){return i.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},d="ht__selection--columns",g="left"}if(l.classList.contains(d)){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&&(c=i[g]-r[g]-1,u=l[g]+h(p)-i[g]),[f,c,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)}}},97132:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},23009:(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"},88361:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={SelectionManager:!0,Selection:!0},r=s(o(33468));t.Selection=r.default;var i=o(23009);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(97132);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(86143);t.SelectionManager=a.SelectionManager},86143:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(9815);var n=s(o(42538)),r=s(o(48427)),i=o(83302),l=o(7161),a=s(o(67175));function h(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=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,c)),t=(0,n.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=(0,n.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let r=[];Array.isArray(null===(t=(0,n.default)(this,u).options)||void 0===t?void 0:t.cellAttributes)&&(r=(0,n.default)(this,u).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=(0,n.default)(this,u).options)||void 0===o?void 0:o.headerAttributes)&&(r=[...r,...(0,n.default)(this,u).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,i.removeClass)(s[t],e),(0,i.removeAttribute)(s[t],r)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;d(t=this,o=C),o.add(t),h(this,c,{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,c,e),(0,n.default)(this,g).setActiveOverlay((0,n.default)(this,c)),(0,n.default)(this,f).has((0,n.default)(this,c))||(0,n.default)(this,f).set((0,n.default)(this,c),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,c)))return t.get((0,n.default)(this,c));const o=new a.default((0,n.default)(this,c),e.settings);return t.set((0,n.default)(this,c),o),o}const t=new a.default((0,n.default)(this,c),e.settings);return(0,n.default)(this,m).set(e,new Map([[(0,n.default)(this,c),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,c).getSetting("onBeforeDrawBorders",h,l),null==a||a.appear(h)}o.forEach(((e,t)=>{var o,s;const r=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();r.forEach((e=>(0,n.default)(this,f).get((0,n.default)(this,c)).add(e))),(0,i.addClass)(t,r),"TD"===t.nodeName&&Array.isArray(null===(o=(0,n.default)(this,u).options)||void 0===o?void 0:o.cellAttributes)?(0,i.setAttribute)(t,(0,n.default)(this,u).options.cellAttributes):"TH"===t.nodeName&&Array.isArray(null===(s=(0,n.default)(this,u).options)||void 0===s?void 0:s.headerAttributes)&&(0,i.setAttribute)(t,(0,n.default)(this,u).options.headerAttributes)}))}}},7161:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(83302);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 d=new WeakMap,c=new WeakMap,u=new WeakSet;function g(e){const{wtTable:t}=(0,n.default)(this,c),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,d,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,c,e),this}setActiveSelection(e){return(0,r.default)(this,d,e),this}scan(){const e=(0,n.default)(this,d).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,d).getCorners(),{wtTable:i}=(0,n.default)(this,c),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,c).getSetting("onBeforeHighlightingColumnHeader",l,g,{selectionType:(0,n.default)(this,d).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,d).getCorners(),{wtTable:i}=(0,n.default)(this,c),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,c).getSetting("onBeforeHighlightingRowHeader",l,g,{selectionType:(0,n.default)(this,d).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,d).getCorners(),{wtTable:l}=(0,n.default)(this,c);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,c).createCellCoords(a,h)),o=(0,n.default)(this,c).getSetting("onAfterDrawSelection",a,h,(0,n.default)(this,d).settings.layerLevel);"string"==typeof o&&(0,i.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,n.default)(this,d).getCorners(),{wtTable:s}=(0,n.default)(this,c);h(this,u,g).call(this,((r,i)=>{if(r>=t&&r<=o){const t=s.getCell((0,n.default)(this,c).createCellCoords(r,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,n.default)(this,d).getCorners(),{wtTable:s}=(0,n.default)(this,c);h(this,u,g).call(this,((r,i)=>{if(i>=t&&i<=o){const t=s.getCell((0,n.default)(this,c).createCellCoords(r,i));e(t)}}))}}},33468:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=s(o(65718));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);t.default=i},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=o(83302),i=o(22232);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,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically: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,ariaTags:!0}}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]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var n=s(o(93231)),r=o(83302),i=o(85015),l=s(o(65946)),a=s(o(22350)),h=o(96649),d=s(o(35863)),c=s(o(72772)),u=o(89381),g=o(5386);t.default=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 c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new d.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",this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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"),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),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"),d=h.length,c=t.getSetting("columnHeaders"),g=c.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),d&&!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,d);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,c),(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}}},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(92117)),l=o(22232),a=o(89381);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);t.default=h},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(6271)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(37610)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(83302),r=s(o(45460)),i=s(o(37610)),l=s(o(92117)),a=o(22232);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 h=e.offsetWidth,d=e.offsetHeight;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&&(d=0)}d=Math.min(d,a),i.height="auto"===s?"auto":`${d}px`,h=Math.min(h,l),i.width=`${h}px`,i.overflow="",this.hasTableHeight="auto"===i.height||d>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);t.default=h},92117:(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(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},37610:(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(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},6214:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},6271:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},15491:(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(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(92117)),l=o(22232),a=o(89381);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);t.default=h},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(45460)),r=s(o(15491)),i=s(o(6214)),l=o(22232),a=o(89381);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);t.default=h},35863:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302);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)}}}}},94191:(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)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));t.OrderView=n.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(55407));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},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(81787),r=s(o(96747));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(){}}},79193:(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}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(79193)),r=o(81787);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()}}},72772:(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}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),n=o(22232),r=o(46003);t.default=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(),d=r-(a?h.right-r:h.left);let c,u;if(l)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(d,r):Math.min(this.getContainerFillWidth(),d,r),n===o&&i>0&&this.sumColumnWidths(0,i-1)>c)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(c,n.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?c:Math.max(c,(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"),d=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return h&&a>=0&&(l=this.dataAccessObject.topOverlay.sumCellSizes(0,h),a+=l,n-=l),d&&this.dataAccessObject.bottomOverlay.clone&&(l=this.dataAccessObject.bottomOverlay.sumCellSizes(c-d,c),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}))}}},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var n=s(o(78900)),r=o(45433),i=o(3177),l=s(o(56307)),a=o(22489),h=o(65324),d=o(57924),c=o(48253),u=o(21280);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)(d.TextCellType),g.editors={BaseEditor:c.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="07/11/2023 12:05:49",g.version="14.0.0-next-c080457-20231107",g.languages={dictionaryKeys:a.dictionaryKeys,getLanguageDictionary:a.getLanguageDictionary,getLanguagesDictionaries:a.getLanguagesDictionaries,registerLanguageDictionary:a.registerLanguageDictionary,getTranslatedPhrase:a.getTranslatedPhrase};t.default=g},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),n=o(16124),r=o(67156);const i=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:i,editor:s.AutocompleteEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator}},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),n=o(8877);const r=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:n.checkboxRenderer}},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),n=o(56522),r=o(82951);const i=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:i,editor:s.DateEditor,renderer:n.dateRenderer,validator:r.dateValidator}},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),n=o(16124),r=o(67156);const i=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:i,editor:s.DropdownEditor,renderer:n.autocompleteRenderer,validator:r.autocompleteValidator}},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),n=o(67981);const r=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:n.handsontableRenderer}},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(n.CheckboxCellType),(0,g.registerCellType)(r.DateCellType),(0,g.registerCellType)(i.DropdownCellType),(0,g.registerCellType)(l.HandsontableCellType),(0,g.registerCellType)(a.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(d.SelectCellType),(0,g.registerCellType)(c.TextCellType),(0,g.registerCellType)(u.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var n=o(42855);t.CheckboxCellType=n.CheckboxCellType,t.CHECKBOX_TYPE=n.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var i=o(65867);t.DropdownCellType=i.DropdownCellType,t.DROPDOWN_TYPE=i.CELL_TYPE;var l=o(243);t.HandsontableCellType=l.HandsontableCellType,t.HANDSONTABLE_TYPE=l.CELL_TYPE;var a=o(68683);t.NumericCellType=a.NumericCellType,t.NUMERIC_TYPE=a.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var d=o(12256);t.SelectCellType=d.SelectCellType,t.SELECT_TYPE=d.CELL_TYPE;var c=o(57924);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var u=o(8228);t.TimeCellType=u.TimeCellType,t.TIME_TYPE=u.CELL_TYPE;var g=o(65324);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),n=o(78416),r=o(71);const i=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:i,editor:s.NumericEditor,renderer:n.numericRenderer,validator:r.numericValidator,dataType:"number"}},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),n=o(76978);const r=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:r,editor:s.PasswordEditor,renderer:n.passwordRenderer,copyable:!1}},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!d(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(91683);var n=s(o(63800)),r=o(83605),i=o(7462),l=o(80239);const{register:a,getItem:h,hasItem:d,getNames:c,getValues:u}=(0,n.default)("cellTypes");t.getRegisteredCellTypes=u,t.getRegisteredCellTypeNames=c,t.hasCellType=d},12256:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2145);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},2145:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93333),n=o(73619);const r=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:r,editor:s.SelectEditor,renderer:n.selectRenderer}},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(50695);const r=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:r,editor:s.TextEditor,renderer:n.textRenderer}},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),n=o(43853),r=o(85342);const i=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:i,editor:s.TimeEditor,renderer:n.timeRenderer,validator:r.timeValidator}},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o,s=this;let k=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=!1,V=this;const W=new h.default(V);let B,U,Y,j,G,z=!0;(0,_.hasValidParameter)(k)&&(0,_.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const K=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",$=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",$),this.isRtl=function(){return"rtl"===$},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1},t.language=(0,M.getValidLanguageCode)(t.language);const X=new A.MetaManager(V,t,[A.DynamicCellMetaMod,A.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,_.isRootInstance)(this)&&(0,i._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,w.randomString)()}`,L.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{V.runHooks("afterRowSequenceChange",e)})),U=new v.default(V),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:V.rowIndexMapper,columnIndexMapper:V.columnIndexMapper,countCols:()=>V.countCols(),countRows:()=>V.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!V.getActiveEditor()&&V.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>V.getShortcutManager(),createCellCoords:(e,t)=>V._createCellCoords(e,t),createCellRange:(e,t,o)=>V._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?V.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return V._createCellCoords(t>=0?V.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?V.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>e<0||t<0?V.getSettings().disableVisualSelection:V.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,O.normalizeLanguageCode)(e);(0,M.hasLanguageDictionary)(t)?(V.runHooks("beforeLanguageChange",t),Q.language=t,V.runHooks("afterLanguageChange",t)):(0,O.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?V.rootElement:V.table;if(z)(0,n.addClass)(o,t);else{let s=[],r=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,u.stringToArray)(Q[e])),t&&(r=Array.isArray(t)?t:(0,u.stringToArray)(t));const i=(0,u.getDifferenceOfArrays)(s,r),l=(0,u.getDifferenceOfArrays)(r,s);i.length&&(0,n.removeClass)(o,i),l.length&&(0,n.addClass)(o,l)}Q[e]=t}function se(){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 ne(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function re(e,t,o){if(!e.length)return;const s=V.getActiveEditor(),r=new se;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=B.propToCol(l),d=V.getCellMeta(s,h);"numeric"===d.type&&"string"==typeof a&&(0,E.isNumericLike)(a)&&(e[o][3]=ne(a)),V.getCellValidator(d)&&(r.addValidatorToQueue(),V.validateCell(e[o][3],d,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=V.getCell(o.visualRow,o.visualCol);null!==s&&(0,n.removeClass)(s,q.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,d),t))}r.checkIfQueueIsEmpty()}function ie(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(q.allowInsertRow)for(;e[o][0]>V.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===V.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[o][1])>V.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||B.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}V.forceFullRender=!0,Y.adjustRowsAndCols(),V.runHooks("beforeChangeRender",e,t),j.lockEditor(),V._refreshBorders(null),j.unlockEditor(),V.view.adjustElementsSize(),V.runHooks("afterChange",e,t||"edit");const s=V.getActiveEditor();s&&(0,i.isDefined)(s.refreshValue)&&s.refreshValue()}function le(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function ae(e,t){const o=V.getActiveEditor(),s=V.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",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,d.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,V.colToProp(s.col),r.row,V.colToProp(r.col),t,i);let l=!0;F&&(l=!1),t.isTouched()&&(l=!t.value);const a=this.selection.selectedRange.current(),h=this.selection.isSelectedByAnyHeader(),c=this.selection.isSelectedByRowHeader(),u=this.selection.isSelectedByColumnHeader();if(!1!==l)if(h)c?this.scrollViewportTo({row:e.row}):u&&this.scrollViewportTo({col:e.col});else if(a&&!this.selection.isMultiple()){const{row:e,col:t}=a.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());c&&u?(0,n.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):c?((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,V.colToProp(o.col),s.row,V.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),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("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).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)})).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)})).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)})).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)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={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,u.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=V.countSourceRows();if(q.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:d,startPhysicalIndex:c}=B.createRow(t,n,{source:r,mode:h});if(d){const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=V.toVisualRow(c);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.col;Z.isSelectedByRowHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(V._createCellCoords(o+d,r),!0),Z.setRangeEnd(V._createCellCoords(s+d,n))}else V._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?V.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=B.createCol(t,n,{source:r,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[V.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=V.toVisualColumn(p);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,i.isDefined)(o)&&o>=s){const{row:s,col:n}=e.to;let r=t.row;Z.isSelectedByColumnHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(V._createCellCoords(r,o+f),!0),Z.setRangeEnd(V._createCellCoords(s,n+f))}else V._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,u.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?V.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeRow(o,s,r))return;const l=V.countRows(),a=q.fixedRowsTop;a>=n+1&&(q.fixedRowsTop-=Math.min(s,a-n));const h=q.fixedRowsBottom;h&&n>=l-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(a(t)):m([[t,n]]),Y.adjustRowsAndCols(),V._refreshBorders();break;case"remove_col":const C=e=>{let t=0;(0,u.arrayEach)(e,(e=>{let[o,s]=e;const n=(0,i.isEmpty)(o)?V.countCols()-1:Math.max(o-t,0);let l=V.toPhysicalColumn(n);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeCol(o,s,r))return;const a=q.fixedColumnsStart;a>=n+1&&(q.fixedColumnsStart-=Math.min(s,a-n)),Array.isArray(q.colHeaders)&&(void 0===l&&(l=-1),q.colHeaders.splice(l,s)),t+=s}))};Array.isArray(t)?C(a(t)):C([[t,n]]),Y.adjustRowsAndCols(),V._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}l||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(0===V.countRows()&&0===V.countCols()&&Z.deselect(),e){const t=V.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=V.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-V.countSourceRows());B.createRow(V.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=V.countEmptyCols(!0));let t=V.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,B.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===V.dataType&&e<s){t=V.countCols();const o=s-e,n=Math.min(o,q.maxCols-t);B.createCol(t,n,{source:"auto"})}}if(Z.isSelected()){const e=V.countRows(),t=V.countCols();(0,u.arrayEach)(Z.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&&V.selectCell(n,r,i,l)}))}V.view&&V.view.adjustElementsSize()},populateFromArray(e,t,o,s,n){let r,i,l,a;const h=[],c={},g=[],f=e.row,p=e.col;if(i=t.length,0===i)return!1;let m=0,C=0;switch((0,d.isObject)(o)&&(m=o.col-p+1,C=o.row-f+1),n){case"shift_down":const n=(0,u.pivot)(t),w=n.length,E=Math.max(w,m),S=V.getData().slice(f),v=(0,u.pivot)(S).slice(p,p+E);for(l=0;l<E;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<v.length?g.push(n[l].concat(v[l])):g.push(n[l].concat(new Array(S.length).fill(null)))}else g.push(n[l%w].concat(v[l]));V.populateFromArray(f,p,(0,u.pivot)(g));break;case"shift_right":const y=t.length,R=Math.max(y,C),_=V.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<y){for(l=0,a=t[r].length;l<m-a;l+=1)t[r].push(t[r][l%a]);if(r<_.length)for(let e=0;e<_[r].length;e+=1)t[r].push(_[r][e]);else t[r].push(...new Array(_[0].length).fill(null))}else t.push(t[r%i].slice(0,R).concat(_[r]));V.populateFromArray(f,p,t);break;default:c.row=e.row,c.col=e.col;let b,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},A=t.length,N=o?o.row-e.row+1:0;for(i=o?N:Math.max(A,N),r=0;r<i&&!(o&&c.row>o.row&&N>A||!q.allowInsertRow&&c.row>V.countRows()-1||c.row>=q.maxRows);r++){const t=r-T,n=I(t).length,u=o?o.col-e.col+1:0;if(a=o?u:Math.max(n,u),c.col=e.col,b=V.getCellMeta(c.row,c.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!b.skipRowOnPaste){for(M=0,l=0;l<a&&!(o&&c.col>o.col&&u>n||!q.allowInsertColumn&&c.col>V.countCols()-1||c.col>=q.maxCols);l++){if(b=V.getCellMeta(c.row,c.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&b.skipColumnOnPaste){M+=1,c.col+=1,a+=1;continue}if(b.readOnly&&"UndoRedo.undo"!==s){c.col+=1;continue}let e=I(t,l-M),o=V.getDataAtCell(c.row,c.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,d.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,d.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,d.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,d.deepClone)(e):O=!1}else null!==o&&"object"==typeof o&&(O=!1);O&&h.push([c.row,c.col,e]),O=!0,c.col+=1}c.row+=1}else T+=1,c.row+=1,i+=1}V.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){U.setData(q.data),V.runHooks("beforeInit"),((0,l.isMobileBrowser)()||(0,l.isIpadOS)())&&(0,n.addClass)(V.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new S.default(this),j=a.default.getInstance(V,q,Z),G=new c.FocusManager(V),(0,_.isRootInstance)(this)&&(0,N.installFocusCatcher)(V),V.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===V.rootElement.offsetParent&&(0,n.observeVisibilityChangeOnce)(V.rootElement,(()=>{V.view._wt.wtOverlays.updateLastSpreaderSize(),V.render(),V.view.adjustElementsSize()})),"object"==typeof z&&(V.runHooks("afterChange",z[0],z[1]),z=!1),V.runHooks("afterInit")},this._createCellCoords=function(e,t){return V.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return V.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let n=V.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=V.getCell(n,s,!0);if(r&&"TH"!==r.nodeName){const e=V.rowIndexMapper.getRenderableFromVisualIndex(n),t=V.columnIndexMapper.getRenderableFromVisualIndex(s);V.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=V.runHooks("beforeValidate",e,t.visualRow,t.prop,s),V._registerImmediate((()=>{n.call(t,e,(o=>{V&&(o=V.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,l(o),V.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):V._registerImmediate((()=>{t.valid=!0,l(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const n=le(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]:B.colToProp(n[i][1]),r.push([n[i][0],a,U.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]])}h||"object"!=typeof e||(h=t);const d=ae(r,s);V.runHooks("afterSetDataAtCell",d,h),re(d,h,(()=>{ie(d,h)}))},this.setDataAtRowProp=function(e,t,o,s){const n=le(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],U.getAtCell(this.toPhysicalRow(n[i][0]),n[i][1]),n[i][2]]);a||"object"!=typeof e||(a=t);const h=ae(r,s);V.runHooks("afterSetDataAtRowProp",h,a),re(h,a,(()=>{ie(h,a)}))},this.listen=function(){V&&!V.isListening()&&(L.forEach((e=>{V!==e&&e.unlisten()})),D=V.guid,V.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,V.runHooks("afterUnlisten"))},this.isListening=function(){return D===V.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];V._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?V._createCellCoords(s,n):null;return Y.populateFromArray(V._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 B.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 B.spliceRow(e,t,o,...n)},this.getSelected=function(){if(Z.isSelected())return(0,u.arrayMap)(Z.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(Z.isSelected())return Array.from(Z.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(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,u.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,E.rangeEach)(o.row,s.row,(e=>{(0,E.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(!V.view)return;const{width:e,height:t}=V.view.getLastSize(),{width:o,height:s}=V.rootElement.getBoundingClientRect(),n=o!==e||s!==t;!1===V.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},n)||((n||V.view._wt.wtOverlays.scrollableElement===V.rootWindow)&&(V.view.setLastSize(o,s),V.render()),V.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},n))},this.updateData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(e=>{B=e,V.columnIndexMapper.fitToLength(this.getInitialColumnCount()),V.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:V,dataMap:B,dataSource:U,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),V.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:V,dataMap:B,dataSource:U,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===V.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==V.dataType&&"function"!==V.dataType||(t=B.colToPropCache.length);else if((0,i.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,d.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)?B.getAll():B.getRange(V._createCellCoords(e,t),V._createCellCoords(o,s),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return B.getCopyableText(V._createCellCoords(e,t),V._createCellCoords(o,s))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(z?V.loadData:V.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?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&V.table?(oe("tableClassName",e.tableClassName),V.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,V.addHook(s,e[s])):!t&&(0,d.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),V.initIndexMappers());const a=V.countCols(),h=q.columns;if(h&&(0,r.isFunction)(h)&&(l=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),a>0)for(s=0,n=0;s<a;s++){if(h){const e=l?h(s):h[n];e&&X.updateColumnMeta(n,e)}n+=1}(0,i.isDefined)(e.cell)&&(0,d.objectEach)(e.cell,(e=>{V.setCellMetaObject(e.row,e.col,e)})),V.runHooks("afterCellMetaReset");let c=V.rootElement.style.height;""!==c&&(c=parseInt(V.rootElement.style.height,10));let u=e.height;if((0,r.isFunction)(u)&&(u=u()),t){V.rootElement.getAttribute("style")&&V.rootElement.setAttribute("data-initialstyle",V.rootElement.getAttribute("style"))}if(null===u){const e=V.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?V.rootElement.setAttribute("style",e):(V.rootElement.style.height="",V.rootElement.style.overflow="")}else void 0!==u&&(V.rootElement.style.height=isNaN(u)?`${u}`:`${u}px`,V.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),V.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(V.view&&(V.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),V.view._wt.exportSettingsAsClassNames()),V.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),V.view&&!z&&(V.forceFullRender=!0,j.lockEditor(),V._refreshBorders(null),V.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!V.view||""!==c&&""!==u&&void 0!==u||c===u||V.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=V.getSelectedLast();if(q.getValue){if((0,r.isFunction)(q.getValue))return q.getValue.call(V);if(e)return V.getData()[e[0][0]][q.getValue]}else if(e)return V.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,n){Y.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:V.view.getCellAtCoords(V._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)),V._createCellCoords(n,r)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.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 B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],o=B.getRange(V._createCellCoords(0,e),V._createCellCoords(q.data.length-1,e),B.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=B.getRange(V._createCellCoords(0,B.propToCol(e)),V._createCellCoords(q.data.length-1,B.propToCol(e)),B.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?U.getData():U.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s)),n},this.getSourceDataArray=function(e,t,o,s){let n;return n=void 0===e?U.getData(!0):U.getByRange(V._createCellCoords(e,t),V._createCellCoords(o,s),!0),n},this.getSourceDataAtCol=function(e){return U.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const n=le(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),l=[];r&&(0,u.arrayEach)(n,(e=>{let[t,o,s]=e;l.push([t,o,U.getAtCell(t,o),s])})),(0,u.arrayEach)(n,(e=>{let[t,o,s]=e;U.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",l,s),this.render();const a=V.getActiveEditor();a&&(0,i.isDefined)(a.refreshValue)&&a.refreshValue()},this.getSourceDataAtRow=function(e){return U.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return U.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(V._createCellCoords(e,0),V._createCellCoords(e,this.countCols()-1),B.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,d=null;void 0===l&&(l=r),void 0===a&&(a=i);let c="mixed";return(0,E.rangeEach)(Math.max(Math.min(r,l),0),Math.max(r,l),(e=>{let t=!0;return(0,E.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(o=>{const s=this.getCellMeta(e,o);return d=s.type,h?t=h===d:h=d,t})),c=t?d:"mixed",t})),c},this.removeCellMeta=function(e,t,o){const[s,n]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=X.getCellMetaKeyValue(s,n,o);!1!==V.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(X.removeCellMeta(s,n,o),V.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&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,u.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,u.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),V.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,d.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===V.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)),X.setCellMeta(n,r,o,s),V.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===V.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,i.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,i.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?V.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,C.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 se;e&&(s.onQueueEmpty=e);let n=V.countRows()-1;for(;n>=0;){if(void 0!==t&&-1===t.indexOf(n)){n-=1;continue}let e=V.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),V.validateCell(V.getDataAtCell(n,e),V.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=q.rowHeaders,o=e;return void 0!==o&&(o=V.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,E.rangeEach)(V.countRows()-1,(e=>{t.push(V.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!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=V.countCols();e<t;e++)if(V.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=V.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=V.countCols();for(let o=0;o<t;o++)e.push(V.getColHeader(o));return e}let s=q.colHeaders;const n=V.toPhysicalColumn(o),i=function(e){const t=[],o=V.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(n);return!1===q.colHeaders?s=null:q.columns&&(0,r.isFunction)(q.columns)&&q.columns(i)&&q.columns(i).title?s=q.columns(i).title:q.columns&&q.columns[n]&&q.columns[n].title?s=q.columns[n].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[n]?s=q.colHeaders[n]:(0,r.isFunction)(q.colHeaders)?s=q.colHeaders(n):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,y.spreadsheetColumnLabel)(o)),s=V.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=V.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.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=V._getColWidthFromSettings(e);return t=V.runHooks("modifyColWidth",t,e),void 0===t&&(t=b.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.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=V._getRowHeightFromSettings(e);return t=V.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return U.countRows()},this.countSourceCols=function(){return U.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return V.view._wt.drawn?V.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return V.view._wt.drawn?V.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return V.view._wt.drawn?V.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,E.rangeEachReverse)(V.countRows()-1,(o=>{if(V.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,E.rangeEachReverse)(V.countCols()-1,(o=>{if(V.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(V,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(V,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])&&(F=!0);const o=Z.selectCells(e);return o&&t&&V.listen(),F=!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 Z.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 Z.selectRows(e,t,o)},this.deselectCell=function(){Z.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;F=!0,Z.selectAll(e,t,o),F=!1};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(){let e,t,o,s,{row:n,col:r,verticalSnap:i,horizontalSnap:l,considerHiddenIndexes:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==i&&(e="top"===i,t=!e),void 0!==l&&(o="start"===l,s=!o);let h=n,d=r;if(void 0===a||a){const e=Number.isInteger(n)&&n>=0,t=Number.isInteger(r)&&r>=0,o=e?he(this.rowIndexMapper,n):void 0,s=t?he(this.columnIndexMapper,r):void 0;if(null===o||null===s)return!1;h=e?V.rowIndexMapper.getRenderableFromVisualIndex(o):n,d=t?V.columnIndexMapper.getRenderableFromVisualIndex(s):r}const c=Number.isInteger(h),u=Number.isInteger(d);return c&&h>=0&&u&&d>=0?V.view.scrollViewport(V._createCellCoords(h,d),e,s,t,o):c&&h>=0&&(u&&d<0||!u)?V.view.scrollViewportVertically(h,e,t):!!(u&&d>=0&&(c&&h<0||!c))&&V.view.scrollViewportHorizontally(d,s,o)},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();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(V._clearTimeouts(),V._clearImmediates(),V.view&&V.view.destroy(),U&&U.destroy(),U=null,this.getShortcutManager().destroy(),X.clearCache(),L.delete(this.guid),(0,_.isRootInstance)(V)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,n.empty)(V.rootElement),W.destroy(),j&&j.destroy(),V.batchExecution((()=>{V.rowIndexMapper.unregisterAll(),V.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),V.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(V),(0,d.objectEach)(V,((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)})),V.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,Z=null,j=null,V=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,w.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return V},this.addHook=function(e,t){T.default.getSingleton().add(e,t,V)},this.hasHook=function(e){return T.default.getSingleton().has(e,V)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,V)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,V)},this.runHooks=function(e,t,o,s,n,r,i){return T.default.getSingleton().run(V,e,t,o,s,n,r,i)},this.getTranslatedPhrase=function(e,t){return(0,M.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.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,u.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,u.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),V.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===V.rootWindow.getComputedStyle(V.rootElement).direction},this.isLtr=function(){return!V.isRtl()},this.getDirectionFactor=function(){return V.isLtr()?1:-1};const de=(0,H.createShortcutManager)({handleEvent:()=>V.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||V.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&de.releasePressedKeys()})),this.getShortcutManager=function(){return de},this.getFocusManager=function(){return G},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,x.registerAllShortcutContexts)(V),de.setActiveContextName("grid"),T.default.getSingleton().run(V,"construct")},o(63517),o(91683),o(97552);var n=o(83302),r=o(85015),i=o(93315),l=o(37595),a=s(o(6116)),h=s(o(75244)),d=o(22232),c=o(51400),u=o(50095),g=o(52870),f=o(52036),p=o(7462),m=o(83605),C=o(80239),w=o(18609),E=o(68145),S=s(o(54833)),v=s(o(43951)),y=o(65320),R=o(33165),_=o(45433),b=o(21280),T=s(o(56307)),M=o(22489),O=o(8222),I=o(69167),A=o(3177),N=o(41808),P=o(42386),H=o(47152),x=o(29282);let D=null;const L=new Map;new Set},89055:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=r(e),n=r(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(n),{activate(){e._registerTimeout((()=>{s.tabIndex=0,n.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,n.tabIndex=-1}),10)}}};var s=o(83302),n=o(5386);function r(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,n.A11Y_PRESENTATION)()]),t}},58954:(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()}}),a={wrapped:!1,flipped:!1};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.addHook("beforeRowWrap",((e,t,o)=>{a.wrapped=!0,a.flipped=o})),e.getShortcutManager().getContext("grid").addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:o=>{const{disableTabNavigation:s,autoWrapRow:n}=e.getSettings();if(s||!e.selection.isSelected()||n&&a.wrapped&&a.flipped||!n&&a.wrapped)return n&&a.wrapped&&a.flipped&&(t=o.shiftKey?r(e):i(e)),a.wrapped=!1,a.flipped=!1,e.deselectCell(),e.unlisten(),!1;o.preventDefault()},runOnlyIf:()=>!e.getSettings().minSpareCols,preventDefault:!1,stopPropagation:!1,position:"after",relativeToGroup:s.GRID_GROUP,group:"focusCatcher"})};var s=o(29282),n=o(89055);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)}},41808:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58954);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},85631:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683),o(63517);var s=o(29270),n=o(65320),r=o(22232),i=o(50095),l=o(68145),a=o(93315);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 d=this.tableMeta.maxRows,c=this.getSchema().length,u=[];for(;a<t&&n+a<d;){let e=null;"array"===this.instance.dataType?this.tableMeta.dataSchema?e=(0,r.deepClone)(this.getSchema()):(e=[],(0,l.rangeEach)(c-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 d=this.instance.countCols(),c=0,u=a;"end"===s&&(u=Math.min(u+1,i));const g=u;for(;c<t&&d<r;){if("number"!=typeof l||l>=d)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);c+=1,u+=1,d+=1}this.instance.columnIndexMapper.insertIndexes(l,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.instance.toVisualColumn(g);return this.instance.runHooks("afterCreateCol",f,c,o),this.instance.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,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 d=0;for(;d<o;)a.push(null),d+=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 d=0;for(;d<o;)a.push(null),d+=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 d=o===h.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=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<=c;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(d.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}}t.default=h},43951:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(22232),n=o(65320),r=o(50095),i=o(68145),l=o(85015);t.default=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 d=this.colToProp(i);if(i>=(t||r)&&i<=(o||l)&&!Number.isInteger(d)){const t=this.getAtPhysicalCell(e,d,a);n?h.push(t):(0,s.setProperty)(h,d,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}}},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(85631));t.DataMap=n.default;var r=s(o(10146));t.MetaManager=r.default;var i=s(o(87574));t.metaSchemaFactory=i.default;var l=o(73046);t.replaceData=l.replaceData;var a=o(24298);t.DynamicCellMetaMod=a.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(23373)),r=s(o(34624)),i=s(o(22142)),l=s(o(7083)),a=s(o(65718)),h=o(22232);class d{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=d,(0,h.mixin)(d,a.default)},32156:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(50095),n=o(8972);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},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(22232),r=o(8972),i=s(o(32156));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))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(32156));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}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(22232),r=o(8972),i=s(o(87574));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)}}},34624:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22232),n=o(8972);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)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),n=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,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",imeFastEdit:!1,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})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(56307)),r=o(22232),i=o(85015);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 d=(0,r.hasOwnProperty)(e,"type")?e.type:null;let c=(0,i.isFunction)(e.cells)?e.cells(o,s,h):null;var u;d&&(c?c.type=null!==(u=c.type)&&void 0!==u?u:d:c={type:d});c&&this.metaManager.updateCellMeta(o,s,c),a.runHooks("afterGetCellMeta",n,l,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683);t.ExtendMetaPropertiesMod=class{constructor(e){this.metaManager=e,this.usageTracker=new Set,this.propDescriptors=new Map([["ariaTags",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["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})}}},8972:(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(91683);var s=o(22232),n=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:d,dataMap:c,dataSource:u,internalSource:g,source:f,metaManager:p,firstRun:m}=s,C=(0,n.toUpperCaseFirst)(g),w=d.getSettings();Array.isArray(w.dataSchema)?d.dataType="array":(0,r.isFunction)(w.dataSchema)?d.dataType="function":d.dataType="object";c&&c.destroy();e=d.runHooks(`before${C}`,e,m,f);const E=new i.default(d,e,p);if(t(E),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=E.getSchema();let o;e=[];let s=0,n=0;for(s=0,n=w.startRows;s<n;s++)if("object"!==d.dataType&&"function"!==d.dataType||!w.dataSchema)if("array"===d.dataType)o=(0,l.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=w.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,l.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(d.dataType="array");w.data=e,E.dataSource=e,u.data=e,u.dataType=d.dataType,u.colToProp=E.colToProp.bind(E),u.propToCol=E.propToCol.bind(E),u.countCachedColumns=E.countCachedColumns.bind(E),o(E),d.runHooks(`after${C}`,e,m,f),m||(d.runHooks("afterChange",null,g),d.render());d.getSettings().ariaTags&&(0,a.setAttribute)(d.rootElement,[(0,h.A11Y_ROWCOUNT)(d.countRows()),(0,h.A11Y_COLCOUNT)(d.countCols())])},o(63517),o(91683);var n=o(18609),r=o(85015),i=s(o(85631)),l=o(22232),a=o(83302),h=o(5386)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(80151),r=o(24449),i=o(83605),l=s(o(75244)),a=o(93315);const h=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";class d{constructor(e,t,o){this.instance=e,this.tableMeta=t,this.selection=o,this.eventManager=new l.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,r=o;if(Array.isArray(s)&&([n,r]=s),this.cellProperties=this.instance.getCellMeta(n,r),!this.isCellEditable())return void this.clearActiveEditor();const l=this.instance.getCell(t,o,!0);if(l){const e=this.instance.getCellEditor(this.cellProperties),s=this.instance.colToProp(r),a=this.instance.getSourceDataAtCell(this.instance.toPhysicalRow(n),r);this.activeEditor=(0,i.getEditorInstance)(e,this.instance),this.activeEditor.prepare(t,o,s,l,a,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.getSelectedRangeLast();if(!e)return!1;const t=this.instance.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:n,columnIndexMapper:r}=this.instance,i=n.isHidden(this.instance.toPhysicalRow(o))||r.isHidden(this.instance.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||i)}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,r.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,a.isDefined)(this.instance.getSelected()),group:h};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 c=new WeakMap;d.getInstance=function(e,t,o){let s=c.get(e);return s||(s=new d(e,t,o),c.set(e,s)),s};t.default=d},87857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(93231)),r=o(93273),i=o(50095),l=o(83302),a=o(93315),h=o(18609),d=o(80151),c=o(50695),u=o(5386);const g=new WeakMap,f=t.EDITOR_TYPE="autocomplete";class p extends r.HandsontableEditor{static get EDITOR_TYPE(){return f}constructor(e){super(e),(0,n.default)(this,"sortByRelevance",(function(e,t,o){const s=[],n=[],r=e.length;let i,l,d,c,u=t.length;if(0===r){for(d=0;d<u;d++)n.push(d);return n}for(d=0;d<u;d++){if(l=(0,h.stripTags)((0,a.stringify)(t[d])),o)c=l.indexOf(e);else{const t=this.cellProperties.locale;c=l.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(i=l.length-c-r,s.push({baseIndex:d,index:c,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})),d=0,u=s.length;d<u;d++)n.push(s[d].baseIndex);return n})),this.query=null,this.strippedChoices=[],this.rawChoices=[],g.set(this,{skipOne:!1,isMacOS:this.hot.rootWindow.navigator.platform.indexOf("Mac")>-1,idPrefix:e.guid.slice(0,9)})}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"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_TEXT)(),(0,u.A11Y_COMBOBOX)(),(0,u.A11Y_HASPOPUP)("listbox"),(0,u.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,n,r){const i=g.get(this);super.prepare(e,t,o,s,n,r),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_EXPANDED)("false"),(0,u.A11Y_CONTROLS)(`${i.idPrefix}-listbox-${e}-${t}`)])}open(){const e=g.get(this);super.open();const t=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,o=this.hot.getSettings().ariaTags,s=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==s?void 0:s.length,{row:r,col:i}=this;this.showEditableElement(),this.focus();let h=(0,l.getScrollbarWidth)();0===h&&e.isMacOS&&(h+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:t?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:t?(0,l.outerWidth)(this.TEXTAREA)+h:void 0,autoColumnSize:!0,renderer:(e,t,r,i,h,d,g)=>{(0,c.textRenderer)(e,t,r,i,h,d,g);const{filteringCaseSensitive:f,allowHtml:p,locale:m}=this.cellProperties,C=this.query;let w,E,S=(0,a.stringify)(d);S&&!p&&(w=!0===f?S.indexOf(C):S.toLocaleLowerCase(m).indexOf(C.toLocaleLowerCase(m)),-1!==w&&(E=S.substr(w,C.length),S=S.replace(E,`<strong>${E}</strong>`))),o&&(0,l.setAttribute)(t,[(0,u.A11Y_OPTION)(),...s?[(0,u.A11Y_SETSIZE)(n)]:[],...s?[(0,u.A11Y_POSINSET)(s.indexOf(d)+1)]:[],["id",`${this.htEditor.rootElement.id}_${r}-${i}`]]),t.innerHTML=S},afterSelection:(e,t)=>{if(o){const o=this.htEditor.getCell(e,t,!0);(0,l.setAttribute)(o,[(0,u.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,u.A11Y_ACTIVEDESCENDANT)(o.id))}}}),o&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,u.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,u.A11Y_LISTBOX)(),(0,u.A11Y_LIVE)("polite"),(0,u.A11Y_RELEVANT)("text"),["id",`${e.idPrefix}-listbox-${r}-${i}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,u.A11Y_EXPANDED)("true"))),e.skipOne&&(e.skipOne=!1),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,u.A11Y_EXPANDED)("false")])}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 d=Array.isArray(r)?r.length:0;if(!1===n)d&&(a=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&d<=t);t++)d?e.push(h[r[t]]):e.push(h[t]);a=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,i.pivot)([h])),0===h.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",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),d=s.top-h.top-a+i,c=e.scrollHeight-d-a-n,u=r>c&&d>c;return u?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(u?d:c,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.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===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){const t=g.get(this);if(t.skipOne=!1,(0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let o=10;if(e.keyCode===d.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=p},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=o(93315),r=o(22232),i=o(6116),l=s(o(4748)),a=o(83302);const h=t.EDITOR_TYPE="base",d=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),c=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class u{static get EDITOR_TYPE(){return h}constructor(e){this.hot=e,this.instance=e,this.state=d.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=d.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:c};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!==d.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=d.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(c),n.removeShortcutsByGroup(i.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.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=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.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===d.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),d=o.topOverlay.holder,c=o.inlineStartOverlay.holder,u=d!==n?d.scrollTop:0,g=c!==n?c.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,E=r.top===l.top?0:1;let S=r.top-l.top-E-C,v=0;v=this.hot.isRtl()?n.innerWidth-r.left-i-f-1+w:r.left-l.left-1-w,["top","top_inline_start_corner"].includes(m)&&(S+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const y=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),_=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),b=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(y&&R<=0||R===b)&&(S+=1),_<=0&&(v+=1);const T=s.rowsRenderCalculator.startPosition,M=s.columnsRenderCalculator.startPosition,O=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),A=(0,a.getScrollbarWidth)(this.hot.rootDocument);let N=t.offsetTop;if(["inline_start","master"].includes(m)&&(N+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;N+=e.getWorkspaceHeight()-t.getHeight()-A}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=M-O-i):["top","master","bottom"].includes(m)&&(P+=M-O);const H=(0,a.getComputedStyle)(this.TD,this.hot.rootWindow),x=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(H[x],10)>0?0:1,L=parseInt(H.borderTopWidth,10)>0?0:1,k=(0,a.outerWidth)(t)+D,F=(0,a.outerHeight)(t)+L,V=(0,a.hasVerticalScrollbar)(d)?A:0,W=(0,a.hasHorizontalScrollbar)(c)?A:0,B=this.hot.view.maximumVisibleElementWidth(P)-V+D;return{top:S,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(N)-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)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302);const r=t.EDITOR_TYPE="checkbox";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},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(33034)),r=s(o(32134)),i=o(5071),l=s(o(75244)),a=o(83302),h=o(5386),d=o(22232),c=o(80151);o(2964);const u=t.EDITOR_TYPE="date",g="dateEditor";class f extends i.TextEditor{static get EDITOR_TYPE(){return u}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.hot.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);const e=new l.default(this);e.addEventListener(this.datePicker,"mousedown",(e=>{(0,a.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})),e.addEventListener(this.TEXTAREA,"keydown",(e=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault()}))}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),this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("true")]),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:g})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()})),this.TD&&this.hot.getSettings().ariaTags&&(0,a.setAttribute)(this.TD,[(0,h.A11Y_EXPANDED)("false")]);this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(g),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.hot.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,d.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),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=f},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(25815),r=s(o(56307));const i=t.EDITOR_TYPE="dropdown";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)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302),r=o(24449),i=o(22232),l=o(6116),a=o(5386);const h="handsontableEditor",d=t.EDITOR_TYPE="handsontable";class c extends s.TextEditor{static get EDITOR_TYPE(){return d}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(),this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TD,[(0,a.A11Y_EXPANDED)("true")])}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,n.setAttribute)(this.TD,[(0,a.A11Y_EXPANDED)("false")])}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,ariaTags:!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.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:h,relativeToGroup:l.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor;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;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;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(h)}}t.HandsontableEditor=c},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(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)(d.PasswordEditor),(0,f.registerEditor)(c.SelectEditor),(0,f.registerEditor)(u.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var n=o(48253);t.BaseEditor=n.BaseEditor,t.BASE_EDITOR=n.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var i=o(58437);t.DateEditor=i.DateEditor,t.DATE_EDITOR=i.EDITOR_TYPE;var l=o(9535);t.DropdownEditor=l.DropdownEditor,t.DROPDOWN_EDITOR=l.EDITOR_TYPE;var a=o(93273);t.HandsontableEditor=a.HandsontableEditor,t.HANDSONTABLE_EDITOR=a.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var d=o(63630);t.PasswordEditor=d.PasswordEditor,t.PASSWORD_EDITOR=d.EDITOR_TYPE;var c=o(93333);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var u=o(5071);t.TextEditor=u.TextEditor,t.TEXT_EDITOR=u.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);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},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n=t.EDITOR_TYPE="numeric";class r extends s.TextEditor{static get EDITOR_TYPE(){return n}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),n=o(83302);const r=t.EDITOR_TYPE="password";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},83605:(e,t,o)=>{"use strict";var s=o(73203);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(91683);var n=s(o(56307)),r=s(o(63800));const i=new WeakMap,{register:l,getItem:a,hasItem:h,getNames:d,getValues:c}=(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=c,t.getRegisteredEditorNames=d,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),n=o(83302),r=o(22232);const i="ht_editor_visible",l="selectEditor",a=t.EDITOR_TYPE="select";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},67547:(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(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(48253),r=s(o(75244)),i=o(37595),l=o(83302),a=o(68145),h=o(80151),d=o(95881),c=o(93315),u=o(6116),g=o(97296),f=o(67547),p=o(5386);const m="ht_editor_hidden",C="textEditor",w=t.EDITOR_TYPE="text";class E extends n.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),this.eventManager=new r.default(this),this.autoResize=(0,d.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(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts(),this.removeHooksByKey("afterDocumentKeyDown")}prepare(e,t,o,s,r,i){const l=this.state;if(super.prepare(e,t,o,s,r,i),!i.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=i;e&&(this.TEXTAREA.value=""),l!==n.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}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"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,p.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_HIDDEN)()]),(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,m),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,m)}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,m)&&(0,l.removeClass)(this.TEXTAREA_PARENT,m),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 d=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(d.paddingLeft,10)+parseInt(d.paddingRight,10),u=parseInt(d.paddingTop,10)+parseInt(d.paddingBottom,10),g=s-c,f=i-u,p=r-c,m=a-u;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){(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.state===n.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===n.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:C},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(C),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=E},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const n=t.EDITOR_TYPE="time";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},75244:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListenersCounter=function(){return n},o(63517);var s=o(24449);let n=0;t.default=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)}}},51400:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(69173),l=o(83302);function a(e,t){d(e,t),t.add(e)}function h(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const u=Object.freeze({CELL:"cell",MIXED:"mixed"});var g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,C=new WeakSet,w=new WeakSet,E=new WeakSet,S=new WeakSet;function v(){return(0,n.default)(this,g).getSelectedRangeLast().highlight}function y(){const e=c(this,C,v).call(this);return(0,n.default)(this,g).getCell(e.row,e.col,!0)}function R(){const e=c(this,w,y).call(this),{activeElement:t}=(0,n.default)(this,g).rootDocument;t&&(0,l.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e),this.getFocusMode()===u.MIXED&&"TD"===e.nodeName&&(0,n.default)(this,g).addHookOnce("afterSelectionEnd",(()=>{this.refocusToEditorTextarea()}))}function _(e){e.imeFastEdit&&this.getFocusMode()!==u.MIXED?this.setFocusMode(u.MIXED):e.imeFastEdit||this.getFocusMode()===u.CELL||this.setFocusMode(u.CELL)}t.FocusManager=class{constructor(e){var t=this;a(this,S),a(this,E),a(this,w),a(this,C),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:void 0}),h(this,p,{writable:!0,value:50}),h(this,m,{writable:!0,value:null});const o=e.getSettings();(0,r.default)(this,g,e),(0,r.default)(this,f,o.imeFastEdit?u.MIXED:u.CELL),(0,n.default)(this,g).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,S,_).call(t,...o)})),(0,n.default)(this,g).addHook("afterSelection",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,E,R).call(t,...o)}))}getFocusMode(){return(0,n.default)(this,f)}setFocusMode(e){Object.values(u).includes(e)?(0,r.default)(this,f,e):(0,i.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,n.default)(this,p)}setRefocusDelay(e){(0,r.default)(this,p,e)}setRefocusElementGetter(e){(0,r.default)(this,m,e)}getRefocusElement(){return"function"==typeof(0,n.default)(this,m)?(0,n.default)(this,m).call(this):null===(e=(0,n.default)(this,g).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){var t;const o=c(this,C,v).call(this),s=e||c(this,w,y).call(this);let r=(0,n.default)(this,g).runHooks("modifyFocusedElement",o.row,o.col,s);r instanceof HTMLElement||(r=s),!r||null!==(t=(0,n.default)(this,g).getActiveEditor())&&void 0!==t&&t.isOpened()||r.focus({preventScroll:!0})}refocusToEditorTextarea(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,n.default)(this,p);const t=this.getRefocusElement();(0,n.default)(this,g).getSettings().imeFastEdit&&t&&(0,n.default)(this,g)._registerTimeout((()=>{t.select()}),e)}}},5386:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_DESCRIPTION=e=>["aria-description",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},50095:(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(63517)},37595:(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(22232);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()},69173:(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(93315)},65320:(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(63517);var s=o(22232);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}},48150:(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}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.appendElement=function(e,t){let{tagName:o,className:s,attributes:n}=t;const r=e.ownerDocument.createElement(o);s&&h(r,s);n&&n.length&&c(r,n);return e.appendChild(r),r},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=i,t.closestDown=function(e,t,o){const s=[];let n=e;for(;n&&(n=i(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 r=s.length;return r?s[r-1]:null},t.empty=u,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=C,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=r,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 r(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(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===w&&(w=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 w},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=C(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=C(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=m,t.getWindowScrollTop=p,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=E,t.isOutsideInput=S,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},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("none"===C(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,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&&"offsetLeft"in l;)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.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=a(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=d,t.removeContentEditableFromElementAndDeselect=y,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.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,o),t(),y(e,o)},t.selectElementIfAllowed=function(e){S(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,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(63517),o(91683);var s=o(18609),n=o(5386);function r(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function i(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 l(e){return e&&e.length?e.filter((e=>!!e)):[]}function a(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=l(t)).length>0&&e.classList.add(...t)}function d(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=a(t,!0);o=l(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function u(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(u(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function C(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let w;function E(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function S(e){return E(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,r=s.createRange(),i=s.defaultView.getSelection();c(e,"contenteditable",!0),o&&c(e,...(0,n.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),r.selectNodeContents(e),i.removeAllRanges(),i.addRange(r)}function y(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&d(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},24449:(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.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(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)}},85015:(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(50095),n=o(93315);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 d=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}),d)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!l(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="14.0.0-next-c080457-20231107";let i,E="invalid",S="invalid";const v=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|=(d(`${d(h(t)+(h(c(e,Math.abs(n),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,n,n?1===s[a]?9:8:6);return o===t}(e=g(e||""));if(o||s||v)if(v){const t=(0,n.default)("15/11/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?(E="expired",S="expired"):(E="valid",S="valid")}else s?(E="non_commercial",S="valid"):(E="invalid",S="invalid");else E="missing",S="missing";p()&&(E="valid",S="valid");if(!m&&"valid"!==E){C[E]({keyValidityDate:i,hotVersion:r})&&console["non_commercial"===E?"info":"warn"](C[E]({keyValidityDate:i,hotVersion:r})),m=!0}if("valid"!==S&&t.parentNode){if(w[S]({keyValidityDate:i,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[S]({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(33034)),r=o(28236);function i(e){return void 0===e}function l(e){return null===e||""===e||i(e)}const a="length",h=e=>parseInt(e,16),d=e=>parseInt(e,10),c=(e,t,o)=>e.substr(t,o),u=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(c(g(e),h("12"),u("F")))/(h(c(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`
33
33
  The license key for Handsontable is invalid.\x20
34
34
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return r.toSingleLine`
35
35
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -81,7 +81,7 @@
81
81
  is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const o=!0===e?"hide-column":"show-column";(0,i.default)(this,E).triggerColumnModification(o,t)})),!(0,i.default)(this,S)&&this.enabled&&(0,r.default)(this,S,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:o,newValue:s}=e;if("replace"===t){const e=!0===s?"hide-column":"show-column";(0,i.default)(this,E).triggerColumnModification(e,o)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),(0,i.default)(this,E).clear(),(0,i.default)(this,S).unsubscribe(),(0,r.default)(this,S,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return(0,i.default)(this,E)}getLayersCount(){return(0,i.default)(this,E).getLayersCount()}getHeaderSettings(e,t){return(0,i.default)(this,E).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,o=e.wtTable.THEAD,s=e.wtOverlays.topOverlay.clone.wtTable.THEAD,n=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=o.childNodes[e];if(!t)break;const r=s.childNodes[e],i=n?n.childNodes[e]:null;for(let e=0,o=t.childNodes.length;e<o;e++)t.childNodes[e].removeAttribute("colspan"),(0,l.removeClass)(t.childNodes[e],"hiddenHeader"),r&&r.childNodes[e]&&(r.childNodes[e].removeAttribute("colspan"),(0,l.removeClass)(r.childNodes[e],"hiddenHeader")),n&&i&&i.childNodes[e]&&(i.childNodes[e].removeAttribute("colspan"),(0,l.removeClass)(i.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const o=this.hot.view._wt.getSetting("fixedColumnsStart");return(s,n)=>{var r;const{columnIndexMapper:a,view:h}=this.hot;let d=a.getVisualFromRenderableIndex(s);null===d&&(d=s),n.removeAttribute("colspan"),(0,l.removeClass)(n,"hiddenHeader");const{colspan:c,isHidden:u,isPlaceholder:g}=null!==(r=(0,i.default)(this,E).getHeaderSettings(e,d))&&void 0!==r?r:{label:""};if(g||u)(0,l.addClass)(n,"hiddenHeader");else if(c>1){var f,p;const{wtOverlays:e}=h._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(n),r=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(n),i=t||r?Math.min(c,o-s):c;i>1&&n.setAttribute("colspan",i)}this.hot.view.appendColHeader(d,n,(function(){return t.getColumnHeaderValue(...arguments)}),e)}}getColumnHeaderValue(e,t){var o;const{isHidden:s,isPlaceholder:n}=null!==(o=(0,i.default)(this,E).getHeaderSettings(t,e))&&void 0!==o?o:{};return n||s?"":this.hot.getColHeader(e,t)}updateFocusHighlightPosition(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:o}=t;if(o.isHeader()&&o.col>=0){const e=(0,i.default)(this,E).findLeftMostColumnIndex(o.row,o.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}onBeforeViewportScrollHorizontally(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:o}=t;if(!(o.isHeader()&&o.col>=0))return e;const s=this.hot.view.getFirstFullyVisibleColumn(),n=this.hot.view.getLastFullyVisibleColumn(),r=(0,i.default)(this,E).findLeftMostColumnIndex(o.row,o.col),l=(0,i.default)(this,E).findRightMostColumnIndex(o.row,o.col);return r<s&&l>n?e:r<s?r:l}onBeforeHighlightingColumnHeader(e,t,o){const s=(0,i.default)(this,E).getHeaderTreeNodeData(t,e);if(!s)return e;const{columnCursor:n,selectionType:r,selectionWidth:l}=o,{isRoot:a,colspan:h}=(0,i.default)(this,E).getHeaderSettings(t,e);if(r===u.HEADER_TYPE){if(!a)return s.columnIndex}else if(r===u.ACTIVE_HEADER_TYPE&&(h>l-n||!a))return null;return e}onBeforeCopy(e,t,o){let{columnHeadersCount:s}=o;if(0!==s)for(let o=0;o<t.length;o++){const{startRow:s,startCol:r,endRow:l,endCol:a}=t[o],h=l-s+1;if(s>=0||1===r-a+1)break;for(let t=r;t<=a;t++)for(let o=s;o<=l;o++){var n;const s=h+o,l=t-r;if(0===l)continue;!1===(null===(n=(0,i.default)(this,E).getHeaderTreeNodeData(o,t))||void 0===n?void 0:n.isRoot)&&(e[s][l]="")}}}onBeforeOnCellMouseDown(e,t,o,s){this._getHeaderTreeNodeDataByCoords(t)&&(s.column=!0)}onAfterOnCellMouseDown(e,t){const o=this._getHeaderTreeNodeDataByCoords(t);if(!o)return;(0,r.default)(this,v,t.clone()),(0,r.default)(this,y,!0);const{selection:s}=this.hot,n=s.isSelected()?s.getSelectedRange().current():null,i=[],{columnIndex:l,origColspan:a}=o,h=!s.inInSelection(t);e.shiftKey&&n?t.col<n.from.col?i.push(n.getTopEndCorner().col,l,t.row):t.col>n.from.col?i.push(n.getTopStartCorner().col,l+a-1,t.row):i.push(l,l+a-1,t.row):((0,d.isLeftClick)(e)||(0,d.isRightClick)(e)&&h)&&i.push(l,l+a-1,t.row),s.selectColumns(...i)}onBeforeOnCellMouseOver(e,t,o,s){if(!this.hot.view.isMouseDown())return;const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;const{columnIndex:r,origColspan:i}=n,l=this.hot.getSelectedRangeLast(),h=l.getTopStartCorner(),d=l.getBottomEndCorner(),{from:c}=l;s.column=!0,s.cell=!0;const u=[],g=(0,a.clamp)(t.row,-1/0,-1);t.col<c.col?u.push(d.col,r,g):t.col>c.col?u.push(h.col,r+i-1,g):u.push(r,r+i-1,g),this.hot.selection.selectColumns(...u)}onBeforeOnCellMouseUp(){(0,r.default)(this,y,!1)}onBeforeSelectionHighlightSet(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!(0,i.default)(this,y)||!e)return;const t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner().col,s=t.getBottomEndCorner().col,{columnIndex:n,origColspan:r}=(0,i.default)(this,E).getHeaderTreeNodeData((0,i.default)(this,v).row,(0,i.default)(this,v).col);if(t.setHighlight((0,i.default)(this,v)),r>t.getWidth()||n<o||n+r-1>s){const e=(0,i.default)(this,E).findTopMostEntireHeaderLevel((0,a.clamp)(o,n,n+r-1),(0,a.clamp)(s,n,n+r-1));t.highlight.row=e,t.highlight.col=t.from.col}}onModifyTransformStart(e){const{highlight:t}=this.hot.getSelectedRangeLast(),o=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(o.isHeader()&&o.col>=0))return;const s=(0,i.default)(this,E).findLeftMostColumnIndex(o.row,o.col),n=(0,i.default)(this,E).findRightMostColumnIndex(o.row,o.col);if(e.col<0){const o=t.col>=s&&t.col<=n?s-1:n,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const o=t.col>=s&&t.col<=n?n+1:s,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}onBeforeSelectColumns(e,t){const o=e.row,s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),n=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});t.col<e.col?(s&&(e.col=s.columnIndex+s.origColspan-1),n&&(t.col=n.columnIndex)):t.col>=e.col&&(s&&(e.col=s.columnIndex),n&&(t.col=n.columnIndex+n.origColspan-1))}onAfterGetColumnHeaderRenderers(e){e.length=0;for(let t=0;t<(0,i.default)(this,E).getLayersCount();t++)e.push(this.headerRendererFactory(t))}onAfterViewportColumnCalculatorOverride(e){const t=(0,i.default)(this,E).getLayersCount();let o=e.startColumn,s=!!t;for(let n=0;n<t;n++){const t=(0,i.default)(this,E).findLeftMostColumnIndex(n,e.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(s=!1),(0,a.isNumeric)(r)&&r<e.startColumn){o=r;break}}e.startColumn=s?(0,i.default)(this,E).getHeaderTreeNodeData(0,o).columnIndex:o}onModifyColWidth(e,t){const o=this.ghostTable.getWidth(t);return e>o?e:o}onModifyColumnHeaderValue(e,t,o){var s;const{label:n}=null!==(s=(0,i.default)(this,E).getHeaderTreeNodeData(o,t))&&void 0!==s?s:{label:""};return n}onModifyFocusedElement(e,t){if(e<0)return this.hot.getCell(e,(0,i.default)(this,E).findLeftMostColumnIndex(e,t),!0)}onInit(){this.updatePlugin()}onAfterLoadData(e,t){t||this.updatePlugin()}destroy(){(0,r.default)(this,E,null),null!==(0,i.default)(this,S)&&((0,i.default)(this,S).unsubscribe(),(0,r.default)(this,S,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return(0,i.default)(this,E).getHeaderTreeNodeData(e.row,e.col)}}t.NestedHeaders=R},56803:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(50095),l=s(o(88725));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,d=new WeakMap,c=new WeakMap;t.default=class{constructor(e){a(this,h,{writable:!0,value:new Map}),a(this,d,{writable:!0,value:new Map}),a(this,c,{writable:!0,value:null}),(0,r.default)(this,c,e)}getRoots(){return Array.from((0,n.default)(this,h).values())}getRootByColumn(e){let t;return(0,n.default)(this,d).has(e)&&(t=(0,n.default)(this,h).get((0,n.default)(this,d).get(e))),t}getNode(e,t){const o=this.getRootByColumn(t);if(!o)return;const s=t-(0,n.default)(this,d).get(t);let r,i=0;return o.walkDown((o=>{const{data:{origColspan:n,headerLevel:l}}=o;if(e===l){if(s>=i&&s<=i+n-1)return r=o,r.data.isRoot=t===r.data.columnIndex,!1;i+=n}})),r}rebuildTreeIndex(){let e=0;(0,n.default)(this,d).clear(),(0,i.arrayEach)((0,n.default)(this,h),(t=>{let[,{data:{colspan:o}}]=t;for(let t=e;t<e+o;t++)(0,n.default)(this,d).set(t,e);e+=o}))}buildTree(){this.clear();const e=(0,n.default)(this,c).getColumnsCount();let t=0;for(;t<e;){const e=(0,n.default)(this,c).getHeaderSettings(0,t),o=new l.default;(0,n.default)(this,h).set(t,o),this.buildLeaves(o,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=(0,n.default)(this,c).getHeadersSettings(o,t,s);o+=1,(0,i.arrayEach)(r,(s=>{const r={...s,headerLevel:o-1,columnIndex:t};let i;1===o?(e.data=r,i=e):(i=new l.default(r),e.addChild(i)),o<(0,n.default)(this,c).getLayersCount()&&this.buildLeaves(i,t,o,s.origColspan),t+=s.origColspan}))}clear(){(0,n.default)(this,h).clear(),(0,n.default)(this,d).clear()}}},24768:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(48427)),r=s(o(42538)),i=o(50095),l=s(o(44137)),a=s(o(56803)),h=o(33987),d=o(59753),c=o(88725);function u(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 g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(){u(this,g,{writable:!0,value:new l.default}),u(this,f,{writable:!0,value:new a.default((0,r.default)(this,g))}),u(this,p,{writable:!0,value:[[]]})}setState(e){(0,r.default)(this,g).setData(e);let t=!1;try{(0,r.default)(this,f).buildTree()}catch(e){(0,r.default)(this,f).clear(),(0,r.default)(this,g).clear(),t=!0}return(0,n.default)(this,p,(0,d.generateMatrix)((0,r.default)(this,f).getRoots())),t}setColumnsLimit(e){(0,r.default)(this,g).setColumnsLimit(e)}mergeStateWith(e){const t=(0,i.arrayMap)(e,(e=>{let{row:t,...o}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...o}}));(0,r.default)(this,g).mergeWith(t),(0,r.default)(this,f).buildTree(),(0,n.default)(this,p,(0,d.generateMatrix)((0,r.default)(this,f).getRoots()))}mapState(e){(0,r.default)(this,g).map(e),(0,r.default)(this,f).buildTree(),(0,n.default)(this,p,(0,d.generateMatrix)((0,r.default)(this,f).getRoots()))}mapNodes(e){return(0,i.arrayReduce)((0,r.default)(this,f).getRoots(),((t,o)=>(o.walkDown((o=>{const s=e(o.data);void 0!==s&&t.push(s)})),t)),[])}triggerNodeModification(e,t,o){t<0&&(t=this.rowCoordsToLevel(t));const s=(0,r.default)(this,f).getNode(t,o);let i;return s&&(i=(0,h.triggerNodeModification)(e,s,o),(0,n.default)(this,p,(0,d.generateMatrix)((0,r.default)(this,f).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var o,s;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(o=null===(s=(0,r.default)(this,p)[e])||void 0===s?void 0:s[t])&&void 0!==o?o:null}getHeaderTreeNodeData(e,t){const o=this.getHeaderTreeNode(e,t);return o?{...o.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const o=(0,r.default)(this,f).getNode(e,t);return o||null}findTopMostEntireHeaderLevel(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const s=o-e+1;let n=!1,i=null;for(let t=e;t<=o;t++){const l=(0,r.default)(this,f).getRootByColumn(t);if(!l)break;n=!0,l.walkDown((t=>{const{columnIndex:n,headerLevel:r,origColspan:l,isHidden:a}=t.data;a||l<=s&&n>=e&&n+l-1<=o&&(null===i||r<i)&&(i=r)}),c.TRAVERSAL_DF_PRE)}return n&&null===i?-1:this.levelToRowCoords(null!==(t=i)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var o;const{isRoot:s}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0};if(s)return t;let n=t-1;for(;n>=0;){var r;const{isRoot:t}=null!==(r=this.getHeaderSettings(e,n))&&void 0!==r?r:{isRoot:!0};if(t)break;n-=1}return n}findRightMostColumnIndex(e,t){var o;const{isRoot:s,origColspan:n}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0,origColspan:1};if(s)return t+n-1;let r=t+1;for(;r<this.getColumnsCount();){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,r))&&void 0!==i?i:{isRoot:!0};if(t)break;r+=1}return r-1}getLayersCount(){return(0,r.default)(this,g).getLayersCount()}getColumnsCount(){return(0,r.default)(this,g).getColumnsCount()}clear(){(0,n.default)(this,p,[]),(0,r.default)(this,g).clear(),(0,r.default)(this,f).clear()}}},59753:(e,t,o)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,s.arrayEach)(e,(e=>{e.walkDown((e=>{const o=e.data,{origColspan:s,columnIndex:i,headerLevel:l,crossHiddenColumns:a}=o,h=function(e,t){let o;Array.isArray(e[t])?o=e[t]:(o=[],e[t]=o);return o}(t,l);let d=!1;for(let e=i;e<i+s;e++){if(a.includes(e)||d)h.push((0,n.createPlaceholderHeaderSettings)(o));else{const e=r(o);e.isRoot=!0,h.push(e),d=!0}}}))})),t},o(63517);var s=o(50095),n=o(47687);function r(e){const{crossHiddenColumns:t,...o}=(0,n.createDefaultHeaderSettings)(e);return o}},70014:(e,t,o)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var o;const{data:i,childs:l}=t;if(i.isCollapsed||i.isHidden||i.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,r.isNodeReflectsFirstChildColspan)(t))return e(l[0]);i.isCollapsed=!0;const a=l.slice(1),h=new Set;if(a.length>0)(0,s.arrayEach)(a,(e=>{(0,r.traverseHiddenNodeColumnIndexes)(e,(e=>{h.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=i;for(let o=1;o<e;o++){const e=t+o;h.add(e)}}const d=i.colspan-(null!==(o=(0,r.getFirstChildProperty)(t,"colspan"))&&void 0!==o?o:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=d,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,r.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,r.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.expandNode)(t),affectedColumns:Array.from(h),colspanCompensation:d}};var s=o(50095),n=o(76885),r=o(1505)},76885:(e,t,o)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:o,childs:i}=t;if(!o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,r.isNodeReflectsFirstChildColspan)(t))return e(i[0]);o.isCollapsed=!1;const l=i.slice(1),a=new Set;let h=0;if(l.length>0)(0,s.arrayEach)(l,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;h+=t.colspan,(0,r.traverseHiddenNodeColumnIndexes)(e,(e=>{a.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:s}=o;h=t-e;for(let e=1;e<t;e++)a.add(s+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=h,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,r.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,r.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,n.collapseNode)(t),affectedColumns:Array.from(a),colspanCompensation:h}};var s=o(50095),n=o(70014),r=o(1505)},82807:(e,t,o)=>{"use strict";t.__esModule=!0,t.hideColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
82
82
  the last node, the hide column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(o.includes(t))return;let n=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return n=!0,!1})),n)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.push(t),o.colspan>1?o.colspan-=1:o.isHidden=!0}))},o(91683),o(63517);var s=o(28236)},33987:(e,t,o)=>{"use strict";t.__esModule=!0,t.triggerNodeModification=function(e,t,o){if(!l.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return l.get(e)(t,o)},o(91683);var s=o(70014),n=o(76885),r=o(82807),i=o(30700);const l=new Map([["collapse",s.collapseNode],["expand",n.expandNode],["hide-column",r.hideColumn],["show-column",i.showColumn]])},30700:(e,t,o)=>{"use strict";t.__esModule=!0,t.showColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
83
83
  the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(!o.includes(t))return;let n=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return n=!0,!1})),n)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(t),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))},o(91683);var s=o(28236)},1505:(e,t)=>{"use strict";function o(e,t){let{childs:o}=e;if(0!==o.length)return o[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=o,t.isNodeReflectsFirstChildColspan=function(e){return o(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:o,childs:s}=e;if(!o.isHidden&&(t(o.columnIndex),0===s.length))for(let e=1;e<o.colspan;e++)t(o.columnIndex+e)}))}},30742:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===t)return o;(0,s.arrayEach)(e,(e=>{const l=[];let a=0;o.push(l),(0,s.arrayEach)(e,(e=>{const o=(0,i.createDefaultHeaderSettings)();if((0,n.isObject)(e)){const{label:t,colspan:s}=e;o.label=(0,r.stringify)(t),"number"==typeof s&&s>1&&(o.colspan=s,o.origColspan=s)}else o.label=(0,r.stringify)(e);a+=o.origColspan;let s=!1;if(a>=t&&(o.colspan=o.origColspan-(a-t),o.origColspan=o.colspan,s=!0),l.push(o),o.colspan>1)for(let e=0;e<o.colspan-1;e++)l.push((0,i.createPlaceholderHeaderSettings)());return!s}))}));const l=Math.max(...(0,s.arrayMap)(o,(e=>e.length)));return(0,s.arrayEach)(o,(e=>{if(e.length<l){const t=(0,s.arrayMap)(new Array(l-e.length),(()=>(0,i.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),o},o(63517);var s=o(50095),n=o(22232),r=o(93315),i=o(47687)},44137:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var n=s(o(42538)),r=s(o(48427)),i=o(22232),l=o(50095),a=o(30742);function h(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 d=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var c=new WeakMap,u=new WeakMap,g=new WeakMap;t.default=class{constructor(){h(this,c,{writable:!0,value:[]}),h(this,u,{writable:!0,value:0}),h(this,g,{writable:!0,value:1/0})}setColumnsLimit(e){(0,r.default)(this,g,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,r.default)(this,c,(0,a.normalizeSettings)(e,(0,n.default)(this,g))),(0,r.default)(this,u,(0,n.default)(this,c).length)}getData(){return(0,n.default)(this,c)}mergeWith(e){(0,l.arrayEach)(e,(e=>{let{row:t,col:o,...s}=e;const n=this.getHeaderSettings(t,o);null!==n&&(0,i.extend)(n,s,d)}))}map(e){(0,l.arrayEach)((0,n.default)(this,c),(t=>{(0,l.arrayEach)(t,(t=>{const o=e({...t});(0,i.isObject)(o)&&(0,i.extend)(t,o,d)}))}))}getHeaderSettings(e,t){var o;if(e>=(0,n.default)(this,u)||e<0)return null;const s=(0,n.default)(this,c)[e];return t>=s.length?null:null!==(o=s[t])&&void 0!==o?o:null}getHeadersSettings(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=[];if(e>=(0,n.default)(this,u)||e<0)return s;const r=(0,n.default)(this,c)[e];let i=0;for(let e=t;e<r.length;e++){const t=r[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,s.push(t),t.colspan>1&&(e+=t.colspan-1),i===o)break;if(i>o)throw new Error("The last column settings cannot overlap the other header layers")}return s}getLayersCount(){return(0,n.default)(this,u)}getColumnsCount(){return(0,n.default)(this,u)>0?(0,n.default)(this,c)[0].length:0}clear(){(0,r.default)(this,c,[]),(0,r.default)(this,u,0)}}},47687:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:o=1,collapsible:s=!1,crossHiddenColumns:n=[],isCollapsed:r=!1,isHidden:i=!1,isRoot:l=!1,isPlaceholder:a=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:o,collapsible:s,isCollapsed:r,crossHiddenColumns:n,isHidden:i,isRoot:l,isPlaceholder:a}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},45404:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(83302);t.default=class{constructor(e,t){(0,n.default)(this,"hot",void 0),(0,n.default)(this,"nestedHeaderSettingsGetter",void 0),(0,n.default)(this,"layersCount",0),(0,n.default)(this,"container",void 0),(0,n.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let o=0;o<t;o++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),s=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(s,e[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:o}=this.hot,s=t.createDocumentFragment(),n=t.createElement("table"),i=!!this.hot.getSettings().dropdownMenu,l=o.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const s=t.createElement("tr");for(let n=0;n<l;n++){let l=o.getVisualFromRenderableIndex(n);null===l&&(l=n);const a=t.createElement("th"),h=this.nestedHeaderSettingsGetter(e,l);if(h&&(!h.isPlaceholder||h.isHidden)){let e=h.label;i&&(e+='<button class="changeType"></button>'),(0,r.fastInnerHTML)(a,e),a.colSpan=h.colspan,s.appendChild(a)}}n.appendChild(s)}s.appendChild(n),e.appendChild(s)}clear(){this.widthsMap.clear(),this.container=null}}},19508:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(68145),n=o(22232),r=o(50095);t.default=class{constructor(e,t){this.hot=t,this.data=null,this.plugin=e,this.parentReference=new WeakMap,this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,s.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,r.arrayEach)(e.__children,(o=>{this.cacheNode(o,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,o,s){let n=!1,i=t;if(isNaN(i)&&i.end)return i;let l=e;return l||(l={__children:this.data},n=!0,i-=1),null!=o&&i===o?{result:l,end:!0}:null!=s&&l===s?{result:i,end:!0}:(i+=1,l.__children&&(0,r.arrayEach)(l.__children,(e=>{if(this.parentReference.set(e,n?null:l),i=this.readTreeNodes(e,i,o,s),isNaN(i)&&i.end)return!1})),i)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,n.objectEach)(this.data[0],((t,o)=>{e[o]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const o=this.getRowParent(e);return null==o?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,r.arrayEach)(o.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var o;return(null===(o=e.__children)||void 0===o?void 0:o[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(t=o.__children)||void 0===t?void 0:t.length)}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let s=null;e&&(s=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",s+this.countChildren(e)+1,1);let n=e;e||(n=this.mockParent()),n.__children||(n.__children=[]),o||(o=this.mockNode()),n.__children.push(o),this.rewriteCache();const r=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let s,n=o;if(n||(n=this.mockNode()),this.hot.runHooks("beforeAddChild",e,n,t),e){const o=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",o,1),e.__children.splice(t,null,n),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),s=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);n=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,n,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(e),s=this.getRowParent(o),n=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(s,n+1,null);break;case"above":this.addChildAtIndex(s,n,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const n=[];Array.isArray(e)?((0,s.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);n.push(this.getDataObject(t))})),(0,s.rangeEach)(0,n.length-2,(e=>{this.detachFromParent(n[e],!1)})),o=n[n.length-1]):o=e;const r=this.getRowIndex(o),i=this.countChildren(o),l=this.getRowIndexWithinParent(o),a=this.getRowParent(o),h=this.getRowParent(a),d=this.getRowIndex(h);let c=null;if(this.hot.runHooks("beforeDetachChild",a,o),null!=l){const e=Array.from(new Array(r+i+1).keys()).splice(-1*(i+1));if(this.hot.runHooks("beforeRemoveRow",r,i+1,e,this.plugin.pluginName),a.__children.splice(l,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",r,i+1,e,this.plugin.pluginName),h){c=d+this.countChildren(h);const e=this.getChild(h,this.countChildren(h)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,i+1,this.plugin.pluginName),h.__children.push(o)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,i+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,i+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const s=[];(0,r.arrayEach)(o,(e=>{s.push(this.getDataObject(e))})),(0,r.arrayEach)(s,(e=>{const t=this.getRowIndexWithinParent(e),o=this.getRowParent(e);null===o?this.data.splice(t,1):o.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,o){const s=this.getDataObject(e-1);let n=null,r=e;s&&s.__children&&0===s.__children.length?(n=s,r=0):e<this.countAllRows()&&(n=this.getRowParent(e),r=this.getRowIndexWithinParent(e)),n?o?n.__children.splice(r,t,...o):n.__children.splice(r,t):o?this.data.splice(r,t,...o):this.data.splice(r,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=null;do{o=this.getRowParent(o),null!==o&&(t=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,s){const n=t===this.hot.countRows(),r=this.getRowParent(e),i=this.getRowIndexWithinParent(e),l=r.__children.slice(i,i+1),a=e>t;let h=n?this.getRowParent(t-1):this.getRowParent(t);null==h&&(h=this.getRowParent(t-1)),null==h&&(h=this.getDataObject(t-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(t),h.__children=[]);const d=n||o||s?h.__children.length:this.getRowIndexWithinParent(t),c=r===h;h.__children.splice(d,0,l[0]),r.__children.splice(i+(a&&c?1:0),1),this.syncRowWithRawSource(r),c||this.syncRowWithRawSource(h)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},93363:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54842);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedRows=s.NestedRows},54842:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(36026),r=s(o(19508)),i=s(o(48907)),l=s(o(909)),a=s(o(27757)),h=o(69173),d=o(65320),c=o(33165),u=s(o(27170));o(23118);const g=t.PLUGIN_KEY="nestedRows",f=t.PLUGIN_PRIORITY=300,p=g,m=new WeakMap;class C extends n.BasePlugin{static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}constructor(e){super(e),this.dataManager=null,this.headersUI=null,this.collapsedRowsMap=null,m.set(this,{movedToCollapsed:!1,skipRender:null,skipCoreAPIModifiers:!1})}isEnabled(){return!!this.hot.getSettings()[g]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new c.TrimmingMap),this.dataManager=new r.default(this,this.hot),this.collapsingUI=new i.default(this,this.hot),this.headersUI=new l.default(this,this.hot),this.contextMenuUI=new a.default(this,this.hot),this.rowMoveController=new u.default(this),this.addHook("afterInit",(function(){return e.onAfterInit(...arguments)})),this.addHook("beforeViewRender",(function(){return e.onBeforeViewRender(...arguments)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){return e.onFilterData(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){return e.onAfterContextMenuDefaultOptions(...arguments)})),this.addHook("afterGetRowHeader",(function(){return e.onAfterGetRowHeader(...arguments)})),this.addHook("beforeOnCellMouseDown",(function(){return e.onBeforeOnCellMouseDown(...arguments)})),this.addHook("beforeRemoveRow",(function(){return e.onBeforeRemoveRow(...arguments)})),this.addHook("afterRemoveRow",(function(){return e.onAfterRemoveRow(...arguments)})),this.addHook("beforeAddChild",(function(){return e.onBeforeAddChild(...arguments)})),this.addHook("afterAddChild",(function(){return e.onAfterAddChild(...arguments)})),this.addHook("beforeDetachChild",(function(){return e.onBeforeDetachChild(...arguments)})),this.addHook("afterDetachChild",(function(){return e.onAfterDetachChild(...arguments)})),this.addHook("modifyRowHeaderWidth",(function(){return e.onModifyRowHeaderWidth(...arguments)})),this.addHook("afterCreateRow",(function(){return e.onAfterCreateRow(...arguments)})),this.addHook("beforeRowMove",(function(){return e.onBeforeRowMove(...arguments)})),this.addHook("beforeLoadData",(e=>this.onBeforeLoadData(e))),this.addHook("beforeUpdateData",(e=>this.onBeforeLoadData(e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if(-1===e.col&&e.row>=0){const t=this.collapsingUI.translateTrimmedRow(e.row);this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t)}},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:p})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(p)}onBeforeRowMove(e,t,o,s){return this.rowMoveController.onBeforeRowMove(e,t,o,s)}disableCoreAPIModifiers(){m.get(this).skipCoreAPIModifiers=!0}enableCoreAPIModifiers(){m.get(this).skipCoreAPIModifiers=!1}onBeforeOnCellMouseDown(e,t,o){this.collapsingUI.toggleState(e,t,o)}onModifyRowData(e){if(!m.get(this).skipCoreAPIModifiers)return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!m.get(this).skipCoreAPIModifiers)return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return!(!m.get(this).skipCoreAPIModifiers&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,o),!1)}onFilterData(e,t,o){const s=m.get(this);return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*t),this.dataManager.filterData(e,t,o),s.skipRender=!0,this.dataManager.getData().slice()}onAfterContextMenuDefaultOptions(e){return this.contextMenuUI.appendOptions(e)}onAfterGetRowHeader(e,t){this.headersUI.appendLevelIndicators(e,t)}onModifyRowHeaderWidth(e){return this.headersUI.rowHeaderWidthCache||e}onAfterRemoveRow(e,t,o,s){if(s===this.pluginName)return;const n=m.get(this);setTimeout((()=>{n.skipRender=null,this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}),0)}onBeforeRemoveRow(e,t,o){const s=Array.from(o.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const o=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(o)&&o.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));o.length=0,o.push(...s)}onBeforeAddChild(){this.collapsingUI.collapsedRowsStash.stash()}onAfterAddChild(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}onBeforeDetachChild(){this.collapsingUI.collapsedRowsStash.stash()}onAfterDetachChild(e,t,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}onAfterCreateRow(){this.dataManager.rewriteCache()}onAfterInit(){this.headersUI.updateRowHeaderWidth()}onBeforeViewRender(e,t){m.get(this).skipRender&&(t.skipRender=!0)}destroy(){super.destroy()}onBeforeLoadData(e){if(!(0,d.isArrayOfObjects)(e))return(0,h.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[g]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}}t.NestedRows=C},78575:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(e,t){this.hot=t,this.plugin=e}}},48907:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=o(24449),r=o(50095),i=o(68145),l=o(83302),a=s(o(78575)),h=s(o(909));class d extends a.default{constructor(e,t){var o;super(e,t),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,e)},shiftStash:function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,r.arrayEach)(o.lastCollapsedRows,((n,r)=>{n>=e&&n<t&&(o.lastCollapsedRows[r]=n+s)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,e),o.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,i.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,i=null,l=null;return isNaN(e)?(n=e,i=this.dataManager.getRowIndex(n)):(n=this.dataManager.getDataObject(e),i=e),this.dataManager.hasChildren(n)&&(0,r.arrayEach)(n.__children,(e=>{s.push(this.dataManager.getRowIndex(e))})),l=this.collapseRows(s,!0,!1),o&&this.trimRows(l),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(i)&&this.collapsedRows.push(i),l}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.collapseChildren(e,!1,!1))})),o&&this.trimRows(s),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.collapseChildRows(e,s)})),o&&this.trimRows(s),s}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{const o=this.dataManager.getRowIndex(e);t.push(o),this.collapseChildRows(o,t)}))}o&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.expandChildRows(e,s)})),o&&this.untrimRows(s),s}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const o=this.dataManager.getRowIndex(e);t.push(o),this.expandChildRows(o,t)}}))}o&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let n=null,i=null,l=null;return isNaN(e)?(n=e,i=this.dataManager.getRowIndex(e)):(n=this.dataManager.getDataObject(e),i=e),this.collapsedRows.splice(this.collapsedRows.indexOf(i),1),this.dataManager.hasChildren(n)&&(0,r.arrayEach)(n.__children,(e=>{const t=this.dataManager.getRowIndex(e);s.push(t)})),l=this.expandRows(s,!0,!1),o&&this.untrimRows(l),t&&this.renderAndAdjust(),l}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.expandChildren(e,!1,!1))})),o&&this.untrimRows(s),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,r.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return o=!1,!1})),o}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);(0,l.hasClass)(e.target,h.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,n.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}t.default=d},27757:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(68145),r=o(50095),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=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},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}(o(77516)),l=s(o(78575));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const h=new WeakMap;class d extends l.default{constructor(e,t){super(e,t),h.set(this,{row_above:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"below")}}),this.dataManager=this.plugin.dataManager}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,n.rangeEach)(0,e.items.length-1,(o=>{if(0===o)return(0,r.arrayEach)(t,((t,s)=>{e.items.splice(o+s,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){const t=h.get(this);return(0,n.rangeEach)(0,e.items.length-1,(o=>{const s=t[e.items[o].key];null!=s&&(e.items[o].callback=s)})),e}}t.default=d},909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(50095),r=o(68145),i=o(83302),l=s(o(78575)),a=o(5386),h=o(77516);class d extends l.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),s=this.dataManager.getRowLevel(o),l=this.dataManager.getDataObject(o),c=t.getElementsByTagName("DIV")[0],u=c.querySelector("span.rowHeader"),g=c.querySelectorAll('[class^="ht_nesting"]'),f=this.hot.getSettings().ariaTags;if((0,n.arrayEach)(g,(e=>{e&&c.removeChild(e)})),(0,i.addClass)(t,d.CSS_CLASSES.indicatorContainer),s){const{rootDocument:e}=this.hot,t=u.cloneNode(!0);c.innerHTML="",(0,r.rangeEach)(0,s-1,(()=>{const t=e.createElement("SPAN");(0,i.addClass)(t,d.CSS_CLASSES.emptyIndicator),c.appendChild(t)})),c.appendChild(t)}if(this.dataManager.hasChildren(l)){const e=this.hot.rootDocument.createElement("DIV");f&&(0,i.setAttribute)(e,[(0,a.A11Y_HIDDEN)()]),(0,i.addClass)(t,d.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,i.addClass)(e,`${d.CSS_CLASSES.button} ${d.CSS_CLASSES.expandButton}`),f&&(0,i.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!1),(0,a.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(h.ROW_HEADER_DESCRIPTION_EXPAND_ROW))])):((0,i.addClass)(e,`${d.CSS_CLASSES.button} ${d.CSS_CLASSES.collapseButton}`),f&&(0,i.setAttribute)(t,[(0,a.A11Y_EXPANDED)(!0),(0,a.A11Y_DESCRIPTION)(this.hot.getTranslatedPhrase(h.ROW_HEADER_DESCRIPTION_COLLAPSE_ROW))])),c.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}t.default=d},27170:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(93315),n=o(69173),r=o(28236);t.default=class{constructor(e){this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,o,s){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:s}))return!1;this.movedToCollapsed=!1;const n=o===this.hot.countRows(),r=n?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let i=!0;const l=e.map((e=>{if(!i)return!1;const t=this.dataManager.translateTrimmedRow(e);return i=this.shouldAllowMoving(t,r),t})),a=-1===l.indexOf(r);if(!i||!a)return!1;const h=this.getBaseParent(l),d=this.getTargetParent(n,r),c=h===d;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(d),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,r,c),this.moveRows(l,r,d),this.dataManager.rewriteCache(),this.moveCellsMeta(l,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,s,s&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:i,movePossible:l}=e;let a=!1;return(0,s.isUndefined)(i)&&((0,n.warn)(r.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
84
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,i,l,!1),a=!0),a}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return null==o&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const s=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,s)}))}))}moveCellsMeta(e,t){const o=[],s=Math.max(...e)<t;e.forEach((e=>{o.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(s?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let s=0,n=0,r=null,i=null;if(this.movedToCollapsed){let r=null;r=e[o-1]<t?this.dataManager.translateTrimmedRow(t-o):this.dataManager.translateTrimmedRow(t);const i=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),l=this.dataManager.getRowIndex(i);s=this.dataManager.untranslateTrimmedRow(l),n=s}else e[o-1]<t?(n=t-1,s=n-o+1):(s=t,n=s+o-1);r=this.hot.selection,i=this.hot.countCols()-1,r.setRangeStart(this.hot._createCellCoords(s,0)),r.setRangeEnd(this.hot._createCellCoords(n,i),!0)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}}},94870:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84340);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.PersistentState=s.PersistentState},84340:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(36026),r=s(o(40209)),i=s(o(56307));i.default.getSingleton().register("persistentStateSave"),i.default.getSingleton().register("persistentStateLoad"),i.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",a=t.PLUGIN_PRIORITY=0;class h extends n.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}constructor(e){super(e),this.storage=void 0}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new r.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=h},40209:(e,t,o)=>{"use strict";t.__esModule=!0,o(68983),o(63517);var s=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;this.rootWindow=t,this.prefix=e,this.savedKeys=[],this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const o=void 0===e?t:e,s=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===s?void 0:JSON.parse(s)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,s.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}},52036:(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...a.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!c(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===c(e)&&function(e,t,o){const n=(0,s.toUpperCaseFirst)(e);if(d.hasItem(n))throw new Error(l(n));void 0===o?h.addItem(n):a.addItem(o,n);d.addItem(n,t)}(e,t,o)},o(91683);var s=o(18609),n=o(21196),r=o(42386),i=o(57982);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}),d=(0,r.createUniqueMap)({errorIdExists:l});function c(e){const t=(0,s.toUpperCaseFirst)(e);return d.getItem(t)}},27885:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54249);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Search=s.Search},54249:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(36026),n=o(22232),r=o(68145),i=o(93315);const l=t.PLUGIN_KEY="search",a=t.PLUGIN_PRIORITY=190,h=function(e,t,o,s,n){e.getCellMeta(t,o).isSearchResult=n},d=function(e,t,o){return!((0,i.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,i.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(o.locale).indexOf(e.toLocaleLowerCase(o.locale)))};class c extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}constructor(e){super(e),this.callback=h,this.queryMethod=d,this.searchResultClass="htSearchResult"}isEnabled(){return this.hot.getSettings()[l]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[l];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){return e.onBeforeRenderer(...arguments)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){return e.onBeforeRenderer(...arguments)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const s=this.hot.countRows(),n=this.hot.countCols(),i=[],l=this.hot;return(0,r.rangeEach)(0,s-1,(s=>{(0,r.rangeEach)(0,n-1,(n=>{const r=this.hot.getDataAtCell(s,n),a=this.hot.getCellMeta(s,n),h=a.search.callback||t,d=(a.search.queryMethod||o)(e,r,a);if(d){const e={row:s,col:n,data:r};i.push(e)}h&&h(l,s,n,r,d)}))})),i}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,n.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}onBeforeRenderer(e,t,o,s,n,r){const i=r.className||[];let l=[];"string"==typeof i?l=i.split(" "):l.push(...i),this.isEnabled()&&r.isSearchResult?l.includes(this.searchResultClass)||l.push(`${this.searchResultClass}`):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),r.className=l.join(" ")}destroy(){super.destroy()}}t.Search=c},30450:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84310);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TouchScroll=s.TouchScroll},84310:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(83302),n=o(50095),r=o(36026),i=o(7374);const l=t.PLUGIN_KEY="touchScroll",a=t.PLUGIN_PRIORITY=200;class h extends r.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}static get SETTING_KEYS(){return!0}constructor(e){super(e),this.scrollbars=[],this.clones=[],this.lockedCollection=!1,this.freezeOverlays=!1}isEnabled(){return(0,i.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>this.onAfterViewRender())),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>this.onBeforeTouchScroll())),this.addHook("afterMomentumScroll",(()=>this.onAfterMomentumScroll()))}onAfterViewRender(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(o),s&&this.scrollbars.push(s),n&&n.clone&&this.scrollbars.push(n),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),n&&n.clone&&this.clones.push(n.clone.wtTable.holder.parentNode)}onBeforeTouchScroll(){this.freezeOverlays=!0,(0,n.arrayEach)(this.clones,(e=>{(0,s.addClass)(e,"hide-tween")}))}onAfterMomentumScroll(){this.freezeOverlays=!1,(0,n.arrayEach)(this.clones,(e=>{(0,s.removeClass)(e,"hide-tween"),(0,s.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,n.arrayEach)(this.clones,(e=>{(0,s.removeClass)(e,"show-tween")}))}),400),(0,n.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}}t.TouchScroll=h},95128:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65696);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TrimRows=s.TrimRows},65696:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(36026),n=o(33165),r=o(50095);const i=t.PLUGIN_KEY="trimRows",l=t.PLUGIN_PRIORITY=330;class a extends s.BasePlugin{static get PLUGIN_KEY(){return i}static get PLUGIN_PRIORITY(){return l}constructor(e){super(e),this.trimmedRowsMap=null}isEnabled(){return!!this.hot.getSettings()[i]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new n.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>this.onMapInit())),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[i];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,s,o,o&&s.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;const n=this.trimmedRowsMap.getValues().slice(),i=e.length>0;o&&i&&((0,r.arrayEach)(e,(e=>{n[e]=!1})),s=(0,r.arrayReduce)(n,((e,t,o)=>(t&&e.push(o),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,s,o&&i)&&(o&&i&&this.trimmedRowsMap.setValues(n),this.hot.runHooks("afterUntrimRow",t,s,o&&i,o&&s.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}onMapInit(){const e=this.hot.getSettings()[i];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}destroy(){super.destroy()}}t.TrimRows=a},77137:(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={__proto__:null},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]}return s.default=e,o&&o.set(e,s),s}(o(63704));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)}t.UndoRedo=s.default,t.PLUGIN_KEY=s.PLUGIN_KEY},63704:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(56307)),r=o(50095),i=o(68145),l=o(22232),a=o(80734);const h="undoRedo",d=t.PLUGIN_KEY="undoRedo";function c(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(o,s){const n=o&&o.length;if(!n)return;if(!o.find((e=>{const[,,t,o]=e;return t!==o})))return;t.done((()=>{const t=o.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,r.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const s=n>1?this.getSelected():[[t[0][0],t[0][1]]];return new c.ChangeAction(t,s)}),s)})),e.addHook("afterCreateRow",((e,o,s)=>{t.done((()=>new c.CreateRowAction(e,o)),s)})),e.addHook("beforeRemoveRow",((o,s,n,r)=>{t.done((()=>{const n=e.toPhysicalRow(o),r=(0,l.deepClone)(t.instance.getSourceData(n,0,n+s-1,t.instance.countSourceCols()-1));return new c.RemoveRowAction(n,r,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())}),r)})),e.addHook("afterCreateCol",((e,o,s)=>{t.done((()=>new c.CreateColumnAction(e,o)),s)})),e.addHook("beforeRemoveCol",((o,s,n,r)=>{t.done((()=>{const n=t.instance.getSourceDataArray(),r=(t.instance.countCols()+o)%t.instance.countCols(),l=[],a=[],h=[];(0,i.rangeEach)(n.length-1,(t=>{const o=[],a=n[t];(0,i.rangeEach)(r,r+(s-1),(t=>{o.push(a[e.toPhysicalColumn(t)])})),l.push(o)})),(0,i.rangeEach)(s-1,(t=>{h.push(e.toPhysicalColumn(r+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,i.rangeEach)(s-1,(t=>{a.push(e.getSettings().colHeaders[e.toPhysicalColumn(r+t)]||null)}));const d=e.columnIndexMapper.getIndexesSequence(),u=e.rowIndexMapper.getIndexesSequence();return new c.RemoveColumnAction(r,h,l,a,d,u,e.getSettings().fixedColumnsStart)}),r)})),e.addHook("beforeCellAlignment",((e,o,s,n)=>{t.done((()=>new c.CellAlignmentAction(e,o,s,n)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new c.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,o)=>{!1!==e&&t.done((()=>new c.RowMoveAction(e,o)))})),e.addHook("beforeMergeCells",((o,s)=>{s||t.done((()=>new c.MergeCellsAction(e,o)))})),e.addHook("afterUnmergeCells",((o,s)=>{s||t.done((()=>new c.UnmergeCellsAction(e,o)))})),e.addHook("afterInit",(()=>{t.init()}))}c.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const o=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",o,t))return;const s=e(),n=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",n),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice())},c.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const s=this,n=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",n),t.undo(this.instance,(()=>{s.ignoreNewActions=!1,s.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice()),this.instance.runHooks("afterUndo",o)}},c.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const s=this,n=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",n),t.redo(this.instance,(()=>{s.ignoreNewActions=!1,s.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.instance.runHooks("afterRedo",o)}},c.prototype.isUndoAvailable=function(){return this.doneActions.length>0},c.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},c.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},c.prototype.isEnabled=function(){return this.enabled},c.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",f)},c.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",f)},c.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},c.Action=function(){},c.Action.prototype.undo=function(){},c.Action.prototype.redo=function(){},c.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,l.inherit)(c.ChangeAction,c.Action),c.ChangeAction.prototype.undo=function(e,t){const o=(0,l.deepClone)(this.changes),s=e.countEmptyRows(!0),n=e.countEmptyCols(!0);for(let e=0,t=o.length;e<t;e++)o[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.undo");for(let t=0,r=o.length;t<r;t++){const[r,i]=o[t];e.getSettings().minSpareRows&&r+1+e.getSettings().minSpareRows===e.countRows()&&s===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(r+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&i+1+e.getSettings().minSpareCols===e.countCols()&&n===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(i+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},c.ChangeAction.prototype.redo=function(e,t){const o=(0,l.deepClone)(this.changes);for(let e=0,t=o.length;e<t;e++)o[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},c.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,l.inherit)(c.CreateRowAction,c.Action),c.CreateRowAction.prototype.undo=function(e,t){const o=e.countRows(),s=e.getSettings().minSpareRows;this.index>=o&&this.index-s<o&&(this.index-=s),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},c.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},c.RemoveRowAction=function(e,t,o,s,n){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=o,this.fixedRowsTop=s,this.rowIndexesSequence=n},(0,l.inherit)(c.RemoveRowAction,c.Action),c.RemoveRowAction.prototype.undo=function(e,t){const o=e.getSettings(),s=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((o=>{const n=parseInt(o,10);s.push([this.index+t,isNaN(n)?o:n,e[o]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(s,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},c.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},c.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,l.inherit)(c.CreateColumnAction,c.Action),c.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},c.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},c.RemoveColumnAction=function(e,t,o,s,n,r,i){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length,this.headers=s,this.columnPositions=n.slice(0),this.rowPositions=r.slice(0),this.actionType="remove_col",this.fixedColumnsStart=i},(0,l.inherit)(c.RemoveColumnAction,c.Action),c.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),s=(e,t,s)=>s[this.indexes.indexOf(o[t])],n=this.data.length,i=[];for(let e=0;e<n;e++)i.push((0,r.arrayMap)(this.data[e],s));const l=(0,r.arrayMap)(this.headers,s),a=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,r.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,r.arrayEach)(o,((o,s)=>{e[o]=i[t][s],a.push([t,o,e[o]])}))})),e.setSourceDataAtCell(a,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,r.arrayEach)(l,((t,s)=>{e.getSettings().colHeaders[o[s]]=t})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},c.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},c.CellAlignmentAction=function(e,t,o,s){this.stateBefore=e,this.range=t,this.type=o,this.alignment=s},c.CellAlignmentAction.prototype.undo=function(e,t){(0,r.arrayEach)(this.range,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&e.setCellMeta(t,o,"className",this.stateBefore[t][o]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},c.CellAlignmentAction.prototype.redo=function(e,t){(0,a.align)(this.range,this.type,this.alignment,((t,o)=>e.getCellMeta(t,o)),((t,o,s,n)=>e.setCellMeta(t,o,s,n))),e.addHookOnce("afterViewRender",t),e.render()},c.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,l.inherit)(c.FiltersAction,c.Action),c.FiltersAction.prototype.undo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),o.filter()},c.FiltersAction.prototype.redo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack),o.filter()};class u extends c.Action{constructor(e,t){super(),this.cellRange=t;const o=this.cellRange.getTopStartCorner(),s=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(o.row,o.col,s.row,s.col)}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const s=this.cellRange.getTopStartCorner();e.populateFromArray(s.row,s.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}}c.MergeCellsAction=u;class g extends c.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}}function f(e,t){if("loadData"===t)return this.undoRedo.clear()}c.UnmergeCellsAction=g,c.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,l.inherit)(c.RowMoveAction,c.Action),c.RowMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualRowMove"),s=[].concat(this.rows),n=s.filter((e=>e>this.finalIndex)),r=s.filter((e=>e<=this.finalIndex)),i=n.sort(((e,t)=>t-e)).concat(r.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<i.length;t+=1){const s=e.toVisualRow(i[t]);o.moveRow(s,i[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},c.RowMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},c.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},c.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:h};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},c.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const p=n.default.getSingleton();p.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),p.register("beforeUndo"),p.register("afterUndo"),p.register("beforeRedo"),p.register("afterRedo"),c.PLUGIN_KEY=d,c.SETTING_KEYS=!0;t.default=c},62929:(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(74465);t.registerAllEditors=s.registerAllEditors;var n=o(42418);t.registerAllRenderers=n.registerAllRenderers;var r=o(12630);t.registerAllValidators=r.registerAllValidators;var i=o(74319);t.registerAllCellTypes=i.registerAllCellTypes;var l=o(40106);t.registerAllPlugins=l.registerAllPlugins},1470:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.autocompleteRenderer=d;var n=o(95025),r=o(50695),i=s(o(75244)),l=o(83302);o(67004);var a=o(5386);const h=t.RENDERER_TYPE="autocomplete";function d(e,t,o,s,h,d,c){const{rootDocument:u}=e,g=c.allowHtml?n.htmlRenderer:r.textRenderer,f=u.createElement("DIV"),p=e.getSettings().ariaTags;if(f.className="htAutocompleteArrow",p&&f.setAttribute(...(0,a.A11Y_HIDDEN)()),f.appendChild(u.createTextNode(String.fromCharCode(9660))),g.apply(this,[e,t,o,s,h,d,c]),t.firstChild||t.appendChild(u.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,l.addClass)(t,"htAutocomplete"),p&&t.setAttribute(...(0,a.A11Y_HASPOPUP)("listbox")),!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()}))}}d.RENDERER_TYPE=h},16124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1470);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},24945:(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=i,o(63517);var s=o(83302),n=o(5386);const r=t.RENDERER_TYPE="base";function i(e,t,o,r,i,l,a){const h=a.ariaTags,d=[],c=[],u=[],g=[];a.className&&(0,s.addClass)(t,a.className),a.readOnly?(d.push(a.readOnlyCellClassName),h&&g.push((0,n.A11Y_READONLY)())):h&&u.push((0,n.A11Y_READONLY)()[0]),!1===a.valid&&a.invalidCellClassName?(d.push(a.invalidCellClassName),h&&g.push((0,n.A11Y_INVALID)())):(c.push(a.invalidCellClassName),h&&u.push((0,n.A11Y_INVALID)()[0])),!1===a.wordWrap&&a.noWordWrapClassName&&d.push(a.noWordWrapClassName),!l&&a.placeholder&&d.push(a.placeholderCellClassName),(0,s.removeClass)(t,c),(0,s.addClass)(t,d),(0,s.removeAttribute)(t,u),(0,s.setAttribute)(t,g)}i.RENDERER_TYPE=r},60686:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24945);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},41901:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.checkboxRenderer=E,o(63517);var n=o(60686),r=s(o(75244)),i=o(83302),l=o(93315),a=o(29282),h=s(o(56307)),d=o(5386),c=o(77516);o(51768);const u=new WeakMap,g=new WeakMap,f="htBadValue",p="data-row",m="data-col",C="checkboxRenderer",w=t.RENDERER_TYPE="checkbox";function E(e,t,o,s,h,w,E){const{rootDocument:v}=e,y=e.getSettings().ariaTags;n.baseRenderer.apply(this,[e,t,o,s,h,w,E]),function(e){let t=g.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(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),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(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),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))),g.set(e,t)}}(e);let R=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)}(v);const _=E.label;let b=!1;if(void 0===E.checkedTemplate&&(E.checkedTemplate=!0),void 0===E.uncheckedTemplate&&(E.uncheckedTemplate=!1),(0,i.empty)(t),w===E.checkedTemplate||(0,l.stringify)(w).toLocaleLowerCase(E.locale)===(0,l.stringify)(E.checkedTemplate).toLocaleLowerCase(E.locale)?R.checked=!0:w===E.uncheckedTemplate||(0,l.stringify)(w).toLocaleLowerCase(E.locale)===(0,l.stringify)(E.uncheckedTemplate).toLocaleLowerCase(E.locale)?R.checked=!1:(0,l.isEmpty)(w)?(0,i.addClass)(R,"noValue"):(R.style.display="none",(0,i.addClass)(R,f),b=!0),(0,i.setAttribute)(R,[[p,o],[m,s]]),y&&(0,i.setAttribute)(R,[(0,d.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,d.A11Y_CHECKED)(R.checked),(0,d.A11Y_CHECKBOX)()]),!b&&_){let n="";if(_.value)n="function"==typeof _.value?_.value.call(this,o,s,h,w):_.value;else if(_.property){const t=e.getDataAtRowProp(o,_.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)}(v,n,!0!==_.separated);"before"===_.position?_.separated?(t.appendChild(r),t.appendChild(R)):(r.appendChild(R),R=r):_.position&&"after"!==_.position||(_.separated?(t.appendChild(R),t.appendChild(r)):(r.insertBefore(R,r.firstChild),R=r))}function T(){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 M(){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}}(!_||_&&!_.separated)&&t.appendChild(R),b&&t.appendChild(v.createTextNode("#bad-value#")),u.has(e)||(u.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:C};t.addShortcuts([{keys:[["space"]],callback:()=>(T(),!M())},{keys:[["enter"]],callback:()=>(T(),!M()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(T(!0),!M()),relativeToGroup:a.EDITOR_EDIT_GROUP,position:"before"}],o)}())}function S(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:n,row:r,column:i,prop:l}=t;if(n===w){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}})),E.RENDERER_TYPE=w},8877:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(41901);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},22137:(e,t,o)=>{"use strict";t.__esModule=!0,t.dateRenderer=l;var s=o(16124),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="date";function l(e,t,o,i,l,a,h){s.autocompleteRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,[(0,n.A11Y_HASPOPUP)("dialog"),(0,n.A11Y_EXPANDED)("false")])}l.RENDERER_TYPE=i},56522:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22137);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dateRenderer=s.dateRenderer},33979:(e,t,o)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=l;var s=o(16124),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="handsontable";function l(e,t,o,i,l,a,h){s.autocompleteRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,[(0,n.A11Y_HASPOPUP)("true"),(0,n.A11Y_EXPANDED)("false")])}l.RENDERER_TYPE=i},67981:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33979);t.RENDERER_TYPE=s.RENDERER_TYPE,t.handsontableRenderer=s.handsontableRenderer},91897:(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=i;var s=o(60686),n=o(83302);const r=t.RENDERER_TYPE="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)}i.RENDERER_TYPE=r},95025:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(91897);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},42418:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,c.registerRenderer)(s.autocompleteRenderer),(0,c.registerRenderer)(n.baseRenderer),(0,c.registerRenderer)(r.checkboxRenderer),(0,c.registerRenderer)(i.htmlRenderer),(0,c.registerRenderer)(l.numericRenderer),(0,c.registerRenderer)(a.passwordRenderer),(0,c.registerRenderer)(h.textRenderer),(0,c.registerRenderer)(d.timeRenderer)};var s=o(16124);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var n=o(60686);t.baseRenderer=n.baseRenderer,t.BASE_RENDERER=n.RENDERER_TYPE;var r=o(8877);t.checkboxRenderer=r.checkboxRenderer,t.CHECKBOX_RENDERER=r.RENDERER_TYPE;var i=o(95025);t.htmlRenderer=i.htmlRenderer,t.HTML_RENDERER=i.RENDERER_TYPE;var l=o(78416);t.numericRenderer=l.numericRenderer,t.NUMERIC_RENDERER=l.RENDERER_TYPE;var a=o(76978);t.passwordRenderer=a.passwordRenderer,t.PASSWORD_RENDERER=a.RENDERER_TYPE;var h=o(50695);t.textRenderer=h.textRenderer,t.TEXT_RENDERER=h.RENDERER_TYPE;var d=o(43853);t.timeRenderer=d.timeRenderer,t.TIME_RENDERER=d.RENDERER_TYPE;var c=o(7462);t.registerRenderer=c.registerRenderer,t.getRegisteredRendererNames=c.getRegisteredRendererNames,t.getRegisteredRenderers=c.getRegisteredRenderers,t.getRenderer=c.getRenderer,t.hasRenderer=c.hasRenderer},78416:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77635);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer},77635:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.numericRenderer=a,o(63517);var n=s(o(3333)),r=o(50695),i=o(68145);const l=t.RENDERER_TYPE="numeric";function a(e,t,o,s,l,a,h){let d=a;if((0,i.isNumeric)(d)){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),d=(0,n.default)(d).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,d,h)}a.RENDERER_TYPE=l},76978:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58486);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},58486:(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=l;var s=o(50695),n=o(83302),r=o(68145);const i=t.RENDERER_TYPE="password";function l(e,t,o,i,l,a,h){s.textRenderer.apply(this,[e,t,o,i,l,a,h]);const d=h.hashLength||t.innerHTML.length,c=h.hashSymbol||"*";let u="";(0,r.rangeEach)(d-1,(()=>{u+=c})),(0,n.fastInnerHTML)(t,u)}l.RENDERER_TYPE=i},7462:(e,t,o)=>{"use strict";var s=o(73203);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(91683);var n=s(o(63800));const{register:r,getItem:i,hasItem:l,getNames:a,getValues:h}=(0,n.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=a,t.hasRenderer=l},73619:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33845);t.RENDERER_TYPE=s.RENDERER_TYPE,t.selectRenderer=s.selectRenderer},33845:(e,t,o)=>{"use strict";t.__esModule=!0,t.selectRenderer=l;var s=o(50695),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="select";function l(e,t,o,i,l,a,h){s.textRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,...(0,n.A11Y_HASPOPUP)("listbox"))}l.RENDERER_TYPE=i},50695:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84249);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},84249:(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=l;var s=o(60686),n=o(83302),r=o(93315);const i=t.RENDERER_TYPE="text";function l(e,t,o,i,l,a,h){s.baseRenderer.apply(this,[e,t,o,i,l,a,h]);let d=a;if(!d&&h.placeholder&&(d=h.placeholder),d=(0,r.stringify)(d),h.trimWhitespace&&(d=d.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,d)}l.RENDERER_TYPE=i},43853:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98706);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},98706:(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=r;var s=o(50695);const n=t.RENDERER_TYPE="time";function r(e,t,o,n,r,i,l){s.textRenderer.apply(this,[e,t,o,n,r,i,l]),t.dir="ltr"}r.RENDERER_TYPE=n},43395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var n=s(o(93231)),r=o(32838),i=o(83692),l=o(45951),a=o(39191),h=o(55730),d=o(84380),c=o(520),u=o(73193),g=o(10450),f=o(21280);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(50095);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 E=new WeakSet;m=Symbol.iterator;function S(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}t.default=class{constructor(e){C(this,E),(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,c.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,E,S).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,E,S).call(this,this.areas,l.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,E,S).call(this,this.rowHeaders,u.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,E,S).call(this,this.columnHeaders,u.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,E,S).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,E,S).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,E,S).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,E,S).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,E,S).call(this,this.columnHighlights,a.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,d.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]()}}},32838:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},45951:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},83692:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},39191:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},84380:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},520:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},55730:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},73193:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},10450:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},76337:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(21280);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)}}t.default=i},69167:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(35750));t.Selection=r.default;var i=o(50743);t.handleMouseEvent=i.handleMouseEvent;var l=o(69248);t.detectSelectionType=l.detectSelectionType,t.normalizeSelectionFactory=l.normalizeSelectionFactory;var a=o(43395);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]))}))},50743:(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(24449);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(),d=r.isSelectedByRowHeader();if(t&&a)n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(n):(h||d)&&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)):d&&n.col<0&&!i.row?r.setRangeEnd(l(n.row,a.to.col)):(!h&&!d&&n.col<0||h&&n.col<0)&&!i.row?r.selectRows(Math.max(a.from.row,0),n.row,n.col):(!h&&!d&&n.row<0||d&&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,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}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]])},16570:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);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]()}}t.default=s},35750:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=s(o(48427)),i=s(o(42538)),l=o(21280),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=E(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},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}(o(43395)),h=s(o(16570)),d=o(22232),c=o(93315),u=o(68145),g=o(50095),f=s(o(65718)),p=s(o(31778)),m=o(69248),C=o(28236),w=o(5386);function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(E=function(e){return e?o:t})(e)}function S(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 v=new WeakMap;class y{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 h.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),S(this,v,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,headerAttributes:[(0,w.A11Y_SELECTED)()],activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,w.A11Y_SELECTED)()],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 p.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)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeColumnWrap",...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,c.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),i),(!n||n&&!r&&(0,c.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(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const h=this.getLayerLevel();h<this.highlight.layerLevel&&((0,g.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(h);const d=this.highlight.createArea(),c=this.highlight.createLayeredArea(),u=this.highlight.createRowHeader(),f=this.highlight.createColumnHeader(),p=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),C=this.highlight.createActiveCornerHeader(),w=this.highlight.createRowHighlight(),E=this.highlight.createColumnHighlight();if(d.clear(),c.clear(),u.clear(),f.clear(),p.clear(),m.clear(),C.clear(),w.clear(),E.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,r.highlight)&&(this.isMultiple()||h>=1)&&(d.add(r.from).add(r.to).commit(),c.add(r.from).add(r.to).commit(),1===h)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(h-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(h)}if(this.highlight.isEnabledFor(a.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(),f.add(o).commit(),w.add(e).commit(),E.add(o).commit()):(u.add(e).add(t).commit(),f.add(o).add(s).commit(),w.add(e).add(t).commit(),E.add(o).add(s).commit())}const e=!(0,i.default)(this,v)&&this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,v)&&this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&this.isSelectedByColumnHeader());e&&p.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&&m.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&&C.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,d.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]:{focusPosition:!1,disableHeadersHighlight:!1};const n=this.tableProps.countRows(),i=this.tableProps.countCols(),l=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),h=o?-a:0,d=t?-l:0;if(0===h&&0===d&&(0===n||0===i))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:g,disableHeadersHighlight:f}=s;(0,r.default)(this,v,f),g&&Number.isInteger(null==g?void 0:g.row)&&Number.isInteger(null==g?void 0:g.col)&&(c=this.tableProps.createCellCoords((0,u.clamp)(g.row,h,n-1),(0,u.clamp)(g.col,d,i-1)));const p=this.tableProps.createCellCoords(h,d),m=this.tableProps.createCellCoords(n-1,i-1);this.clear(),this.setRangeStartOnly(p,void 0,c),d<0&&this.selectedByRowHeader.add(this.getLayerLevel()),h<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,r.default)(this,v,!1)}selectCells(e){const t=(0,m.detectSelectionType)(e);if(t===m.SELECTION_TYPE_EMPTY)return!1;if(t===m.SELECTION_TYPE_UNRECOGNIZED)throw new Error(C.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
84
+ when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,i,l,!1),a=!0),a}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return null==o&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const s=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,s)}))}))}moveCellsMeta(e,t){const o=[],s=Math.max(...e)<t;e.forEach((e=>{o.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(s?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let s=0,n=0,r=null,i=null;if(this.movedToCollapsed){let r=null;r=e[o-1]<t?this.dataManager.translateTrimmedRow(t-o):this.dataManager.translateTrimmedRow(t);const i=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),l=this.dataManager.getRowIndex(i);s=this.dataManager.untranslateTrimmedRow(l),n=s}else e[o-1]<t?(n=t-1,s=n-o+1):(s=t,n=s+o-1);r=this.hot.selection,i=this.hot.countCols()-1,r.setRangeStart(this.hot._createCellCoords(s,0)),r.setRangeEnd(this.hot._createCellCoords(n,i),!0)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}}},94870:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84340);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.PersistentState=s.PersistentState},84340:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=o(36026),r=s(o(40209)),i=s(o(56307));i.default.getSingleton().register("persistentStateSave"),i.default.getSingleton().register("persistentStateLoad"),i.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",a=t.PLUGIN_PRIORITY=0;class h extends n.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}constructor(e){super(e),this.storage=void 0}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new r.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=h},40209:(e,t,o)=>{"use strict";t.__esModule=!0,o(68983),o(63517);var s=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;this.rootWindow=t,this.prefix=e,this.savedKeys=[],this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const o=void 0===e?t:e,s=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===s?void 0:JSON.parse(s)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,s.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}},52036:(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...a.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!c(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===c(e)&&function(e,t,o){const n=(0,s.toUpperCaseFirst)(e);if(d.hasItem(n))throw new Error(l(n));void 0===o?h.addItem(n):a.addItem(o,n);d.addItem(n,t)}(e,t,o)},o(91683);var s=o(18609),n=o(21196),r=o(42386),i=o(57982);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}),d=(0,r.createUniqueMap)({errorIdExists:l});function c(e){const t=(0,s.toUpperCaseFirst)(e);return d.getItem(t)}},27885:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54249);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Search=s.Search},54249:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(36026),n=o(22232),r=o(68145),i=o(93315);const l=t.PLUGIN_KEY="search",a=t.PLUGIN_PRIORITY=190,h=function(e,t,o,s,n){e.getCellMeta(t,o).isSearchResult=n},d=function(e,t,o){return!((0,i.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,i.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(o.locale).indexOf(e.toLocaleLowerCase(o.locale)))};class c extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}constructor(e){super(e),this.callback=h,this.queryMethod=d,this.searchResultClass="htSearchResult"}isEnabled(){return this.hot.getSettings()[l]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[l];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){return e.onBeforeRenderer(...arguments)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){return e.onBeforeRenderer(...arguments)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const s=this.hot.countRows(),n=this.hot.countCols(),i=[],l=this.hot;return(0,r.rangeEach)(0,s-1,(s=>{(0,r.rangeEach)(0,n-1,(n=>{const r=this.hot.getDataAtCell(s,n),a=this.hot.getCellMeta(s,n),h=a.search.callback||t,d=(a.search.queryMethod||o)(e,r,a);if(d){const e={row:s,col:n,data:r};i.push(e)}h&&h(l,s,n,r,d)}))})),i}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,n.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}onBeforeRenderer(e,t,o,s,n,r){const i=r.className||[];let l=[];"string"==typeof i?l=i.split(" "):l.push(...i),this.isEnabled()&&r.isSearchResult?l.includes(this.searchResultClass)||l.push(`${this.searchResultClass}`):l.includes(this.searchResultClass)&&l.splice(l.indexOf(this.searchResultClass),1),r.className=l.join(" ")}destroy(){super.destroy()}}t.Search=c},30450:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84310);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TouchScroll=s.TouchScroll},84310:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(83302),n=o(50095),r=o(36026),i=o(7374);const l=t.PLUGIN_KEY="touchScroll",a=t.PLUGIN_PRIORITY=200;class h extends r.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return a}static get SETTING_KEYS(){return!0}constructor(e){super(e),this.scrollbars=[],this.clones=[],this.lockedCollection=!1,this.freezeOverlays=!1}isEnabled(){return(0,i.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>this.onAfterViewRender())),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>this.onBeforeTouchScroll())),this.addHook("afterMomentumScroll",(()=>this.onAfterMomentumScroll()))}onAfterViewRender(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(o),s&&this.scrollbars.push(s),n&&n.clone&&this.scrollbars.push(n),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),n&&n.clone&&this.clones.push(n.clone.wtTable.holder.parentNode)}onBeforeTouchScroll(){this.freezeOverlays=!0,(0,n.arrayEach)(this.clones,(e=>{(0,s.addClass)(e,"hide-tween")}))}onAfterMomentumScroll(){this.freezeOverlays=!1,(0,n.arrayEach)(this.clones,(e=>{(0,s.removeClass)(e,"hide-tween"),(0,s.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,n.arrayEach)(this.clones,(e=>{(0,s.removeClass)(e,"show-tween")}))}),400),(0,n.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}}t.TouchScroll=h},95128:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65696);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TrimRows=s.TrimRows},65696:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(36026),n=o(33165),r=o(50095);const i=t.PLUGIN_KEY="trimRows",l=t.PLUGIN_PRIORITY=330;class a extends s.BasePlugin{static get PLUGIN_KEY(){return i}static get PLUGIN_PRIORITY(){return l}constructor(e){super(e),this.trimmedRowsMap=null}isEnabled(){return!!this.hot.getSettings()[i]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new n.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>this.onMapInit())),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[i];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,s,o,o&&s.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;const n=this.trimmedRowsMap.getValues().slice(),i=e.length>0;o&&i&&((0,r.arrayEach)(e,(e=>{n[e]=!1})),s=(0,r.arrayReduce)(n,((e,t,o)=>(t&&e.push(o),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,s,o&&i)&&(o&&i&&this.trimmedRowsMap.setValues(n),this.hot.runHooks("afterUntrimRow",t,s,o&&i,o&&s.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}onMapInit(){const e=this.hot.getSettings()[i];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}destroy(){super.destroy()}}t.TrimRows=a},77137:(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={__proto__:null},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]}return s.default=e,o&&o.set(e,s),s}(o(63704));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)}t.UndoRedo=s.default,t.PLUGIN_KEY=s.PLUGIN_KEY},63704:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var n=s(o(56307)),r=o(50095),i=o(68145),l=o(22232),a=o(80734);const h="undoRedo",d=t.PLUGIN_KEY="undoRedo";function c(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(o,s){const n=o&&o.length;if(!n)return;if(!o.find((e=>{const[,,t,o]=e;return t!==o})))return;t.done((()=>{const t=o.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,r.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const s=n>1?this.getSelected():[[t[0][0],t[0][1]]];return new c.ChangeAction(t,s)}),s)})),e.addHook("afterCreateRow",((e,o,s)=>{t.done((()=>new c.CreateRowAction(e,o)),s)})),e.addHook("beforeRemoveRow",((o,s,n,r)=>{t.done((()=>{const n=e.toPhysicalRow(o),r=(0,l.deepClone)(t.instance.getSourceData(n,0,n+s-1,t.instance.countSourceCols()-1));return new c.RemoveRowAction(n,r,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())}),r)})),e.addHook("afterCreateCol",((e,o,s)=>{t.done((()=>new c.CreateColumnAction(e,o)),s)})),e.addHook("beforeRemoveCol",((o,s,n,r)=>{t.done((()=>{const n=t.instance.getSourceDataArray(),r=(t.instance.countCols()+o)%t.instance.countCols(),l=[],a=[],h=[];(0,i.rangeEach)(n.length-1,(t=>{const o=[],a=n[t];(0,i.rangeEach)(r,r+(s-1),(t=>{o.push(a[e.toPhysicalColumn(t)])})),l.push(o)})),(0,i.rangeEach)(s-1,(t=>{h.push(e.toPhysicalColumn(r+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,i.rangeEach)(s-1,(t=>{a.push(e.getSettings().colHeaders[e.toPhysicalColumn(r+t)]||null)}));const d=e.columnIndexMapper.getIndexesSequence(),u=e.rowIndexMapper.getIndexesSequence();return new c.RemoveColumnAction(r,h,l,a,d,u,e.getSettings().fixedColumnsStart)}),r)})),e.addHook("beforeCellAlignment",((e,o,s,n)=>{t.done((()=>new c.CellAlignmentAction(e,o,s,n)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new c.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,o)=>{!1!==e&&t.done((()=>new c.RowMoveAction(e,o)))})),e.addHook("beforeMergeCells",((o,s)=>{s||t.done((()=>new c.MergeCellsAction(e,o)))})),e.addHook("afterUnmergeCells",((o,s)=>{s||t.done((()=>new c.UnmergeCellsAction(e,o)))})),e.addHook("afterInit",(()=>{t.init()}))}c.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const o=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",o,t))return;const s=e(),n=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",n),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice())},c.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const s=this,n=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",n),t.undo(this.instance,(()=>{s.ignoreNewActions=!1,s.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",n,this.undoneActions.slice()),this.instance.runHooks("afterUndo",o)}},c.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=(0,l.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const s=this,n=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",n),t.redo(this.instance,(()=>{s.ignoreNewActions=!1,s.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.instance.runHooks("afterRedo",o)}},c.prototype.isUndoAvailable=function(){return this.doneActions.length>0},c.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},c.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},c.prototype.isEnabled=function(){return this.enabled},c.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",f)},c.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",f)},c.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},c.Action=function(){},c.Action.prototype.undo=function(){},c.Action.prototype.redo=function(){},c.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,l.inherit)(c.ChangeAction,c.Action),c.ChangeAction.prototype.undo=function(e,t){const o=(0,l.deepClone)(this.changes),s=e.countEmptyRows(!0),n=e.countEmptyCols(!0);for(let e=0,t=o.length;e<t;e++)o[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.undo");for(let t=0,r=o.length;t<r;t++){const[r,i]=o[t];e.getSettings().minSpareRows&&r+1+e.getSettings().minSpareRows===e.countRows()&&s===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(r+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&i+1+e.getSettings().minSpareCols===e.countCols()&&n===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(i+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},c.ChangeAction.prototype.redo=function(e,t){const o=(0,l.deepClone)(this.changes);for(let e=0,t=o.length;e<t;e++)o[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},c.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,l.inherit)(c.CreateRowAction,c.Action),c.CreateRowAction.prototype.undo=function(e,t){const o=e.countRows(),s=e.getSettings().minSpareRows;this.index>=o&&this.index-s<o&&(this.index-=s),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},c.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},c.RemoveRowAction=function(e,t,o,s,n){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=o,this.fixedRowsTop=s,this.rowIndexesSequence=n},(0,l.inherit)(c.RemoveRowAction,c.Action),c.RemoveRowAction.prototype.undo=function(e,t){const o=e.getSettings(),s=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((o=>{const n=parseInt(o,10);s.push([this.index+t,isNaN(n)?o:n,e[o]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(s,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},c.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},c.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,l.inherit)(c.CreateColumnAction,c.Action),c.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},c.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},c.RemoveColumnAction=function(e,t,o,s,n,r,i){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length,this.headers=s,this.columnPositions=n.slice(0),this.rowPositions=r.slice(0),this.actionType="remove_col",this.fixedColumnsStart=i},(0,l.inherit)(c.RemoveColumnAction,c.Action),c.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),s=(e,t,s)=>s[this.indexes.indexOf(o[t])],n=this.data.length,i=[];for(let e=0;e<n;e++)i.push((0,r.arrayMap)(this.data[e],s));const l=(0,r.arrayMap)(this.headers,s),a=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,r.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,r.arrayEach)(o,((o,s)=>{e[o]=i[t][s],a.push([t,o,e[o]])}))})),e.setSourceDataAtCell(a,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,r.arrayEach)(l,((t,s)=>{e.getSettings().colHeaders[o[s]]=t})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},c.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},c.CellAlignmentAction=function(e,t,o,s){this.stateBefore=e,this.range=t,this.type=o,this.alignment=s},c.CellAlignmentAction.prototype.undo=function(e,t){(0,r.arrayEach)(this.range,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&e.setCellMeta(t,o,"className",this.stateBefore[t][o]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},c.CellAlignmentAction.prototype.redo=function(e,t){(0,a.align)(this.range,this.type,this.alignment,((t,o)=>e.getCellMeta(t,o)),((t,o,s,n)=>e.setCellMeta(t,o,s,n))),e.addHookOnce("afterViewRender",t),e.render()},c.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,l.inherit)(c.FiltersAction,c.Action),c.FiltersAction.prototype.undo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),o.filter()},c.FiltersAction.prototype.redo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack),o.filter()};class u extends c.Action{constructor(e,t){super(),this.cellRange=t;const o=this.cellRange.getTopStartCorner(),s=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(o.row,o.col,s.row,s.col)}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const s=this.cellRange.getTopStartCorner();e.populateFromArray(s.row,s.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}}c.MergeCellsAction=u;class g extends c.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}}function f(e,t){if("loadData"===t)return this.undoRedo.clear()}c.UnmergeCellsAction=g,c.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,l.inherit)(c.RowMoveAction,c.Action),c.RowMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualRowMove"),s=[].concat(this.rows),n=s.filter((e=>e>this.finalIndex)),r=s.filter((e=>e<=this.finalIndex)),i=n.sort(((e,t)=>t-e)).concat(r.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<i.length;t+=1){const s=e.toVisualRow(i[t]);o.moveRow(s,i[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},c.RowMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},c.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},c.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:h};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},c.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const p=n.default.getSingleton();p.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),p.register("beforeUndo"),p.register("afterUndo"),p.register("beforeRedo"),p.register("afterRedo"),c.PLUGIN_KEY=d,c.SETTING_KEYS=!0;t.default=c},62929:(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(74465);t.registerAllEditors=s.registerAllEditors;var n=o(42418);t.registerAllRenderers=n.registerAllRenderers;var r=o(12630);t.registerAllValidators=r.registerAllValidators;var i=o(74319);t.registerAllCellTypes=i.registerAllCellTypes;var l=o(40106);t.registerAllPlugins=l.registerAllPlugins},1470:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.autocompleteRenderer=d;var n=o(95025),r=o(50695),i=s(o(75244)),l=o(83302);o(67004);var a=o(5386);const h=t.RENDERER_TYPE="autocomplete";function d(e,t,o,s,h,d,c){const{rootDocument:u}=e,g=c.allowHtml?n.htmlRenderer:r.textRenderer,f=u.createElement("DIV"),p=e.getSettings().ariaTags;if(f.className="htAutocompleteArrow",p&&f.setAttribute(...(0,a.A11Y_HIDDEN)()),f.appendChild(u.createTextNode(String.fromCharCode(9660))),g.apply(this,[e,t,o,s,h,d,c]),t.firstChild||t.appendChild(u.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,l.addClass)(t,"htAutocomplete"),p&&t.setAttribute(...(0,a.A11Y_HASPOPUP)("listbox")),!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()}))}}d.RENDERER_TYPE=h},16124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1470);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},24945:(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=i,o(63517);var s=o(83302),n=o(5386);const r=t.RENDERER_TYPE="base";function i(e,t,o,r,i,l,a){const h=a.ariaTags,d=[],c=[],u=[],g=[];a.className&&(0,s.addClass)(t,a.className),a.readOnly?(d.push(a.readOnlyCellClassName),h&&g.push((0,n.A11Y_READONLY)())):h&&u.push((0,n.A11Y_READONLY)()[0]),!1===a.valid&&a.invalidCellClassName?(d.push(a.invalidCellClassName),h&&g.push((0,n.A11Y_INVALID)())):(c.push(a.invalidCellClassName),h&&u.push((0,n.A11Y_INVALID)()[0])),!1===a.wordWrap&&a.noWordWrapClassName&&d.push(a.noWordWrapClassName),!l&&a.placeholder&&d.push(a.placeholderCellClassName),(0,s.removeClass)(t,c),(0,s.addClass)(t,d),(0,s.removeAttribute)(t,u),(0,s.setAttribute)(t,g)}i.RENDERER_TYPE=r},60686:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24945);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},41901:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.checkboxRenderer=E,o(63517);var n=o(60686),r=s(o(75244)),i=o(83302),l=o(93315),a=o(29282),h=s(o(56307)),d=o(5386),c=o(77516);o(51768);const u=new WeakMap,g=new WeakMap,f="htBadValue",p="data-row",m="data-col",C="checkboxRenderer",w=t.RENDERER_TYPE="checkbox";function E(e,t,o,s,h,w,E){const{rootDocument:v}=e,y=e.getSettings().ariaTags;n.baseRenderer.apply(this,[e,t,o,s,h,w,E]),function(e){let t=g.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(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),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(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!S(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),n=parseInt(o.getAttribute(m),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))),g.set(e,t)}}(e);let R=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)}(v);const _=E.label;let b=!1;if(void 0===E.checkedTemplate&&(E.checkedTemplate=!0),void 0===E.uncheckedTemplate&&(E.uncheckedTemplate=!1),(0,i.empty)(t),w===E.checkedTemplate||(0,l.stringify)(w).toLocaleLowerCase(E.locale)===(0,l.stringify)(E.checkedTemplate).toLocaleLowerCase(E.locale)?R.checked=!0:w===E.uncheckedTemplate||(0,l.stringify)(w).toLocaleLowerCase(E.locale)===(0,l.stringify)(E.uncheckedTemplate).toLocaleLowerCase(E.locale)?R.checked=!1:(0,l.isEmpty)(w)?(0,i.addClass)(R,"noValue"):(R.style.display="none",(0,i.addClass)(R,f),b=!0),(0,i.setAttribute)(R,[[p,o],[m,s]]),y&&(0,i.setAttribute)(R,[(0,d.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,d.A11Y_CHECKED)(R.checked),(0,d.A11Y_CHECKBOX)()]),!b&&_){let n="";if(_.value)n="function"==typeof _.value?_.value.call(this,o,s,h,w):_.value;else if(_.property){const t=e.getDataAtRowProp(o,_.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)}(v,n,!0!==_.separated);"before"===_.position?_.separated?(t.appendChild(r),t.appendChild(R)):(r.appendChild(R),R=r):_.position&&"after"!==_.position||(_.separated?(t.appendChild(R),t.appendChild(r)):(r.insertBefore(R,r.firstChild),R=r))}function T(){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 M(){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}}(!_||_&&!_.separated)&&t.appendChild(R),b&&t.appendChild(v.createTextNode("#bad-value#")),u.has(e)||(u.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:C};t.addShortcuts([{keys:[["space"]],callback:()=>(T(),!M())},{keys:[["enter"]],callback:()=>(T(),!M()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(T(!0),!M()),relativeToGroup:a.EDITOR_EDIT_GROUP,position:"before"}],o)}())}function S(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:n,row:r,column:i,prop:l}=t;if(n===w){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}})),E.RENDERER_TYPE=w},8877:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(41901);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},22137:(e,t,o)=>{"use strict";t.__esModule=!0,t.dateRenderer=l;var s=o(16124),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="date";function l(e,t,o,i,l,a,h){s.autocompleteRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,[(0,n.A11Y_HASPOPUP)("dialog"),(0,n.A11Y_EXPANDED)("false")])}l.RENDERER_TYPE=i},56522:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22137);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dateRenderer=s.dateRenderer},33979:(e,t,o)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=l;var s=o(16124),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="handsontable";function l(e,t,o,i,l,a,h){s.autocompleteRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,[(0,n.A11Y_HASPOPUP)("true"),(0,n.A11Y_EXPANDED)("false")])}l.RENDERER_TYPE=i},67981:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33979);t.RENDERER_TYPE=s.RENDERER_TYPE,t.handsontableRenderer=s.handsontableRenderer},91897:(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=i;var s=o(60686),n=o(83302);const r=t.RENDERER_TYPE="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)}i.RENDERER_TYPE=r},95025:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(91897);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},42418:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,c.registerRenderer)(s.autocompleteRenderer),(0,c.registerRenderer)(n.baseRenderer),(0,c.registerRenderer)(r.checkboxRenderer),(0,c.registerRenderer)(i.htmlRenderer),(0,c.registerRenderer)(l.numericRenderer),(0,c.registerRenderer)(a.passwordRenderer),(0,c.registerRenderer)(h.textRenderer),(0,c.registerRenderer)(d.timeRenderer)};var s=o(16124);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var n=o(60686);t.baseRenderer=n.baseRenderer,t.BASE_RENDERER=n.RENDERER_TYPE;var r=o(8877);t.checkboxRenderer=r.checkboxRenderer,t.CHECKBOX_RENDERER=r.RENDERER_TYPE;var i=o(95025);t.htmlRenderer=i.htmlRenderer,t.HTML_RENDERER=i.RENDERER_TYPE;var l=o(78416);t.numericRenderer=l.numericRenderer,t.NUMERIC_RENDERER=l.RENDERER_TYPE;var a=o(76978);t.passwordRenderer=a.passwordRenderer,t.PASSWORD_RENDERER=a.RENDERER_TYPE;var h=o(50695);t.textRenderer=h.textRenderer,t.TEXT_RENDERER=h.RENDERER_TYPE;var d=o(43853);t.timeRenderer=d.timeRenderer,t.TIME_RENDERER=d.RENDERER_TYPE;var c=o(7462);t.registerRenderer=c.registerRenderer,t.getRegisteredRendererNames=c.getRegisteredRendererNames,t.getRegisteredRenderers=c.getRegisteredRenderers,t.getRenderer=c.getRenderer,t.hasRenderer=c.hasRenderer},78416:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77635);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer},77635:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.numericRenderer=a,o(63517);var n=s(o(3333)),r=o(50695),i=o(68145);const l=t.RENDERER_TYPE="numeric";function a(e,t,o,s,l,a,h){let d=a;if((0,i.isNumeric)(d)){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),d=(0,n.default)(d).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,d,h)}a.RENDERER_TYPE=l},76978:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58486);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},58486:(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=l;var s=o(50695),n=o(83302),r=o(68145);const i=t.RENDERER_TYPE="password";function l(e,t,o,i,l,a,h){s.textRenderer.apply(this,[e,t,o,i,l,a,h]);const d=h.hashLength||t.innerHTML.length,c=h.hashSymbol||"*";let u="";(0,r.rangeEach)(d-1,(()=>{u+=c})),(0,n.fastInnerHTML)(t,u)}l.RENDERER_TYPE=i},7462:(e,t,o)=>{"use strict";var s=o(73203);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(91683);var n=s(o(63800));const{register:r,getItem:i,hasItem:l,getNames:a,getValues:h}=(0,n.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=a,t.hasRenderer=l},73619:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33845);t.RENDERER_TYPE=s.RENDERER_TYPE,t.selectRenderer=s.selectRenderer},33845:(e,t,o)=>{"use strict";t.__esModule=!0,t.selectRenderer=l;var s=o(50695),n=o(5386),r=o(83302);const i=t.RENDERER_TYPE="select";function l(e,t,o,i,l,a,h){s.textRenderer.apply(this,[e,t,o,i,l,a,h]),e.getSettings().ariaTags&&(0,r.setAttribute)(t,...(0,n.A11Y_HASPOPUP)("listbox"))}l.RENDERER_TYPE=i},50695:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84249);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},84249:(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=l;var s=o(60686),n=o(83302),r=o(93315);const i=t.RENDERER_TYPE="text";function l(e,t,o,i,l,a,h){s.baseRenderer.apply(this,[e,t,o,i,l,a,h]);let d=a;if(!d&&h.placeholder&&(d=h.placeholder),d=(0,r.stringify)(d),h.trimWhitespace&&(d=d.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,d)}l.RENDERER_TYPE=i},43853:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98706);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},98706:(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=r;var s=o(50695);const n=t.RENDERER_TYPE="time";function r(e,t,o,n,r,i,l){s.textRenderer.apply(this,[e,t,o,n,r,i,l]),t.dir="ltr"}r.RENDERER_TYPE=n},43395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var n=s(o(93231)),r=o(32838),i=o(83692),l=o(45951),a=o(39191),h=o(55730),d=o(84380),c=o(520),u=o(73193),g=o(10450),f=o(21280);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(50095);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 E=new WeakSet;m=Symbol.iterator;function S(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}t.default=class{constructor(e){C(this,E),(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,c.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=this.options.disabledCellSelection(t.row,t.col);return"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,E,S).call(this,this.layeredAreas,i.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,E,S).call(this,this.areas,l.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,E,S).call(this,this.rowHeaders,u.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,E,S).call(this,this.columnHeaders,u.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,E,S).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,E,S).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,E,S).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,E,S).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,E,S).call(this,this.columnHighlights,a.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,d.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]()}}},32838:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},45951:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},83692:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},39191:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},84380:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},520:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},55730:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},73193:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},10450:(e,t,o)=>{"use strict";var s=o(73203);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(21280),r=s(o(76337))},76337:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n=s(o(93231)),r=o(21280);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)}}t.default=i},69167:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var n={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(35750));t.Selection=r.default;var i=o(50743);t.handleMouseEvent=i.handleMouseEvent;var l=o(69248);t.detectSelectionType=l.detectSelectionType,t.normalizeSelectionFactory=l.normalizeSelectionFactory;var a=o(43395);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]))}))},50743:(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(24449);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(),d=r.isSelectedByRowHeader();if(t&&a)n.row>=0&&n.col>=0&&!i.cell?r.setRangeEnd(n):(h||d)&&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)):d&&n.col<0&&!i.row?r.setRangeEnd(l(n.row,a.to.col)):(!h&&!d&&n.col<0||h&&n.col<0)&&!i.row?r.selectRows(Math.max(a.from.row,0),n.row,n.col):(!h&&!d&&n.row<0||d&&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,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}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]])},16570:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);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]()}}t.default=s},35750:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var n=s(o(93231)),r=s(o(48427)),i=s(o(42538)),l=o(21280),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=E(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},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}(o(43395)),h=s(o(16570)),d=o(22232),c=o(93315),u=o(68145),g=o(50095),f=s(o(65718)),p=s(o(31778)),m=o(69248),C=o(28236),w=o(5386);function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(E=function(e){return e?o:t})(e)}function S(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 v=new WeakMap;class y{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 h.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),S(this,v,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,headerAttributes:[(0,w.A11Y_SELECTED)()],activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,w.A11Y_SELECTED)()],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 p.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)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeColumnWrap",...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,c.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,i=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),i),(!n||n&&!r&&(0,c.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(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const h=this.getLayerLevel();h<this.highlight.layerLevel&&((0,g.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,g.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(h);const d=this.highlight.createArea(),c=this.highlight.createLayeredArea(),u=this.highlight.createRowHeader(),f=this.highlight.createColumnHeader(),p=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),C=this.highlight.createActiveCornerHeader(),w=this.highlight.createRowHighlight(),E=this.highlight.createColumnHighlight();if(d.clear(),c.clear(),u.clear(),f.clear(),p.clear(),m.clear(),C.clear(),w.clear(),E.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,r.highlight)&&(this.isMultiple()||h>=1)&&(d.add(r.from).add(r.to).commit(),c.add(r.from).add(r.to).commit(),1===h)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(h-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(h)}if(this.highlight.isEnabledFor(a.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(),f.add(o).commit(),w.add(e).commit(),E.add(o).commit()):(u.add(e).add(t).commit(),f.add(o).add(s).commit(),w.add(e).add(t).commit(),E.add(o).add(s).commit())}const e=!(0,i.default)(this,v)&&this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,v)&&this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&this.isSelectedByColumnHeader());e&&p.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&&m.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&&C.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,d.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]:{focusPosition:!1,disableHeadersHighlight:!1};const n=this.tableProps.countRows(),i=this.tableProps.countCols(),l=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),h=o?-a:0,d=t?-l:0;if(0===h&&0===d&&(0===n||0===i))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:g,disableHeadersHighlight:f}=s;(0,r.default)(this,v,f),g&&Number.isInteger(null==g?void 0:g.row)&&Number.isInteger(null==g?void 0:g.col)&&(c=this.tableProps.createCellCoords((0,u.clamp)(g.row,h,n-1),(0,u.clamp)(g.col,d,i-1)));const p=this.tableProps.createCellCoords(h,d),m=this.tableProps.createCellCoords(n-1,i-1);this.clear(),this.setRangeStartOnly(p,void 0,c),d<0&&this.selectedByRowHeader.add(this.getLayerLevel()),h<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,r.default)(this,v,!1)}selectCells(e){const t=(0,m.detectSelectionType)(e);if(t===m.SELECTION_TYPE_EMPTY)return!1;if(t===m.SELECTION_TYPE_UNRECOGNIZED)throw new Error(C.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
85
85
  the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
86
86
  columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const o=(0,m.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,g.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,r=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),h=0===a?0:-a,d=new l.CellCoords(h,s),c=new l.CellCoords(r-1,n),g=new l.CellRange(d,d,c).isValid({countRows:r,countCols:i,countRowHeaders:0,countColHeaders:a});if(g){const e=0===a?0:(0,u.clamp)(o,h,-1),t=r-1,i=this.tableProps.createCellCoords(e,s),l=this.tableProps.createCellCoords(t,n),d=this.tableProps.createCellCoords((0,u.clamp)(o,h,r-1),s);this.runLocalHooks("beforeSelectColumns",i,l,d),i.row=e,l.row=t,this.setRangeStartOnly(i,void 0,d),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(l),this.runLocalHooks("afterSelectColumns",i,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(),r=this.tableProps.countRowHeaders(),i=0===r?0:-r,a=new l.CellCoords(e,i),h=new l.CellCoords(t,n-1),d=new l.CellRange(a,a,h).isValid({countRows:s,countCols:n,countRowHeaders:r,countColHeaders:0});if(d){const s=0===r?0:(0,u.clamp)(o,i,-1),l=n-1,a=this.tableProps.createCellCoords(e,s),h=this.tableProps.createCellCoords(t,l),d=this.tableProps.createCellCoords(e,(0,u.clamp)(o,i,n-1));this.runLocalHooks("beforeSelectRows",a,h,d),a.col=s,h.col=l,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,d.mixin)(y,f.default);t.default=y},31778:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var n=s(o(42538)),r=s(o(48427)),i=o(22232),l=s(o(65718));function a(e,t){d(e,t),t.add(e)}function h(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(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,E=new WeakSet;class S{constructor(e,t){a(this,E),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];c(this,p,v).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}=c(this,C,R).call(this),{row:i,col:h}=c(this,w,_).call(this,r),d=(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(),S=(0,n.default)(this,g).autoWrapCol(),v=(0,n.default)(this,g).createCellCoords(i+s.row,h+s.col);if(v.row>=t){const s=o&&u>0&&0===d,r=!s&&S,i=v.col+1,l=(0,n.default)(this,g).createCellCoords(v.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",r,c(this,E,b).call(this,l),i>=e),s?this.runLocalHooks("insertRowRequire",(0,n.default)(this,g).countRenderableRows()):r&&v.assign(l)}else if(v.row<0){const o=v.col-1,s=(0,n.default)(this,g).createCellCoords(t+v.row,o<0?e+o:o);this.runLocalHooks("beforeColumnWrap",S,c(this,E,b).call(this,s),o<0),S&&v.assign(s)}if(v.col>=e){const s=o&&f>0,r=!s&&p,i=v.row+1,l=(0,n.default)(this,g).createCellCoords(i>=t?i-t:i,v.col-e);this.runLocalHooks("beforeRowWrap",r,c(this,E,b).call(this,l),i>=t),s?this.runLocalHooks("insertColRequire",(0,n.default)(this,g).countRenderableColumns()):r&&v.assign(l)}else if(v.col<0){const o=v.row-1,s=(0,n.default)(this,g).createCellCoords(o<0?t+o:o,e+v.col);this.runLocalHooks("beforeRowWrap",p,c(this,E,b).call(this,s),o<0),p&&v.assign(s)}const{rowDir:T,colDir:M}=c(this,m,y).call(this,v);l=T,a=M,r=c(this,E,b).call(this,v)}return this.runLocalHooks("afterTransformStart",r,l,a),r}transformEnd(e,t){c(this,p,v).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{row:e,col:t}=c(this,w,_).call(this,s.to),r=(0,n.default)(this,g).createCellCoords(e+o.row,t+o.col),{rowDir:h,colDir:d}=c(this,m,y).call(this,r);l=h,a=d;const u=c(this,E,b).call(this,r);0===o.row&&0!==o.col?i.col=u.col:0!==o.row&&0===o.col?i.row=u.row:(i.row=u.row,i.col=u.col)}return this.runLocalHooks("afterTransformEnd",i,l,a),i}}function v(e){let{x:t,y:o}=e;(0,r.default)(this,f,{x:t,y:o})}function y(e){const{width:t,height:o}=c(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 _(e){const{row:t,col:o}=(0,n.default)(this,g).visualToRenderableCoords(e);return(0,n.default)(this,g).createCellCoords((0,n.default)(this,f).y+t,(0,n.default)(this,f).x+o)}function b(e){const t=e.clone();return t.col=e.col-(0,n.default)(this,f).x,t.row=e.row-(0,n.default)(this,f).y,(0,n.default)(this,g).renderableToVisualCoords(t)}(0,i.mixin)(S,l.default);t.default=S},69248:(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(91683),o(63517);var s=o(21280),n=o(50095),r=o(93315);const i=t.SELECTION_TYPE_UNRECOGNIZED=0,l=t.SELECTION_TYPE_EMPTY=1,a=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,d=t.SELECTION_TYPES=[h,a],c=[["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)=>!c[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(!d.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],d=i?n.to.row:n[2],c=i?n.to.col:n[3];if("function"==typeof o&&("string"==typeof a&&(a=o(a)),"string"==typeof c&&(c=o(c))),(0,r.isUndefined)(d)&&(d=l),(0,r.isUndefined)(c)&&(c=a),!t){const e=l,t=a,o=d,s=c;l=Math.min(e,o),a=Math.min(t,s),d=Math.max(e,o),c=Math.max(t,s)}const u=new s.CellCoords(l,a),g=new s.CellCoords(d,c);return new s.CellRange(u,u,g)}}},61321:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSave",callback(e,t,o){const s=e._getEditorManager();s.closeEditorAndSaveChanges(e.getShortcutManager().isCtrlPressed()),s.moveSelectionAfterEnter(o.includes("shift"))}}},67826:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}}},15092:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorFastOpen",callback(e,t){const{highlight:o}=e.getSelectedRangeLast();o.isHeader()||e._getEditorManager().openEditor(null,t,!0)}}},77511:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,n.command,r.command,i.command]};var s=o(61321),n=o(67826),r=o(15092),i=o(75543)},75543:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24449);t.command={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))}}},15376:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}}},72410:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}}},65189:(e,t)=>{"use strict";t.__esModule=!0;t.command={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({row:r,verticalSnap:"top",horizontalSnap:"start"})}}}},19061:(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,d.command,c.command,u.command,g.command,f.command,p.command,m.command]};var s=o(72410),n=o(65189),r=o(38495),i=o(17099),l=o(29147),a=o(51730),h=o(98267),d=o(90949),c=o(13901),u=o(3585),g=o(35376),f=o(17852),p=o(30405),m=o(73317)},38495:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}}},17099:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}}},29147:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(o.col,s.col,t.row)}}},51730:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}}},98267:(e,t)=>{"use strict";t.__esModule=!0;t.command={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)))}}},90949:(e,t)=>{"use strict";t.__esModule=!0;t.command={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)))}}},13901:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}}},3585:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}}},35376:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}}},17852:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(o.row,s.row,t.col)}}},30405:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}}},73317:(e,t)=>{"use strict";t.__esModule=!0;t.command={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({row:r,verticalSnap:"top",horizontalSnap:"start"})}}}},69619:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return d.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(77511),n=o(19061),r=o(36653),i=o(15376),l=o(25730),a=o(43473),h=o(19708);const d=[...(0,s.getAllCommands)(),...(0,n.getAllCommands)(),...(0,r.getAllCommands)(),i.command,l.command,a.command,h.command]},59749:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}}},87096:(e,t)=>{"use strict";t.__esModule=!0;t.command={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({row:0})}}},36653:(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,d.command,c.command,u.command,g.command,f.command,p.command,m.command,C.command,w.command]};var s=o(59749),n=o(87096),r=o(82175),i=o(14581),l=o(96616),a=o(35888),h=o(1449),d=o(64129),c=o(36586),u=o(158),g=o(89115),f=o(75025),p=o(20333),m=o(94793),C=o(87854),w=o(52771)},82175:(e,t)=>{"use strict";t.__esModule=!0;t.command={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)}}},14581:(e,t)=>{"use strict";t.__esModule=!0;t.command={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)}}},96616:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}}},35888:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}}},1449:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},64129:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},36586:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},158:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},89115:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},75025:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},20333:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},94793:(e,t)=>{"use strict";t.__esModule=!0;t.command={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))}}},87854:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}}},52771:(e,t)=>{"use strict";t.__esModule=!0;t.command={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({row:0})}}},19708:(e,t)=>{"use strict";t.__esModule=!0;t.command={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()))}}},25730:(e,t)=>{"use strict";t.__esModule=!0;t.command={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={};if(t.col>=0){const s=Math.floor(e.countVisibleCols()/2);o.col=Math.max(t.col-s,0)}if(t.row>=0){const s=Math.floor(e.countVisibleRows()/2);o.row=Math.max(t.row-s,0)}e.scrollViewportTo({...o,verticalSnap:"top",horizontalSnap:"start"})}}}},43473:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAll",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}}},87592:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault",t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},90508:(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(87592),n=o(69619)},15022:(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"]],preventDefault:!1,callback:()=>o.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],preventDefault:!1,callback:()=>o.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],i)};var s=o(93315),n=o(87592),r=o(69619)},29282:(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(90508),r=o(15022),i=o(87592);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]))}))},29275:(e,t,o)=>{"use strict";t.__esModule=!0,t.isContextObject=d,o(91683),o(63517);var s=o(42386),n=o(32464),r=o(93315),i=o(85015),l=o(22232),a=o(28236);const h=Symbol("shortcut-context");function d(e){return(0,l.isObject)(e)&&e.__kindOf===h}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:u=!1,relativeToGroup:g,position:f,forwardToContext:p}=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
87
87
  using the KeyboardEvent.key properties:\x20