handsontable 0.0.0-next-14118b6-20240131 → 0.0.0-next-817afa4-20240202
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of handsontable might be problematic. Click here for more details.
- package/base.js +2 -2
- package/base.mjs +2 -2
- package/dataMap/metaManager/index.js +1 -1
- package/dataMap/metaManager/index.mjs +1 -1
- package/dataMap/metaManager/metaSchema.js +17 -0
- package/dataMap/metaManager/metaSchema.mjs +17 -0
- package/dist/handsontable.css +2 -2
- package/dist/handsontable.full.css +2 -2
- package/dist/handsontable.full.js +124 -18
- package/dist/handsontable.full.min.css +2 -2
- package/dist/handsontable.full.min.js +6 -6
- package/dist/handsontable.js +124 -18
- package/dist/handsontable.min.css +2 -2
- package/dist/handsontable.min.js +6 -6
- package/helpers/dom/element.js +16 -0
- package/helpers/dom/element.mjs +15 -0
- package/helpers/mixed.js +1 -1
- package/helpers/mixed.mjs +1 -1
- package/package.json +1 -1
- package/pluginHooks.js +1 -1
- package/pluginHooks.mjs +1 -1
- package/plugins/filters/component/value.js +16 -6
- package/plugins/filters/component/value.mjs +17 -7
- package/plugins/filters/ui/multipleSelect.js +38 -0
- package/plugins/filters/ui/multipleSelect.mjs +39 -1
- package/plugins/filters/utils.js +29 -5
- package/plugins/filters/utils.mjs +28 -5
- package/renderers/numericRenderer/numericRenderer.js +1 -0
- package/renderers/numericRenderer/numericRenderer.mjs +1 -0
@@ -25,8 +25,8 @@
|
|
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: 0.0.0-next-
|
29
|
-
* Release date: 16/01/2024 (built at
|
28
|
+
* Version: 0.0.0-next-817afa4-20240202
|
29
|
+
* Release date: 16/01/2024 (built at 02/02/2024 12:20:23)
|
30
30
|
*/
|
31
31
|
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Handsontable",[],t):"object"==typeof exports?exports.Handsontable=t():e.Handsontable=t()}("undefined"!=typeof self?self:this,(()=>(()=>{var e={83826:(e,t,r)=>{"use strict";r.d(t,{uJ:()=>lt,ZP:()=>gu});var n,s,i={};r.r(i),r.d(i,{AbsPlugin:()=>ro,AddressPlugin:()=>eo,ArrayPlugin:()=>to,BitShiftPlugin:()=>so,BitwiseLogicOperationsPlugin:()=>lo,BooleanPlugin:()=>uo,CharPlugin:()=>ho,CodePlugin:()=>co,ComplexPlugin:()=>Jl,ConditionalAggregationPlugin:()=>wa,CountBlankPlugin:()=>fo,CountUniquePlugin:()=>po,DateTimePlugin:()=>go,DegreesPlugin:()=>Co,DeltaPlugin:()=>vo,ExpPlugin:()=>So,FinancialPlugin:()=>Ro,FormulaTextPlugin:()=>Ao,HyperlinkPlugin:()=>Oo,InformationPlugin:()=>Io,IsEvenPlugin:()=>xo,IsOddPlugin:()=>Po,LogarithmPlugin:()=>Lo,LookupPlugin:()=>Ra,MathConstantsPlugin:()=>ko,MathPlugin:()=>Xl,MatrixPlugin:()=>Uo,MedianPlugin:()=>Vo,ModuloPlugin:()=>Bo,NumericAggregationPlugin:()=>Go,PowerPlugin:()=>$o,RadiansPlugin:()=>Ko,RadixConversionPlugin:()=>qo,RandomPlugin:()=>na,RomanPlugin:()=>Ta,RoundingPlugin:()=>oa,SimpleArithmerticPlugin:()=>ba,SqrtPlugin:()=>aa,StatisticalAggregationPlugin:()=>cu,StatisticalPlugin:()=>Kl,SumprodPlugin:()=>ya,TextPlugin:()=>Ca,TrigonometryPlugin:()=>va}),function(e){e.RELATIVE="RELATIVE",e.ABSOLUTE="ABSOLUTE"}(n||(n={}));class o{constructor(e,t,r){this.type=e,this.col=t,this.sheet=r}static absolute(e,t){return new o(n.ABSOLUTE,e,t)}static relative(e,t){return new o(n.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,r)=>t.toSimpleColumnAddress(e).col-r.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===n.ABSOLUTE}isColumnRelative(){return this.type===n.RELATIVE}isAbsolute(){return this.type===n.ABSOLUTE&&void 0!==this.sheet}moved(e,t,r){const n=void 0===this.sheet?void 0:e;return new o(this.type,this.col+t,n)}shiftedByColumns(e){return new o(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=Lr(this,e);let r=this.col;return this.isColumnRelative()&&(r=e.col+this.col),br(t,r)}shiftRelativeDimensions(e,t){const r=this.isColumnRelative()?this.col+e:this.col;return new o(this.type,r,this.sheet)}shiftAbsoluteDimensions(e,t){const r=this.isColumnAbsolute()?this.col+e:this.col;return new o(this.type,r,this.sheet)}withSheet(e){return new o(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(e){const t=e&&void 0!==this.sheet?`#${this.sheet}`:"";switch(this.type){case n.RELATIVE:return`${t}#COLR${this.col}`;case n.ABSOLUTE:return`${t}#COLA${this.col}`}}unparse(e){const t=this.toSimpleColumnAddress(e);if(Mr(t))return;const r=P(t.col);return`${this.type===n.ABSOLUTE?"$":""}${r}`}exceedsSheetSizeLimits(e){return this.col>=e}}
|
32
32
|
/**
|
@@ -930,7 +930,7 @@ s.version="2.29.4",i(Xr),s.fn=ui,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=hi,s.
|
|
930
930
|
Consider limiting the number of rendered columns by specifying the table width and/or\x20
|
931
931
|
turning off the "renderAllColumns" option.`));for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),r=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${r}px`}for(let r=0;r<e;r++){const e=this.table.renderedColumnToSource(r),n=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[r+t].style.width=`${n}px`}const r=this.rootNode.firstChild;r&&(0,a.addClass)(r,"rowHeader")}}t.default=u},36270:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),i=n(r(24650)),o=r(66862);class a extends i.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let r=this.rootNode.firstChild;if(e){const{columnsToRender:n}=this.table,s=n+t;for(let t=0,n=e;t<n;t++){for(r=this.rootNode.childNodes[t],r||(r=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(r)),this.renderedNodes=r.childNodes.length;this.renderedNodes<s;)r.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>s;)r.removeChild(r.lastChild),this.renderedNodes-=1}const i=this.rootNode.childNodes.length;if(i>e)for(let t=e;t<i;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else r&&(0,s.empty)(r)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,s.setAttribute)(this.rootNode,[(0,o.A11Y_ROWGROUP)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:r,rowHeadersCount:n}=this.table,i=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,s.setAttribute)(i,[(0,o.A11Y_ROW)(),(0,o.A11Y_ROWINDEX)(t+1)]);for(let a=-1*n;a<r;a+=1){const r=this.table.renderedColumnToSource(a),l=i.childNodes[a+n];l.className="",l.removeAttribute("style"),(0,s.removeAttribute)(l,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,s.setAttribute)(l,[(0,o.A11Y_COLINDEX)(a+1+this.table.rowHeadersCount),(0,o.A11Y_TABINDEX)(-1),(0,o.A11Y_COLUMNHEADER)(),...a>=0?[(0,o.A11Y_SCOPE_COL)()]:[(0,o.A11Y_ROW)()]]),e[t](r,l,t)}}}}t.default=a},84355:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(22459));t.RowHeadersRenderer=s.default;var i=n(r(36270));t.ColumnHeadersRenderer=i.default;var o=n(r(1909));t.ColGroupRenderer=o.default;var a=n(r(51606));t.RowsRenderer=a.default;var l=n(r(86551));t.CellsRenderer=l.default;var u=n(r(92548));t.TableRenderer=u.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:r,TBODY:n,rowUtils:h,columnUtils:c,cellRenderer:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new u.default(e,{cellRenderer:d}),this.renderer.setRenderers({rowHeaders:new s.default,columnHeaders:new i.default(t),colGroup:new o.default(r),rows:new a.default(n),cells:new l.default}),this.renderer.setAxisUtils(h,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()}}},22459:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(32512),o=n(r(24650)),a=r(49587),l=r(66862);class u extends o.default{constructor(){super("TH"),(0,s.default)(this,"orderViews",new WeakMap),(0,s.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new i.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:r,rows:n,cells:s}=this.table;for(let i=0;i<e;i++){const e=this.table.renderedRowToSource(i),o=n.getRenderedNode(i);this.sourceRowIndex=e;const u=this.obtainOrderView(o),h=s.obtainOrderView(o);u.appendView(h).setSize(r).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<r;n++){u.render();const r=u.getCurrentNode();r.className="",r.removeAttribute("style"),(0,a.removeAttribute)(r,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,a.setAttribute)(r,[(0,l.A11Y_ROWHEADER)(),(0,l.A11Y_SCOPE_ROW)(),(0,l.A11Y_COLINDEX)(n+1),(0,l.A11Y_TABINDEX)(-1)]),t[n](e,r,n)}u.end()}}}t.default=u},51606:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(24650)),o=r(31990),a=r(45561),l=r(32512),u=r(49587),h=r(66862);let c=!1;class d extends i.default{constructor(e){super("TR",e),(0,s.default)(this,"orderView",void 0),this.orderView=new l.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!c&&e>1e3&&(c=!0,(0,o.warn)(a.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
|
932
932
|
Consider limiting the number of rendered rows by specifying the table height and/or\x20
|
933
|
-
turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,u.setAttribute)(this.rootNode,[(0,h.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let n=0;n<e;n++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(n);var t,r;if(this.table.isAriaEnabled())(0,u.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(s+(null!==(t=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=d},92548:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"rowHeaders",null),(0,s.default)(this,"columnHeaders",null),(0,s.default)(this,"colGroup",null),(0,s.default)(this,"rows",null),(0,s.default)(this,"cells",null),(0,s.default)(this,"rowFilter",null),(0,s.default)(this,"columnFilter",null),(0,s.default)(this,"rowUtils",null),(0,s.default)(this,"columnUtils",null),(0,s.default)(this,"rowsToRender",0),(0,s.default)(this,"columnsToRender",0),(0,s.default)(this,"rowHeaderFunctions",[]),(0,s.default)(this,"rowHeadersCount",0),(0,s.default)(this,"columnHeaderFunctions",[]),(0,s.default)(this,"columnHeadersCount",0),(0,s.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,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:r,rows:n,cells:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),r.setTable(this),n.setTable(this),s.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=r,this.rows=n,this.cells=s}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 r=0;r<e;r++){const e=t.getRenderedNode(r);if(e.firstChild){const t=this.renderedRowToSource(r),n=this.rowUtils.getHeight(t);e.firstChild.style.height=n?n-1+"px":""}}}}},53843:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49587);function o(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 a(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var l=new WeakSet,u=new WeakSet;function h(e){const{wtSettings:t,inlineStartOverlay:r,wtTable:n,wtViewport:s,totalColumns:o,rootWindow:a}=this.dataAccessObject;if(r.mainTableScrollableElement===a){let l=null;if(t.getSetting("rtlMode")){const e=n.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,i.offset)(n.wtRootElement).left}const u=Math.abs((0,i.getScrollLeft)(a,a));if(l>u){const t=(0,i.innerWidth)(a);let n=s.getRowHeaderWidth();for(let s=1;s<=o;s++)if(n+=r.sumCellSizes(s-1,s),l+n-u>=t){e=s-2;break}}}return e}function c(e){const{topOverlay:t,wtTable:r,wtViewport:n,totalRows:s,rootWindow:o}=this.dataAccessObject;if(t.mainTableScrollableElement===o){const a=(0,i.offset)(r.wtRootElement),l=(0,i.getScrollTop)(o,o);if(a.top>l){const r=(0,i.innerHeight)(o);let u=n.getColumnHeaderHeight();for(let n=1;n<=s;n++)if(u+=t.sumCellSizes(n-1,n),a.top+u-l>=r){e=n-2;break}}}return e}t.default=class{constructor(e){o(this,u),o(this,l),(0,s.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,r,n,s){const i=this.scrollViewportHorizontally(e.col,r,s),o=this.scrollViewportVertically(e.row,t,n);return i||o}scrollViewportHorizontally(e,t,r){const{drawn:n,totalColumns:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const i=void 0===t&&void 0===r,{fixedColumnsStart:o,inlineStartOverlay:a}=this.dataAccessObject;if(i&&e<o)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>s)return!1;const l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let h=!1;return(i&&(e<l||e>u)||!i)&&(h=a.scrollTo(e,i?e>=this.getLastPartiallyVisibleColumn():t)),h}scrollViewportVertically(e,t,r){const{drawn:n,totalRows:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const i=void 0===t&&void 0===r,{fixedRowsBottom:o,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject;if(i&&(e<a||e>s-o-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>s)return!1;const u=this.getFirstVisibleRow(),h=this.getLastVisibleRow();let c=!1;return(i&&(e<u||e>h)||!i)&&(c=l.scrollTo(e,i?e>=this.getLastPartiallyVisibleRow():r)),c}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return a(this,u,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return a(this,u,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return a(this,l,h).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return a(this,l,h).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},57253:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(30369),i=r(76163),o=r(78498),a=r(14201);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=a.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,s.stopImmediatePropagation)(e);const r=this,n=this.wot.rootDocument.body,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(n,"mousemove",(function e(s){var o;((o=s).clientY<Math.floor(i.top)||o.clientY>Math.ceil(i.top+i.height)||o.clientX<Math.floor(i.left)||o.clientX>Math.ceil(i.left+i.width))&&(r.eventManager.removeEventListener(n,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const r=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(let s=0;s<5;s++){const i=r[s],o=t.createElement("div");o.className=`wtBorder ${this.settings.className||""}`,this.settings[i]&&this.settings[i].hide&&(o.className+=" hidden"),n=o.style,n.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,n.height=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,n.width=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,this.main.appendChild(o)}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,o.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:s}=this.wot;let i=s.bordersHolder;i||(i=t.createElement("div"),i.className="htBorders",s.bordersHolder=i,s.spreader.appendChild(i)),i.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,i.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const r={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,i.objectEach)(r,((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 r=this.wot.selectionManager.getAreaSelection();return!(!r.cellRange||e===r.cellRange.to.row&&t===r.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,r,n,s,i){const o=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),f=parseInt(l.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[o]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-f/4*3,10)}px`,l[o]=`${parseInt(n-f/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),p-d-2*c),E=Math.min(parseInt(n+s-f/4,10),p-f-2*c);u[o]=`${m}px`,h[o]=`${E}px`;const w=Math.min(parseInt(r+i,10),g-d-2*c),y=Math.min(parseInt(r+i-f/4,10),g-f-2*c);u.top=`${w}px`,h.top=`${y}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(a.display="none",u.display="none",l.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:r,rootWindow:s}=this.wot;let i,a,l,u,h,c;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){i=n,h=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const f=t.getRenderedColumnsCount();for(let r=0;r<f;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,c=e[1];break}}for(let r=f-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){u=n;break}}if(void 0===i||void 0===l)return void this.disappear();let p=t.getCell(this.wot.createCellCoords(i,l));const g=i!==a||l!==u,m=g?t.getCell(this.wot.createCellCoords(a,u)):p,E=(0,n.offset)(p),w=g?(0,n.offset)(m):E,y=(0,n.offset)(t.TABLE),C=(0,n.outerWidth)(t.TABLE),v=E.top,S=E.left,R=this.wot.wtSettings.getSetting("rtlMode");let T=0,N=0;if(R){const e=(0,n.outerWidth)(p),t=s.innerWidth-y.left-C;N=S+e-w.left,T=s.innerWidth-S-e-t-1}else N=w.left+(0,n.outerWidth)(m)-S,T=S-y.left-1;if(this.isEntireColumnSelected(i,a)){const e=this.getDimensionsFromHeader("columns",l,u,h,y);let t=null;e&&([t,T,N]=e),t&&(p=t)}let _=v-y.top-1,b=w.top+(0,n.outerHeight)(m)-v;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",i,a,c,y);let t=null;e&&([t,_,b]=e),t&&(p=t)}const M=(0,n.getComputedStyle)(p,s);parseInt(M.borderTopWidth,10)>0&&(_+=1,b=b>0?b-1:0),parseInt(M[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(T+=1,N=N>0?N-1:0);const A=R?"right":"left";this.topStyle.top=`${_}px`,this.topStyle[A]=`${T}px`,this.topStyle.width=`${N}px`,this.topStyle.display="block",this.startStyle.top=`${_}px`,this.startStyle[A]=`${T}px`,this.startStyle.height=`${b}px`,this.startStyle.display="block";const O=Math.floor(this.settings.border.width/2);this.bottomStyle.top=_+b-O+"px",this.bottomStyle[A]=`${T}px`,this.bottomStyle.width=`${N}px`,this.bottomStyle.display="block",this.endStyle.top=`${_}px`,this.endStyle[A]=T+N-O+"px",this.endStyle.height=`${b+1}px`,this.endStyle.display="block";let I=this.settings.border.cornerVisible;I="function"==typeof I?I(this.settings.layerLevel):I;const x=this.wot.getSetting("onModifyGetCellCoords",a,u);let[P,L]=[a,u];if(x&&Array.isArray(x)&&([,,P,L]=x),(0,o.isMobileBrowser)()||!I||this.isPartRange(P,L))this.cornerStyle.display="none";else{this.cornerStyle.top=_+b+this.cornerCenterPointOffset-1+"px",this.cornerStyle[A]=T+N+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(t.TABLE);const i=e===s;i&&(e=r.documentElement);const o=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(u===this.wot.getSetting("totalColumns")-1){const t=i?m.getBoundingClientRect().left:m.offsetLeft;let r=!1,s=0;R?(s=t-parseInt(this.cornerDefaultStyle.width,10)/2,r=s<0):(s=t+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,r=s>=(0,n.innerWidth)(e)),r&&(this.cornerStyle[A]=`${Math.floor(T+N+this.cornerCenterPointOffset-o)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(i?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(_+b+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,o.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,u,_,T,N,b)}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,r,s,i){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,u=null,h=null,c=null,d=null,f=null,p=null,g=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},u=function(){return(0,n.outerHeight)(...arguments)},h="ht__selection--rows",f="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},u=function(){return(0,n.outerWidth)(...arguments)},h="ht__selection--columns",f="left"}if(a.classList.contains(h)){const e=this.wot.getSetting("columnHeaders").length;if(p=l(t,e-s),g=l(r,e-s),!p||!g)return!1;const o=(0,n.offset)(p),a=(0,n.offset)(g);return p&&g&&(c=o[f]-i[f]-1,d=a[f]+u(g)-o[f]),[p,c,d]}return!1}changeBorderStyle(e,t){const r=this[e].style,s=t[e];!s||s.hide?(0,n.addClass)(this[e],"hidden"):((0,n.hasClass)(this[e],"hidden")&&(0,n.removeClass)(this[e],"hidden"),r.backgroundColor=s.color,"top"!==e&&"bottom"!==e||(r.height=`${s.width}px`),"start"!==e&&"end"!==e||(r.width=`${s.width}px`))}changeBorderToDefaultStyle(e){const t=1,r="#000",n=this[e].style;n.backgroundColor=r,n.width=`${t}px`,n.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,n.addClass)(this[e],"hidden"):(0,n.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,o.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)}}},14201:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},90484:(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"},403:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},i=n(r(73864));t.Selection=i.default;var o=r(90484);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===o[e]||(t[e]=o[e]))}));var a=r(14201);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=r(62489);t.SelectionManager=l.SelectionManager},62489:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517),r(9815);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(13136),l=n(r(57253));function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet;function w(){const e=(0,s.default)(this,p).get((0,s.default)(this,c)),t=(0,s.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let r=0;r<t.length;r++)e.add(t[r]);e.forEach((e=>{var t,r;const n=(0,s.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=(0,s.default)(this,d).options)||void 0===t?void 0:t.cellAttributes)&&(i=(0,s.default)(this,d).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.headerAttributes)&&(i=[...i,...(0,s.default)(this,d).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,o.removeClass)(n[t],e),(0,o.removeAttribute)(n[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;h(t=this,r=E),r.add(t),u(this,c,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:new a.SelectionScanner}),u(this,p,{writable:!0,value:new WeakMap}),u(this,g,{writable:!0,value:new WeakSet}),u(this,m,{writable:!0,value:new Map}),(0,i.default)(this,d,e)}setActiveOverlay(e){return(0,i.default)(this,c,e),(0,s.default)(this,f).setActiveOverlay((0,s.default)(this,c)),(0,s.default)(this,p).has((0,s.default)(this,c))||(0,s.default)(this,p).set((0,s.default)(this,c),new Set),this}getFocusSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).getFocus():null}getAreaSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,s.default)(this,m).has(e)){const t=(0,s.default)(this,m).get(e);if(t.has((0,s.default)(this,c)))return t.get((0,s.default)(this,c));const r=new l.default((0,s.default)(this,c),e.settings);return t.set((0,s.default)(this,c),r),r}const t=new l.default((0,s.default)(this,c),e.settings);return(0,s.default)(this,m).set(e,new Map([[(0,s.default)(this,c),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=(0,s.default)(this,m).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){(0,s.default)(this,m).get(e).forEach((e=>e.destroy())),(0,s.default)(this,m).delete(e)}render(e){if(null===(0,s.default)(this,d))return;e&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,w).call(this);const t=Array.from((0,s.default)(this,d)),r=new Map,n=new Map;for(let e=0;e<t.length;e++){const i=t[e],{className:o,headerAttributes:a,createLayers:l,selectionType:u}=i.settings;(0,s.default)(this,g).has(i)||((0,s.default)(this,g).add(i),i.addLocalHook("destroy",(()=>this.destroyBorders(i))));const h=this.getBorderInstance(i);if(i.isEmpty()){null==h||h.disappear();continue}if(o){(0,s.default)(this,f).setActiveSelection(i).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(o)&&!0===l?t.set(o,t.get(o)+1):t.set(o,1)}else r.set(e,new Map([[o,1]]));a&&(n.has(e)||n.set(e,[]),"TH"===e.nodeName&&n.get(e).push(...a))}))}const d=i.getCorners();(0,s.default)(this,c).getSetting("onBeforeDrawBorders",d,u),null==h||h.appear(d)}r.forEach(((e,t)=>{var r;const n=Array.from(e).map((e=>{let[t,r]=e;return 1===r?t:[t,...Array.from({length:r-1},((e,r)=>`${t}-${r+1}`))]})).flat();n.forEach((e=>(0,s.default)(this,p).get((0,s.default)(this,c)).add(e))),(0,o.addClass)(t,n),"TD"===t.nodeName&&Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.cellAttributes)&&(0,o.setAttribute)(t,(0,s.default)(this,d).options.cellAttributes)})),Array.from(n.keys()).forEach((e=>{(0,o.setAttribute)(e,[...n.get(e)])}))}}},13136:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(49587);function a(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var h=new WeakMap,c=new WeakMap,d=new WeakSet;function f(e){const{wtTable:t}=(0,s.default)(this,c),r=t.getRenderedRowsCount(),n=t.getRenderedColumnsCount();for(let s=0;s<r;s+=1){const r=t.rowFilter.renderedToSource(s);for(let s=0;s<n;s+=1)e(r,t.columnFilter.renderedToSource(s))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=d),t.add(e),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,i.default)(this,c,e),this}setActiveSelection(e){return(0,i.default)(this,h,e),this}scan(){const e=(0,s.default)(this,h).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,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:o}=(0,s.default)(this,c),a=o.getRenderedColumnsCount(),l=o.getColumnHeadersCount();let u=0;for(let d=-o.getRowHeadersCount();d<a;d++){const a=o.columnFilter.renderedToSource(d);if(!(a<r||a>i)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const f=d+l;let p=o.getColumnHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingColumnHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,columnCursor:u,selectionWidth:i-r+1});null!==g&&(g!==a&&(p=o.getColumnHeader(g,f)),e(p))}u+=1}}}scanRowsInHeadersRange(e){const[t,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:o}=(0,s.default)(this,c),a=o.getRenderedRowsCount(),l=o.getRowHeadersCount();let u=0;for(let d=-o.getColumnHeadersCount();d<a;d++){const a=o.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>i)continue;const f=d+l;let p=o.getRowHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingRowHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,rowCursor:u,selectionHeight:n-t+1});null!==g&&(g!==a&&(p=o.getRowHeader(g,f)),e(p))}u+=1}}}scanCellsRange(e){const[t,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:a}=(0,s.default)(this,c);u(this,d,f).call(this,((l,u)=>{if(l>=t&&l<=n&&u>=r&&u<=i){const t=a.getCell((0,s.default)(this,c).createCellCoords(l,u)),r=(0,s.default)(this,c).getSetting("onAfterDrawSelection",l,u,(0,s.default)(this,h).settings.layerLevel);"string"==typeof r&&(0,o.addClass)(t,r),e(t)}}))}scanRowsInCellsRange(e){const[t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((i,o)=>{if(i>=t&&i<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(i,o));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((i,o)=>{if(o>=t&&o<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(i,o));e(t)}}))}}},73864:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(76163),i=n(r(63806));class o{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,s.mixin)(o,i.default);t.default=o},39373:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49587),o=r(76163);t.default=class{constructor(e){(0,s.default)(this,"settings",{}),(0,s.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,o.objectEach)(this.defaults,((t,r)=>{if(void 0!==e[r])this.settings[r]=e[r];else{if(void 0===t)throw new Error(`A required setting "${r}" was not provided`);this.settings[r]=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,r)=>{const n=this.getSetting("data",e,t);(0,i.fastInnerText)(r,null==n?"":n)},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,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,o.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,r,n,s){return"function"==typeof this.settings[e]?this.settings[e](t,r,n,s):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]}}},58304:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(49587),o=r(46029),a=n(r(17976)),l=n(r(76191)),u=r(84355),h=n(r(66830)),c=n(r(18365)),d=r(24658),f=r(66862);t.default=class{constructor(e,t,r,n,o){(0,s.default)(this,"wtSettings",null),(0,s.default)(this,"domBindings",void 0),(0,s.default)(this,"TBODY",null),(0,s.default)(this,"THEAD",null),(0,s.default)(this,"COLGROUP",null),(0,s.default)(this,"hasTableHeight",!0),(0,s.default)(this,"hasTableWidth",!0),(0,s.default)(this,"isTableVisible",!1),(0,s.default)(this,"tableOffset",0),(0,s.default)(this,"holderOffset",0),this.domBindings=r,this.isMaster="master"===o,this.name=o,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=n,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=r.rootTable,(0,i.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 a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new h.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new u.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 r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtSpreader",t&&t.insertBefore(r,e),r.appendChild(e)),r.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHider(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtHider",t&&t.insertBefore(r,e),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHolder(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.style.position="relative",r.className="wtHolder",t&&t.insertBefore(r,e),this.isMaster&&(r.parentNode.className+="ht_master handsontable",r.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r.parentNode,[(0,f.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:r,wtViewport:n}=this.dataAccessObject,s=t.getSetting("totalRows"),o=t.getSetting("totalColumns"),u=t.getSetting("rowHeaders"),h=u.length,c=t.getSetting("columnHeaders"),f=c.length;let p=!1,g=e;if(this.isMaster&&(this.holderOffset=(0,i.offset)(this.holder),g=n.createRenderCalculators(g),h&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(this.isMaster&&(p=r.updateStateOfRendering()),g)this.isMaster&&(n.createVisibleCalculators(),n.createPartiallyVisibleCalculators()),r&&r.refresh(!0);else{this.isMaster?this.tableOffset=(0,i.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=o>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,s,f),this.columnFilter=new a.default(t,o,h);let r=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),r=!0!==e.skipRender}if(r){let e;if(this.tableRenderer.setHeaderContentRenderers(u,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(u,[]),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(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtViewport.createPartiallyVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,i.outerWidth)(this.hider),r=(0,i.outerWidth)(this.TABLE);0!==t&&r!==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(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(m=r.bottomOverlay.resetFixedPosition()||m),m=r.inlineStartOverlay.resetFixedPosition()||m,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),p&&r.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.wtSettings.getSetting("defaultRowHeight");let s,o,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;r;)r-=1,s=this.getColumnHeaderHeight(r),o=this.getColumnHeader(t,r),o&&(a=(0,i.innerHeight)(o),(!s&&n<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=a),Array.isArray(l)?null!==l[r]&&void 0!==l[r]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]<(l[r]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,r=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let n=0,s=e.getSetting("columnHeaders").length;n<s;n++)if(r[n]){if(!t[n]||0===t[n].childNodes.length)return;t[n].childNodes[0].style.height=`${r[n]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let r=0;r<e;r++){const e=this.rowFilter.renderedToSource(r);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,r=e.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",t,r);if(n&&Array.isArray(n)&&([t,r]=n),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(r))return-3;if(this.isColumnAfterRenderedColumns(r))return-4;const s=this.getRow(t);if(!s&&t>=0)throw new Error("TR was expected to be rendered but is not");const i=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!i&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return i}getRow(e){let t=null,r=null;var n,s;e<0?(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceRowToVisibleColHeadedRow(e),r=this.THEAD):(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceToRendered(e),r=this.TBODY);return void 0!==t&&void 0!==r&&(!(r.childNodes.length<t+1)&&r.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.THEAD.childNodes[t];return null==r?void 0:r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],r=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const n=e.childNodes[r];n&&t.push(n)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const r=this.rowFilter.sourceToRendered(e),n=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=(r<0?this.THEAD:this.TBODY).childNodes[n];return null==s?void 0:s.childNodes[t]}getRowHeaders(e){const t=[],r=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<r;n++){const r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],s=null==r?void 0:r.childNodes[n];s&&t.push(s)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,i.closest)(t,["TD","TH"])),null===t)return null;const r=t.parentNode,n=r.parentNode;let s=(0,i.index)(r),o=t.cellIndex;if((0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===n.nodeName&&(s-=n.childNodes.length);else if((0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){s=this.wtSettings.getSetting("totalRows")-n.childNodes.length+s}else s=n===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return o=(0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,r,n,s,o;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,i.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,n=this.rowFilter.renderedToSource(e),t=this.getRowHeight(n),s=this.getTrForRow(n),o=s.querySelector("th"),r=o?(0,i.innerHeight)(o):(0,i.innerHeight)(s)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<r||t<r)&&(r+=1,this.dataAccessObject.wtViewport.oversizedRows[n]=r)}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,i.outerWidth)(this.TABLE)}getHeight(){return(0,i.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,i.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,i.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,i.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,o.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}}},84218:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(3148)),o=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},37917:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(3148)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},68215:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(46962)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},58454:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),i=n(r(58304)),o=n(r(46962)),a=n(r(27972)),l=r(76163);class u extends i.default{constructor(e,t,r,n){super(e,t,r,n,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,s.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 r=e.parentElement,n=(0,s.getStyle)(e,"height",t),i=(0,s.getStyle)(e,"overflow",t),o=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,h=e.offsetHeight;if(r&&["auto","hidden","scroll"].includes(i)){const n=e.cloneNode(!1);n.style.overflow="auto",n.style.position="absolute",e.nextElementSibling?r.insertBefore(n,e.nextElementSibling):r.appendChild(n);const i=parseInt((0,s.getComputedStyle)(n,t).height,10);r.removeChild(n),0===i&&(h=0)}h=Math.min(h,l),o.height="auto"===n?"auto":`${h}px`,u=Math.min(u,a),o.width=`${u}px`,o.overflow="",this.hasTableHeight="auto"===o.height||h>0,this.hasTableWidth=u>0}this.isTableVisible=(0,s.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,r="master",n=e.getSetting("columnHeaders").length;if(n&&!t.hasOversizedColumnHeadersMarked[r]){const s=e.getSetting("rowHeaders").length,i=this.getRenderedColumnsCount();for(let e=0;e<n;e++)for(let e=-1*s;e<i;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[r]=!0}}}(0,l.mixin)(u,o.default),(0,l.mixin)(u,a.default);t.default=u},27972:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;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},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=n},46962:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;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},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=n},29185:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=n},3148:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),r=e-t;return 0===e||0===t?-1:r<0?0:r},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=n},75237:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=n},54472:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(75237)),o=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},34868:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(75237)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},66830:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(49587),o=r(5682);t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),(0,s.default)(this,"headerWidths",new Map),(0,s.default)(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new o.ColumnStretching({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const r=this.stretching.getStretchedColumnWidth(e,t);return r&&(t=r),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const r=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==r&&(t=t?Math.max(t,r):r),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:r}=this.dataAccessObject,n=r?r.wtTable.holder:e.holder,s=n.offsetHeight<n.scrollHeight?(0,i.getScrollbarWidth)():0;this.stretching.refreshStretching(t.getViewportWidth()-s)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!=t){const r=e.getSetting("rowHeaders").length,n=e.getSetting("defaultColumnWidth");for(let e=0;e<r;e++){let r=Array.isArray(t)?t[e]:t;r=null==r?n:r,this.headerWidths.set(e,r)}}}}},5682:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(42538)),o=n(r(48427));function a(e,t,r){!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,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;class f{static get DEFAULT_WIDTH(){return 50}constructor(e){let{totalColumns:t,stretchMode:r,stretchingColumnWidthFn:n,columnWidthFn:f}=e;(0,s.default)(this,"stretchAllRatio",0),(0,s.default)(this,"stretchLastWidth",0),(0,s.default)(this,"stretchAllColumnsWidth",[]),a(this,l,{writable:!0,value:0}),(0,s.default)(this,"needVerifyLastColumnWidth",!0),a(this,u,{writable:!0,value:()=>0}),a(this,h,{writable:!0,value:e=>e}),a(this,c,{writable:!0,value:e=>e}),a(this,d,{writable:!0,value:()=>"none"}),(0,o.default)(this,u,t),(0,o.default)(this,d,r),(0,o.default)(this,h,null!=n?n:(0,i.default)(this,h)),(0,o.default)(this,c,null!=f?f:(0,i.default)(this,c))}refreshStretching(e){if("none"===(0,i.default)(this,d).call(this))return;(0,o.default)(this,l,e);let t=0;for(let r=0;r<(0,i.default)(this,u).call(this);r++){const n=this._getColumnWidth(r),s=(0,i.default)(this,h).call(this,void 0,r);"number"==typeof s?e-=s:t+=n}const r=e-t;if("all"===(0,i.default)(this,d).call(this)&&r>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===(0,i.default)(this,d).call(this)&&e!==1/0){const e=this._getColumnWidth((0,i.default)(this,u).call(this)-1),t=r+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let r=null;return"all"===(0,i.default)(this,d).call(this)&&0!==this.stretchAllRatio?r=this._getStretchedAllColumnWidth(e,t):"last"===(0,i.default)(this,d).call(this)&&0!==this.stretchLastWidth&&(r=this._getStretchedLastColumnWidth(e)),r}_getStretchedAllColumnWidth(e,t){let r=0;if(!this.stretchAllColumnsWidth[e]){const r=Math.round(t*this.stretchAllRatio),n=(0,i.default)(this,h).call(this,r,e);this.stretchAllColumnsWidth[e]=void 0===n?r:isNaN(n)?this._getColumnWidth(e):n}if(this.stretchAllColumnsWidth.length===(0,i.default)(this,u).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)r+=this.stretchAllColumnsWidth[e];r!==(0,i.default)(this,l)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=(0,i.default)(this,l)-r)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===(0,i.default)(this,u).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=(0,i.default)(this,c).call(this,e);return isNaN(t)&&(t=f.DEFAULT_WIDTH),t}}t.ColumnStretching=f},88929:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){(0,s.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},79208:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},32512:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));t.OrderView=s.default;var i=n(r(81004));t.SharedOrderView=i.default},81004:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));class i extends s.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=i},69191:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(79208),o=n(r(72844));t.default=class{constructor(e,t,r){(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"nodesPool",void 0),(0,s.default)(this,"sizeSet",new o.default),(0,s.default)(this,"childNodeType",void 0),(0,s.default)(this,"visualIndex",0),(0,s.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=r.toUpperCase()}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 r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(i.WORKING_SPACE_TOP))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize();let s=this.getRenderedChildCount();for(;s<n;){const n=this.nodesPool();!r||r&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)?e.appendChild(n):e.insertBefore(n,e.firstChild),s+=1}const o=r&&t.isPlaceOn(i.WORKING_SPACE_TOP);for(;s>n;)e.removeChild(o?e.firstChild:e.lastChild),s-=1}render(){const{rootNode:e,sizeSet:t}=this;let r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)&&(r+=t.sharedSize.nextSize);let n=e.childNodes[r];if(n.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,n),n=t}this.collectedNodes.push(n),this.visualIndex+=1}end(){}}},53566:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(){(0,s.default)(this,"currentSize",0),(0,s.default)(this,"nextSize",0),(0,s.default)(this,"currentOffset",0),(0,s.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},72844:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(53566)),o=r(79208);t.default=class{constructor(){(0,s.default)(this,"size",new i.default),(0,s.default)(this,"workingSpace",o.WORKING_SPACE_ALL),(0,s.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof i.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=o.WORKING_SPACE_TOP,e.workingSpace=o.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=o.WORKING_SPACE_BOTTOM,e.workingSpace=o.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},18365:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(t=void 0===t?r:Math.max(t,r)),t}}},55778:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(76163),i=r(10933);t.default=class{constructor(e,t,r,n,s){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=r,this.wtTable=s,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=n,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let r=0;if(t===this.domBindings.rootWindow)r=e.documentElement.clientHeight;else{r=(0,n.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return r}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:r}=this.domBindings,s=this.dataAccessObject.inlineStartOverlayTrimmingContainer,i=t.documentElement.offsetWidth,o=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),u=this.wtTable.TABLE.getBoundingClientRect(),h=i-(l?u.right-i:u.left);let c,d;if(a)return(0,n.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(h,i):Math.min(this.getContainerFillWidth(),h,i),s===r&&o>0&&this.sumColumnWidths(0,o-1)>c)return t.documentElement.clientWidth;if(s!==r&&(d=(0,n.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",r),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(c,s.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?c:Math.max(c,(0,n.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return r}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 r=t.offsetWidth;return this.containerWidth=r,e.removeChild(t),r}getWorkspaceOffset(){return(0,n.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,n.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 r=0,n=t.length;r<n;r++)this.rowHeaderWidth+=e[r]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let r=0,s=t.length;r<s;r++)e?(this.rowHeaderWidth+=(0,n.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]:i.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;if(t.getSetting("renderAllRows")&&e===i.RENDER_TYPE)return new i.RenderAllRowsCalculator({totalRows:t.getSetting("totalRows")});let s,o,a=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const u=t.getSetting("fixedRowsTop"),h=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return u&&l>=0&&(o=this.dataAccessObject.topOverlay.sumCellSizes(0,u),l+=o,a-=o),h&&this.dataAccessObject.bottomOverlay.clone&&(o=this.dataAccessObject.bottomOverlay.sumCellSizes(c-h,c),a-=o),s=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({viewportHeight:a,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:s})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;if(t.getSetting("renderAllColumns")&&e===i.RENDER_TYPE)return new i.RenderAllColumnsCalculator({totalColumns:t.getSetting("totalColumns")});let s=this.getViewportWidth(),o=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&o>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);o+=e,s-=e}return r.holder.clientWidth!==r.holder.offsetWidth&&(s-=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),new i.ViewportColumnsCalculator({viewportWidth:s,scrollOffset:o,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this;if(e&&!t.getSetting("renderAllRows")){const t=this.createRowsCalculator(i.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=this.createColumnsCalculator(i.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(i.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(i.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(i.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(i.FULLY_VISIBLE_TYPE)}createPartiallyVisibleCalculators(){this.rowsPartiallyVisibleCalculator=this.createRowsCalculator(i.PARTIALLY_VISIBLE_TYPE),this.columnsPartiallyVisibleCalculator=this.createColumnsCalculator(i.PARTIALLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startRow:s,endRow:i}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>i||r===i&&r<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startColumn:s,endColumn:i}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>i||r===i&&r<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}}},73421:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(16247),r(25671),r(97796),r(36662);var s=n(r(40898)),i=r(83059),o=r(70400),a=n(r(54925)),l=r(19310),u=r(79321),h=r(44575),c=r(86446),d=r(94699);function f(e,t){const r=new s.default(e,t||{},i.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,u.registerCellType)(h.TextCellType),f.editors={BaseEditor:c.BaseEditor},f.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,i.rootInstanceSymbol)},f.DefaultSettings=(0,o.metaSchemaFactory)(),f.hooks=a.default.getSingleton(),f.CellCoords=d.CellCoords,f.CellRange=d.CellRange,f.packageName="handsontable",f.buildDate="31/01/2024 11:08:19",f.version="0.0.0-next-14118b6-20240131",f.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=f},90078:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16478),s=r(20395),i=r(78420);const o=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:o,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:i.autocompleteValidator}},1544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90078);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},19992:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73388),s=r(30201);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:n.CheckboxEditor,renderer:s.checkboxRenderer}},17177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19992);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},55261:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(92090),s=r(61795),i=r(63322);const o=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:o,editor:n.DateEditor,renderer:s.dateRenderer,validator:i.dateValidator}},69364:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55261);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},93534:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28544),s=r(81393),i=r(19246);const o=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:o,editor:n.DropdownEditor,renderer:s.dropdownRenderer,validator:i.dropdownValidator}},29329:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93534);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},37007:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12540),s=r(75067);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:n.HandsontableEditor,renderer:s.handsontableRenderer}},26737:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37007);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},419:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,f.registerCellType)(n.AutocompleteCellType),(0,f.registerCellType)(s.CheckboxCellType),(0,f.registerCellType)(i.DateCellType),(0,f.registerCellType)(o.DropdownCellType),(0,f.registerCellType)(a.HandsontableCellType),(0,f.registerCellType)(l.NumericCellType),(0,f.registerCellType)(u.PasswordCellType),(0,f.registerCellType)(h.SelectCellType),(0,f.registerCellType)(c.TextCellType),(0,f.registerCellType)(d.TimeCellType)};var n=r(1544);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(17177);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var i=r(69364);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var o=r(29329);t.DropdownCellType=o.DropdownCellType,t.DROPDOWN_TYPE=o.CELL_TYPE;var a=r(26737);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(59854);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var u=r(97839);t.PasswordCellType=u.PasswordCellType,t.PASSWORD_TYPE=u.CELL_TYPE;var h=r(85e3);t.SelectCellType=h.SelectCellType,t.SELECT_TYPE=h.CELL_TYPE;var c=r(44575);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(738);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var f=r(79321);t.registerCellType=f.registerCellType,t.getCellType=f.getCellType,t.getRegisteredCellTypeNames=f.getRegisteredCellTypeNames,t.getRegisteredCellTypes=f.getRegisteredCellTypes,t.hasCellType=f.hasCellType},59854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57846);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},57846:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6618),s=r(94350),i=r(22905);const o=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:o,editor:n.NumericEditor,renderer:s.numericRenderer,validator:i.numericValidator,dataType:"number"}},97839:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28204);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},28204:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(50647),s=r(32991);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1}},79321:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCellType=function(e){if(!h(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 u(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:r,renderer:n,validator:s}=t;r&&(0,i.registerEditor)(e,r);n&&(0,o.registerRenderer)(e,n);s&&(0,a.registerValidator)(e,s);l(e,t)},r(91683);var s=n(r(31056)),i=r(16691),o=r(36996),a=r(59340);const{register:l,getItem:u,hasItem:h,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=h},85e3:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59139);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},59139:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(71177),s=r(9126);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:n.SelectEditor,renderer:s.selectRenderer}},44575:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(89294);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},89294:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(26031);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:n.TextEditor,renderer:s.textRenderer}},738:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59115);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},59115:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76219),s=r(78279),i=r(85137);const o=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:o,editor:n.TimeEditor,renderer:s.timeRenderer,validator:i.timeValidator}},40898:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t){var r,n=this;let H=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=this;const U=new u.default(F);let V,B,W,Y,G,j,z=!0;(0,T.hasValidParameter)(H)&&(0,T.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,b.getValidLanguageCode)(t.language);const X=new O.MetaManager(F,t,[O.DynamicCellMetaMod,O.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),Z=(0,x.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,T.isRootInstance)(this)&&(0,o._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,w.randomString)()}`,k.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),B=new v.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let J=new A.Selection(q,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>V.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,r)=>F._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?F.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?F.columnIndexMapper.getVisualFromRenderableIndex(r):r)},isDisabledCellSelection:(e,t)=>e<0||t<0?F.getSettings().disableVisualSelection:F.getCellMeta(e,t).disableVisualSelection});this.selection=J;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,M.normalizeLanguageCode)(e);(0,b.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),Q.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function re(e,t){const r="className"===e?F.rootElement:F.table;if(z)(0,s.addClass)(r,t);else{let n=[],i=[];Q[e]&&(n=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(i=Array.isArray(t)?t:(0,d.stringToArray)(t));const o=(0,d.getDifferenceOfArrays)(n,i),a=(0,d.getDifferenceOfArrays)(i,n);o.length&&(0,s.removeClass)(r,o),a.length&&(0,s.addClass)(r,a)}Q[e]=t}function ne(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ie(e,t,r){if(!e.length)return;const n=F.getActiveEditor(),i=new ne;let o=!0;i.onQueueEmpty=e=>{n&&o&&n.cancelChanges(),r(e)};for(let r=e.length-1;r>=0;r--){const[n,a,,l]=e[r],u=V.propToCol(a),h=F.getCellMeta(n,u);"numeric"===h.type&&"string"==typeof l&&(0,y.isNumericLike)(l)&&(e[r][3]=se(l)),F.getCellValidator(h)&&(i.addValidatorToQueue(),F.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");if(!1===n&&!1===r.allowInvalid){o=!1,e.splice(t,1),r.valid=!0;const n=F.getCell(r.visualRow,r.visualCol);null!==n&&(0,s.removeClass)(n,q.invalidCellClassName)}i.removeValidatorFormQueue()}}(r,h),t))}i.checkIfQueueIsEmpty()}function oe(e,t){let r=e.length-1;if(r<0)return;for(;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(q.allowInsertRow)for(;e[r][0]>F.countRows()-1;){const{delta:e}=V.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===F.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;V.propToCol(e[r][1])>F.countCols()-1;){const{delta:e}=V.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||V.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}F.forceFullRender=!0,W.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),Y.lockEditor(),F._refreshBorders(null),Y.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const n=F.getActiveEditor();n&&(0,o.isDefined)(n.refreshValue)&&n.refreshValue()}function ae(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function le(e,t){const r=F.getActiveEditor(),n=F.runHooks("beforeChange",e,t||"edit"),s=e.filter((e=>null!==e));return!1===n||0===s.length?(r&&r.cancelChanges(),[]):s}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const r=(0,h.createObjectPropListener)(!1),n=this.selection.getSelectedRange(),{from:i,to:o}=n.current(),a=n.size()-1;this.runHooks("afterSelection",i.row,i.col,o.row,o.col,r,a),this.runHooks("afterSelectionByProp",i.row,F.colToProp(i.col),o.row,F.colToProp(o.col),r,a),t&&(!r.isTouched()||r.isTouched()&&!r.value)&&j.scrollTo(e);const l=J.isSelectedByRowHeader(),u=J.isSelectedByColumnHeader();l&&u?(0,s.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?((0,s.removeClass)(this.rootElement,"ht__selection--columns"),(0,s.addClass)(this.rootElement,"ht__selection--rows")):u?((0,s.removeClass)(this.rootElement,"ht__selection--rows"),(0,s.addClass)(this.rootElement,"ht__selection--columns")):(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,F.colToProp(r.col),n.row,F.colToProp(n.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{Y.destroyEditor(),this._refreshBorders(),(0,s.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),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.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"))),W={alter(e,t){var r,n;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[r,n]=t;const s=e[e.length-1],[i,o]=s,a=i+o;if(r<=a){const e=Math.max(n-(a-r),0);s[1]+=e}else e.push([r,n]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=F.countSourceRows();if(q.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===u?a:0;const{delta:h,startPhysicalIndex:c}=V.createRow(t,s,{source:i,mode:u});if(h){const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.row,n=F.toVisualRow(c);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,o.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let i=t.col;J.isSelectedByRowHeader()&&(i=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(r+h,i),!0),J.setRangeEnd(F._createCellCoords(n+h,s))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===f?F.countSourceCols():0;const{delta:p,startPhysicalIndex:g}=V.createCol(t,s,{source:i,mode:f});if(p){if(Array.isArray(q.colHeaders)){const e=[F.toVisualColumn(g),0];e.length+=p,Array.prototype.splice.apply(q.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.col,n=F.toVisualColumn(g);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,o.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let i=t.row;J.isSelectedByColumnHeader()&&(i=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(i,r+p),!0),J.setRangeEnd(F._createCellCoords(n,s+p))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?F.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!V.removeRow(r,n,i))return;const a=F.countRows(),l=q.fixedRowsTop;l>=s+1&&(q.fixedRowsTop-=Math.min(n,l-s));const u=q.fixedRowsBottom;u&&s>=a-u&&(q.fixedRowsBottom-=Math.min(n,u)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]),W.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const E=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?F.countCols()-1:Math.max(r-t,0);let a=F.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!V.removeCol(r,n,i))return;const l=q.fixedColumnsStart;l>=s+1&&(q.fixedColumnsStart-=Math.min(n,l-s)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,n)),t+=n}))};Array.isArray(t)?E(l(t)):E([[t,s]]),W.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||W.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,r=q.minCols,n=q.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&J.deselect(),e){const t=F.countRows();t<e&&V.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,q.maxRows-F.countSourceRows());V.createRow(F.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(r&&!q.columns&&t<r){const n=r-t;e+=n,V.createCol(t,n,{source:"auto"})}if(n&&!q.columns&&"array"===F.dataType&&e<n){t=F.countCols();const r=n-e,s=Math.min(r,q.maxCols-t);V.createCol(t,s,{source:"auto"})}}if(J.isSelected()){const e=F.countRows(),t=F.countCols();(0,d.arrayEach)(J.selectedRange,(r=>{let n=!1,s=r.from.row,i=r.from.col,o=r.to.row,a=r.to.col;s>e-1?(s=e-1,n=!0,o>s&&(o=s)):o>e-1&&(o=e-1,n=!0,s>o&&(s=o)),i>t-1?(i=t-1,n=!0,a>i&&(a=i)):a>t-1&&(a=t-1,n=!0,i>a&&(i=a)),n&&(i<0?F.selectRows(s,o,i):s<0?F.selectColumns(i,a,s):F.selectCell(s,i,o,a))}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let i,o,a,l;const u=[],c={},f=[],p=e.row,g=e.col;if(o=t.length,0===o)return!1;let m=0,E=0;switch((0,h.isObject)(r)&&(m=r.col-g+1,E=r.row-p+1),s){case"shift_down":const s=(0,d.pivot)(t),w=s.length,y=Math.max(w,m),C=F.getData().slice(p),v=(0,d.pivot)(C).slice(g,g+y);for(a=0;a<y;a+=1)if(a<w){for(i=0,o=s[a].length;i<E-o;i+=1)s[a].push(s[a][i%o]);a<v.length?f.push(s[a].concat(v[a])):f.push(s[a].concat(new Array(C.length).fill(null)))}else f.push(s[a%w].concat(v[a]));F.populateFromArray(p,g,(0,d.pivot)(f));break;case"shift_right":const S=t.length,R=Math.max(S,E),T=F.getData().slice(p).map((e=>e.slice(g)));for(i=0;i<R;i+=1)if(i<S){for(a=0,l=t[i].length;a<m-l;a+=1)t[i].push(t[i][a%l]);if(i<T.length)for(let e=0;e<T[i].length;e+=1)t[i].push(T[i][e]);else t[i].push(...new Array(T[0].length).fill(null))}else t.push(t[i%o].slice(0,R).concat(T[i]));F.populateFromArray(p,g,t);break;default:c.row=e.row,c.col=e.col;let N,_=0,b=0,M=!0;const A=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t[e%t.length];return null!==r?n[r%n.length]:n},O=t.length,I=r?r.row-e.row+1:0;for(o=r?I:Math.max(O,I),i=0;i<o&&!(r&&c.row>r.row&&I>O||!q.allowInsertRow&&c.row>F.countRows()-1||c.row>=q.maxRows);i++){const t=i-_,s=A(t).length,d=r?r.col-e.col+1:0;if(l=r?d:Math.max(s,d),c.col=e.col,N=F.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(b=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!q.allowInsertColumn&&c.col>F.countCols()-1||c.col>=q.maxCols);a++){if(N=F.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){b+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-b),r=F.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)M=!1;else{const t=(0,h.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,h.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,h.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,h.deepClone)(e):M=!1}else null!==r&&"object"==typeof r&&(M=!1);M&&u.push([c.row,c.col,e]),M=!0,c.col+=1}c.row+=1}else _+=1,c.row+=1,o+=1}F.setDataAtCell(u,null,null,n||"populateFromArray")}}},this.init=function(){B.setData(q.data),F.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(F.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new C.default(this),Y=l.default.getInstance(F,q,J),j=(0,I.createViewportScroller)(F),G=new c.FocusManager(F),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===F.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof z&&(F.runHooks("afterChange",z[0],z[1]),z=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return F.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=F.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void r(e);const n=t.visualCol,s=t.visualRow,i=F.getCell(s,n,!0);if(i&&"TH"!==i.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(s),t=F.columnIndexMapper.getRenderableFromVisualIndex(n);F.view._wt.getSetting("cellRenderer",e,t,i)}r(e)}var l;(0,o.isRegExp)(s)&&(l=s,s=function(e,t){t(l.test(e))}),(0,i.isFunction)(s)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,n),F._registerImmediate((()=>{s.call(t,e,(r=>{F&&(r=F.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),F.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):F._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=ae(e,t,r),i=[];let o,a,l,u=n;for(o=0,a=s.length;o<a;o++){if("object"!=typeof s[o])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[o][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`");l=s[o][1]>=this.countCols()?s[o][1]:V.colToProp(s[o][1]),i.push([s[o][0],l,B.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}u||"object"!=typeof e||(u=t);const h=le(i,n);F.runHooks("afterSetDataAtCell",h,u),ie(h,u,(()=>{oe(h,u)}))},this.setDataAtRowProp=function(e,t,r,n){const s=ae(e,t,r),i=[];let o,a,l=n;for(o=0,a=s.length;o<a;o++)i.push([s[o][0],s[o][1],B.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]]);l||"object"!=typeof e||(l=t);const u=le(i,n);F.runHooks("afterSetDataAtRowProp",u,l),ie(u,l,(()=>{oe(u,l)}))},this.listen=function(){F&&!F.isListening()&&(k.forEach((e=>{F!==e&&e.unlisten()})),D=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return D===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,r,n,s,i,o){if("object"!=typeof r||"object"!=typeof r[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof n?F._createCellCoords(n,s):null;return W.populateFromArray(F._createCellCoords(e,t),r,a,i,o)},this.spliceCol=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),i=3;i<n;i++)s[i-3]=arguments[i];return V.spliceCol(e,t,r,...s)},this.spliceRow=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),i=3;i<n;i++)s[i-3]=arguments[i];return V.spliceRow(e,t,r,...s)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,y.rangeEach)(r.row,n.row,(e=>{(0,y.rangeEach)(r.col,n.col,(r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,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()||(Y.lockEditor(),this._refreshBorders(null),Y.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 r=e();return this.resumeExecution(t),r},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:r,height:n}=F.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(r,n),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,O.replaceData)(e,(e=>{V=e}),(e=>{V=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),W.adjustRowsAndCols()}),{hotInstance:F,dataMap:V,dataSource:B,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,O.replaceData)(e,(e=>{V=e}),(()=>{X.clearCellsCache(),F.initIndexMappers(),W.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:F,dataMap:V,dataSource:B,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,i.isFunction)(e))if("array"===F.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=V.colToPropCache.length);else if((0,o.isDefined)(q.dataSchema)){const e=V.getSchema();t=Array.isArray(e)?e.length:(0,h.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,r,n){return(0,o.isUndefined)(e)?V.getAll():V.getRange(F._createCellCoords(e,t),F._createCellCoords(r,n),V.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return V.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(r,n))},this.getCopyableData=function(e,t){return V.getCopyable(e,V.colToProp(t))},this.getSchema=function(){return V.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=(z?F.loadData:F.updateData).bind(this);let n,s,a=!1;if((0,o.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,o.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,o.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in e)"data"===n||("language"===n?te(e.language):"className"===n?re("className",e.className):"tableClassName"===n&&F.table?(re("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):_.default.getSingleton().isRegistered(n)||_.default.getSingleton().isDeprecated(n)?((0,i.isFunction)(e[n])||Array.isArray(e[n]))&&(e[n].initialHook=!0,F.addHook(n,e[n])):!t&&(0,h.hasOwnProperty)(e,n)&&(Q[n]=e[n]));void 0===e.data&&void 0===q.data?r(null,"updateSettings"):void 0!==e.data?r(e.data,"updateSettings"):void 0!==e.columns&&(V.createMap(),F.initIndexMappers());const l=F.countCols(),u=q.columns;if(u&&(0,i.isFunction)(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(u){const e=a?u(n):u[s];e&&X.updateColumnMeta(s,e)}s+=1}(0,o.isDefined)(e.cell)&&(0,h.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let c=F.rootElement.style.height;""!==c&&(c=parseInt(F.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===d){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==d&&(F.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),W.adjustRowsAndCols(),F.view&&!z&&(F.forceFullRender=!0,Y.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),Y.unlockEditor()),t||!F.view||""!==c&&""!==d&&void 0!==d||c===d||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if(q.getValue){if((0,i.isFunction)(q.getValue))return q.getValue.call(F);if(e)return F.getData()[e[0][0]][q.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,r,n,s){W.alter(e,t,r,n,s)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,s=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;n=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;s=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===s||null===n?null:F.view.getCellAtCoords(F._createCellCoords(s,n),r)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:r,col:n}=t;let s=r,i=n;return r>=0&&(s=this.rowIndexMapper.getVisualFromRenderableIndex(r)),n>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(n)),F._createCellCoords(s,i)},this.colToProp=function(e){return V.colToProp(e)},this.propToCol=function(e){return V.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 V.get(e,V.colToProp(t))},this.getDataAtRowProp=function(e,t){return V.get(e,t)},this.getDataAtCol=function(e){const t=[],r=V.getRange(F._createCellCoords(0,e),F._createCellCoords(q.data.length-1,e),V.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getDataAtProp=function(e){const t=[],r=V.getRange(F._createCellCoords(0,V.propToCol(e)),F._createCellCoords(q.data.length-1,V.propToCol(e)),V.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getSourceData=function(e,t,r,n){let s;return s=void 0===e?B.getData():B.getByRange(F._createCellCoords(e,t),F._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?B.getData(!0):B.getByRange(F._createCellCoords(e,t),F._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=ae(e,t,r),i=this.hasHook("afterSetSourceDataAtCell"),a=[];i&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,B.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;B.setAtCell(t,r,n)})),i&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=F.getActiveEditor();l&&(0,o.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return V.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),V.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){const s=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,r,n],[i,o]=s;let[,,a,l]=s,u=null,h=null;void 0===a&&(a=i),void 0===l&&(l=o);let c="mixed";return(0,y.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(e=>{let t=!0;return(0,y.rangeEach)(Math.max(Math.min(o,l),0),Math.max(o,l),(r=>{const n=this.getCellMeta(e,r);return h=n.type,u?t=u===h:u=h,t})),c=t?h:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=X.getCellMetaKeyValue(n,s,r);!1!==F.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(X.removeCellMeta(n,s,r),F.runHooks("afterRemoveCellMeta",e,t,r,i)),i=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];if(n.length>0&&!Array.isArray(n[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),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),F.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,h.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===F.runHooks("beforeSetCellMeta",e,t,r,n))return;let s=e,i=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),X.setCellMeta(s,i,r,n),F.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),X.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,g.getRenderer)(r):(0,o.isUndefined)(r)?(0,g.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?(0,m.getEditor)(r):(0,o.isUndefined)(r)?(0,m.getEditor)("text"):r},this.getCellValidator=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,E.getValidator)(r):r},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,r){const n=new ne;e&&(n.onQueueEmpty=e);let s=F.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),F.validateCell(F.getDataAtCell(s,e),F.getCellMeta(s,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(n.valid=!1),n.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;s-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,r=e;return void 0!==r&&(r=F.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,y.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,i.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+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=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=F.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=F.countCols();for(let r=0;r<t;r++)e.push(F.getColHeader(r));return e}let n=q.colHeaders;const s=F.toPhysicalColumn(r),o=function(e){const t=[],r=F.countCols();let n=0;for(;n<r;n++)(0,i.isFunction)(q.columns)&&q.columns(n)&&t.push(n);return t[e]}(s);return!1===q.colHeaders?n=null:q.columns&&(0,i.isFunction)(q.columns)&&q.columns(o)&&q.columns(o).title?n=q.columns(o).title:q.columns&&q.columns[s]&&q.columns[s].title?n=q.columns[s].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[s]?n=q.colHeaders[s]:(0,i.isFunction)(q.colHeaders)?n=q.colHeaders(s):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(n=(0,S.spreadsheetColumnLabel)(r)),n=F.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.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=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=N.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=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return V.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,y.rangeEachReverse)(F.countRows()-1,(r=>{if(F.isEmptyRow(r))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,y.rangeEachReverse)(F.countCols()-1,(r=>{if(F.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(F,e)},this.selectCell=function(e,t,r,n){let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,o.isUndefined)(e)&&!(0,o.isUndefined)(t)&&this.selectCells([[e,t,r,n]],s,i)},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])&&j.suspend();const r=J.selectCells(e);return r&&t&&F.listen(),j.resume(),r},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return J.selectColumns(e,t,r)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return J.selectRows(e,t,r)},this.deselectCell=function(){J.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;j.skipNextScrollCycle(),J.selectAll(e,t,r)};const ue=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,r;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(r=arguments[4])||void 0===r||r});const{row:n,col:s,verticalSnap:i,horizontalSnap:o,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,u,h,c;void 0!==i&&(l="top"===i,u=!l),void 0!==o&&(h="start"===o,c=!h);let d=n,f=s;if(void 0===a||a){const e=Number.isInteger(n)&&n>=0,t=Number.isInteger(s)&&s>=0,r=e?ue(this.rowIndexMapper,n):void 0,i=t?ue(this.columnIndexMapper,s):void 0;if(null===r||null===i)return!1;d=e?F.rowIndexMapper.getRenderableFromVisualIndex(r):n,f=t?F.columnIndexMapper.getRenderableFromVisualIndex(i):s}const p=Number.isInteger(d),g=Number.isInteger(f);return p&&d>=0&&g&&f>=0?F.view.scrollViewport(F._createCellCoords(d,f),l,c,u,h):p&&d>=0&&(g&&f<0||!g)?F.view.scrollViewportVertically(d,l,u):!!(g&&f>=0&&(p&&d<0||!p))&&F.view.scrollViewportHorizontally(f,c,h)},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(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),X.clearCache(),k.delete(this.guid),(0,T.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(F.rootElement),U.destroy(),Y&&Y.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),Z.getItems().forEach((e=>{let[,t]=e;t.destroy()})),Z.clear(),F.runHooks("afterDestroy")}),!0),_.default.getSingleton().destroy(F),(0,h.objectEach)(F,((e,t,r)=>{var n;(0,i.isFunction)(e)?r[t]=(n=t,()=>{throw new Error(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)})),F.isDestroyed=!0,V&&V.destroy(),V=null,W=null,J=null,Y=null,F=null},this.getActiveEditor=function(){return Y.getActiveEditor()},this.getPlugin=function(e){const t=(0,w.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:Z.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:Z.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){_.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return _.default.getSingleton().has(e,F)||_.default.getSingleton().has(e)},this.addHookOnce=function(e,t){_.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){_.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,r,n,s,i,o){return _.default.getSingleton().run(F,e,t,r,n,s,i,o)},this.getTranslatedPhrase=function(e,t){return(0,b.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,f.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,f.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Y.destroyEditor(e),F.view.render(),t&&J.isSelected()&&Y.prepareEditor()},this._getEditorManager=function(){return Y},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const he=(0,P.createShortcutManager)({handleEvent:()=>F.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},this.getFocusManager=function(){return G},(0,p.getPluginsNames)().forEach((e=>{const t=(0,p.getPlugin)(e);Z.addItem(e,new t(this))})),(0,L.registerAllShortcutContexts)(F),he.setActiveContextName("grid"),_.default.getSingleton().run(F,"construct")},r(63517),r(91683),r(97552);var s=r(49587),i=r(46029),o=r(97639),a=r(78498),l=n(r(80940)),u=n(r(57340)),h=r(76163),c=r(14864),d=r(98887),f=r(65795),p=r(5280),g=r(36996),m=r(16691),E=r(59340),w=r(37913),y=r(57691),C=n(r(26969)),v=n(r(36129)),S=r(56020),R=r(41789),T=r(83059),N=r(94699),_=n(r(54925)),b=r(19310),M=r(6415),A=r(79055),O=r(70400),I=r(47378),x=r(8815),P=r(48120),L=r(51377);let D=null;const k=new Map;new Set},39785:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.rootElement,n=i(e),s=i(e);return n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),r.firstChild.before(n),r.lastChild.after(s),{activate(){e._registerTimeout((()=>{n.tabIndex=0,s.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{n.tabIndex=-1,s.tabIndex=-1}),10)}}};var n=r(49587),s=r(66862);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)(),(0,s.A11Y_HIDDEN)()]),t}},90376:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){const t=function(e){return t=>{if(!t)return null;const r=i(e),n=o(e);return t.col<r.col&&(t.col=r.col),t.col>n.col&&(t.col=n.col),t.row<r.row&&(t.row=r.row),t.row>n.row&&(t.row=n.row),t}}(e);let r;const{activate:a,deactivate:l}=(0,s.installFocusDetector)(e,{onFocusFromTop(){var n;const s=null!==(n=t(r))&&void 0!==n?n:i(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_above",s),e.selectCell(s.row,s.col)),e.listen()},onFocusFromBottom(){var n;const s=null!==(n=t(r))&&void 0!==n?n:o(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_below",s),e.selectCell(s.row,s.col)),e.listen()}}),u={wrapped:!1,flipped:!1};let h=!0,c=!1,d=!1;e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>a())),e.addHook("afterSelection",((t,n,s,i,o)=>{var a;(c&&(u.wrapped&&u.flipped||d)&&(d=!1,o.value=!0),h)&&(r=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,r)=>{u.wrapped=!0,u.flipped=r}));const f={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:n.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...f,callback:()=>{const{tabNavigation:t}=e.getSettings();c=!0,e.getSelectedRangeLast()&&!t&&(h=!1),t||(d=!0)},position:"before"},{...f,callback:t=>{const{tabNavigation:n,autoWrapRow:s}=e.getSettings();if(c=!1,h=!0,!n||!e.selection.isSelected()||s&&u.wrapped&&u.flipped||!s&&u.wrapped)return s&&u.wrapped&&u.flipped&&(r=t.shiftKey?i(e):o(e)),u.wrapped=!1,u.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var n=r(51377),s=r(39785);function i(e){const{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings();let s=n&&e.countColHeaders()>0?-e.countColHeaders():0,i=n&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===s&&(s=t.getVisualFromRenderableIndex(s)),0===i&&(i=r.getVisualFromRenderableIndex(i)),null===s||null===i?null:e._createCellCoords(s,i)}function o(e){var t,r;const{rowIndexMapper:n,columnIndexMapper:s}=e,{navigableHeaders:i}=e.getSettings();let o=n.getRenderableIndexesLength()-1,a=s.getRenderableIndexesLength()-1;if(o<0){if(!i||0===e.countColHeaders())return null;o=-1}if(a<0){if(!i||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=n.getVisualFromRenderableIndex(o))&&void 0!==t?t:o,null!==(r=s.getVisualFromRenderableIndex(a))&&void 0!==r?r:a)}},47378:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90376);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(64915);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},64915:(e,t,r)=>{"use strict";t.__esModule=!0,t.createViewportScroller=function(e){const{selection:t}=e;let r=!1,u=!1;return{resume(){u=!1},suspend(){u=!0},skipNextScrollCycle(){r=!0},scrollTo(h){var c;if(r||u)return void(r=!1);let d;t.isSelectedByCorner()?d=(0,s.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?d=(0,a.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?d=(0,n.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?d=(0,i.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(d=(0,o.noncontiguousScrollStrategy)(e)):d=(0,l.singleScrollStrategy)(e),null===(c=d)||void 0===c||c(h)}}};var n=r(85092),s=r(49881),i=r(10337),o=r(77106),a=r(39204),l=r(54018)},85092:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:r}=t;e.scrollViewportTo({col:r})}}},49881:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},10337:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},77106:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},39204:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:r}=t;e.scrollViewportTo({row:r})}}},54018:(e,t)=>{"use strict";t.__esModule=!0,t.singleScrollStrategy=function(e){return t=>{const r=e.selection.getSelectionSource(),{row:n,col:s}=t;if(n<0&&s>=0)e.scrollViewportTo({col:s});else if(s<0&&n>=0)e.scrollViewportTo({row:n});else{if("mouse"===r&&(s===e.view.getLastPartiallyVisibleColumn()||n===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:n,col:s})}}}},38085:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(32313),o=r(56020),a=r(76163),l=r(98887),u=r(57691),h=r(97639);class c{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,r){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"dataSource",void 0),(0,s.default)(this,"duckSchema",void 0),(0,s.default)(this,"colToPropCache",void 0),(0,s.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),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 r;if(this.colToPropCache=[],this.propToColCache=new Map,t){let n=0,s=0,i=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);n=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;n=Math.min(e,t.length)}for(r=0;r<n;r++){const e=i?t(r):t[r];if((0,a.isObject)(e)){if(void 0!==e.data){const t=i?s:r;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}s+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,o.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,r){let n,s=t,i=r;return void 0===s&&(s=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(n=i+t,this.colToPropCache.push(n),this.propToColCache.set(n,s),s+=1):s=this.recursiveDuckColumns(e,s,`${t}.`)})),s}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,h.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,h.isDefined)(t))return this.hot.toVisualColumn(t);const r=this.hot.toVisualColumn(e);return null===r?e:r}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.hot.countSourceRows();let i=s,o=0,l=e;("number"!=typeof l||l>=s)&&(l=s),l<this.hot.countRows()&&(i=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,r)||null===i)return{delta:0};const h=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;o<t&&s+o<h;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,u.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+o):(e={},(0,a.deepExtend)(e,this.getSchema())),d.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(l,o),"below"===n&&(i=Math.min(i+1,s)),this.spliceData(i,0,d);const f=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),o>0&&(null==e?this.metaManager.createRow(null,o):"auto"!==r&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",f,o,r),this.hot.forceFullRender=!0,{delta:o,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.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 s=this.dataSource,i=this.tableMeta.maxCols,o=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=o)&&(a=o);if(!1===this.hot.runHooks("beforeCreateCol",a,t,r))return{delta:0};let l=o;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,o));const f=d;for(;c<t&&h<i;){if("number"!=typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<u;e++)s[e].splice(d,0,null);c+=1,d+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:f}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,n=Number.isInteger(e)?e:-t;const s=this.visualRowsToPhysical(n,t),i=this.hot.countSourceRows();n=(i+n)%i;if(!1===this.hot.runHooks("beforeRemoveRow",n,s.length,s,r))return!1;const o=s.length;if(this.filterData(n,o,s),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(s);const e=(0,h.isDefined)(this.tableMeta.columns)||(0,h.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return s.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",n,o,s,r),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();const s=this.visualColumnsToPhysical(n,t),i=s.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",n,t,s,r))return!1;let o=!0;const a=i.length,l=this.dataSource;for(let e=0;e<a;e++)o&&s[0]!==s[e]-e&&(o=!1);if(o)for(let e=0,r=this.hot.countSourceRows();e<r;e++)l[e].splice(s[0],t),0===e&&this.metaManager.removeColumn(s[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(i[t],1),0===e&&this.metaManager.removeColumn(i[t],1);return n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(s),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,s,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,r){const n=this.hot.getDataAtCol(e),s=n.slice(t,t+r),i=n.slice(t+r);for(var o=arguments.length,a=new Array(o>3?o-3:0),u=3;u<o;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,i);let h=0;for(;h<r;)a.push(null),h+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),s}spliceRow(e,t,r){const n=this.hot.getSourceDataAtRow(e),s=n.slice(t,t+r),i=n.slice(t+r);for(var o=arguments.length,a=new Array(o>3?o-3:0),u=3;u<o;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,i);let h=0;for(;h<r;)a.push(null),h+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),s}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){const t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,r){let n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter(((e,t)=>-1===r.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){const r=this.hot.toPhysicalRow(e);let n=this.dataSource[r];const s=this.hot.runHooks("modifyRowData",r);n=isNaN(s)?s:n;let i=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))i=n[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r=n;if(!r)return null;for(let t=0,n=e.length;t<n;t++)if(r=r[e[t]],void 0===r)return null;i=r}else"function"==typeof t&&(i=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,r){const n=this.hot.toPhysicalRow(e);let s=r,i=this.dataSource[n];const o=this.hot.runHooks("modifyRowData",n);if(i=isNaN(o)?o:i,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"set"),e.isTouched()&&(s=e.value)}if(i&&i.hasOwnProperty&&(0,a.hasOwnProperty)(i,t))i[t]=s;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r,n=i,o=0;for(o=0,r=e.length-1;o<r;o++)void 0===n[e[o]]&&(n[e[o]]={}),n=n[e[o]];n[e[o]]=s}else"function"==typeof t?t(this.dataSource.slice(n,n+1)[0],s):i[t]=s}visualRowsToPhysical(e,t){const r=this.hot.countSourceRows(),n=[];let s,i=(r+e)%r,o=t;for(;i<r&&o;)s=this.hot.toPhysicalRow(i),n.push(s),o-=1,i+=1;return n}visualColumnsToPhysical(e,t){const r=this.hot.countCols(),n=[];let s=(r+e)%r,i=t;for(;s<r&&i;){const e=this.hot.toPhysicalColumn(s);n.push(e),i-=1,s+=1}return n}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.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 r=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(r,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,c.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){const n=[];let s,i,o;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(s=Math.min(e.row,t.row);s<=h;s++){o=[];const r=s>=0?this.hot.toPhysicalRow(s):s;for(i=Math.min(e.col,t.col);i<=d&&null!==r;i++)o.push(u.call(this,s,this.colToProp(i)));null!==r&&n.push(o)}return n}getText(e,t){return(0,i.stringify)(this.getRange(e,t,c.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,i.stringify)(this.getRange(e,t,c.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=c},36129:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(56020),a=r(98887),l=r(57691),u=r(46029);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",void 0),(0,s.default)(this,"dataType","array"),(0,s.default)(this,"colToProp",(()=>{})),(0,s.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}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,a.arrayEach)(this.data,((r,n)=>{const s=this.getAtCell(n,e);t.push(s)})),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===r;let o=null,a=null;if(o=this.modifyRowData(e),Array.isArray(o))a=[],s?o.forEach(((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,o)})):(0,l.rangeEach)(t,r,(r=>{a[r-t]=this.getAtPhysicalCell(e,r,o)}));else if((0,i.isObject)(o)||(0,u.isFunction)(o))if(a=n?[]:{},!s||n){const s=0,u=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,u,(l=>{const h=this.colToProp(l);if(l>=(t||s)&&l<=(r||u)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,o);n?a.push(t):(0,i.setProperty)(a,h,t)}}))}else(0,i.objectEach)(o,((t,r)=>{(0,i.setProperty)(a,r,this.getAtPhysicalCell(e,r,o))}));return a}setAtCell(e,t,r){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,i.createObjectPropListener)(r);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(r=n.value)}Number.isInteger(t)?this.data[e][t]=r:(0,i.setProperty)(this.data[e],t,r)}}getAtPhysicalCell(e,t,r){let n=null;if(r&&(n="string"==typeof t?(0,i.getProperty)(r,t):"function"==typeof t?t(r):r[t]),this.hot.hasHook("modifySourceData")){const r=(0,i.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){const r=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),r)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,s=null,i=null,o=null,a=null;null===e||null===t?(n=!0,s=0,o=this.countRows()-1):(s=Math.min(e.row,t.row),i=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const u=[];return(0,l.rangeEach)(s,o,(e=>{u.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))})),u}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,o.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},70400:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(38085));t.DataMap=s.default;var i=n(r(84544));t.MetaManager=i.default;var o=n(r(16213));t.metaSchemaFactory=o.default;var a=r(92117);t.replaceData=a.replaceData;var l=r(90066);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var u=r(30084);t.ExtendMetaPropertiesMod=u.ExtendMetaPropertiesMod},84544:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(79626)),i=n(r(15198)),o=n(r(67257)),a=n(r(19736)),l=n(r(63806)),u=r(76163);class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new s.default(e),this.tableMeta=new i.default(this.globalMeta),this.columnMeta=new o.default(this.globalMeta),this.cellMeta=new a.default(this.columnMeta),r.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,r){let{visualRow:n,visualColumn:s}=r;const i=this.cellMeta.getMeta(e,t);return i.visualRow=n,i.visualCol=s,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaKeyValue(e,t,r){if("string"!=typeof r)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}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=h,(0,u.mixin)(h,l.default)},22358:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(98887),o=r(61530);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"valueFactory",void 0),(0,s.default)(this,"data",[]),(0,s.default)(this,"index",[]),(0,s.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let r;if(t>=0)r=this.data[t],void 0===r&&(r=this.valueFactory(e),this.data[t]=r);else if(r=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=r,this.index[e]=t}else this.data.push(r),this.index[e]=this.data.length-1;return r}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)||(0,o.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);const s=(0,o.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,s),...r,...this.index.slice(s)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)||(0,o.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=this.index.splice((0,o.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){const t=r[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,i.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const r=this._getKeyByStorageIndex(t);-1!==r&&e.push([r,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const r=e[t];return t+=1,{value:r,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)}[a](){return this.entries()}}},19736:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(22358)),l=r(97639);t.default=class{constructor(e){(0,s.default)(this,"columnMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,r){const n=this.getMeta(e,t);(0,i.extend)(n,r),(0,o.extendByMetaType)(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){const n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){var s;const i=this.metas.obtain(e).obtain(t);null===(s=i._automaticallyAssignedMetaProps)||void 0===s||s.delete(r),i[r]=n}removeMeta(e,t,r){delete this.metas.obtain(e).obtain(t)[r]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)(0,l.isDefined)(t[r])&&e.push(...t[r].values());return e}getMetasAtRow(e){(0,o.assert)((()=>(0,o.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 a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},67257:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(22358));const l=["data","width"];t.default=class{constructor(e){(0,s.default)(this,"globalMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const r=this.getMeta(e);(0,i.extend)(r,t),(0,o.extendByMetaType)(r,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,o.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},79626:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(16213));t.default=class{constructor(e){(0,s.default)(this,"metaCtor",class{}),(0,s.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,i.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,i.extend)(this.meta,e),(0,o.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},15198:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530);t.default=class{constructor(e){(0,s.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,i.extend)(this.meta,e),(0,o.extendByMetaType)(this.meta,e,e)}}},16213:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97639),s=r(76163);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,r,s;for(t=0,r=this.countRows();t<r;t++)if(s=this.getDataAtCell(t,e),!1===(0,n.isEmpty)(s))return!1;return!0},isEmptyRow(e){let t,r,i,o;for(t=0,r=this.countCols();t<r;t++)if(i=this.getDataAtCell(e,t),!1===(0,n.isEmpty)(i))return"object"==typeof i&&(o=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[o.prop],i));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,tabNavigation:!0,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:!1,renderAllColumns:!1,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})},90066:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(54925)),o=r(76163),a=r(46029);t.DynamicCellMetaMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),i.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:r,col:n}=e;if(null!==(t=this.metaSyncMemo.get(r))&&void 0!==t&&t.has(n))return;const{visualRow:s,visualCol:i}=e,l=this.metaManager.hot,u=l.colToProp(i);e.prop=u,l.runHooks("beforeGetCellMeta",s,i,e);const h=(0,o.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,u):null;var d;h&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:h:c={type:h});c&&this.metaManager.updateCellMeta(r,n,c),l.runHooks("afterGetCellMeta",s,i,e),this.metaSyncMemo.has(r)||this.metaSyncMemo.set(r,new Set),this.metaSyncMemo.get(r).add(n)}}},30084:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"usageTracker",new Set),(0,s.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,r){if(!r)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,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:r,onChange:n=(()=>{})}=e,s="string"==typeof r,i=s?r:t,o=`_${i}`;this.metaManager.globalMeta.meta[o]=this.metaManager.globalMeta.meta[i],this.installPropWatcher(t,o,n),s&&this.installPropWatcher(r,o,n)}))}installPropWatcher(e,t,r){const n=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(s){const i=!n.usageTracker.has(e);n.usageTracker.add(e),r.call(n,e,s,i),this[t]=s},enumerable:!0,configurable:!0})}}},61530:(e,t,r)=>{"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 r(){}(0,n.inherit)(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r},t.extendByMetaType=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i="string"==typeof t.type?(0,s.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,n.objectEach)(t,((t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}));if(!(0,n.isObject)(i))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const o={};(0,n.objectEach)(i,((t,s)=>{var i;(function(e,t){var r;if("CELL_TYPE"===e)return!1;return(null===(r=t._automaticallyAssignedMetaProps)||void 0===r?void 0:r.has(e))||!(0,n.hasOwnProperty)(t,e)})(s,r)&&(o[s]=t,null===(i=e._automaticallyAssignedMetaProps)||void 0===i||i.add(s))})),(0,n.extend)(e,o)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},r(91683);var n=r(76163),s=r(79321)},92117:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:h,dataMap:c,dataSource:d,internalSource:f,source:p,metaManager:g,firstRun:m}=n,E=(0,s.toUpperCaseFirst)(f),w=h.getSettings();Array.isArray(w.dataSchema)?h.dataType="array":(0,i.isFunction)(w.dataSchema)?h.dataType="function":h.dataType="object";c&&c.destroy();e=h.runHooks(`before${E}`,e,m,p);const y=new o.default(h,e,g);if(t(y),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${f} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=y.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=w.startRows;n<s;n++)if("object"!==h.dataType&&"function"!==h.dataType||!w.dataSchema)if("array"===h.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=w.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(h.dataType="array");w.data=e,y.dataSource=e,d.data=e,d.dataType=h.dataType,d.colToProp=y.colToProp.bind(y),d.propToCol=y.propToCol.bind(y),d.countCachedColumns=y.countCachedColumns.bind(y),r(y),h.runHooks(`after${E}`,e,m,p),m||(h.runHooks("afterChange",null,f),h.render());h.getSettings().ariaTags&&(0,l.setAttribute)(h.rootElement,[(0,u.A11Y_ROWCOUNT)(-1),(0,u.A11Y_COLCOUNT)(h.countCols()+(h.view?h.countRowHeaders():0))])},r(63517),r(91683);var s=r(37913),i=r(46029),o=n(r(38085)),a=r(76163),l=r(49587),u=r(66862)},80940:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49223),o=r(30369),a=r(16691),l=n(r(57340)),u=r(97639);function h(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 c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";var f=new WeakSet,p=new WeakSet;class g{constructor(e,t,r){h(this,p),h(this,f),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"selection",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"destroyed",!1),(0,s.default)(this,"lock",!1),(0,s.default)(this,"activeEditor",void 0),(0,s.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(this,f,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,r)=>c(this,p,E).call(this,e,t,r)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:r,col:n}=t,s=this.hot.runHooks("modifyGetCellCoords",r,n);let i=r,o=n;if(Array.isArray(s)&&([i,o]=s),this.cellProperties=this.hot.getCellMeta(i,o),!this.isCellEditable())return void this.clearActiveEditor();const l=this.hot.getCell(r,n,!0);if(l){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(o),s=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),o);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(r,n,t,l,s,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const n=this.hot.getSelectedRangeLast();let s=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,e,t,r);t instanceof MouseEvent&&"boolean"!=typeof s&&(s=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1!==s?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight,{rowIndexMapper:s,columnIndexMapper:i}=this.hot,o=s.isHidden(this.hot.toPhysicalRow(r))||i.isHidden(this.hot.toPhysicalColumn(n));return!(this.cellProperties.readOnly||!t||o)}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)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,o.isImmediatePropagationStopped)(e))return;const{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,i.isFunctionKey)(r)||(0,i.isCtrlMetaKey)(r)||n||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),r={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:d};t.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())}}],r),this.openEditor("",e)}}function E(e,t){t.isCell()&&this.openEditor(null,e,!0)}const w=new WeakMap;g.getInstance=function(e,t,r){let n=w.get(e);return n||(n=new g(e,t,r),w.set(e,n)),n};t.default=g},48036:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(42538)),o=r(12540),a=r(98887),l=r(49587),u=r(97639),h=r(37913),c=r(49223),d=r(78498),f=r(26031),p=r(66862);function g(e,t,r){!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,r)}const m=t.EDITOR_TYPE="autocomplete";var E=new WeakMap;class w extends o.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),g(this,E,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],i=e.length;let o,a,l,c,d=t.length;if(0===i){for(l=0;l<d;l++)s.push(l);return s}for(l=0;l<d;l++){if(a=(0,h.stripTags)((0,u.stringify)(t[l])),r)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(o=a.length-c-i,n.push({baseIndex:l,index:c,charsLeft:o,value:a}))}for(n.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})),l=0,d=n.length;l<d;l++)s.push(n[l].baseIndex);return s}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,u.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,p.A11Y_TEXT)(),(0,p.A11Y_COMBOBOX)(),(0,p.A11Y_HASPOPUP)("listbox"),(0,p.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false"),(0,p.A11Y_CONTROLS)(`${(0,i.default)(this,E)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==r?void 0:r.length,{row:s,col:o}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,d.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,i,o,a,h,c)=>{(0,f.textRenderer)(e,s,i,o,a,h,c);const{filteringCaseSensitive:d,allowHtml:g,locale:m}=this.cellProperties,E=this.query;let w,y,C=(0,u.stringify)(h);C&&!g&&(w=!0===d?C.indexOf(E):C.toLocaleLowerCase(m).indexOf(E.toLocaleLowerCase(m)),-1!==w&&(y=C.substr(w,E.length),C=C.replace(y,`<strong>${y}</strong>`))),t&&(0,l.setAttribute)(s,[(0,p.A11Y_OPTION)(),...r?[(0,p.A11Y_SETSIZE)(n)]:[],...r?[(0,p.A11Y_POSINSET)(r.indexOf(h)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${o}`]]),s.innerHTML=C},afterSelection:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,l.setAttribute)(t,[(0,p.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,p.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,p.A11Y_LISTBOX)(),(0,p.A11Y_LIVE)("polite"),(0,p.A11Y_RELEVANT)("text"),["id",`${(0,i.default)(this,E)}-listbox-${s}-${o}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.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),r=(0,l.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let i=null,o=null,u=e;n&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));const h=Array.isArray(i)?i.length:0;if(!1===s)h&&(o=i[0]);else{const e=[];for(let t=0,r=u.length;t<r&&!(n&&h<=t);t++)h?e.push(u[i[t]]):e.push(u[t]);o=0,u=e}this.strippedChoices=u,this.htEditor.loadData((0,a.pivot)([u])),0===u.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(o)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,r=this.cellProperties.preventOverflow;if(t||!t&&(r||"horizontal"===r))return!1;const n=(0,l.offset)(this.TEXTAREA),s=(0,l.outerHeight)(this.TEXTAREA),i=this.getDropdownHeight(),o=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),u=(0,l.offset)(e),h=n.top-u.top-a+o,c=e.scrollHeight-h-a-s,d=i>c&&h>c;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?h:c,i),d}limitDropdownIfNeeded(e,t){if(t>e){let r=0,n=0,s=0,i=null;do{s=this.htEditor.getRowHeight(n)||this.htEditor.view._wt.getSetting("defaultRowHeight"),r+=s,n+=1}while(r<e);i=r-s,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(r-s)}}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,r=(0,a.arrayMap)(e,(e=>(0,u.stringify)(e)));return(0,a.arrayMap)(r,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),r=t?t.from.row:-1;let n=!1;return e===c.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===c.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=w},16478:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(48036);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},23627:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(97639),o=r(76163),a=r(80940),l=n(r(94136)),u=r(49587);const h=t.EDITOR_TYPE="base",c=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),d=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class f{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",c.VIRGIN),(0,s.default)(this,"_opened",!1),(0,s.default)(this,"_fullEditMode",!1),(0,s.default)(this,"_closeCallback",null),(0,s.default)(this,"TD",null),(0,s.default)(this,"row",null),(0,s.default)(this,"col",null),(0,s.default)(this,"prop",null),(0,s.default)(this,"originalValue",null),(0,s.default)(this,"cellProperties",null),this.hot=e,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,r,n,s,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=s,this.cellProperties=i,this.state=c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,o;if(t){const e=this.hot.getSelectedLast();r=Math.max(Math.min(e[0],e[2]),0),n=Math.max(Math.min(e[1],e[3]),0),s=Math.max(e[0],e[2]),o=Math.max(e[1],e[3])}else[r,n,s,o]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",r,n);Array.isArray(a)&&([r,n]=a);const l=this.hot.getShortcutManager().getContext("editor"),u={runOnlyIf:()=>(0,i.isDefined)(this.hot.getSelected()),group:d};this.isInFullEditMode()&&l.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())}}],u),this.hot.populateFromArray(r,n,e,s,o,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,s)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,i.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,r){let n;if(r){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(this.isWaiting())return;const s=this.hot.getShortcutManager().getContext("editor");if(s.removeShortcutsByGroup(d),s.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const r=this.getValue();n=this.cellProperties.trimWhitespace?[["string"==typeof r?String.prototype.trim.call(r||""):r]]:[[r]],this.state=c.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:r,wtViewport:n}=this.hot.view._wt,s=this.hot.rootWindow,i=(0,u.offset)(t),o=(0,u.outerWidth)(t),a=(0,u.offset)(this.hot.rootElement),l=(0,u.outerWidth)(this.hot.rootElement),h=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=h!==s?h.scrollTop:0,f=c!==s?c.scrollLeft:0,p=s.innerWidth-a.left-l,{wtTable:g}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=g.name,E=["master","inline_start"].includes(m)?d:0,w=["master","top","bottom"].includes(m)?f:0,y=i.top===a.top?0:1;let C=i.top-a.top-y-E,v=0;v=this.hot.isRtl()?s.innerWidth-i.left-o-p-1+w:i.left-a.left-1-w,["top","top_inline_start_corner"].includes(m)&&(C+=r.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(r.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===N)&&(C+=1),T<=0&&(v+=1);const _=n.rowsRenderCalculator.startPosition,b=n.columnsRenderCalculator.startPosition,M=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),O=(0,u.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=_-A),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=r.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-O}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?g.getWidth()-t.offsetLeft:Math.abs(x),x+=b-M-o):["top","master","bottom"].includes(m)&&(x+=b-M);const P=(0,u.getComputedStyle)(this.TD,this.hot.rootWindow),L=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(P[L],10)>0?0:1,k=parseInt(P.borderTopWidth,10)>0?0:1,H=(0,u.outerWidth)(t)+D,F=(0,u.outerHeight)(t)+k,U=(0,u.hasVerticalScrollbar)(h)?O:0,V=(0,u.hasHorizontalScrollbar)(c)?O:0,B=this.hot.view.maximumVisibleElementWidth(x)-U+D;return{top:C,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(I)-V+k,23),width:H,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=f,(0,o.mixin)(f,l.default)},86446:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(23627);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},16571:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587);const i=t.EDITOR_TYPE="checkbox";class o extends n.BaseEditor{static get EDITOR_TYPE(){return i}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,s.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=o},73388:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16571);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},99588:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(22418)),o=n(r(16563)),a=r(64953),l=r(49587),u=r(76163),h=r(49223);r(26422);const c=t.EDITOR_TYPE="date",d="dateEditor";class f extends a.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,s.default)(this,"parentDestroyed",!1),(0,s.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return c}init(){if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof o.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,l.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,l.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:d})}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.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(d),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),s=!!e&&(0,h.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new o.default(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(i.default),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,l.outerHeight)(this.TD)}px`;let u=this.hot.rootWindow.pageXOffset;u=this.hot.isRtl()?t.right-(0,l.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${u}px`,this.originalValue?(a=this.originalValue,(0,i.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(a,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||n||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,i.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(a,r),!0),s||n||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,u.deepExtend)(t,this.cellProperties.datePickerConfig);const r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!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,i.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),r&&r()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}}t.DateEditor=f},92090:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99588);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},72394:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(16478),i=n(r(54925));const o=t.EDITOR_TYPE="dropdown";class a extends s.AutocompleteEditor{static get EDITOR_TYPE(){return o}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,i.default.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.getCellMeta(t,this.propToCol(r));n.editor===a&&void 0===n.strict&&(n.filter=!1,n.strict=!0)}))},28544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(72394);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},11717:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),i=r(30369),o=r(76163),a=r(80940);const l="handsontableEditor",u=t.EDITOR_TYPE="handsontable";class h extends n.TextEditor{static get EDITOR_TYPE(){return u}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,s.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i);const a=this,l={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 r=this.getSourceData(t.row,t.col);void 0!==r&&a.setValue(r),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,o.extend)(l,i.handsontable),this.htOptions=l}beginEditing(e,t){const r=this.hot.getSettings().onBeginEditing;r&&!1===r()||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,r){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,r)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},r=(e,t)=>{const r=this.htEditor;if(void 0!==e&&(e<0||r.flipped&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),(0,i.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,s;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(s=t.getSelectedLast()[0],n=Math.max(0,s-1)):(s=t.getSelectedLast()[0],n=s-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,s;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;s=t.getSelectedLast()[0],n=Math.min(e,s+1)}}else n=0;return r(n,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.HandsontableEditor=h},12540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11717);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},5944:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,p.registerEditor)(s.BaseEditor),(0,p.registerEditor)(n.AutocompleteEditor),(0,p.registerEditor)(i.CheckboxEditor),(0,p.registerEditor)(o.DateEditor),(0,p.registerEditor)(a.DropdownEditor),(0,p.registerEditor)(l.HandsontableEditor),(0,p.registerEditor)(u.NumericEditor),(0,p.registerEditor)(h.PasswordEditor),(0,p.registerEditor)(c.SelectEditor),(0,p.registerEditor)(d.TextEditor),(0,p.registerEditor)(f.TimeEditor)};var n=r(16478);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(86446);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var i=r(73388);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var o=r(92090);t.DateEditor=o.DateEditor,t.DATE_EDITOR=o.EDITOR_TYPE;var a=r(28544);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(12540);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var u=r(6618);t.NumericEditor=u.NumericEditor,t.NUMERIC_EDITOR=u.EDITOR_TYPE;var h=r(50647);t.PasswordEditor=h.PasswordEditor,t.PASSWORD_EDITOR=h.EDITOR_TYPE;var c=r(71177);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(64953);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var f=r(76219);t.TimeEditor=f.TimeEditor,t.TIME_EDITOR=f.EDITOR_TYPE;var p=r(16691);t.registerEditor=p.registerEditor,t.RegisteredEditor=p.RegisteredEditor,t._getEditorInstance=p._getEditorInstance,t.getEditor=p.getEditor,t.getEditorInstance=p.getEditorInstance,t.getRegisteredEditorNames=p.getRegisteredEditorNames,t.getRegisteredEditors=p.getRegisteredEditors,t.hasEditor=p.hasEditor},6618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(43894);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},43894:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s=t.EDITOR_TYPE="numeric";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=i},50647:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(67925);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},67925:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),i=r(66862);const o=t.EDITOR_TYPE="password";class a extends n.TextEditor{static get EDITOR_TYPE(){return o}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,this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TEXTAREA,[(0,i.A11Y_HIDDEN)()]),(0,s.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=a},16691:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)o.get(e)||f(null,e),r=o.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');r=l(e)}if(!r)throw Error(`No editor registered under name "${e}"`);return r.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!u(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=f,r(91683);var s=n(r(54925)),i=n(r(31056));const o=new WeakMap,{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=(0,i.default)("editors");function d(e){const t={},r=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new r(e)),t[e.guid]},s.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function f(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const r=new d(t);"string"==typeof e&&a(e,r),o.set(t,r)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=h,t.hasEditor=u},71177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51692);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},51692:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587),i=r(76163);const o="ht_editor_visible",a="selectEditor",l=t.EDITOR_TYPE="select";class u extends n.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",(0,s.addClass)(this.select,"htSelectEditor"),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,s.hasClass)(this.select,o)&&(0,s.removeClass)(this.select,o),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,r,n,o,a){super.prepare(e,t,r,n,o,a);const l=this.cellProperties.selectOptions;let u;u="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,i.objectEach)(u,((e,t)=>{const r=this.hot.rootDocument.createElement("OPTION");r.value=t,(0,s.fastInnerHTML)(r,e),this.select.appendChild(r)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)t[e[r]]=e[r];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!==n.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:r,height:i}=this.getEditedCellRect(),a=this.select.style;a.height=`${i}px`,a.width=`${r}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,s.addClass)(this.select,o)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),r=e.getContext("grid"),n={group:a};!1!==this.isInFullEditMode()&&t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:r,callback:()=>{}},{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)}}],n)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=u},360:(e,t,r)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const r=(0,n.getCaretPosition)(t),s=t.value.split("\n");let i=r,o=0;for(let t=0;t<s.length;t++){const n=s[t];0!==t&&(o+=s[t-1].length+1);const a=o+n.length;if("home"===e?i=o:"end"===e&&(i=a),r<=a)break}(0,n.setCaretPosition)(t,i)};var n=r(49587)},64953:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(1219);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},1219:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(86446),o=n(r(57340)),a=r(78498),l=r(49587),u=r(57691),h=r(36113),c=r(97639),d=r(80940),f=r(23627),p=r(360),g=r(66862);const m="ht_editor_hidden",E="textEditor",w=t.EDITOR_TYPE="text";class y extends i.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),(0,s.default)(this,"eventManager",new o.default(this)),(0,s.default)(this,"autoResize",(0,h.createInputElementResizer)(this.hot.rootDocument)),(0,s.default)(this,"TEXTAREA",void 0),(0,s.default)(this,"textareaStyle",void 0),(0,s.default)(this,"TEXTAREA_PARENT",void 0),(0,s.default)(this,"textareaParentStyle",void 0),(0,s.default)(this,"layerClass",void 0),this.eventManager=new o.default(this),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.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,s,o){const a=this.state;if(super.prepare(e,t,r,n,s,o),!o.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=o;e&&(this.TEXTAREA.value=""),a!==i.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===i.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,g.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,g.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,a.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="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,u.rangeEach)(e.length-1,(r=>{const n=e[r];if((0,l.hasClass)(n,"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!==i.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:r,width:n,maxWidth:s,height:o,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();const u=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),d=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),f=n-c,p=o-d,g=s-c,m=a-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(f,g),minHeight:Math.min(p,m),maxWidth:g,maxHeight:m},!0)}bindEvents(){(0,a.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===i.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),r=e.getContext("grid"),n={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:E},s=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"],["PageUp"],["PageDown"]],forwardToContext:r,callback:()=>{}},{keys:[["Control","Enter"]],callback:()=>(s(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(s(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(s(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,p.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,p.updateCaretPosition)(r,this.TEXTAREA)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(d.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(E),e.removeShortcutsByGroup(f.SHORTCUTS_GROUP_EDITOR)}}t.TextEditor=y},76219:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(98744);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},98744:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s=t.EDITOR_TYPE="time";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.TEXTAREA.dir="ltr"}}t.TimeEditor=i},57340:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getListenersCounter=function(){return o},r(63517);var s=n(r(93231)),i=r(30369);let o=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(e){r.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,i.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:s,options:n,eventManager:this}),e.addEventListener(t,s,n),o+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,n=this.context.eventListeners[i],n.event===t&&n.element===e){if(r&&r!==n.callback)continue;if(s&&n.eventManager!==this)continue;this.context.eventListeners.splice(i,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),o-=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 r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),o-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r=e.document,n=e;r||(r=e.ownerDocument?e.ownerDocument:e,n=r.defaultView);const s={bubbles:!0,cancelable:"mousemove"!==t,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let i;r.createEvent?(i=r.createEvent("MouseEvents"),i.initMouseEvent(t,s.bubbles,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget||r.body.parentNode)):i=r.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(`on${t}`,i)}}},14864:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(31990),a=r(49587),l=r(46029);function u(e,t){c(e,t),t.add(e)}function h(e,t,r){c(e,t),t.set(e,r)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const f=Object.freeze({CELL:"cell",MIXED:"mixed"});var p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,w=new WeakMap,y=new WeakSet,C=new WeakSet,v=new WeakSet,S=new WeakSet;function R(e){var t;const r=null===(t=(0,s.default)(this,p).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r||!(0,s.default)(this,p).selection.isCellVisible(r))return void e(null);const n=(0,s.default)(this,p).getCell(r.row,r.col,!0);null===n?(0,s.default)(this,p).addHookOnce("afterScroll",(()=>{e((0,s.default)(this,p).getCell(r.row,r.col,!0))})):e(n)}function T(){d(this,y,R).call(this,(e=>{const{activeElement:t}=(0,s.default)(this,p).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function N(){d(this,y,R).call(this,(e=>{this.getFocusMode()===f.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function _(e){e.imeFastEdit&&this.getFocusMode()!==f.MIXED?this.setFocusMode(f.MIXED):e.imeFastEdit||this.getFocusMode()===f.CELL||this.setFocusMode(f.CELL)}t.FocusManager=class{constructor(e){var t=this;u(this,S),u(this,v),u(this,C),u(this,y),h(this,p,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:50}),h(this,E,{writable:!0,value:null}),h(this,w,{writable:!0,value:new Map});const r=e.getSettings();(0,i.default)(this,p,e),(0,i.default)(this,g,r.imeFastEdit?f.MIXED:f.CELL),(0,s.default)(this,p).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,S,_).call(t,...r)})),(0,s.default)(this,p).addHook("afterSelection",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,C,T).call(t,...r)})),(0,s.default)(this,p).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,v,N).call(t,...r)}))}getFocusMode(){return(0,s.default)(this,g)}setFocusMode(e){Object.values(f).includes(e)?(0,i.default)(this,g,e):(0,o.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,s.default)(this,m)}setRefocusDelay(e){(0,i.default)(this,m,e)}setRefocusElementGetter(e){(0,i.default)(this,E,e)}getRefocusElement(){return"function"==typeof(0,s.default)(this,E)?(0,s.default)(this,E).call(this):null===(e=(0,s.default)(this,p).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,r;const n=null===(t=(0,s.default)(this,p).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n)return;let i=(0,s.default)(this,p).runHooks("modifyFocusedElement",n.row,n.col,e);i instanceof HTMLElement||(i=e),!i||null!==(r=(0,s.default)(this,p).getActiveEditor())&&void 0!==r&&r.isOpened()||i.focus({preventScroll:!0})};e?t(e):d(this,y,R).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)(this,m);const r=this.getRefocusElement();!(0,s.default)(this,p).getSettings().imeFastEdit||null!==(e=(0,s.default)(this,p).getActiveEditor())&&void 0!==e&&e.isOpened()||!r||((0,s.default)(this,w).has(t)||(0,s.default)(this,w).set(t,(0,l.debounce)((()=>{r.select()}),t)),(0,s.default)(this,w).get(t)())}}},66862:(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_ROWGROUP=()=>["role","rowgroup"];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_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]},98887:(e,t,r)=>{"use strict";function n(e,t,r,n){let s=-1,i=e,o=r;Array.isArray(e)||(i=Array.from(e));const a=i.length;for(n&&a&&(s+=1,o=i[s]),s+=1;s<a;)o=t(o,i[s],s,i),s+=1;return o}function s(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length;for(;r<s&&!1!==t(n[r],r,n);)r+=1;return e}function i(e){return n(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayEach=s,t.arrayFilter=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,i=[];let o=-1;for(;r<s;){const e=n[r];t(e,r,n)&&(o+=1,i[o]=e),r+=1}return i},t.arrayFlatten=function e(t){return n(t,((t,r)=>t.concat(Array.isArray(r)?e(r):r)),[])},t.arrayMap=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,i=[];let o=-1;for(;r<s;){const e=n[r];o+=1,i[o]=t(e,r,n),r+=1}return i},t.arrayMax=function(e){return n(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return n(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=n,t.arraySum=i,t.arrayUnique=function(e){const t=[];return s(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const r=t.length;let n=0;for(;n<r;)e.push(t[n]),n+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t];let o=n;return s(i,(e=>{o=o.filter((t=>!e.includes(t)))})),o},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t];let o=n;return s(i,(e=>{o=o.filter((t=>e.includes(t)))})),o},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t],o=new Set(n);return s(i,(e=>{s(e,(e=>{o.has(e)||o.add(e)}))})),Array.from(o)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const r=e.length,n=e[0].length;for(let s=0;s<r;s++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][s]=e[s][r];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 r=0;for(;r<t;)e[r]=[e[r]],r+=1},r(63517)},78498:(e,t,r)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return o.chrome.value},t.isChromeWebKit=function(){return o.chromeWebKit.value},t.isEdge=function(){return o.edge.value},t.isEdgeWebKit=function(){return o.edgeWebKit.value},t.isFirefox=function(){return o.firefox.value},t.isFirefoxWebKit=function(){return o.firefoxWebKit.value},t.isIOS=function(){return a.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value},t.isLinuxOS=function(){return a.linux.value},t.isMacOS=function(){return a.mac.value},t.isMobileBrowser=function(){return o.mobile.value},t.isSafari=function(){return o.safari.value},t.isWindowsOS=function(){return a.win.value},t.setBrowserMeta=l,t.setPlatformMeta=u;var n=r(76163),s=r(6022);const i=e=>{const t={value:!1,test:(r,n)=>{t.value=e(r,n)}};return t},o={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},a={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((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,n.objectEach)(o,(r=>{let{test:n}=r;n(e,t)}))}function u(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(a,(t=>{let{test:r}=t;r(e)}))}(0,s.isCSR)()&&(l(),u())},31990:(e,t,r)=>{"use strict";t.__esModule=!0,t.error=function(){(0,n.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,n.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,n.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,n.isDefined)(console)&&console.warn(...arguments)};var n=r(97639)},56020:(e,t,r)=>{"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,n.isObject)(e[0])&&(t=(0,n.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const r=[];let n;for(let s=0;s<e;s++){n=[];for(let e=0;e<t;e++)n.push("");r.push(n)}return r},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 r=[];let n,s;for(n=0;n<e;n++){const e=[];for(s=0;s<t;s++)e.push(o(s)+(n+1));r.push(e)}return r},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 r=[];let n,s;for(n=0;n<e;n++){const e={};for(s=0;s<t;s++)e[`prop${s}`]=o(s)+(n+1);r.push(e)}return r},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;const n=[];Array.isArray(e)&&Array.isArray(e[0])||(r=[e]);return r.forEach(((e,r)=>{Array.isArray(e)?e.forEach(((e,s)=>{n.push([r+t,s,e])})):Object.keys(e).forEach((s=>{n.push([r+t,s,e[s]])}))})),n},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 r=0,n=e.length-1;r<e.length;r+=1,n-=1)t+=i**n*(s.indexOf(e[r])+1);return t-=1,t},t.spreadsheetColumnLabel=o,r(63517);var n=r(76163);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=s.length;function o(e){let t,r=e+1,n="";for(;r>0;)t=(r-1)%i,n=String.fromCharCode(65+t)+n,r=parseInt((r-t)/i,10);return n}},46680:(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}},49587:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=u,t.addEvent=function(e,t,r){e.addEventListener(t,r,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=o,t.closestDown=function(e,t,r){const n=[];let s=e;for(;s&&(s=o(s,t,r),s&&(!r||r.contains(s)));)n.push(s),s=s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s.host:s.parentNode;const i=n.length;return i?n[i-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];f.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:p(e,t)},t.fastInnerText=p,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=E,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,s=e;for(;null!==s;){if(r===t){n=s;break}s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s=s.host:(r+=1,s=s.parentNode)}return n},t.getParentWindow=function(e){return i(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 g(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(t=e.document?e.document:e,r=t.defaultView);const n=["auto","scroll"];let s=e.parentNode;for(;s&&s.style&&t.body!==s;){let{overflow:e,overflowX:t,overflowY:i}=s.style;if([e,t,i].includes("scroll"))return s;if(({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(s)),n.includes(e)||n.includes(t)||n.includes(i))return s;if(s.clientHeight<=s.scrollHeight+1&&(n.includes(i)||n.includes(e)))return s;if(s.clientWidth<=s.scrollWidth+1&&(n.includes(t)||n.includes(e)))return s;s=s.parentNode}return r},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 r=e.createElement("div");r.style.boxSizing="content-box",r.style.height="150px",r.style.left="0px",r.style.overflow="hidden",r.style.position="absolute",r.style.top="0px",r.style.width="200px",r.style.visibility="hidden",r.appendChild(t),(e.body||e.documentElement).appendChild(r);const n=t.offsetWidth;r.style.overflow="scroll";let s=t.offsetWidth;n===s&&(s=r.clientWidth);return(e.body||e.documentElement).removeChild(r),n-s}(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 r="";e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text);return r},t.getStyle=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;const n=e.style[t];if(""!==n&&void 0!==n)return n;const s=E(e,r);if(""!==s[t]&&void 0!==s[t])return s[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,r=t.defaultView;let n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;const e=E(n,r),t=["scroll","hidden","auto"],s=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),o=e.getPropertyValue("overflow-x");if(t.includes(s)||t.includes(i)||t.includes(o))return n;n=n.parentNode}return r},t.getWindowScrollLeft=m,t.getWindowScrollTop=g,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,r=e;if(r.previousSibling)for(;r=r.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 r=e.parentNode,n=[];"string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);for(;null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=y,t.isOutsideInput=C,t.isThisHotChild=function(e,t){const r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)},t.isVisible=function e(t){const r=t.ownerDocument.documentElement;let n=t;for(;n!==r;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===E(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,t.matchesCSSRules=function(e,t){const{selectorText:r}=t;let n=!1;t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r)));return n},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((r,n)=>{r.forEach((r=>{r.isIntersecting&&null!==e.offsetParent&&(t(),n.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,r=t.defaultView,n=t.documentElement;let s,i,o,a=e;s=a.offsetLeft,i=a.offsetTop,o=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)s+=a.offsetLeft,i+=a.offsetTop,o=a;o&&"fixed"===o.style.position&&(s+=r.pageXOffset||n.scrollLeft,i+=r.pageYOffset||n.scrollTop);return{left:s,top:i}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,r){const n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.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:r,regexes:n}=l(t,!0);r.forEach((t=>{""!==t&&e.removeAttribute(t)})),n.forEach((t=>{e.getAttributeNames().forEach((r=>{t.test(r)&&e.removeAttribute(r)}))}))},t.removeClass=h,t.removeContentEditableFromElementAndDeselect=S,t.removeEvent=function(e,t,r){e.removeEventListener(t,r,!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 r=t.childNodes;for(let t=r.length-1;t>=0;t--)e(r[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,r),t(),S(e,r)},t.selectElementIfAllowed=function(e){C(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,t.setCaretPosition=function(e,t,r){void 0===r&&(r=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(n){const s=e.parentNode,i=s.style.display;s.style.display="block",e.setSelectionRange(t,r),s.style.display=i}}},t.setOverlayPosition=function(e,t,r){e.style.transform=`translate3d(${t},${r},0)`},r(63517),r(91683);var n=r(37913),s=r(66862);function i(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:s}=Node;let i=e;for(;null!=i&&i!==r;){const{nodeType:e,nodeName:r}=i;if(e===n&&(t.includes(r)||t.includes(i)))return i;const{host:o}=i;i=o&&e===s?o:i.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const r=[],n=[];return n.push(...e.filter((e=>{const n=e instanceof RegExp;return n&&t&&r.push(e),!n}))),t?{regexFree:n,regexes:r}:n}function u(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function h(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=l(t,!0);r=a(r),r.length>0&&e.classList.remove(...r),n.forEach((t=>{e.classList.forEach((r=>{t.test(r)&&e.classList.remove(r)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const f=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function p(e,t){const r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function g(){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 E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let w;function y(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function C(e){return y(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=e.ownerDocument,i=n.createRange(),o=n.defaultView.getSelection();c(e,"contenteditable",!0),r&&c(e,...(0,s.A11Y_HIDDEN)()),t&&u(e,"invisibleSelection"),i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i)}function S(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&h(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},30369:(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 r={x:e.offsetX,y:e.offsetY};let n=e.target;if(!(t instanceof HTMLElement)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},6022:(e,t)=>{"use strict";let r;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(r)return r;r="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 r},t.isCSR=function(){return"undefined"!=typeof window},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},46029:(e,t,r)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];const a=n.concat(i);let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.curryRight=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];const a=n.concat(i.reverse());let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return n&&clearTimeout(n),n=setTimeout((()=>{t=e.apply(this,i)}),r),t}},t.fastCall=function(e,t,r,n,i,o,a,l){if((0,s.isDefined)(l))return e.call(t,r,n,i,o,a,l);if((0,s.isDefined)(a))return e.call(t,r,n,i,o,a);if((0,s.isDefined)(o))return e.call(t,r,n,i,o);if((0,s.isDefined)(i))return e.call(t,r,n,i);if((0,s.isDefined)(n))return e.call(t,r,n);if((0,s.isDefined)(r))return e.call(t,r);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return e.apply(this,r.concat(n))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[s,...i]=t;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.arrayReduce)(i,((e,t)=>t(e)),s.apply(this,t))}},t.throttle=i,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const n=i(e,t);let s=r;function o(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return s?(s-=1,e.apply(this,r)):n.apply(this,r)}return o.clearHits=function(){s=r},o};var n=r(98887),s=r(97639);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0;const n={lastCallThrottled:!0};let s=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];const l=Date.now();let u=!1;n.lastCallThrottled=!0,r||(r=l,u=!0);const h=t-(l-r);return u?(n.lastCallThrottled=!1,e.apply(this,o)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,o),r=0,s=void 0}),h)),n}}},97639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="0.0.0-next-14118b6-20240131";let o,y="invalid",C="invalid";const v=function(e){let t=[][l],r=t;if(e[l]!==d("Z"))return!1;for(let t="",n="B<H4P+".split(""),s=d(n.shift());s;s=d(n.shift()||"A"))--s<""[l]?r|=(h(`${h(u(t)+(u(c(e,Math.abs(s),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,s,s?1===n[l]?9:8:6);return r===t}(e=f(e||""));if(r||n||v)if(v){const t=(0,s.default)("16/01/2024","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=p(e);o=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(y="expired",C="expired"):(y="valid",C="valid")}else n?(y="non_commercial",C="valid"):(y="invalid",C="invalid");else y="missing",C="missing";g()&&(y="valid",C="valid");if(!m&&"valid"!==y){E[y]({keyValidityDate:o,hotVersion:i})&&console["non_commercial"===y?"info":"warn"](E[y]({keyValidityDate:o,hotVersion:i})),m=!0}if("valid"!==C&&t.parentNode){if(w[C]({keyValidityDate:o,hotVersion:i})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[C]({keyValidityDate:o,hotVersion:i}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=o,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 s=n(r(22418)),i=r(45561);function o(e){return void 0===e}function a(e){return null===e||""===e||o(e)}const l="length",u=e=>parseInt(e,16),h=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,f=e=>`${e}`.replace(/\-/g,""),p=e=>u(c(f(e),u("12"),d("F")))/(u(c(f(e),d("B"),~~![][l]))||9),g=()=>"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 E={invalid:()=>i.toSingleLine`
|
933
|
+
turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,u.setAttribute)(this.rootNode,[(0,h.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let n=0;n<e;n++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(n);var t,r;if(this.table.isAriaEnabled())(0,u.setAttribute)(e,[(0,h.A11Y_ROW)(),(0,h.A11Y_ROWINDEX)(s+(null!==(t=null===(r=this.table.rowUtils)||void 0===r||null===(r=r.dataAccessObject)||void 0===r?void 0:r.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=d},92548:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"rowHeaders",null),(0,s.default)(this,"columnHeaders",null),(0,s.default)(this,"colGroup",null),(0,s.default)(this,"rows",null),(0,s.default)(this,"cells",null),(0,s.default)(this,"rowFilter",null),(0,s.default)(this,"columnFilter",null),(0,s.default)(this,"rowUtils",null),(0,s.default)(this,"columnUtils",null),(0,s.default)(this,"rowsToRender",0),(0,s.default)(this,"columnsToRender",0),(0,s.default)(this,"rowHeaderFunctions",[]),(0,s.default)(this,"rowHeadersCount",0),(0,s.default)(this,"columnHeaderFunctions",[]),(0,s.default)(this,"columnHeadersCount",0),(0,s.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,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:r,rows:n,cells:s}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),r.setTable(this),n.setTable(this),s.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=r,this.rows=n,this.cells=s}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 r=0;r<e;r++){const e=t.getRenderedNode(r);if(e.firstChild){const t=this.renderedRowToSource(r),n=this.rowUtils.getHeight(t);e.firstChild.style.height=n?n-1+"px":""}}}}},53843:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49587);function o(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 a(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var l=new WeakSet,u=new WeakSet;function h(e){const{wtSettings:t,inlineStartOverlay:r,wtTable:n,wtViewport:s,totalColumns:o,rootWindow:a}=this.dataAccessObject;if(r.mainTableScrollableElement===a){let l=null;if(t.getSetting("rtlMode")){const e=n.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,i.offset)(n.wtRootElement).left}const u=Math.abs((0,i.getScrollLeft)(a,a));if(l>u){const t=(0,i.innerWidth)(a);let n=s.getRowHeaderWidth();for(let s=1;s<=o;s++)if(n+=r.sumCellSizes(s-1,s),l+n-u>=t){e=s-2;break}}}return e}function c(e){const{topOverlay:t,wtTable:r,wtViewport:n,totalRows:s,rootWindow:o}=this.dataAccessObject;if(t.mainTableScrollableElement===o){const a=(0,i.offset)(r.wtRootElement),l=(0,i.getScrollTop)(o,o);if(a.top>l){const r=(0,i.innerHeight)(o);let u=n.getColumnHeaderHeight();for(let n=1;n<=s;n++)if(u+=t.sumCellSizes(n-1,n),a.top+u-l>=r){e=n-2;break}}}return e}t.default=class{constructor(e){o(this,u),o(this,l),(0,s.default)(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,r,n,s){const i=this.scrollViewportHorizontally(e.col,r,s),o=this.scrollViewportVertically(e.row,t,n);return i||o}scrollViewportHorizontally(e,t,r){const{drawn:n,totalColumns:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const i=void 0===t&&void 0===r,{fixedColumnsStart:o,inlineStartOverlay:a}=this.dataAccessObject;if(i&&e<o)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>s)return!1;const l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let h=!1;return(i&&(e<l||e>u)||!i)&&(h=a.scrollTo(e,i?e>=this.getLastPartiallyVisibleColumn():t)),h}scrollViewportVertically(e,t,r){const{drawn:n,totalRows:s}=this.dataAccessObject;if(!n||!Number.isInteger(e)||e<0||e>s)return!1;const i=void 0===t&&void 0===r,{fixedRowsBottom:o,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject;if(i&&(e<a||e>s-o-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>s)return!1;const u=this.getFirstVisibleRow(),h=this.getLastVisibleRow();let c=!1;return(i&&(e<u||e>h)||!i)&&(c=l.scrollTo(e,i?e>=this.getLastPartiallyVisibleRow():r)),c}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return a(this,u,c).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return a(this,u,c).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return a(this,l,h).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return a(this,l,h).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}},57253:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(30369),i=r(76163),o=r(78498),a=r(14201);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=a.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,s.stopImmediatePropagation)(e);const r=this,n=this.wot.rootDocument.body,i=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(n,"mousemove",(function e(s){var o;((o=s).clientY<Math.floor(i.top)||o.clientY>Math.ceil(i.top+i.height)||o.clientX<Math.floor(i.left)||o.clientX>Math.ceil(i.left+i.width))&&(r.eventManager.removeEventListener(n,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const r=["top","start","bottom","end","corner"];let n=this.main.style;n.position="absolute",n.top=0,n.left=0;for(let s=0;s<5;s++){const i=r[s],o=t.createElement("div");o.className=`wtBorder ${this.settings.className||""}`,this.settings[i]&&this.settings[i].hide&&(o.className+=" hidden"),n=o.style,n.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,n.height=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,n.width=this.settings[i]&&this.settings[i].width?`${this.settings[i].width}px`:`${e.border.width}px`,this.main.appendChild(o)}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,o.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:s}=this.wot;let i=s.bordersHolder;i||(i=t.createElement("div"),i.className="htBorders",s.bordersHolder=i,s.spreader.appendChild(i)),i.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,i.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const r={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,i.objectEach)(r,((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 r=this.wot.selectionManager.getAreaSelection();return!(!r.cellRange||e===r.cellRange.to.row&&t===r.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,r,n,s,i){const o=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),f=parseInt(l.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();a.top=`${parseInt(r-d-1,10)}px`,a[o]=`${parseInt(n-d-1,10)}px`,l.top=`${parseInt(r-f/4*3,10)}px`,l[o]=`${parseInt(n-f/4*3,10)}px`;const m=Math.min(parseInt(n+s,10),p-d-2*c),E=Math.min(parseInt(n+s-f/4,10),p-f-2*c);u[o]=`${m}px`,h[o]=`${E}px`;const w=Math.min(parseInt(r+i,10),g-d-2*c),y=Math.min(parseInt(r+i-f/4,10),g-f-2*c);u.top=`${w}px`,h.top=`${y}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(a.display="none",u.display="none",l.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:r,rootWindow:s}=this.wot;let i,a,l,u,h,c;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){i=n,h=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const f=t.getRenderedColumnsCount();for(let r=0;r<f;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,c=e[1];break}}for(let r=f-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){u=n;break}}if(void 0===i||void 0===l)return void this.disappear();let p=t.getCell(this.wot.createCellCoords(i,l));const g=i!==a||l!==u,m=g?t.getCell(this.wot.createCellCoords(a,u)):p,E=(0,n.offset)(p),w=g?(0,n.offset)(m):E,y=(0,n.offset)(t.TABLE),C=(0,n.outerWidth)(t.TABLE),v=E.top,S=E.left,R=this.wot.wtSettings.getSetting("rtlMode");let T=0,N=0;if(R){const e=(0,n.outerWidth)(p),t=s.innerWidth-y.left-C;N=S+e-w.left,T=s.innerWidth-S-e-t-1}else N=w.left+(0,n.outerWidth)(m)-S,T=S-y.left-1;if(this.isEntireColumnSelected(i,a)){const e=this.getDimensionsFromHeader("columns",l,u,h,y);let t=null;e&&([t,T,N]=e),t&&(p=t)}let _=v-y.top-1,b=w.top+(0,n.outerHeight)(m)-v;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",i,a,c,y);let t=null;e&&([t,_,b]=e),t&&(p=t)}const M=(0,n.getComputedStyle)(p,s);parseInt(M.borderTopWidth,10)>0&&(_+=1,b=b>0?b-1:0),parseInt(M[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(T+=1,N=N>0?N-1:0);const A=R?"right":"left";this.topStyle.top=`${_}px`,this.topStyle[A]=`${T}px`,this.topStyle.width=`${N}px`,this.topStyle.display="block",this.startStyle.top=`${_}px`,this.startStyle[A]=`${T}px`,this.startStyle.height=`${b}px`,this.startStyle.display="block";const O=Math.floor(this.settings.border.width/2);this.bottomStyle.top=_+b-O+"px",this.bottomStyle[A]=`${T}px`,this.bottomStyle.width=`${N}px`,this.bottomStyle.display="block",this.endStyle.top=`${_}px`,this.endStyle[A]=T+N-O+"px",this.endStyle.height=`${b+1}px`,this.endStyle.display="block";let I=this.settings.border.cornerVisible;I="function"==typeof I?I(this.settings.layerLevel):I;const x=this.wot.getSetting("onModifyGetCellCoords",a,u);let[P,L]=[a,u];if(x&&Array.isArray(x)&&([,,P,L]=x),(0,o.isMobileBrowser)()||!I||this.isPartRange(P,L))this.cornerStyle.display="none";else{this.cornerStyle.top=_+b+this.cornerCenterPointOffset-1+"px",this.cornerStyle[A]=T+N+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,n.getTrimmingContainer)(t.TABLE);const i=e===s;i&&(e=r.documentElement);const o=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(u===this.wot.getSetting("totalColumns")-1){const t=i?m.getBoundingClientRect().left:m.offsetLeft;let r=!1,s=0;R?(s=t-parseInt(this.cornerDefaultStyle.width,10)/2,r=s<0):(s=t+(0,n.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,r=s>=(0,n.innerWidth)(e)),r&&(this.cornerStyle[A]=`${Math.floor(T+N+this.cornerCenterPointOffset-o)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(i?m.getBoundingClientRect().top:m.offsetTop)+(0,n.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,n.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(_+b+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,o.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,u,_,T,N,b)}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,r,s,i){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,u=null,h=null,c=null,d=null,f=null,p=null,g=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},u=function(){return(0,n.outerHeight)(...arguments)},h="ht__selection--rows",f="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},u=function(){return(0,n.outerWidth)(...arguments)},h="ht__selection--columns",f="left"}if(a.classList.contains(h)){const e=this.wot.getSetting("columnHeaders").length;if(p=l(t,e-s),g=l(r,e-s),!p||!g)return!1;const o=(0,n.offset)(p),a=(0,n.offset)(g);return p&&g&&(c=o[f]-i[f]-1,d=a[f]+u(g)-o[f]),[p,c,d]}return!1}changeBorderStyle(e,t){const r=this[e].style,s=t[e];!s||s.hide?(0,n.addClass)(this[e],"hidden"):((0,n.hasClass)(this[e],"hidden")&&(0,n.removeClass)(this[e],"hidden"),r.backgroundColor=s.color,"top"!==e&&"bottom"!==e||(r.height=`${s.width}px`),"start"!==e&&"end"!==e||(r.width=`${s.width}px`))}changeBorderToDefaultStyle(e){const t=1,r="#000",n=this[e].style;n.backgroundColor=r,n.width=`${t}px`,n.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,n.addClass)(this[e],"hidden"):(0,n.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,o.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)}}},14201:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},90484:(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"},403:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={SelectionManager:!0,Selection:!0},i=n(r(73864));t.Selection=i.default;var o=r(90484);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===o[e]||(t[e]=o[e]))}));var a=r(14201);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=r(62489);t.SelectionManager=l.SelectionManager},62489:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517),r(9815);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(13136),l=n(r(57253));function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakSet;function w(){const e=(0,s.default)(this,p).get((0,s.default)(this,c)),t=(0,s.default)(this,c).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let r=0;r<t.length;r++)e.add(t[r]);e.forEach((e=>{var t,r;const n=(0,s.default)(this,c).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=(0,s.default)(this,d).options)||void 0===t?void 0:t.cellAttributes)&&(i=(0,s.default)(this,d).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.headerAttributes)&&(i=[...i,...(0,s.default)(this,d).options.headerAttributes.map((e=>e[0]))]);for(let t=0,r=n.length;t<r;t++)(0,o.removeClass)(n[t],e),(0,o.removeAttribute)(n[t],i)})),e.clear()}t.SelectionManager=class{constructor(e){var t,r;h(t=this,r=E),r.add(t),u(this,c,{writable:!0,value:void 0}),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:new a.SelectionScanner}),u(this,p,{writable:!0,value:new WeakMap}),u(this,g,{writable:!0,value:new WeakSet}),u(this,m,{writable:!0,value:new Map}),(0,i.default)(this,d,e)}setActiveOverlay(e){return(0,i.default)(this,c,e),(0,s.default)(this,f).setActiveOverlay((0,s.default)(this,c)),(0,s.default)(this,p).has((0,s.default)(this,c))||(0,s.default)(this,p).set((0,s.default)(this,c),new Set),this}getFocusSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).getFocus():null}getAreaSelection(){return null!==(0,s.default)(this,d)?(0,s.default)(this,d).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,s.default)(this,m).has(e)){const t=(0,s.default)(this,m).get(e);if(t.has((0,s.default)(this,c)))return t.get((0,s.default)(this,c));const r=new l.default((0,s.default)(this,c),e.settings);return t.set((0,s.default)(this,c),r),r}const t=new l.default((0,s.default)(this,c),e.settings);return(0,s.default)(this,m).set(e,new Map([[(0,s.default)(this,c),t]])),t}getBorderInstances(e){var t,r;return Array.from(null!==(t=null===(r=(0,s.default)(this,m).get(e))||void 0===r?void 0:r.values())&&void 0!==t?t:[])}destroyBorders(e){(0,s.default)(this,m).get(e).forEach((e=>e.destroy())),(0,s.default)(this,m).delete(e)}render(e){if(null===(0,s.default)(this,d))return;e&&function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,w).call(this);const t=Array.from((0,s.default)(this,d)),r=new Map,n=new Map;for(let e=0;e<t.length;e++){const i=t[e],{className:o,headerAttributes:a,createLayers:l,selectionType:u}=i.settings;(0,s.default)(this,g).has(i)||((0,s.default)(this,g).add(i),i.addLocalHook("destroy",(()=>this.destroyBorders(i))));const h=this.getBorderInstance(i);if(i.isEmpty()){null==h||h.disappear();continue}if(o){(0,s.default)(this,f).setActiveSelection(i).scan().forEach((e=>{if(r.has(e)){const t=r.get(e);t.has(o)&&!0===l?t.set(o,t.get(o)+1):t.set(o,1)}else r.set(e,new Map([[o,1]]));a&&(n.has(e)||n.set(e,[]),"TH"===e.nodeName&&n.get(e).push(...a))}))}const d=i.getCorners();(0,s.default)(this,c).getSetting("onBeforeDrawBorders",d,u),null==h||h.appear(d)}r.forEach(((e,t)=>{var r;const n=Array.from(e).map((e=>{let[t,r]=e;return 1===r?t:[t,...Array.from({length:r-1},((e,r)=>`${t}-${r+1}`))]})).flat();n.forEach((e=>(0,s.default)(this,p).get((0,s.default)(this,c)).add(e))),(0,o.addClass)(t,n),"TD"===t.nodeName&&Array.isArray(null===(r=(0,s.default)(this,d).options)||void 0===r?void 0:r.cellAttributes)&&(0,o.setAttribute)(t,(0,s.default)(this,d).options.cellAttributes)})),Array.from(n.keys()).forEach((e=>{(0,o.setAttribute)(e,[...n.get(e)])}))}}},13136:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(49587);function a(e,t,r){l(e,t),t.set(e,r)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var h=new WeakMap,c=new WeakMap,d=new WeakSet;function f(e){const{wtTable:t}=(0,s.default)(this,c),r=t.getRenderedRowsCount(),n=t.getRenderedColumnsCount();for(let s=0;s<r;s+=1){const r=t.rowFilter.renderedToSource(s);for(let s=0;s<n;s+=1)e(r,t.columnFilter.renderedToSource(s))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=d),t.add(e),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,i.default)(this,c,e),this}setActiveSelection(e){return(0,i.default)(this,h,e),this}scan(){const e=(0,s.default)(this,h).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,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:o}=(0,s.default)(this,c),a=o.getRenderedColumnsCount(),l=o.getColumnHeadersCount();let u=0;for(let d=-o.getRowHeadersCount();d<a;d++){const a=o.columnFilter.renderedToSource(d);if(!(a<r||a>i)){for(let d=-l;d<0;d++){if(d<t||d>n)continue;const f=d+l;let p=o.getColumnHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingColumnHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,columnCursor:u,selectionWidth:i-r+1});null!==g&&(g!==a&&(p=o.getColumnHeader(g,f)),e(p))}u+=1}}}scanRowsInHeadersRange(e){const[t,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:o}=(0,s.default)(this,c),a=o.getRenderedRowsCount(),l=o.getRowHeadersCount();let u=0;for(let d=-o.getColumnHeadersCount();d<a;d++){const a=o.rowFilter.renderedToSource(d);if(!(a<t||a>n)){for(let d=-l;d<0;d++){if(d<r||d>i)continue;const f=d+l;let p=o.getRowHeader(a,f);const g=(0,s.default)(this,c).getSetting("onBeforeHighlightingRowHeader",a,f,{selectionType:(0,s.default)(this,h).settings.selectionType,rowCursor:u,selectionHeight:n-t+1});null!==g&&(g!==a&&(p=o.getRowHeader(g,f)),e(p))}u+=1}}}scanCellsRange(e){const[t,r,n,i]=(0,s.default)(this,h).getCorners(),{wtTable:a}=(0,s.default)(this,c);u(this,d,f).call(this,((l,u)=>{if(l>=t&&l<=n&&u>=r&&u<=i){const t=a.getCell((0,s.default)(this,c).createCellCoords(l,u)),r=(0,s.default)(this,c).getSetting("onAfterDrawSelection",l,u,(0,s.default)(this,h).settings.layerLevel);"string"==typeof r&&(0,o.addClass)(t,r),e(t)}}))}scanRowsInCellsRange(e){const[t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((i,o)=>{if(i>=t&&i<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(i,o));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,r]=(0,s.default)(this,h).getCorners(),{wtTable:n}=(0,s.default)(this,c);u(this,d,f).call(this,((i,o)=>{if(o>=t&&o<=r){const t=n.getCell((0,s.default)(this,c).createCellCoords(i,o));e(t)}}))}}},73864:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(76163),i=n(r(63806));class o{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,s.mixin)(o,i.default);t.default=o},39373:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49587),o=r(76163);t.default=class{constructor(e){(0,s.default)(this,"settings",{}),(0,s.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,o.objectEach)(this.defaults,((t,r)=>{if(void 0!==e[r])this.settings[r]=e[r];else{if(void 0===t)throw new Error(`A required setting "${r}" was not provided`);this.settings[r]=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,r)=>{const n=this.getSetting("data",e,t);(0,i.fastInnerText)(r,null==n?"":n)},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,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,o.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,r,n,s){return"function"==typeof this.settings[e]?this.settings[e](t,r,n,s):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]}}},58304:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(49587),o=r(46029),a=n(r(17976)),l=n(r(76191)),u=r(84355),h=n(r(66830)),c=n(r(18365)),d=r(24658),f=r(66862);t.default=class{constructor(e,t,r,n,o){(0,s.default)(this,"wtSettings",null),(0,s.default)(this,"domBindings",void 0),(0,s.default)(this,"TBODY",null),(0,s.default)(this,"THEAD",null),(0,s.default)(this,"COLGROUP",null),(0,s.default)(this,"hasTableHeight",!0),(0,s.default)(this,"hasTableWidth",!0),(0,s.default)(this,"isTableVisible",!1),(0,s.default)(this,"tableOffset",0),(0,s.default)(this,"holderOffset",0),this.domBindings=r,this.isMaster="master"===o,this.name=o,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=n,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=r.rootTable,(0,i.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 a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new c.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new h.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new u.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 r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtSpreader",t&&t.insertBefore(r,e),r.appendChild(e)),r.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHider(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.className="wtHider",t&&t.insertBefore(r,e),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}createHolder(e){const t=e.parentNode;let r;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,i.hasClass)(t,"wtHolder")||(r=this.domBindings.rootDocument.createElement("div"),r.style.position="relative",r.className="wtHolder",t&&t.insertBefore(r,e),this.isMaster&&(r.parentNode.className+="ht_master handsontable",r.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r.parentNode,[(0,f.A11Y_PRESENTATION)()])),r.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,i.setAttribute)(r,[(0,f.A11Y_PRESENTATION)()]),r}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:r,wtViewport:n}=this.dataAccessObject,s=t.getSetting("totalRows"),o=t.getSetting("totalColumns"),u=t.getSetting("rowHeaders"),h=u.length,c=t.getSetting("columnHeaders"),f=c.length;let p=!1,g=e;if(this.isMaster&&(this.holderOffset=(0,i.offset)(this.holder),g=n.createRenderCalculators(g),h&&!t.getSetting("fixedColumnsStart"))){const e=r.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(g=!1)}if(this.isMaster&&(p=r.updateStateOfRendering()),g)this.isMaster&&(n.createVisibleCalculators(),n.createPartiallyVisibleCalculators()),r&&r.refresh(!0);else{this.isMaster?this.tableOffset=(0,i.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=o>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,s,f),this.columnFilter=new a.default(t,o,h);let r=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),r=!0!==e.skipRender}if(r){let e;if(this.tableRenderer.setHeaderContentRenderers(u,c),(this.is(d.CLONE_BOTTOM)||this.is(d.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(u,[]),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(d.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtViewport.createPartiallyVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,i.outerWidth)(this.hider),r=(0,i.outerWidth)(this.TABLE);0!==t&&r!==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(d.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=r.topOverlay.resetFixedPosition(),r.bottomOverlay.clone&&(m=r.bottomOverlay.resetFixedPosition()||m),m=r.inlineStartOverlay.resetFixedPosition()||m,r.topInlineStartCornerOverlay&&r.topInlineStartCornerOverlay.resetFixedPosition(),r.bottomInlineStartCornerOverlay&&r.bottomInlineStartCornerOverlay.clone&&r.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(r.refreshAll(),r.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(g),p&&r.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let r=this.wtSettings.getSetting("columnHeaders").length;const n=this.wtSettings.getSetting("defaultRowHeight");let s,o,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;r;)r-=1,s=this.getColumnHeaderHeight(r),o=this.getColumnHeader(t,r),o&&(a=(0,i.innerHeight)(o),(!s&&n<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=a),Array.isArray(l)?null!==l[r]&&void 0!==l[r]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]<(l[r]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[r]=l[r]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,r=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let n=0,s=e.getSetting("columnHeaders").length;n<s;n++)if(r[n]){if(!t[n]||0===t[n].childNodes.length)return;t[n].childNodes[0].style.height=`${r[n]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(d.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let r=0;r<e;r++){const e=this.rowFilter.renderedToSource(r);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,r=e.col;const n=this.wtSettings.getSetting("onModifyGetCellCoords",t,r);if(n&&Array.isArray(n)&&([t,r]=n),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(r))return-3;if(this.isColumnAfterRenderedColumns(r))return-4;const s=this.getRow(t);if(!s&&t>=0)throw new Error("TR was expected to be rendered but is not");const i=s.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(r)];if(!i&&r>=0)throw new Error("TD or TH was expected to be rendered but is not");return i}getRow(e){let t=null,r=null;var n,s;e<0?(t=null===(n=this.rowFilter)||void 0===n?void 0:n.sourceRowToVisibleColHeadedRow(e),r=this.THEAD):(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceToRendered(e),r=this.TBODY);return void 0!==t&&void 0!==r&&(!(r.childNodes.length<t+1)&&r.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const r=this.THEAD.childNodes[t];return null==r?void 0:r.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],r=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const n=e.childNodes[r];n&&t.push(n)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const r=this.rowFilter.sourceToRendered(e),n=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=(r<0?this.THEAD:this.TBODY).childNodes[n];return null==s?void 0:s.childNodes[t]}getRowHeaders(e){const t=[],r=this.wtSettings.getSetting("rowHeaders").length;for(let n=0;n<r;n++){const r=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],s=null==r?void 0:r.childNodes[n];s&&t.push(s)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,i.closest)(t,["TD","TH"])),null===t)return null;const r=t.parentNode,n=r.parentNode;let s=(0,i.index)(r),o=t.cellIndex;if((0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_TOP,t,this.wtRootElement))"THEAD"===n.nodeName&&(s-=n.childNodes.length);else if((0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM,t,this.wtRootElement)){s=this.wtSettings.getSetting("totalRows")-n.childNodes.length+s}else s=n===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return o=(0,i.overlayContainsElement)(d.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_INLINE_START,t,this.wtRootElement)||(0,i.overlayContainsElement)(d.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,r,n,s,o;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,i.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,n=this.rowFilter.renderedToSource(e),t=this.getRowHeight(n),s=this.getTrForRow(n),o=s.querySelector("th"),r=o?(0,i.innerHeight)(o):(0,i.innerHeight)(s)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<r||t<r)&&(r+=1,this.dataAccessObject.wtViewport.oversizedRows[n]=r)}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,i.outerWidth)(this.TABLE)}getHeight(){return(0,i.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,i.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,i.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,i.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,o.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}}},84218:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(3148)),o=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},37917:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(3148)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},68215:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(46962)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_INLINE_START)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},58454:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(49587),i=n(r(58304)),o=n(r(46962)),a=n(r(27972)),l=r(76163);class u extends i.default{constructor(e,t,r,n){super(e,t,r,n,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,s.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 r=e.parentElement,n=(0,s.getStyle)(e,"height",t),i=(0,s.getStyle)(e,"overflow",t),o=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,h=e.offsetHeight;if(r&&["auto","hidden","scroll"].includes(i)){const n=e.cloneNode(!1);n.style.overflow="auto",n.style.position="absolute",e.nextElementSibling?r.insertBefore(n,e.nextElementSibling):r.appendChild(n);const i=parseInt((0,s.getComputedStyle)(n,t).height,10);r.removeChild(n),0===i&&(h=0)}h=Math.min(h,l),o.height="auto"===n?"auto":`${h}px`,u=Math.min(u,a),o.width=`${u}px`,o.overflow="",this.hasTableHeight="auto"===o.height||h>0,this.hasTableWidth=u>0}this.isTableVisible=(0,s.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,r="master",n=e.getSetting("columnHeaders").length;if(n&&!t.hasOversizedColumnHeadersMarked[r]){const s=e.getSetting("rowHeaders").length,i=this.getRenderedColumnsCount();for(let e=0;e<n;e++)for(let e=-1*s;e<i;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[r]=!0}}}(0,l.mixin)(u,o.default),(0,l.mixin)(u,a.default);t.default=u},27972:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;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},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=n},46962:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;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},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,r(76163).defineGetter)(n,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=n},29185:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=n},3148:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),r=e-t;return 0===e||0===t?-1:r<0?0:r},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=n},75237:(e,t,r)=>{"use strict";t.__esModule=!0;const n={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){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,r(76163).defineGetter)(n,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=n},54472:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(75237)),o=n(r(27972)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},34868:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(58304)),i=n(r(75237)),o=n(r(29185)),a=r(76163),l=r(24658);class u extends s.default{constructor(e,t,r,n){super(e,t,r,n,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(u,i.default),(0,a.mixin)(u,o.default);t.default=u},66830:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(49587),o=r(5682);t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),(0,s.default)(this,"headerWidths",new Map),(0,s.default)(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new o.ColumnStretching({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const r=this.stretching.getStretchedColumnWidth(e,t);return r&&(t=r),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const r=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==r&&(t=t?Math.max(t,r):r),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:r}=this.dataAccessObject,n=r?r.wtTable.holder:e.holder,s=n.offsetHeight<n.scrollHeight?(0,i.getScrollbarWidth)():0;this.stretching.refreshStretching(t.getViewportWidth()-s)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!=t){const r=e.getSetting("rowHeaders").length,n=e.getSetting("defaultColumnWidth");for(let e=0;e<r;e++){let r=Array.isArray(t)?t[e]:t;r=null==r?n:r,this.headerWidths.set(e,r)}}}}},5682:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(42538)),o=n(r(48427));function a(e,t,r){!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,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;class f{static get DEFAULT_WIDTH(){return 50}constructor(e){let{totalColumns:t,stretchMode:r,stretchingColumnWidthFn:n,columnWidthFn:f}=e;(0,s.default)(this,"stretchAllRatio",0),(0,s.default)(this,"stretchLastWidth",0),(0,s.default)(this,"stretchAllColumnsWidth",[]),a(this,l,{writable:!0,value:0}),(0,s.default)(this,"needVerifyLastColumnWidth",!0),a(this,u,{writable:!0,value:()=>0}),a(this,h,{writable:!0,value:e=>e}),a(this,c,{writable:!0,value:e=>e}),a(this,d,{writable:!0,value:()=>"none"}),(0,o.default)(this,u,t),(0,o.default)(this,d,r),(0,o.default)(this,h,null!=n?n:(0,i.default)(this,h)),(0,o.default)(this,c,null!=f?f:(0,i.default)(this,c))}refreshStretching(e){if("none"===(0,i.default)(this,d).call(this))return;(0,o.default)(this,l,e);let t=0;for(let r=0;r<(0,i.default)(this,u).call(this);r++){const n=this._getColumnWidth(r),s=(0,i.default)(this,h).call(this,void 0,r);"number"==typeof s?e-=s:t+=n}const r=e-t;if("all"===(0,i.default)(this,d).call(this)&&r>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===(0,i.default)(this,d).call(this)&&e!==1/0){const e=this._getColumnWidth((0,i.default)(this,u).call(this)-1),t=r+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let r=null;return"all"===(0,i.default)(this,d).call(this)&&0!==this.stretchAllRatio?r=this._getStretchedAllColumnWidth(e,t):"last"===(0,i.default)(this,d).call(this)&&0!==this.stretchLastWidth&&(r=this._getStretchedLastColumnWidth(e)),r}_getStretchedAllColumnWidth(e,t){let r=0;if(!this.stretchAllColumnsWidth[e]){const r=Math.round(t*this.stretchAllRatio),n=(0,i.default)(this,h).call(this,r,e);this.stretchAllColumnsWidth[e]=void 0===n?r:isNaN(n)?this._getColumnWidth(e):n}if(this.stretchAllColumnsWidth.length===(0,i.default)(this,u).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)r+=this.stretchAllColumnsWidth[e];r!==(0,i.default)(this,l)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=(0,i.default)(this,l)-r)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===(0,i.default)(this,u).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=(0,i.default)(this,c).call(this,e);return isNaN(t)&&(t=f.DEFAULT_WIDTH),t}}t.ColumnStretching=f},88929:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e){(0,s.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},79208:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},32512:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));t.OrderView=s.default;var i=n(r(81004));t.SharedOrderView=i.default},81004:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(69191));class i extends s.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=i},69191:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(79208),o=n(r(72844));t.default=class{constructor(e,t,r){(0,s.default)(this,"rootNode",void 0),(0,s.default)(this,"nodesPool",void 0),(0,s.default)(this,"sizeSet",new o.default),(0,s.default)(this,"childNodeType",void 0),(0,s.default)(this,"visualIndex",0),(0,s.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=r.toUpperCase()}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 r=0;if(this.isSharedViewSet()){let n=e.firstElementChild;for(;n;){if(n.tagName===this.childNodeType)r+=1;else if(t.isPlaceOn(i.WORKING_SPACE_TOP))break;n=n.nextElementSibling}}else r=e.childElementCount;return r}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,r=this.isSharedViewSet(),{nextSize:n}=t.getViewSize();let s=this.getRenderedChildCount();for(;s<n;){const n=this.nodesPool();!r||r&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)?e.appendChild(n):e.insertBefore(n,e.firstChild),s+=1}const o=r&&t.isPlaceOn(i.WORKING_SPACE_TOP);for(;s>n;)e.removeChild(o?e.firstChild:e.lastChild),s-=1}render(){const{rootNode:e,sizeSet:t}=this;let r=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(i.WORKING_SPACE_BOTTOM)&&(r+=t.sharedSize.nextSize);let n=e.childNodes[r];if(n.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,n),n=t}this.collectedNodes.push(n),this.visualIndex+=1}end(){}}},53566:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(){(0,s.default)(this,"currentSize",0),(0,s.default)(this,"nextSize",0),(0,s.default)(this,"currentOffset",0),(0,s.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},72844:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(53566)),o=r(79208);t.default=class{constructor(){(0,s.default)(this,"size",new i.default),(0,s.default)(this,"workingSpace",o.WORKING_SPACE_ALL),(0,s.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof i.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=o.WORKING_SPACE_TOP,e.workingSpace=o.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=o.WORKING_SPACE_BOTTOM,e.workingSpace=o.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},18365:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e,t){(0,s.default)(this,"dataAccessObject",void 0),(0,s.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(t=void 0===t?r:Math.max(t,r)),t}}},55778:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49587),s=r(76163),i=r(10933);t.default=class{constructor(e,t,r,n,s){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=r,this.wtTable=s,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=n,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let r=0;if(t===this.domBindings.rootWindow)r=e.documentElement.clientHeight;else{r=(0,n.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return r}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:r}=this.domBindings,s=this.dataAccessObject.inlineStartOverlayTrimmingContainer,i=t.documentElement.offsetWidth,o=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),u=this.wtTable.TABLE.getBoundingClientRect(),h=i-(l?u.right-i:u.left);let c,d;if(a)return(0,n.outerWidth)(this.wtTable.wtRootElement);if(c=e.getSetting("freezeOverlays")?Math.min(h,i):Math.min(this.getContainerFillWidth(),h,i),s===r&&o>0&&this.sumColumnWidths(0,o-1)>c)return t.documentElement.clientWidth;if(s!==r&&(d=(0,n.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",r),"scroll"===d||"hidden"===d||"auto"===d))return Math.max(c,s.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?c:Math.max(c,(0,n.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let r=0,n=e;for(;n<t;)r+=this.wtTable.getColumnWidth(n),n+=1;return r}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 r=t.offsetWidth;return this.containerWidth=r,e.removeChild(t),r}getWorkspaceOffset(){return(0,n.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,n.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 r=0,n=t.length;r<n;r++)this.rowHeaderWidth+=e[r]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let r=0,s=t.length;r<s;r++)e?(this.rowHeaderWidth+=(0,n.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]:i.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;if(t.getSetting("renderAllRows")&&e===i.RENDER_TYPE)return new i.RenderAllRowsCalculator({totalRows:t.getSetting("totalRows")});let s,o,a=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const u=t.getSetting("fixedRowsTop"),h=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return u&&l>=0&&(o=this.dataAccessObject.topOverlay.sumCellSizes(0,u),l+=o,a-=o),h&&this.dataAccessObject.bottomOverlay.clone&&(o=this.dataAccessObject.bottomOverlay.sumCellSizes(c-h,c),a-=o),s=r.holder.clientHeight===r.holder.offsetHeight?0:(0,n.getScrollbarWidth)(this.domBindings.rootDocument),new i.ViewportRowsCalculator({viewportHeight:a,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>r.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:s})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:i.RENDER_TYPE;const{wtSettings:t,wtTable:r}=this;if(t.getSetting("renderAllColumns")&&e===i.RENDER_TYPE)return new i.RenderAllColumnsCalculator({totalColumns:t.getSetting("totalColumns")});let s=this.getViewportWidth(),o=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&o>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);o+=e,s-=e}return r.holder.clientWidth!==r.holder.offsetWidth&&(s-=(0,n.getScrollbarWidth)(this.domBindings.rootDocument)),new i.ViewportColumnsCalculator({viewportWidth:s,scrollOffset:o,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>r.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this;if(e&&!t.getSetting("renderAllRows")){const t=this.createRowsCalculator(i.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=this.createColumnsCalculator(i.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(i.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(i.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(i.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(i.FULLY_VISIBLE_TYPE)}createPartiallyVisibleCalculators(){this.rowsPartiallyVisibleCalculator=this.createRowsCalculator(i.PARTIALLY_VISIBLE_TYPE),this.columnsPartiallyVisibleCalculator=this.createColumnsCalculator(i.PARTIALLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startRow:s,endRow:i}=this.rowsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>i||r===i&&r<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:r,isVisibleInTrimmingContainer:n}=e;if(null===t&&null===r)return!n;const{startColumn:s,endColumn:i}=this.columnsRenderCalculator;return!(t<s||t===s&&t>0)&&!(r>i||r===i&&r<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,s.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,r)=>{r[t]=void 0}))}}},73421:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(16247),r(25671),r(97796),r(36662);var s=n(r(40898)),i=r(83059),o=r(70400),a=n(r(54925)),l=r(19310),u=r(79321),h=r(44575),c=r(86446),d=r(94699);function f(e,t){const r=new s.default(e,t||{},i.rootInstanceSymbol);return r.init(),r}t.CellCoords=d.CellCoords,t.CellRange=d.CellRange,(0,u.registerCellType)(h.TextCellType),f.editors={BaseEditor:c.BaseEditor},f.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s.default(e,t,i.rootInstanceSymbol)},f.DefaultSettings=(0,o.metaSchemaFactory)(),f.hooks=a.default.getSingleton(),f.CellCoords=d.CellCoords,f.CellRange=d.CellRange,f.packageName="handsontable",f.buildDate="02/02/2024 12:20:23",f.version="0.0.0-next-817afa4-20240202",f.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=f},90078:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16478),s=r(20395),i=r(78420);const o=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:o,editor:n.AutocompleteEditor,renderer:s.autocompleteRenderer,validator:i.autocompleteValidator}},1544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90078);t.AutocompleteCellType=n.AutocompleteCellType,t.CELL_TYPE=n.CELL_TYPE},19992:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73388),s=r(30201);const i=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:i,editor:n.CheckboxEditor,renderer:s.checkboxRenderer}},17177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(19992);t.CELL_TYPE=n.CELL_TYPE,t.CheckboxCellType=n.CheckboxCellType},55261:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(92090),s=r(61795),i=r(63322);const o=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:o,editor:n.DateEditor,renderer:s.dateRenderer,validator:i.dateValidator}},69364:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(55261);t.CELL_TYPE=n.CELL_TYPE,t.DateCellType=n.DateCellType},93534:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28544),s=r(81393),i=r(19246);const o=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:o,editor:n.DropdownEditor,renderer:s.dropdownRenderer,validator:i.dropdownValidator}},29329:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(93534);t.CELL_TYPE=n.CELL_TYPE,t.DropdownCellType=n.DropdownCellType},37007:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(12540),s=r(75067);const i=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:i,editor:n.HandsontableEditor,renderer:s.handsontableRenderer}},26737:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37007);t.CELL_TYPE=n.CELL_TYPE,t.HandsontableCellType=n.HandsontableCellType},419:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,f.registerCellType)(n.AutocompleteCellType),(0,f.registerCellType)(s.CheckboxCellType),(0,f.registerCellType)(i.DateCellType),(0,f.registerCellType)(o.DropdownCellType),(0,f.registerCellType)(a.HandsontableCellType),(0,f.registerCellType)(l.NumericCellType),(0,f.registerCellType)(u.PasswordCellType),(0,f.registerCellType)(h.SelectCellType),(0,f.registerCellType)(c.TextCellType),(0,f.registerCellType)(d.TimeCellType)};var n=r(1544);t.AutocompleteCellType=n.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=n.CELL_TYPE;var s=r(17177);t.CheckboxCellType=s.CheckboxCellType,t.CHECKBOX_TYPE=s.CELL_TYPE;var i=r(69364);t.DateCellType=i.DateCellType,t.DATE_TYPE=i.CELL_TYPE;var o=r(29329);t.DropdownCellType=o.DropdownCellType,t.DROPDOWN_TYPE=o.CELL_TYPE;var a=r(26737);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=r(59854);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var u=r(97839);t.PasswordCellType=u.PasswordCellType,t.PASSWORD_TYPE=u.CELL_TYPE;var h=r(85e3);t.SelectCellType=h.SelectCellType,t.SELECT_TYPE=h.CELL_TYPE;var c=r(44575);t.TextCellType=c.TextCellType,t.TEXT_TYPE=c.CELL_TYPE;var d=r(738);t.TimeCellType=d.TimeCellType,t.TIME_TYPE=d.CELL_TYPE;var f=r(79321);t.registerCellType=f.registerCellType,t.getCellType=f.getCellType,t.getRegisteredCellTypeNames=f.getRegisteredCellTypeNames,t.getRegisteredCellTypes=f.getRegisteredCellTypes,t.hasCellType=f.hasCellType},59854:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(57846);t.CELL_TYPE=n.CELL_TYPE,t.NumericCellType=n.NumericCellType},57846:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6618),s=r(94350),i=r(22905);const o=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:o,editor:n.NumericEditor,renderer:s.numericRenderer,validator:i.numericValidator,dataType:"number"}},97839:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(28204);t.CELL_TYPE=n.CELL_TYPE,t.PasswordCellType=n.PasswordCellType},28204:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(50647),s=r(32991);const i=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:i,editor:n.PasswordEditor,renderer:s.passwordRenderer,copyable:!1}},79321:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCellType=function(e){if(!h(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 u(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:r,renderer:n,validator:s}=t;r&&(0,i.registerEditor)(e,r);n&&(0,o.registerRenderer)(e,n);s&&(0,a.registerValidator)(e,s);l(e,t)},r(91683);var s=n(r(31056)),i=r(16691),o=r(36996),a=r(59340);const{register:l,getItem:u,hasItem:h,getNames:c,getValues:d}=(0,s.default)("cellTypes");t.getRegisteredCellTypes=d,t.getRegisteredCellTypeNames=c,t.hasCellType=h},85e3:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59139);t.CELL_TYPE=n.CELL_TYPE,t.SelectCellType=n.SelectCellType},59139:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(71177),s=r(9126);const i=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:i,editor:n.SelectEditor,renderer:s.selectRenderer}},44575:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(89294);t.CELL_TYPE=n.CELL_TYPE,t.TextCellType=n.TextCellType},89294:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(26031);const i=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:i,editor:n.TextEditor,renderer:s.textRenderer}},738:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(59115);t.CELL_TYPE=n.CELL_TYPE,t.TimeCellType=n.TimeCellType},59115:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(76219),s=r(78279),i=r(85137);const o=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:o,editor:n.TimeEditor,renderer:s.timeRenderer,validator:i.timeValidator}},40898:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t){var r,n=this;let H=arguments.length>2&&void 0!==arguments[2]&&arguments[2],F=this;const U=new u.default(F);let V,B,W,Y,G,j,z=!0;(0,T.hasValidParameter)(H)&&(0,T.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const $=null!==(r=null==t?void 0:t.layoutDirection)&&void 0!==r?r:"inherit",K=["rtl","ltr"].includes($)?$:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",K),this.isRtl=function(){return"rtl"===K},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,b.getValidLanguageCode)(t.language);const X=new O.MetaManager(F,t,[O.DynamicCellMetaMod,O.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),Z=(0,x.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,T.isRootInstance)(this)&&(0,o._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,w.randomString)()}`,k.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),B=new v.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let J=new A.Selection(q,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>V.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,r)=>F._createCellRange(e,t,r),visualToRenderableCoords:e=>{const{row:t,col:r}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,r>=0?F.columnIndexMapper.getRenderableFromVisualIndex(r):r)},renderableToVisualCoords:e=>{const{row:t,col:r}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,r>=0?F.columnIndexMapper.getVisualFromRenderableIndex(r):r)},isDisabledCellSelection:(e,t)=>e<0||t<0?F.getSettings().disableVisualSelection:F.getCellMeta(e,t).disableVisualSelection});this.selection=J;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,M.normalizeLanguageCode)(e);(0,b.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),Q.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function re(e,t){const r="className"===e?F.rootElement:F.table;if(z)(0,s.addClass)(r,t);else{let n=[],i=[];Q[e]&&(n=Array.isArray(Q[e])?Q[e]:(0,d.stringToArray)(Q[e])),t&&(i=Array.isArray(t)?t:(0,d.stringToArray)(t));const o=(0,d.getDifferenceOfArrays)(n,i),a=(0,d.getDifferenceOfArrays)(i,n);o.length&&(0,s.removeClass)(r,o),a.length&&(0,s.addClass)(r,a)}Q[e]=t}function ne(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function se(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function ie(e,t,r){if(!e.length)return;const n=F.getActiveEditor(),i=new ne;let o=!0;i.onQueueEmpty=e=>{n&&o&&n.cancelChanges(),r(e)};for(let r=e.length-1;r>=0;r--){const[n,a,,l]=e[r],u=V.propToCol(a),h=F.getCellMeta(n,u);"numeric"===h.type&&"string"==typeof l&&(0,y.isNumericLike)(l)&&(e[r][3]=se(l)),F.getCellValidator(h)&&(i.addValidatorToQueue(),F.validateCell(e[r][3],h,function(t,r){return function(n){if("boolean"!=typeof n)throw new Error("Validation error: result is not boolean");if(!1===n&&!1===r.allowInvalid){o=!1,e.splice(t,1),r.valid=!0;const n=F.getCell(r.visualRow,r.visualCol);null!==n&&(0,s.removeClass)(n,q.invalidCellClassName)}i.removeValidatorFormQueue()}}(r,h),t))}i.checkIfQueueIsEmpty()}function oe(e,t){let r=e.length-1;if(r<0)return;for(;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(q.allowInsertRow)for(;e[r][0]>F.countRows()-1;){const{delta:e}=V.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===F.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;V.propToCol(e[r][1])>F.countCols()-1;){const{delta:e}=V.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||V.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}F.forceFullRender=!0,W.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),Y.lockEditor(),F._refreshBorders(null),Y.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const n=F.getActiveEditor();n&&(0,o.isDefined)(n.refreshValue)&&n.refreshValue()}function ae(e,t,r){return Array.isArray(e)?e:[[e,t,r]]}function le(e,t){const r=F.getActiveEditor(),n=F.runHooks("beforeChange",e,t||"edit"),s=e.filter((e=>null!==e));return!1===n||0===s.length?(r&&r.cancelChanges(),[]):s}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const r=(0,h.createObjectPropListener)(!1),n=this.selection.getSelectedRange(),{from:i,to:o}=n.current(),a=n.size()-1;this.runHooks("afterSelection",i.row,i.col,o.row,o.col,r,a),this.runHooks("afterSelectionByProp",i.row,F.colToProp(i.col),o.row,F.colToProp(o.col),r,a),t&&(!r.isTouched()||r.isTouched()&&!r.value)&&j.scrollTo(e);const l=J.isSelectedByRowHeader(),u=J.isSelectedByColumnHeader();l&&u?(0,s.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?((0,s.removeClass)(this.rootElement,"ht__selection--columns"),(0,s.addClass)(this.rootElement,"ht__selection--rows")):u?((0,s.removeClass)(this.rootElement,"ht__selection--rows"),(0,s.addClass)(this.rootElement,"ht__selection--columns")):(0,s.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:r,to:n}=e[t];this.runHooks("afterSelectionEnd",r.row,r.col,n.row,n.col,t),this.runHooks("afterSelectionEndByProp",r.row,F.colToProp(r.col),n.row,F.colToProp(n.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{Y.destroyEditor(),this._refreshBorders(),(0,s.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),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.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"))),W={alter(e,t){var r,n;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[r]=e,[n]=t;return r===n?0:r>n?1:-1}));return(0,d.arrayReduce)(t,((e,t)=>{let[r,n]=t;const s=e[e.length-1],[i,o]=s,a=i+o;if(r<=a){const e=Math.max(n-(a-r),0);s[1]+=e}else e.push([r,n]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=F.countSourceRows();if(q.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(r=t)&&void 0!==r?r:"below"===u?a:0;const{delta:h,startPhysicalIndex:c}=V.createRow(t,s,{source:i,mode:u});if(h){const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.row,n=F.toVisualRow(c);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,o.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let i=t.col;J.isSelectedByRowHeader()&&(i=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(r+h,i),!0),J.setRangeEnd(F._createCellCoords(n+h,s))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(n=t)&&void 0!==n?n:"end"===f?F.countSourceCols():0;const{delta:p,startPhysicalIndex:g}=V.createCol(t,s,{source:i,mode:f});if(p){if(Array.isArray(q.colHeaders)){const e=[F.toVisualColumn(g),0];e.length+=p,Array.prototype.splice.apply(q.colHeaders,e)}const e=J.selectedRange.current(),t=null==e?void 0:e.from,r=null==t?void 0:t.col,n=F.toVisualColumn(g);if(J.isSelectedByCorner())J.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,o.isDefined)(r)&&r>=n){const{row:n,col:s}=e.to;let i=t.row;J.isSelectedByColumnHeader()&&(i=-1),J.getSelectedRange().pop(),J.setRangeStartOnly(F._createCellCoords(i,r+p),!0),J.setRangeEnd(F._createCellCoords(n,s+p))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?F.countRows()-1:Math.max(r-t,0);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!V.removeRow(r,n,i))return;const a=F.countRows(),l=q.fixedRowsTop;l>=s+1&&(q.fixedRowsTop-=Math.min(n,l-s));const u=q.fixedRowsBottom;u&&s>=a-u&&(q.fixedRowsBottom-=Math.min(n,u)),t+=n}))};Array.isArray(t)?m(l(t)):m([[t,s]]),W.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const E=e=>{let t=0;(0,d.arrayEach)(e,(e=>{let[r,n]=e;const s=(0,o.isEmpty)(r)?F.countCols()-1:Math.max(r-t,0);let a=F.toPhysicalColumn(s);Number.isInteger(r)&&(r=Math.max(r-t,0));if(!V.removeCol(r,n,i))return;const l=q.fixedColumnsStart;l>=s+1&&(q.fixedColumnsStart-=Math.min(n,l-s)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,n)),t+=n}))};Array.isArray(t)?E(l(t)):E([[t,s]]),W.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||W.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,r=q.minCols,n=q.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&J.deselect(),e){const t=F.countRows();t<e&&V.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const r=t-e,n=Math.min(r,q.maxRows-F.countSourceRows());V.createRow(F.countRows(),n,{source:"auto"})}}{let e;(r||n)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(r&&!q.columns&&t<r){const n=r-t;e+=n,V.createCol(t,n,{source:"auto"})}if(n&&!q.columns&&"array"===F.dataType&&e<n){t=F.countCols();const r=n-e,s=Math.min(r,q.maxCols-t);V.createCol(t,s,{source:"auto"})}}if(J.isSelected()){const e=F.countRows(),t=F.countCols();(0,d.arrayEach)(J.selectedRange,(r=>{let n=!1,s=r.from.row,i=r.from.col,o=r.to.row,a=r.to.col;s>e-1?(s=e-1,n=!0,o>s&&(o=s)):o>e-1&&(o=e-1,n=!0,s>o&&(s=o)),i>t-1?(i=t-1,n=!0,a>i&&(a=i)):a>t-1&&(a=t-1,n=!0,i>a&&(i=a)),n&&(i<0?F.selectRows(s,o,i):s<0?F.selectColumns(i,a,s):F.selectCell(s,i,o,a))}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,r,n,s){let i,o,a,l;const u=[],c={},f=[],p=e.row,g=e.col;if(o=t.length,0===o)return!1;let m=0,E=0;switch((0,h.isObject)(r)&&(m=r.col-g+1,E=r.row-p+1),s){case"shift_down":const s=(0,d.pivot)(t),w=s.length,y=Math.max(w,m),C=F.getData().slice(p),v=(0,d.pivot)(C).slice(g,g+y);for(a=0;a<y;a+=1)if(a<w){for(i=0,o=s[a].length;i<E-o;i+=1)s[a].push(s[a][i%o]);a<v.length?f.push(s[a].concat(v[a])):f.push(s[a].concat(new Array(C.length).fill(null)))}else f.push(s[a%w].concat(v[a]));F.populateFromArray(p,g,(0,d.pivot)(f));break;case"shift_right":const S=t.length,R=Math.max(S,E),T=F.getData().slice(p).map((e=>e.slice(g)));for(i=0;i<R;i+=1)if(i<S){for(a=0,l=t[i].length;a<m-l;a+=1)t[i].push(t[i][a%l]);if(i<T.length)for(let e=0;e<T[i].length;e+=1)t[i].push(T[i][e]);else t[i].push(...new Array(T[0].length).fill(null))}else t.push(t[i%o].slice(0,R).concat(T[i]));F.populateFromArray(p,g,t);break;default:c.row=e.row,c.col=e.col;let N,_=0,b=0,M=!0;const A=function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=t[e%t.length];return null!==r?n[r%n.length]:n},O=t.length,I=r?r.row-e.row+1:0;for(o=r?I:Math.max(O,I),i=0;i<o&&!(r&&c.row>r.row&&I>O||!q.allowInsertRow&&c.row>F.countRows()-1||c.row>=q.maxRows);i++){const t=i-_,s=A(t).length,d=r?r.col-e.col+1:0;if(l=r?d:Math.max(s,d),c.col=e.col,N=F.getCellMeta(c.row,c.col),"CopyPaste.paste"!==n&&"Autofill.fill"!==n||!N.skipRowOnPaste){for(b=0,a=0;a<l&&!(r&&c.col>r.col&&d>s||!q.allowInsertColumn&&c.col>F.countCols()-1||c.col>=q.maxCols);a++){if(N=F.getCellMeta(c.row,c.col),("CopyPaste.paste"===n||"Autofill.fill"===n)&&N.skipColumnOnPaste){b+=1,c.col+=1,l+=1;continue}if(N.readOnly&&"UndoRedo.undo"!==n){c.col+=1;continue}let e=A(t,a-b),r=F.getDataAtCell(c.row,c.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===r&&(r=[]),null===r||"object"!=typeof r)M=!1;else{const t=(0,h.duckSchema)(Array.isArray(r)?r:r[0]||r),n=(0,h.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,h.isObjectEqual)(t,n)||Array.isArray(t)&&Array.isArray(n)?e=(0,h.deepClone)(e):M=!1}else null!==r&&"object"==typeof r&&(M=!1);M&&u.push([c.row,c.col,e]),M=!0,c.col+=1}c.row+=1}else _+=1,c.row+=1,o+=1}F.setDataAtCell(u,null,null,n||"populateFromArray")}}},this.init=function(){B.setData(q.data),F.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,s.addClass)(F.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new C.default(this),Y=l.default.getInstance(F,q,J),j=(0,I.createViewportScroller)(F),G=new c.FocusManager(F),(0,T.isRootInstance)(this)&&(0,I.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===F.rootElement.offsetParent&&(0,s.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof z&&(F.runHooks("afterChange",z[0],z[1]),z=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,r){return F.view._wt.createCellRange(e,t,r)},this.validateCell=function(e,t,r,n){let s=F.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void r(e);const n=t.visualCol,s=t.visualRow,i=F.getCell(s,n,!0);if(i&&"TH"!==i.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(s),t=F.columnIndexMapper.getRenderableFromVisualIndex(n);F.view._wt.getSetting("cellRenderer",e,t,i)}r(e)}var l;(0,o.isRegExp)(s)&&(l=s,s=function(e,t){t(l.test(e))}),(0,i.isFunction)(s)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,n),F._registerImmediate((()=>{s.call(t,e,(r=>{F&&(r=F.runHooks("afterValidate",r,e,t.visualRow,t.prop,n),t.valid=r,a(r),F.runHooks("postAfterValidate",r,e,t.visualRow,t.prop,n))}))}))):F._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,r,n){const s=ae(e,t,r),i=[];let o,a,l,u=n;for(o=0,a=s.length;o<a;o++){if("object"!=typeof s[o])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof s[o][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`");l=s[o][1]>=this.countCols()?s[o][1]:V.colToProp(s[o][1]),i.push([s[o][0],l,B.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]])}u||"object"!=typeof e||(u=t);const h=le(i,n);F.runHooks("afterSetDataAtCell",h,u),ie(h,u,(()=>{oe(h,u)}))},this.setDataAtRowProp=function(e,t,r,n){const s=ae(e,t,r),i=[];let o,a,l=n;for(o=0,a=s.length;o<a;o++)i.push([s[o][0],s[o][1],B.getAtCell(this.toPhysicalRow(s[o][0]),s[o][1]),s[o][2]]);l||"object"!=typeof e||(l=t);const u=le(i,n);F.runHooks("afterSetDataAtRowProp",u,l),ie(u,l,(()=>{oe(u,l)}))},this.listen=function(){F&&!F.isListening()&&(k.forEach((e=>{F!==e&&e.unlisten()})),D=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(D=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return D===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,r,n,s,i,o){if("object"!=typeof r||"object"!=typeof r[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof n?F._createCellCoords(n,s):null;return W.populateFromArray(F._createCellCoords(e,t),r,a,i,o)},this.spliceCol=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),i=3;i<n;i++)s[i-3]=arguments[i];return V.spliceCol(e,t,r,...s)},this.spliceRow=function(e,t,r){for(var n=arguments.length,s=new Array(n>3?n-3:0),i=3;i<n;i++)s[i-3]=arguments[i];return V.spliceRow(e,t,r,...s)},this.getSelected=function(){if(J.isSelected())return(0,d.arrayMap)(J.getSelectedRange(),(e=>{let{from:t,to:r}=e;return[t.row,t.col,r.row,r.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(J.isSelected())return Array.from(J.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!J.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,d.arrayEach)(J.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const r=e.getTopStartCorner(),n=e.getBottomEndCorner();(0,y.rangeEach)(r.row,n.row,(e=>{(0,y.rangeEach)(r.col,n.col,(r=>{this.getCellMeta(e,r).readOnly||t.push([e,r,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()||(Y.lockEditor(),this._refreshBorders(null),Y.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 r=e();return this.resumeExecution(t),r},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:r,height:n}=F.rootElement.getBoundingClientRect(),s=r!==e||n!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:r,height:n},s)||((s||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(r,n),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:r,height:n},s))},this.updateData=function(e,t){(0,O.replaceData)(e,(e=>{V=e}),(e=>{V=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),W.adjustRowsAndCols()}),{hotInstance:F,dataMap:V,dataSource:B,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,O.replaceData)(e,(e=>{V=e}),(()=>{X.clearCellsCache(),F.initIndexMappers(),W.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:F,dataMap:V,dataSource:B,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,i.isFunction)(e))if("array"===F.dataType){const r=this.countSourceCols();for(let n=0;n<r;n+=1)e(n)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=V.colToPropCache.length);else if((0,o.isDefined)(q.dataSchema)){const e=V.getSchema();t=Array.isArray(e)?e.length:(0,h.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,r,n){return(0,o.isUndefined)(e)?V.getAll():V.getRange(F._createCellCoords(e,t),F._createCellCoords(r,n),V.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,r,n){return V.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(r,n))},this.getCopyableData=function(e,t){return V.getCopyable(e,V.colToProp(t))},this.getSchema=function(){return V.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=(z?F.loadData:F.updateData).bind(this);let n,s,a=!1;if((0,o.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,o.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,o.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(n in e)"data"===n||("language"===n?te(e.language):"className"===n?re("className",e.className):"tableClassName"===n&&F.table?(re("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):_.default.getSingleton().isRegistered(n)||_.default.getSingleton().isDeprecated(n)?((0,i.isFunction)(e[n])||Array.isArray(e[n]))&&(e[n].initialHook=!0,F.addHook(n,e[n])):!t&&(0,h.hasOwnProperty)(e,n)&&(Q[n]=e[n]));void 0===e.data&&void 0===q.data?r(null,"updateSettings"):void 0!==e.data?r(e.data,"updateSettings"):void 0!==e.columns&&(V.createMap(),F.initIndexMappers());const l=F.countCols(),u=q.columns;if(u&&(0,i.isFunction)(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(n=0,s=0;n<l;n++){if(u){const e=a?u(n):u[s];e&&X.updateColumnMeta(s,e)}s+=1}(0,o.isDefined)(e.cell)&&(0,h.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let c=F.rootElement.style.height;""!==c&&(c=parseInt(F.rootElement.style.height,10));let d=e.height;if((0,i.isFunction)(d)&&(d=d()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===d){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==d&&(F.rootElement.style.height=isNaN(d)?`${d}`:`${d}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,i.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),W.adjustRowsAndCols(),F.view&&!z&&(F.forceFullRender=!0,Y.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),Y.unlockEditor()),t||!F.view||""!==c&&""!==d&&void 0!==d||c===d||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if(q.getValue){if((0,i.isFunction)(q.getValue))return q.getValue.call(F);if(e)return F.getData()[e[0][0]][q.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,r,n,s){W.alter(e,t,r,n,s)},this.getCell=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=t,s=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;n=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;s=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===s||null===n?null:F.view.getCellAtCoords(F._createCellCoords(s,n),r)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:r,col:n}=t;let s=r,i=n;return r>=0&&(s=this.rowIndexMapper.getVisualFromRenderableIndex(r)),n>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(n)),F._createCellCoords(s,i)},this.colToProp=function(e){return V.colToProp(e)},this.propToCol=function(e){return V.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 V.get(e,V.colToProp(t))},this.getDataAtRowProp=function(e,t){return V.get(e,t)},this.getDataAtCol=function(e){const t=[],r=V.getRange(F._createCellCoords(0,e),F._createCellCoords(q.data.length-1,e),V.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getDataAtProp=function(e){const t=[],r=V.getRange(F._createCellCoords(0,V.propToCol(e)),F._createCellCoords(q.data.length-1,V.propToCol(e)),V.DESTINATION_RENDERER);for(let e=0;e<r.length;e+=1)for(let n=0;n<r[e].length;n+=1)t.push(r[e][n]);return t},this.getSourceData=function(e,t,r,n){let s;return s=void 0===e?B.getData():B.getByRange(F._createCellCoords(e,t),F._createCellCoords(r,n)),s},this.getSourceDataArray=function(e,t,r,n){let s;return s=void 0===e?B.getData(!0):B.getByRange(F._createCellCoords(e,t),F._createCellCoords(r,n),!0),s},this.getSourceDataAtCol=function(e){return B.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,r,n){const s=ae(e,t,r),i=this.hasHook("afterSetSourceDataAtCell"),a=[];i&&(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;a.push([t,r,B.getAtCell(t,r),n])})),(0,d.arrayEach)(s,(e=>{let[t,r,n]=e;B.setAtCell(t,r,n)})),i&&this.runHooks("afterSetSourceDataAtCell",a,n),this.render();const l=F.getActiveEditor();l&&(0,o.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return B.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return B.getAtCell(e,t)},this.getDataAtRow=function(e){return V.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),V.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,r,n){const s=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,r,n],[i,o]=s;let[,,a,l]=s,u=null,h=null;void 0===a&&(a=i),void 0===l&&(l=o);let c="mixed";return(0,y.rangeEach)(Math.max(Math.min(i,a),0),Math.max(i,a),(e=>{let t=!0;return(0,y.rangeEach)(Math.max(Math.min(o,l),0),Math.max(o,l),(r=>{const n=this.getCellMeta(e,r);return h=n.type,u?t=u===h:u=h,t})),c=t?h:"mixed",t})),c},this.removeCellMeta=function(e,t,r){const[n,s]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=X.getCellMetaKeyValue(n,s,r);!1!==F.runHooks("beforeRemoveCellMeta",e,t,r,i)&&(X.removeCellMeta(n,s,r),F.runHooks("afterRemoveCellMeta",e,t,r,i)),i=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var r=arguments.length,n=new Array(r>2?r-2:0),s=2;s<r;s++)n[s-2]=arguments[s];if(n.length>0&&!Array.isArray(n[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),n.length>0&&(0,d.arrayEach)(n.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,d.arrayEach)(t,((t,r)=>this.setCellMetaObject(e,r,t)))})),F.render()},this.setCellMetaObject=function(e,t,r){"object"==typeof r&&(0,h.objectEach)(r,((r,n)=>{this.setCellMeta(e,t,n,r)}))},this.setCellMeta=function(e,t,r,n){if(!1===F.runHooks("beforeSetCellMeta",e,t,r,n))return;let s=e,i=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),X.setCellMeta(s,i,r,n),F.runHooks("afterSetCellMeta",e,t,r,n)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let r=this.toPhysicalRow(e),n=this.toPhysicalColumn(t);return null===r&&(r=e),null===n&&(n=t),X.getCellMeta(r,n,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||q.columns)},this.getCellRenderer=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof r?(0,g.getRenderer)(r):(0,o.isUndefined)(r)?(0,g.getRenderer)("text"):r},this.getCellEditor=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof r?(0,m.getEditor)(r):(0,o.isUndefined)(r)?(0,m.getEditor)("text"):r},this.getCellValidator=function(e,t){const r="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof r?(0,E.getValidator)(r):r},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,r){const n=new ne;e&&(n.onQueueEmpty=e);let s=F.countRows()-1;for(;s>=0;){if(void 0!==t&&-1===t.indexOf(s)){s-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===r||-1!==r.indexOf(e)?(n.addValidatorToQueue(),F.validateCell(F.getDataAtCell(s,e),F.getCellMeta(s,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(n.valid=!1),n.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;s-=1}n.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,r=e;return void 0!==r&&(r=F.runHooks("modifyRowHeader",r)),void 0===r?(t=[],(0,y.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[r]?t=t[r]:(0,i.isFunction)(t)?t=t(r):t&&"string"!=typeof t&&"number"!=typeof t&&(t=r+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=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const r=F.runHooks("modifyColHeader",e);if(void 0===r){const e=[],t=F.countCols();for(let r=0;r<t;r++)e.push(F.getColHeader(r));return e}let n=q.colHeaders;const s=F.toPhysicalColumn(r),o=function(e){const t=[],r=F.countCols();let n=0;for(;n<r;n++)(0,i.isFunction)(q.columns)&&q.columns(n)&&t.push(n);return t[e]}(s);return!1===q.colHeaders?n=null:q.columns&&(0,i.isFunction)(q.columns)&&q.columns(o)&&q.columns(o).title?n=q.columns(o).title:q.columns&&q.columns[s]&&q.columns[s].title?n=q.columns[s].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[s]?n=q.colHeaders[s]:(0,i.isFunction)(q.colHeaders)?n=q.colHeaders(s):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(n=(0,S.spreadsheetColumnLabel)(r)),n=F.runHooks("modifyColumnHeaderValue",n,e,t),n},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.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=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=N.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=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return B.countRows()},this.countSourceCols=function(){return B.countFirstRowKeys()},this.countRows=function(){return V.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,y.rangeEachReverse)(F.countRows()-1,(r=>{if(F.isEmptyRow(r))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,y.rangeEachReverse)(F.countCols()-1,(r=>{if(F.isEmptyCol(r))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(F,e)},this.selectCell=function(e,t,r,n){let s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,o.isUndefined)(e)&&!(0,o.isUndefined)(t)&&this.selectCells([[e,t,r,n]],s,i)},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])&&j.suspend();const r=J.selectCells(e);return r&&t&&F.listen(),j.resume(),r},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return J.selectColumns(e,t,r)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;return J.selectRows(e,t,r)},this.deselectCell=function(){J.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2?arguments[2]:void 0;j.skipNextScrollCycle(),J.selectAll(e,t,r)};const ue=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,r;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(r=arguments[4])||void 0===r||r});const{row:n,col:s,verticalSnap:i,horizontalSnap:o,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,u,h,c;void 0!==i&&(l="top"===i,u=!l),void 0!==o&&(h="start"===o,c=!h);let d=n,f=s;if(void 0===a||a){const e=Number.isInteger(n)&&n>=0,t=Number.isInteger(s)&&s>=0,r=e?ue(this.rowIndexMapper,n):void 0,i=t?ue(this.columnIndexMapper,s):void 0;if(null===r||null===i)return!1;d=e?F.rowIndexMapper.getRenderableFromVisualIndex(r):n,f=t?F.columnIndexMapper.getRenderableFromVisualIndex(i):s}const p=Number.isInteger(d),g=Number.isInteger(f);return p&&d>=0&&g&&f>=0?F.view.scrollViewport(F._createCellCoords(d,f),l,c,u,h):p&&d>=0&&(g&&f<0||!g)?F.view.scrollViewportVertically(d,l,u):!!(g&&f>=0&&(p&&d<0||!p))&&F.view.scrollViewportHorizontally(f,c,h)},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(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),B&&B.destroy(),B=null,this.getShortcutManager().destroy(),X.clearCache(),k.delete(this.guid),(0,T.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,s.empty)(F.rootElement),U.destroy(),Y&&Y.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),Z.getItems().forEach((e=>{let[,t]=e;t.destroy()})),Z.clear(),F.runHooks("afterDestroy")}),!0),_.default.getSingleton().destroy(F),(0,h.objectEach)(F,((e,t,r)=>{var n;(0,i.isFunction)(e)?r[t]=(n=t,()=>{throw new Error(`The "${n}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(r[t]=null)})),F.isDestroyed=!0,V&&V.destroy(),V=null,W=null,J=null,Y=null,F=null},this.getActiveEditor=function(){return Y.getActiveEditor()},this.getPlugin=function(e){const t=(0,w.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:Z.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:Z.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){_.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return _.default.getSingleton().has(e,F)||_.default.getSingleton().has(e)},this.addHookOnce=function(e,t){_.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){_.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,r,n,s,i,o){return _.default.getSingleton().run(F,e,t,r,n,s,i,o)},this.getTranslatedPhrase=function(e,t){return(0,b.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,f.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,f.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,d.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,d.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Y.destroyEditor(e),F.view.render(),t&&J.isSelected()&&Y.prepareEditor()},this._getEditorManager=function(){return Y},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const he=(0,P.createShortcutManager)({handleEvent:()=>F.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&he.releasePressedKeys()})),this.getShortcutManager=function(){return he},this.getFocusManager=function(){return G},(0,p.getPluginsNames)().forEach((e=>{const t=(0,p.getPlugin)(e);Z.addItem(e,new t(this))})),(0,L.registerAllShortcutContexts)(F),he.setActiveContextName("grid"),_.default.getSingleton().run(F,"construct")},r(63517),r(91683),r(97552);var s=r(49587),i=r(46029),o=r(97639),a=r(78498),l=n(r(80940)),u=n(r(57340)),h=r(76163),c=r(14864),d=r(98887),f=r(65795),p=r(5280),g=r(36996),m=r(16691),E=r(59340),w=r(37913),y=r(57691),C=n(r(26969)),v=n(r(36129)),S=r(56020),R=r(41789),T=r(83059),N=r(94699),_=n(r(54925)),b=r(19310),M=r(6415),A=r(79055),O=r(70400),I=r(47378),x=r(8815),P=r(48120),L=r(51377);let D=null;const k=new Map;new Set},39785:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=e.rootElement,n=i(e),s=i(e);return n.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),r.firstChild.before(n),r.lastChild.after(s),{activate(){e._registerTimeout((()=>{n.tabIndex=0,s.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{n.tabIndex=-1,s.tabIndex=-1}),10)}}};var n=r(49587),s=r(66862);function i(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,n.setAttribute)(t,[(0,s.A11Y_PRESENTATION)(),(0,s.A11Y_HIDDEN)()]),t}},90376:(e,t,r)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){const t=function(e){return t=>{if(!t)return null;const r=i(e),n=o(e);return t.col<r.col&&(t.col=r.col),t.col>n.col&&(t.col=n.col),t.row<r.row&&(t.row=r.row),t.row>n.row&&(t.row=n.row),t}}(e);let r;const{activate:a,deactivate:l}=(0,s.installFocusDetector)(e,{onFocusFromTop(){var n;const s=null!==(n=t(r))&&void 0!==n?n:i(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_above",s),e.selectCell(s.row,s.col)),e.listen()},onFocusFromBottom(){var n;const s=null!==(n=t(r))&&void 0!==n?n:o(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_below",s),e.selectCell(s.row,s.col)),e.listen()}}),u={wrapped:!1,flipped:!1};let h=!0,c=!1,d=!1;e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>a())),e.addHook("afterSelection",((t,n,s,i,o)=>{var a;(c&&(u.wrapped&&u.flipped||d)&&(d=!1,o.value=!0),h)&&(r=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,r)=>{u.wrapped=!0,u.flipped=r}));const f={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:n.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...f,callback:()=>{const{tabNavigation:t}=e.getSettings();c=!0,e.getSelectedRangeLast()&&!t&&(h=!1),t||(d=!0)},position:"before"},{...f,callback:t=>{const{tabNavigation:n,autoWrapRow:s}=e.getSettings();if(c=!1,h=!0,!n||!e.selection.isSelected()||s&&u.wrapped&&u.flipped||!s&&u.wrapped)return s&&u.wrapped&&u.flipped&&(r=t.shiftKey?i(e):o(e)),u.wrapped=!1,u.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var n=r(51377),s=r(39785);function i(e){const{rowIndexMapper:t,columnIndexMapper:r}=e,{navigableHeaders:n}=e.getSettings();let s=n&&e.countColHeaders()>0?-e.countColHeaders():0,i=n&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===s&&(s=t.getVisualFromRenderableIndex(s)),0===i&&(i=r.getVisualFromRenderableIndex(i)),null===s||null===i?null:e._createCellCoords(s,i)}function o(e){var t,r;const{rowIndexMapper:n,columnIndexMapper:s}=e,{navigableHeaders:i}=e.getSettings();let o=n.getRenderableIndexesLength()-1,a=s.getRenderableIndexesLength()-1;if(o<0){if(!i||0===e.countColHeaders())return null;o=-1}if(a<0){if(!i||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=n.getVisualFromRenderableIndex(o))&&void 0!==t?t:o,null!==(r=s.getVisualFromRenderableIndex(a))&&void 0!==r?r:a)}},47378:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(90376);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}));var s=r(64915);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},64915:(e,t,r)=>{"use strict";t.__esModule=!0,t.createViewportScroller=function(e){const{selection:t}=e;let r=!1,u=!1;return{resume(){u=!1},suspend(){u=!0},skipNextScrollCycle(){r=!0},scrollTo(h){var c;if(r||u)return void(r=!1);let d;t.isSelectedByCorner()?d=(0,s.cornerHeaderScrollStrategy)(e):t.isSelectedByRowHeader()?d=(0,a.rowHeaderScrollStrategy)(e):t.isSelectedByColumnHeader()?d=(0,n.columnHeaderScrollStrategy)(e):1===t.getSelectedRange().size()&&t.isMultiple()?d=(0,i.multipleScrollStrategy)(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(d=(0,o.noncontiguousScrollStrategy)(e)):d=(0,l.singleScrollStrategy)(e),null===(c=d)||void 0===c||c(h)}}};var n=r(85092),s=r(49881),i=r(10337),o=r(77106),a=r(39204),l=r(54018)},85092:(e,t)=>{"use strict";t.__esModule=!0,t.columnHeaderScrollStrategy=function(e){return t=>{let{col:r}=t;e.scrollViewportTo({col:r})}}},49881:(e,t)=>{"use strict";t.__esModule=!0,t.cornerHeaderScrollStrategy=function(){return()=>{}}},10337:(e,t)=>{"use strict";t.__esModule=!0,t.multipleScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},77106:(e,t)=>{"use strict";t.__esModule=!0,t.noncontiguousScrollStrategy=function(e){return t=>{e.scrollViewportTo(t.toObject())}}},39204:(e,t)=>{"use strict";t.__esModule=!0,t.rowHeaderScrollStrategy=function(e){return t=>{let{row:r}=t;e.scrollViewportTo({row:r})}}},54018:(e,t)=>{"use strict";t.__esModule=!0,t.singleScrollStrategy=function(e){return t=>{const r=e.selection.getSelectionSource(),{row:n,col:s}=t;if(n<0&&s>=0)e.scrollViewportTo({col:s});else if(s<0&&n>=0)e.scrollViewportTo({row:n});else{if("mouse"===r&&(s===e.view.getLastPartiallyVisibleColumn()||n===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:n,col:s})}}}},38085:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(32313),o=r(56020),a=r(76163),l=r(98887),u=r(57691),h=r(97639);class c{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,r){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"dataSource",void 0),(0,s.default)(this,"duckSchema",void 0),(0,s.default)(this,"colToPropCache",void 0),(0,s.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=r,this.tableMeta=r.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),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 r;if(this.colToPropCache=[],this.propToColCache=new Map,t){let n=0,s=0,i=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);n=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;n=Math.min(e,t.length)}for(r=0;r<n;r++){const e=i?t(r):t[r];if((0,a.isObject)(e)){if(void 0!==e.data){const t=i?s:r;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}s+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,o.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,r){let n,s=t,i=r;return void 0===s&&(s=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(n=i+t,this.colToPropCache.push(n),this.propToColCache.set(n,s),s+=1):s=this.recursiveDuckColumns(e,s,`${t}.`)})),s}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,h.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,h.isDefined)(t))return this.hot.toVisualColumn(t);const r=this.hot.toVisualColumn(e);return null===r?e:r}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=this.hot.countSourceRows();let i=s,o=0,l=e;("number"!=typeof l||l>=s)&&(l=s),l<this.hot.countRows()&&(i=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,r)||null===i)return{delta:0};const h=this.tableMeta.maxRows,c=this.getSchema().length,d=[];for(;o<t&&s+o<h;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,u.rangeEach)(c-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+o):(e={},(0,a.deepExtend)(e,this.getSchema())),d.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(l,o),"below"===n&&(i=Math.min(i+1,s)),this.spliceData(i,0,d);const f=this.hot.toVisualRow(i);return this.hot.countSourceRows()===d.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),o>0&&(null==e?this.metaManager.createRow(null,o):"auto"!==r&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",f,o,r),this.hot.forceFullRender=!0,{delta:o,startPhysicalIndex:i}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:r,mode:n="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.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 s=this.dataSource,i=this.tableMeta.maxCols,o=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=o)&&(a=o);if(!1===this.hot.runHooks("beforeCreateCol",a,t,r))return{delta:0};let l=o;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),c=0,d=l;"end"===n&&(d=Math.min(d+1,o));const f=d;for(;c<t&&h<i;){if("number"!=typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)void 0===s[e]&&(s[e]=[]),s[e].push(null);else s.push([null]);else for(let e=0;e<u;e++)s[e].splice(d,0,null);c+=1,d+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==r&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,c,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:c,startPhysicalIndex:f}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0,n=Number.isInteger(e)?e:-t;const s=this.visualRowsToPhysical(n,t),i=this.hot.countSourceRows();n=(i+n)%i;if(!1===this.hot.runHooks("beforeRemoveRow",n,s.length,s,r))return!1;const o=s.length;if(this.filterData(n,o,s),n<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(s);const e=(0,h.isDefined)(this.tableMeta.columns)||(0,h.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return s.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",n,o,s,r),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let n="number"!=typeof e?-t:e;n=(this.hot.countCols()+n)%this.hot.countCols();const s=this.visualColumnsToPhysical(n,t),i=s.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",n,t,s,r))return!1;let o=!0;const a=i.length,l=this.dataSource;for(let e=0;e<a;e++)o&&s[0]!==s[e]-e&&(o=!1);if(o)for(let e=0,r=this.hot.countSourceRows();e<r;e++)l[e].splice(s[0],t),0===e&&this.metaManager.removeColumn(s[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(i[t],1),0===e&&this.metaManager.removeColumn(i[t],1);return n<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(s),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",n,t,s,r),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,r){const n=this.hot.getDataAtCol(e),s=n.slice(t,t+r),i=n.slice(t+r);for(var o=arguments.length,a=new Array(o>3?o-3:0),u=3;u<o;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,i);let h=0;for(;h<r;)a.push(null),h+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),s}spliceRow(e,t,r){const n=this.hot.getSourceDataAtRow(e),s=n.slice(t,t+r),i=n.slice(t+r);for(var o=arguments.length,a=new Array(o>3?o-3:0),u=3;u<o;u++)a[u-3]=arguments[u];(0,l.extendArray)(a,i);let h=0;for(;h<r;)a.push(null),h+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),s}spliceData(e,t,r){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,r)){const t=[...this.dataSource.slice(0,e),...r,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,r){let n=this.hot.runHooks("filterData",e,t,r);!1===Array.isArray(n)&&(n=this.dataSource.filter(((e,t)=>-1===r.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,n)}get(e,t){const r=this.hot.toPhysicalRow(e);let n=this.dataSource[r];const s=this.hot.runHooks("modifyRowData",r);n=isNaN(s)?s:n;let i=null;if(n&&n.hasOwnProperty&&(0,a.hasOwnProperty)(n,t))i=n[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r=n;if(!r)return null;for(let t=0,n=e.length;t<n;t++)if(r=r[e[t]],void 0===r)return null;i=r}else"function"==typeof t&&(i=t(this.dataSource.slice(r,r+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"get"),e.isTouched()&&(i=e.value)}return i}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,r){const n=this.hot.toPhysicalRow(e);let s=r,i=this.dataSource[n];const o=this.hot.runHooks("modifyRowData",n);if(i=isNaN(o)?o:i,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"set"),e.isTouched()&&(s=e.value)}if(i&&i.hasOwnProperty&&(0,a.hasOwnProperty)(i,t))i[t]=s;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let r,n=i,o=0;for(o=0,r=e.length-1;o<r;o++)void 0===n[e[o]]&&(n[e[o]]={}),n=n[e[o]];n[e[o]]=s}else"function"==typeof t?t(this.dataSource.slice(n,n+1)[0],s):i[t]=s}visualRowsToPhysical(e,t){const r=this.hot.countSourceRows(),n=[];let s,i=(r+e)%r,o=t;for(;i<r&&o;)s=this.hot.toPhysicalRow(i),n.push(s),o-=1,i+=1;return n}visualColumnsToPhysical(e,t){const r=this.hot.countCols(),n=[];let s=(r+e)%r,i=t;for(;s<r&&i;){const e=this.hot.toPhysicalColumn(s);n.push(e),i-=1,s+=1}return n}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.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 r=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(r,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,c.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,r){const n=[];let s,i,o;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=r===c.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),d=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(s=Math.min(e.row,t.row);s<=h;s++){o=[];const r=s>=0?this.hot.toPhysicalRow(s):s;for(i=Math.min(e.col,t.col);i<=d&&null!==r;i++)o.push(u.call(this,s,this.colToProp(i)));null!==r&&n.push(o)}return n}getText(e,t){return(0,i.stringify)(this.getRange(e,t,c.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,i.stringify)(this.getRange(e,t,c.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=c},36129:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(56020),a=r(98887),l=r(57691),u=r(46029);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",void 0),(0,s.default)(this,"dataType","array"),(0,s.default)(this,"colToProp",(()=>{})),(0,s.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}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,a.arrayEach)(this.data,((r,n)=>{const s=this.getAtCell(n,e);t.push(s)})),t}getAtRow(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===r;let o=null,a=null;if(o=this.modifyRowData(e),Array.isArray(o))a=[],s?o.forEach(((t,r)=>{a[r]=this.getAtPhysicalCell(e,r,o)})):(0,l.rangeEach)(t,r,(r=>{a[r-t]=this.getAtPhysicalCell(e,r,o)}));else if((0,i.isObject)(o)||(0,u.isFunction)(o))if(a=n?[]:{},!s||n){const s=0,u=this.countFirstRowKeys()-1;(0,l.rangeEach)(s,u,(l=>{const h=this.colToProp(l);if(l>=(t||s)&&l<=(r||u)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,o);n?a.push(t):(0,i.setProperty)(a,h,t)}}))}else(0,i.objectEach)(o,((t,r)=>{(0,i.setProperty)(a,r,this.getAtPhysicalCell(e,r,o))}));return a}setAtCell(e,t,r){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const n=(0,i.createObjectPropListener)(r);this.hot.runHooks("modifySourceData",e,t,n,"set"),n.isTouched()&&(r=n.value)}Number.isInteger(t)?this.data[e][t]=r:(0,i.setProperty)(this.data[e],t,r)}}getAtPhysicalCell(e,t,r){let n=null;if(r&&(n="string"==typeof t?(0,i.getProperty)(r,t):"function"==typeof t?t(r):r[t]),this.hot.hasHook("modifySourceData")){const r=(0,i.createObjectPropListener)(n);this.hot.runHooks("modifySourceData",e,t,r,"get"),r.isTouched()&&(n=r.value)}return n}getAtCell(e,t){const r=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),r)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!1,s=null,i=null,o=null,a=null;null===e||null===t?(n=!0,s=0,o=this.countRows()-1):(s=Math.min(e.row,t.row),i=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const u=[];return(0,l.rangeEach)(s,o,(e=>{u.push(n?this.getAtRow(e,void 0,void 0,r):this.getAtRow(e,i,a,r))})),u}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,o.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},70400:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(38085));t.DataMap=s.default;var i=n(r(84544));t.MetaManager=i.default;var o=n(r(16213));t.metaSchemaFactory=o.default;var a=r(92117);t.replaceData=a.replaceData;var l=r(90066);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var u=r(30084);t.ExtendMetaPropertiesMod=u.ExtendMetaPropertiesMod},84544:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(79626)),i=n(r(15198)),o=n(r(67257)),a=n(r(19736)),l=n(r(63806)),u=r(76163);class h{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new s.default(e),this.tableMeta=new i.default(this.globalMeta),this.columnMeta=new o.default(this.globalMeta),this.cellMeta=new a.default(this.columnMeta),r.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,r){let{visualRow:n,visualColumn:s}=r;const i=this.cellMeta.getMeta(e,t);return i.visualRow=n,i.visualCol=s,i.row=e,i.col=t,this.runLocalHooks("afterGetCellMeta",i),i}getCellMetaKeyValue(e,t,r){if("string"!=typeof r)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,r)}setCellMeta(e,t,r,n){this.cellMeta.setMeta(e,t,r,n)}updateCellMeta(e,t,r){this.cellMeta.updateMeta(e,t,r)}removeCellMeta(e,t,r){this.cellMeta.removeMeta(e,t,r)}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=h,(0,u.mixin)(h,l.default)},22358:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(98887),o=r(61530);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"valueFactory",void 0),(0,s.default)(this,"data",[]),(0,s.default)(this,"index",[]),(0,s.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let r;if(t>=0)r=this.data[t],void 0===r&&(r=this.valueFactory(e),this.data[t]=r);else if(r=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=r,this.index[e]=t}else this.data.push(r),this.index[e]=this.data.length-1;return r}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)||(0,o.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=[],n=this.data.length;for(let e=0;e<t;e++)r.push(n+e),this.data.push(void 0);const s=(0,o.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,s),...r,...this.index.slice(s)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,o.assert)((()=>(0,o.isUnsignedNumber)(e)||(0,o.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const r=this.index.splice((0,o.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<r.length;e++){const t=r[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,i.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const r=this._getKeyByStorageIndex(t);-1!==r&&e.push([r,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const r=e[t];return t+=1,{value:r,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)}[a](){return this.entries()}}},19736:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(22358)),l=r(97639);t.default=class{constructor(e){(0,s.default)(this,"columnMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,r){const n=this.getMeta(e,t);(0,i.extend)(n,r),(0,o.extendByMetaType)(n,r)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let r=0;r<this.metas.size();r++)this.metas.obtain(r).remove(e,t)}getMeta(e,t,r){const n=this.metas.obtain(e).obtain(t);return void 0===r?n:n[r]}setMeta(e,t,r,n){var s;const i=this.metas.obtain(e).obtain(t);null===(s=i._automaticallyAssignedMetaProps)||void 0===s||s.delete(r),i[r]=n}removeMeta(e,t,r){delete this.metas.obtain(e).obtain(t)[r]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let r=0;r<t.length;r++)(0,l.isDefined)(t[r])&&e.push(...t[r].values());return e}getMetasAtRow(e){(0,o.assert)((()=>(0,o.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 a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},67257:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(22358));const l=["data","width"];t.default=class{constructor(e){(0,s.default)(this,"globalMeta",void 0),(0,s.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const r=this.getMeta(e);(0,i.extend)(r,t),(0,o.extendByMetaType)(r,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,o.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},79626:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530),a=n(r(16213));t.default=class{constructor(e){(0,s.default)(this,"metaCtor",class{}),(0,s.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,i.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,i.extend)(this.meta,e),(0,o.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},15198:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(61530);t.default=class{constructor(e){(0,s.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,i.extend)(this.meta,e),(0,o.extendByMetaType)(this.meta,e,e)}}},16213:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97639),s=r(76163);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,displayValue:void 0,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,r,s;for(t=0,r=this.countRows();t<r;t++)if(s=this.getDataAtCell(t,e),!1===(0,n.isEmpty)(s))return!1;return!0},isEmptyRow(e){let t,r,i,o;for(t=0,r=this.countCols();t<r;t++)if(i=this.getDataAtCell(e,t),!1===(0,n.isEmpty)(i))return"object"==typeof i&&(o=this.getCellMeta(e,t),(0,s.isObjectEqual)(this.getSchema()[o.prop],i));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,tabNavigation:!0,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:!1,renderAllColumns:!1,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})},90066:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(54925)),o=r(76163),a=r(46029);t.DynamicCellMetaMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),i.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:r,col:n}=e;if(null!==(t=this.metaSyncMemo.get(r))&&void 0!==t&&t.has(n))return;const{visualRow:s,visualCol:i}=e,l=this.metaManager.hot,u=l.colToProp(i);e.prop=u,l.runHooks("beforeGetCellMeta",s,i,e);const h=(0,o.hasOwnProperty)(e,"type")?e.type:null;let c=(0,a.isFunction)(e.cells)?e.cells(r,n,u):null;var d;h&&(c?c.type=null!==(d=c.type)&&void 0!==d?d:h:c={type:h});c&&this.metaManager.updateCellMeta(r,n,c),l.runHooks("afterGetCellMeta",s,i,e),this.metaSyncMemo.has(r)||this.metaSyncMemo.set(r,new Set),this.metaSyncMemo.get(r).add(n)}}},30084:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,s.default)(this,"metaManager",void 0),(0,s.default)(this,"usageTracker",new Set),(0,s.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,r){if(!r)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,r){if(!r)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:r,onChange:n=(()=>{})}=e,s="string"==typeof r,i=s?r:t,o=`_${i}`;this.metaManager.globalMeta.meta[o]=this.metaManager.globalMeta.meta[i],this.installPropWatcher(t,o,n),s&&this.installPropWatcher(r,o,n)}))}installPropWatcher(e,t,r){const n=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(s){const i=!n.usageTracker.has(e);n.usageTracker.add(e),r.call(n,e,s,i),this[t]=s},enumerable:!0,configurable:!0})}}},61530:(e,t,r)=>{"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 r(){}(0,n.inherit)(r,e);for(let e=0;e<t.length;e++)r.prototype[t[e]]=void 0;return r},t.extendByMetaType=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const i="string"==typeof t.type?(0,s.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,n.objectEach)(t,((t,r)=>{e._automaticallyAssignedMetaProps.delete(r)}));if(!(0,n.isObject)(i))return;r!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const o={};(0,n.objectEach)(i,((t,s)=>{var i;(function(e,t){var r;if("CELL_TYPE"===e)return!1;return(null===(r=t._automaticallyAssignedMetaProps)||void 0===r?void 0:r.has(e))||!(0,n.hasOwnProperty)(t,e)})(s,r)&&(o[s]=t,null===(i=e._automaticallyAssignedMetaProps)||void 0===i||i.add(s))})),(0,n.extend)(e,o)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},r(91683);var n=r(76163),s=r(79321)},92117:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.replaceData=function(e,t,r,n){const{hotInstance:h,dataMap:c,dataSource:d,internalSource:f,source:p,metaManager:g,firstRun:m}=n,E=(0,s.toUpperCaseFirst)(f),w=h.getSettings();Array.isArray(w.dataSchema)?h.dataType="array":(0,i.isFunction)(w.dataSchema)?h.dataType="function":h.dataType="object";c&&c.destroy();e=h.runHooks(`before${E}`,e,m,p);const y=new o.default(h,e,g);if(t(y),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${f} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=y.getSchema();let r;e=[];let n=0,s=0;for(n=0,s=w.startRows;n<s;n++)if("object"!==h.dataType&&"function"!==h.dataType||!w.dataSchema)if("array"===h.dataType)r=(0,a.deepClone)(t[0]),e.push(r);else{r=[];for(let e=0,t=w.startCols;e<t;e++)r.push(null);e.push(r)}else r=(0,a.deepClone)(t),e.push(r)}}Array.isArray(e[0])&&(h.dataType="array");w.data=e,y.dataSource=e,d.data=e,d.dataType=h.dataType,d.colToProp=y.colToProp.bind(y),d.propToCol=y.propToCol.bind(y),d.countCachedColumns=y.countCachedColumns.bind(y),r(y),h.runHooks(`after${E}`,e,m,p),m||(h.runHooks("afterChange",null,f),h.render());h.getSettings().ariaTags&&(0,l.setAttribute)(h.rootElement,[(0,u.A11Y_ROWCOUNT)(-1),(0,u.A11Y_COLCOUNT)(h.countCols()+(h.view?h.countRowHeaders():0))])},r(63517),r(91683);var s=r(37913),i=r(46029),o=n(r(38085)),a=r(76163),l=r(49587),u=r(66862)},80940:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(49223),o=r(30369),a=r(16691),l=n(r(57340)),u=r(97639);function h(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 c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";var f=new WeakSet,p=new WeakSet;class g{constructor(e,t,r){h(this,p),h(this,f),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"tableMeta",void 0),(0,s.default)(this,"selection",void 0),(0,s.default)(this,"eventManager",void 0),(0,s.default)(this,"destroyed",!1),(0,s.default)(this,"lock",!1),(0,s.default)(this,"activeEditor",void 0),(0,s.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=r,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>c(this,f,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,r)=>c(this,p,E).call(this,e,t,r)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:r,col:n}=t,s=this.hot.runHooks("modifyGetCellCoords",r,n);let i=r,o=n;if(Array.isArray(s)&&([i,o]=s),this.cellProperties=this.hot.getCellMeta(i,o),!this.isCellEditable())return void this.clearActiveEditor();const l=this.hot.getCell(r,n,!0);if(l){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(o),s=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),o);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(r,n,t,l,s,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const n=this.hot.getSelectedRangeLast();let s=this.hot.runHooks("beforeBeginEditing",n.highlight.row,n.highlight.col,e,t,r);t instanceof MouseEvent&&"boolean"!=typeof s&&(s=0===this.hot.selection.getLayerLevel()&&n.isSingle()),!1!==s?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(r&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,r){this.activeEditor?this.activeEditor.finishEditing(e,t,r):r&&r(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:r,col:n}=e.highlight,{rowIndexMapper:s,columnIndexMapper:i}=this.hot,o=s.isHidden(this.hot.toPhysicalRow(r))||i.isHidden(this.hot.toPhysicalColumn(n));return!(this.cellProperties.readOnly||!t||o)}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)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,o.isImmediatePropagationStopped)(e))return;const{keyCode:r}=e,n=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,i.isFunctionKey)(r)||(0,i.isCtrlMetaKey)(r)||n||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),r={runOnlyIf:()=>(0,u.isDefined)(this.hot.getSelected()),group:d};t.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())}}],r),this.openEditor("",e)}}function E(e,t){t.isCell()&&this.openEditor(null,e,!0)}const w=new WeakMap;g.getInstance=function(e,t,r){let n=w.get(e);return n||(n=new g(e,t,r),w.set(e,n)),n};t.default=g},48036:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(42538)),o=r(12540),a=r(98887),l=r(49587),u=r(97639),h=r(37913),c=r(49223),d=r(78498),f=r(26031),p=r(66862);function g(e,t,r){!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,r)}const m=t.EDITOR_TYPE="autocomplete";var E=new WeakMap;class w extends o.HandsontableEditor{constructor(){super(...arguments),(0,s.default)(this,"query",null),(0,s.default)(this,"strippedChoices",[]),(0,s.default)(this,"rawChoices",[]),g(this,E,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,s.default)(this,"sortByRelevance",(function(e,t,r){const n=[],s=[],i=e.length;let o,a,l,c,d=t.length;if(0===i){for(l=0;l<d;l++)s.push(l);return s}for(l=0;l<d;l++){if(a=(0,h.stripTags)((0,u.stringify)(t[l])),r)c=a.indexOf(e);else{const t=this.cellProperties.locale;c=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==c&&(o=a.length-c-i,n.push({baseIndex:l,index:c,charsLeft:o,value:a}))}for(n.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})),l=0,d=n.length;l<d;l++)s.push(n[l].baseIndex);return s}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,u.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,p.A11Y_TEXT)(),(0,p.A11Y_COMBOBOX)(),(0,p.A11Y_HASPOPUP)("listbox"),(0,p.A11Y_AUTOCOMPLETE)()])}prepare(e,t,r,n,s,o){super.prepare(e,t,r,n,s,o),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_EXPANDED)("false"),(0,p.A11Y_CONTROLS)(`${(0,i.default)(this,E)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,r=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,n=null==r?void 0:r.length,{row:s,col:o}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,d.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,i,o,a,h,c)=>{(0,f.textRenderer)(e,s,i,o,a,h,c);const{filteringCaseSensitive:d,allowHtml:g,locale:m}=this.cellProperties,E=this.query;let w,y,C=(0,u.stringify)(h);C&&!g&&(w=!0===d?C.indexOf(E):C.toLocaleLowerCase(m).indexOf(E.toLocaleLowerCase(m)),-1!==w&&(y=C.substr(w,E.length),C=C.replace(y,`<strong>${y}</strong>`))),t&&(0,l.setAttribute)(s,[(0,p.A11Y_OPTION)(),...r?[(0,p.A11Y_SETSIZE)(n)]:[],...r?[(0,p.A11Y_POSINSET)(r.indexOf(h)+1)]:[],["id",`${this.htEditor.rootElement.id}_${i}-${o}`]]),s.innerHTML=C},afterSelection:(e,r)=>{if(t){const t=this.htEditor.getCell(e,r,!0);(0,l.setAttribute)(t,[(0,p.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,p.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,p.A11Y_LISTBOX)(),(0,p.A11Y_LIVE)("polite"),(0,p.A11Y_RELEVANT)("text"),["id",`${(0,i.default)(this,E)}-listbox-${s}-${o}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,p.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.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),r=(0,l.getSelectionEndPosition)(this.TEXTAREA),n=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let i=null,o=null,u=e;n&&(i=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),u,this.cellProperties.filteringCaseSensitive));const h=Array.isArray(i)?i.length:0;if(!1===s)h&&(o=i[0]);else{const e=[];for(let t=0,r=u.length;t<r&&!(n&&h<=t);t++)h?e.push(u[i[t]]):e.push(u[t]);o=0,u=e}this.strippedChoices=u,this.htEditor.loadData((0,a.pivot)([u])),0===u.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(o)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===r?void 0:r)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,r=this.cellProperties.preventOverflow;if(t||!t&&(r||"horizontal"===r))return!1;const n=(0,l.offset)(this.TEXTAREA),s=(0,l.outerHeight)(this.TEXTAREA),i=this.getDropdownHeight(),o=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),u=(0,l.offset)(e),h=n.top-u.top-a+o,c=e.scrollHeight-h-a-s,d=i>c&&h>c;return d?this.flipDropdown(i):this.unflipDropdown(),this.limitDropdownIfNeeded(d?h:c,i),d}limitDropdownIfNeeded(e,t){if(t>e){let r=0,n=0,s=0,i=null;do{s=this.htEditor.getRowHeight(n)||this.htEditor.view._wt.getSetting("defaultRowHeight"),r+=s,n+=1}while(r<e);i=r-s,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(r-s)}}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,r=(0,a.arrayMap)(e,(e=>(0,u.stringify)(e)));return(0,a.arrayMap)(r,(e=>t?e:(0,h.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),r=t?t.from.row:-1;let n=!1;return e===c.KEY_CODES.ARROW_DOWN&&r>0&&r<this.htEditor.countRows()-1&&(n=!0),e===c.KEY_CODES.ARROW_UP&&r>-1&&(n=!0),n}onBeforeKeyDown(e){if((0,c.isPrintableChar)(e.keyCode)||e.keyCode===c.KEY_CODES.BACKSPACE||e.keyCode===c.KEY_CODES.DELETE||e.keyCode===c.KEY_CODES.INSERT){let t=10;if(e.keyCode===c.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=w},16478:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(48036);t.EDITOR_TYPE=n.EDITOR_TYPE,t.AutocompleteEditor=n.AutocompleteEditor},23627:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(97639),o=r(76163),a=r(80940),l=n(r(94136)),u=r(49587);const h=t.EDITOR_TYPE="base",c=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),d=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class f{static get EDITOR_TYPE(){return h}constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"state",c.VIRGIN),(0,s.default)(this,"_opened",!1),(0,s.default)(this,"_fullEditMode",!1),(0,s.default)(this,"_closeCallback",null),(0,s.default)(this,"TD",null),(0,s.default)(this,"row",null),(0,s.default)(this,"col",null),(0,s.default)(this,"prop",null),(0,s.default)(this,"originalValue",null),(0,s.default)(this,"cellProperties",null),this.hot=e,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,r,n,s,i){this.TD=n,this.row=e,this.col=t,this.prop=r,this.originalValue=s,this.cellProperties=i,this.state=c.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let r,n,s,o;if(t){const e=this.hot.getSelectedLast();r=Math.max(Math.min(e[0],e[2]),0),n=Math.max(Math.min(e[1],e[3]),0),s=Math.max(e[0],e[2]),o=Math.max(e[1],e[3])}else[r,n,s,o]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",r,n);Array.isArray(a)&&([r,n]=a);const l=this.hot.getShortcutManager().getContext("editor"),u={runOnlyIf:()=>(0,i.isDefined)(this.hot.getSelected()),group:d};this.isInFullEditMode()&&l.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())}}],u),this.hot.populateFromArray(r,n,e,s,o,"edit")}beginEditing(e,t){if(this.state!==c.VIRGIN)return;const r=this.hot,n=r.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=r.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(r.view.scrollViewport(r._createCellCoords(n,s)),this.state=c.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,i.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),r.view.render(),r.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,r){let n;if(r){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),r(t),this.hot.view.render()}}if(this.isWaiting())return;const s=this.hot.getShortcutManager().getContext("editor");if(s.removeShortcutsByGroup(d),s.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==c.VIRGIN){if(this.state===c.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const r=this.getValue();n=this.cellProperties.trimWhitespace?[["string"==typeof r?String.prototype.trim.call(r||""):r]]:[[r]],this.state=c.WAITING,this.saveValue(n,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=c.FINISHED,this.discardEditor(e)})):(this.state=c.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=c.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===c.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=c.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=c.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===c.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:r,wtViewport:n}=this.hot.view._wt,s=this.hot.rootWindow,i=(0,u.offset)(t),o=(0,u.outerWidth)(t),a=(0,u.offset)(this.hot.rootElement),l=(0,u.outerWidth)(this.hot.rootElement),h=r.topOverlay.holder,c=r.inlineStartOverlay.holder,d=h!==s?h.scrollTop:0,f=c!==s?c.scrollLeft:0,p=s.innerWidth-a.left-l,{wtTable:g}=null!==(e=r.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=g.name,E=["master","inline_start"].includes(m)?d:0,w=["master","top","bottom"].includes(m)?f:0,y=i.top===a.top?0:1;let C=i.top-a.top-y-E,v=0;v=this.hot.isRtl()?s.innerWidth-i.left-o-p-1+w:i.left-a.left-1-w,["top","top_inline_start_corner"].includes(m)&&(C+=r.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(v+=Math.abs(r.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),T=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),N=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===N)&&(C+=1),T<=0&&(v+=1);const _=n.rowsRenderCalculator.startPosition,b=n.columnsRenderCalculator.startPosition,M=Math.abs(r.inlineStartOverlay.getScrollPosition()),A=r.topOverlay.getScrollPosition(),O=(0,u.getScrollbarWidth)(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(m)&&(I+=_-A),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=r.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-O}let x=t.offsetLeft;this.hot.isRtl()?(x=x>=0?g.getWidth()-t.offsetLeft:Math.abs(x),x+=b-M-o):["top","master","bottom"].includes(m)&&(x+=b-M);const P=(0,u.getComputedStyle)(this.TD,this.hot.rootWindow),L=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(P[L],10)>0?0:1,k=parseInt(P.borderTopWidth,10)>0?0:1,H=(0,u.outerWidth)(t)+D,F=(0,u.outerHeight)(t)+k,U=(0,u.hasVerticalScrollbar)(h)?O:0,V=(0,u.hasHorizontalScrollbar)(c)?O:0,B=this.hot.view.maximumVisibleElementWidth(x)-U+D;return{top:C,start:v,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(I)-V+k,23),width:H,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=f,(0,o.mixin)(f,l.default)},86446:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(23627);t.EDITOR_STATE=n.EDITOR_STATE,t.EDITOR_TYPE=n.EDITOR_TYPE,t.BaseEditor=n.BaseEditor},16571:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587);const i=t.EDITOR_TYPE="checkbox";class o extends n.BaseEditor{static get EDITOR_TYPE(){return i}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,s.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=o},73388:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16571);t.EDITOR_TYPE=n.EDITOR_TYPE,t.CheckboxEditor=n.CheckboxEditor},99588:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(22418)),o=n(r(16563)),a=r(64953),l=r(49587),u=r(76163),h=r(49223);r(26422);const c=t.EDITOR_TYPE="date",d="dateEditor";class f extends a.TextEditor{constructor(){super(...arguments),(0,s.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,s.default)(this,"parentDestroyed",!1),(0,s.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return c}init(){if("function"!=typeof i.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof o.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,l.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,l.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:d})}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.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(d),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),r=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),s=!!e&&(0,h.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new o.default(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(i.default),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,l.outerHeight)(this.TD)}px`;let u=this.hot.rootWindow.pageXOffset;u=this.hot.isRtl()?t.right-(0,l.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${u}px`,this.originalValue?(a=this.originalValue,(0,i.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(a,r),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),s||n||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,i.default)(a,r,!0).isValid()&&this.$datePicker.setMoment((0,i.default)(a,r),!0),s||n||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,u.deepExtend)(t,this.cellProperties.datePickerConfig);const r=t.onSelect,n=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!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,i.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),r&&r()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),n&&n()},t}}t.DateEditor=f},92090:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(99588);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DateEditor=n.DateEditor},72394:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(16478),i=n(r(54925));const o=t.EDITOR_TYPE="dropdown";class a extends s.AutocompleteEditor{static get EDITOR_TYPE(){return o}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,i.default.getSingleton().add("beforeValidate",(function(e,t,r){const n=this.getCellMeta(t,this.propToCol(r));n.editor===a&&void 0===n.strict&&(n.filter=!1,n.strict=!0)}))},28544:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(72394);t.EDITOR_TYPE=n.EDITOR_TYPE,t.DropdownEditor=n.DropdownEditor},11717:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),i=r(30369),o=r(76163),a=r(80940);const l="handsontableEditor",u=t.EDITOR_TYPE="handsontable";class h extends n.TextEditor{static get EDITOR_TYPE(){return u}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,s.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i);const a=this,l={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 r=this.getSourceData(t.row,t.col);void 0!==r&&a.setValue(r),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,o.extend)(l,i.handsontable),this.htOptions=l}beginEditing(e,t){const r=this.hot.getSettings().onBeginEditing;r&&!1===r()||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,r){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,r)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},r=(e,t)=>{const r=this.htEditor;if(void 0!==e&&(e<0||r.flipped&&e>r.countRows()-1?r.deselectCell():r.selectCell(e,0),r.getData().length))return t.preventDefault(),(0,i.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,s;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(s=t.getSelectedLast()[0],n=Math.max(0,s-1)):(s=t.getSelectedLast()[0],n=s-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,s;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;s=t.getSelectedLast()[0],n=Math.min(e,s+1)}}else n=0;return r(n,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.HandsontableEditor=h},12540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(11717);t.EDITOR_TYPE=n.EDITOR_TYPE,t.HandsontableEditor=n.HandsontableEditor},5944:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,p.registerEditor)(s.BaseEditor),(0,p.registerEditor)(n.AutocompleteEditor),(0,p.registerEditor)(i.CheckboxEditor),(0,p.registerEditor)(o.DateEditor),(0,p.registerEditor)(a.DropdownEditor),(0,p.registerEditor)(l.HandsontableEditor),(0,p.registerEditor)(u.NumericEditor),(0,p.registerEditor)(h.PasswordEditor),(0,p.registerEditor)(c.SelectEditor),(0,p.registerEditor)(d.TextEditor),(0,p.registerEditor)(f.TimeEditor)};var n=r(16478);t.AutocompleteEditor=n.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=n.EDITOR_TYPE;var s=r(86446);t.BaseEditor=s.BaseEditor,t.BASE_EDITOR=s.EDITOR_TYPE;var i=r(73388);t.CheckboxEditor=i.CheckboxEditor,t.CHECKBOX_EDITOR=i.EDITOR_TYPE;var o=r(92090);t.DateEditor=o.DateEditor,t.DATE_EDITOR=o.EDITOR_TYPE;var a=r(28544);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=r(12540);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var u=r(6618);t.NumericEditor=u.NumericEditor,t.NUMERIC_EDITOR=u.EDITOR_TYPE;var h=r(50647);t.PasswordEditor=h.PasswordEditor,t.PASSWORD_EDITOR=h.EDITOR_TYPE;var c=r(71177);t.SelectEditor=c.SelectEditor,t.SELECT_EDITOR=c.EDITOR_TYPE;var d=r(64953);t.TextEditor=d.TextEditor,t.TEXT_EDITOR=d.EDITOR_TYPE;var f=r(76219);t.TimeEditor=f.TimeEditor,t.TIME_EDITOR=f.EDITOR_TYPE;var p=r(16691);t.registerEditor=p.registerEditor,t.RegisteredEditor=p.RegisteredEditor,t._getEditorInstance=p._getEditorInstance,t.getEditor=p.getEditor,t.getEditorInstance=p.getEditorInstance,t.getRegisteredEditorNames=p.getRegisteredEditorNames,t.getRegisteredEditors=p.getRegisteredEditors,t.hasEditor=p.hasEditor},6618:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(43894);t.EDITOR_TYPE=n.EDITOR_TYPE,t.NumericEditor=n.NumericEditor},43894:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s=t.EDITOR_TYPE="numeric";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}}t.NumericEditor=i},50647:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(67925);t.EDITOR_TYPE=n.EDITOR_TYPE,t.PasswordEditor=n.PasswordEditor},67925:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953),s=r(49587),i=r(66862);const o=t.EDITOR_TYPE="password";class a extends n.TextEditor{static get EDITOR_TYPE(){return o}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,this.hot.getSettings().ariaTags&&(0,s.setAttribute)(this.TEXTAREA,[(0,i.A11Y_HIDDEN)()]),(0,s.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=a},16691:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.RegisteredEditor=d,t.getEditorInstance=t._getEditorInstance=function(e,t){let r;if("function"==typeof e)o.get(e)||f(null,e),r=o.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');r=l(e)}if(!r)throw Error(`No editor registered under name "${e}"`);return r.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!u(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=f,r(91683);var s=n(r(54925)),i=n(r(31056));const o=new WeakMap,{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=(0,i.default)("editors");function d(e){const t={},r=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new r(e)),t[e.guid]},s.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function f(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const r=new d(t);"string"==typeof e&&a(e,r),o.set(t,r)}t.getRegisteredEditors=c,t.getRegisteredEditorNames=h,t.hasEditor=u},71177:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51692);t.EDITOR_TYPE=n.EDITOR_TYPE,t.SelectEditor=n.SelectEditor},51692:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(86446),s=r(49587),i=r(76163);const o="ht_editor_visible",a="selectEditor",l=t.EDITOR_TYPE="select";class u extends n.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",(0,s.addClass)(this.select,"htSelectEditor"),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,s.hasClass)(this.select,o)&&(0,s.removeClass)(this.select,o),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,r,n,o,a){super.prepare(e,t,r,n,o,a);const l=this.cellProperties.selectOptions;let u;u="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,s.empty)(this.select),(0,i.objectEach)(u,((e,t)=>{const r=this.hot.rootDocument.createElement("OPTION");r.value=t,(0,s.fastInnerHTML)(r,e),this.select.appendChild(r)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let r=0,n=e.length;r<n;r++)t[e[r]]=e[r];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!==n.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:r,height:i}=this.getEditedCellRect(),a=this.select.style;a.height=`${i}px`,a.width=`${r}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,s.addClass)(this.select,o)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),r=e.getContext("grid"),n={group:a};!1!==this.isInFullEditMode()&&t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:r,callback:()=>{}},{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)}}],n)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=u},360:(e,t,r)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const r=(0,n.getCaretPosition)(t),s=t.value.split("\n");let i=r,o=0;for(let t=0;t<s.length;t++){const n=s[t];0!==t&&(o+=s[t-1].length+1);const a=o+n.length;if("home"===e?i=o:"end"===e&&(i=a),r<=a)break}(0,n.setCaretPosition)(t,i)};var n=r(49587)},64953:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(1219);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TextEditor=n.TextEditor},1219:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(86446),o=n(r(57340)),a=r(78498),l=r(49587),u=r(57691),h=r(36113),c=r(97639),d=r(80940),f=r(23627),p=r(360),g=r(66862);const m="ht_editor_hidden",E="textEditor",w=t.EDITOR_TYPE="text";class y extends i.BaseEditor{static get EDITOR_TYPE(){return w}constructor(e){super(e),(0,s.default)(this,"eventManager",new o.default(this)),(0,s.default)(this,"autoResize",(0,h.createInputElementResizer)(this.hot.rootDocument)),(0,s.default)(this,"TEXTAREA",void 0),(0,s.default)(this,"textareaStyle",void 0),(0,s.default)(this,"TEXTAREA_PARENT",void 0),(0,s.default)(this,"textareaParentStyle",void 0),(0,s.default)(this,"layerClass",void 0),this.eventManager=new o.default(this),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.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,r,n,s,o){const a=this.state;if(super.prepare(e,t,r,n,s,o),!o.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=o;e&&(this.TEXTAREA.value=""),a!==i.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===i.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,g.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,g.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,a.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="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,u.rangeEach)(e.length-1,(r=>{const n=e[r];if((0,l.hasClass)(n,"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!==i.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:r,width:n,maxWidth:s,height:o,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${r}px`,this.showEditableElement();const u=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const h=(0,l.getComputedStyle)(this.TEXTAREA),c=parseInt(h.paddingLeft,10)+parseInt(h.paddingRight,10),d=parseInt(h.paddingTop,10)+parseInt(h.paddingBottom,10),f=n-c,p=o-d,g=s-c,m=a-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(f,g),minHeight:Math.min(p,m),maxWidth:g,maxHeight:m},!0)}bindEvents(){(0,a.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===i.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===i.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),r=e.getContext("grid"),n={runOnlyIf:()=>(0,c.isDefined)(this.hot.getSelected()),group:E},s=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"],["PageUp"],["PageDown"]],forwardToContext:r,callback:()=>{}},{keys:[["Control","Enter"]],callback:()=>(s(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(s(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(s(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[r]=t;(0,p.updateCaretPosition)(r,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[r]=t;(0,p.updateCaretPosition)(r,this.TEXTAREA)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(d.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(E),e.removeShortcutsByGroup(f.SHORTCUTS_GROUP_EDITOR)}}t.TextEditor=y},76219:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(98744);t.EDITOR_TYPE=n.EDITOR_TYPE,t.TimeEditor=n.TimeEditor},98744:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64953);const s=t.EDITOR_TYPE="time";class i extends n.TextEditor{static get EDITOR_TYPE(){return s}prepare(e,t,r,n,s,i){super.prepare(e,t,r,n,s,i),this.TEXTAREA.dir="ltr"}}t.TimeEditor=i},57340:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getListenersCounter=function(){return o},r(63517);var s=n(r(93231)),i=r(30369);let o=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,s.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(e){r.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,i.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:r,callbackProxy:s,options:n,eventManager:this}),e.addEventListener(t,s,n),o+=1,()=>{this.removeEventListener(e,t,r)}}removeEventListener(e,t,r){let n,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this.context.eventListeners.length;for(;i;)if(i-=1,n=this.context.eventListeners[i],n.event===t&&n.element===e){if(r&&r!==n.callback)continue;if(s&&n.eventManager!==this)continue;this.context.eventListeners.splice(i,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),o-=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 r=this.context.eventListeners[t];e&&r.eventManager!==this||(this.context.eventListeners.splice(t,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),o-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let r=e.document,n=e;r||(r=e.ownerDocument?e.ownerDocument:e,n=r.defaultView);const s={bubbles:!0,cancelable:"mousemove"!==t,view:n,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let i;r.createEvent?(i=r.createEvent("MouseEvents"),i.initMouseEvent(t,s.bubbles,s.cancelable,s.view,s.detail,s.screenX,s.screenY,s.clientX,s.clientY,s.ctrlKey,s.altKey,s.shiftKey,s.metaKey,s.button,s.relatedTarget||r.body.parentNode)):i=r.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(`on${t}`,i)}}},14864:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(31990),a=r(49587),l=r(46029);function u(e,t){c(e,t),t.add(e)}function h(e,t,r){c(e,t),t.set(e,r)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const f=Object.freeze({CELL:"cell",MIXED:"mixed"});var p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,w=new WeakMap,y=new WeakSet,C=new WeakSet,v=new WeakSet,S=new WeakSet;function R(e){var t;const r=null===(t=(0,s.default)(this,p).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r||!(0,s.default)(this,p).selection.isCellVisible(r))return void e(null);const n=(0,s.default)(this,p).getCell(r.row,r.col,!0);null===n?(0,s.default)(this,p).addHookOnce("afterScroll",(()=>{e((0,s.default)(this,p).getCell(r.row,r.col,!0))})):e(n)}function T(){d(this,y,R).call(this,(e=>{const{activeElement:t}=(0,s.default)(this,p).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function N(){d(this,y,R).call(this,(e=>{this.getFocusMode()===f.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function _(e){e.imeFastEdit&&this.getFocusMode()!==f.MIXED?this.setFocusMode(f.MIXED):e.imeFastEdit||this.getFocusMode()===f.CELL||this.setFocusMode(f.CELL)}t.FocusManager=class{constructor(e){var t=this;u(this,S),u(this,v),u(this,C),u(this,y),h(this,p,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:50}),h(this,E,{writable:!0,value:null}),h(this,w,{writable:!0,value:new Map});const r=e.getSettings();(0,i.default)(this,p,e),(0,i.default)(this,g,r.imeFastEdit?f.MIXED:f.CELL),(0,s.default)(this,p).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,S,_).call(t,...r)})),(0,s.default)(this,p).addHook("afterSelection",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,C,T).call(t,...r)})),(0,s.default)(this,p).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return d(t,v,N).call(t,...r)}))}getFocusMode(){return(0,s.default)(this,g)}setFocusMode(e){Object.values(f).includes(e)?(0,i.default)(this,g,e):(0,o.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,s.default)(this,m)}setRefocusDelay(e){(0,i.default)(this,m,e)}setRefocusElementGetter(e){(0,i.default)(this,E,e)}getRefocusElement(){return"function"==typeof(0,s.default)(this,E)?(0,s.default)(this,E).call(this):null===(e=(0,s.default)(this,p).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,r;const n=null===(t=(0,s.default)(this,p).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n)return;let i=(0,s.default)(this,p).runHooks("modifyFocusedElement",n.row,n.col,e);i instanceof HTMLElement||(i=e),!i||null!==(r=(0,s.default)(this,p).getActiveEditor())&&void 0!==r&&r.isOpened()||i.focus({preventScroll:!0})};e?t(e):d(this,y,R).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,s.default)(this,m);const r=this.getRefocusElement();!(0,s.default)(this,p).getSettings().imeFastEdit||null!==(e=(0,s.default)(this,p).getActiveEditor())&&void 0!==e&&e.isOpened()||!r||((0,s.default)(this,w).has(t)||(0,s.default)(this,w).set(t,(0,l.debounce)((()=>{r.select()}),t)),(0,s.default)(this,w).get(t)())}}},66862:(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_ROWGROUP=()=>["role","rowgroup"];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_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]},98887:(e,t,r)=>{"use strict";function n(e,t,r,n){let s=-1,i=e,o=r;Array.isArray(e)||(i=Array.from(e));const a=i.length;for(n&&a&&(s+=1,o=i[s]),s+=1;s<a;)o=t(o,i[s],s,i),s+=1;return o}function s(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length;for(;r<s&&!1!==t(n[r],r,n);)r+=1;return e}function i(e){return n(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return i(e)/e.length},t.arrayEach=s,t.arrayFilter=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,i=[];let o=-1;for(;r<s;){const e=n[r];t(e,r,n)&&(o+=1,i[o]=e),r+=1}return i},t.arrayFlatten=function e(t){return n(t,((t,r)=>t.concat(Array.isArray(r)?e(r):r)),[])},t.arrayMap=function(e,t){let r=0,n=e;Array.isArray(e)||(n=Array.from(e));const s=n.length,i=[];let o=-1;for(;r<s;){const e=n[r];o+=1,i[o]=t(e,r,n),r+=1}return i},t.arrayMax=function(e){return n(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return n(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=n,t.arraySum=i,t.arrayUnique=function(e){const t=[];return s(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const r=t.length;let n=0;for(;n<r;)e.push(t[n]),n+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t];let o=n;return s(i,(e=>{o=o.filter((t=>!e.includes(t)))})),o},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t];let o=n;return s(i,(e=>{o=o.filter((t=>e.includes(t)))})),o},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[n,...i]=[...t],o=new Set(n);return s(i,(e=>{s(e,(e=>{o.has(e)||o.add(e)}))})),Array.from(o)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const r=e.length,n=e[0].length;for(let s=0;s<r;s++)for(let r=0;r<n;r++)t[r]||(t[r]=[]),t[r][s]=e[s][r];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 r=0;for(;r<t;)e[r]=[e[r]],r+=1},r(63517)},78498:(e,t,r)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return o.chrome.value},t.isChromeWebKit=function(){return o.chromeWebKit.value},t.isEdge=function(){return o.edge.value},t.isEdgeWebKit=function(){return o.edgeWebKit.value},t.isFirefox=function(){return o.firefox.value},t.isFirefoxWebKit=function(){return o.firefoxWebKit.value},t.isIOS=function(){return a.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value},t.isLinuxOS=function(){return a.linux.value},t.isMacOS=function(){return a.mac.value},t.isMobileBrowser=function(){return o.mobile.value},t.isSafari=function(){return o.safari.value},t.isWindowsOS=function(){return a.win.value},t.setBrowserMeta=l,t.setPlatformMeta=u;var n=r(76163),s=r(6022);const i=e=>{const t={value:!1,test:(r,n)=>{t.value=e(r,n)}};return t},o={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},a={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((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,n.objectEach)(o,(r=>{let{test:n}=r;n(e,t)}))}function u(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,n.objectEach)(a,(t=>{let{test:r}=t;r(e)}))}(0,s.isCSR)()&&(l(),u())},31990:(e,t,r)=>{"use strict";t.__esModule=!0,t.error=function(){(0,n.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,n.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,n.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,n.isDefined)(console)&&console.warn(...arguments)};var n=r(97639)},56020:(e,t,r)=>{"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,n.isObject)(e[0])&&(t=(0,n.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const r=[];let n;for(let s=0;s<e;s++){n=[];for(let e=0;e<t;e++)n.push("");r.push(n)}return r},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 r=[];let n,s;for(n=0;n<e;n++){const e=[];for(s=0;s<t;s++)e.push(o(s)+(n+1));r.push(e)}return r},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 r=[];let n,s;for(n=0;n<e;n++){const e={};for(s=0;s<t;s++)e[`prop${s}`]=o(s)+(n+1);r.push(e)}return r},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=e;const n=[];Array.isArray(e)&&Array.isArray(e[0])||(r=[e]);return r.forEach(((e,r)=>{Array.isArray(e)?e.forEach(((e,s)=>{n.push([r+t,s,e])})):Object.keys(e).forEach((s=>{n.push([r+t,s,e[s]])}))})),n},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 r=0,n=e.length-1;r<e.length;r+=1,n-=1)t+=i**n*(s.indexOf(e[r])+1);return t-=1,t},t.spreadsheetColumnLabel=o,r(63517);var n=r(76163);const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ",i=s.length;function o(e){let t,r=e+1,n="";for(;r>0;)t=(r-1)%i,n=String.fromCharCode(65+t)+n,r=parseInt((r-t)/i,10);return n}},46680:(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}},49587:(e,t,r)=>{"use strict";t.__esModule=!0,t.addClass=u,t.addEvent=function(e,t,r){e.addEventListener(t,r,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=o,t.closestDown=function(e,t,r){const n=[];let s=e;for(;s&&(s=o(s,t,r),s&&(!r||r.contains(s)));)n.push(s),s=s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s.host:s.parentNode;const i=n.length;return i?n[i-1]:null},t.empty=d,t.fastInnerHTML=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];f.test(t)?e.innerHTML=r?(0,n.sanitize)(t):t:p(e,t)},t.fastInnerText=p,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=E,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=i,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=-1,n=null,s=e;for(;null!==s;){if(r===t){n=s;break}s.host&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE?s=s.host:(r+=1,s=s.parentNode)}return n},t.getParentWindow=function(e){return i(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 g(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,r=t?t.defaultView:void 0;t||(t=e.document?e.document:e,r=t.defaultView);const n=["auto","scroll"];let s=e.parentNode;for(;s&&s.style&&t.body!==s;){let{overflow:e,overflowX:t,overflowY:i}=s.style;if([e,t,i].includes("scroll"))return s;if(({overflow:e,overflowX:t,overflowY:i}=r.getComputedStyle(s)),n.includes(e)||n.includes(t)||n.includes(i))return s;if(s.clientHeight<=s.scrollHeight+1&&(n.includes(i)||n.includes(e)))return s;if(s.clientWidth<=s.scrollWidth+1&&(n.includes(t)||n.includes(e)))return s;s=s.parentNode}return r},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 r=e.createElement("div");r.style.boxSizing="content-box",r.style.height="150px",r.style.left="0px",r.style.overflow="hidden",r.style.position="absolute",r.style.top="0px",r.style.width="200px",r.style.visibility="hidden",r.appendChild(t),(e.body||e.documentElement).appendChild(r);const n=t.offsetWidth;r.style.overflow="scroll";let s=t.offsetWidth;n===s&&(s=r.clientWidth);return(e.body||e.documentElement).removeChild(r),n-s}(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 r="";e.getSelection?r=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(r=t.selection.createRange().text);return r},t.getStyle=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===r)return"width"===t?`${r.innerWidth}px`:"height"===t?`${r.innerHeight}px`:void 0;const n=e.style[t];if(""!==n&&void 0!==n)return n;const s=E(e,r);if(""!==s[t]&&void 0!==s[t])return s[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,r=t.defaultView;let n=e.parentNode;for(;n&&n.style&&t.body!==n;){if("visible"!==n.style.overflow&&""!==n.style.overflow)return n;const e=E(n,r),t=["scroll","hidden","auto"],s=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),o=e.getPropertyValue("overflow-x");if(t.includes(s)||t.includes(i)||t.includes(o))return n;n=n.parentNode}return r},t.getWindowScrollLeft=m,t.getWindowScrollTop=g,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,r=e;if(r.previousSibling)for(;r=r.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 r=e.parentNode,n=[];"string"==typeof t?n=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):n.push(t);for(;null!==r;){if(n.indexOf(r)>-1)return!0;r=r.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=y,t.isOutsideInput=C,t.isThisHotChild=function(e,t){const r=e.closest(".handsontable");return!!r&&(r.parentNode===t||r===t)},t.isVisible=function e(t){const r=t.ownerDocument.documentElement;let n=t;for(;n!==r;){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return e(n.host.impl);if(n.host)return e(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===E(n).display)return!1;n=n.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=v,t.matchesCSSRules=function(e,t){const{selectorText:r}=t;let n=!1;t.type===CSSRule.STYLE_RULE&&r&&(e.msMatchesSelector?n=e.msMatchesSelector(r):e.matches&&(n=e.matches(r)));return n},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((r,n)=>{r.forEach((r=>{r.isIntersecting&&null!==e.offsetParent&&(t(),n.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,r=t.defaultView,n=t.documentElement;let s,i,o,a=e;s=a.offsetLeft,i=a.offsetTop,o=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)s+=a.offsetLeft,i+=a.offsetTop,o=a;o&&"fixed"===o.style.position&&(s+=r.pageXOffset||n.scrollLeft,i+=r.pageYOffset||n.scrollTop);return{left:s,top:i}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,r){const n=r.parentElement.querySelector(`.ht_clone_${e}`);return n?n.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:r,regexes:n}=l(t,!0);r.forEach((t=>{""!==t&&e.removeAttribute(t)})),n.forEach((t=>{e.getAttributeNames().forEach((r=>{t.test(r)&&e.removeAttribute(r)}))}))},t.removeClass=h,t.removeContentEditableFromElementAndDeselect=S,t.removeEvent=function(e,t,r){e.removeEventListener(t,r,!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 r=t.childNodes;for(let t=r.length-1;t>=0;t--)e(r[t])}},t.renderMockCell=function(e,t,r){const n=e.createElement("td");return r.splice(1,0,n),t.call(r.instance,...r),n},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v(e,r),t(),S(e,r)},t.selectElementIfAllowed=function(e){C(e.ownerDocument.activeElement)||e.select()},t.setAttribute=c,t.setCaretPosition=function(e,t,r){void 0===r&&(r=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,r)}catch(n){const s=e.parentNode,i=s.style.display;s.style.display="block",e.setSelectionRange(t,r),s.style.display=i}}},t.setOverlayPosition=function(e,t,r){e.style.transform=`translate3d(${t},${r},0)`},r(63517),r(91683);var n=r(37913),s=r(66862);function i(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:n,DOCUMENT_FRAGMENT_NODE:s}=Node;let i=e;for(;null!=i&&i!==r;){const{nodeType:e,nodeName:r}=i;if(e===n&&(t.includes(r)||t.includes(i)))return i;const{host:o}=i;i=o&&e===s?o:i.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const r=[],n=[];return n.push(...e.filter((e=>{const n=e instanceof RegExp;return n&&t&&r.push(e),!n}))),t?{regexFree:n,regexes:r}:n}function u(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function h(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:r,regexes:n}=l(t,!0);r=a(r),r.length>0&&e.classList.remove(...r),n.forEach((t=>{e.classList.forEach((r=>{t.test(r)&&e.classList.remove(r)}))}))}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,r]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function d(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const f=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function p(e,t){const r=e.firstChild;r&&3===r.nodeType&&null===r.nextSibling?r.textContent=t:(d(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function g(){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 E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let w;function y(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function C(e){return y(e)&&!1===e.hasAttribute("data-hot-input")}function v(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=e.ownerDocument,i=n.createRange(),o=n.defaultView.getSelection();c(e,"contenteditable",!0),r&&c(e,...(0,s.A11Y_HIDDEN)()),t&&u(e,"invisibleSelection"),i.selectNodeContents(e),o.removeAllRanges(),o.addRange(i)}function S(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),r.removeAllRanges(),t&&h(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},30369:(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 r={x:e.offsetX,y:e.offsetY};let n=e.target;if(!(t instanceof HTMLElement)||n!==t&&n.contains(t))return r;for(;n!==t;)r.x+=n.offsetLeft,r.y+=n.offsetTop,n=n.offsetParent;return r},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},6022:(e,t)=>{"use strict";let r;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(r)return r;r="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 r},t.isCSR=function(){return"undefined"!=typeof window},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},46029:(e,t,r)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];const a=n.concat(i);let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.curryRight=function(e){const t=e.length;return function r(n){return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];const a=n.concat(i.reverse());let l;return l=a.length>=t?e.apply(this,a):r(a),l}}([])},t.debounce=function(e){let t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=null;return function(){for(var s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return n&&clearTimeout(n),n=setTimeout((()=>{t=e.apply(this,i)}),r),t}},t.fastCall=function(e,t,r,n,i,o,a,l){if((0,s.isDefined)(l))return e.call(t,r,n,i,o,a,l);if((0,s.isDefined)(a))return e.call(t,r,n,i,o,a);if((0,s.isDefined)(o))return e.call(t,r,n,i,o);if((0,s.isDefined)(i))return e.call(t,r,n,i);if((0,s.isDefined)(n))return e.call(t,r,n);if((0,s.isDefined)(r))return e.call(t,r);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return e.apply(this,r.concat(n))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const[s,...i]=t;return function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,n.arrayReduce)(i,((e,t)=>t(e)),s.apply(this,t))}},t.throttle=i,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const n=i(e,t);let s=r;function o(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return s?(s-=1,e.apply(this,r)):n.apply(this,r)}return o.clearHits=function(){s=r},o};var n=r(98887),s=r(97639);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=0;const n={lastCallThrottled:!0};let s=null;return function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];const l=Date.now();let u=!1;n.lastCallThrottled=!0,r||(r=l,u=!0);const h=t-(l-r);return u?(n.lastCallThrottled=!1,e.apply(this,o)):(s&&clearTimeout(s),s=setTimeout((()=>{n.lastCallThrottled=!1,e.apply(this,o),r=0,s=void 0}),h)),n}}},97639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const r=!a(e),n="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="0.0.0-next-817afa4-20240202";let o,y="invalid",C="invalid";const v=function(e){let t=[][l],r=t;if(e[l]!==d("Z"))return!1;for(let t="",n="B<H4P+".split(""),s=d(n.shift());s;s=d(n.shift()||"A"))--s<""[l]?r|=(h(`${h(u(t)+(u(c(e,Math.abs(s),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=c(e,s,s?1===n[l]?9:8:6);return r===t}(e=f(e||""));if(r||n||v)if(v){const t=(0,s.default)("16/01/2024","DD/MM/YYYY"),r=Math.floor(t.toDate().getTime()/864e5),n=p(e);o=(0,s.default)(864e5*(n+1),"x").format("MMMM DD, YYYY"),r>n?(y="expired",C="expired"):(y="valid",C="valid")}else n?(y="non_commercial",C="valid"):(y="invalid",C="invalid");else y="missing",C="missing";g()&&(y="valid",C="valid");if(!m&&"valid"!==y){E[y]({keyValidityDate:o,hotVersion:i})&&console["non_commercial"===y?"info":"warn"](E[y]({keyValidityDate:o,hotVersion:i})),m=!0}if("valid"!==C&&t.parentNode){if(w[C]({keyValidityDate:o,hotVersion:i})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=w[C]({keyValidityDate:o,hotVersion:i}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=o,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 s=n(r(22418)),i=r(45561);function o(e){return void 0===e}function a(e){return null===e||""===e||o(e)}const l="length",u=e=>parseInt(e,16),h=e=>parseInt(e,10),c=(e,t,r)=>e.substr(t,r),d=e=>e.codePointAt(0)-65,f=e=>`${e}`.replace(/\-/g,""),p=e=>u(c(f(e),u("12"),d("F")))/(u(c(f(e),d("B"),~~![][l]))||9),g=()=>"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 E={invalid:()=>i.toSingleLine`
|
934
934
|
The license key for Handsontable is invalid.\x20
|
935
935
|
If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:r}=e;return i.toSingleLine`
|
936
936
|
The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
|
@@ -962,13 +962,13 @@ s.version="2.29.4",i(Xr),s.fn=ui,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=hi,s.
|
|
962
962
|
before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var n=r(97639),s=r(76163),i=r(31990),o=r(45561)},21709:(e,t,r)=>{"use strict";var n=r(73203);var s=k(r(73421));s.CellCoords,s.CellRange;var i,o,a,l,u,h=r(87396),c=k(r(57340)),d=r(41789),f=n(r(59622)),p=n(r(46998)),g=k(r(65795)),m=k(r(98887)),E=k(r(78498)),w=k(r(56020)),y=k(r(46680)),C=k(r(6022)),v=k(r(46029)),S=k(r(97639)),R=k(r(57691)),T=k(r(76163)),N=k(r(37913)),_=k(r(49223)),b=k(r(49587)),M=k(r(30369)),A=r(16691),O=r(36996),I=r(59340),x=r(79321),P=r(5280),L=r(33997);function D(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(D=function(e){return e?r:t})(e)}function k(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=D(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(0,h.registerAllModules)(),(0,f.default)(s.default),s.default.__GhostTable=p.default,s.default._getListenersCounter=c.getListenersCounter,s.default._getRegisteredMapsCounter=d.getRegisteredMapsCounter,s.default.EventManager=c.default;const H=[m,E,w,y,C,v,S,R,T,N,_,g],F=[b,M];s.default.helper={},s.default.dom={},m.arrayEach(H,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(s.default.helper[t]=e[t])}))})),m.arrayEach(F,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(s.default.dom[t]=e[t])}))})),s.default.cellTypes=null!==(i=s.default.cellTypes)&&void 0!==i?i:{},m.arrayEach((0,x.getRegisteredCellTypeNames)(),(e=>{s.default.cellTypes[e]=(0,x.getCellType)(e)})),s.default.cellTypes.registerCellType=x.registerCellType,s.default.cellTypes.getCellType=x.getCellType,s.default.editors=null!==(o=s.default.editors)&&void 0!==o?o:{},m.arrayEach((0,A.getRegisteredEditorNames)(),(e=>{s.default.editors[`${N.toUpperCaseFirst(e)}Editor`]=(0,A.getEditor)(e)})),s.default.editors.registerEditor=A.registerEditor,s.default.editors.getEditor=A.getEditor,s.default.renderers=null!==(a=s.default.renderers)&&void 0!==a?a:{},m.arrayEach((0,O.getRegisteredRendererNames)(),(e=>{const t=(0,O.getRenderer)(e);"base"===e&&(s.default.renderers.cellDecorator=t),s.default.renderers[`${N.toUpperCaseFirst(e)}Renderer`]=t})),s.default.renderers.registerRenderer=O.registerRenderer,s.default.renderers.getRenderer=O.getRenderer,s.default.validators=null!==(l=s.default.validators)&&void 0!==l?l:{},m.arrayEach((0,I.getRegisteredValidatorNames)(),(e=>{s.default.validators[`${N.toUpperCaseFirst(e)}Validator`]=(0,I.getValidator)(e)})),s.default.validators.registerValidator=I.registerValidator,s.default.validators.getValidator=I.getValidator,s.default.plugins=null!==(u=s.default.plugins)&&void 0!==u?u:{},m.arrayEach((0,P.getPluginsNames)(),(e=>{s.default.plugins[e]=(0,P.getPlugin)(e)})),s.default.plugins[`${N.toUpperCaseFirst(L.BasePlugin.PLUGIN_KEY)}Plugin`]=L.BasePlugin,s.default.plugins.registerPlugin=P.registerPlugin,s.default.plugins.getPlugin=P.getPlugin;t.default=s.default},94136:(e,t,r)=>{"use strict";t.__esModule=!0,r(63517);var n=r(98887),s=r(76163);const i={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){(0,n.arrayEach)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,s.objectEach)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,s.defineGetter)(i,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});t.default=i},63806:(e,t,r)=>{"use strict";t.__esModule=!0,r(63517);var n=r(76163),s=r(46029);const i={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,r,n,i,o,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let u=0;u<l;u++)(0,s.fastCall)(this._localHooks[e][u],this,t,r,n,i,o,a)}},clearLocalHooks(){return this._localHooks={},this}};(0,n.defineGetter)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});t.default=i},54925:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(98887),o=r(76163),a=r(37913),l=r(31990),u=r(45561),h=r(46029);const c=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],d=u.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
|
963
963
|
Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
|
964
964
|
learn about the migration path.`,f=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]);class g{static getSingleton(){return m}constructor(){(0,s.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,i.arrayEach)(c,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,i.arrayEach)(t,(t=>this.add(e,t,r)));else{f.has(e)&&(0,l.warn)((0,a.substitute)(d,{hookName:e,removedInVersion:f.get(e)})),p.has(e)&&(0,l.warn)(p.get(e));const n=this.getBucket(r);if(void 0===n[e]&&(this.register(e),n[e]=[]),t.skip=!1,-1===n[e].indexOf(t)){let r=!1;t.initialHook&&(0,i.arrayEach)(n[e],((s,i)=>{if(s.initialHook)return n[e][i]=t,r=!0,!1})),r||n[e].push(t)}}return this}once(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,i.arrayEach)(t,(t=>this.once(e,t,r))):(t.runOnce=!0,this.add(e,t,r))}remove(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const n=this.getBucket(r);return void 0!==n[e]&&n[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=this.getBucket(t);return!(void 0===r[e]||!r[e].length)}run(e,t,r,n,s,i,o,a){{const l=this.globalBucket[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c]),c+=1}}{const l=this.getBucket(e)[t],u=l?l.length:0;let c=0;if(u)for(;c<u;){if(!l[c]||l[c].skip){c+=1;continue}const u=(0,h.fastCall)(l[c],e,r,n,s,i,o,a);void 0!==u&&(r=u),l[c]&&l[c].runOnce&&this.remove(t,l[c],e),c+=1}}return r}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,o.objectEach)(this.getBucket(e),((e,t,r)=>r[t].length=0))}register(e){this.isRegistered(e)||c.push(e)}deregister(e){this.isRegistered(e)&&c.splice(c.indexOf(e),1)}isDeprecated(e){return p.has(e)||f.has(e)}isRegistered(e){return c.indexOf(e)>=0}getRegistered(){return c}}const m=new g;t.default=g},6671:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(33997),l=r(98887),u=r(6022),h=n(r(46998)),c=n(r(54925)),d=r(76163),f=r(57691),p=n(r(30240)),g=r(37913),m=r(94699),E=r(41789),w=r(97639);function y(e,t){C(e,t),t.add(e)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}c.default.getSingleton().register("modifyAutoColumnSizeSeed");const S=t.PLUGIN_KEY="autoColumnSize",R=t.PLUGIN_PRIORITY=10;var T=new WeakMap,N=new WeakSet,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet;class I extends a.BasePlugin{static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return R}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,r,n;super(e),y(this,O),y(this,A),y(this,M),y(this,b),y(this,_),y(this,N),(0,s.default)(this,"ghostTable",new h.default(this.hot)),(0,s.default)(this,"samplesGenerator",new p.default(((e,t)=>{const r=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(r)||this.hot.columnIndexMapper.isHidden(n))return!1;const s=this.hot.getCellMeta(e,t);let i="";s.spanned||(i=this.hot.getDataAtCell(e,t));let o="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(o=this.hot.runHooks("modifyAutoColumnSizeSeed",o,s,i)),{value:i,bundleSeed:o}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredColumns",0),(0,s.default)(this,"columnWidthsMap",new E.PhysicalIndexToValueMap),n={writable:!0,value:[]},C(t=this,r=T),r.set(t,n),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,D).call(this,e,t,r)))}isEnabled(){return!1!==this.hot.getSettings()[S]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[S];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return v(e,_,P).call(e,...r)})),this.addHook("beforeChangeRender",(e=>v(this,b,L).call(this,e))),this.addHook("afterFormulasValuesUpdate",(e=>v(this,O,H).call(this,e))),this.addHook("beforeViewRender",(e=>v(this,N,x).call(this,e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>v(this,A,k).call(this))),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,r)=>v(this,M,D).call(this,e,t,r)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),r=this.getLastVisibleColumn();-1!==t&&-1!==r&&this.calculateColumnsWidth({from:t,to:r},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;(0,f.rangeEach)(n.from,n.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),r||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,s);(0,l.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addColumn(t,r)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const r=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(r,t)}))}),!0),this.measuredColumns=n.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const r=this.hot.countCols()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,u.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+I.CALCULATION_STEP,r)},e),t=t+I.CALCULATION_STEP+1,t<r?n=(0,u.requestAnimationFrame)(s):((0,u.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize())},i=this.getSyncCalculationLimit();this.firstCalculation&&i>=0&&(this.calculateColumnsWidth({from:0,to:i},e),this.firstCalculation=!1,t=i+1),t<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[S],t=e&&(0,d.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,d.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[S];let t=I.SYNC_CALCULATION_LIMIT;const r=this.hot.countCols()-1;return(0,d.isObject)(e)&&(t=e.syncLimit,(0,g.isPercentValue)(t)?t=(0,f.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof r&&(r=Math.max(r,m.ViewportColumnsCalculator.DEFAULT_WIDTH))),r}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader();return(0,l.arrayReduce)(e,((e,t,r)=>{const n=(0,o.default)(this,T).length;return(n-1<r||(0,o.default)(this,T)[r]!==t)&&e.push(r),n-1<r?(0,o.default)(this,T).push(t):(0,o.default)(this,T)[r]=t,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,l.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function x(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function P(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}function L(e){const t=(0,l.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}function D(e,t,r){let n=e;return r&&(this.calculateColumnsWidth(t,void 0,!0),n=this.getColumnWidth(t,void 0,!1)),n}function k(){(0,i.default)(this,T,this.hot.getColHeader())}function H(e){const t=(0,l.arrayFilter)(e,(e=>{var t;return(0,w.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),r=(0,l.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(r)))}t.AutoColumnSize=I},87070:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(6671);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoColumnSize=n.AutoColumnSize},49737:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=r(98887),a=r(6022),l=r(49587),u=n(r(46998)),h=r(76163),c=r(57691),d=n(r(30240)),f=r(37913),p=r(41789);function g(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 m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const E=t.PLUGIN_KEY="autoRowSize",w=t.PLUGIN_PRIORITY=40;var y=new WeakSet,C=new WeakSet,v=new WeakSet,S=new WeakSet;class R extends i.BasePlugin{static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return w}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),g(this,S),g(this,v),g(this,C),g(this,y),(0,s.default)(this,"headerHeight",null),(0,s.default)(this,"ghostTable",new u.default(this.hot)),(0,s.default)(this,"samplesGenerator",new d.default(((e,t)=>{const r=this.hot.toPhysicalRow(e),n=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(r)||this.hot.columnIndexMapper.isHidden(n))return!1;if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let s;return e>=0?s=this.hot.getDataAtCell(e,t):-1===e&&(s=this.hot.getColHeader(t)),{value:s}}))),(0,s.default)(this,"firstCalculation",!0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"measuredRows",0),(0,s.default)(this,"rowHeightsMap",new p.PhysicalIndexToValueMap),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,r)=>m(this,C,N).call(this,e,t,r)))}isEnabled(){const e=this.hot.getSettings()[E];return!0===e||(0,h.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,v,_).call(e,...r)})),this.addHook("beforeChangeRender",(e=>m(this,S,b).call(this,e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>m(this,y,T).call(this,e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,r)=>m(this,C,N).call(this,e,t,r)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="number"==typeof e?{from:e,to:e}:e,s="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,s);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,c.rangeEach)(n.from,n.to,(e=>{if(r||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,s);(0,o.arrayEach)(t,(e=>{let[t,r]=e;return this.ghostTable.addRow(t,r)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=n.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const r=this.hot.countRows()-1;let n=null;this.inProgress=!0;const s=()=>{if(!this.hot)return(0,a.cancelAnimationFrame)(n),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+R.CALCULATION_STEP,r)},e),t=t+R.CALCULATION_STEP+1,t<r?n=(0,a.requestAnimationFrame)(s):((0,a.cancelAnimationFrame)(n),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},i=this.getSyncCalculationLimit();this.firstCalculation&&i>=0&&(this.calculateRowsHeight({from:0,to:i},e),this.firstCalculation=!1,t=i+1),t<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[E],t=e&&(0,h.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,r=e&&(0,h.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),r&&this.samplesGenerator.setAllowDuplicates(r)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[E];let t=R.SYNC_CALCULATION_LIMIT;const r=this.hot.countRows()-1;return(0,h.isObject)(e)&&(t=e.syncLimit,(0,f.isPercentValue)(t)?t=(0,c.valueAccordingPercent)(r,t):t>>=0),Math.min(t,r)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const r=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let n=t;return null!==r&&r>(t||0)&&(n=r),n}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:r}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,c.rangeEach)(Math.min(t,r),Math.max(t,r),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,o.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function T(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,r=this.getFirstVisibleRow(),n=this.getLastVisibleRow();if(-1!==r&&-1!==n){if(this.calculateRowsHeight({from:r,to:n},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function N(e,t,r){let n=e;return r&&(this.calculateRowsHeight(t,void 0,!0),n=this.getRowHeight(t)),n}function _(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}))}function b(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}t.AutoRowSize=R},12987:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(49737);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.AutoRowSize=n.AutoRowSize},31422:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=n(r(54925)),a=r(49587),l=r(98887),u=r(34488);function h(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 c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}o.default.getSingleton().register("modifyAutofillRange"),o.default.getSingleton().register("beforeAutofill"),o.default.getSingleton().register("afterAutofill");const d=t.PLUGIN_KEY="autofill",f=t.PLUGIN_PRIORITY=20,p=["fillHandle"];var g=new WeakSet,m=new WeakSet,E=new WeakSet,w=new WeakSet,y=new WeakSet;class C extends i.BasePlugin{constructor(){super(...arguments),h(this,y),h(this,w),h(this,E),h(this,m),h(this,g),(0,s.default)(this,"addingStarted",!1),(0,s.default)(this,"mouseDownOnCellCorner",!1),(0,s.default)(this,"mouseDragOutside",!1),(0,s.default)(this,"handleDraggedCells",0),(0,s.default)(this,"directions",[]),(0,s.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return f}static get SETTING_KEYS(){return[d,...p]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>c(this,m,S).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>c(this,g,v).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>c(this,E,R).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:r}=e.getTopStartCorner(),{row:n,col:s}=e.getBottomEndCorner(),i=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:r,endRow:n,endCol:s}]),o=[],a=[],u=[];return(0,l.arrayEach)(i,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===o.indexOf(t)&&o.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(o,(e=>{const t=[];(0,l.arrayEach)(a,(r=>{t.push(this.hot.getCopyableData(e,r))})),u.push(t)})),u}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,r,n]=this.hot.selection.highlight.getFill().getVisualCorners(),s=this.hot.getSelectedRangeLast(),i=s.getTopStartCorner(),o=s.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[i.row,i.col,o.row,o.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(i.row,e),Math.min(i.col,t),Math.max(o.row,r),Math.max(o.col,n)],a),{directionOfDrag:h,startOfDragCoords:c,endOfDragCoords:d}=(0,u.getDragDirectionAndRange)(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(c&&c.row>-1&&c.col>-1){const e=this.getSelectionData(),t=s.clone(),r=this.hot._createCellRange(c,c,d),n=this.hot.runHooks("beforeAutofill",e,t,r,h);if(!1===n)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let i=n;const o=n;if(["up","left"].indexOf(h)>-1&&(1!==o.length||0!==o[0].length))if(i=[],"up"===h){const e=d.row-c.row+1,t=e%o.length;for(let r=0;r<e;r++)i.push(o[(r+(o.length-t))%o.length])}else{const e=d.col-c.col+1,t=e%o[0].length;for(let r=0;r<o.length;r++){i.push([]);for(let n=0;n<e;n++)i[r].push(o[r][(n+(o[r].length-t))%o[r].length])}}this.hot.populateFromArray(c.row,c.col,i,d.row,d.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",i,t,r,h),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),r=t.getBottomEndCorner();let n=e;if(this.directions.includes(u.DIRECTIONS.vertical)&&this.directions.includes(u.DIRECTIONS.horizontal)){const s=t.getTopStartCorner();(r.col<=e.col||s.col>=e.col)&&(n=this.hot._createCellCoords(r.row,e.col)),(r.row<e.row||s.row>e.row)&&(n=this.hot._createCellCoords(e.row,r.col))}else if(this.directions.includes(u.DIRECTIONS.vertical))n=this.hot._createCellCoords(e.row,r.col);else{if(!this.directions.includes(u.DIRECTIONS.horizontal))return;n=this.hot._createCellCoords(r.row,e.col)}return this.reduceSelectionAreaIfNeeded(n)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),r=this.hot.countRows();e[2]<r-1&&t[2]===r-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),r=this.hot.countRows();let n;for(let s=e[2]+1;s<r;s++){for(let r=e[1];r<=e[3];r++){if(t[s][r])return-1}const r=t[s][e[1]-1],i=t[s][e[3]+1];(r||i)&&(n=s)}return n}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,r=(0,a.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,a.outerHeight)(this.hot.table),n=(0,a.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,a.outerWidth)(this.hot.table);return e.clientY>r&&e.clientX<=n}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>c(this,w,T).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>c(this,y,N).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,u.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function v(){this.selectAdjacent()&&this.fillIn()}function S(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function R(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function T(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function N(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=C},56996:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31422);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Autofill=n.Autofill},34488:(e,t,r)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,r){let n,s,i;t[0]===e[0]&&t[1]<e[1]?(i="left",n=r(t[0],t[1]),s=r(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(i="right",n=r(t[0],e[3]+1),s=r(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(i="up",n=r(t[0],t[1]),s=r(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(i="down",n=r(e[2]+1,t[1]),s=r(t[2],t[3]));n&&n.normalize();s&&s.normalize();return{directionOfDrag:i,startOfDragCoords:n,endOfDragCoords:s}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(i),t.autoInsertRow=!0):(0,n.isObject)(e)?((0,s.isDefined)(e.autoInsertRow)?e.direction===i.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,s.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(i)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var n=r(76163),s=r(97639);const i=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},46462:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=n(r(42538)),o=r(76163),a=r(98887),l=r(5280),u=r(79321),h=r(16691),c=r(36996),d=r(59340),f=n(r(57340));function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}const g=new Map([["plugin",l.hasPlugin],["cell-type",u.hasCellType],["editor",h.hasEditor],["renderer",c.hasRenderer],["validator",d.hasValidator]]),m=t.PLUGIN_KEY="base",E=[];let w=null;var y=new WeakMap,C=new WeakSet;function v(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let r=0;r<t.length;r++)if(void 0!==e[t[r]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return m}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,r;p(t=this,r=C),r.add(t),(0,s.default)(this,"eventManager",new f.default(this)),(0,s.default)(this,"pluginName",null),(0,s.default)(this,"pluginsInitializedCallbacks",[]),(0,s.default)(this,"isPluginsReady",!1),(0,s.default)(this,"enabled",!1),(0,s.default)(this,"initialized",!1),function(e,t,r){p(e,t),t.set(e,r)}(this,y,{writable:!0,value:{}}),(0,o.defineGetter)(this,"hot",e,{writable:!1}),w=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[r,n]=t.split(":");if(!g.has(r))throw new Error(`Unknown plugin dependency type "${r}" was found.`);g.get(r)(n)||e.push(` - ${n} (${r})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");E.push(t)}}w||(w=(0,l.getPluginsNames)()),w.indexOf("UndoRedo")>=0&&w.splice(w.indexOf("UndoRedo"),1),w.indexOf(this.pluginName)>=0&&w.splice(w.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===w.length){if(E.length>0){const e=[`${E.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){(0,i.default)(this,y)[e]=(0,i.default)(this,y)[e]||[];const r=(0,i.default)(this,y)[e];this.hot.addHook(e,t),r.push(t),(0,i.default)(this,y)[e]=r}removeHooks(e){(0,a.arrayEach)((0,i.default)(this,y)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=(0,i.default)(this,y);(0,o.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,C,v).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,o.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},33997:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(46462);t.PLUGIN_KEY=n.PLUGIN_KEY,t.BasePlugin=n.BasePlugin},14027:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=n(r(50998)),a=n(r(27862));function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u=t.PLUGIN_KEY="bindRowsWithHeaders",h=t.PLUGIN_PRIORITY=210,c=new Map([["loose",o.default],["strict",a.default]]);var d=new WeakSet;class f extends i.BasePlugin{constructor(){super(...arguments),l(this,d),(0,s.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[u];"string"!=typeof e&&(e="loose");const t=c.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,d,p).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function p(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=f},26298:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(14027);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.BindRowsWithHeaders=n.BindRowsWithHeaders},50998:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:i}=(0,n.alterUtilsFactory)("physicallyIndexed");class o extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){const r=(0,n.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=s(r,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=i(this.indexedValues,e);this.indexedValues=(0,n.getDecreasedIndexes)(t,e),super.remove(e)}}t.default=o},27862:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(41789);const{getListWithInsertedItems:s,getListWithRemovedItems:i}=(0,n.alterUtilsFactory)("physicallyIndexed");class o extends n.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=s(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=i(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}t.default=o},82295:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=r(98887),u=r(57691),h=r(31990),c=r(49587),d=r(30369),f=r(66862);function p(e,t){g(e,t),t.add(e)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const E=t.PLUGIN_KEY="collapsibleColumns",w=t.PLUGIN_PRIORITY=290,y=["nestedHeaders"],C="collapsibleIndicator",v=E,S=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var R=new WeakMap,T=new WeakSet,N=new WeakSet,_=new WeakSet,b=new WeakSet;class M extends a.BasePlugin{constructor(){var e,t,r;super(...arguments),p(this,b),p(this,_),p(this,N),p(this,T),(0,s.default)(this,"nestedHeadersPlugin",null),(0,s.default)(this,"headerStateManager",null),r={writable:!0,value:null},g(e=this,t=R),t.set(e,r)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return w}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[E,...y]}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,h.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,o.default)(this,R,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>m(this,_,I).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,b,x).call(e,...r)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,T,A).call(e,...r)})),this.addHook("beforeOnCellMouseDown",((e,t,r)=>m(this,N,O).call(this,e,t,r))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,o.default)(this,R,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:r}=this.hot.getSelectedRangeLast().highlight,{collapsible:n,isCollapsed:s,columnIndex:i}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,r))&&void 0!==e?e:{};n&&(s?this.expandSection({row:t,col:i}):this.collapseSection({row:t,col:i}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,s=function(e){e&&e.parentNode.removeChild(e)};(0,u.rangeEach)(0,e-1,(e=>{const i=t.childNodes[e],o=r.childNodes[e],a=n?n.childNodes[e]:null;(0,u.rangeEach)(0,i.childNodes.length-1,(e=>{let t=i.childNodes[e].querySelector(`.${C}`);s(t),o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector(`.${C}`),s(t)),n&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${C}`),s(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:r,origColspan:n,headerLevel:s,columnIndex:i,isCollapsed:o}=t;if(!0===r&&n>1&&(o&&"expand"===e||!o&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(s),col:i}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!S.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const r=(0,l.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let n=r.length>0;(0,l.arrayEach)(r,(e=>{var r;let{row:s,col:i}=e;const{collapsible:o,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(s,i))&&void 0!==r?r:{};if(!o||a&&"collapse"===t||!a&&"expand"===t)return n=!1,!1}));const s=[],o=[];n&&(0,l.arrayEach)(r,(e=>{let{row:r,col:n}=e;const{colspanCompensation:i,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,r,n);i>0&&(o.push(...a),s.push(l))}));const a=this.getCollapsedColumns();let u=[];"collapse"===t?u=(0,l.arrayUnique)([...a,...o]):"expand"===t&&(u=(0,l.arrayFilter)(a,(e=>!o.includes(e))));const h=S.get(t);if(!1===this.hot.runHooks(h.beforeHook,a,u,n))return void(0,l.arrayEach)(s,(e=>{e()}));this.hot.batchExecution((()=>{(0,l.arrayEach)(o,(e=>{(0,i.default)(this,R).setValueAtIndex(this.hot.toPhysicalColumn(e),h.hideColumn)}))}),!0);const c=this.getCollapsedColumns().length!==a.length;this.hot.runHooks(h.afterHook,a,u,n,c),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,i.default)(this,R).getHiddenIndexes()}destroy(){(0,o.default)(this,R,null),super.destroy()}}function A(e,t,r){var n;const{collapsible:s,origColspan:i,isCollapsed:o}=null!==(n=this.headerStateManager.getHeaderSettings(r,e))&&void 0!==n?n:{},a=s&&i>1&&e>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let u=t.querySelector(`.${C}`);var h;((0,c.removeAttribute)(t,[(0,f.A11Y_EXPANDED)("")[0]]),a)?(u||(u=this.hot.rootDocument.createElement("div"),(0,c.addClass)(u,C),t.querySelector("div:first-child").appendChild(u)),(0,c.removeClass)(u,["collapsed","expanded"]),o?((0,c.addClass)(u,"collapsed"),(0,c.fastInnerText)(u,"+"),l&&(0,c.setAttribute)(t,...(0,f.A11Y_EXPANDED)(!1))):((0,c.addClass)(u,"expanded"),(0,c.fastInnerText)(u,"-"),l&&(0,c.setAttribute)(t,...(0,f.A11Y_EXPANDED)(!0))),l&&(0,c.setAttribute)(u,...(0,f.A11Y_HIDDEN)())):null===(h=u)||void 0===h||h.remove()}function O(e,t){(0,c.hasClass)(e.target,C)&&((0,c.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,c.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,d.stopImmediatePropagation)(e))}function I(){this.updatePlugin()}function x(e,t){t||this.updatePlugin()}t.CollapsibleColumns=M},85792:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82295);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CollapsibleColumns=n.CollapsibleColumns},13500:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(97639),a=r(76163),l=r(46029),u=r(98887),h=r(33997),c=r(41789),d=n(r(54925)),f=r(82801),p=r(95262),g=r(90838),m=r(16766),E=r(10185),w=r(66862);function y(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 C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const v=t.PLUGIN_KEY="columnSorting",S=t.PLUGIN_PRIORITY=50,R=t.APPEND_COLUMN_CONFIG_STRATEGY="append",T=t.REPLACE_COLUMN_CONFIG_STRATEGY="replace",N=v;(0,E.registerRootComparator)(v,m.rootComparator),d.default.getSingleton().register("beforeColumnSort"),d.default.getSingleton().register("afterColumnSort");var _=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet;class O extends h.BasePlugin{constructor(){super(...arguments),y(this,A),y(this,M),y(this,b),y(this,_),(0,s.default)(this,"columnStatesManager",null),(0,s.default)(this,"columnMetaCache",null),(0,s.default)(this,"pluginKey",v),(0,s.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new f.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new c.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>C(this,b,x).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,A,L).call(e,...r)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>C(this,_,I).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,M,P).call(e,...r)})),this.hot.view&&C(this,_,I).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const r=(0,p.getHeaderSpanElement)(t);!1!==(0,p.isFirstLevelColumnHeader)(e,t)&&null!==r&&this.updateHeaderClasses(r)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:N})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(N)}sort(e){const t=this.getSortConfig(),r=this.getNormalizedSortConfigs(e),n=this.areValidSortConfigs(r);!1!==this.hot.runHooks("beforeColumnSort",t,r,n)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new c.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),n&&(this.columnStatesManager.setSortStates(r),this.sortByPresetSortStates(r),this.saveAllSortSettings(r)),this.hot.runHooks("afterColumnSort",t,n?r:t,n),n&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,o.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,p.areValidSortStates)(e)&&e.every((e=>{let{column:r}=e;return r<=t&&r>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,u.arrayMap)(e,(e=>{let{column:t,...r}=e;return{column:this.hot.toPhysicalColumn(t),...r}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,r=e=>{let{column:t,...r}=e;return{column:this.hot.toVisualColumn(t),...r}};return(0,o.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,u.arrayMap)(t.initialConfig,r)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,o.isDefined)(t)){const r=(0,p.getNextSortOrder)(t);return(0,o.isDefined)(r)?{column:e,sortOrder:r}:void 0}const r=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<r)return{column:e,sortOrder:(0,p.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;const r=this.columnStatesManager.getIndexOfColumnInSortQueue(e),n=-1!==r,s=this.getSortConfig(),i=this.getColumnNextConfig(e);if(n){if((0,o.isUndefined)(i))return[...s.slice(0,r),...s.slice(r+1)];if(t===R)return[...s.slice(0,r),...s.slice(r+1),i];if(t===T)return[...s.slice(0,r),i,...s.slice(r+1)]}return(0,o.isDefined)(i)?s.concat(i):s}getPluginColumnConfig(e){if((0,a.isObject)(e)){const t=e[this.pluginKey];if((0,a.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],r=this.columnStatesManager.getAllColumnsProperties(),n=this.hot.getCellMeta(0,e),s=Object.getPrototypeOf(n);return Array.isArray(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns[e])):(0,l.isFunction)(s.columns)?Object.assign(r,t,this.getPluginColumnConfig(s.columns(e))):Object.assign(r,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),r=Object.create(t);return r[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),r}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],r=this.hot.countRows(),n=t=>(0,u.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(r);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(n(e)));const s=(0,u.arrayMap)(t,(e=>e[0]));(0,E.sort)(t,this.pluginKey,(0,u.arrayMap)(e,(e=>e.sortOrder)),(0,u.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<r;e+=1)t.push([e].concat(n(e)));const i=(0,u.arrayMap)(t,(e=>e[0])),o=new Map((0,u.arrayMap)(s,((e,t)=>[e,i[t]]))),a=(0,u.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>o.has(e)?o.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,a.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,a.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,i.removeClass)(e,(0,g.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];(0,i.addClass)(e,(0,g.getClassesToAdd)(...r))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,o.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,i.hasClass)(e.target,p.HEADER_SPAN_CLASS)}onAfterOnCellMouseDown(e,t){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function I(){const e=this.getAllSavedSortSettings();if((0,a.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function x(e,t){const r=(0,p.getHeaderSpanElement)(t);if(!1===(0,p.isFirstLevelColumnHeader)(e,t)||null===r)return;const n=this.getFirstCellSettings(e)[this.pluginKey],s=n.indicator,o=n.headerAction;if(this.updateHeaderClasses(r,this.columnStatesManager,e,s,o),this.hot.getSettings().ariaTags){const r=this.columnStatesManager.getSortOrderOfColumn(e);(0,i.setAttribute)(t,...(0,w.A11Y_SORT)(r?`${r}ending`:"none"))}}function P(e){!0===e&&this.hot.view&&C(this,_,I).call(this)}function L(e,t,r,n){!1!==(0,p.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(n.column=!0)}t.ColumnSorting=O},82801:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(41789),a=r(97639);const l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"sortingStates",new o.LinkedPhysicalIndexToValueMap),(0,s.default)(this,"sortEmptyCells",false),(0,s.default)(this,"indicator",true),(0,s.default)(this,"headerAction",true),(0,s.default)(this,"compareFunctionFactory",void 0),(0,s.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,i.isObject)(e)&&(0,i.objectEach)(e,((e,t)=>{l.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[r]=t;return r===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,i.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,r]=e;return{column:this.hot.toVisualColumn(t),...r}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,a.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},90838:(e,t,r)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,r,s){const u=[o];s&&u.push(a);if(!1===r)return u.push(i),u;const h=e.getSortOrderOfColumn(t);(0,n.isDefined)(h)&&u.push(l.get(h));return u},t.getClassesToRemove=function(){return Array.from(l.values()).concat(a,i,o)},r(63517);var n=r(97639),s=r(95262);const i="indicatorDisabled",o="columnSorting",a="sortAction",l=new Map([[s.ASC_SORT_STATE,"ascending"],[s.DESC_SORT_STATE,"descending"]])},8540:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(13500);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSorting=n.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=n.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=n.REPLACE_COLUMN_CONFIG_STRATEGY},16766:(e,t,r)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(r,s){const[,...i]=r,[,...o]=s;return function(r){const s=e[r],a=t[r],l=i[r],u=o[r],h=a.columnSorting;return(h.compareFunctionFactory?h.compareFunctionFactory:(0,n.getCompareFunctionFactory)(a.type))(s,a,h)(l,u)}(0)}};var n=r(10185)},59891:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const o=t.checkedTemplate,a=t.uncheckedTemplate,{sortEmptyCells:l}=r;return function(u,h){const c=(0,i.isEmpty)(u),d=(0,i.isEmpty)(h),f=c?a:u,p=d?a:h,g=f===a||f===o,m=p===a||p===o;if(!1===l){if(c&&!1===d)return n.FIRST_AFTER_SECOND;if(!1===c&&d)return n.FIRST_BEFORE_SECOND}return!1===g&&m?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:g&&!1===m?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:!1===g&&!1===m?(0,s.compareFunctionFactory)(e,t,r)(u,h):f===a&&p===o?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:f===o&&p===a?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP}};var n=r(10185),s=r(73180),i=r(97639);t.COLUMN_DATA_TYPE="checkbox"},35789:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(n,a){const{sortEmptyCells:l}=r;if(n===a)return o.DO_NOT_SWAP;if((0,i.isEmpty)(n))return(0,i.isEmpty)(a)?o.DO_NOT_SWAP:l&&"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND;if((0,i.isEmpty)(a))return l&&"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND;const u=t.dateFormat,h=(0,s.default)(n,u),c=(0,s.default)(a,u);return h.isValid()?c.isValid()?c.isAfter(h)?"asc"===e?o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND:c.isBefore(h)?"asc"===e?o.FIRST_AFTER_SECOND:o.FIRST_BEFORE_SECOND:o.DO_NOT_SWAP:o.FIRST_BEFORE_SECOND:o.FIRST_AFTER_SECOND}};var s=n(r(22418)),i=r(97639),o=r(10185);t.COLUMN_DATA_TYPE="date"},73180:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){const i=t.locale;return function(t,o){const{sortEmptyCells:a}=r;return"string"==typeof t&&(t=t.toLocaleLowerCase(i)),"string"==typeof o&&(o=o.toLocaleLowerCase(i)),t===o?s.DO_NOT_SWAP:(0,n.isEmpty)(t)?(0,n.isEmpty)(o)?s.DO_NOT_SWAP:a&&"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(0,n.isEmpty)(o)?a&&"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(o)?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(o)?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(o)||(t=parseFloat(t),o=parseFloat(o)),t<o?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:t>o?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP)}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="default"},33068:(e,t,r)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,r){return function(t,i){const o=parseFloat(t),a=parseFloat(i),{sortEmptyCells:l}=r;if(o===a||isNaN(o)&&isNaN(a))return s.DO_NOT_SWAP;if(l){if((0,n.isEmpty)(t))return"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND;if((0,n.isEmpty)(i))return"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND}return isNaN(o)?s.FIRST_AFTER_SECOND:isNaN(a)?s.FIRST_BEFORE_SECOND:o<a?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:o>a?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var n=r(97639),s=r(10185);t.COLUMN_DATA_TYPE="numeric"},9972:(e,t,r)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const r=(0,n.getRootComparator)(t);for(var s=arguments.length,i=new Array(s>2?s-2:0),o=2;o<s;o++)i[o-2]=arguments[o];e.sort(r(...i))};var n=r(64602);t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},10185:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(64602);t.registerRootComparator=n.registerRootComparator,t.getRootComparator=n.getRootComparator,t.getCompareFunctionFactory=n.getCompareFunctionFactory;var s=r(9972);t.FIRST_AFTER_SECOND=s.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=s.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=s.DO_NOT_SWAP,t.sort=s.sort},64602:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(c(e))return h(e);return h(s.COLUMN_DATA_TYPE)};var s=r(73180),i=r(33068),o=r(59891),a=r(35789),l=n(r(31056));const{register:u,getItem:h,hasItem:c}=(0,l.default)("sorting.compareFunctionFactory"),{register:d,getItem:f}=(0,l.default)("sorting.mainSortComparator");t.getRootComparator=f,t.registerRootComparator=d,u(i.COLUMN_DATA_TYPE,i.compareFunctionFactory),u(o.COLUMN_DATA_TYPE,o.compareFunctionFactory),u(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),u(s.COLUMN_DATA_TYPE,s.compareFunctionFactory)},95262:(e,t,r)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,n.isObject)(e))return!1;const{column:t,sortOrder:r}=e;return Number.isInteger(t)&&[i,o].includes(r)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${a}`)},t.getNextSortOrder=function(e){if(e===o)return;if(e===i)return o;return i},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const r=t.parentNode.parentNode.childNodes;if(Array.from(r).indexOf(t.parentNode)-r.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,r){return-1===e&&t>=0&&!1===(0,s.isRightClick)(r)};var n=r(76163),s=r(30369);const i=t.ASC_SORT_STATE="asc",o=t.DESC_SORT_STATE="desc",a=t.HEADER_SPAN_CLASS="colHeader"},83659:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=r(76163),a=n(r(95883)),l=r(45561),u=r(1178);function h(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 c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const d=t.PLUGIN_KEY="columnSummary",f=t.PLUGIN_PRIORITY=220;var p=new WeakSet,g=new WeakSet,m=new WeakSet;class E extends i.BasePlugin{constructor(){super(...arguments),h(this,m),h(this,g),h(this,p),(0,s.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return f}isEnabled(){return!!this.hot.getSettings()[d]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[d],this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,p,w).call(e,...r)})),this.addHook("afterChange",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,g,y).call(e,...r)})),this.addHook("beforeCreateRow",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,r))),this.addHook("beforeCreateCol",((e,t,r)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,r))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...r)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...r)})),this.addHook("afterCreateRow",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,r))),this.addHook("afterCreateCol",((e,t,r)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,r))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...r)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...r)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return c(e,m,C).call(e,...r)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,o.objectEach)(e.ranges,(r=>{t+=this.getPartialSum(r,e.sourceColumn)})),t}getPartialSum(e,t){let r=0,n=e[1]||e[0],s=null,i=0;do{if(s=this.getCellValue(n,t),s=(0,u.isNullishOrNaN)(s)?null:s,null!==s){const e=(`${s}`.split(".")[1]||[]).length||1;e>i&&(i=e)}r+=s||0,n-=1}while(n>=e[0]);return Math.round(r*10**i)/10**i}calculateMinMax(e,t){let r=null;return(0,o.objectEach)(e.ranges,(n=>{const s=this.getPartialMinMax(n,e.sourceColumn,t);if(null===r&&null!==s&&(r=s),null!==s)switch(t){case"min":r=Math.min(r,s);break;case"max":r=Math.max(r,s)}})),null===r?"Not enough data":r}getPartialMinMax(e,t,r){let n,s=null,i=e[1]||e[0];do{if(n=this.getCellValue(i,t),n=(0,u.isNullishOrNaN)(n)?null:n,null===s)s=n;else if(null!==n)switch(r){case"min":s=Math.min(s,n);break;case"max":s=Math.max(s,n)}i-=1}while(i>=e[0]);return s}countEmpty(e,t){let r,n=0,s=e[1]||e[0];do{r=this.getCellValue(s,t),r=(0,u.isNullishOrNaN)(r)?null:r,null===r&&(n+=1),s-=1}while(s>=e[0]);return n}countEntries(e){let t=0;const r=e.ranges;return(0,o.objectEach)(r,(r=>{const n=void 0===r[1]?1:r[1]-r[0]+1,s=this.countEmpty(r,e.sourceColumn);t+=n,t-=s})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const r=this.hot.toVisualRow(e),n=this.hot.toVisualColumn(t);let s=this.hot.getSourceDataAtCell(e,t),i="";if(null!==r&&null!==n&&(i=this.hot.getCellMeta(r,n).className||""),i.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof s&&(s=s.replace(/,/,".")),s=parseFloat(s)),isNaN(s)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
|
965
|
-
numeric format. Cannot do the calculation.`);return s}}function w(){this.endpoints.initEndpoints()}function y(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function C(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=E},95883:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(98887),o=r(31990);t.default=class{constructor(e,t){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"endpoints",[]),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"settingsType","array"),(0,s.default)(this,"currentEndpoint",null),(0,s.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let r=e;if(r||"function"!=typeof this.settings)return r||(r=this.settings),(0,i.arrayEach)(r,(e=>{const r={};this.assignSetting(e,r,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,r,"reversedRowCoords",!1),this.assignSetting(e,r,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"sourceColumn",e.destinationColumn),this.assignSetting(e,r,"type","sum"),this.assignSetting(e,r,"forceNumeric",!1),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"customFunction",null),this.assignSetting(e,r,"readOnly",!0),this.assignSetting(e,r,"roundFloat",!1),t.push(r)})),t;this.settingsType="function"}assignSetting(e,t,r,n){if("ranges"!==r||void 0!==e[r]){if("ranges"!==r||0!==e[r].length)if(void 0===e[r]){if(n instanceof Error)throw n;t[r]=n}else"destinationRow"===r&&t.reversedRowCoords?t[r]=this.hot.countRows()-e[r]-1:t[r]=e[r]}else t[r]=n}resetSetupBeforeStructureAlteration(e,t,r){if("function"!==this.settingsType)return;const n=e.indexOf("row")>-1?"row":"col",s=this.getAllEndpoints();(0,i.arrayEach)(s,(s=>{"row"===n&&s.destinationRow>=t&&("insert_row"===e?s.alterRowOffset=r:"remove_row"===e&&(s.alterRowOffset=-1*r)),"col"===n&&s.destinationColumn>=t&&("insert_col"===e?s.alterColumnOffset=r:"remove_col"===e&&(s.alterColumnOffset=-1*r))})),this.resetAllEndpoints(s,!1)}resetSetupAfterStructureAlteration(e,t,r,n,s){let o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,u=this.getAllEndpoints(),h=0===e.indexOf("move_row"),c=t;(0,i.arrayEach)(u,(e=>{"row"===a&&e.destinationRow>=c&&(e.alterRowOffset=l*r),"col"===a&&e.destinationColumn>=c&&(e.alterColumnOffset=l*r)})),this.resetAllEndpoints(u,!h),h?(0,i.arrayEach)(u,(e=>{this.extendEndpointRanges(e,c,n[0],n.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,i.arrayEach)(u,(e=>{this.shiftEndpointCoordinates(e,c)})),o&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,r,n){(0,i.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?r>e[1]?e[1]+=n:r<e[0]&&(e[0]-=n):r>=e[0]&&r<=e[1]&&(e[1]-=n,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,r=[],n=[];(0,i.arrayEach)(t,(e=>{const t=[];if(e[1])for(let r=e[0];r<=e[1];r++)t.push(this.hot.toPhysicalRow(r));else t.push(this.hot.toPhysicalRow(e[0]));n.push(t)})),(0,i.arrayEach)(n,(e=>{let t=[];(0,i.arrayEach)(e,((n,s)=>{0===s?t.push(n):e[s]!==e[s-1]+1&&(t.push(e[s-1]),r.push(t),t=[],t.push(n)),s===e.length-1&&(t.push(n),r.push(t))}))})),e.ranges=r}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,i.arrayEach)(e.ranges,(r=>{(0,i.arrayEach)(r,((n,s)=>{n>=t&&(r[s]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,r=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+r>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,i.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,i.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,i.arrayEach)(e,((e,r,n)=>{`${e[2]||""}`!=`${e[3]}`&&(0,i.arrayEach)(this.getAllEndpoints(),((e,s)=>{this.hot.propToCol(n[r][1])===e.sourceColumn&&-1===t.indexOf(s)&&t.push(s)}))})),(0,i.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.alterRowOffset||0,n=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?r:0)),this.hot.toVisualColumn(e.destinationColumn+(t?n:0)),""])}setEndpointValue(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const s=this.hot.toVisualRow(e.destinationRow);if(null!==s){const r=this.hot.getCellMeta(s,e.destinationColumn);"init"!==t&&r.readOnly===e.readOnly||(r.readOnly=e.readOnly,r.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let r=0;Number.isInteger(t)&&(r=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(r)}r?this.hot.setDataAtCell(n,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,o.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},75001:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(83659);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSummary=n.ColumnSummary},1178:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},4780:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(49587);class o{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"isRtl",!1),(0,s.default)(this,"container",null),(0,s.default)(this,"editor",void 0),(0,s.default)(this,"editorStyle",void 0),(0,s.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const r=this.getInputElement();r.style.width=`${e}px`,r.style.height=`${t}px`}}getSize(){return{width:(0,i.outerWidth)(this.getInputElement()),height:(0,i.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,i.addClass)(this.container,o.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,i.addClass)(e,o.CLASS_EDITOR),(0,i.addClass)(t,o.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${o.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}t.default=o},47477:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(49587),l=r(30369),u=r(76163),h=r(33997),c=n(r(4780)),d=n(r(68666)),f=r(86373),p=n(r(46422)),g=n(r(45317)),m=n(r(86191));function E(e,t){y(e,t),t.add(e)}function w(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(68581);const v=t.PLUGIN_KEY="comments",S=t.PLUGIN_PRIORITY=60,R=t.META_COMMENT="comment",T=t.META_COMMENT_VALUE="value",N=t.META_STYLE="style",_=t.META_READONLY="readOnly",b=v,M=`plugin:${v}`;var A=new WeakMap,O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakMap,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet;class z extends h.BasePlugin{constructor(){super(...arguments),E(this,j),E(this,G),E(this,Y),E(this,W),E(this,B),E(this,V),E(this,U),E(this,F),E(this,H),E(this,k),(0,s.default)(this,"range",{}),w(this,A,{writable:!0,value:null}),w(this,O,{writable:!0,value:null}),w(this,I,{writable:!0,value:!1}),w(this,x,{writable:!0,value:!1}),w(this,P,{writable:!0,value:{}}),w(this,L,{writable:!0,value:null}),w(this,D,{writable:!0,value:""})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){this.enabled||((0,o.default)(this,A)||(0,i.default)(this,A,new c.default(this.hot.rootDocument,this.hot.isRtl())),(0,o.default)(this,O)||(0,i.default)(this,O,new d.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,r,n,s,i)=>C(this,U,q).call(this,e,i))),this.addHook("afterScroll",(()=>C(this,j,re).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>C(this,G,te).call(this,e))),(0,o.default)(this,O).addLocalHook("hide",(()=>this.hide())),(0,o.default)(this,O).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,o.default)(this,O).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),r=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,i.default)(this,x,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,i.default)(this,x,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,o.default)(this,A).isVisible()},group:b}),r.addShortcut({keys:[["Escape"]],callback:()=>{(0,o.default)(this,A).setValue((0,o.default)(this,D)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,o.default)(this,A).isVisible()},group:b}),r.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,o.default)(this,A).isVisible()},group:b})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(b)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>C(this,H,K).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>C(this,k,$).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>C(this,F,X).call(this))),this.eventManager.addEventListener(t,"focus",(()=>C(this,B,Z).call(this))),this.eventManager.addEventListener(t,"blur",(()=>C(this,V,Q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>C(this,W,J).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>C(this,Y,ee).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,o.default)(this,A).getValue();let r="";null!=e?r=e:null!=t&&(r=t);const n=this.range.from.row,s=this.range.from.col;this.updateCommentMeta(n,s,{[T]:r}),this.hot.render()}setCommentAtCell(e,t,r){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(r)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(r)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,T)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,T)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:r}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||r<0||r>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,o.default)(this,O).cancelHiding(),(0,o.default)(this,A).setValue(null!==(e=n[R]?n[R][T]:null)&&void 0!==e?e:""),(0,o.default)(this,A).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,o.default)(this,A).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,o.default)(this,A).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{row:s,col:i}=this.range.from;let l=r.getRenderableFromVisualIndex(s),u=n.getRenderableFromVisualIndex(i);const h=null===l;(0,o.default)(this,A).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,-1))),null===u&&(u=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,-1)));const c=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:f,view:{_wt:p}}=this.hot,{wtTable:g}=p,m=p.getCell({row:l,col:u},!0),E=this.getCommentMeta(s,i,N);E?(0,o.default)(this,A).setSize(E.width,E.height):(0,o.default)(this,A).resetSize();const w=d?0:g.getStretchedColumnWidth(u),y=h&&!c?(0,a.outerHeight)(m):0,{left:C,top:v,width:S,height:R}=m.getBoundingClientRect(),{width:T,height:b}=(0,o.default)(this,A).getSize(),{innerWidth:M,innerHeight:O}=this.hot.rootWindow,I=this.hot.rootDocument.documentElement;let x=C+f.scrollX+w,P=v+f.scrollY+y;this.hot.isRtl()&&(x-=T+w),this.hot.isLtr()&&C+S+T>M?x=C+f.scrollX-T-1:this.hot.isRtl()&&x<-(I.scrollWidth-I.clientWidth)&&(x=C+f.scrollX+w+1),v+b>O&&(P-=b-R+1),(0,o.default)(this,A).setPosition(x,P),(0,o.default)(this,A).setReadOnlyState(this.getCommentMeta(s,i,_))}focusEditor(){(0,o.default)(this,A).focus()}updateCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t)[R];let s;n?(s=(0,u.deepClone)(n),(0,u.deepExtend)(s,r)):s=r,this.hot.setCellMeta(e,t,R,s)}getCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t);if(n[R])return n[R][r]}addToContextMenu(e){e.items.push({name:f.SEPARATOR},(0,p.default)(this),(0,g.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[v];if((0,u.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,o.default)(this,A).getInputElement()}destroy(){(0,o.default)(this,A)&&(0,o.default)(this,A).destroy(),(0,o.default)(this,O)&&(0,o.default)(this,O).destroy(),super.destroy()}}function $(e){if(this.hot.view&&this.hot.view._wt&&!(0,o.default)(this,I)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let r=null;t&&(r=this.hot.getCoords(t)),(!t||this.range.from&&r&&(this.range.from.row!==r.row||this.range.from.col!==r.col))&&this.hide()}}function K(e){const{rootDocument:t}=this.hot;if(!((0,o.default)(this,I)||(0,o.default)(this,A).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,o.default)(this,L)===e.target)&&(0,o.default)(this,A))if((0,i.default)(this,L,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,o.default)(this,O).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,o.default)(this,O).hide()}function X(){(0,i.default)(this,I,!1)}function q(e,t){t[R]&&t[R][T]&&(0,a.addClass)(e,t.commentedCellClassName)}function Q(){(0,i.default)(this,D,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Z(){(0,i.default)(this,D,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function J(e){(0,i.default)(this,P,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function ee(e){const t=(0,a.outerWidth)(e.target),r=(0,a.outerHeight)(e.target);t===(0,o.default)(this,P).width+1&&r===(0,o.default)(this,P).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[N]:{width:t,height:r}})}function te(e){(0,o.default)(this,A).isVisible()&&(0,l.stopImmediatePropagation)(e)}function re(){(0,o.default)(this,x)||this.hide()}t.Comments=z},46422:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const r=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=r&&r.isCell()&&e.getCommentAtCell(r.row,r.col)?this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},86191:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((t,r)=>e.getCommentMeta(t,r,i.META_READONLY)))?(0,s.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{if(t>=0&&r>=0){const n=!!e.getCommentMeta(t,r,i.META_READONLY);e.updateCommentMeta(t,r,{[i.META_READONLY]:!n})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(12208),i=r(47477);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},45317:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{t>=0&&r>=0&&e.removeCommentAtCell(t,r,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},68666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(46029),o=r(76163),a=n(r(63806));class l{constructor(e){(0,s.default)(this,"wasLastActionShow",!0),(0,s.default)(this,"showDebounced",null),(0,s.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,i.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,o.mixin)(l,a.default);t.default=l},70013:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47477);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Comments=n.Comments},50426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517),r(57270);var s=n(r(93231)),i=r(98887),o=r(76163);t.CommandExecutor=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"commands",{}),(0,s.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=e.split(":"),a=s[0],l=2===s.length?s[1]:null;let u=this.commands[a];if(!u)throw new Error(`Menu command '${a}' not exists.`);if(l&&u.submenu&&(u=function(e,t){let r;return(0,i.arrayEach)(t,(t=>{const n=t.key?t.key.split(":"):null;if(Array.isArray(n)&&n[1]===e)return r=t,!1})),r}(l,u.submenu.items)),!0===u.disabled)return;if("function"==typeof u.disabled&&!0===u.disabled.call(this.hot))return;if((0,o.hasOwnProperty)(u,"submenu"))return;const h=[];"function"==typeof u.callback&&h.push(u.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),r.unshift(s.join(":")),(0,i.arrayEach)(h,(e=>e.apply(this.hot,r)))}}},32082:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=n(r(54925)),a=r(98887),l=r(76163),u=r(50426),h=r(66496),c=r(51366),d=r(12208),f=r(49587),p=r(86373);function g(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 m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(79498);const E=t.PLUGIN_KEY="contextMenu",w=t.PLUGIN_PRIORITY=70,y=E;o.default.getSingleton().register("afterContextMenuDefaultOptions"),o.default.getSingleton().register("beforeContextMenuShow"),o.default.getSingleton().register("afterContextMenuShow"),o.default.getSingleton().register("afterContextMenuHide"),o.default.getSingleton().register("afterContextMenuExecute");var C=new WeakSet,v=new WeakSet,S=new WeakSet,R=new WeakSet;class T extends i.BasePlugin{constructor(){super(...arguments),g(this,R),g(this,S),g(this,v),g(this,C),(0,s.default)(this,"commandExecutor",new u.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return w}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.ROW_ABOVE,p.ROW_BELOW,p.SEPARATOR,p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_ROW,p.REMOVE_COLUMN,p.SEPARATOR,p.UNDO,p.REDO,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new c.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,v,_).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,S,b).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),this.addHook("afterOnCellContextMenu",(e=>m(this,C,N).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),r=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+r.left,top:t.top+r.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:y})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(y)}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}prepareMenuItems(){this.itemsFactory=new h.ItemsFactory(this.hot,T.DEFAULT_ITEMS);const e=this.hot.getSettings()[E],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const r=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",r),this.menu.setMenuItems(r),(0,a.arrayEach)(r,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function N(e){const t=this.hot.getSettings(),r=t.rowHeaders,n=t.colHeaders;const s=e.target;if(this.close(),(0,f.hasClass)(s,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!r&&!n&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(s)||(0,f.hasClass)(s,"current")&&(0,f.hasClass)(s,"wtBorder")))return;const i=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+i.top,left:e.clientX+i.left})}function _(){this.hot.runHooks("beforeContextMenuShow",this)}function b(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=T,T.SEPARATOR={name:p.SEPARATOR}},22031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(32082);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ContextMenu=n.ContextMenu},66496:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(98887),a=r(86373);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,s.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,i.objectEach)(e,((e,r)=>{let n="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,n=a.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,t[r]=e,n=e.key):(t[e.key]=e,n=e.key),this.defaultOrderPattern.push(n)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let s=e;s&&s.items?s=s.items:Array.isArray(s)||(s=t);(0,i.isObject)(s)?(0,i.objectEach)(s,((e,t)=>{let s=r["string"==typeof e?e:t];s||(s=e),(0,i.isObject)(e)?(0,i.extend)(s,e):"string"==typeof s&&(s={name:s}),void 0===s.key&&(s.key=t),n.push(s)})):(0,o.arrayEach)(s,((e,t)=>{let s=r[e];!s&&a.ITEMS.indexOf(e)>=0||(s||(s={name:e,key:`${t}`}),(0,i.isObject)(e)&&(0,i.extend)(s,e),void 0===s.key&&(s.key=t),n.push(s))}));return n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},28787:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.Cursor=class{constructor(e,t){(0,s.default)(this,"top",void 0),(0,s.default)(this,"topRelative",void 0),(0,s.default)(this,"left",void 0),(0,s.default)(this,"leftRelative",void 0),(0,s.default)(this,"scrollTop",void 0),(0,s.default)(this,"scrollLeft",void 0),(0,s.default)(this,"cellHeight",void 0),(0,s.default)(this,"cellWidth",void 0);const r=t.scrollY,n=t.scrollX;let i,o,a,l,u,h;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),a=parseInt(e.left,10),u=e.height||0,h=e.width||0,o=i,l=a,i+=r,a+=n):"event"===this.type&&(i=parseInt(e.pageY,10),a=parseInt(e.pageX,10),u=e.target.clientHeight,h=e.target.clientWidth,o=i-r,l=a-n),this.top=i,this.topRelative=o,this.left=a,this.leftRelative=l,this.scrollTop=r,this.scrollLeft=n,this.cellHeight=u,this.cellWidth=h}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},26235:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const r=e.openSubMenu(t[0]);r&&r.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=e.hotMenu.getSelectedLast();r&&(e.hotMenu.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},51366:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37081);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},37081:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(77600),l=r(83820),u=r(71227),h=r(86373),c=r(79084),d=n(r(57340)),f=r(98887),p=r(78498),g=r(49587),m=r(30369),E=r(46029),w=r(97639),y=r(76163),C=n(r(63806)),v=r(25839),S=r(66862);function R(e,t,r){!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,r)}var T=new WeakMap,N=new WeakMap;class _{constructor(e,t){var r=this;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",void 0),(0,s.default)(this,"eventManager",new d.default(this)),(0,s.default)(this,"container",void 0),(0,s.default)(this,"positioner",void 0),(0,s.default)(this,"hotMenu",null),(0,s.default)(this,"hotSubMenus",{}),(0,s.default)(this,"parentMenu",void 0),(0,s.default)(this,"menuItems",null),(0,s.default)(this,"origOutsideClickDeselects",null),R(this,T,{writable:!0,value:void 0}),R(this,N,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,o.default)(this,T)}getKeyboardShortcutsCtrl(){return(0,o.default)(this,N)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,E.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let r=!1,n=(0,f.arrayFilter)(this.menuItems,(e=>(e.key===h.NO_ITEMS&&(r=!0),(0,c.isItemHidden)(e,this.hot))));if(n.length<1&&!r)n.push((0,h.predefinedItems)()[h.NO_ITEMS]);else if(0===n.length)return;n=(0,c.filterSeparators)(n,h.SEPARATOR);let s=!1;const a={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,w.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,o.default)(this,T).setCurrentPage(t.row)},afterOnCellMouseOver:(t,r)=>{this.isAllSubMenusClosed()?e(r.row):this.openSubMenu(r.row)},rowHeights:e=>n[e].name===h.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,p.isWindowsOS)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,r,n,s)=>{this.hotMenu.view.isMouseDown()&&(s.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,p.isWindowsOS)()&&(0,m.isRightClick)(e)||!s||!this.hasSelectedItem()||((0,p.isMobileBrowser)()||(0,p.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,i.default)(this,T,(0,l.createMenuNavigator)(this.hotMenu)),(0,i.default)(this,N,(0,u.createKeyboardShortcutsCtrl)(this)),(0,o.default)(this,N).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,o.default)(this,T).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,c.hasSubMenu)(t))return!1;const r=this.hotMenu.getSourceDataAtRow(e),n=new _(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(r.submenu.items),n.open(),n.setPosition(t.getBoundingClientRect()),this.hotSubMenus[r.key]=n,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!0)]),n}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),r=this.hotSubMenus[t.key];if(r){r.destroy(),delete this.hotSubMenus[t.key];const n=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(n,[(0,S.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,f.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const r=this.hot.getSelectedRange(),n=r?(0,c.normalizeSelection)(r):[];this.runLocalHooks("executeCommand",t.key,n,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,n,e)}isCommandPassive(e){return!1===e.isCommand||(0,c.isItemSeparator)(e)||(0,c.isItemDisabled)(e,this.hot)||(0,c.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let r,n=e;return n&&((0,E.isFunction)(n)&&(n=n.call(this.hot),n=null===n||(0,w.isUndefined)(n)?"":n.toString()),n=n.replace(/[^A-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,r=t.querySelector(`.${this.options.className}.${n}`)),r||(r=t.createElement("div"),(0,g.addClass)(r,`htMenu ${this.options.className}`),n&&(0,g.addClass)(r,n),this.options.container.appendChild(r)),r}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,r=e.hider.style,n=e.holder.style,s=parseInt(r.width,10),i=(0,f.arrayReduce)(t,((e,t)=>e+(t.name===h.SEPARATOR?1:26)),0);n.width=`${s+3}px`,n.height=`${i+3}px`,r.height=n.height,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,S.A11Y_MENU)(),(0,S.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=_,(0,y.mixin)(_,C.default)},25839:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,r,o,a,l,u)=>{if(r.hasAttribute("ghost-table"))return;const h=t.getSourceDataAtRow(o),c=e.rootDocument.createElement("div"),d="function"==typeof u?u.call(e):u;if((0,s.empty)(r),(0,s.addClass)(c,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,n.isItemDisabled)(h,e)&&!(0,n.isItemSelectionDisabled)(h)&&!(0,n.isItemSeparator)(h);(0,s.setAttribute)(r,[(0,i.A11Y_MENU_ITEM)(),(0,i.A11Y_LABEL)(d),...t?[(0,i.A11Y_TABINDEX)(-1)]:[],...(0,n.isItemDisabled)(h,e)?[(0,i.A11Y_DISABLED)()]:[],...(0,n.isItemSubMenu)(h)?[(0,i.A11Y_EXPANDED)(!1)]:[]])}r.className="",r.appendChild(c),(0,n.isItemSeparator)(h)?(0,s.addClass)(r,"htSeparator"):"function"==typeof h.renderer?((0,s.addClass)(r,"htCustomMenuRenderer"),r.appendChild(h.renderer(t,c,o,a,l,d))):(0,s.fastInnerHTML)(c,d),(0,n.isItemDisabled)(h,e)?(0,s.addClass)(r,"htDisabled"):(0,n.isItemSelectionDisabled)(h)?(0,s.addClass)(r,"htSelectionDisabled"):(0,n.isItemSubMenu)(h)&&(0,s.addClass)(r,"htSubmenu")}};var n=r(79084),s=r(49587),i=r(66862)},83820:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,n.createPaginator)({size:()=>e.countRows(),onItemSelect(t,r){const n=e.getCell(t,0);if(!n||(0,s.isSeparator)(n)||(0,s.isDisabled)(n)||(0,s.isSelectionDisabled)(n))return!1;e.selectCell(t,0,...r?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var n=r(99850),s=r(79084)},77600:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(28787);function a(e,t,r){!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,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:!1}),a(this,d,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,i.default)(this,c,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,s.default)(this,d)[e]=t,this}setElement(e){return(0,i.default)(this,l,e),this}setParentElement(e){return(0,i.default)(this,u,e),this}updatePosition(e){(0,i.default)(this,h,new o.Cursor(e,(0,s.default)(this,l).ownerDocument.defaultView)),(0,s.default)(this,c)?((0,s.default)(this,h).fitsBelow((0,s.default)(this,l))?this.setPositionBelowCursor():(0,s.default)(this,h).fitsAbove((0,s.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,s.default)(this,l).dir?(0,s.default)(this,h).fitsOnLeft((0,s.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,s.default)(this,h).fitsOnRight((0,s.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,s.default)(this,d).above+(0,s.default)(this,h).top-(0,s.default)(this,l).offsetHeight;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top+(0,s.default)(this,h).cellHeight-(0,s.default)(this,l).offsetHeight+3),(0,s.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,s.default)(this,d).below+(0,s.default)(this,h).top+1;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top-1),(0,s.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,s.default)(this,h).left;if((0,s.default)(this,u)){const{right:t}=(0,s.default)(this,u).getBoundingClientRect();e+=(0,s.default)(this,h).cellWidth+t-((0,s.default)(this,h).left+(0,s.default)(this,h).cellWidth)}else e+=(0,s.default)(this,d).right;(0,s.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,s.default)(this,d).left+(0,s.default)(this,h).left-(0,s.default)(this,l).offsetWidth;if((0,s.default)(this,u)){const{left:t}=(0,s.default)(this,u).getBoundingClientRect();e-=(0,s.default)(this,h).left-t}(0,s.default)(this,l).style.left=`${e}px`}}},71227:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];function o(e,t){u(t).addShortcuts(e,{group:s})}function a(e,t){const n=u(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>n.removeShortcutsByKeys(e)))})),r.push({shortcuts:e,contextName:t}),o(e,t)}function l(e){return e?`${i}:${e}`:i}function u(t){var r;const n=e.hotMenu.getShortcutManager(),s=l(t);return null!==(r=n.getContext(s))&&void 0!==r?r:n.addContext(s)}return o((0,n.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:r}=e;a(t,r)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...r]},getContext:u,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},r(63517);var n=r(26235);const s="menu",i=s},79084:(e,t,r)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.SEPARATOR,r=e.slice(0);return r=a(r,t),r=function(e,t){let r=e.slice(0);return r.reverse(),r=a(r,t),r.reverse(),r}(r,t),r=function(e){const t=[];return(0,n.arrayEach)(e,((e,r)=>{r>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(r),r},t.hasSubMenu=function(e){return(0,i.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,i.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,s.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(o.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,s.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,i.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,i.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,n.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},r(63517);var n=r(98887),s=r(76163),i=r(49587),o=r(86373);function a(e,t){const r=e.slice(0);for(let e=0;e<r.length&&r[e].name===t;)r.shift();return r}},94328:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htLeft";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htCenter";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htRight";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htJustify";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{name:s.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htTop";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htMiddle";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htBottom";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1}]}}};var n=r(12208),s=r(71273),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.KEY="alignment"},5026:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const r=t[0].start.col,n=t[0].end.col;this.countRows()&&this.populateFromArray(0,r,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="clear_column"},36200:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="col_left"},11374:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="col_right"},86373:(e,t,r)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===y.indexOf(e)&&(C[e]=t)},t.predefinedItems=function(){const e={};return(0,n.objectEach)(C,((t,r)=>{e[r]=t()})),e};var n=r(76163),s=w(r(94328));t.ALIGNMENT=s.KEY;var i=w(r(5026));t.CLEAR_COLUMN=i.KEY;var o=w(r(36200));t.COLUMN_LEFT=o.KEY;var a=w(r(11374));t.COLUMN_RIGHT=a.KEY;var l=w(r(65732));t.READ_ONLY=l.KEY;var u=w(r(35656));t.REDO=u.KEY;var h=w(r(28074));t.REMOVE_COLUMN=h.KEY;var c=w(r(34146));t.REMOVE_ROW=c.KEY;var d=w(r(83487));t.ROW_ABOVE=d.KEY;var f=w(r(54869));t.ROW_BELOW=f.KEY;var p=w(r(71273));t.SEPARATOR=p.KEY;var g=w(r(63676));t.NO_ITEMS=g.KEY;var m=w(r(51159));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(E=function(e){return e?r:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=E(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}t.UNDO=m.KEY;const y=t.ITEMS=[d.KEY,f.KEY,o.KEY,a.KEY,i.KEY,c.KEY,h.KEY,m.KEY,u.KEY,l.KEY,s.KEY,p.KEY,g.KEY],C={[p.KEY]:p.default,[g.KEY]:g.default,[d.KEY]:d.default,[f.KEY]:f.default,[o.KEY]:o.default,[a.KEY]:a.default,[i.KEY]:i.default,[c.KEY]:c.default,[h.KEY]:h.default,[m.KEY]:m.default,[u.KEY]:u.default,[l.KEY]:l.default,[s.KEY]:s.default}},63676:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:s,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var n=r(497);const s=t.KEY="no_items"},65732:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,s.arrayEach)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&this.setCellMeta(e,r,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var n=r(12208),s=r(98887),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.KEY="make_read_only"},35656:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="redo"},28074:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,n.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.KEY="remove_col"},34146:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,n.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.KEY="remove_row"},83487:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="row_above"},54869:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="row_below"},71273:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:r}};const r=t.KEY="---------"},51159:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="undo"},12208:(e,t,r)=>{"use strict";t.__esModule=!0,t.align=function(e,t,r,o,a){(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&function(e,t,r,n,o,a){const l=o(e,t);let u=n;l.className&&(u="vertical"===r?s(l.className,n):i(l.className,n));a(e,t,"className",u)}(e,n,t,r,o,a)}))}))},t.checkSelectionConsistency=function(e,t){let r=!1;Array.isArray(e)&&(0,n.arrayEach)(e,(e=>(e.forAll(((e,n)=>{if(e>=0&&n>=0&&t(e,n))return r=!0,!1})),r)));return r},t.getAlignmentClasses=function(e,t){const r={};return(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&(r[e]||(r[e]=[]),r[e][n]=t(e,n))}))})),r},t.getDocumentOffsetByElement=function(e,t){const r={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:n,left:s}=e.getBoundingClientRect();r.top=n,r.left=s}return r},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=i,t.prepareVerticalAlignClass=s;var n=r(98887);function s(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},55105:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},72078:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497)},80771:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},22050:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},15742:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},54475:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},47771:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=n(r(54925)),u=r(32313),h=r(98887),c=r(37913),d=r(49587),f=r(78498),p=n(r(72078)),g=n(r(80771)),m=n(r(22050)),E=n(r(15742)),w=n(r(54475)),y=n(r(16806)),C=r(98023),v=r(65795);function S(e,t){T(e,t),t.add(e)}function R(e,t,r){T(e,t),t.set(e,r)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const _=t.PLUGIN_KEY="copyPaste",b=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],A=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakMap,k=new WeakMap,H=new WeakMap,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet,z=new WeakSet,$=new WeakSet;class K extends a.BasePlugin{constructor(){super(...arguments),S(this,$),S(this,z),S(this,j),S(this,G),S(this,Y),S(this,W),S(this,B),S(this,V),S(this,U),S(this,F),(0,s.default)(this,"columnsLimit",1/0),(0,s.default)(this,"rowsLimit",1/0),(0,s.default)(this,"pasteMode","overwrite"),(0,s.default)(this,"uiContainer",this.hot.rootDocument.body),R(this,O,{writable:!0,value:!1}),R(this,I,{writable:!0,value:!1}),R(this,x,{writable:!0,value:!1}),R(this,P,{writable:!0,value:"cells-only"}),R(this,L,{writable:!0,value:!1}),R(this,D,{writable:!0,value:!1}),R(this,k,{writable:!0,value:new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),R(this,H,{writable:!0,value:!1}),(0,s.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[_,...M]}static get PLUGIN_PRIORITY(){return b}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;if(this.enabled)return;const{[_]:t}=this.hot.getSettings();var r,n;"object"==typeof t&&(this.pasteMode=null!==(r=t.pasteMode)&&void 0!==r?r:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,o.default)(this,O,!!t.copyColumnHeaders),(0,o.default)(this,I,!!t.copyColumnGroupHeaders),(0,o.default)(this,x,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(n=t.uiContainer)&&void 0!==n?n:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>N(this,W,J).call(this,e))),this.addHook("afterSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,Y,ee).call(e,...r)})),this.addHook("afterSelectionEnd",(()=>N(this,G,te).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,f.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,j,re).call(e,...r)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,z,ne).call(e,...r)})),this.addHook("afterSelection",(()=>N(this,$,se).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,o.default)(this,P,e),(0,o.default)(this,L,!0),N(this,F,X).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,o.default)(this,D,!0),N(this,F,X).call(this,"cut")}getRangedCopyableData(e){return(0,u.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:r,columns:n}=(0,C.normalizeRanges)(e);return(0,h.arrayEach)(r,(e=>{const r=[];(0,h.arrayEach)(n,(t=>{e<0?r.push(this.hot.getColHeader(t,e)):r.push(this.hot.getCopyableData(e,t))})),t.push(r)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const r=new y.default;e&&r.clipboardData.setData("text/plain",e),t&&r.clipboardData.setData("text/html",t),this.onPaste(r)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,i.default)(this,k).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,i.default)(this,P)?t.set("headers",(0,i.default)(this,k).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,i.default)(this,P)?t.set("headers",(0,i.default)(this,k).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,i.default)(this,P)&&t.set("headers",(0,i.default)(this,k).getAllColumnHeadersRange()),t.set("cells",(0,i.default)(this,k).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:r,endRow:n,endCol:s}=e;return{startRow:t,startCol:r,endRow:n,endCol:s}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const r=t.get("cells");if(null!==r&&r.isRangeTrimmed){const{startRow:e,startCol:t,endRow:n,endCol:s}=r;this.hot.runHooks("afterCopyLimit",n-e+1,s-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const r=e.length,n=e[0].length,s=[],{row:i,col:a}=t.getTopStartCorner(),{row:l,col:u}=t.getBottomEndCorner();let h=i,c=a,d=i,f=a;for(;s.length<r||h<=l;){const{skipRowOnPaste:t,visualRow:o}=this.hot.getCellMeta(h,a);if(h=o+1,!0===t)continue;d=o,c=a;const l=[],p=s.length%r;for(;l.length<n||c<=u;){const{skipColumnOnPaste:t,visualCol:r}=this.hot.getCellMeta(i,c);if(c=r+1,!0===t)continue;f=r;const s=l.length%n;l.push(e[p][s])}s.push(l)}return(0,o.default)(this,H,!0),this.hot.populateFromArray(i,a,s,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,a,d,f]}onCopy(e){if(!this.hot.isListening()&&!(0,i.default)(this,L)||this.isEditorOpened())return;this.setCopyableText(),(0,o.default)(this,L,!1);const t=this.getRangedData(this.copyableRanges),r=N(this,U,q).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,r)){const n=(0,u.stringify)(t);if(e&&e.clipboardData){const r=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",[A,r].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n);this.hot.runHooks("afterCopy",t,this.copyableRanges,r)}(0,o.default)(this,P,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,i.default)(this,D)||this.isEditorOpened())return;this.setCopyableText(),(0,o.default)(this,D,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const r=(0,u.stringify)(t);if(e&&e.clipboardData){const n=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[A,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const r=(0,c.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(r&&/(<table)|(<TABLE)/g.test(r)){t=(0,v.htmlToGridSettings)(r,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,u.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[r,n,s,i]=this.populateValues(t);this.hot.selectCell(r,n,Math.min(this.hot.countRows()-1,s),Math.min(this.hot.countCols()-1,i)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function X(e){if((0,f.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:r,col:n}=t.highlight,s=this.hot.getCell(r,n,!0);s&&(0,d.runWithSelectedContendEditableElement)(s,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function q(e){const{rows:t}=(0,C.normalizeRanges)(e);let r=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)r+=1;return{columnHeadersCount:r}}function Q(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);n&&(0,d.makeElementContentEditableAndSelectItsContent)(n)}}}function Z(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);null!=n&&n.hasAttribute("contenteditable")&&(0,d.removeContentEditableFromElementAndDeselect)(n)}}}function J(e){e.items.push({name:"---------"},(0,p.default)(this)),(0,i.default)(this,O)&&e.items.push((0,E.default)(this)),(0,i.default)(this,I)&&e.items.push((0,m.default)(this)),(0,i.default)(this,x)&&e.items.push((0,g.default)(this)),e.items.push((0,w.default)(this))}function ee(e,t,r,n,s){(0,i.default)(this,H)&&(s.value=!0),(0,o.default)(this,H,!1)}function te(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function re(){N(this,B,Z).call(this)}function ne(){N(this,V,Q).call(this)}function se(){N(this,B,Z).call(this)}t.CopyPaste=K},98023:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],r=[];return(0,o.arrayEach)(e,(e=>{const n=Math.min(e.startRow,e.endRow),s=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(n,s,(e=>{-1===t.indexOf(e)&&t.push(e)}));const i=Math.min(e.startCol,e.endCol),o=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(i,o,(e=>{-1===r.indexOf(e)&&r.push(e)}))})),{rows:t,columns:r}},r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(98887),a=r(57691);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,w=new WeakSet,y=new WeakSet;function C(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,m).call(this)-1,e))}function v(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,g).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:r,rowsLimit:n,columnsLimit:s,countColumnHeaders:o}=e;l(this,y),l(this,w),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:void 0}),u(this,E,{writable:!0,value:void 0}),(0,i.default)(this,f,t),(0,i.default)(this,p,r),(0,i.default)(this,g,n),(0,i.default)(this,m,s),(0,i.default)(this,E,o)}setSelectedRange(e){(0,i.default)(this,d,e)}getCellsRange(){if(0===(0,s.default)(this,f).call(this)||0===(0,s.default)(this,p).call(this))return null;const{row:e,col:t}=(0,s.default)(this,d).getTopStartCorner(),{row:r,col:n}=(0,s.default)(this,d).getBottomEndCorner(),i=c(this,y,v).call(this,e,r),o=c(this,w,C).call(this,t,n);return{isRangeTrimmed:r!==i||n!==o,startRow:e,startCol:t,endRow:i,endCol:o}}getMostBottomColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,w,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-1,startCol:e,endRow:-1,endCol:r}}getAllColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,w,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-(0,s.default)(this,E).call(this),startCol:e,endRow:-1,endCol:r}}}},82630:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47771);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CopyPaste=n.CopyPaste},16806:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(55105));t.default=class{constructor(){this.clipboardData=new s.default}}},50526:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,s.checkSelectionBorders)(this,"bottom")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"bottom");e.prepareBorder(r,"bottom",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},47586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(50526));t.bottom=s.default;var i=n(r(13125));t.left=i.default;var o=n(r(76196));t.noBorders=o.default;var a=n(r(72431));t.right=a.default;var l=n(r(41056));t.top=l.default},13125:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const i=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,i)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},76196:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,r){e.prepareBorder(r,"noBorders")},disabled(){return!(0,s.checkSelectionBorders)(this)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},72431:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const i=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,i)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},41056:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,s.checkSelectionBorders)(this,"top")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"top");e.prepareBorder(r,"top",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},91166:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(76163),a=r(57691),l=r(98887),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),h=r(47586),c=r(17802),d=r(79055);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(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 g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m=t.PLUGIN_KEY="customBorders",E=t.PLUGIN_PRIORITY=90;var w=new WeakSet,y=new WeakSet;class C extends i.BasePlugin{constructor(){super(...arguments),p(this,y),p(this,w),(0,s.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>g(this,w,v).call(this,e))),this.addHook("init",(()=>g(this,y,S).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let r=["top","bottom","start","end"],n=null;t&&(this.checkSettingsCohesion([t]),r=Object.keys(t),n=(0,c.normalizeBorder)(t));const s=(0,d.detectSelectionType)(e),i=(0,d.normalizeSelectionFactory)(s,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,l.arrayEach)(e,(e=>{i(e).forAll(((e,t)=>{(0,l.arrayEach)(r,(r=>{this.prepareBorderFromCustomAdded(e,t,n,(0,c.toInlinePropName)(r))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),r=(0,d.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),n=[];return(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(r=>{r.row===e&&r.col===t&&n.push((0,c.denormalizeBorder)(r))}))}))})),n}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,r,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,r,n){const s=this.hot.countRows(),i=this.hot.countCols();if(e>=s||t>=i)return;let o=(0,c.createEmptyBorders)(e,t);r&&(o=(0,c.extendDefaultBorder)(o,r),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(o.id===e.settings.id)return Object.assign(e.settings,r),o.id=e.settings.id,o.top=e.settings.top,o.bottom=e.settings.bottom,o.start=e.settings.start,o.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(o)),this.insertBorderIntoSettings(o,n)}prepareBorderFromCustomAddedRange(e,t){const r=Math.min(e.to.row,this.hot.countRows()-1),n=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,r,(r=>{(0,a.rangeEach)(e.from.col,n,(n=>{const s=(0,c.createEmptyBorders)(r,n);let i=0;r===e.from.row&&(0,o.hasOwnProperty)(t,"top")&&(i+=1,s.top=t.top),r===e.to.row&&(0,o.hasOwnProperty)(t,"bottom")&&(i+=1,s.bottom=t.bottom),n===e.from.col&&(0,o.hasOwnProperty)(t,"start")&&(i+=1,s.start=t.start),n===e.to.col&&(0,o.hasOwnProperty)(t,"end")&&(i+=1,s.end=t.end),i>0&&(this.hot.setCellMeta(r,n,"borders",(0,c.denormalizeBorder)(s)),this.insertBorderIntoSettings(s))}))}))}removeAllBorders(e,t){const r=(0,c.createId)(e,t);this.spliceBorder(r),this.clearBordersFromSelectionSettings(r),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,r,n){let s=this.hot.getCellMeta(e,t).borders;if(s=s&&void 0!==s.border?(0,c.normalizeBorder)(s):(0,c.createEmptyBorders)(e,t),n){s[r]=(0,c.createSingleEmptyBorder)();if(4===this.countHide(s))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}else{s[r]=(0,c.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}prepareBorder(e,t,r){(0,l.arrayEach)(e,(e=>{let{start:n,end:s}=e;if(n.row===s.row&&n.col===s.col)"noBorders"===t?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,t,r);else switch(t){case"noBorders":(0,a.rangeEach)(n.col,s.col,(e=>{(0,a.rangeEach)(n.row,s.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(n.row,e,t,r)}));break;case"bottom":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(s.row,e,t,r)}));break;case"start":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,n.col,t,r)}));break;case"end":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,s.col,t,r)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,c.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:r,start:n,end:s}=e,i=[t,r,n,s];return(0,l.arrayReduce)(i,((e,t)=>{let r=e;return t&&t.hide&&(r+=1),r}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((r,n)=>{if(e.id===r.id)return this.savedBorders[n]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,r){let n=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(s);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,r)})),n=!0,!1}})),n}checkCustomSelections(e,t,r){const n=this.countHide(e);let s=!1;return 4===n?(this.removeAllBorders(e.row,e.col),s=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){if(n.visualCellRange=t,n.commit(),r){const t=this.hot.view._wt.selectionManager.getBorderInstances(n);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(r,e)}))}return s=!0,!1}})),s}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,o.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,c.hasLeftRightTypeOptions)(e),r=(0,c.hasStartEndTypeOptions)(e);if(t&&r)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function v(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(u.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,h.top)(this),(0,h.right)(this),(0,h.bottom)(this),(0,h.left)(this),(0,h.noBorders)(this)]}})}function S(){this.changeBorderSettings()}t.CustomBorders=C},93725:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(91166);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CustomBorders=n.CustomBorders},17802:(e,t,r)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let r=!1;return(0,i.arrayEach)(e.getSelectedRange(),(s=>{s.forAll(((s,i)=>{if(s<0||i<0)return;const o=e.getCellMeta(s,i).borders;if(o){if(!t)return r=!0,!1;if(!(0,n.hasOwnProperty)(o[t],"hide")||!1===o[t].hide)return r=!0,!1}}))})),r},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:o(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=o,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,s.isDefined)(e.start)&&(e.left=e.start);(0,s.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,n.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,n.hasOwnProperty)(t,"top")&&(0,s.isDefined)(t.top)&&(t.top?((0,n.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,n.hasOwnProperty)(t,"bottom")&&(0,s.isDefined)(t.bottom)&&(t.bottom?((0,n.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,n.hasOwnProperty)(t,"start")&&(0,s.isDefined)(t.start)&&(t.start?((0,n.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,n.hasOwnProperty)(t,"end")&&(0,s.isDefined)(t.end)&&(t.end?((0,n.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.left)||(0,s.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.start)||(0,s.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,r;((0,s.isDefined)(e.start)||(0,s.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,s.isDefined)(e.end)||(0,s.isDefined)(e.right))&&(e.end=null!==(r=e.end)&&void 0!==r?r:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=h.get(e))&&void 0!==t?t:e};var n=r(76163),s=r(97639),i=r(98887);function o(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}const h=new Map([["left","start"],["right","end"]])},16703:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=r(30369),a=r(49587);function l(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 u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const h=t.PLUGIN_KEY="dragToScroll",c=t.PLUGIN_PRIORITY=100;var d=new WeakSet;class f extends i.BasePlugin{constructor(){super(...arguments),l(this,d),(0,s.default)(this,"boundaries",null),(0,s.default)(this,"callback",null),(0,s.default)(this,"listening",!1)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return c}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>u(this,d,p).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>u(this,d,p).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let r=0,n=0;t<this.boundaries.top?n=t-this.boundaries.top:t>this.boundaries.bottom&&(n=t-this.boundaries.bottom),e<this.boundaries.left?r=e-this.boundaries.left:e>this.boundaries.right&&(r=e-this.boundaries.right),this.callback(r,n)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function p(e){if((0,o.isRightClick)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,r)=>{var n,s;const i=null!==(n=t.scrollLeft)&&void 0!==n?n:t.scrollX,o=null!==(s=t.scrollTop)&&void 0!==s?s:t.scrollY;t.scroll(i+50*Math.sign(e),o+20*Math.sign(r))})),this.listen()}t.DragToScroll=f},59910:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16703);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DragToScroll=n.DragToScroll},20877:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=r(98887),u=r(76163),h=r(50426),c=r(12208),d=r(49587),f=r(66496),p=r(51366),g=n(r(54925)),m=r(86373);r(59456);var E=r(66862);function w(e,t){y(e,t),t.add(e)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const v=t.PLUGIN_KEY="dropdownMenu",S=t.PLUGIN_PRIORITY=230,R="changeType",T=v;var N=new WeakMap,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet,L=new WeakSet;class D extends a.BasePlugin{static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[m.COLUMN_LEFT,m.COLUMN_RIGHT,m.SEPARATOR,m.REMOVE_COLUMN,m.SEPARATOR,m.CLEAR_COLUMN,m.SEPARATOR,m.READ_ONLY,m.SEPARATOR,m.ALIGNMENT]}constructor(e){var t,r,n;super(e),w(this,L),w(this,P),w(this,x),w(this,I),w(this,O),w(this,A),w(this,M),w(this,b),w(this,_),(0,s.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null),n={writable:!0,value:!1},y(t=this,r=N),r.set(t,n),this.hot.addHook("afterGetColHeader",((e,t)=>C(this,M,F).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new f.ItemsFactory(this.hot,D.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,L,G).call(e,...r)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,P,Y).call(e,...r)}));const t=this.hot.getSettings()[v],r={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",r),this.itemsFactory.setPredefinedItems(r.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new p.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",(()=>C(this,A,U).call(this))),this.menu.addLocalHook("afterOpen",(()=>C(this,O,V).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>C(this,I,B).call(this,e))),this.menu.addLocalHook("afterClose",(()=>C(this,x,W).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),(0,l.arrayEach)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),r=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),n=this.hot.getCell(-1,t.col,!0),s=n.getBoundingClientRect();this.open({left:s.left+r.left,top:s.top+n.offsetHeight+r.top},{left:s.width}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:T},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:T}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>C(this,b,H).call(this,e)))}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,u.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function k(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function H(e){if(e.stopPropagation(),(0,d.hasClass)(e.target,R)){const t=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),r=e.target.getBoundingClientRect();(0,o.default)(this,N,!1),this.open({left:r.left+t.left,top:r.top+e.target.offsetHeight+3+t.top},{left:r.width})}}function F(e,t){const r=t.parentNode;if(!r)return;const n=r.parentNode.childNodes,s=Array.prototype.indexOf.call(n,r);if(e<0||s!==n.length-1)return;const i=t.querySelector(`.${R}`);if(this.enabled&&i)return;if(!this.enabled)return void(i&&i.parentNode.removeChild(i));const o=this.hot.rootDocument.createElement("button");o.className=R,o.type="button",o.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,d.setAttribute)(o,[(0,E.A11Y_HIDDEN)(),(0,E.A11Y_LABEL)(" ")]),(0,d.setAttribute)(t,[(0,E.A11Y_HASPOPUP)("menu")])),o.onclick=function(){return!1},t.firstChild.insertBefore(o,t.firstChild.firstChild)}function U(){this.hot.runHooks("beforeDropdownMenuShow",this)}function V(){this.hot.runHooks("afterDropdownMenuShow",this),C(this,_,k).call(this,this.menu)}function B(e){C(this,_,k).call(this,e)}function W(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Y(e){return(0,i.default)(this,N)?null:e}function G(e){(0,d.hasClass)(e.target,R)&&(0,o.default)(this,N,!0)}t.DropdownMenu=D,D.SEPARATOR={name:m.SEPARATOR}},82143:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(20877);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DropdownMenu=n.DropdownMenu},39105:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(57691);t.default=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:r,endCol:n}=this._getDataRange(),s=this.options,o=[];return(0,i.rangeEach)(e,r,(e=>{const r=[];!s.exportHiddenRows&&this._isHiddenRow(e)||((0,i.rangeEach)(t,n,(t=>{!s.exportHiddenColumns&&this._isHiddenColumn(t)||r.push(this.hot.getDataAtCell(e,t))})),o.push(r))})),o}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:r}=this._getDataRange(),n=this.hot.getRowHeader();(0,i.rangeEach)(t,r,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(n[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:r}=this._getDataRange(),n=this.hot.getColHeader();(0,i.rangeEach)(t,r,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(n[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[r=0,n=0,s=t,i=e]=this.options.range;return r=Math.max(r,0),n=Math.max(n,0),s=Math.min(s,t),i=Math.min(i,e),{startRow:r,startCol:n,endRow:s,endCol:i}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},33726:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=r(33997),i=n(r(39105)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(54655));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.PLUGIN_KEY="exportFile",u=t.PLUGIN_PRIORITY=240;class h extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:r,rootWindow:n}=this.hot,s=this._createTypeFormatter(e,t),i=this._createBlob(s),o=n.URL||n.webkitURL,a=r.createElement("a"),l=`${s.options.filename}.${s.options.fileExtension}`;if(void 0!==a.download){const e=o.createObjectURL(i);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),r.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),r.body.removeChild(a),setTimeout((()=>{o.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(i,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!o.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,o.default)(e,new i.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=h},57103:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33726);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ExportFile=n.ExportFile},54655:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t,r){if("function"==typeof o[e])return new o[e](t,r);return null};var s=n(r(40202));const i=t.TYPE_CSV="csv",o=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[i]:s.default})},68716:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(37913);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,s.default)(this,"dataProvider",void 0),(0,s.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,i.clone)(this.constructor.DEFAULT_OPTIONS);const r=new Date;return t=(0,i.extend)((0,i.clone)(a.DEFAULT_OPTIONS),t),t=(0,i.extend)(t,e),t.filename=(0,o.substitute)(t.filename,{YYYY:r.getFullYear(),MM:`${r.getMonth()+1}`.padStart(2,"0"),DD:`${r.getDate()}`.padStart(2,"0")}),t}}t.default=a},40202:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),i=r(97639),o=n(r(68716));const a=String.fromCharCode(13),l=String.fromCharCode(34),u=String.fromCharCode(10);class h extends o.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let r=this.dataProvider.getColumnHeaders();const n=r.length>0,i=this.dataProvider.getRowHeaders(),o=i.length>0;let a=e.bom?String.fromCharCode(65279):"";return n&&(r=(0,s.arrayMap)(r,(e=>this._escapeCell(e,!0))),o&&(a+=e.columnDelimiter),a+=r.join(e.columnDelimiter),a+=e.rowDelimiter),(0,s.arrayEach)(t,((t,r)=>{r>0&&(a+=e.rowDelimiter),o&&(a+=this._escapeCell(i[r])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,i.stringify)(e);return""!==r&&(t||r.indexOf(a)>=0||r.indexOf(l)>=0||r.indexOf(u)>=0||r.indexOf(this.options.columnDelimiter)>=0)&&(r=r.replace(new RegExp('"',"g"),'""'),r=`"${r}"`),r}}t.default=h},31168:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(98887),o=r(76163),a=n(r(63806)),l=r(41789);class u{constructor(e,t){let{id:r,stateless:n=!0}=t;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"id",void 0),(0,s.default)(this,"elements",[]),(0,s.default)(this,"hidden",!1),(0,s.default)(this,"stateId",""),(0,s.default)(this,"state",void 0),this.hot=e,this.id=r,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,i.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,i.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=u,(0,o.mixin)(u,a.default)},78884:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s,i=n(r(93231)),o=r(49587),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),u=r(31168),h=r(69346);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function d(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)}var f=new WeakSet;class p extends u.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,f),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:p.BUTTON_OK})),this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:p.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,f,g).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,o.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function g(e,t){t.options.identifier===s.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=p,s=p},9666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(30369),a=r(98887),l=r(49223),u=r(76163),h=E(r(497)),c=r(31168),d=E(r(78327)),f=r(69346),p=r(23335),g=r(41830);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function w(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 y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var C=new WeakSet,v=new WeakSet;class S extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),w(this,v),w(this,C),(0,s.default)(this,"name",""),(0,s.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new p.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>y(this,C,R).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>y(this,v,T).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,u.clone)(e.command);t.name.startsWith(h.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,r)=>{if(r>t.inputsCount-1)return!1;const n=this.getInputElement(r);n.setValue(e),n[t.inputsCount>r?"show":"hide"](),r||this.hot._registerTimeout((()=>n.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,g.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((r,n)=>{e.inputsCount>n&&t.push(r.getValue())})),{command:e,args:t}}updateState(e,t){const r=e?(0,g.getConditionDescriptor)(e.name):(0,g.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:r,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof p.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof f.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,o)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,i.addClass)(l,"htFiltersMenuLabel"),l.textContent=o,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,g.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:r}=e;t=(0,d.default)(this.hot.getDataType(0,r,this.hot.countRows(),r))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function R(e){(0,a.arrayEach)(this.getInputElements(),((t,r)=>{t[e.inputsCount>r?"show":"hide"](),0===r&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function T(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}t.ConditionComponent=S},52387:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(98887),a=r(45561),l=r(31168),u=r(46798),h=r(98986),c=r(19926),d=r(79591),f=r(20498);function p(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)}var g=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),p(this,g),(0,s.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,o.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[h.OPERATION_ID,c.OPERATION_ID];(0,o.arrayEach)(e,(t=>{const r=new f.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,u.getOperationName)(t)},value:t,checked:t===e[0],id:t});r.addLocalHook("change",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,g,E).call(this,e))),this.elements.push(r)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,o.arrayEach)(this.elements,((t,r)=>{t.setChecked(r===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof f.RadioInputUI&&e.isChecked()));return e?e.getValue():h.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,o.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,r=e;r===d.OPERATION_ID&&(r=c.OPERATION_ID),this.state.setValueAtIndex(t,r)}reset(){this.setChecked(0)}}function E(e){this.setState(e.target.value)}t.OperatorsComponent=m},95896:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(30369),a=r(98887),l=r(49223),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),h=r(41902),c=r(31168),d=r(89319),f=r(78327),p=r(41830);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function m(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)}var E=new WeakSet;class w extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,E),(0,s.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,y).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===f.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?f.CONDITION_NONE:f.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,r,n,s,i)=>{const[o]=(0,a.arrayFilter)(r,(e=>e.name===f.CONDITION_BY_VALUE)),l={},c=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS);if(o){const r=(0,h.unifyColumnValues)((0,a.arrayMap)(s(t,i),(e=>e.value)));n&&(o.args[0]=n);const u=[],d=(0,h.intersectValues)(r,o.args[0],c,(e=>{e.checked&&u.push(e.value)})),g=e.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,g).locale,l.args=[u],l.command=(0,p.getConditionDescriptor)(f.CONDITION_BY_VALUE),l.itemsSnapshot=d}else l.args=[],l.command=(0,p.getConditionDescriptor)(f.CONDITION_NONE);this.state.setValueAtIndex(t,l)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,o)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,i.addClass)(l,"htFiltersMenuLabel"),l.textContent=o,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS),t=(0,h.unifyColumnValues)(this._getColumnVisibleValues()),r=(0,h.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(r),super.reset(),this.getMultipleSelectElement().setValue(t);const n=this.hot.getPlugin("filters").getSelectedColumn();null!==n&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,n.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,h.toEmptyString)(e)))}}function y(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}t.ValueComponent=w},80292:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="begins_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,s.stringify)(r))}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},10818:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=u;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(50532),o=r(26943);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="between";function u(e,t){let[r,n]=t,a=r,l=n;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,s.getCondition)(o.CONDITION_NAME,[l]),r=(0,s.getCondition)(i.CONDITION_NAME,[a]);return t(e)&&r(e)}return e.value>=a&&e.value<=l}(0,s.registerCondition)(l,u,{name:n.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},88500:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830),s=r(41902);const i=t.CONDITION_NAME="by_value";function o(e,t){let[r]=t;return r(e.value)}(0,n.registerCondition)(i,o,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,s.createArrayAssertion)(t)]},showOperators:!1})},74025:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="contains";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,s.stringify)(r))>=0}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},50532:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_after";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),i=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)>=0}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26943:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_before";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),i=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)<=0}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},80190:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_today";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_TODAY,inputsCount:0})},91586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_tomorrow";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(-1,"days").startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},40201:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_yesterday";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(1,"days").startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},92912:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(97639);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="empty";function l(e){return(0,i.isEmpty)(e.value)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},52277:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="ends_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,s.stringify)(r))}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},17034:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="eq";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,s.stringify)(r)}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},6828:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830);const s=t.CONDITION_NAME="false";function i(){return!1}(0,n.registerCondition)(s,i,{name:"False"})},74642:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="gt";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},81970:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="gte";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},16323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="lt";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},46070:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="lte";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},71063:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="none";function a(){return!0}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},30730:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(10818);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_between";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},35227:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(74025);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_contains";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},11535:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(92912);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_empty";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},76514:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(17034);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="neq";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},53323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830);const s=t.CONDITION_NAME="true";function i(){return!0}(0,n.registerCondition)(s,i,{name:"True"})},75207:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(98887),o=r(76163),a=r(45561),l=n(r(63806)),u=r(41830),h=r(98986),c=r(46798),d=r(97639),f=r(41789);const p="ConditionCollection.filteringStates";class g{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"isMapRegistrable",void 0),(0,s.default)(this,"filteringStates",new f.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(p,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var r;const n=this.filteringStates.getValueAtIndex(t),s=null!==(r=null==n?void 0:n.conditions)&&void 0!==r?r:[],i=null==n?void 0:n.operation;return this.isMatchInConditions(s,e,i)}isMatchInConditions(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID;return!e.length||(0,c.getOperationFunc)(r)(e,t)}addCondition(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID,n=arguments.length>3?arguments[3]:void 0;const s=this.hot.getCellMeta(0,e).locale,o=(0,i.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(s):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const f=this.getOperation(e);if(f){if(f!==r)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${f}\`\x20
|
965
|
+
numeric format. Cannot do the calculation.`);return s}}function w(){this.endpoints.initEndpoints()}function y(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function C(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=E},95883:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(98887),o=r(31990);t.default=class{constructor(e,t){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"endpoints",[]),(0,s.default)(this,"settings",void 0),(0,s.default)(this,"settingsType","array"),(0,s.default)(this,"currentEndpoint",null),(0,s.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let r=e;if(r||"function"!=typeof this.settings)return r||(r=this.settings),(0,i.arrayEach)(r,(e=>{const r={};this.assignSetting(e,r,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,r,"reversedRowCoords",!1),this.assignSetting(e,r,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,r,"sourceColumn",e.destinationColumn),this.assignSetting(e,r,"type","sum"),this.assignSetting(e,r,"forceNumeric",!1),this.assignSetting(e,r,"suppressDataTypeErrors",!0),this.assignSetting(e,r,"customFunction",null),this.assignSetting(e,r,"readOnly",!0),this.assignSetting(e,r,"roundFloat",!1),t.push(r)})),t;this.settingsType="function"}assignSetting(e,t,r,n){if("ranges"!==r||void 0!==e[r]){if("ranges"!==r||0!==e[r].length)if(void 0===e[r]){if(n instanceof Error)throw n;t[r]=n}else"destinationRow"===r&&t.reversedRowCoords?t[r]=this.hot.countRows()-e[r]-1:t[r]=e[r]}else t[r]=n}resetSetupBeforeStructureAlteration(e,t,r){if("function"!==this.settingsType)return;const n=e.indexOf("row")>-1?"row":"col",s=this.getAllEndpoints();(0,i.arrayEach)(s,(s=>{"row"===n&&s.destinationRow>=t&&("insert_row"===e?s.alterRowOffset=r:"remove_row"===e&&(s.alterRowOffset=-1*r)),"col"===n&&s.destinationColumn>=t&&("insert_col"===e?s.alterColumnOffset=r:"remove_col"===e&&(s.alterColumnOffset=-1*r))})),this.resetAllEndpoints(s,!1)}resetSetupAfterStructureAlteration(e,t,r,n,s){let o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,u=this.getAllEndpoints(),h=0===e.indexOf("move_row"),c=t;(0,i.arrayEach)(u,(e=>{"row"===a&&e.destinationRow>=c&&(e.alterRowOffset=l*r),"col"===a&&e.destinationColumn>=c&&(e.alterColumnOffset=l*r)})),this.resetAllEndpoints(u,!h),h?(0,i.arrayEach)(u,(e=>{this.extendEndpointRanges(e,c,n[0],n.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,i.arrayEach)(u,(e=>{this.shiftEndpointCoordinates(e,c)})),o&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,r,n){(0,i.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?r>e[1]?e[1]+=n:r<e[0]&&(e[0]-=n):r>=e[0]&&r<=e[1]&&(e[1]-=n,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,r=[],n=[];(0,i.arrayEach)(t,(e=>{const t=[];if(e[1])for(let r=e[0];r<=e[1];r++)t.push(this.hot.toPhysicalRow(r));else t.push(this.hot.toPhysicalRow(e[0]));n.push(t)})),(0,i.arrayEach)(n,(e=>{let t=[];(0,i.arrayEach)(e,((n,s)=>{0===s?t.push(n):e[s]!==e[s-1]+1&&(t.push(e[s-1]),r.push(t),t=[],t.push(n)),s===e.length-1&&(t.push(n),r.push(t))}))})),e.ranges=r}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,i.arrayEach)(e.ranges,(r=>{(0,i.arrayEach)(r,((n,s)=>{n>=t&&(r[s]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,r=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+r>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,i.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,i.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,i.arrayEach)(e,((e,r,n)=>{`${e[2]||""}`!=`${e[3]}`&&(0,i.arrayEach)(this.getAllEndpoints(),((e,s)=>{this.hot.propToCol(n[r][1])===e.sourceColumn&&-1===t.indexOf(s)&&t.push(s)}))})),(0,i.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const r=e.alterRowOffset||0,n=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?r:0)),this.hot.toVisualColumn(e.destinationColumn+(t?n:0)),""])}setEndpointValue(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const s=this.hot.toVisualRow(e.destinationRow);if(null!==s){const r=this.hot.getCellMeta(s,e.destinationColumn);"init"!==t&&r.readOnly===e.readOnly||(r.readOnly=e.readOnly,r.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let r=0;Number.isInteger(t)&&(r=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(r)}r?this.hot.setDataAtCell(n,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([n,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,o.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},75001:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(83659);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ColumnSummary=n.ColumnSummary},1178:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},4780:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(49587);class o{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,s.default)(this,"rootDocument",void 0),(0,s.default)(this,"isRtl",!1),(0,s.default)(this,"container",null),(0,s.default)(this,"editor",void 0),(0,s.default)(this,"editorStyle",void 0),(0,s.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const r=this.getInputElement();r.style.width=`${e}px`,r.style.height=`${t}px`}}getSize(){return{width:(0,i.outerWidth)(this.getInputElement()),height:(0,i.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,i.addClass)(this.container,o.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,i.addClass)(e,o.CLASS_EDITOR),(0,i.addClass)(t,o.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${o.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}t.default=o},47477:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(49587),l=r(30369),u=r(76163),h=r(33997),c=n(r(4780)),d=n(r(68666)),f=r(86373),p=n(r(46422)),g=n(r(45317)),m=n(r(86191));function E(e,t){y(e,t),t.add(e)}function w(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(68581);const v=t.PLUGIN_KEY="comments",S=t.PLUGIN_PRIORITY=60,R=t.META_COMMENT="comment",T=t.META_COMMENT_VALUE="value",N=t.META_STYLE="style",_=t.META_READONLY="readOnly",b=v,M=`plugin:${v}`;var A=new WeakMap,O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakMap,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet;class z extends h.BasePlugin{constructor(){super(...arguments),E(this,j),E(this,G),E(this,Y),E(this,W),E(this,B),E(this,V),E(this,U),E(this,F),E(this,H),E(this,k),(0,s.default)(this,"range",{}),w(this,A,{writable:!0,value:null}),w(this,O,{writable:!0,value:null}),w(this,I,{writable:!0,value:!1}),w(this,x,{writable:!0,value:!1}),w(this,P,{writable:!0,value:{}}),w(this,L,{writable:!0,value:null}),w(this,D,{writable:!0,value:""})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){this.enabled||((0,o.default)(this,A)||(0,i.default)(this,A,new c.default(this.hot.rootDocument,this.hot.isRtl())),(0,o.default)(this,O)||(0,i.default)(this,O,new d.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,r,n,s,i)=>C(this,U,q).call(this,e,i))),this.addHook("afterScroll",(()=>C(this,j,re).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>C(this,G,te).call(this,e))),(0,o.default)(this,O).addLocalHook("hide",(()=>this.hide())),(0,o.default)(this,O).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,o.default)(this,O).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),r=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,i.default)(this,x,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,i.default)(this,x,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,o.default)(this,A).isVisible()},group:b}),r.addShortcut({keys:[["Escape"]],callback:()=>{(0,o.default)(this,A).setValue((0,o.default)(this,D)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,o.default)(this,A).isVisible()},group:b}),r.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,o.default)(this,A).isVisible()},group:b})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(b)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>C(this,H,K).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>C(this,k,$).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>C(this,F,X).call(this))),this.eventManager.addEventListener(t,"focus",(()=>C(this,B,Z).call(this))),this.eventManager.addEventListener(t,"blur",(()=>C(this,V,Q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>C(this,W,J).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>C(this,Y,ee).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,o.default)(this,A).getValue();let r="";null!=e?r=e:null!=t&&(r=t);const n=this.range.from.row,s=this.range.from.col;this.updateCommentMeta(n,s,{[T]:r}),this.hot.render()}setCommentAtCell(e,t,r){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(r)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(r)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,T)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,T)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:r}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||r<0||r>this.hot.countSourceCols()-1)return!1;const n=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,o.default)(this,O).cancelHiding(),(0,o.default)(this,A).setValue(null!==(e=n[R]?n[R][T]:null)&&void 0!==e?e:""),(0,o.default)(this,A).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,o.default)(this,A).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,o.default)(this,A).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:n}=this.hot,{row:s,col:i}=this.range.from;let l=r.getRenderableFromVisualIndex(s),u=n.getRenderableFromVisualIndex(i);const h=null===l;(0,o.default)(this,A).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,-1))),null===u&&(u=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i,-1)));const c=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:f,view:{_wt:p}}=this.hot,{wtTable:g}=p,m=p.getCell({row:l,col:u},!0),E=this.getCommentMeta(s,i,N);E?(0,o.default)(this,A).setSize(E.width,E.height):(0,o.default)(this,A).resetSize();const w=d?0:g.getStretchedColumnWidth(u),y=h&&!c?(0,a.outerHeight)(m):0,{left:C,top:v,width:S,height:R}=m.getBoundingClientRect(),{width:T,height:b}=(0,o.default)(this,A).getSize(),{innerWidth:M,innerHeight:O}=this.hot.rootWindow,I=this.hot.rootDocument.documentElement;let x=C+f.scrollX+w,P=v+f.scrollY+y;this.hot.isRtl()&&(x-=T+w),this.hot.isLtr()&&C+S+T>M?x=C+f.scrollX-T-1:this.hot.isRtl()&&x<-(I.scrollWidth-I.clientWidth)&&(x=C+f.scrollX+w+1),v+b>O&&(P-=b-R+1),(0,o.default)(this,A).setPosition(x,P),(0,o.default)(this,A).setReadOnlyState(this.getCommentMeta(s,i,_))}focusEditor(){(0,o.default)(this,A).focus()}updateCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t)[R];let s;n?(s=(0,u.deepClone)(n),(0,u.deepExtend)(s,r)):s=r,this.hot.setCellMeta(e,t,R,s)}getCommentMeta(e,t,r){const n=this.hot.getCellMeta(e,t);if(n[R])return n[R][r]}addToContextMenu(e){e.items.push({name:f.SEPARATOR},(0,p.default)(this),(0,g.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[v];if((0,u.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,o.default)(this,A).getInputElement()}destroy(){(0,o.default)(this,A)&&(0,o.default)(this,A).destroy(),(0,o.default)(this,O)&&(0,o.default)(this,O).destroy(),super.destroy()}}function $(e){if(this.hot.view&&this.hot.view._wt&&!(0,o.default)(this,I)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let r=null;t&&(r=this.hot.getCoords(t)),(!t||this.range.from&&r&&(this.range.from.row!==r.row||this.range.from.col!==r.col))&&this.hide()}}function K(e){const{rootDocument:t}=this.hot;if(!((0,o.default)(this,I)||(0,o.default)(this,A).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,o.default)(this,L)===e.target)&&(0,o.default)(this,A))if((0,i.default)(this,L,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,o.default)(this,O).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,o.default)(this,O).hide()}function X(){(0,i.default)(this,I,!1)}function q(e,t){t[R]&&t[R][T]&&(0,a.addClass)(e,t.commentedCellClassName)}function Q(){(0,i.default)(this,D,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Z(){(0,i.default)(this,D,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function J(e){(0,i.default)(this,P,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function ee(e){const t=(0,a.outerWidth)(e.target),r=(0,a.outerHeight)(e.target);t===(0,o.default)(this,P).width+1&&r===(0,o.default)(this,P).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[N]:{width:t,height:r}})}function te(e){(0,o.default)(this,A).isVisible()&&(0,l.stopImmediatePropagation)(e)}function re(){(0,o.default)(this,x)||this.hide()}t.Comments=z},46422:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const r=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=r&&r.isCell()&&e.getCommentAtCell(r.row,r.col)?this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},86191:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((t,r)=>e.getCommentMeta(t,r,i.META_READONLY)))?(0,s.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{if(t>=0&&r>=0){const n=!!e.getCommentMeta(t,r,i.META_READONLY);e.updateCommentMeta(t,r,{[i.META_READONLY]:!n})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(12208),i=r(47477);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}},45317:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,r)=>{t>=0&&r>=0&&e.removeCommentAtCell(t,r,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},68666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(46029),o=r(76163),a=n(r(63806));class l{constructor(e){(0,s.default)(this,"wasLastActionShow",!0),(0,s.default)(this,"showDebounced",null),(0,s.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,i.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,o.mixin)(l,a.default);t.default=l},70013:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47477);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Comments=n.Comments},50426:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517),r(57270);var s=n(r(93231)),i=r(98887),o=r(76163);t.CommandExecutor=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"commands",{}),(0,s.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];const s=e.split(":"),a=s[0],l=2===s.length?s[1]:null;let u=this.commands[a];if(!u)throw new Error(`Menu command '${a}' not exists.`);if(l&&u.submenu&&(u=function(e,t){let r;return(0,i.arrayEach)(t,(t=>{const n=t.key?t.key.split(":"):null;if(Array.isArray(n)&&n[1]===e)return r=t,!1})),r}(l,u.submenu.items)),!0===u.disabled)return;if("function"==typeof u.disabled&&!0===u.disabled.call(this.hot))return;if((0,o.hasOwnProperty)(u,"submenu"))return;const h=[];"function"==typeof u.callback&&h.push(u.callback),"function"==typeof this.commonCallback&&h.push(this.commonCallback),r.unshift(s.join(":")),(0,i.arrayEach)(h,(e=>e.apply(this.hot,r)))}}},32082:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=n(r(54925)),a=r(98887),l=r(76163),u=r(50426),h=r(66496),c=r(51366),d=r(12208),f=r(49587),p=r(86373);function g(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 m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(79498);const E=t.PLUGIN_KEY="contextMenu",w=t.PLUGIN_PRIORITY=70,y=E;o.default.getSingleton().register("afterContextMenuDefaultOptions"),o.default.getSingleton().register("beforeContextMenuShow"),o.default.getSingleton().register("afterContextMenuShow"),o.default.getSingleton().register("afterContextMenuHide"),o.default.getSingleton().register("afterContextMenuExecute");var C=new WeakSet,v=new WeakSet,S=new WeakSet,R=new WeakSet;class T extends i.BasePlugin{constructor(){super(...arguments),g(this,R),g(this,S),g(this,v),g(this,C),(0,s.default)(this,"commandExecutor",new u.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return w}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[p.ROW_ABOVE,p.ROW_BELOW,p.SEPARATOR,p.COLUMN_LEFT,p.COLUMN_RIGHT,p.SEPARATOR,p.REMOVE_ROW,p.REMOVE_COLUMN,p.SEPARATOR,p.UNDO,p.REDO,p.SEPARATOR,p.READ_ONLY,p.SEPARATOR,p.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new c.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,v,_).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,S,b).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),this.addHook("afterOnCellContextMenu",(e=>m(this,C,N).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),r=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+r.left,top:t.top+r.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:y})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(y)}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}prepareMenuItems(){this.itemsFactory=new h.ItemsFactory(this.hot,T.DEFAULT_ITEMS);const e=this.hot.getSettings()[E],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const r=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",r),this.menu.setMenuItems(r),(0,a.arrayEach)(r,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function N(e){const t=this.hot.getSettings(),r=t.rowHeaders,n=t.colHeaders;const s=e.target;if(this.close(),(0,f.hasClass)(s,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!r&&!n&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(s)||(0,f.hasClass)(s,"current")&&(0,f.hasClass)(s,"wtBorder")))return;const i=(0,d.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+i.top,left:e.clientX+i.left})}function _(){this.hot.runHooks("beforeContextMenuShow",this)}function b(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=T,T.SEPARATOR={name:p.SEPARATOR}},22031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(32082);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ContextMenu=n.ContextMenu},66496:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(76163),o=r(98887),a=r(86373);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,s.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,i.objectEach)(e,((e,r)=>{let n="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,n=a.SEPARATOR):isNaN(parseInt(r,10))?(e.key=void 0===e.key?r:e.key,t[r]=e,n=e.key):(t[e.key]=e,n=e.key),this.defaultOrderPattern.push(n)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let s=e;s&&s.items?s=s.items:Array.isArray(s)||(s=t);(0,i.isObject)(s)?(0,i.objectEach)(s,((e,t)=>{let s=r["string"==typeof e?e:t];s||(s=e),(0,i.isObject)(e)?(0,i.extend)(s,e):"string"==typeof s&&(s={name:s}),void 0===s.key&&(s.key=t),n.push(s)})):(0,o.arrayEach)(s,((e,t)=>{let s=r[e];!s&&a.ITEMS.indexOf(e)>=0||(s||(s={name:e,key:`${t}`}),(0,i.isObject)(e)&&(0,i.extend)(s,e),void 0===s.key&&(s.key=t),n.push(s))}));return n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},28787:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.Cursor=class{constructor(e,t){(0,s.default)(this,"top",void 0),(0,s.default)(this,"topRelative",void 0),(0,s.default)(this,"left",void 0),(0,s.default)(this,"leftRelative",void 0),(0,s.default)(this,"scrollTop",void 0),(0,s.default)(this,"scrollLeft",void 0),(0,s.default)(this,"cellHeight",void 0),(0,s.default)(this,"cellWidth",void 0);const r=t.scrollY,n=t.scrollX;let i,o,a,l,u,h;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),a=parseInt(e.left,10),u=e.height||0,h=e.width||0,o=i,l=a,i+=r,a+=n):"event"===this.type&&(i=parseInt(e.pageY,10),a=parseInt(e.pageX,10),u=e.target.clientHeight,h=e.target.clientWidth,o=i-r,l=a-n),this.top=i,this.topRelative=o,this.left=a,this.leftRelative=l,this.scrollTop=r,this.scrollLeft=n,this.cellHeight=u,this.cellWidth=h}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},26235:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const r=e.openSubMenu(t[0]);r&&r.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=e.hotMenu.getSelectedLast();r&&(e.hotMenu.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},51366:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(37081);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===n[e]||(t[e]=n[e]))}))},37081:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(77600),l=r(83820),u=r(71227),h=r(86373),c=r(79084),d=n(r(57340)),f=r(98887),p=r(78498),g=r(49587),m=r(30369),E=r(46029),w=r(97639),y=r(76163),C=n(r(63806)),v=r(25839),S=r(66862);function R(e,t,r){!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,r)}var T=new WeakMap,N=new WeakMap;class _{constructor(e,t){var r=this;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",void 0),(0,s.default)(this,"eventManager",new d.default(this)),(0,s.default)(this,"container",void 0),(0,s.default)(this,"positioner",void 0),(0,s.default)(this,"hotMenu",null),(0,s.default)(this,"hotSubMenus",{}),(0,s.default)(this,"parentMenu",void 0),(0,s.default)(this,"menuItems",null),(0,s.default)(this,"origOutsideClickDeselects",null),R(this,T,{writable:!0,value:void 0}),R(this,N,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,g.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,o.default)(this,T)}getKeyboardShortcutsCtrl(){return(0,o.default)(this,N)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,E.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let r=!1,n=(0,f.arrayFilter)(this.menuItems,(e=>(e.key===h.NO_ITEMS&&(r=!0),(0,c.isItemHidden)(e,this.hot))));if(n.length<1&&!r)n.push((0,h.predefinedItems)()[h.NO_ITEMS]);else if(0===n.length)return;n=(0,c.filterSeparators)(n,h.SEPARATOR);let s=!1;const a={data:n,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,w.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,v.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,o.default)(this,T).setCurrentPage(t.row)},afterOnCellMouseOver:(t,r)=>{this.isAllSubMenusClosed()?e(r.row):this.openSubMenu(r.row)},rowHeights:e=>n[e].name===h.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,p.isWindowsOS)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,r,n,s)=>{this.hotMenu.view.isMouseDown()&&(s.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,p.isWindowsOS)()&&(0,m.isRightClick)(e)||!s||!this.hasSelectedItem()||((0,p.isMobileBrowser)()||(0,p.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,i.default)(this,T,(0,l.createMenuNavigator)(this.hotMenu)),(0,i.default)(this,N,(0,u.createKeyboardShortcutsCtrl)(this)),(0,o.default)(this,N).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,o.default)(this,T).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,g.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,c.hasSubMenu)(t))return!1;const r=this.hotMenu.getSourceDataAtRow(e),n=new _(this.hot,{parent:this,name:r.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return n.setMenuItems(r.submenu.items),n.open(),n.setPosition(t.getBoundingClientRect()),this.hotSubMenus[r.key]=n,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!0)]),n}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),r=this.hotSubMenus[t.key];if(r){r.destroy(),delete this.hotSubMenus[t.key];const n=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,g.setAttribute)(n,[(0,S.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,f.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const r=this.hot.getSelectedRange(),n=r?(0,c.normalizeSelection)(r):[];this.runLocalHooks("executeCommand",t.key,n,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,n,e)}isCommandPassive(e){return!1===e.isCommand||(0,c.isItemSeparator)(e)||(0,c.isItemDisabled)(e,this.hot)||(0,c.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let r,n=e;return n&&((0,E.isFunction)(n)&&(n=n.call(this.hot),n=null===n||(0,w.isUndefined)(n)?"":n.toString()),n=n.replace(/[^A-z0-9]/g,"_"),n=`${this.options.className}Sub_${n}`,r=t.querySelector(`.${this.options.className}.${n}`)),r||(r=t.createElement("div"),(0,g.addClass)(r,`htMenu ${this.options.className}`),n&&(0,g.addClass)(r,n),this.options.container.appendChild(r)),r}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,r=e.hider.style,n=e.holder.style,s=parseInt(r.width,10),i=(0,f.arrayReduce)(t,((e,t)=>e+(t.name===h.SEPARATOR?1:26)),0);n.width=`${s+3}px`,n.height=`${i+3}px`,r.height=n.height,this.hot.getSettings().ariaTags&&(0,g.setAttribute)(this.hotMenu.rootElement,[(0,S.A11Y_MENU)(),(0,S.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,g.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,g.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,g.hasClass)(e.target,"htCore")&&(0,g.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=_,(0,y.mixin)(_,C.default)},25839:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,r,o,a,l,u)=>{if(r.hasAttribute("ghost-table"))return;const h=t.getSourceDataAtRow(o),c=e.rootDocument.createElement("div"),d="function"==typeof u?u.call(e):u;if((0,s.empty)(r),(0,s.addClass)(c,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,n.isItemDisabled)(h,e)&&!(0,n.isItemSelectionDisabled)(h)&&!(0,n.isItemSeparator)(h);(0,s.setAttribute)(r,[(0,i.A11Y_MENU_ITEM)(),(0,i.A11Y_LABEL)(d),...t?[(0,i.A11Y_TABINDEX)(-1)]:[],...(0,n.isItemDisabled)(h,e)?[(0,i.A11Y_DISABLED)()]:[],...(0,n.isItemSubMenu)(h)?[(0,i.A11Y_EXPANDED)(!1)]:[]])}r.className="",r.appendChild(c),(0,n.isItemSeparator)(h)?(0,s.addClass)(r,"htSeparator"):"function"==typeof h.renderer?((0,s.addClass)(r,"htCustomMenuRenderer"),r.appendChild(h.renderer(t,c,o,a,l,d))):(0,s.fastInnerHTML)(c,d),(0,n.isItemDisabled)(h,e)?(0,s.addClass)(r,"htDisabled"):(0,n.isItemSelectionDisabled)(h)?(0,s.addClass)(r,"htSelectionDisabled"):(0,n.isItemSubMenu)(h)&&(0,s.addClass)(r,"htSubmenu")}};var n=r(79084),s=r(49587),i=r(66862)},83820:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,n.createPaginator)({size:()=>e.countRows(),onItemSelect(t,r){const n=e.getCell(t,0);if(!n||(0,s.isSeparator)(n)||(0,s.isDisabled)(n)||(0,s.isSelectionDisabled)(n))return!1;e.selectCell(t,0,...r?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var n=r(99850),s=r(79084)},77600:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(28787);function a(e,t,r){!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,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:!1}),a(this,d,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,i.default)(this,c,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,s.default)(this,d)[e]=t,this}setElement(e){return(0,i.default)(this,l,e),this}setParentElement(e){return(0,i.default)(this,u,e),this}updatePosition(e){(0,i.default)(this,h,new o.Cursor(e,(0,s.default)(this,l).ownerDocument.defaultView)),(0,s.default)(this,c)?((0,s.default)(this,h).fitsBelow((0,s.default)(this,l))?this.setPositionBelowCursor():(0,s.default)(this,h).fitsAbove((0,s.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,s.default)(this,l).dir?(0,s.default)(this,h).fitsOnLeft((0,s.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,s.default)(this,h).fitsOnRight((0,s.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,s.default)(this,d).above+(0,s.default)(this,h).top-(0,s.default)(this,l).offsetHeight;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top+(0,s.default)(this,h).cellHeight-(0,s.default)(this,l).offsetHeight+3),(0,s.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,s.default)(this,d).below+(0,s.default)(this,h).top+1;(0,s.default)(this,u)&&(e=(0,s.default)(this,h).top-1),(0,s.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,s.default)(this,h).left;if((0,s.default)(this,u)){const{right:t}=(0,s.default)(this,u).getBoundingClientRect();e+=(0,s.default)(this,h).cellWidth+t-((0,s.default)(this,h).left+(0,s.default)(this,h).cellWidth)}else e+=(0,s.default)(this,d).right;(0,s.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,s.default)(this,d).left+(0,s.default)(this,h).left-(0,s.default)(this,l).offsetWidth;if((0,s.default)(this,u)){const{left:t}=(0,s.default)(this,u).getBoundingClientRect();e-=(0,s.default)(this,h).left-t}(0,s.default)(this,l).style.left=`${e}px`}}},71227:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];function o(e,t){u(t).addShortcuts(e,{group:s})}function a(e,t){const n=u(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>n.removeShortcutsByKeys(e)))})),r.push({shortcuts:e,contextName:t}),o(e,t)}function l(e){return e?`${i}:${e}`:i}function u(t){var r;const n=e.hotMenu.getShortcutManager(),s=l(t);return null!==(r=n.getContext(s))&&void 0!==r?r:n.addContext(s)}return o((0,n.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:r}=e;a(t,r)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...r]},getContext:u,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},r(63517);var n=r(26235);const s="menu",i=s},79084:(e,t,r)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.SEPARATOR,r=e.slice(0);return r=a(r,t),r=function(e,t){let r=e.slice(0);return r.reverse(),r=a(r,t),r.reverse(),r}(r,t),r=function(e){const t=[];return(0,n.arrayEach)(e,((e,r)=>{r>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(r),r},t.hasSubMenu=function(e){return(0,i.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,i.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,s.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(o.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,s.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,i.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,i.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,n.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},r(63517);var n=r(98887),s=r(76163),i=r(49587),o=r(86373);function a(e,t){const r=e.slice(0);for(let e=0;e<r.length&&r[e].name===t;)r.shift();return r}},94328:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htLeft"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htLeft";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htCenter"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htCenter";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htRight"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htRight";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htJustify"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="horizontal",s="htJustify";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{name:s.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htTop"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htTop";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htMiddle"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htMiddle";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const r=this.getCellMeta(e,t).className;if(r&&-1!==r.indexOf("htBottom"))return!0}))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),r="vertical",s="htBottom";this.runHooks("beforeCellAlignment",t,e,r,s),(0,n.align)(e,r,s,((e,t)=>this.getCellMeta(e,t)),((e,t,r,n)=>this.setCellMeta(e,t,r,n))),this.render()},disabled:!1}]}}};var n=r(12208),s=r(71273),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.KEY="alignment"},5026:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const r=t[0].start.col,n=t[0].end.col;this.countRows()&&this.populateFromArray(0,r,[[null]],Math.max(t[0].start.row,t[0].end.row),n,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="clear_column"},36200:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="col_left"},11374:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="col_right"},86373:(e,t,r)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===y.indexOf(e)&&(C[e]=t)},t.predefinedItems=function(){const e={};return(0,n.objectEach)(C,((t,r)=>{e[r]=t()})),e};var n=r(76163),s=w(r(94328));t.ALIGNMENT=s.KEY;var i=w(r(5026));t.CLEAR_COLUMN=i.KEY;var o=w(r(36200));t.COLUMN_LEFT=o.KEY;var a=w(r(11374));t.COLUMN_RIGHT=a.KEY;var l=w(r(65732));t.READ_ONLY=l.KEY;var u=w(r(35656));t.REDO=u.KEY;var h=w(r(28074));t.REMOVE_COLUMN=h.KEY;var c=w(r(34146));t.REMOVE_ROW=c.KEY;var d=w(r(83487));t.ROW_ABOVE=d.KEY;var f=w(r(54869));t.ROW_BELOW=f.KEY;var p=w(r(71273));t.SEPARATOR=p.KEY;var g=w(r(63676));t.NO_ITEMS=g.KEY;var m=w(r(51159));function E(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(E=function(e){return e?r:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=E(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}t.UNDO=m.KEY;const y=t.ITEMS=[d.KEY,f.KEY,o.KEY,a.KEY,i.KEY,c.KEY,h.KEY,m.KEY,u.KEY,l.KEY,s.KEY,p.KEY,g.KEY],C={[p.KEY]:p.default,[g.KEY]:g.default,[d.KEY]:d.default,[f.KEY]:f.default,[o.KEY]:o.default,[a.KEY]:a.default,[i.KEY]:i.default,[c.KEY]:c.default,[h.KEY]:h.default,[m.KEY]:m.default,[u.KEY]:u.default,[l.KEY]:l.default,[s.KEY]:s.default}},63676:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:s,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var n=r(497);const s=t.KEY="no_items"},65732:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_READ_ONLY);return(0,n.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,n.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,n.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,s.arrayEach)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&this.setCellMeta(e,r,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var n=r(12208),s=r(98887),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.KEY="make_read_only"},35656:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="redo"},28074:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,n.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.KEY="remove_col"},34146:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:o,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[r,,n]=e[0];r-n!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,n.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var n=r(7763),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.KEY="remove_row"},83487:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="row_above"},54869:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="row_below"},71273:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:r}};const r=t.KEY="---------"},51159:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}const i=t.KEY="undo"},12208:(e,t,r)=>{"use strict";t.__esModule=!0,t.align=function(e,t,r,o,a){(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&function(e,t,r,n,o,a){const l=o(e,t);let u=n;l.className&&(u="vertical"===r?s(l.className,n):i(l.className,n));a(e,t,"className",u)}(e,n,t,r,o,a)}))}))},t.checkSelectionConsistency=function(e,t){let r=!1;Array.isArray(e)&&(0,n.arrayEach)(e,(e=>(e.forAll(((e,n)=>{if(e>=0&&n>=0&&t(e,n))return r=!0,!1})),r)));return r},t.getAlignmentClasses=function(e,t){const r={};return(0,n.arrayEach)(e,(e=>{e.forAll(((e,n)=>{e>=0&&n>=0&&(r[e]||(r[e]=[]),r[e][n]=t(e,n))}))})),r},t.getDocumentOffsetByElement=function(e,t){const r={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:n,left:s}=e.getBoundingClientRect();r.top=n,r.left=s}return r},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=i,t.prepareVerticalAlignClass=s;var n=r(98887);function s(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},55105:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},72078:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497)},80771:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},22050:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},15742:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,s.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=r(497),s=r(57691)},54475:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},47771:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=n(r(54925)),u=r(32313),h=r(98887),c=r(37913),d=r(49587),f=r(78498),p=n(r(72078)),g=n(r(80771)),m=n(r(22050)),E=n(r(15742)),w=n(r(54475)),y=n(r(16806)),C=r(98023),v=r(65795);function S(e,t){T(e,t),t.add(e)}function R(e,t,r){T(e,t),t.set(e,r)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const _=t.PLUGIN_KEY="copyPaste",b=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],A=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakMap,k=new WeakMap,H=new WeakMap,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet,z=new WeakSet,$=new WeakSet;class K extends a.BasePlugin{constructor(){super(...arguments),S(this,$),S(this,z),S(this,j),S(this,G),S(this,Y),S(this,W),S(this,B),S(this,V),S(this,U),S(this,F),(0,s.default)(this,"columnsLimit",1/0),(0,s.default)(this,"rowsLimit",1/0),(0,s.default)(this,"pasteMode","overwrite"),(0,s.default)(this,"uiContainer",this.hot.rootDocument.body),R(this,O,{writable:!0,value:!1}),R(this,I,{writable:!0,value:!1}),R(this,x,{writable:!0,value:!1}),R(this,P,{writable:!0,value:"cells-only"}),R(this,L,{writable:!0,value:!1}),R(this,D,{writable:!0,value:!1}),R(this,k,{writable:!0,value:new C.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),R(this,H,{writable:!0,value:!1}),(0,s.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return _}static get SETTING_KEYS(){return[_,...M]}static get PLUGIN_PRIORITY(){return b}isEnabled(){return!!this.hot.getSettings()[_]}enablePlugin(){var e=this;if(this.enabled)return;const{[_]:t}=this.hot.getSettings();var r,n;"object"==typeof t&&(this.pasteMode=null!==(r=t.pasteMode)&&void 0!==r?r:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,o.default)(this,O,!!t.copyColumnHeaders),(0,o.default)(this,I,!!t.copyColumnGroupHeaders),(0,o.default)(this,x,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(n=t.uiContainer)&&void 0!==n?n:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>N(this,W,J).call(this,e))),this.addHook("afterSelection",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,Y,ee).call(e,...r)})),this.addHook("afterSelectionEnd",(()=>N(this,G,te).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,f.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,j,re).call(e,...r)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return N(e,z,ne).call(e,...r)})),this.addHook("afterSelection",(()=>N(this,$,se).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,o.default)(this,P,e),(0,o.default)(this,L,!0),N(this,F,X).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,o.default)(this,D,!0),N(this,F,X).call(this,"cut")}getRangedCopyableData(e){return(0,u.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:r,columns:n}=(0,C.normalizeRanges)(e);return(0,h.arrayEach)(r,(e=>{const r=[];(0,h.arrayEach)(n,(t=>{e<0?r.push(this.hot.getColHeader(t,e)):r.push(this.hot.getCopyableData(e,t))})),t.push(r)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const r=new y.default;e&&r.clipboardData.setData("text/plain",e),t&&r.clipboardData.setData("text/html",t),this.onPaste(r)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,i.default)(this,k).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,i.default)(this,P)?t.set("headers",(0,i.default)(this,k).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,i.default)(this,P)?t.set("headers",(0,i.default)(this,k).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,i.default)(this,P)&&t.set("headers",(0,i.default)(this,k).getAllColumnHeadersRange()),t.set("cells",(0,i.default)(this,k).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:r,endRow:n,endCol:s}=e;return{startRow:t,startCol:r,endRow:n,endCol:s}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const r=t.get("cells");if(null!==r&&r.isRangeTrimmed){const{startRow:e,startCol:t,endRow:n,endCol:s}=r;this.hot.runHooks("afterCopyLimit",n-e+1,s-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const r=e.length,n=e[0].length,s=[],{row:i,col:a}=t.getTopStartCorner(),{row:l,col:u}=t.getBottomEndCorner();let h=i,c=a,d=i,f=a;for(;s.length<r||h<=l;){const{skipRowOnPaste:t,visualRow:o}=this.hot.getCellMeta(h,a);if(h=o+1,!0===t)continue;d=o,c=a;const l=[],p=s.length%r;for(;l.length<n||c<=u;){const{skipColumnOnPaste:t,visualCol:r}=this.hot.getCellMeta(i,c);if(c=r+1,!0===t)continue;f=r;const s=l.length%n;l.push(e[p][s])}s.push(l)}return(0,o.default)(this,H,!0),this.hot.populateFromArray(i,a,s,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,a,d,f]}onCopy(e){if(!this.hot.isListening()&&!(0,i.default)(this,L)||this.isEditorOpened())return;this.setCopyableText(),(0,o.default)(this,L,!1);const t=this.getRangedData(this.copyableRanges),r=N(this,U,q).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,r)){const n=(0,u.stringify)(t);if(e&&e.clipboardData){const r=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",n),e.clipboardData.setData("text/html",[A,r].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",n);this.hot.runHooks("afterCopy",t,this.copyableRanges,r)}(0,o.default)(this,P,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,i.default)(this,D)||this.isEditorOpened())return;this.setCopyableText(),(0,o.default)(this,D,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const r=(0,u.stringify)(t);if(e&&e.clipboardData){const n=(0,v._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",r),e.clipboardData.setData("text/html",[A,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",r);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const r=(0,c.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(r&&/(<table)|(<TABLE)/g.test(r)){t=(0,v.htmlToGridSettings)(r,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,u.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[r,n,s,i]=this.populateValues(t);this.hot.selectCell(r,n,Math.min(this.hot.countRows()-1,s),Math.min(this.hot.countCols()-1,i)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function X(e){if((0,f.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:r,col:n}=t.highlight,s=this.hot.getCell(r,n,!0);s&&(0,d.runWithSelectedContendEditableElement)(s,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function q(e){const{rows:t}=(0,C.normalizeRanges)(e);let r=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)r+=1;return{columnHeadersCount:r}}function Q(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);n&&(0,d.makeElementContentEditableAndSelectItsContent)(n)}}}function Z(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:r}=e.highlight,n=this.hot.getCell(t,r,!0);null!=n&&n.hasAttribute("contenteditable")&&(0,d.removeContentEditableFromElementAndDeselect)(n)}}}function J(e){e.items.push({name:"---------"},(0,p.default)(this)),(0,i.default)(this,O)&&e.items.push((0,E.default)(this)),(0,i.default)(this,I)&&e.items.push((0,m.default)(this)),(0,i.default)(this,x)&&e.items.push((0,g.default)(this)),e.items.push((0,w.default)(this))}function ee(e,t,r,n,s){(0,i.default)(this,H)&&(s.value=!0),(0,o.default)(this,H,!1)}function te(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function re(){N(this,B,Z).call(this)}function ne(){N(this,V,Q).call(this)}function se(){N(this,B,Z).call(this)}t.CopyPaste=K},98023:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],r=[];return(0,o.arrayEach)(e,(e=>{const n=Math.min(e.startRow,e.endRow),s=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(n,s,(e=>{-1===t.indexOf(e)&&t.push(e)}));const i=Math.min(e.startCol,e.endCol),o=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(i,o,(e=>{-1===r.indexOf(e)&&r.push(e)}))})),{rows:t,columns:r}},r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(98887),a=r(57691);function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,E=new WeakMap,w=new WeakSet,y=new WeakSet;function C(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,m).call(this)-1,e))}function v(e,t){return Math.min(t,Math.max(e+(0,s.default)(this,g).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:r,rowsLimit:n,columnsLimit:s,countColumnHeaders:o}=e;l(this,y),l(this,w),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,g,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:void 0}),u(this,E,{writable:!0,value:void 0}),(0,i.default)(this,f,t),(0,i.default)(this,p,r),(0,i.default)(this,g,n),(0,i.default)(this,m,s),(0,i.default)(this,E,o)}setSelectedRange(e){(0,i.default)(this,d,e)}getCellsRange(){if(0===(0,s.default)(this,f).call(this)||0===(0,s.default)(this,p).call(this))return null;const{row:e,col:t}=(0,s.default)(this,d).getTopStartCorner(),{row:r,col:n}=(0,s.default)(this,d).getBottomEndCorner(),i=c(this,y,v).call(this,e,r),o=c(this,w,C).call(this,t,n);return{isRangeTrimmed:r!==i||n!==o,startRow:e,startCol:t,endRow:i,endCol:o}}getMostBottomColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,w,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-1,startCol:e,endRow:-1,endCol:r}}getAllColumnHeadersRange(){if(0===(0,s.default)(this,p).call(this)||0===(0,s.default)(this,E).call(this))return null;const{col:e}=(0,s.default)(this,d).getTopStartCorner(),{col:t}=(0,s.default)(this,d).getBottomEndCorner(),r=c(this,w,C).call(this,e,t);return{isRangeTrimmed:t!==r,startRow:-(0,s.default)(this,E).call(this),startCol:e,endRow:-1,endCol:r}}}},82630:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(47771);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CopyPaste=n.CopyPaste},16806:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(55105));t.default=class{constructor(){this.clipboardData=new s.default}}},50526:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,s.checkSelectionBorders)(this,"bottom")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"bottom");e.prepareBorder(r,"bottom",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},47586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(50526));t.bottom=s.default;var i=n(r(13125));t.left=i.default;var o=n(r(76196));t.noBorders=o.default;var a=n(r(72431));t.right=a.default;var l=n(r(41056));t.top=l.default},13125:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const i=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,i)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},76196:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,r){e.prepareBorder(r,"noBorders")},disabled(){return!(0,s.checkSelectionBorders)(this)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},72431:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,s.checkSelectionBorders)(this,t)&&(e=(0,s.markSelected)(e)),e},callback(r,n){const i=(0,s.checkSelectionBorders)(this,t);e.prepareBorder(n,t,i)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},41056:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,s.checkSelectionBorders)(this,"top")&&(e=(0,s.markSelected)(e)),e},callback(t,r){const n=(0,s.checkSelectionBorders)(this,"top");e.prepareBorder(r,"top",n)}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(17802);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},91166:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(76163),a=r(57691),l=r(98887),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=f(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),h=r(47586),c=r(17802),d=r(79055);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(f=function(e){return e?r:t})(e)}function p(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 g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m=t.PLUGIN_KEY="customBorders",E=t.PLUGIN_PRIORITY=90;var w=new WeakSet,y=new WeakSet;class C extends i.BasePlugin{constructor(){super(...arguments),p(this,y),p(this,w),(0,s.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>g(this,w,v).call(this,e))),this.addHook("init",(()=>g(this,y,S).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let r=["top","bottom","start","end"],n=null;t&&(this.checkSettingsCohesion([t]),r=Object.keys(t),n=(0,c.normalizeBorder)(t));const s=(0,d.detectSelectionType)(e),i=(0,d.normalizeSelectionFactory)(s,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,l.arrayEach)(e,(e=>{i(e).forAll(((e,t)=>{(0,l.arrayEach)(r,(r=>{this.prepareBorderFromCustomAdded(e,t,n,(0,c.toInlinePropName)(r))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,d.detectSelectionType)(e),r=(0,d.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),n=[];return(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(r=>{r.row===e&&r.col===t&&n.push((0,c.denormalizeBorder)(r))}))}))})),n}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,r,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,r,n){const s=this.hot.countRows(),i=this.hot.countCols();if(e>=s||t>=i)return;let o=(0,c.createEmptyBorders)(e,t);r&&(o=(0,c.extendDefaultBorder)(o,r),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(o.id===e.settings.id)return Object.assign(e.settings,r),o.id=e.settings.id,o.top=e.settings.top,o.bottom=e.settings.bottom,o.start=e.settings.start,o.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(o)),this.insertBorderIntoSettings(o,n)}prepareBorderFromCustomAddedRange(e,t){const r=Math.min(e.to.row,this.hot.countRows()-1),n=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,r,(r=>{(0,a.rangeEach)(e.from.col,n,(n=>{const s=(0,c.createEmptyBorders)(r,n);let i=0;r===e.from.row&&(0,o.hasOwnProperty)(t,"top")&&(i+=1,s.top=t.top),r===e.to.row&&(0,o.hasOwnProperty)(t,"bottom")&&(i+=1,s.bottom=t.bottom),n===e.from.col&&(0,o.hasOwnProperty)(t,"start")&&(i+=1,s.start=t.start),n===e.to.col&&(0,o.hasOwnProperty)(t,"end")&&(i+=1,s.end=t.end),i>0&&(this.hot.setCellMeta(r,n,"borders",(0,c.denormalizeBorder)(s)),this.insertBorderIntoSettings(s))}))}))}removeAllBorders(e,t){const r=(0,c.createId)(e,t);this.spliceBorder(r),this.clearBordersFromSelectionSettings(r),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,r,n){let s=this.hot.getCellMeta(e,t).borders;if(s=s&&void 0!==s.border?(0,c.normalizeBorder)(s):(0,c.createEmptyBorders)(e,t),n){s[r]=(0,c.createSingleEmptyBorder)();if(4===this.countHide(s))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}else{s[r]=(0,c.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(s,r,n)||this.insertBorderIntoSettings(s),this.hot.setCellMeta(e,t,"borders",(0,c.denormalizeBorder)(s))}}prepareBorder(e,t,r){(0,l.arrayEach)(e,(e=>{let{start:n,end:s}=e;if(n.row===s.row&&n.col===s.col)"noBorders"===t?this.removeAllBorders(n.row,n.col):this.setBorder(n.row,n.col,t,r);else switch(t){case"noBorders":(0,a.rangeEach)(n.col,s.col,(e=>{(0,a.rangeEach)(n.row,s.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(n.row,e,t,r)}));break;case"bottom":(0,a.rangeEach)(n.col,s.col,(e=>{this.setBorder(s.row,e,t,r)}));break;case"start":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,n.col,t,r)}));break;case"end":(0,a.rangeEach)(n.row,s.row,(e=>{this.setBorder(e,s.col,t,r)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,c.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:r,start:n,end:s}=e,i=[t,r,n,s];return(0,l.arrayReduce)(i,((e,t)=>{let r=e;return t&&t.hide&&(r+=1),r}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((r,n)=>{if(e.id===r.id)return this.savedBorders[n]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,r){let n=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(s);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,r)})),n=!0,!1}})),n}checkCustomSelections(e,t,r){const n=this.countHide(e);let s=!1;return 4===n?(this.removeAllBorders(e.row,e.col),s=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(n=>{if(e.id===n.settings.id){if(n.visualCellRange=t,n.commit(),r){const t=this.hot.view._wt.selectionManager.getBorderInstances(n);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(r,e)}))}return s=!0,!1}})),s}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,o.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,c.hasLeftRightTypeOptions)(e),r=(0,c.hasStartEndTypeOptions)(e);if(t&&r)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function v(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(u.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,h.top)(this),(0,h.right)(this),(0,h.bottom)(this),(0,h.left)(this),(0,h.noBorders)(this)]}})}function S(){this.changeBorderSettings()}t.CustomBorders=C},93725:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(91166);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.CustomBorders=n.CustomBorders},17802:(e,t,r)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let r=!1;return(0,i.arrayEach)(e.getSelectedRange(),(s=>{s.forAll(((s,i)=>{if(s<0||i<0)return;const o=e.getCellMeta(s,i).borders;if(o){if(!t)return r=!0,!1;if(!(0,n.hasOwnProperty)(o[t],"hide")||!1===o[t].hide)return r=!0,!1}}))})),r},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=u,t.createEmptyBorders=function(e,t){return{id:o(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=o,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,s.isDefined)(e.start)&&(e.left=e.start);(0,s.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,n.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,n.hasOwnProperty)(t,"top")&&(0,s.isDefined)(t.top)&&(t.top?((0,n.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,n.hasOwnProperty)(t,"bottom")&&(0,s.isDefined)(t.bottom)&&(t.bottom?((0,n.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,n.hasOwnProperty)(t,"start")&&(0,s.isDefined)(t.start)&&(t.start?((0,n.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,n.hasOwnProperty)(t,"end")&&(0,s.isDefined)(t.end)&&(t.end?((0,n.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.left)||(0,s.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,s.isDefined)(e.start)||(0,s.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,r;((0,s.isDefined)(e.start)||(0,s.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,s.isDefined)(e.end)||(0,s.isDefined)(e.right))&&(e.end=null!==(r=e.end)&&void 0!==r?r:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=h.get(e))&&void 0!==t?t:e};var n=r(76163),s=r(97639),i=r(98887);function o(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function u(){return{width:1,color:"#000",cornerVisible:!1}}const h=new Map([["left","start"],["right","end"]])},16703:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(33997),o=r(30369),a=r(49587);function l(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 u(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const h=t.PLUGIN_KEY="dragToScroll",c=t.PLUGIN_PRIORITY=100;var d=new WeakSet;class f extends i.BasePlugin{constructor(){super(...arguments),l(this,d),(0,s.default)(this,"boundaries",null),(0,s.default)(this,"callback",null),(0,s.default)(this,"listening",!1)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return c}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>u(this,d,p).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>u(this,d,p).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let r=0,n=0;t<this.boundaries.top?n=t-this.boundaries.top:t>this.boundaries.bottom&&(n=t-this.boundaries.bottom),e<this.boundaries.left?r=e-this.boundaries.left:e>this.boundaries.right&&(r=e-this.boundaries.right),this.callback(r,n)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function p(e){if((0,o.isRightClick)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,r)=>{var n,s;const i=null!==(n=t.scrollLeft)&&void 0!==n?n:t.scrollX,o=null!==(s=t.scrollTop)&&void 0!==s?s:t.scrollY;t.scroll(i+50*Math.sign(e),o+20*Math.sign(r))})),this.listen()}t.DragToScroll=f},59910:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(16703);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DragToScroll=n.DragToScroll},20877:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=r(98887),u=r(76163),h=r(50426),c=r(12208),d=r(49587),f=r(66496),p=r(51366),g=n(r(54925)),m=r(86373);r(59456);var E=r(66862);function w(e,t){y(e,t),t.add(e)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const v=t.PLUGIN_KEY="dropdownMenu",S=t.PLUGIN_PRIORITY=230,R="changeType",T=v;var N=new WeakMap,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet,L=new WeakSet;class D extends a.BasePlugin{static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[m.COLUMN_LEFT,m.COLUMN_RIGHT,m.SEPARATOR,m.REMOVE_COLUMN,m.SEPARATOR,m.CLEAR_COLUMN,m.SEPARATOR,m.READ_ONLY,m.SEPARATOR,m.ALIGNMENT]}constructor(e){var t,r,n;super(e),w(this,L),w(this,P),w(this,x),w(this,I),w(this,O),w(this,A),w(this,M),w(this,b),w(this,_),(0,s.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,s.default)(this,"itemsFactory",null),(0,s.default)(this,"menu",null),n={writable:!0,value:!1},y(t=this,r=N),r.set(t,n),this.hot.addHook("afterGetColHeader",((e,t)=>C(this,M,F).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new f.ItemsFactory(this.hot,D.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,L,G).call(e,...r)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,P,Y).call(e,...r)}));const t=this.hot.getSettings()[v],r={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",r),this.itemsFactory.setPredefinedItems(r.items);const n=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new p.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",n),this.menu.setMenuItems(n),this.menu.addLocalHook("beforeOpen",(()=>C(this,A,U).call(this))),this.menu.addLocalHook("afterOpen",(()=>C(this,O,V).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>C(this,I,B).call(this,e))),this.menu.addLocalHook("afterClose",(()=>C(this,x,W).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.executeCommand.call(e,...r)})),(0,l.arrayEach)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),r=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),n=this.hot.getCell(-1,t.col,!0),s=n.getBoundingClientRect();this.open({left:s.left+r.left,top:s.top+n.offsetHeight+r.top},{left:s.width}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:T},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:T}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>C(this,b,H).call(this,e)))}open(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,u.objectEach)(r,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.commandExecutor.execute(e,...r)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function k(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function H(e){if(e.stopPropagation(),(0,d.hasClass)(e.target,R)){const t=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),r=e.target.getBoundingClientRect();(0,o.default)(this,N,!1),this.open({left:r.left+t.left,top:r.top+e.target.offsetHeight+3+t.top},{left:r.width})}}function F(e,t){const r=t.parentNode;if(!r)return;const n=r.parentNode.childNodes,s=Array.prototype.indexOf.call(n,r);if(e<0||s!==n.length-1)return;const i=t.querySelector(`.${R}`);if(this.enabled&&i)return;if(!this.enabled)return void(i&&i.parentNode.removeChild(i));const o=this.hot.rootDocument.createElement("button");o.className=R,o.type="button",o.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,d.setAttribute)(o,[(0,E.A11Y_HIDDEN)(),(0,E.A11Y_LABEL)(" ")]),(0,d.setAttribute)(t,[(0,E.A11Y_HASPOPUP)("menu")])),o.onclick=function(){return!1},t.firstChild.insertBefore(o,t.firstChild.firstChild)}function U(){this.hot.runHooks("beforeDropdownMenuShow",this)}function V(){this.hot.runHooks("afterDropdownMenuShow",this),C(this,_,k).call(this,this.menu)}function B(e){C(this,_,k).call(this,e)}function W(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Y(e){return(0,i.default)(this,N)?null:e}function G(e){(0,d.hasClass)(e.target,R)&&(0,o.default)(this,N,!0)}t.DropdownMenu=D,D.SEPARATOR={name:m.SEPARATOR}},82143:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(20877);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.DropdownMenu=n.DropdownMenu},39105:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(57691);t.default=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:r,endCol:n}=this._getDataRange(),s=this.options,o=[];return(0,i.rangeEach)(e,r,(e=>{const r=[];!s.exportHiddenRows&&this._isHiddenRow(e)||((0,i.rangeEach)(t,n,(t=>{!s.exportHiddenColumns&&this._isHiddenColumn(t)||r.push(this.hot.getDataAtCell(e,t))})),o.push(r))})),o}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:r}=this._getDataRange(),n=this.hot.getRowHeader();(0,i.rangeEach)(t,r,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(n[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:r}=this._getDataRange(),n=this.hot.getColHeader();(0,i.rangeEach)(t,r,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(n[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[r=0,n=0,s=t,i=e]=this.options.range;return r=Math.max(r,0),n=Math.max(n,0),s=Math.min(s,t),i=Math.min(i,e),{startRow:r,startCol:n,endRow:s,endCol:i}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},33726:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=r(33997),i=n(r(39105)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(54655));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.PLUGIN_KEY="exportFile",u=t.PLUGIN_PRIORITY=240;class h extends s.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:r,rootWindow:n}=this.hot,s=this._createTypeFormatter(e,t),i=this._createBlob(s),o=n.URL||n.webkitURL,a=r.createElement("a"),l=`${s.options.filename}.${s.options.fileExtension}`;if(void 0!==a.download){const e=o.createObjectURL(i);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),r.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),r.body.removeChild(a),setTimeout((()=>{o.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(i,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!o.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,o.default)(e,new i.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=h},57103:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33726);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ExportFile=n.ExportFile},54655:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.default=function(e,t,r){if("function"==typeof o[e])return new o[e](t,r);return null};var s=n(r(40202));const i=t.TYPE_CSV="csv",o=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[i]:s.default})},68716:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(37913);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,s.default)(this,"dataProvider",void 0),(0,s.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,i.clone)(this.constructor.DEFAULT_OPTIONS);const r=new Date;return t=(0,i.extend)((0,i.clone)(a.DEFAULT_OPTIONS),t),t=(0,i.extend)(t,e),t.filename=(0,o.substitute)(t.filename,{YYYY:r.getFullYear(),MM:`${r.getMonth()+1}`.padStart(2,"0"),DD:`${r.getDate()}`.padStart(2,"0")}),t}}t.default=a},40202:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),i=r(97639),o=n(r(68716));const a=String.fromCharCode(13),l=String.fromCharCode(34),u=String.fromCharCode(10);class h extends o.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let r=this.dataProvider.getColumnHeaders();const n=r.length>0,i=this.dataProvider.getRowHeaders(),o=i.length>0;let a=e.bom?String.fromCharCode(65279):"";return n&&(r=(0,s.arrayMap)(r,(e=>this._escapeCell(e,!0))),o&&(a+=e.columnDelimiter),a+=r.join(e.columnDelimiter),a+=e.rowDelimiter),(0,s.arrayEach)(t,((t,r)=>{r>0&&(a+=e.rowDelimiter),o&&(a+=this._escapeCell(i[r])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=(0,i.stringify)(e);return""!==r&&(t||r.indexOf(a)>=0||r.indexOf(l)>=0||r.indexOf(u)>=0||r.indexOf(this.options.columnDelimiter)>=0)&&(r=r.replace(new RegExp('"',"g"),'""'),r=`"${r}"`),r}}t.default=h},31168:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=r(98887),o=r(76163),a=n(r(63806)),l=r(41789);class u{constructor(e,t){let{id:r,stateless:n=!0}=t;(0,s.default)(this,"hot",void 0),(0,s.default)(this,"id",void 0),(0,s.default)(this,"elements",[]),(0,s.default)(this,"hidden",!1),(0,s.default)(this,"stateId",""),(0,s.default)(this,"state",void 0),this.hot=e,this.id=r,this.stateId=`Filters.component.${this.id}`,this.state=n?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,i.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,i.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=u,(0,o.mixin)(u,a.default)},78884:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s,i=n(r(93231)),o=r(49587),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),u=r(31168),h=r(69346);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}function d(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)}var f=new WeakSet;class p extends u.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),d(this,f),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:p.BUTTON_OK})),this.elements.push(new h.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:p.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,f,g).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,o.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function g(e,t){t.options.identifier===s.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=p,s=p},9666:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(30369),a=r(98887),l=r(49223),u=r(76163),h=E(r(497)),c=r(31168),d=E(r(78327)),f=r(69346),p=r(23335),g=r(41830);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function E(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}function w(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 y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var C=new WeakSet,v=new WeakSet;class S extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),w(this,v),w(this,C),(0,s.default)(this,"name",""),(0,s.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new p.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new f.InputUI(this.hot,{placeholder:h.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>y(this,C,R).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>y(this,v,T).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,u.clone)(e.command);t.name.startsWith(h.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,r)=>{if(r>t.inputsCount-1)return!1;const n=this.getInputElement(r);n.setValue(e),n[t.inputsCount>r?"show":"hide"](),r||this.hot._registerTimeout((()=>n.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,g.getConditionDescriptor)(d.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((r,n)=>{e.inputsCount>n&&t.push(r.getValue())})),{command:e,args:t}}updateState(e,t){const r=e?(0,g.getConditionDescriptor)(e.name):(0,g.getConditionDescriptor)(d.CONDITION_NONE);this.state.setValueAtIndex(t,{command:r,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof p.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof f.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,o)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,i.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,i.addClass)(l,"htFiltersMenuLabel"),l.textContent=o,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,g.getConditionDescriptor)(d.CONDITION_NONE)];if(null!==e){const{visualIndex:r}=e;t=(0,d.default)(this.hot.getDataType(0,r,this.hot.countRows(),r))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function R(e){(0,a.arrayEach)(this.getInputElements(),((t,r)=>{t[e.inputsCount>r?"show":"hide"](),0===r&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function T(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}t.ConditionComponent=S},52387:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(98887),a=r(45561),l=r(31168),u=r(46798),h=r(98986),c=r(19926),d=r(79591),f=r(20498);function p(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)}var g=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),p(this,g),(0,s.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,i.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,o.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[h.OPERATION_ID,c.OPERATION_ID];(0,o.arrayEach)(e,(t=>{const r=new f.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,u.getOperationName)(t)},value:t,checked:t===e[0],id:t});r.addLocalHook("change",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,g,E).call(this,e))),this.elements.push(r)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,o.arrayEach)(this.elements,((t,r)=>{t.setChecked(r===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof f.RadioInputUI&&e.isChecked()));return e?e.getValue():h.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,o.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:h.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,r=e;r===d.OPERATION_ID&&(r=c.OPERATION_ID),this.state.setValueAtIndex(t,r)}reset(){this.setChecked(0)}}function E(e){this.setState(e.target.value)}t.OperatorsComponent=m},95896:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(49587),o=r(30369),a=r(98887),l=r(49223),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=g(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),h=r(41902),c=r(31168),d=r(89319),f=r(78327),p=r(41830);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(g=function(e){return e?r:t})(e)}function m(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)}var E=new WeakSet;class w extends c.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,E),(0,s.default)(this,"name",""),this.name=t.name,this.elements.push(new d.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,E,y).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===f.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?f.CONDITION_NONE:f.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=this.getMultipleSelectElement(),r=(r,n,s,i,o)=>{const[l]=(0,a.arrayFilter)(n,(e=>e.name===f.CONDITION_BY_VALUE)),c={},d=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS);if(l){const n=i(r,o),u=(0,a.arrayMap)(n,(e=>e.value)),g=(0,a.arrayMap)(n,(e=>e.meta.visualRow)),m=(0,h.unifyColumnValues)(u),E=(t.getDisplayValuesAtCol(this.hot.toVisualColumn(r))||[]).filter(((e,t)=>g.includes(t))),w=(0,h.syncDisplayValuesToUnifiedValues)(E,u,m);s&&(l.args[0]=s);const y=[],C=(0,h.intersectValues)(m,l.args[0],d,w,(e=>{e.checked&&y.push(e.value)})),v=e.editedConditionStack.column;c.locale=this.hot.getCellMeta(0,v).locale,c.args=[y],c.command=(0,p.getConditionDescriptor)(f.CONDITION_BY_VALUE),c.itemsSnapshot=C}else c.args=[],c.command=(0,p.getConditionDescriptor)(f.CONDITION_NONE);this.state.setValueAtIndex(r,c)};r(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&r(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof d.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,r,n,s,o)=>{(0,i.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,i.addClass)(l,"htFiltersMenuLabel"),l.textContent=o,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.getMultipleSelectElement(),t=this.hot.getPlugin("filters").getSelectedColumn(),r=this.hot.getTranslatedPhrase(u.FILTERS_VALUES_BLANK_CELLS),n=this._getColumnVisibleValues(),s=(0,h.unifyColumnValues)(n),i=e.getDisplayValuesAtCol(null==t?void 0:t.visualIndex)||[],o=(0,h.syncDisplayValuesToUnifiedValues)(i,n,s),a=(0,h.intersectValues)(s,s,r,o||[]);this.getMultipleSelectElement().setItems(a),super.reset(),this.getMultipleSelectElement().setValue(s),null!==t&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,t.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,h.toEmptyString)(e)))}}function y(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,o.stopImmediatePropagation)(e))}t.ValueComponent=w},80292:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="begins_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,s.stringify)(r))}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},10818:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=u;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(50532),o=r(26943);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="between";function u(e,t){let[r,n]=t,a=r,l=n;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,s.getCondition)(o.CONDITION_NAME,[l]),r=(0,s.getCondition)(i.CONDITION_NAME,[a]);return t(e)&&r(e)}return e.value>=a&&e.value<=l}(0,s.registerCondition)(l,u,{name:n.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},88500:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=o;var n=r(41830),s=r(41902);const i=t.CONDITION_NAME="by_value";function o(e,t){let[r]=t;return r(e.value)}(0,n.registerCondition)(i,o,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,s.createArrayAssertion)(t)]},showOperators:!1})},74025:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="contains";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,s.stringify)(r))>=0}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},50532:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_after";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),i=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)>=0}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26943:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_before";function u(e,t){let[r]=t;const n=(0,s.default)(e.value,e.meta.dateFormat),i=(0,s.default)(r,e.meta.dateFormat);return!(!n.isValid()||!i.isValid())&&n.diff(i)<=0}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},80190:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_today";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_TODAY,inputsCount:0})},91586:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_tomorrow";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(-1,"days").startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},40201:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.condition=u;var s=n(r(22418)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=a(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),o=r(41830);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(a=function(e){return e?r:t})(e)}const l=t.CONDITION_NAME="date_yesterday";function u(e){const t=(0,s.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,s.default)().subtract(1,"days").startOf("day"),"d")}(0,o.registerCondition)(l,u,{name:i.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},92912:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(97639);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="empty";function l(e){return(0,i.isEmpty)(e.value)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},52277:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="ends_with";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,s.stringify)(r))}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},17034:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(97639),i=r(41830);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="eq";function l(e,t){let[r]=t;return(0,s.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,s.stringify)(r)}(0,i.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},6828:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830);const s=t.CONDITION_NAME="false";function i(){return!1}(0,n.registerCondition)(s,i,{name:"False"})},74642:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="gt";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},81970:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="gte";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value>=n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},16323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="lt";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},46070:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="lte";function a(e,t){let[r]=t,n=r;return"numeric"===e.meta.type&&(n=parseFloat(n,10)),e.value<=n}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},71063:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=a;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.CONDITION_NAME="none";function a(){return!0}(0,s.registerCondition)(o,a,{name:n.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},30730:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(10818);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_between";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},35227:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(74025);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_contains";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},11535:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(92912);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="not_empty";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},76514:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var a=s?Object.getOwnPropertyDescriptor(e,i):null;a&&(a.get||a.set)?Object.defineProperty(n,i,a):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(41830),i=r(17034);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}const a=t.CONDITION_NAME="neq";function l(e,t){return!(0,s.getCondition)(i.CONDITION_NAME,t)(e)}(0,s.registerCondition)(a,l,{name:n.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},53323:(e,t,r)=>{"use strict";t.__esModule=!0,t.condition=i;var n=r(41830);const s=t.CONDITION_NAME="true";function i(){return!0}(0,n.registerCondition)(s,i,{name:"True"})},75207:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(98887),o=r(76163),a=r(45561),l=n(r(63806)),u=r(41830),h=r(98986),c=r(46798),d=r(97639),f=r(41789);const p="ConditionCollection.filteringStates";class g{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,s.default)(this,"hot",void 0),(0,s.default)(this,"isMapRegistrable",void 0),(0,s.default)(this,"filteringStates",new f.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(p,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var r;const n=this.filteringStates.getValueAtIndex(t),s=null!==(r=null==n?void 0:n.conditions)&&void 0!==r?r:[],i=null==n?void 0:n.operation;return this.isMatchInConditions(s,e,i)}isMatchInConditions(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID;return!e.length||(0,c.getOperationFunc)(r)(e,t)}addCondition(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:h.OPERATION_ID,n=arguments.length>3?arguments[3]:void 0;const s=this.hot.getCellMeta(0,e).locale,o=(0,i.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(s):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const f=this.getOperation(e);if(f){if(f!==r)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${f}\`\x20
|
966
966
|
filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
|
967
967
|
Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
|
968
968
|
use it consequently for a particular column).`)}else if((0,d.isUndefined)(c.operations[r]))throw new Error(a.toSingleLine`Unexpected operation named \`${r}\`. Possible ones are\x20
|
969
969
|
\`disjunction\` and \`conjunction\`.`);const p=this.getConditions(e);0===p.length?this.filteringStates.setValueAtIndex(e,{operation:r,conditions:[{name:l,args:o,func:(0,u.getCondition)(l,o)}]},n):p.push({name:l,args:o,func:(0,u.getCondition)(l,o)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,r;return null!==(t=null===(r=this.filteringStates.getValueAtIndex(e))||void 0===r?void 0:r.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,i.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[r,{operation:n,conditions:s}]=t;return e.push({column:r,operation:n,conditions:(0,i.arrayMap)(s,(e=>{let{name:t,args:r}=e;return{name:t,args:r}}))}),e}),[])}importAllConditions(e){this.clean(),(0,i.arrayEach)(e,(e=>{(0,i.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const r=this.getConditions(e);return t?r.some((e=>e.name===t)):r.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(p),this.filteringStates=null,this.clearLocalHooks()}}(0,o.mixin)(g,l.default);t.default=g},41830:(e,t,r)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!n[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:r,descriptor:s}=n[e];let i=t;s.inputValuesDecorator&&(i=s.inputValuesDecorator(i));return function(e){return r.apply(e.meta.instance,[].concat([e],[i]))}},t.getConditionDescriptor=function(e){if(!n[e])throw Error(`Filter condition "${e}" does not exist.`);return n[e].descriptor},t.registerCondition=function(e,t,r){r.key=e,n[e]={condition:t,descriptor:r}},r(91683);const n=t.conditions={}},97282:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(98887),o=r(76163),a=r(46029),l=n(r(63806)),u=n(r(75207)),h=n(r(37793)),c=r(41902);function d(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 f(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var p=new WeakSet,g=new WeakSet,m=new WeakSet;class E{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];d(this,m),d(this,g),d(this,p),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"conditionCollection",void 0),(0,s.default)(this,"columnDataFactory",void 0),(0,s.default)(this,"changes",[]),(0,s.default)(this,"grouping",!1),(0,s.default)(this,"latestEditedColumnPosition",-1),(0,s.default)(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=r,this.conditionCollection.addLocalHook("beforeRemove",(e=>f(this,p,w).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>f(this,g,y).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>f(this,m,C).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,i.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var r=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const n=this.conditionCollection.exportAllConditions();let s=this.conditionCollection.getColumnStackPosition(e);-1===s&&(s=this.latestEditedColumnPosition);const o=n.slice(0,s),l=n.slice(s);l.length&&l[0].column===e&&l.shift();const d=(0,a.curry)((function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const s=new u.default(r.hot,!1),o=[].concat(e,n);s.importAllConditions(o);const a=r.columnDataFactory(t);let l;l=s.isEmpty()?a:new h.default(s,(e=>r.columnDataFactory(e))).filter(),l=(0,i.arrayMap)(l,(e=>e.meta.visualRow));const d=(0,c.createArrayAssertion)(l);return s.destroy(),(0,i.arrayFilter)(a,(e=>d(e.meta.visualRow)))}))(o),f=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:f},dependentConditionStacks:l,filteredRowsFactory:d,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,o.objectEach)(this,((e,t)=>{this[t]=null}))}}function w(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function y(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function C(){(0,i.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,o.mixin)(E,l.default);t.default=E},78327:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let r=e;k[r]||(r=L);return(0,s.arrayEach)(k[r],(e=>{let r;r=e===i.SEPARATOR?{name:i.SEPARATOR}:(0,n.clone)((0,o.getConditionDescriptor)(e)),t.push(r)})),t},r(63517);var n=r(76163),s=r(98887),i=r(86373),o=r(41830),a=r(71063);t.CONDITION_NONE=a.CONDITION_NAME;var l=r(92912);t.CONDITION_EMPTY=l.CONDITION_NAME;var u=r(11535);t.CONDITION_NOT_EMPTY=u.CONDITION_NAME;var h=r(17034);t.CONDITION_EQUAL=h.CONDITION_NAME;var c=r(76514);t.CONDITION_NOT_EQUAL=c.CONDITION_NAME;var d=r(74642);t.CONDITION_GREATER_THAN=d.CONDITION_NAME;var f=r(81970);t.CONDITION_GREATER_THAN_OR_EQUAL=f.CONDITION_NAME;var p=r(16323);t.CONDITION_LESS_THAN=p.CONDITION_NAME;var g=r(46070);t.CONDITION_LESS_THAN_OR_EQUAL=g.CONDITION_NAME;var m=r(10818);t.CONDITION_BETWEEN=m.CONDITION_NAME;var E=r(30730);t.CONDITION_NOT_BETWEEN=E.CONDITION_NAME;var w=r(80292);t.CONDITION_BEGINS_WITH=w.CONDITION_NAME;var y=r(52277);t.CONDITION_ENDS_WITH=y.CONDITION_NAME;var C=r(74025);t.CONDITION_CONTAINS=C.CONDITION_NAME;var v=r(35227);t.CONDITION_NOT_CONTAINS=v.CONDITION_NAME;var S=r(26943);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=r(50532);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var T=r(91586);t.CONDITION_TOMORROW=T.CONDITION_NAME;var N=r(80190);t.CONDITION_TODAY=N.CONDITION_NAME;var _=r(40201);t.CONDITION_YESTERDAY=_.CONDITION_NAME;var b=r(88500);t.CONDITION_BY_VALUE=b.CONDITION_NAME;var M=r(53323);t.CONDITION_TRUE=M.CONDITION_NAME;var A=r(6828);t.CONDITION_FALSE=A.CONDITION_NAME;var O=r(98986);t.OPERATION_AND=O.OPERATION_ID;var I=r(19926);t.OPERATION_OR=I.OPERATION_ID;var x=r(79591);t.OPERATION_OR_THEN_VARIABLE=x.OPERATION_ID;const P=t.TYPE_NUMERIC="numeric",L=t.TYPE_TEXT="text",D=t.TYPE_DATE="date",k=t.TYPES={[P]:[a.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,h.CONDITION_NAME,c.CONDITION_NAME,i.SEPARATOR,d.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,g.CONDITION_NAME,m.CONDITION_NAME,E.CONDITION_NAME],[L]:[a.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,h.CONDITION_NAME,c.CONDITION_NAME,i.SEPARATOR,w.CONDITION_NAME,y.CONDITION_NAME,i.SEPARATOR,C.CONDITION_NAME,v.CONDITION_NAME],[D]:[a.CONDITION_NAME,i.SEPARATOR,l.CONDITION_NAME,u.CONDITION_NAME,i.SEPARATOR,h.CONDITION_NAME,c.CONDITION_NAME,i.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,i.SEPARATOR,T.CONDITION_NAME,N.CONDITION_NAME,_.CONDITION_NAME]}},37793:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(98887);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];(0,s.default)(this,"conditionCollection",void 0),(0,s.default)(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,i.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,r)=>{let n=this.columnDataFactory(t);r&&(n=this._getIntersectData(n,e)),e=this.filterByColumn(t,n)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const r=[];return(0,i.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&r.push(t)})),r}_getIntersectData(e,t){const r=[];return(0,i.arrayEach)(t,(t=>{const n=t.meta.visualRow;void 0!==e[n]&&(r[n]=e[n])})),r}}},82828:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(9815),r(63517),r(91683);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(33997),l=r(98887),u=r(45561),h=r(31990),c=r(57691),d=r(49587),f=r(49223),p=r(86373),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=b(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),m=r(9666),E=r(52387),w=r(95896),y=r(78884),C=n(r(75207)),v=n(r(37793)),S=n(r(97282)),R=r(41902),T=r(96355),N=r(78327),_=r(41789);function b(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(b=function(e){return e?r:t})(e)}function M(e,t){A(e,t),t.add(e)}function A(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(30352);const I=t.PLUGIN_KEY="filters",x=t.PLUGIN_PRIORITY=250,P=I;var L=new WeakMap,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet;class G extends a.BasePlugin{static get PLUGIN_KEY(){return I}static get PLUGIN_PRIORITY(){return x}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,r,n;super(e),M(this,Y),M(this,W),M(this,B),M(this,V),M(this,U),M(this,F),M(this,H),M(this,k),M(this,D),(0,s.default)(this,"dropdownMenuPlugin",null),(0,s.default)(this,"conditionCollection",null),(0,s.default)(this,"conditionUpdateObserver",null),(0,s.default)(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),(0,s.default)(this,"filtersRowsMap",null),n={writable:!0,value:void 0},A(t=this,r=L),r.set(t,n),this.hot.addHook("afterGetColHeader",((e,t)=>O(this,W,Z).call(this,e,t)))}isEnabled(){return!!this.hot.getSettings()[I]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new _.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,r=e=>(e.addLocalHook("accept",(()=>O(this,U,X).call(this,"accept"))),e.addLocalHook("cancel",(()=>O(this,U,X).call(this,"cancel"))),e.addLocalHook("change",(t=>O(this,V,q).call(this,e,t))),e),n=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,s=()=>`${this.hot.getTranslatedPhrase(g.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition",name:n,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>O(this,B,Q).call(this))),this.components.set("filter_by_condition",r(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new E.OperatorsComponent(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>O(this,B,Q).call(this))),this.components.set("filter_by_condition2",r(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",r(new w.ValueComponent(this.hot,{id:"filter_by_value",name:s}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",r(new y.ActionBarComponent(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new C.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new S.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>O(this,Y,J).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(e=>O(this,F,K).call(this,e))),this.addHook("afterDropdownMenuShow",(()=>O(this,k,z).call(this))),this.addHook("afterDropdownMenuHide",(()=>O(this,H,$).call(this))),this.addHook("afterChange",(e=>O(this,D,j).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!(0,o.default)(this,L)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),r=(0,o.default)(this,L).getLastMenuPage();e.focus(),r>0?t.setCurrentPage(r):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];(0,i.default)(this,L,(0,T.createMenuFocusController)(e,t));const r=e=>{(0,o.default)(this,L).listen(),e.preventDefault(),(0,f.isKey)(e.keyCode,"TAB")&&(e.shiftKey?(0,o.default)(this,L).toPreviousItem():(0,o.default)(this,L).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",r),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",r)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:P})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(P)}addCondition(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:N.OPERATION_AND;const s=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(s,{command:{key:t},args:r},n)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),r=!this.conditionCollection.isEmpty();let n=[];const s=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",s))if(r){const r=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),n=(0,l.arrayMap)(t.filter(),(e=>e.meta.visualRow));const e=(0,R.createArrayAssertion)(n);(0,c.rangeEach)(this.hot.countSourceRows()-1,(t=>{e(t)||r.push(t)})),(0,l.arrayEach)(r,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||n.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",s),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),r=[];return(0,l.arrayEach)(this.hot.getSourceDataAtCol(t),((e,n)=>{var s;const{row:i,col:o,visualCol:a,visualRow:l,type:u,instance:h,dateFormat:c,locale:d}=this.hot.getCellMeta(n,t),f=null!==(s=this.hot.getDataAtCell(this.hot.toVisualRow(n),t))&&void 0!==s?s:e;r.push({meta:{row:i,col:o,visualCol:a,visualRow:l,type:u,instance:h,dateFormat:c,locale:d},value:(0,R.toEmptyString)(f)})})),r}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),r=(0,R.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,r)}restoreComponents(e){var t;const r=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(r)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,r,n){let s=e;return s===N.OPERATION_OR&&t.command.key!==N.CONDITION_NONE&&r.command.key!==N.CONDITION_NONE&&n.command.key!==N.CONDITION_NONE?s=N.OPERATION_OR_THEN_VARIABLE:n.command.key!==N.CONDITION_NONE&&(t.command.key!==N.CONDITION_NONE&&r.command.key!==N.CONDITION_NONE||(s=N.OPERATION_AND)),s}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),r=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...r):this.hideComponents(...r)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new v.default(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return(0,l.arrayEach)(n,(r=>{(0,l.arrayEach)(t.menuItems,((t,n)=>{t.key===r.getMenuItemDescriptor().key&&e.push(n)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,r=t.getPlugin("hiddenRows");for(var n=arguments.length,s=new Array(n>1?n-1:0),i=1;i<n;i++)s[i-1]=arguments[i];const o=this.getIndexesOfComponents(...s);e?r.showRows(o):r.hideRows(o),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function j(e){e&&(0,l.arrayEach)(e,(e=>{const[,t]=e,r=this.hot.propToCol(t);this.conditionCollection.hasConditions(r)&&this.updateValueComponentCondition(r)}))}function z(){this.restoreComponents(Array.from(this.components.values()))}function $(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function K(e){e.items.push({name:p.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function X(e){var t;if("accept"===e){const e=this.getSelectedColumn();var r;if(null===e)return void(null===(r=this.dropdownMenuPlugin)||void 0===r||r.close());const{physicalIndex:t}=e,n=this.components.get("filter_by_condition").getState(),s=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),o=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),n,s,i);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),n.command.key!==N.CONDITION_NONE&&(this.conditionCollection.addCondition(t,n,o,a),s.command.key!==N.CONDITION_NONE&&this.conditionCollection.addCondition(t,s,o,a)),i.command.key!==N.CONDITION_NONE&&this.conditionCollection.addCondition(t,i,o,a),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function q(e,t){this.updateDependentComponentsVisibility(),e.constructor!==m.ConditionComponent||t.inputsCount||this.setListeningDropdownMenu()}function Q(){this.setListeningDropdownMenu()}function Z(e,t){const r=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(r)?(0,d.addClass)(t,"htFiltersActive"):(0,d.removeClass)(t,"htFiltersActive")}function J(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:r,column:n}}=e,s=r.filter((e=>e.name===N.CONDITION_BY_VALUE)),i=r.filter((e=>e.name!==N.CONDITION_BY_VALUE));if(s.length>=2||i.length>=3)(0,h.warn)(u.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
|
970
970
|
The overall amount of conditions exceed the capability of the dropdown menu.\x20
|
971
|
-
For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(n);this.components.get("filter_by_condition").updateState(i[0],n),this.components.get("filter_by_condition2").updateState(i[1],n),this.components.get("filter_operators").updateState(t,n),this.components.get("filter_by_value").updateState(e)}}t.Filters=G},13194:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82828);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Filters=n.Filters},46798:(e,t,r)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!n[e])throw Error(`Operation with id "${e}" does not exist.`);const t=n[e].func;return function(e,r){return t(e,r)}},t.getOperationName=function(e){return n[e].name},t.registerOperation=function(e,t,r){n[e]={name:t,func:r}},r(91683);const n=t.operations={}},98986:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="conjunction",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_CONJUNCTION;function l(e,t){return e.every((e=>e.func(t)))}(0,s.registerOperation)(o,a,l)},19926:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="disjunction",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_DISJUNCTION;function l(e,t){return e.some((e=>e.func(t)))}(0,s.registerOperation)(o,a,l)},79591:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l,r(91683);var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="disjunctionWithExtraCondition",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_DISJUNCTION;function l(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,s.registerOperation)(o,a,l)},96355:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let r=-1;const l=(0,n.createFocusNavigator)(t),u=r=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(a),l.setCurrentPage(t.indexOf(r))};function h(n){const u=e.getKeyboardShortcutsCtrl(),h=n.getKeyboardShortcutsCtrl();l.clear(),h.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:u.getContext(a),callback:()=>{n.isSubMenu()&&n.close(),u.listen(a)}}]),n.isSubMenu()||u.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const n=e.getNavigator();n.getCurrentPage()>-1&&(r=n.getCurrentPage()),n.clear(),t.shiftKey?l.toPreviousItem():l.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const r=t[l.getCurrentPage()];r instanceof s.SelectUI&&(r.openOptions(),e.preventDefault()),r instanceof o.LinkUI&&(r.activate(),e.preventDefault()),r instanceof i.BaseUI||e.preventDefault()}}],a)}return t.forEach((e=>{e instanceof i.BaseUI&&(e.addLocalHook("click",u(e)),e.addLocalHook("focus",u(e)),e.addLocalHook("afterClose",u(e)))})),e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||l.clear()})),e.addLocalHook("afterSubmenuOpen",h),e.addLocalHook("afterOpen",h),{...l,listen:function(){e.focus(),e.getKeyboardShortcutsCtrl().listen(a)},getLastMenuPage:function(){return r}}};var n=r(55337),s=r(23335),i=r(98415),o=r(12189);const a="filters"},55337:(e,t,r)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,n.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,r)=>{const n=e[t];return n instanceof i.MultipleSelectUI?r:!(n.element&&!(0,s.isVisible)(n.element))&&void n.focus()}})};var n=r(99850),s=r(49587),i=r(89319)},98415:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=n(r(63806)),a=n(r(57340)),l=r(49587),u=r(98887),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}const d="built",f="building",p=["click","input","keydown","keypress","keyup","focus","blur","change"];class g{static get DEFAULTS(){return(0,i.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"eventManager",new a.default(this)),(0,s.default)(this,"options",void 0),(0,s.default)(this,"_element",void 0),(0,s.default)(this,"buildState",void 0),this.hot=e,this.options=(0,i.extend)(g.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===f?this._element:this.buildState===d?(this.update(),this._element):(this.buildState=f,this.build(),this.buildState=d,this._element)}isBuilt(){return this.buildState===d}translateIfPossible(e){return"string"==typeof e&&e.startsWith(h.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=f),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,l.addClass)(this._element,this.options.className),this.options.children.length)(0,u.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,i.objectEach)(this.options,((e,r)=>{void 0!==t[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(t[r]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,u.arrayEach)(p,(r=>e(t,r)))}else(0,u.arrayEach)(p,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=g,(0,i.mixin)(g,o.default)},69346:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(76163),l=r(98415);function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var h=new WeakMap,c=new WeakSet;class d extends l.BaseUI{static get DEFAULTS(){return(0,a.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var r,n;super(e,(0,a.extend)(d.DEFAULTS,t)),u(r=this,n=c),n.add(r),function(e,t,r){u(e,t),t.set(e,r)}(this,h,{writable:!0,value:void 0}),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");(0,i.default)(this,h,this._element.firstChild),(0,o.addClass)(this._element,"htUIInput"),(0,o.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,s.default)(this,h).type=this.options.type,(0,s.default)(this,h).placeholder=this.translateIfPossible(this.options.placeholder),(0,s.default)(this,h).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&(0,s.default)(this,h).focus()}}function f(e){this.options.value=e.target.value}t.InputUI=d},12189:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=r(98415);function l(e,t,r){!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,r)}var u=new WeakMap;class h extends a.BaseUI{static get DEFAULTS(){return(0,o.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,o.extend)(h.DEFAULTS,t)),l(this,u,{writable:!0,value:void 0})}build(){super.build(),(0,i.default)(this,u,this._element.firstChild)}update(){this.isBuilt()&&((0,s.default)(this,u).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&(0,s.default)(this,u).focus()}activate(){(0,s.default)(this,u).click()}}t.LinkUI=h},89319:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(76163),l=r(98887),u=r(49223),h=r(46029),c=r(56020),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),f=r(30369),p=r(98415),g=r(69346),m=r(12189),E=r(41902);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function y(e,t){v(e,t),t.add(e)}function C(e,t,r){v(e,t),t.set(e,r)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const R="multipleSelect.itemBox";var T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet;class L extends p.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,(0,a.extend)(L.DEFAULTS,t)),y(this,P),y(this,x),y(this,I),y(this,O),C(this,T,{writable:!0,value:[]}),C(this,N,{writable:!0,value:void 0}),C(this,_,{writable:!0,value:void 0}),C(this,b,{writable:!0,value:void 0}),C(this,M,{writable:!0,value:void 0}),C(this,A,{writable:!0,value:void 0}),(0,i.default)(this,b,new g.InputUI(this.hot,{placeholder:d.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),(0,i.default)(this,M,new m.LinkUI(this.hot,{textContent:d.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),(0,i.default)(this,A,new m.LinkUI(this.hot,{textContent:d.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return(0,s.default)(this,N)}registerHooks(){(0,s.default)(this,b).addLocalHook("keydown",(e=>S(this,I,k).call(this,e))),(0,s.default)(this,b).addLocalHook("input",(e=>S(this,O,D).call(this,e))),(0,s.default)(this,M).addLocalHook("click",(e=>S(this,x,H).call(this,e))),(0,s.default)(this,A).addLocalHook("click",(e=>S(this,P,F).call(this,e)))}setItems(e){(0,i.default)(this,T,e),(0,s.default)(this,N)&&(0,s.default)(this,N).loadData((0,s.default)(this,T))}setLocale(e){(0,i.default)(this,_,e)}getLocale(){return(0,s.default)(this,_)}getItems(){return[...(0,s.default)(this,T)]}getValue(){return function(e){const t=[];return(0,l.arrayEach)(e,(e=>{e.checked&&t.push(e.value)})),t}((0,s.default)(this,T))}getSearchInputElement(){return(0,s.default)(this,b)}getSelectAllElement(){return(0,s.default)(this,M)}getClearAllElement(){return(0,s.default)(this,A)}isSelectedAllValues(){return(0,s.default)(this,T).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),r=new p.BaseUI(this.hot,{className:"htUISelectionControls",children:[(0,s.default)(this,M),(0,s.default)(this,A)]});this._element.appendChild((0,s.default)(this,b).element),this._element.appendChild(r.element),this._element.appendChild(t);const n=t=>{if(!this._element)return;(0,s.default)(this,N)&&(0,s.default)(this,N).destroy(),(0,o.addClass)(t,"htUIMultipleSelectHot"),(0,i.default)(this,N,new this.hot.constructor(t,{data:(0,s.default)(this,T),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,r,n,s,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{(0,s.default)(this,N).listen()},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>(0,s.default)(this,N).container.scrollWidth-(0,o.getScrollbarWidth)(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),(0,s.default)(this,N).init();const r=(0,s.default)(this,N).getShortcutManager().getContext("grid");r.removeShortcutsByKeys(["Tab"]),r.removeShortcutsByKeys(["Shift","Tab"]),r.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:R}),r.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{(0,s.default)(this,N).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:R})};n(t),this.hot._registerTimeout((()=>n(t)),100)}focus(){this.isBuilt()&&(0,s.default)(this,N).listen()}reset(){(0,s.default)(this,b).reset(),(0,s.default)(this,M).reset(),(0,s.default)(this,A).reset()}update(){this.isBuilt()&&((0,s.default)(this,N).loadData(function(e,t){const r=(0,E.createArrayAssertion)(t);return(0,l.arrayMap)(e,(e=>(e.checked=r(e.value),e)))}((0,s.default)(this,T),this.options.value)),super.update())}destroy(){(0,s.default)(this,N)&&(0,s.default)(this,N).destroy(),(0,s.default)(this,b).destroy(),(0,s.default)(this,A).destroy(),(0,s.default)(this,M).destroy(),(0,i.default)(this,b,null),(0,i.default)(this,A,null),(0,i.default)(this,M,null),(0,i.default)(this,N,null),(0,i.default)(this,T,null),super.destroy()}}function D(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let r;r=""===t?[...(0,s.default)(this,T)]:(0,l.arrayFilter)((0,s.default)(this,T),(e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),(0,s.default)(this,N).loadData(r)}function k(e){this.runLocalHooks("keydown",e,this);(0,h.partial)(u.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,f.stopImmediatePropagation)(e),(0,s.default)(this,N).listen(),(0,s.default)(this,N).selectCell(0,0))}function H(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,s.default)(this,N).getSourceData(),((e,r)=>{e.checked=!0,t.push((0,c.dataRowToChangesArray)(e,r)[0])})),(0,s.default)(this,N).setSourceDataAtCell(t)}function F(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,s.default)(this,N).getSourceData(),((e,r)=>{e.checked=!1,t.push((0,c.dataRowToChangesArray)(e,r)[0])})),(0,s.default)(this,N).setSourceDataAtCell(t)}t.MultipleSelectUI=L;t.default=L},20498:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=r(98415);function l(e,t,r){!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,r)}var u=new WeakMap,h=new WeakMap;class c extends a.BaseUI{static get DEFAULTS(){return(0,o.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,o.extend)(c.DEFAULTS,t)),l(this,u,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0})}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),(0,i.default)(this,h,e),(0,i.default)(this,u,this._element.firstChild),(0,s.default)(this,u).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,s.default)(this,h).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&(0,s.default)(this,u).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&((0,s.default)(this,u).checked=e)}focus(){this.isBuilt()&&(0,s.default)(this,u).focus()}}t.RadioInputUI=c},23335:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(48427)),i=n(r(42538)),o=r(51366),a=r(76163),l=r(98887),u=r(49587),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),c=r(86373),d=r(98415),f=r(66862);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function g(e,t){E(e,t),t.add(e)}function m(e,t,r){E(e,t),t.set(e,r)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var y=new WeakMap,C=new WeakMap,v=new WeakMap,S=new WeakMap,R=new WeakMap,T=new WeakSet,N=new WeakSet,_=new WeakSet;class b extends d.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,(0,a.extend)(b.DEFAULTS,t)),g(this,_),g(this,N),g(this,T),m(this,y,{writable:!0,value:null}),m(this,C,{writable:!0,value:[]}),m(this,v,{writable:!0,value:void 0}),m(this,S,{writable:!0,value:void 0}),m(this,R,{writable:!0,value:void 0}),this.registerHooks()}getMenu(){return(0,i.default)(this,y)}registerHooks(){this.addLocalHook("click",(()=>w(this,_,O).call(this)))}setItems(e){(0,s.default)(this,C,this.translateNames(e)),(0,i.default)(this,y)&&(0,i.default)(this,y).setMenuItems((0,i.default)(this,C))}translateNames(e){return(0,l.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),(0,s.default)(this,y,new o.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),(0,i.default)(this,y).setMenuItems((0,i.default)(this,C));const e=new d.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new d.BaseUI(this.hot,{className:"htUISelectDropdown"});(0,s.default)(this,v,e),(0,s.default)(this,S,e.element),(0,s.default)(this,R,t),this.hot.getSettings().ariaTags&&((0,u.setAttribute)(t.element,[(0,f.A11Y_HIDDEN)()]),(0,u.setAttribute)(this._element,[(0,f.A11Y_LISTBOX)()])),(0,l.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),(0,i.default)(this,y).addLocalHook("select",(e=>w(this,T,M).call(this,e))),(0,i.default)(this,y).addLocalHook("afterClose",(()=>w(this,N,A).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:(0,i.default)(this,y).hot.getTranslatedPhrase(h.FILTERS_CONDITIONS_NONE),(0,i.default)(this,S).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();(0,i.default)(this,y)&&((0,i.default)(this,y).open(),(0,i.default)(this,y).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),(0,i.default)(this,y).getNavigator().toFirstItem(),(0,i.default)(this,y).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){(0,i.default)(this,y)&&(0,i.default)(this,y).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){(0,i.default)(this,y)&&((0,i.default)(this,y).destroy(),(0,s.default)(this,y,null)),(0,i.default)(this,v)&&(0,i.default)(this,v).destroy(),(0,i.default)(this,R)&&(0,i.default)(this,R).destroy(),super.destroy()}}function M(e){e.name!==c.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function A(){this.runLocalHooks("afterClose")}function O(){this.openOptions()}t.SelectUI=b},41902:(e,t,r)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=u,t.intersectValues=function(e,t,r,n){const i=[],a=e===t;let l;a||(l=u(t));return(0,s.arrayEach)(e,(e=>{let t=!1;(a||l(e))&&(t=!0);const s={checked:t,value:e,visualValue:o(e,r)};n&&n(s),i.push(s)})),i},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=o,t.unifyColumnValues=function(e){let t=e;t=l?Array.from(new Set(t)):(0,s.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},r(63517);var n=r(6022),s=r(98887);const i=(0,n.getComparisonFunction)();function o(e,t){let r=e;return""===r&&(r=`(${t})`),r}const a=new Set([1]).has(1),l=a&&"function"==typeof Array.from;function u(e){let t=e;return a&&(t=new Set(t)),function(e){let r;return r=a?t.has(e):!!~t.indexOf(e),r}}},39994:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const r=c(),n=0===r.size?[]:Array.from(null!==(t=r.get(e))&&void 0!==t?t:[]);return new Map(n.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=p,t.registerEngine=f,t.registerLanguage=g,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),r=t[u.PLUGIN_KEY],n=null==r?void 0:r.engine;if(!0===r)return null;if((0,i.isUndefined)(n))return null;var s;if("function"==typeof n.hyperformula||"function"==typeof n)return f(null!==(s=n.hyperformula)&&void 0!==s?s:n,t,e);if("object"==typeof n&&(0,i.isUndefined)(n.hyperformula)){const t=c(),r=d().get(n);return t.has(n)||t.set(n,[]),t.get(n).push(e),r&&r.push(e.guid),n.getConfig().licenseKey||n.updateConfig({licenseKey:h.DEFAULT_LICENSE_KEY}),n.getConfig().leapYear1900===h.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,l.isObjectEqual)(n.getConfig().nullDate,h.DEFAULT_SETTINGS.nullDate)||(0,a.warn)(o.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
971
|
+
For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(n);this.components.get("filter_by_condition").updateState(i[0],n),this.components.get("filter_by_condition2").updateState(i[1],n),this.components.get("filter_operators").updateState(t,n),this.components.get("filter_by_value").updateState(e)}}t.Filters=G},13194:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(82828);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Filters=n.Filters},46798:(e,t,r)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!n[e])throw Error(`Operation with id "${e}" does not exist.`);const t=n[e].func;return function(e,r){return t(e,r)}},t.getOperationName=function(e){return n[e].name},t.registerOperation=function(e,t,r){n[e]={name:t,func:r}},r(91683);const n=t.operations={}},98986:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="conjunction",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_CONJUNCTION;function l(e,t){return e.every((e=>e.func(t)))}(0,s.registerOperation)(o,a,l)},19926:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="disjunction",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_DISJUNCTION;function l(e,t){return e.some((e=>e.func(t)))}(0,s.registerOperation)(o,a,l)},79591:(e,t,r)=>{"use strict";t.__esModule=!0,t.operationResult=l,r(91683);var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497)),s=r(46798);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}const o=t.OPERATION_ID="disjunctionWithExtraCondition",a=t.SHORT_NAME_FOR_COMPONENT=n.FILTERS_LABELS_DISJUNCTION;function l(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,s.registerOperation)(o,a,l)},96355:(e,t,r)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let r=-1;const l=(0,n.createFocusNavigator)(t),u=r=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(a),l.setCurrentPage(t.indexOf(r))};function h(n){const u=e.getKeyboardShortcutsCtrl(),h=n.getKeyboardShortcutsCtrl();l.clear(),h.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:u.getContext(a),callback:()=>{n.isSubMenu()&&n.close(),u.listen(a)}}]),n.isSubMenu()||u.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const n=e.getNavigator();n.getCurrentPage()>-1&&(r=n.getCurrentPage()),n.clear(),t.shiftKey?l.toPreviousItem():l.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const r=t[l.getCurrentPage()];r instanceof s.SelectUI&&(r.openOptions(),e.preventDefault()),r instanceof o.LinkUI&&(r.activate(),e.preventDefault()),r instanceof i.BaseUI||e.preventDefault()}}],a)}return t.forEach((e=>{e instanceof i.BaseUI&&(e.addLocalHook("click",u(e)),e.addLocalHook("focus",u(e)),e.addLocalHook("afterClose",u(e)))})),e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||l.clear()})),e.addLocalHook("afterSubmenuOpen",h),e.addLocalHook("afterOpen",h),{...l,listen:function(){e.focus(),e.getKeyboardShortcutsCtrl().listen(a)},getLastMenuPage:function(){return r}}};var n=r(55337),s=r(23335),i=r(98415),o=r(12189);const a="filters"},55337:(e,t,r)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,n.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,r)=>{const n=e[t];return n instanceof i.MultipleSelectUI?r:!(n.element&&!(0,s.isVisible)(n.element))&&void n.focus()}})};var n=r(99850),s=r(49587),i=r(89319)},98415:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=n(r(63806)),a=n(r(57340)),l=r(49587),u=r(98887),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=c(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(c=function(e){return e?r:t})(e)}const d="built",f="building",p=["click","input","keydown","keypress","keyup","focus","blur","change"];class g{static get DEFAULTS(){return(0,i.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"eventManager",new a.default(this)),(0,s.default)(this,"options",void 0),(0,s.default)(this,"_element",void 0),(0,s.default)(this,"buildState",void 0),this.hot=e,this.options=(0,i.extend)(g.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===f?this._element:this.buildState===d?(this.update(),this._element):(this.buildState=f,this.build(),this.buildState=d,this._element)}isBuilt(){return this.buildState===d}translateIfPossible(e){return"string"==typeof e&&e.startsWith(h.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=f),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,l.addClass)(this._element,this.options.className),this.options.children.length)(0,u.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,i.objectEach)(this.options,((e,r)=>{void 0!==t[r]&&"className"!==r&&"tagName"!==r&&"children"!==r&&(t[r]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,u.arrayEach)(p,(r=>e(t,r)))}else(0,u.arrayEach)(p,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=g,(0,i.mixin)(g,o.default)},69346:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(76163),l=r(98415);function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var h=new WeakMap,c=new WeakSet;class d extends l.BaseUI{static get DEFAULTS(){return(0,a.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var r,n;super(e,(0,a.extend)(d.DEFAULTS,t)),u(r=this,n=c),n.add(r),function(e,t,r){u(e,t),t.set(e,r)}(this,h,{writable:!0,value:void 0}),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");(0,i.default)(this,h,this._element.firstChild),(0,o.addClass)(this._element,"htUIInput"),(0,o.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,s.default)(this,h).type=this.options.type,(0,s.default)(this,h).placeholder=this.translateIfPossible(this.options.placeholder),(0,s.default)(this,h).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&(0,s.default)(this,h).focus()}}function f(e){this.options.value=e.target.value}t.InputUI=d},12189:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=r(98415);function l(e,t,r){!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,r)}var u=new WeakMap;class h extends a.BaseUI{static get DEFAULTS(){return(0,o.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,o.extend)(h.DEFAULTS,t)),l(this,u,{writable:!0,value:void 0})}build(){super.build(),(0,i.default)(this,u,this._element.firstChild)}update(){this.isBuilt()&&((0,s.default)(this,u).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&(0,s.default)(this,u).focus()}activate(){(0,s.default)(this,u).click()}}t.LinkUI=h},89319:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(49587),a=r(76163),l=r(98887),u=r(49223),h=r(46029),c=r(56020),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),f=r(30369),p=r(98415),g=r(69346),m=r(12189),E=r(41902);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function y(e,t){v(e,t),t.add(e)}function C(e,t,r){v(e,t),t.set(e,r)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const R="multipleSelect.itemBox";var T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet;class L extends p.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,(0,a.extend)(L.DEFAULTS,t)),y(this,P),y(this,x),y(this,I),y(this,O),C(this,T,{writable:!0,value:[]}),C(this,N,{writable:!0,value:void 0}),C(this,_,{writable:!0,value:void 0}),C(this,b,{writable:!0,value:void 0}),C(this,M,{writable:!0,value:void 0}),C(this,A,{writable:!0,value:void 0}),(0,i.default)(this,b,new g.InputUI(this.hot,{placeholder:d.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),(0,i.default)(this,M,new m.LinkUI(this.hot,{textContent:d.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),(0,i.default)(this,A,new m.LinkUI(this.hot,{textContent:d.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return(0,s.default)(this,N)}registerHooks(){(0,s.default)(this,b).addLocalHook("keydown",(e=>S(this,I,k).call(this,e))),(0,s.default)(this,b).addLocalHook("input",(e=>S(this,O,D).call(this,e))),(0,s.default)(this,M).addLocalHook("click",(e=>S(this,x,H).call(this,e))),(0,s.default)(this,A).addLocalHook("click",(e=>S(this,P,F).call(this,e)))}setItems(e){(0,i.default)(this,T,e),(0,s.default)(this,N)&&(0,s.default)(this,N).loadData((0,s.default)(this,T))}setLocale(e){(0,i.default)(this,_,e)}getLocale(){return(0,s.default)(this,_)}getItems(){return[...(0,s.default)(this,T)]}getValue(){return function(e){const t=[];return(0,l.arrayEach)(e,(e=>{e.checked&&t.push(e.value)})),t}((0,s.default)(this,T))}getSearchInputElement(){return(0,s.default)(this,b)}getSelectAllElement(){return(0,s.default)(this,M)}getClearAllElement(){return(0,s.default)(this,A)}isSelectedAllValues(){return(0,s.default)(this,T).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),r=new p.BaseUI(this.hot,{className:"htUISelectionControls",children:[(0,s.default)(this,M),(0,s.default)(this,A)]});this._element.appendChild((0,s.default)(this,b).element),this._element.appendChild(r.element),this._element.appendChild(t);const n=t=>{if(!this._element)return;(0,s.default)(this,N)&&(0,s.default)(this,N).destroy(),(0,o.addClass)(t,"htUIMultipleSelectHot"),(0,i.default)(this,N,new this.hot.constructor(t,{data:(0,s.default)(this,T),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,r,n,s,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{(0,s.default)(this,N).listen()},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>(0,s.default)(this,N).container.scrollWidth-(0,o.getScrollbarWidth)(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),(0,s.default)(this,N).init();const r=(0,s.default)(this,N).getShortcutManager().getContext("grid");r.removeShortcutsByKeys(["Tab"]),r.removeShortcutsByKeys(["Shift","Tab"]),r.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:R}),r.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{(0,s.default)(this,N).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:R})};n(t),this.hot._registerTimeout((()=>n(t)),100)}focus(){this.isBuilt()&&(0,s.default)(this,N).listen()}reset(){(0,s.default)(this,b).reset(),(0,s.default)(this,M).reset(),(0,s.default)(this,A).reset()}update(){this.isBuilt()&&((0,s.default)(this,N).loadData(function(e,t){const r=(0,E.createArrayAssertion)(t);return(0,l.arrayMap)(e,(e=>(e.checked=r(e.value),e)))}((0,s.default)(this,T),this.options.value)),super.update())}destroy(){(0,s.default)(this,N)&&(0,s.default)(this,N).destroy(),(0,s.default)(this,b).destroy(),(0,s.default)(this,A).destroy(),(0,s.default)(this,M).destroy(),(0,i.default)(this,b,null),(0,i.default)(this,A,null),(0,i.default)(this,M,null),(0,i.default)(this,N,null),(0,i.default)(this,T,null),super.destroy()}getDisplayValuesAtCol(e){if(!Number.isInteger(e))return null;const t=this.hot.countSourceRows(),r=[];let n;for(let i=0;i<t;i+=1){const t=this.hot.getCellMeta(i,e),{prop:a,displayValue:l}=t,u=this.hot.getSourceDataAtCell(i,e);var s;if(l)n=l;else(0,o.renderMockCell)(this.hot.rootDocument,this.hot.getCellRenderer(i,e),[this.hot,i,e,a,u,t]),n=null!==(s=t.displayValue)&&void 0!==s?s:u;r.push(n)}return r}}function D(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let r;r=""===t?[...(0,s.default)(this,T)]:(0,l.arrayFilter)((0,s.default)(this,T),(e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),(0,s.default)(this,N).loadData(r)}function k(e){this.runLocalHooks("keydown",e,this);(0,h.partial)(u.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,f.stopImmediatePropagation)(e),(0,s.default)(this,N).listen(),(0,s.default)(this,N).selectCell(0,0))}function H(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,s.default)(this,N).getSourceData(),((e,r)=>{e.checked=!0,t.push((0,c.dataRowToChangesArray)(e,r)[0])})),(0,s.default)(this,N).setSourceDataAtCell(t)}function F(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,s.default)(this,N).getSourceData(),((e,r)=>{e.checked=!1,t.push((0,c.dataRowToChangesArray)(e,r)[0])})),(0,s.default)(this,N).setSourceDataAtCell(t)}t.MultipleSelectUI=L;t.default=L},20498:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=r(98415);function l(e,t,r){!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,r)}var u=new WeakMap,h=new WeakMap;class c extends a.BaseUI{static get DEFAULTS(){return(0,o.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,o.extend)(c.DEFAULTS,t)),l(this,u,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0})}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),(0,i.default)(this,h,e),(0,i.default)(this,u,this._element.firstChild),(0,s.default)(this,u).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,s.default)(this,h).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&(0,s.default)(this,u).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&((0,s.default)(this,u).checked=e)}focus(){this.isBuilt()&&(0,s.default)(this,u).focus()}}t.RadioInputUI=c},23335:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(48427)),i=n(r(42538)),o=r(51366),a=r(76163),l=r(98887),u=r(49587),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=p(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),c=r(86373),d=r(98415),f=r(66862);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(p=function(e){return e?r:t})(e)}function g(e,t){E(e,t),t.add(e)}function m(e,t,r){E(e,t),t.set(e,r)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var y=new WeakMap,C=new WeakMap,v=new WeakMap,S=new WeakMap,R=new WeakMap,T=new WeakSet,N=new WeakSet,_=new WeakSet;class b extends d.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,(0,a.extend)(b.DEFAULTS,t)),g(this,_),g(this,N),g(this,T),m(this,y,{writable:!0,value:null}),m(this,C,{writable:!0,value:[]}),m(this,v,{writable:!0,value:void 0}),m(this,S,{writable:!0,value:void 0}),m(this,R,{writable:!0,value:void 0}),this.registerHooks()}getMenu(){return(0,i.default)(this,y)}registerHooks(){this.addLocalHook("click",(()=>w(this,_,O).call(this)))}setItems(e){(0,s.default)(this,C,this.translateNames(e)),(0,i.default)(this,y)&&(0,i.default)(this,y).setMenuItems((0,i.default)(this,C))}translateNames(e){return(0,l.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),(0,s.default)(this,y,new o.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),(0,i.default)(this,y).setMenuItems((0,i.default)(this,C));const e=new d.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new d.BaseUI(this.hot,{className:"htUISelectDropdown"});(0,s.default)(this,v,e),(0,s.default)(this,S,e.element),(0,s.default)(this,R,t),this.hot.getSettings().ariaTags&&((0,u.setAttribute)(t.element,[(0,f.A11Y_HIDDEN)()]),(0,u.setAttribute)(this._element,[(0,f.A11Y_LISTBOX)()])),(0,l.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),(0,i.default)(this,y).addLocalHook("select",(e=>w(this,T,M).call(this,e))),(0,i.default)(this,y).addLocalHook("afterClose",(()=>w(this,N,A).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:(0,i.default)(this,y).hot.getTranslatedPhrase(h.FILTERS_CONDITIONS_NONE),(0,i.default)(this,S).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();(0,i.default)(this,y)&&((0,i.default)(this,y).open(),(0,i.default)(this,y).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),(0,i.default)(this,y).getNavigator().toFirstItem(),(0,i.default)(this,y).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){(0,i.default)(this,y)&&(0,i.default)(this,y).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){(0,i.default)(this,y)&&((0,i.default)(this,y).destroy(),(0,s.default)(this,y,null)),(0,i.default)(this,v)&&(0,i.default)(this,v).destroy(),(0,i.default)(this,R)&&(0,i.default)(this,R).destroy(),super.destroy()}}function M(e){e.name!==c.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function A(){this.runLocalHooks("afterClose")}function O(){this.openOptions()}t.SelectUI=b},41902:(e,t,r)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=u,t.intersectValues=function(e,t,r,n,i){const a=[],l=e===t;let h;l||(h=u(t));return(0,s.arrayEach)(e,((e,t)=>{let s=!1;(l||h(e))&&(s=!0);const u={checked:s,value:e,visualValue:o(e,r,n[t])};i&&i(u),a.push(u)})),a},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return i(e,t)},t.syncDisplayValuesToUnifiedValues=function(e,t,r){const n=[];return(0,s.arrayEach)(r,(r=>{const s=t.indexOf(r),i=e[s];n.push(i)})),n},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=o,t.unifyColumnValues=function(e){let t=e;t=l?Array.from(new Set(t)):(0,s.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},r(63517);var n=r(6022),s=r(98887);const i=(0,n.getComparisonFunction)();function o(e,t,r){let n=e;return""===n?n=`(${t})`:r&&(n=r),n}const a=new Set([1]).has(1),l=a&&"function"==typeof Array.from;function u(e){let t=e;return a&&(t=new Set(t)),function(e){let r;return r=a?t.has(e):!!~t.indexOf(e),r}}},39994:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const r=c(),n=0===r.size?[]:Array.from(null!==(t=r.get(e))&&void 0!==t?t:[]);return new Map(n.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=p,t.registerEngine=f,t.registerLanguage=g,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),r=t[u.PLUGIN_KEY],n=null==r?void 0:r.engine;if(!0===r)return null;if((0,i.isUndefined)(n))return null;var s;if("function"==typeof n.hyperformula||"function"==typeof n)return f(null!==(s=n.hyperformula)&&void 0!==s?s:n,t,e);if("object"==typeof n&&(0,i.isUndefined)(n.hyperformula)){const t=c(),r=d().get(n);return t.has(n)||t.set(n,[]),t.get(n).push(e),r&&r.push(e.guid),n.getConfig().licenseKey||n.updateConfig({licenseKey:h.DEFAULT_LICENSE_KEY}),n.getConfig().leapYear1900===h.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,l.isObjectEqual)(n.getConfig().nullDate,h.DEFAULT_SETTINGS.nullDate)||(0,a.warn)(o.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
|
972
972
|
settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),n}return null},t.setupSheet=function(e,t){!(0,i.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const r=c(),n=r.get(e),s=d(),i=s.get(e);n&&n.includes(t)&&(n.splice(n.indexOf(t),1),0===n.length&&r.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),0===i.length&&(s.delete(e),e.destroy()))}},r(63517);var s=n(r(31056)),i=r(97639),o=r(45561),a=r(31990),l=r(76163),u=r(79745),h=r(25404);function c(){const e="engine_relationship",t=(0,s.default)(u.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function d(){const e="shared_engine_usage",t=(0,s.default)(u.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function f(e,t,r){const n=t[u.PLUGIN_KEY],s=(0,h.getEngineSettingsWithDefaultsAndOverrides)(t),i=c(),o=d();p(e,n.functions),g(e,n.language);const a=e.buildEmpty(s);return i.set(a,[r]),o.set(a,[r.guid]),m(a,n.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}function p(e,t){t&&t.forEach((t=>{const{name:r,plugin:n,translations:s}=t;try{e.registerFunction(r,n,s)}catch(e){(0,a.warn)(e.message)}}))}function g(e,t){if(t){const{langCode:r}=t;try{e.registerLanguage(r,t)}catch(e){(0,a.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:r,expression:n,scope:s,options:i}=t;try{e.addNamedExpression(r,n,s,i)}catch(e){(0,a.warn)(e.message)}})),e.resumeEvaluation())}},25404:(e,t,r)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=o,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const r=e[n.PLUGIN_KEY],s=a(null!=r&&null!==(t=r.engine)&&void 0!==t&&t.hyperformula?r.engine:{}),l=o(e);return{...i,...s,...l}},t.getEngineSettingsWithOverrides=function(e){var t;const r=e[n.PLUGIN_KEY],s=a(null!=r&&null!==(t=r.engine)&&void 0!==t&&t.hyperformula?r.engine:{}),i=o(e);return{...s,...i}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((r=>void 0!==t[r]&&t[r]!==e[r]))};var n=r(79745);const s=t.DEFAULT_LICENSE_KEY="internal-use-in-handsontable",i=t.DEFAULT_SETTINGS={licenseKey:s,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function o(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[n.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function a(e){return Object.keys(e).reduce(((t,r)=>("hyperformula"!==r&&(t[r]=e[r]),t)),{})}},79745:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(68983),r(91683),r(63517);var s=n(r(93231)),i=n(r(48427)),o=n(r(42538)),a=r(33997),l=n(r(31056)),u=r(31990),h=r(57691),c=r(97639),d=r(39994),f=r(72437),p=r(25404),g=r(56020),m=r(37913),E=n(r(54925)),w=n(r(19158));function y(e,t){v(e,t),t.add(e)}function C(e,t,r){v(e,t),t.set(e,r)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const R=t.PLUGIN_KEY="formulas",T=t.SETTING_KEYS=["maxRows","maxColumns","language"],N=t.PLUGIN_PRIORITY=260;E.default.getSingleton().register("afterNamedExpressionAdded"),E.default.getSingleton().register("afterNamedExpressionRemoved"),E.default.getSingleton().register("afterSheetAdded"),E.default.getSingleton().register("afterSheetRemoved"),E.default.getSingleton().register("afterSheetRenamed"),E.default.getSingleton().register("afterFormulasValuesUpdate");const _=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet,L=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet,Y=new WeakSet,G=new WeakSet,j=new WeakSet,z=new WeakSet,$=new WeakSet,K=new WeakSet,X=new WeakSet,q=new WeakSet,Q=new WeakSet,Z=new WeakSet,J=new WeakSet;class ee extends a.BasePlugin{constructor(){var e;super(...arguments),e=this,y(this,J),y(this,Z),y(this,Q),y(this,q),y(this,X),y(this,K),y(this,$),y(this,z),y(this,j),y(this,G),y(this,Y),y(this,W),y(this,B),y(this,V),y(this,U),y(this,F),y(this,H),y(this,k),y(this,D),y(this,L),y(this,P),y(this,x),y(this,I),y(this,O),C(this,b,{writable:!0,value:!1}),C(this,M,{writable:!0,value:!1}),C(this,A,{writable:!0,value:[["valuesUpdated",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,K,ye).call(e,...r)}],["namedExpressionAdded",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,X,Ce).call(e,...r)}],["namedExpressionRemoved",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,q,ve).call(e,...r)}],["sheetAdded",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,Q,Se).call(e,...r)}],["sheetRenamed",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,Z,Re).call(e,...r)}],["sheetRemoved",function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return S(e,J,Te).call(e,...r)}]]}),(0,s.default)(this,"staticRegister",(0,l.default)("formulas")),(0,s.default)(this,"engine",null),(0,s.default)(this,"sheetName",null),(0,s.default)(this,"indexSyncer",null),(0,s.default)(this,"rowAxisSyncer",null),(0,s.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return N}static get SETTING_KEYS(){return[R,...T]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[R]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,d.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,x,ne).call(t,...r)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,L,ie).call(t,...r)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,x,ne).call(t,...r)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,L,ie).call(t,...r)})),this.addHook("modifyData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,D,oe).call(t,...r)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,k,ae).call(t,...r)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,O,te).call(t,...r)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,F,ue).call(t,...r)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,H,le).call(t,...r)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,H,le).call(t,...r)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,U,he).call(t,...r)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,V,ce).call(t,...r)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,Y,pe).call(t,...r)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,G,ge).call(t,...r)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,B,de).call(t,...r)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,W,fe).call(t,...r)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,j,me).call(t,...r)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,z,Ee).call(t,...r)})),this.indexSyncer=new w.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,r,n)=>{this.rowAxisSyncer.storeMovesInformation(e,t,n)})),this.hot.addHook("beforeColumnMove",((e,t,r,n)=>{this.columnAxisSyncer.storeMovesInformation(e,t,n)})),this.hot.addHook("afterRowMove",((e,t,r,n,s)=>{this.rowAxisSyncer.calculateAndSyncMoves(n,s)})),this.hot.addHook("afterColumnMove",((e,t,r,n,s)=>{this.columnAxisSyncer.calculateAndSyncMoves(n,s)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,P,se).call(t,...r)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,$,we).call(t,...r)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return S(t,I,re).call(t,...r)})),(0,o.default)(this,A).forEach((e=>{let[t,r]=e;return this.engine.on(t,r)})),super.enablePlugin()}else(0,u.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,o.default)(this,A).forEach((e=>{let[t,r]=e;return this.engine.off(t,r)})),(0,d.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,p.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,p.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const r=this.hot.getSettings()[R];if((0,c.isDefined)(r)&&(0,c.isDefined)(r.sheetName)&&r.sheetName!==this.sheetName&&this.switchSheet(r.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[R].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){(0,o.default)(this,A).forEach((e=>{var t;let[r,n]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(r,n)})),(0,i.default)(this,A,null),(0,d.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,c.isDefined)(t)&&!(0,g.isArrayOfArrays)(t))return(0,u.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,u.warn)("Sheet with the provided name already exists."),!1;try{const r=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(r),t),r}catch(e){return(0,u.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,u.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,m.toUpperCaseFirst)(R)}.switchSheet`)}getCellType(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const n=this.hot.toPhysicalRow(e),s=this.hot.toPhysicalColumn(t);return null!==n&&null!==s?this.engine.getCellType({sheet:r,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:r,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r=new Set;e.forEach((e=>{var t;const n=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==n&&(r.has(n)||r.add(n))})),(0,d.getRegisteredHotInstances)(this.engine).forEach(((e,n)=>{var s;(t||n!==this.sheetId)&&r.has(n)&&(e.render(),null===(s=e.view)||void 0===s||s.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:r,col:n,sheet:s}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,c.isDefined)(s)?`${s}:${r}x${n}`:""},r=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var n,s;const{row:i,col:o}=null!==(n=e.address)&&void 0!==n?n:{};if(!1===(0,c.isDefined)(i)||!1===(0,c.isDefined)(o)||i>=this.hot.countRows()||o>=this.hot.countCols())return;const a=null==e||null===(s=e.address)||void 0===s?void 0:s.sheet,l=t(e);if(void 0!==a&&!r.has(l)){const e=(0,d.getRegisteredHotInstances)(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(i,o),e.getCellMeta(i,o),(()=>{}))}}))}syncChangeWithEngine(e,t,r){const n={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(n))return void(0,u.warn)(`Not possible to set cell data at ${JSON.stringify(n)}`);const s=this.hot.getCellMeta(e,t);return(0,f.isDate)(r,s.type)&&((0,f.isDateValid)(r,s.dateFormat)?r=(0,f.getDateInHfFormat)(r,s.dateFormat):!1===(0,f.isFormula)(r)&&(r=`'${r}`)),this.engine.setCellContents(n,r)}}function te(e,t,r){const n=this.hot.propToCol(r);if(this.isFormulaCellType(t,n)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId},r=this.hot.getCellMeta(t,n);let s=this.engine.getCellValue(e);return"date"===r.type&&(0,h.isNumeric)(s)&&(s=(0,f.getDateFromExcelDate)(s,r.dateFormat)),"object"==typeof s&&null!==s?s.value:s}return e}function re(e,t,r){const{row:n,col:s}=t.getTopStartCorner(),{row:i,col:o}=t.getBottomEndCorner(),{row:a,col:l}=r.getTopStartCorner(),{row:u,col:h}=r.getBottomEndCorner(),c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(n),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId}},d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(u),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(h),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const p=this.engine.getFillRangeData(c,d),{row:g,col:m}=c.start,{row:E,col:w}=c.end,y=E-g+1,C=w-m+1;for(let e=0;e<p.length;e+=1)for(let t=0;t<p[e].length;t+=1){const r=p[e][t],n=e%y,s=t%C,i=this.hot.getCellMeta(n,s);(0,f.isDate)(r,i.type)&&(r.startsWith("'")?p[e][t]=r.slice(1):!1===this.isFormulaCellType(n,s,this.sheetId)&&(p[e][t]=(0,f.getDateInHotFormat)(r,i.dateFormat)))}return p}function ne(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R))||(0,i.default)(this,M,(0,c.isUndefined)(this.hot.getSettings().data))}function se(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((r,n)=>{r.forEach(((r,s)=>{const i=this.hot.getCellMeta(n,s),o=i.dateFormat;(0,f.isDate)(r,i.type)&&(t=!0,(0,f.isDateValid)(r,o)?e[n][s]=(0,f.getDateInHfFormat)(r,o):!1===this.isFormulaCellType(n,s)&&(e[n][s]=`'${r}`))}))})),!0===t&&((0,i.default)(this,b,!0),this.engine.setSheetContent(this.sheetId,e),(0,i.default)(this,b,!1))}function ie(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R)))if(this.sheetName=(0,d.setupSheet)(this.engine,this.hot.getSettings()[R].sheetName),(0,o.default)(this,M))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,i.default)(this,b,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,i.default)(this,b,!1)}}}function oe(e,t,r,n){if("get"!==n||(0,o.default)(this,b)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const s=this.hot.toVisualRow(e);if(null===s||null===t)return;if(!this.isFormulaCellType(s,t)){if("ARRAY"!==this.getCellType(s,t))return void((0,f.isEscapedFormulaExpression)(r.value)&&(r.value=(0,f.unescapeFormulaExpression)(r.value)))}const i={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(i),l=this.hot.getCellsMeta().find((e=>e.visualRow===s&&e.visualCol===t));void 0===l&&(l={}),"date"===l.type&&(0,h.isNumeric)(a)&&(a=(0,f.getDateFromExcelDate)(a,l.dateFormat));const u="object"==typeof a&&null!==a?a.value:a;r.value=u}function ae(e,t,r,n){if("get"!==n||(0,o.default)(this,b)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const s=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(null===s||null===i)return;if(!this.isFormulaCellType(s,i)){if("ARRAY"!==this.getCellType(s,i))return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};r.value=this.engine.getCellSerialized(l)}function le(e,t){if(_(t))return;const r=[],n=[],s=this.engine.batch((()=>{e.forEach((e=>{let[t,s,,i]=e;const o=this.hot.propToCol(s),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(o),u={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,o,i):r.push([t,o,i]),n.push({address:u})}))}));r.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{r.forEach((e=>{let[t,r,n]=e;this.syncChangeWithEngine(t,r,n)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(s),this.validateDependentCells(s,n)}function ue(e,t){if(_(t))return;const r=[],n=[];e.forEach((e=>{let[t,s,,i]=e;const o=this.hot.propToCol(s);if(!(0,h.isNumeric)(o))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(n.push({address:a}),r.push(...this.engine.setCellContents(a,i))):(0,u.warn)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(r),this.validateDependentCells(r,n)}function he(e,t){let r=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(r=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[r,t]))return!1}function ce(e,t){let r=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(r=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[r,t]))return!1}function de(e,t,r){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(r).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function fe(e,t,r){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(r).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function pe(e,t,r){if(_(r))return;const n=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(n)}function ge(e,t,r){if(_(r))return;const n=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(n)}function me(e,t,r,n){if(_(n))return;const s=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),i=this.engine.batch((()=>{s.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function Ee(e,t,r,n){if(_(n))return;const s=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),i=this.engine.batch((()=>{s.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function we(e,t,r){var n;(0,i.default)(this,b,!0);const s=this.hot.getSourceDataArray(r,0,r+((null===(n=t.__children)||void 0===n?void 0:n.length)||0),this.hot.countSourceCols());(0,i.default)(this,b,!1),s.forEach(((e,t)=>{e.forEach(((e,n)=>{this.engine.setCellContents({col:n,row:r+t,sheet:this.sheetId},[[e]])}))}))}function ye(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function Ce(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function ve(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Se(e){this.hot.runHooks("afterSheetAdded",e)}function Re(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function Te(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}t.Formulas=ee},80745:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(79745);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Formulas=n.Formulas},26022:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(37913),a=r(55728);function l(e,t,r){!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,r)}var u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakMap;t.default=class{constructor(e,t,r){l(this,u,{writable:!0,value:void 0}),l(this,h,{writable:!0,value:void 0}),l(this,c,{writable:!0,value:void 0}),l(this,d,{writable:!0,value:[]}),l(this,f,{writable:!0,value:[]}),l(this,p,{writable:!0,value:void 0}),l(this,g,{writable:!0,value:[]}),(0,i.default)(this,u,e),(0,i.default)(this,h,t),(0,i.default)(this,c,r)}setRemovedHfIndexes(e){return(0,i.default)(this,g,e.map((e=>{const t=(0,s.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,s.default)(this,g)}getRemovedHfIndexes(){return(0,s.default)(this,g)}getHfIndexFromVisualIndex(e){const t=(0,s.default)(this,h).getIndexesSequence(),r=(0,s.default)(this,h).getNotTrimmedIndexes();return t.indexOf(r[e])}syncMoves(e){const t=`move${(0,o.toUpperCaseFirst)((0,s.default)(this,u))}s`;(0,s.default)(this,c).getEngine().batch((()=>{e.forEach((e=>{const r=e.from!==e.to,n=e.from+1!==e.to;r&&n&&(0,s.default)(this,c).getEngine()[t]((0,s.default)(this,c).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,r){!1!==r&&((0,i.default)(this,f,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,i.default)(this,p,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if((0,s.default)(this,c).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const r=(0,a.getMoves)((0,s.default)(this,f),(0,s.default)(this,p),(0,s.default)(this,h).getNumberOfIndexes());null===(0,s.default)(this,c).getSheetId()?(0,s.default)(this,c).getPostponeAction((()=>this.syncMoves(r))):this.syncMoves(r)}getIndexesChangeSyncMethod(){const e=`set${(0,o.toUpperCaseFirst)((0,s.default)(this,u))}Order`;return t=>{if((0,s.default)(this,c).isPerformingUndoRedo())return;const r=(0,s.default)(this,h).getIndexesSequence();if("update"===t&&r.length>0){const t=(0,s.default)(this,d).map((e=>r.indexOf(e))),n=(0,s.default)(this,c).getEngine().getSheetDimensions((0,s.default)(this,c).getSheetId());let i;i="row"===(0,s.default)(this,u)?n.height:n.width;for(let e=t.length;e<i;e+=1)t.push(e);(0,s.default)(this,c).getEngine()[e]((0,s.default)(this,c).getSheetId(),t)}(0,i.default)(this,d,r)}}init(){(0,i.default)(this,d,(0,s.default)(this,h).getIndexesSequence())}}},19158:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=n(r(26022));function a(e,t,r){!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,r)}var l=new WeakMap,u=new WeakMap,h=new WeakMap,c=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(e,t,r){a(this,l,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,c,{writable:!0,value:!1}),a(this,d,{writable:!0,value:!1}),a(this,f,{writable:!0,value:null}),a(this,p,{writable:!0,value:null}),(0,i.default)(this,l,new o.default("row",e,this)),(0,i.default)(this,u,new o.default("column",t,this)),(0,i.default)(this,h,r)}getForAxis(e){return"row"===e?(0,s.default)(this,l):(0,s.default)(this,u)}setPerformUndo(e){(0,i.default)(this,c,e)}setPerformRedo(e){(0,i.default)(this,d,e)}isPerformingUndoRedo(){return(0,s.default)(this,c)||(0,s.default)(this,d)}getSheetId(){return(0,s.default)(this,p)}getEngine(){return(0,s.default)(this,f)}getPostponeAction(){return(0,s.default)(this,h)}setupSyncEndpoint(e,t){(0,i.default)(this,f,e),(0,i.default)(this,p,t),(0,s.default)(this,l).init(),(0,s.default)(this,u).init()}}},72437:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const r=new Date(Date.UTC(0,0,e+-1));return(0,s.default)(r).format(t)},t.getDateInHfFormat=function(e,t){return(0,s.default)(e,t,!0).format(i)},t.getDateInHotFormat=function(e,t){return(0,s.default)(e,i,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,s.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=o,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return o(e)?e.substr(1):e};var s=n(r(22418));const i="DD/MM/YYYY";function o(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},63491:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,r,,n]=e;r-n!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:r}=this.getSelectedRangeLast(),n=Math.max(Math.min(t.col,r.col),0),s=Math.max(t.col,r.col),i=[];for(let e=n;e<=s;e+=1)i.push(e);e.hideColumns(i);const o=i[i.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},r(63517);var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},60805:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var r,n;if(0===t.length)return;let s=t[0],i=t[t.length-1];s=null!==(r=this.columnIndexMapper.getNearestNotHiddenIndex(s-1,-1))&&void 0!==r?r:0,i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==n?n:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);i-s+1===this.countCols()||this.selectColumns(s,i)},disabled:!1,hidden(){const r=(0,n.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||r.length<1)return!0;t.length=0;const s=this.getSelectedRangeLast(),i=s.getTopStartCorner().col,o=s.getBottomEndCorner().col,a=this.columnIndexMapper,l=a.getRenderableFromVisualIndex(i),u=a.getRenderableFromVisualIndex(o),h=a.getNotTrimmedIndexes(),c=[];if(i!==o){if(o-i+1>u-l+1){const e=h.slice(i,o+1);c.push(...e.filter((e=>r.includes(e))))}}else if(0===l&&l<i)c.push(...h.slice(0,i));else if(null===l)c.push(...h.slice(0,this.countCols()));else{const e=this.countCols()-1;u===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>o&&c.push(...h.slice(o+1))}return(0,n.arrayEach)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},r(63517);var n=r(98887),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},4889:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(33997),a=r(49587),l=r(57691),u=r(98887),h=r(76163),c=r(97639),d=r(86373),f=n(r(54925)),p=n(r(63491)),g=n(r(60805)),m=r(41789);function E(e,t){y(e,t),t.add(e)}function w(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(52097),f.default.getSingleton().register("beforeHideColumns"),f.default.getSingleton().register("afterHideColumns"),f.default.getSingleton().register("beforeUnhideColumns"),f.default.getSingleton().register("afterUnhideColumns");const v=t.PLUGIN_KEY="hiddenColumns",S=t.PLUGIN_PRIORITY=310;var R=new WeakMap,T=new WeakMap,N=new WeakSet,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet;class I extends o.BasePlugin{constructor(){super(...arguments),E(this,O),E(this,A),E(this,M),E(this,b),E(this,_),E(this,N),w(this,R,{writable:!0,value:{}}),w(this,T,{writable:!0,value:null})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[v];(0,h.isObject)(t)&&((0,i.default)(this,R,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,i.default)(this,T,new m.HidingMap),(0,s.default)(this,T).addLocalHook("init",(()=>C(this,O,H).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,s.default)(this,T)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,A,k).call(e,...r)})),this.addHook("afterGetCellMeta",((e,t,r)=>C(this,_,P).call(this,e,t,r))),this.addHook("modifyColWidth",((e,t)=>C(this,N,x).call(this,e,t))),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,M,D).call(e,...r)})),this.addHook("modifyCopyableRange",(e=>C(this,b,L).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,i.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),r=this.isValidConfig(e);let n=t;const i=(0,s.default)(this,T).getValues().slice(),o=e.length>0;if(r&&o){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,u.arrayEach)(t,(e=>{i[e]=!1})),n=(0,u.arrayReduce)(i,((e,t,r)=>(t&&e.push(this.hot.toVisualColumn(r)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,n,r&&o)&&(r&&o&&(0,s.default)(this,T).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,n,r&&o,r&&n.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,u.arrayEach)(e,(e=>{(0,s.default)(this,T).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,n,r,r&&n.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.hideColumns(t)}getHiddenColumns(){return(0,u.arrayMap)((0,s.default)(this,T).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,s.default)(this,T).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,u.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}destroy(){(0,i.default)(this,R,null),(0,i.default)(this,T,null),super.destroy()}}function x(e,t){return this.isHidden(t)?0:(0,s.default)(this,R).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function P(e,t,r){if(!1===(0,s.default)(this,R).copyPasteEnabled&&this.isHidden(t)&&(r.skipColumnOnPaste=!0),this.isHidden(t-1))r.className=r.className||"",-1===r.className.indexOf("afterHiddenColumn")&&(r.className+=" afterHiddenColumn");else if(r.className){const e=r.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),r.className=e.join(" ")}}}function L(e){if((0,s.default)(this,R).copyPasteEnabled)return e;const t=[],r=(e,r,n,s)=>{t.push({startRow:e,endRow:r,startCol:n,endCol:s})};return(0,u.arrayEach)(e,(e=>{let t=!0,n=0;(0,l.rangeEach)(e.startCol,e.endCol,(s=>{this.isHidden(s)?(t||r(e.startRow,e.endRow,n,s-1),t=!0):(t&&(n=s),s===e.endCol&&r(e.startRow,e.endRow,n,s),t=!1)}))})),t}function D(e,t){if(!(0,s.default)(this,R).indicators||e<0)return;const r=[];e>=1&&this.isHidden(e-1)&&r.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&r.push("beforeHiddenColumn"),(0,a.addClass)(t,r)}function k(e){e.items.push({name:d.SEPARATOR},(0,p.default)(this),(0,g.default)(this))}function H(){Array.isArray((0,s.default)(this,R).columns)&&this.hideColumns((0,s.default)(this,R).columns)}t.HiddenColumns=I},85550:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(4889);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.HiddenColumns=n.HiddenColumns},54281:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[r,,n]=e;r-n!=0&&(t=1)}return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:r}=this.getSelectedRangeLast(),n=Math.max(Math.min(t.row,r.row),0),s=Math.max(t.row,r.row),i=[];for(let e=n;e<=s;e+=1)i.push(e);e.hideRows(i);const o=i[i.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},r(63517);var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},79725:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var r,n;if(0===t.length)return;let s=t[0],i=t[t.length-1];s=null!==(r=this.rowIndexMapper.getNearestNotHiddenIndex(s-1,-1))&&void 0!==r?r:0,i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==n?n:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);i-s+1===this.countRows()||this.selectRows(s,i)},disabled:!1,hidden(){const r=(0,n.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||r.length<1)return!0;t.length=0;const s=this.getSelectedRangeLast(),i=s.getTopStartCorner().row,o=s.getBottomEndCorner().row,a=this.rowIndexMapper,l=a.getRenderableFromVisualIndex(i),u=a.getRenderableFromVisualIndex(o),h=a.getNotTrimmedIndexes(),c=[];if(i!==o){if(o-i+1>u-l+1){const e=h.slice(i,o+1);c.push(...e.filter((e=>r.includes(e))))}}else if(0===l&&l<i)c.push(...h.slice(0,i));else if(null===l)c.push(...h.slice(0,this.countRows()));else{const e=this.countRows()-1;u===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>o&&c.push(...h.slice(o+1))}return(0,n.arrayEach)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},r(63517);var n=r(98887),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=i(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=s?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(i=function(e){return e?r:t})(e)}},1727:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(33997),a=r(49587),l=r(57691),u=r(98887),h=r(76163),c=r(97639),d=r(86373),f=n(r(54925)),p=n(r(54281)),g=n(r(79725)),m=r(41789);function E(e,t){y(e,t),t.add(e)}function w(e,t,r){y(e,t),t.set(e,r)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(25972),f.default.getSingleton().register("beforeHideRows"),f.default.getSingleton().register("afterHideRows"),f.default.getSingleton().register("beforeUnhideRows"),f.default.getSingleton().register("afterUnhideRows");const v=t.PLUGIN_KEY="hiddenRows",S=t.PLUGIN_PRIORITY=320;var R=new WeakMap,T=new WeakMap,N=new WeakSet,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet;class I extends o.BasePlugin{constructor(){super(...arguments),E(this,O),E(this,A),E(this,M),E(this,b),E(this,_),E(this,N),w(this,R,{writable:!0,value:{}}),w(this,T,{writable:!0,value:null})}static get PLUGIN_KEY(){return v}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[v]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[v];(0,h.isObject)(t)&&((0,i.default)(this,R,t),(0,c.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,i.default)(this,T,new m.HidingMap),(0,s.default)(this,T).addLocalHook("init",(()=>C(this,O,H).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,s.default)(this,T)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,A,k).call(e,...r)})),this.addHook("afterGetCellMeta",((e,t,r)=>C(this,_,P).call(this,e,t,r))),this.addHook("modifyRowHeight",((e,t)=>C(this,N,x).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return C(e,M,D).call(e,...r)})),this.addHook("modifyCopyableRange",(e=>C(this,b,L).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,i.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),r=this.isValidConfig(e);let n=t;const i=(0,s.default)(this,T).getValues().slice(),o=e.length>0;if(r&&o){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,u.arrayEach)(t,(e=>{i[e]=!1})),n=(0,u.arrayReduce)(i,((e,t,r)=>(t&&e.push(this.hot.toVisualRow(r)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,n,r&&o)&&(r&&o&&(0,s.default)(this,T).setValues(i),this.hot.runHooks("afterUnhideRows",t,n,r&&o,r&&n.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,u.arrayEach)(e,(e=>{(0,s.default)(this,T).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,n,r,r&&n.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.hideRows(t)}getHiddenRows(){return(0,u.arrayMap)((0,s.default)(this,T).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,s.default)(this,T).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,u.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}destroy(){(0,i.default)(this,R,null),(0,i.default)(this,T,null),super.destroy()}}function x(e,t){return this.isHidden(t)?0:e}function P(e,t,r){if(!1===(0,s.default)(this,R).copyPasteEnabled&&this.isHidden(e)&&(r.skipRowOnPaste=!0),this.isHidden(e-1))r.className=r.className||"",-1===r.className.indexOf("afterHiddenRow")&&(r.className+=" afterHiddenRow");else if(r.className){const e=r.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),r.className=e.join(" ")}}}function L(e){if((0,s.default)(this,R).copyPasteEnabled)return e;const t=[],r=(e,r,n,s)=>{t.push({startRow:e,endRow:r,startCol:n,endCol:s})};return(0,u.arrayEach)(e,(e=>{let t=!0,n=0;(0,l.rangeEach)(e.startRow,e.endRow,(s=>{this.isHidden(s)?(t||r(n,s-1,e.startCol,e.endCol),t=!0):(t&&(n=s),s===e.endRow&&r(n,s,e.startCol,e.endCol),t=!1)}))})),t}function D(e,t){if(!(0,s.default)(this,R).indicators||e<0)return;const r=[];e>=1&&this.isHidden(e-1)&&r.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&r.push("beforeHiddenRow"),(0,a.addClass)(t,r)}function k(e){e.items.push({name:d.SEPARATOR},(0,p.default)(this),(0,g.default)(this))}function H(){Array.isArray((0,s.default)(this,R).rows)&&this.hideRows((0,s.default)(this,R).rows)}t.HiddenRows=I},27524:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(1727);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.HiddenRows=n.HiddenRows},6191:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,H.registerPlugin)(n.AutoColumnSize),(0,H.registerPlugin)(s.Autofill),(0,H.registerPlugin)(i.AutoRowSize),(0,H.registerPlugin)(a.BindRowsWithHeaders),(0,H.registerPlugin)(l.CollapsibleColumns),(0,H.registerPlugin)(u.ColumnSorting),(0,H.registerPlugin)(h.ColumnSummary),(0,H.registerPlugin)(c.Comments),(0,H.registerPlugin)(d.ContextMenu),(0,H.registerPlugin)(f.CopyPaste),(0,H.registerPlugin)(p.CustomBorders),(0,H.registerPlugin)(g.DragToScroll),(0,H.registerPlugin)(m.DropdownMenu),(0,H.registerPlugin)(E.ExportFile),(0,H.registerPlugin)(w.Filters),(0,H.registerPlugin)(y.Formulas),(0,H.registerPlugin)(C.HiddenColumns),(0,H.registerPlugin)(v.HiddenRows),(0,H.registerPlugin)(S.ManualColumnFreeze),(0,H.registerPlugin)(R.ManualColumnMove),(0,H.registerPlugin)(T.ManualColumnResize),(0,H.registerPlugin)(N.ManualRowMove),(0,H.registerPlugin)(_.ManualRowResize),(0,H.registerPlugin)(b.MergeCells),(0,H.registerPlugin)(M.MultiColumnSorting),(0,H.registerPlugin)(A.MultipleSelectionHandles),(0,H.registerPlugin)(O.NestedHeaders),(0,H.registerPlugin)(I.NestedRows),(0,H.registerPlugin)(x.PersistentState),(0,H.registerPlugin)(P.Search),(0,H.registerPlugin)(L.TouchScroll),(0,H.registerPlugin)(D.TrimRows),(0,H.registerPlugin)(k.UndoRedo)};var n=r(87070);t.AutoColumnSize=n.AutoColumnSize;var s=r(56996);t.Autofill=s.Autofill;var i=r(12987);t.AutoRowSize=i.AutoRowSize;var o=r(33997);t.BasePlugin=o.BasePlugin;var a=r(26298);t.BindRowsWithHeaders=a.BindRowsWithHeaders;var l=r(85792);t.CollapsibleColumns=l.CollapsibleColumns;var u=r(8540);t.ColumnSorting=u.ColumnSorting;var h=r(75001);t.ColumnSummary=h.ColumnSummary;var c=r(70013);t.Comments=c.Comments;var d=r(22031);t.ContextMenu=d.ContextMenu;var f=r(82630);t.CopyPaste=f.CopyPaste;var p=r(93725);t.CustomBorders=p.CustomBorders;var g=r(59910);t.DragToScroll=g.DragToScroll;var m=r(82143);t.DropdownMenu=m.DropdownMenu;var E=r(57103);t.ExportFile=E.ExportFile;var w=r(13194);t.Filters=w.Filters;var y=r(80745);t.Formulas=y.Formulas;var C=r(85550);t.HiddenColumns=C.HiddenColumns;var v=r(27524);t.HiddenRows=v.HiddenRows;var S=r(35413);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=r(30654);t.ManualColumnMove=R.ManualColumnMove;var T=r(61714);t.ManualColumnResize=T.ManualColumnResize;var N=r(76372);t.ManualRowMove=N.ManualRowMove;var _=r(80215);t.ManualRowResize=_.ManualRowResize;var b=r(89409);t.MergeCells=b.MergeCells;var M=r(3186);t.MultiColumnSorting=M.MultiColumnSorting;var A=r(59793);t.MultipleSelectionHandles=A.MultipleSelectionHandles;var O=r(38284);t.NestedHeaders=O.NestedHeaders;var I=r(6604);t.NestedRows=I.NestedRows;var x=r(46271);t.PersistentState=x.PersistentState;var P=r(24);t.Search=P.Search;var L=r(8458);t.TouchScroll=L.TouchScroll;var D=r(80044);t.TrimRows=D.TrimRows;var k=r(91515);t.UndoRedo=k.UndoRedo;var H=r(5280);t.registerPlugin=H.registerPlugin,t.getPlugin=H.getPlugin,t.getPluginsNames=H.getPluginsNames},19552:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,r){const[{start:{col:n}}]=r;e.freezeColumn(n),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},59565:(e,t,r)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(n.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,r){const[{start:{col:n}}]=r;e.unfreezeColumn(n),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(497));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}},35413:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(87004);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ManualColumnFreeze=n.ManualColumnFreeze},87004:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(33997),a=n(r(54925)),l=n(r(19552)),u=n(r(59565));function h(e,t){c(e,t),t.add(e)}function c(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(18633),a.default.getSingleton().register("beforeColumnFreeze"),a.default.getSingleton().register("afterColumnFreeze"),a.default.getSingleton().register("beforeColumnUnfreeze"),a.default.getSingleton().register("afterColumnUnfreeze");const f=t.PLUGIN_KEY="manualColumnFreeze",p=t.PLUGIN_PRIORITY=110;var g=new WeakMap,m=new WeakSet,E=new WeakSet;class w extends o.BasePlugin{constructor(){var e,t,r;super(...arguments),h(this,E),h(this,m),r={writable:!0,value:!1},c(e=this,t=g),t.set(e,r)}static get PLUGIN_KEY(){return f}static get PLUGIN_PRIORITY(){return p}isEnabled(){return!!this.hot.getSettings()[f]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>d(this,m,y).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>d(this,E,C).call(this,e,t))),super.enablePlugin())}disablePlugin(){(0,i.default)(this,g,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),r=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;(0,s.default)(this,g)||(0,i.default)(this,g,!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,r)&&(r&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,r))}unfreezeColumn(e){const t=this.hot.getSettings(),r=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;(0,s.default)(this,g)||(0,i.default)(this,g,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,r)&&(r&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,r))}}function y(e){e.items.push({name:"---------"},(0,l.default)(this),(0,u.default)(this))}function C(e,t){if((0,s.default)(this,g)){const r=this.hot.getSettings().fixedColumnsStart;if(t<r)return!1;if(e.some((e=>e<r)))return!1}}t.ManualColumnFreeze=w},30654:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(95517);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ManualColumnMove=n.ManualColumnMove},95517:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(48427)),i=n(r(42538)),o=r(33997),a=n(r(54925)),l=r(98887),u=r(49587),h=r(30369),c=r(57691),d=n(r(89747)),f=n(r(40087));function p(e,t){m(e,t),t.add(e)}function g(e,t,r){m(e,t),t.set(e,r)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(36881),a.default.getSingleton().register("beforeColumnMove"),a.default.getSingleton().register("afterColumnMove");const w=t.PLUGIN_KEY="manualColumnMove",y=t.PLUGIN_PRIORITY=120,C="ht__manualColumnMove",v="show-ui",S="on-moving--columns",R="after-selection--columns";var T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet;class B extends o.BasePlugin{constructor(){super(...arguments),p(this,V),p(this,U),p(this,F),p(this,H),p(this,k),p(this,D),g(this,T,{writable:!0,value:new d.default(this.hot)}),g(this,N,{writable:!0,value:new f.default(this.hot)}),g(this,_,{writable:!0,value:[]}),g(this,b,{writable:!0,value:0}),g(this,M,{writable:!0,value:!1}),g(this,A,{writable:!0,value:{}}),g(this,O,{writable:!0,value:void 0}),g(this,I,{writable:!0,value:void 0}),g(this,x,{writable:!0,value:void 0}),g(this,P,{writable:!0,value:void 0}),g(this,L,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return y}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,D,W).call(e,...r)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,H,G).call(e,...r)})),this.addHook("afterScrollVertically",(()=>E(this,U,z).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return E(e,V,$).call(e,...r)})),this.buildPluginUI(),this.registerEvents(),(0,u.addClass)(this.hot.rootElement,C),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,u.removeClass)(this.hot.rootElement,C),this.unregisterEvents(),(0,i.default)(this,T).destroy(),(0,i.default)(this,N).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const r=(0,i.default)(this,O),n=this.isMovePossible(e,t),o=this.hot.runHooks("beforeColumnMove",e,t,r,n);if((0,s.default)(this,O,void 0),!1===o)return;n&&this.hot.columnIndexMapper.moveIndexes(e,t);const a=n&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,r,n,a),a}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const r=this.countFinalIndex(e,t);return(0,s.default)(this,O,t),this.moveColumns(e,r)}isMovePossible(e,t){const r=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),n=e.length+t>r,s=t<0,i=e.some((e=>e<0)),o=e.some((e=>e>=r));return!(n||s||i||o)}isColumnOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}countFinalIndex(e,t){const r=(0,l.arrayReduce)(e,((e,r)=>(r<t&&(e+=1),e)),0);return t-r}getColumnsWidth(e,t){const r=this.hot.columnIndexMapper;let n=0;for(let s=e;s<=t;s+=1){const e=r.getRenderableFromVisualIndex(s);s<0?n+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(n+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return n}moveBySettingsOrLoad(){const e=this.hot.getSettings()[w];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const r=[];return(0,c.rangeEach)(e,t,(e=>{r.push(e)})),r}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart((0,i.default)(this,I))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,r=this.hot.view._wt.wtOverlays.scrollableElement,n="number"==typeof r.scrollX?r.scrollX:r.scrollLeft;let s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,(0,i.default)(this,I)-1);const o=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=(0,i.default)(this,T).getOffset().start,h=(0,i.default)(this,T).getSize().width;let c=0,d=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,u.outerWidth)(this.hot.rootElement),s=e.innerWidth-(0,i.default)(this,x)-t;d=e.innerWidth-(0,i.default)(this,A).eventPageX-s-(void 0===r.scrollX?n:0)}else d=(0,i.default)(this,A).eventPageX-((0,i.default)(this,x)-(void 0===r.scrollX?n:0));if((0,i.default)(this,P)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart((0,i.default)(this,I))&&(s+=n),s+=c,(0,i.default)(this,I)<0)(0,i.default)(this,L)>0?(0,i.default)(this,A).col=0:(0,i.default)(this,A).col=e>0?e-1:e;else if((0,i.default)(this,A).TD.offsetWidth/2+s<=d){const e=(0,i.default)(this,I)>=(0,i.default)(this,b)?(0,i.default)(this,b)-1:(0,i.default)(this,I);(0,i.default)(this,A).col=e+1,s+=(0,i.default)(this,A).TD.offsetWidth}else(0,i.default)(this,A).col=(0,i.default)(this,I);let f=d,p=s;d+h+l>=o?f=o-h-l:d+l<a+c&&(f=a+c+Math.abs(l)),s>=o-1?p=o-1:0===p?p=1:void 0!==r.scrollX&&(0,i.default)(this,I)<(0,i.default)(this,L)&&(p-=(0,i.default)(this,x)<=r.scrollX?(0,i.default)(this,x):0),(0,i.default)(this,T).setPosition(null,f),(0,i.default)(this,N).setPosition(null,p)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>E(this,k,Y).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>E(this,F,j).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,i.default)(this,T).build(),(0,i.default)(this,N).build()}destroy(){(0,i.default)(this,T).destroy(),(0,i.default)(this,N).destroy(),super.destroy()}}function W(e,t,r,n){const o=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),c=(0,u.hasClass)(e.target,"sortAction");if(!l||!a||(0,i.default)(this,M)||0!==e.button||c)return(0,s.default)(this,M,!1),(0,i.default)(this,_).length=0,void(0,u.removeClass)(this.hot.rootElement,[S,v]);const d=(0,i.default)(this,N).isBuilt()&&!(0,i.default)(this,N).isAppended(),f=(0,i.default)(this,T).isBuilt()&&!(0,i.default)(this,T).isAppended();d&&f&&((0,i.default)(this,N).appendTo(o.hider),(0,i.default)(this,T).appendTo(o.hider));const{from:p,to:g}=l,m=Math.min(p.col,g.col),E=Math.max(p.col,g.col);if(t.row<0&&t.col>=m&&t.col<=E){n.column=!0,(0,s.default)(this,M,!0);const a=r.firstChild?(0,h.offsetRelativeTo)(e,r.firstChild).x:e.offsetX;(0,i.default)(this,A).eventPageX=e.pageX,(0,s.default)(this,I,t.col),(0,i.default)(this,A).TD=r,(0,i.default)(this,A).col=t.col,(0,s.default)(this,_,this.prepareColumnsToMoving(m,E)),(0,s.default)(this,P,!!this.hot.getSettings().rowHeaders),(0,s.default)(this,b,this.hot.countCols()),(0,s.default)(this,L,this.hot.getSettings().fixedColumnsStart),(0,s.default)(this,x,(0,u.offset)(this.hot.rootElement).left);const l=(0,i.default)(this,P)?-1:0,c=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,d=t.col<(0,i.default)(this,L),f=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),p=Math.abs(a-(this.hot.isRtl()?r.offsetWidth:0)),g=this.getColumnsWidth(m,t.col-1)+p,w=this.getColumnsWidth(l,m-1)+(d?f:0)+g;(0,i.default)(this,T).setPosition(c,w),(0,i.default)(this,T).setSize(this.getColumnsWidth(m,E),o.hider.offsetHeight-c),(0,i.default)(this,T).setOffset(null,-g),(0,u.addClass)(this.hot.rootElement,S)}else(0,u.removeClass)(this.hot.rootElement,R),(0,s.default)(this,M,!1),(0,i.default)(this,_).length=0}function Y(e){(0,i.default)(this,M)&&((0,i.default)(this,A).eventPageX=e.pageX,this.refreshPositions())}function G(e,t,r,n){this.hot.getSelectedRangeLast()&&(0,i.default)(this,M)&&((0,i.default)(this,_).indexOf(t.col)>-1?(0,u.removeClass)(this.hot.rootElement,v):(0,u.addClass)(this.hot.rootElement,v),n.row=!0,n.column=!0,n.cell=!0,(0,s.default)(this,I,t.col),(0,i.default)(this,A).TD=r)}function j(){const e=(0,i.default)(this,A).col,t=(0,i.default)(this,_).length;if((0,s.default)(this,I,void 0),(0,s.default)(this,M,!1),(0,u.removeClass)(this.hot.rootElement,[S,v,R]),this.hot.selection.isSelectedByColumnHeader()&&(0,u.addClass)(this.hot.rootElement,R),t<1||void 0===e)return;const r=(0,i.default)(this,_)[0],n=this.hot.toPhysicalColumn(r),o=this.dragColumns((0,i.default)(this,_),e);if((0,i.default)(this,_).length=0,!0===o){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(n),r=e+t-1;this.hot.selectColumns(e,r)}}function z(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;(0,i.default)(this,T).setPosition(t),(0,i.default)(this,T).setSize(null,e.hider.offsetHeight-t)}function $(){this.moveBySettingsOrLoad()}t.ManualColumnMove=B},76057:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(57691),o=r(37913);const a="px";t.default=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"_element",null),(0,s.default)(this,"state",0),(0,s.default)(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,i.isNumeric)(e)&&(this._element.style.top=e+a),(0,i.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+a)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,i.isNumeric)(e)&&(this._element.style.width=e+a),(0,i.isNumeric)(t)&&(this._element.style.height=t+a)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,i.isNumeric)(e)&&(this._element.style.marginTop=e+a),(0,i.isNumeric)(t)&&(this._element.style[`margin${(0,o.toUpperCaseFirst)(this.inlineProperty)}`]=t+a)}getOffset(){const e=this._element.style,t=`margin${(0,o.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}},89747:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(76057)),i=r(49587);class o extends s.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--backlight")}}t.default=o},40087:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(76057)),i=r(49587);class o extends s.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualColumnMove--guideline")}}t.default=o},61714:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(53161);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ManualColumnResize=n.ManualColumnResize},53161:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(48427)),i=n(r(42538)),o=r(33997),a=r(49587),l=r(98887),u=r(57691),h=r(41789);function c(e,t){f(e,t),t.add(e)}function d(e,t,r){f(e,t),t.set(e,r)}function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const g=t.PLUGIN_KEY="manualColumnResize",m=t.PLUGIN_PRIORITY=130,E="manualColumnWidths";var w=new WeakMap,y=new WeakMap,C=new WeakMap,v=new WeakMap,S=new WeakMap,R=new WeakMap,T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet,W=new WeakSet;class Y extends o.BasePlugin{static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return m}constructor(e){super(e),c(this,W),c(this,B),c(this,V),c(this,U),c(this,F),c(this,H),c(this,k),c(this,D),c(this,L),d(this,w,{writable:!0,value:null}),d(this,y,{writable:!0,value:null}),d(this,C,{writable:!0,value:[]}),d(this,v,{writable:!0,value:null}),d(this,S,{writable:!0,value:null}),d(this,R,{writable:!0,value:null}),d(this,T,{writable:!0,value:null}),d(this,N,{writable:!0,value:null}),d(this,_,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),d(this,b,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),d(this,M,{writable:!0,value:null}),d(this,A,{writable:!0,value:!1}),d(this,O,{writable:!0,value:0}),d(this,I,{writable:!0,value:null}),d(this,x,{writable:!0,value:void 0}),d(this,P,{writable:!0,value:void 0}),(0,a.addClass)((0,i.default)(this,_),"manualColumnResizer"),(0,a.addClass)((0,i.default)(this,b),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[g]}enablePlugin(){this.enabled||((0,s.default)(this,x,new h.PhysicalIndexToValueMap),(0,i.default)(this,x).addLocalHook("init",(()=>p(this,L,G).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,i.default)(this,x)),this.addHook("modifyColWidth",((e,t)=>p(this,V,q).call(this,e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>p(this,B,Q).call(this,e,t))),this.addHook("beforeColumnResize",((e,t,r)=>p(this,W,Z).call(this,e,t,r))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,s.default)(this,P,(0,i.default)(this,x).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",E,(0,i.default)(this,x).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",E,e),e.value}setManualSize(e,t){const r=Math.max(t,20),n=this.hot.toPhysicalColumn(e);return(0,i.default)(this,x).setValueAtIndex(n,r),r}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);(0,i.default)(this,x).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;(0,s.default)(this,w,e);const{_wt:t}=this.hot.view,r=t.wtTable.getCoords((0,i.default)(this,w)),n=r.col;if(n<0)return;const o=(0,a.outerHeight)((0,i.default)(this,w)),h=(0,i.default)(this,w).getBoundingClientRect();let c;n<t.getSetting("fixedColumnsStart")&&(c=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,i.default)(this,w),r.row,r.col)),c||(c=t.wtOverlays.topOverlay.getRelativeCellPosition((0,i.default)(this,w),r.row,r.col)),(0,s.default)(this,y,this.hot.columnIndexMapper.getVisualFromRenderableIndex(n)),(0,s.default)(this,C,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,r=e.getBottomEndCorner().col;(0,u.rangeEach)(t,r,(e=>{(0,i.default)(this,C).includes(e)||(0,i.default)(this,C).push(e)}))}))}(0,i.default)(this,C).includes((0,i.default)(this,y))||(0,s.default)(this,C,[(0,i.default)(this,y)]),(0,s.default)(this,N,c.start-6),(0,s.default)(this,T,parseInt(h.width,10)),(0,i.default)(this,_).style.top=`${c.top}px`,(0,i.default)(this,_).style[this.inlineDir]=`${(0,i.default)(this,N)+(0,i.default)(this,T)}px`,(0,i.default)(this,_).style.height=`${o}px`,this.hot.rootElement.appendChild((0,i.default)(this,_))}refreshHandlePosition(){(0,i.default)(this,_).style[this.inlineDir]=`${(0,i.default)(this,N)+(0,i.default)(this,v)}px`}setupGuidePosition(){const e=parseInt((0,a.outerHeight)((0,i.default)(this,_)),10),t=parseInt((0,i.default)(this,_).style.top,10)+e,r=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,a.addClass)((0,i.default)(this,_),"active"),(0,a.addClass)((0,i.default)(this,b),"active"),(0,i.default)(this,b).style.top=`${t}px`,this.refreshGuidePosition(),(0,i.default)(this,b).style.height=r-e+"px",this.hot.rootElement.appendChild((0,i.default)(this,b))}refreshGuidePosition(){(0,i.default)(this,b).style[this.inlineDir]=(0,i.default)(this,_).style[this.inlineDir]}hideHandleAndGuide(){(0,a.removeClass)((0,i.default)(this,_),"active"),(0,a.removeClass)((0,i.default)(this,b),"active")}checkIfColumnHeader(e){const t=(0,a.closest)(e,["THEAD"],this.hot.rootElement),{topOverlay:r,topInlineStartCornerOverlay:n}=this.hot.view._wt.wtOverlays;return[r.clone.wtTable.THEAD,n.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,r)=>{const n=this.hot.runHooks("beforeColumnResize",(0,i.default)(this,S),t,!0);void 0!==n&&(0,s.default)(this,S,n),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,(0,i.default)(this,S)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,i.default)(this,S),t,!0),r&&e()};if((0,i.default)(this,O)>=2){(0,i.default)(this,C).length>1?((0,l.arrayEach)((0,i.default)(this,C),(e=>{t(e)})),e()):(0,l.arrayEach)((0,i.default)(this,C),(e=>{t(e,!0)}))}(0,s.default)(this,O,0),(0,s.default)(this,I,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>p(this,D,j).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>p(this,k,z).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>p(this,H,$).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>p(this,F,K).call(this))),this.eventManager.addEventListener((0,i.default)(this,_),"contextmenu",(()=>p(this,U,X).call(this)))}destroy(){super.destroy()}}function G(){const e=this.hot.getSettings()[g],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{(0,i.default)(this,x).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{(0,i.default)(this,x).setValueAtIndex(t,e)}))}),!0),(0,s.default)(this,P,e)):!0===e&&Array.isArray((0,i.default)(this,P))&&this.hot.batchExecution((()=>{(0,i.default)(this,P).forEach(((e,t)=>{(0,i.default)(this,x).setValueAtIndex(t,e)}))}),!0)}function j(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,i.default)(this,A)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const r=t.getAttribute("colspan");!t||null!==r&&"1"!==r||(0,i.default)(this,M)||this.setupHandlePosition(t)}}function z(e){(0,a.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition((0,i.default)(this,w)),this.setupGuidePosition(),(0,s.default)(this,M,!0),null===(0,i.default)(this,I)&&((0,s.default)(this,I,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,i.default)(this,I))),(0,s.default)(this,O,(0,i.default)(this,O)+1),this.startX=e.pageX,(0,s.default)(this,S,(0,i.default)(this,T)))}function $(e){if((0,i.default)(this,M)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();(0,s.default)(this,v,(0,i.default)(this,T)+t),(0,l.arrayEach)((0,i.default)(this,C),(e=>{(0,s.default)(this,S,this.setManualSize(e,(0,i.default)(this,v)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function K(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,r)=>{this.hot.runHooks("beforeColumnResize",(0,i.default)(this,S),t,!1),r&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,i.default)(this,S),t,!1)};if((0,i.default)(this,M)){if(this.hideHandleAndGuide(),(0,s.default)(this,M,!1),(0,i.default)(this,S)!==(0,i.default)(this,T)){(0,i.default)(this,C).length>1?((0,l.arrayEach)((0,i.default)(this,C),(e=>{t(e)})),e()):(0,l.arrayEach)((0,i.default)(this,C),(e=>{t(e,!0)}))}this.setupHandlePosition((0,i.default)(this,w))}}function X(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,i.default)(this,_)),this.hot.rootElement.removeChild((0,i.default)(this,b)),(0,s.default)(this,M,!1),(0,s.default)(this,A,!0),this.hot._registerImmediate((()=>{(0,s.default)(this,A,!1)}))}function q(e,t){let r=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),n=(0,i.default)(this,x).getValueAtIndex(e);this.hot.getSettings()[g]&&n&&(r=n)}return r}function Q(e,t){let r=(0,i.default)(this,x).getValueAtIndex(t);return null===r&&(r=e),r}function Z(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}t.ManualColumnResize=Y},76372:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(97944);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ManualRowMove=n.ManualRowMove},97944:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(48427)),i=n(r(42538)),o=r(33997),a=n(r(54925)),l=r(98887),u=r(49587),h=r(57691),c=n(r(32510)),d=n(r(42699));function f(e,t){g(e,t),t.add(e)}function p(e,t,r){g(e,t),t.set(e,r)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(83988),a.default.getSingleton().register("beforeRowMove"),a.default.getSingleton().register("afterRowMove");const E=t.PLUGIN_KEY="manualRowMove",w=t.PLUGIN_PRIORITY=140,y="ht__manualRowMove",C="show-ui",v="on-moving--rows",S="after-selection--rows";var R=new WeakMap,T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakSet,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet,L=new WeakSet;class D extends o.BasePlugin{constructor(){super(...arguments),f(this,L),f(this,P),f(this,x),f(this,I),f(this,O),f(this,A),p(this,R,{writable:!0,value:new c.default(this.hot)}),p(this,T,{writable:!0,value:new d.default(this.hot)}),p(this,N,{writable:!0,value:[]}),p(this,_,{writable:!0,value:void 0}),p(this,b,{writable:!0,value:{}}),p(this,M,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,A,k).call(e,...r)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,I,F).call(e,...r)})),this.addHook("afterScrollHorizontally",(()=>m(this,P,V).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return m(e,L,B).call(e,...r)})),this.buildPluginUI(),this.registerEvents(),(0,u.addClass)(this.hot.rootElement,y),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,u.removeClass)(this.hot.rootElement,y),this.unregisterEvents(),(0,i.default)(this,R).destroy(),(0,i.default)(this,T).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const r=(0,i.default)(this,M),n=this.isMovePossible(e,t),o=this.hot.runHooks("beforeRowMove",e,t,r,n);if((0,s.default)(this,M,void 0),!1===o)return;n&&this.hot.rowIndexMapper.moveIndexes(e,t);const a=n&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,r,n,a),a}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const r=this.countFinalIndex(e,t);return(0,s.default)(this,M,t),this.moveRows(e,r)}isMovePossible(e,t){const r=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),n=e.length+t>r,s=t<0,i=e.some((e=>e<0)),o=e.some((e=>e>=r));return!(n||s||i||o)}isRowOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}countFinalIndex(e,t){const r=(0,l.arrayReduce)(e,((e,r)=>(r<t&&(e+=1),e)),0);return t-r}getRowsHeight(e,t){const r=this.hot.rowIndexMapper;let n=0;for(let s=e;s<=t;s++){const e=r.getRenderableFromVisualIndex(s);null!==e&&(n+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return n}moveBySettingsOrLoad(){const e=this.hot.getSettings()[E];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:r,to:n}=e,s=Math.min(r.row,n.row),i=Math.max(r.row,n.row);return(0,h.rangeEach)(s,i,(e=>{t.push(e)})),t}refreshPositions(){const e=(0,i.default)(this,b).coords,t=this.hot.view.getFirstFullyVisibleRow(),r=this.hot.view.getLastFullyVisibleRow(),n=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&r<n&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(r+1,1),void 0,!0);const s=this.hot.view._wt.wtTable,o=(0,i.default)(this,b).TD,a=this.hot.rootElement,l=(0,u.offset)(a),h=(0,u.getTrimmingContainer)(a),c=s.holder.scrollTop,d=this.hot.rootWindow!==h?h.scrollTop:0,f=l.top-d,p=(0,i.default)(this,b).eventPageY-f+c,g=s.hider.offsetHeight,m=s.TBODY.offsetTop,E=(0,i.default)(this,R).getOffset().top,w=(0,i.default)(this,R).getSize().height,y=o.offsetHeight/2,C=o.offsetHeight;let v=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const S=p>=v+y;this.isFixedRowTop(e.row)&&(v+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?(0,i.default)(this,b).row=t>0?t-1:t:S?((0,i.default)(this,b).row=e.row+1,v+=0===e.row?C-1:C):(0,i.default)(this,b).row=e.row;let N=p,_=v;p+w+E>=g?N=g-w-E:p+E<m&&(N=m+Math.abs(E)),v>=g-1&&(_=g-1),(0,i.default)(this,R).setPosition(N),(0,i.default)(this,T).setPosition(_)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>m(this,O,H).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>m(this,x,U).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,i.default)(this,R).build(),(0,i.default)(this,T).build()}destroy(){(0,i.default)(this,R).destroy(),(0,i.default)(this,T).destroy(),super.destroy()}}function k(e,t,r,n){const{wtTable:o,wtViewport:a}=this.hot.view._wt,l=this.hot.selection.isSelectedByRowHeader(),h=this.hot.getSelectedRangeLast();if(!h||!l||(0,i.default)(this,_)||0!==e.button)return(0,s.default)(this,_,!1),(0,i.default)(this,N).length=0,void(0,u.removeClass)(this.hot.rootElement,[v,C]);const c=(0,i.default)(this,T).isBuilt()&&!(0,i.default)(this,T).isAppended(),d=(0,i.default)(this,R).isBuilt()&&!(0,i.default)(this,R).isAppended();c&&d&&((0,i.default)(this,T).appendTo(o.hider),(0,i.default)(this,R).appendTo(o.hider));const{from:f,to:p}=h,g=Math.min(f.row,p.row),m=Math.max(f.row,p.row);if(t.col<0&&t.row>=g&&t.row<=m){n.row=!0,(0,s.default)(this,_,!0),(0,i.default)(this,b).eventPageY=e.pageY,(0,i.default)(this,b).coords=t,(0,i.default)(this,b).TD=r,(0,s.default)(this,N,this.prepareRowsToMoving());const l=o.holder.scrollLeft+a.getRowHeaderWidth(),h=this.getRowsHeight(g,t.row-1)+e.offsetY;(0,i.default)(this,R).setPosition(null,l),(0,i.default)(this,R).setSize(o.hider.offsetWidth-l,this.getRowsHeight(g,m)),(0,i.default)(this,R).setOffset(-h,null),(0,u.addClass)(this.hot.rootElement,v),this.refreshPositions()}else(0,u.removeClass)(this.hot.rootElement,S),(0,s.default)(this,_,!1),(0,i.default)(this,N).length=0}function H(e){(0,i.default)(this,_)&&((0,i.default)(this,b).eventPageY=e.pageY,this.refreshPositions())}function F(e,t,r,n){this.hot.getSelectedRangeLast()&&(0,i.default)(this,_)&&((0,i.default)(this,N).indexOf(t.row)>-1?(0,u.removeClass)(this.hot.rootElement,C):(0,u.addClass)(this.hot.rootElement,C),n.row=!0,n.column=!0,n.cell=!0,(0,i.default)(this,b).coords=t,(0,i.default)(this,b).TD=r)}function U(){const e=(0,i.default)(this,b).row,t=(0,i.default)(this,N).length;if((0,s.default)(this,_,!1),(0,u.removeClass)(this.hot.rootElement,[v,C,S]),this.hot.selection.isSelectedByRowHeader()&&(0,u.addClass)(this.hot.rootElement,S),t<1||void 0===e)return;const r=(0,i.default)(this,N)[0],n=this.hot.toPhysicalRow(r),o=this.dragRows((0,i.default)(this,N),e);if((0,i.default)(this,N).length=0,!0===o){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(n),r=e+t-1;this.hot.selectRows(e,r)}}function V(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;(0,i.default)(this,R).setPosition(null,t),(0,i.default)(this,R).setSize(e.hider.offsetWidth-t)}function B(){this.moveBySettingsOrLoad()}t.ManualRowMove=D},70843:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));const i="px";t.default=class{constructor(e){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"_element",null),(0,s.default)(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+i),void 0!==t&&(this._element.style.left=t+i)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+i),t&&(this._element.style.height=t+i)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+i),t&&(this._element.style.marginLeft=t+i)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}},32510:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(70843)),i=r(49587);class o extends s.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--backlight")}}t.default=o},42699:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(70843)),i=r(49587);class o extends s.default{build(){super.build(),(0,i.addClass)(this._element,"ht__manualRowMove--guideline")}}t.default=o},80215:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(33204);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.ManualRowResize=n.ManualRowResize},33204:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(48427)),i=n(r(42538)),o=r(33997),a=r(49587),l=r(98887),u=r(57691),h=r(41789),c=r(94699);function d(e,t){p(e,t),t.add(e)}function f(e,t,r){p(e,t),t.set(e,r)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const m=t.PLUGIN_KEY="manualRowResize",E=t.PLUGIN_PRIORITY=30,w="manualRowHeights";var y=new WeakMap,C=new WeakMap,v=new WeakMap,S=new WeakMap,R=new WeakMap,T=new WeakMap,N=new WeakMap,_=new WeakMap,b=new WeakMap,M=new WeakMap,A=new WeakMap,O=new WeakMap,I=new WeakMap,x=new WeakMap,P=new WeakMap,L=new WeakMap,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet,B=new WeakSet;class W extends o.BasePlugin{static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return E}constructor(e){super(e),d(this,B),d(this,V),d(this,U),d(this,F),d(this,H),d(this,k),d(this,D),f(this,y,{writable:!0,value:null}),f(this,C,{writable:!0,value:null}),f(this,v,{writable:!0,value:[]}),f(this,S,{writable:!0,value:null}),f(this,R,{writable:!0,value:null}),f(this,T,{writable:!0,value:null}),f(this,N,{writable:!0,value:null}),f(this,_,{writable:!0,value:null}),f(this,b,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),f(this,M,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),f(this,A,{writable:!0,value:!1}),f(this,O,{writable:!0,value:!1}),f(this,I,{writable:!0,value:0}),f(this,x,{writable:!0,value:null}),f(this,P,{writable:!0,value:void 0}),f(this,L,{writable:!0,value:void 0}),(0,a.addClass)((0,i.default)(this,b),"manualRowResizer"),(0,a.addClass)((0,i.default)(this,M),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[m]}enablePlugin(){this.enabled||((0,s.default)(this,P,new h.PhysicalIndexToValueMap),(0,i.default)(this,P).addLocalHook("init",(()=>g(this,B,X).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,i.default)(this,P)),this.addHook("modifyRowHeight",((e,t)=>g(this,V,K).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,s.default)(this,L,(0,i.default)(this,P).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",w,(0,i.default)(this,P).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",w,e),e.value}setManualSize(e,t){const r=this.hot.toPhysicalRow(e),n=Math.max(t,c.ViewportRowsCalculator.DEFAULT_HEIGHT);return(0,i.default)(this,P).setValueAtIndex(r,n),n}setupHandlePosition(e){(0,s.default)(this,y,e);const{view:t}=this.hot,{_wt:r}=t,n=r.wtTable.getCoords((0,i.default)(this,y)),o=n.row;if(o<0)return;const h=(0,a.outerWidth)((0,i.default)(this,y)),c=(0,i.default)(this,y).getBoundingClientRect(),d=o<r.getSetting("fixedRowsTop"),f=o>=t.countNotHiddenRowIndexes(0,1)-r.getSetting("fixedRowsBottom");let p;d?p=r.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,i.default)(this,y),n.row,n.col):f&&(p=r.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition((0,i.default)(this,y),n.row,n.col)),p||(p=r.wtOverlays.inlineStartOverlay.getRelativeCellPosition((0,i.default)(this,y),n.row,n.col)),(0,s.default)(this,C,this.hot.rowIndexMapper.getVisualFromRenderableIndex(o)),(0,s.default)(this,v,[]);const g=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&g){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,r=e.getBottomStartCorner().row;(0,u.rangeEach)(t,r,(e=>{(0,i.default)(this,v).includes(e)||(0,i.default)(this,v).push(e)}))}))}(0,i.default)(this,v).includes((0,i.default)(this,C))||(0,s.default)(this,v,[(0,i.default)(this,C)]),(0,s.default)(this,_,p.top-6),(0,s.default)(this,N,parseInt(c.height,10)),(0,i.default)(this,b).style.top=`${(0,i.default)(this,_)+(0,i.default)(this,N)}px`,(0,i.default)(this,b).style[this.inlineDir]=`${p.start}px`,(0,i.default)(this,b).style.width=`${h}px`,this.hot.rootElement.appendChild((0,i.default)(this,b))}refreshHandlePosition(){(0,i.default)(this,b).style.top=`${(0,i.default)(this,_)+(0,i.default)(this,S)}px`}setupGuidePosition(){const e=parseInt((0,a.outerWidth)((0,i.default)(this,b)),10),t=parseInt((0,i.default)(this,b).style[this.inlineDir],10)+e,r=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,a.addClass)((0,i.default)(this,b),"active"),(0,a.addClass)((0,i.default)(this,M),"active"),(0,i.default)(this,M).style.top=(0,i.default)(this,b).style.top,(0,i.default)(this,M).style[this.inlineDir]=`${t}px`,(0,i.default)(this,M).style.width=r-e+"px",this.hot.rootElement.appendChild((0,i.default)(this,M))}refreshGuidePosition(){(0,i.default)(this,M).style.top=(0,i.default)(this,b).style.top}hideHandleAndGuide(){(0,a.removeClass)((0,i.default)(this,b),"active"),(0,a.removeClass)((0,i.default)(this,M),"active")}checkIfRowHeader(e){const t=(0,a.closest)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:r,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[r.clone.wtTable.TBODY,n.clone.wtTable.TBODY,s.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&(0,i.default)(this,R)<t?t:(0,i.default)(this,R)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,r)=>{const n=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==n&&(0,s.default)(this,R,n),this.setManualSize(t,(0,i.default)(this,R)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),r&&e()};if((0,i.default)(this,I)>=2){(0,i.default)(this,v).length>1?((0,l.arrayEach)((0,i.default)(this,v),(e=>{t(e)})),e()):(0,l.arrayEach)((0,i.default)(this,v),(e=>{t(e,!0)}))}(0,s.default)(this,I,0),(0,s.default)(this,x,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>g(this,D,Y).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>g(this,k,G).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>g(this,H,j).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>g(this,F,z).call(this))),this.eventManager.addEventListener((0,i.default)(this,b),"contextmenu",(()=>g(this,U,$).call(this)))}destroy(){super.destroy()}}function Y(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,i.default)(this,O)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&((0,i.default)(this,A)||this.setupHandlePosition(t))}}function G(e){(0,a.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition((0,i.default)(this,y)),this.setupGuidePosition(),(0,s.default)(this,A,!0),null===(0,i.default)(this,x)&&((0,s.default)(this,x,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,i.default)(this,x))),(0,s.default)(this,I,(0,i.default)(this,I)+1),(0,s.default)(this,T,e.pageY),(0,s.default)(this,R,(0,i.default)(this,N)))}function j(e){(0,i.default)(this,A)&&((0,s.default)(this,S,(0,i.default)(this,N)+(e.pageY-(0,i.default)(this,T))),(0,l.arrayEach)((0,i.default)(this,v),(e=>{(0,s.default)(this,R,this.setManualSize(e,(0,i.default)(this,S)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function z(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,r)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),r&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if((0,i.default)(this,A)){if(this.hideHandleAndGuide(),(0,s.default)(this,A,!1),(0,i.default)(this,R)!==(0,i.default)(this,N)){(0,i.default)(this,v).length>1?((0,l.arrayEach)((0,i.default)(this,v),(e=>{t(e)})),e()):(0,l.arrayEach)((0,i.default)(this,v),(e=>{t(e,!0)}))}this.setupHandlePosition((0,i.default)(this,y))}}function $(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,i.default)(this,b)),this.hot.rootElement.removeChild((0,i.default)(this,M)),(0,s.default)(this,A,!1),(0,s.default)(this,O,!0),this.hot._registerImmediate((()=>{(0,s.default)(this,O,!1)}))}function K(e,t){let r=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),n=(0,i.default)(this,P).getValueAtIndex(e);this.hot.getSettings()[m]&&n&&(r=n)}return r}function X(){const e=this.hot.getSettings()[m],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{(0,i.default)(this,P).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{(0,i.default)(this,P).setValueAtIndex(t,e)})),(0,s.default)(this,L,e)):!0===e&&Array.isArray((0,i.default)(this,L))&&(0,i.default)(this,L).forEach(((e,t)=>{(0,i.default)(this,P).setValueAtIndex(t,e)}))}),!0)}t.ManualRowResize=W},89279:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(76163),o=r(98887);t.default=class{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"mergedCellsCollection",void 0),(0,s.default)(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let r=null;return r=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",r}snapDragArea(e,t,r,n){const s=t.slice(0),i=this.getAutofillSize(e,t,r),[o,a,l,u]=e,h=["up","down"].indexOf(r)>-1?l-o+1:u-a+1,c=i-Math.floor(i/h)*h,d=this.getFarthestCollection(e,t,r,n);if(d)if("down"===r){const e=d.row+d.rowspan-o-c;s[2]+e>=this.plugin.hot.countRows()?s[2]-=c:s[2]+=c?e:0}else if("right"===r){const e=d.col+d.colspan-a-c;s[3]+e>=this.plugin.hot.countCols()?s[3]-=c:s[3]+=c?e:0}else if("up"===r){const e=l-c-d.row+1;s[0]+e<0?s[0]+=c:s[0]-=c?e:0}else if("left"===r){const e=u-c-d.col+1;s[1]+e<0?s[1]+=c:s[1]-=c?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:r,foundMergedCells:n,fillSize:i,dragArea:s,cycleLength:h}),s}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,i.extend)(this.currentFillData,e)}getAutofillSize(e,t,r){const[n,s,i,o]=e,[a,l,u,h]=t;switch(r){case"up":return n-a;case"down":return u-i;case"left":return s-l;case"right":return h-o;default:return null}}getDragArea(e,t,r){const[n,s,i,o]=e,[a,l,u,h]=t;switch(r){case"up":return[a,l,n-1,o];case"down":return[i+1,s,u,o];case"left":return[a,l,i,s-1];case"right":return[n,o+1,u,h];default:return null}}getFarthestCollection(e,t,r,n){const[s,i,a,l]=e,u=["up","down"].indexOf(r)>-1,h=u?a:l,c=u?s:i,d=this.getAutofillSize(e,t,r),f=u?a-s+1:l-i+1,p=d-Math.floor(d/f)*f;let g=null,m=null,E=null;switch(r){case"up":g="includesVertically",E=h-p+1;break;case"left":g="includesHorizontally",E=h-p+1;break;case"down":g="includesVertically",E=c+p-1;break;case"right":g="includesHorizontally",E=c+p-1}return(0,o.arrayEach)(n,(e=>{e[g](E)&&e.isFarther(m,r)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),r=this.currentFillData.foundMergedCells,n=this.currentFillData.dragDirection,s=(e,r)=>{switch(n){case"up":return e.row-r>=t.from.row;case"down":return e.row+e.rowspan-1+r<=t.to.row;case"left":return e.col-r>=t.from.column;case"right":return e.col+e.colspan-1+r<=t.to.column;default:return null}};let i=0,o=null,a=1;do{for(let e=0;e<r.length;e+=1){if(o=r[e],i=a*this.currentFillData.cycleLength,s(o,i))switch(n){case"up":this.plugin.mergedCellsCollection.add({row:o.row-i,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:o.row+i,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col-i,colspan:o.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col+i,colspan:o.colspan})}e===r.length-1&&(a+=1)}}while(s(o,i));this.currentFillData=null,this.plugin.hot.render(),r.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},r={min:null,max:null};return(0,o.arrayEach)(e,(e=>{const n=e[0],s=this.plugin.hot.propToCol(e[1]);(null===t.min||n<t.min)&&(t.min=n),(null===t.max||n>t.max)&&(t.max=n),(null===r.min||s<r.min)&&(r.min=s),(null===r.max||s>r.max)&&(r.max=s)})),{from:{row:t.min,column:r.min},to:{row:t.max,column:r.max}}}dragAreaOverlapsCollections(e,t,r){const n=this.getDragArea(e,t,r),[s,i,o,a]=n,l=this.plugin.hot._createCellCoords(s,i),u=this.plugin.hot._createCellCoords(o,a),h=this.plugin.hot._createCellRange(l,l,u);return!!this.mergedCellsCollection.getWithinRange(h,!0)}}},14381:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231));t.default=class{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}snapDelta(e,t,r){const n=t.to,s=n.row+e.row,i=n.col+e.col;e.row?this.jumpOverMergedCell(e,r,s):e.col&&this.jumpOverMergedCell(e,r,i)}jumpOverMergedCell(e,t,r){let n=e.row||e.col,s=null,i=null,o=null;e.row?(s=t.includesVertically(r),i=t.row,o=t.getLastRow()):e.col&&(s=t.includesHorizontally(r),i=t.col,o=t.getLastColumn()),0!==n&&(n>0?s&&r!==i&&(n+=o-r+1):s&&r!==o&&(n-=r-i+1),e.row?e.row=n:e.col&&(e.col=n))}getUpdatedSelectionRange(e,t){return this.hot._createCellRange(e.highlight,e.from,this.hot._createCellCoords(e.to.row+t.row,e.to.col+t.col))}getSelectedMergedCellClassName(e,t,r,n){const s=Math.min(r[0],r[2]),i=Math.min(r[1],r[3]),o=Math.max(r[0],r[2]),a=Math.max(r[1],r[3]);if(void 0===n)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const l=this.plugin.mergedCellsCollection.get(e,t);if(!l)return;const u=l.getLastRow(),h=l.getLastColumn();return s<=l.row&&i<=l.col&&o>=u&&a>=h?`${this.fullySelectedMergedCellClassName}-${n}`:this.plugin.selectionCalculations.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const r=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let n=0;n<e.colspan;n+=1)r.push(this.hot._createCellCoords(e.row+t,e.col+n));for(let e=0;e<r.length;e+=1){const n=[];for(let s=0;s<t.length;s+=1)n[s]=t[s].includes(r[e]);if(!n.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}}},64066:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(45561);t.default=class{constructor(e,t,r,n,i,o){(0,s.default)(this,"row",void 0),(0,s.default)(this,"col",void 0),(0,s.default)(this,"rowspan",void 0),(0,s.default)(this,"colspan",void 0),(0,s.default)(this,"removed",!1),(0,s.default)(this,"cellCoordsFactory",void 0),(0,s.default)(this,"cellRangeFactory",void 0),this.row=e,this.col=t,this.rowspan=r,this.colspan=n,this.cellCoordsFactory=i,this.cellRangeFactory=o}static NEGATIVE_VALUES_WARNING(e){return i.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
|
973
973
|
rowspan: ${e.rowspan}, colspan: ${e.colspan}} contains negative values, which is\x20
|
974
974
|
not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){return i.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] is positioned\x20
|
@@ -982,7 +982,7 @@ s.version="2.29.4",i(Xr),s.fn=ui,s.min=Jr,s.max=en,s.now=tn,s.utc=g,s.unix=hi,s.
|
|
982
982
|
is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const r=!0===e?"hide-column":"show-column";(0,o.default)(this,S).triggerColumnModification(r,t)})),!(0,o.default)(this,R)&&this.enabled&&(0,i.default)(this,R,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:r,newValue:n}=e;if("replace"===t){const e=!0===n?"hide-column":"show-column";(0,o.default)(this,S).triggerColumnModification(e,r)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),(0,o.default)(this,S).clear(),(0,o.default)(this,R).unsubscribe(),(0,i.default)(this,R,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return(0,o.default)(this,S)}getLayersCount(){return(0,o.default)(this,S).getLayersCount()}getHeaderSettings(e,t){return(0,o.default)(this,S).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,r=e.wtTable.THEAD,n=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=r.childNodes[e];if(!t)break;const i=n.childNodes[e],o=s?s.childNodes[e]:null;for(let e=0,r=t.childNodes.length;e<r;e++)t.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(t.childNodes[e],"hiddenHeader"),i&&i.childNodes[e]&&(i.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(i.childNodes[e],"hiddenHeader")),s&&o&&o.childNodes[e]&&(o.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(o.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const r=this.hot.view._wt.getSetting("fixedColumnsStart");return(n,s)=>{var i;const{columnIndexMapper:l,view:u}=this.hot;let h=l.getVisualFromRenderableIndex(n);null===h&&(h=n),s.removeAttribute("colspan"),(0,a.removeClass)(s,"hiddenHeader");const{colspan:c,isHidden:d,isPlaceholder:f}=null!==(i=(0,o.default)(this,S).getHeaderSettings(e,h))&&void 0!==i?i:{label:""};if(f||d)(0,a.addClass)(s,"hiddenHeader");else if(c>1){var p,g;const{wtOverlays:e}=u._wt,t=null===(p=e.topInlineStartCornerOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(s),i=null===(g=e.inlineStartOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(s),o=t||i?Math.min(c,r-n):c;o>1&&s.setAttribute("colspan",o)}this.hot.view.appendColHeader(h,s,(function(){return t.getColumnHeaderValue(...arguments)}),e)}}getColumnHeaderValue(e,t){var r;const{isHidden:n,isPlaceholder:s}=null!==(r=(0,o.default)(this,S).getHeaderSettings(t,e))&&void 0!==r?r:{};return s||n?"":this.hot.getColHeader(e,t)}destroy(){(0,i.default)(this,S,null),null!==(0,o.default)(this,R)&&((0,o.default)(this,R).unsubscribe(),(0,i.default)(this,R,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return(0,o.default)(this,S).getHeaderTreeNodeData(e.row,e.col)}}function j(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:r}=t;if(r.isHeader()&&r.col>=0){const e=(0,o.default)(this,S).findLeftMostColumnIndex(r.row,r.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function z(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:r}=t;if(!(r.isHeader()&&r.col>=0))return e;const n=this.hot.view.getFirstFullyVisibleColumn(),s=this.hot.view.getLastFullyVisibleColumn(),i=(0,o.default)(this,S).findLeftMostColumnIndex(r.row,r.col),a=(0,o.default)(this,S).findRightMostColumnIndex(r.row,r.col);return i<n&&a>s?e:i<n?i:a}function $(e,t,r){const n=(0,o.default)(this,S).getHeaderTreeNodeData(t,e);if(!n)return e;const{columnCursor:s,selectionType:i,selectionWidth:a}=r,{isRoot:l,colspan:u}=(0,o.default)(this,S).getHeaderSettings(t,e);if(i===d.HEADER_TYPE){if(!l)return n.columnIndex}else if(i===d.ACTIVE_HEADER_TYPE&&(u>a-s||!l))return null;return e}function K(e,t,r){let{columnHeadersCount:n}=r;if(0!==n)for(let r=0;r<t.length;r++){const{startRow:n,startCol:i,endRow:a,endCol:l}=t[r],u=a-n+1;if(n>=0||1===i-l+1)break;for(let t=i;t<=l;t++)for(let r=n;r<=a;r++){var s;const n=u+r,a=t-i;if(0===a)continue;!1===(null===(s=(0,o.default)(this,S).getHeaderTreeNodeData(r,t))||void 0===s?void 0:s.isRoot)&&(e[n][a]="")}}}function X(e,t,r,n){this._getHeaderTreeNodeDataByCoords(t)&&(n.column=!0)}function q(e,t){const r=this._getHeaderTreeNodeDataByCoords(t);if(!r)return;(0,i.default)(this,T,t.clone()),(0,i.default)(this,N,!0);const{selection:n}=this.hot,s=n.isSelected()?n.getSelectedRange().current():null,o=[],{columnIndex:a,origColspan:l}=r,u=!n.inInSelection(t);e.shiftKey&&s?t.col<s.from.col?o.push(s.getTopEndCorner().col,a,t.row):t.col>s.from.col?o.push(s.getTopStartCorner().col,a+l-1,t.row):o.push(a,a+l-1,t.row):((0,h.isLeftClick)(e)||(0,h.isRightClick)(e)&&u)&&o.push(a,a+l-1,t.row),n.selectColumns(...o)}function Q(e,t,r,n){if(!this.hot.view.isMouseDown())return;const s=this._getHeaderTreeNodeDataByCoords(t);if(!s)return;const{columnIndex:i,origColspan:o}=s,a=this.hot.getSelectedRangeLast(),u=a.getTopStartCorner(),h=a.getBottomEndCorner(),{from:c}=a;n.column=!0,n.cell=!0;const d=[],f=(0,l.clamp)(t.row,-1/0,-1);t.col<c.col?d.push(h.col,i,f):t.col>c.col?d.push(u.col,i+o-1,f):d.push(i,i+o-1,f),this.hot.selection.selectColumns(...d)}function Z(){(0,i.default)(this,N,!1)}function J(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!(0,o.default)(this,N)||!e)return;const t=this.hot.getSelectedRangeLast(),r=t.getTopStartCorner().col,n=t.getBottomEndCorner().col,{columnIndex:s,origColspan:i}=(0,o.default)(this,S).getHeaderTreeNodeData((0,o.default)(this,T).row,(0,o.default)(this,T).col);if(t.setHighlight((0,o.default)(this,T)),i>t.getWidth()||s<r||s+i-1>n){const e=(0,o.default)(this,S).findTopMostEntireHeaderLevel((0,l.clamp)(r,s,s+i-1),(0,l.clamp)(n,s,s+i-1));t.highlight.row=e,t.highlight.col=t.from.col}}function ee(e){const{highlight:t}=this.hot.getSelectedRangeLast(),r=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(r.isHeader()&&r.col>=0))return;const n=(0,o.default)(this,S).findLeftMostColumnIndex(r.row,r.col),s=(0,o.default)(this,S).findRightMostColumnIndex(r.row,r.col);if(e.col<0){const r=t.col>=n&&t.col<=s?n-1:s,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,t.col)-1,1)}else if(e.col>0){const r=t.col>=n&&t.col<=s?s+1:n,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(r,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,i)-1,1)}}function te(e,t){const r=e.row,n=this._getHeaderTreeNodeDataByCoords({row:r,col:e.col}),s=this._getHeaderTreeNodeDataByCoords({row:r,col:t.col});t.col<e.col?(n&&(e.col=n.columnIndex+n.origColspan-1),s&&(t.col=s.columnIndex)):t.col>=e.col&&(n&&(e.col=n.columnIndex),s&&(t.col=s.columnIndex+s.origColspan-1))}function re(e){e.length=0;for(let t=0;t<(0,o.default)(this,S).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function ne(e){const t=(0,o.default)(this,S).getLayersCount();let r=e.startColumn,n=!!t;for(let s=0;s<t;s++){const t=(0,o.default)(this,S).findLeftMostColumnIndex(s,e.startColumn),i=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(n=!1),(0,l.isNumeric)(i)&&i<e.startColumn){r=i;break}}e.startColumn=n?(0,o.default)(this,S).getHeaderTreeNodeData(0,r).columnIndex:r}function se(e,t){const r=this.ghostTable.getWidth(t);return e>r?e:r}function ie(e,t,r){var n;const{label:s}=null!==(n=(0,o.default)(this,S).getHeaderTreeNodeData(r,t))&&void 0!==n?n:{label:""};return s}function oe(e,t){if(e<0)return this.hot.getCell(e,(0,o.default)(this,S).findLeftMostColumnIndex(e,t),!0)}function ae(){this.updatePlugin()}function le(e,t){t||this.updatePlugin()}t.NestedHeaders=G},12985:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(98887),a=n(r(96660));function l(e,t,r){!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,r)}var u=new WeakMap,h=new WeakMap,c=new WeakMap;t.default=class{constructor(e){l(this,u,{writable:!0,value:new Map}),l(this,h,{writable:!0,value:new Map}),l(this,c,{writable:!0,value:null}),(0,i.default)(this,c,e)}getRoots(){return Array.from((0,s.default)(this,u).values())}getRootByColumn(e){let t;return(0,s.default)(this,h).has(e)&&(t=(0,s.default)(this,u).get((0,s.default)(this,h).get(e))),t}getNode(e,t){const r=this.getRootByColumn(t);if(!r)return;const n=t-(0,s.default)(this,h).get(t);let i,o=0;return r.walkDown((r=>{const{data:{origColspan:s,headerLevel:a}}=r;if(e===a){if(n>=o&&n<=o+s-1)return i=r,i.data.isRoot=t===i.data.columnIndex,!1;o+=s}})),i}rebuildTreeIndex(){let e=0;(0,s.default)(this,h).clear(),(0,o.arrayEach)((0,s.default)(this,u),(t=>{let[,{data:{colspan:r}}]=t;for(let t=e;t<e+r;t++)(0,s.default)(this,h).set(t,e);e+=r}))}buildTree(){this.clear();const e=(0,s.default)(this,c).getColumnsCount();let t=0;for(;t<e;){const e=(0,s.default)(this,c).getHeaderSettings(0,t),r=new a.default;(0,s.default)(this,u).set(t,r),this.buildLeaves(r,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=(0,s.default)(this,c).getHeadersSettings(r,t,n);r+=1,(0,o.arrayEach)(i,(n=>{const i={...n,headerLevel:r-1,columnIndex:t};let o;1===r?(e.data=i,o=e):(o=new a.default(i),e.addChild(o)),r<(0,s.default)(this,c).getLayersCount()&&this.buildLeaves(o,t,r,n.origColspan),t+=n.origColspan}))}clear(){(0,s.default)(this,u).clear(),(0,s.default)(this,h).clear()}}},51661:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(48427)),i=n(r(42538)),o=r(98887),a=n(r(14135)),l=n(r(12985)),u=r(44255),h=r(88717),c=r(96660);function d(e,t,r){!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,r)}var f=new WeakMap,p=new WeakMap,g=new WeakMap;t.default=class{constructor(){d(this,f,{writable:!0,value:new a.default}),d(this,p,{writable:!0,value:new l.default((0,i.default)(this,f))}),d(this,g,{writable:!0,value:[[]]})}setState(e){(0,i.default)(this,f).setData(e);let t=!1;try{(0,i.default)(this,p).buildTree()}catch(e){(0,i.default)(this,p).clear(),(0,i.default)(this,f).clear(),t=!0}return(0,s.default)(this,g,(0,h.generateMatrix)((0,i.default)(this,p).getRoots())),t}setColumnsLimit(e){(0,i.default)(this,f).setColumnsLimit(e)}mergeStateWith(e){const t=(0,o.arrayMap)(e,(e=>{let{row:t,...r}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...r}}));(0,i.default)(this,f).mergeWith(t),(0,i.default)(this,p).buildTree(),(0,s.default)(this,g,(0,h.generateMatrix)((0,i.default)(this,p).getRoots()))}mapState(e){(0,i.default)(this,f).map(e),(0,i.default)(this,p).buildTree(),(0,s.default)(this,g,(0,h.generateMatrix)((0,i.default)(this,p).getRoots()))}mapNodes(e){return(0,o.arrayReduce)((0,i.default)(this,p).getRoots(),((t,r)=>(r.walkDown((r=>{const n=e(r.data);void 0!==n&&t.push(n)})),t)),[])}triggerNodeModification(e,t,r){t<0&&(t=this.rowCoordsToLevel(t));const n=(0,i.default)(this,p).getNode(t,r);let o;return n&&(o=(0,u.triggerNodeModification)(e,n,r),(0,s.default)(this,g,(0,h.generateMatrix)((0,i.default)(this,p).getRoots()))),o}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 r,n;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(r=null===(n=(0,i.default)(this,g)[e])||void 0===n?void 0:n[t])&&void 0!==r?r:null}getHeaderTreeNodeData(e,t){const r=this.getHeaderTreeNode(e,t);return r?{...r.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const r=(0,i.default)(this,p).getNode(e,t);return r||null}findTopMostEntireHeaderLevel(e){var t;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=r-e+1;let s=!1,o=null;for(let t=e;t<=r;t++){const a=(0,i.default)(this,p).getRootByColumn(t);if(!a)break;s=!0,a.walkDown((t=>{const{columnIndex:s,headerLevel:i,origColspan:a,isHidden:l}=t.data;l||a<=n&&s>=e&&s+a-1<=r&&(null===o||i<o)&&(o=i)}),c.TRAVERSAL_DF_PRE)}return s&&null===o?-1:this.levelToRowCoords(null!==(t=o)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var r;const{isRoot:n}=null!==(r=this.getHeaderSettings(e,t))&&void 0!==r?r:{isRoot:!0};if(n)return t;let s=t-1;for(;s>=0;){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,s))&&void 0!==i?i:{isRoot:!0};if(t)break;s-=1}return s}findRightMostColumnIndex(e,t){var r;const{isRoot:n,origColspan:s}=null!==(r=this.getHeaderSettings(e,t))&&void 0!==r?r:{isRoot:!0,origColspan:1};if(n)return t+s-1;let i=t+1;for(;i<this.getColumnsCount();){var o;const{isRoot:t}=null!==(o=this.getHeaderSettings(e,i))&&void 0!==o?o:{isRoot:!0};if(t)break;i+=1}return i-1}getLayersCount(){return(0,i.default)(this,f).getLayersCount()}getColumnsCount(){return(0,i.default)(this,f).getColumnsCount()}clear(){(0,s.default)(this,g,[]),(0,i.default)(this,f).clear(),(0,i.default)(this,p).clear()}}},88717:(e,t,r)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,n.arrayEach)(e,(e=>{e.walkDown((e=>{const r=e.data,{origColspan:n,columnIndex:o,headerLevel:a,crossHiddenColumns:l}=r,u=function(e,t){let r;Array.isArray(e[t])?r=e[t]:(r=[],e[t]=r);return r}(t,a);let h=!1;for(let e=o;e<o+n;e++){if(l.includes(e)||h)u.push((0,s.createPlaceholderHeaderSettings)(r));else{const e=i(r);e.isRoot=!0,u.push(e),h=!0}}}))})),t},r(63517);var n=r(98887),s=r(27122);function i(e){const{crossHiddenColumns:t,...r}=(0,s.createDefaultHeaderSettings)(e);return r}},29113:(e,t,r)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var r;const{data:o,childs:a}=t;if(o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(a[0]);o.isCollapsed=!0;const l=a.slice(1),u=new Set;if(l.length>0)(0,n.arrayEach)(l,(e=>{(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{u.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=o;for(let r=1;r<e;r++){const e=t+r;u.add(e)}}const h=o.colspan-(null!==(r=(0,i.getFirstChildProperty)(t,"colspan"))&&void 0!==r?r:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=h,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,s.expandNode)(t),affectedColumns:Array.from(u),colspanCompensation:h}};var n=r(98887),s=r(32600),i=r(5985)},32600:(e,t,r)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:r,childs:o}=t;if(!r.isCollapsed||r.isHidden||r.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,i.isNodeReflectsFirstChildColspan)(t))return e(o[0]);r.isCollapsed=!1;const a=o.slice(1),l=new Set;let u=0;if(a.length>0)(0,n.arrayEach)(a,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;u+=t.colspan,(0,i.traverseHiddenNodeColumnIndexes)(e,(e=>{l.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:n}=r;u=t-e;for(let e=1;e<t;e++)l.add(n+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=u,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,i.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,i.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,s.collapseNode)(t),affectedColumns:Array.from(l),colspanCompensation:u}};var n=r(98887),s=r(29113),i=r(5985)},63055:(e,t,r)=>{"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(n.toSingleLine`The passed node is not the last node on the tree. Only for\x20
|
983
983
|
the last node, the hide column modification can be applied.`);const{crossHiddenColumns:r}=e.data;if(r.includes(t))return;let s=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return s=!0,!1})),s)return;e.walkUp((e=>{const{data:r}=e;r.crossHiddenColumns.push(t),r.colspan>1?r.colspan-=1:r.isHidden=!0}))},r(91683),r(63517);var n=r(45561)},44255:(e,t,r)=>{"use strict";t.__esModule=!0,t.triggerNodeModification=function(e,t,r){if(!a.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return a.get(e)(t,r)},r(91683);var n=r(29113),s=r(32600),i=r(63055),o=r(50559);const a=new Map([["collapse",n.collapseNode],["expand",s.expandNode],["hide-column",i.hideColumn],["show-column",o.showColumn]])},50559:(e,t,r)=>{"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(n.toSingleLine`The passed node is not the last node on the tree. Only for\x20
|
984
984
|
the last node, the show column modification can be applied.`);const{crossHiddenColumns:r}=e.data;if(!r.includes(t))return;let s=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return s=!0,!1})),s)return;e.walkUp((e=>{const{data:r}=e;r.crossHiddenColumns.splice(r.crossHiddenColumns.indexOf(t),1),!r.isHidden&&r.colspan<r.origColspan&&(r.colspan+=1),r.isHidden=!1}))},r(91683);var n=r(45561)},5985:(e,t)=>{"use strict";function r(e,t){let{childs:r}=e;if(0!==r.length)return r[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=r,t.isNodeReflectsFirstChildColspan=function(e){return r(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:r,childs:n}=e;if(!r.isHidden&&(t(r.columnIndex),0===n.length))for(let e=1;e<r.colspan;e++)t(r.columnIndex+e)}))}},15914:(e,t,r)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const r=[];if(0===t)return r;(0,n.arrayEach)(e,(e=>{const a=[];let l=0;r.push(a),(0,n.arrayEach)(e,(e=>{const r=(0,o.createDefaultHeaderSettings)();if((0,s.isObject)(e)){const{label:t,colspan:n}=e;r.label=(0,i.stringify)(t),"number"==typeof n&&n>1&&(r.colspan=n,r.origColspan=n)}else r.label=(0,i.stringify)(e);l+=r.origColspan;let n=!1;if(l>=t&&(r.colspan=r.origColspan-(l-t),r.origColspan=r.colspan,n=!0),a.push(r),r.colspan>1)for(let e=0;e<r.colspan-1;e++)a.push((0,o.createPlaceholderHeaderSettings)());return!n}))}));const a=Math.max(...(0,n.arrayMap)(r,(e=>e.length)));return(0,n.arrayEach)(r,(e=>{if(e.length<a){const t=(0,n.arrayMap)(new Array(a-e.length),(()=>(0,o.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),r},r(63517);var n=r(98887),s=r(76163),i=r(97639),o=r(27122)},14135:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=r(98887),l=r(15914);function u(e,t,r){!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,r)}const h=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var c=new WeakMap,d=new WeakMap,f=new WeakMap;t.default=class{constructor(){u(this,c,{writable:!0,value:[]}),u(this,d,{writable:!0,value:0}),u(this,f,{writable:!0,value:1/0})}setColumnsLimit(e){(0,i.default)(this,f,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,i.default)(this,c,(0,l.normalizeSettings)(e,(0,s.default)(this,f))),(0,i.default)(this,d,(0,s.default)(this,c).length)}getData(){return(0,s.default)(this,c)}mergeWith(e){(0,a.arrayEach)(e,(e=>{let{row:t,col:r,...n}=e;const s=this.getHeaderSettings(t,r);null!==s&&(0,o.extend)(s,n,h)}))}map(e){(0,a.arrayEach)((0,s.default)(this,c),(t=>{(0,a.arrayEach)(t,(t=>{const r=e({...t});(0,o.isObject)(r)&&(0,o.extend)(t,r,h)}))}))}getHeaderSettings(e,t){var r;if(e>=(0,s.default)(this,d)||e<0)return null;const n=(0,s.default)(this,c)[e];return!1===Array.isArray(n)||t>=n.length?null:null!==(r=n[t])&&void 0!==r?r:null}getHeadersSettings(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const n=[];if(e>=(0,s.default)(this,d)||e<0)return n;const i=(0,s.default)(this,c)[e];let o=0;for(let e=t;e<i.length;e++){const t=i[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(o+=t.colspan,n.push(t),t.colspan>1&&(e+=t.colspan-1),o===r)break;if(o>r)throw new Error("The last column settings cannot overlap the other header layers")}return n}getLayersCount(){return(0,s.default)(this,d)}getColumnsCount(){return(0,s.default)(this,d)>0?(0,s.default)(this,c)[0].length:0}clear(){(0,i.default)(this,c,[]),(0,i.default)(this,d,0)}}},27122:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:r=1,collapsible:n=!1,crossHiddenColumns:s=[],isCollapsed:i=!1,isHidden:o=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:r,collapsible:n,isCollapsed:i,crossHiddenColumns:s,isHidden:o,isRoot:a,isPlaceholder:l}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},65177:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(49587);t.default=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"nestedHeaderSettingsGetter",void 0),(0,s.default)(this,"layersCount",0),(0,s.default)(this,"container",void 0),(0,s.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 r=0;r<t;r++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),n=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(n,e[r].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:r}=this.hot,n=t.createDocumentFragment(),s=t.createElement("table"),o=!!this.hot.getSettings().dropdownMenu,a=r.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const n=t.createElement("tr");for(let s=0;s<a;s++){let a=r.getVisualFromRenderableIndex(s);null===a&&(a=s);const l=t.createElement("th"),u=this.nestedHeaderSettingsGetter(e,a);if(u&&(!u.isPlaceholder||u.isHidden)){let e=u.label;o&&(e+='<button class="changeType"></button>'),(0,i.fastInnerHTML)(l,e),l.colSpan=u.colspan,n.appendChild(l)}}s.appendChild(n)}n.appendChild(s),e.appendChild(n)}clear(){this.widthsMap.clear(),this.container=null}}},7103:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(57691),o=r(76163),a=r(98887);t.default=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"data",null),(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"parentReference",new WeakMap),(0,s.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}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,i.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,r){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:r,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,a.arrayEach)(e.__children,(r=>{this.cacheNode(r,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,r,n){let s=!1,i=t;if(isNaN(i)&&i.end)return i;let o=e;return o||(o={__children:this.data},s=!0,i-=1),null!=r&&i===r?{result:o,end:!0}:null!=n&&o===n?{result:i,end:!0}:(i+=1,o.__children&&(0,a.arrayEach)(o.__children,(e=>{if(this.parentReference.set(e,s?null:o),i=this.readTreeNodes(e,i,r,n),isNaN(i)&&i.end)return!1})),i)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,o.objectEach)(this.data[0],((t,r)=>{e[r]=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 r=this.getRowParent(e);return null==r?this.data.indexOf(t):r.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&r.__children?((0,a.arrayEach)(r.__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 r;return(null===(r=e.__children)||void 0===r?void 0:r[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let r=e;return isNaN(r)||(r=this.getDataObject(r)),r&&!!r.__children&&0!==(null===(t=r.__children)||void 0===t?void 0:t.length)}addChild(e,t){let r=t;this.hot.runHooks("beforeAddChild",e,r);let n=null;e&&(n=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",n+this.countChildren(e)+1,1);let s=e;e||(s=this.mockParent()),s.__children||(s.__children=[]),r||(r=this.mockNode()),s.__children.push(r),this.rewriteCache();const i=this.getRowIndex(r);this.hot.rowIndexMapper.insertIndexes(i,1),this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,r)}addChildAtIndex(e,t,r){let n,s=r;if(s||(s=this.mockNode()),this.hot.runHooks("beforeAddChild",e,s,t),e){const r=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",r,1),e.__children.splice(t,null,s),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(r,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",r,1),n=r}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),n=this.getRowIndex(this.data[t]);s=this.getDataObject(n),this.hot.runHooks("afterAddChild",e,s,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const r=this.translateTrimmedRow(e),n=this.getRowParent(r),s=this.getRowIndexWithinParent(r);switch(t){case"below":this.addChildAtIndex(n,s+1,null);break;case"above":this.addChildAtIndex(n,s,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=null;const n=[];Array.isArray(e)?((0,i.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);n.push(this.getDataObject(t))})),(0,i.rangeEach)(0,n.length-2,(e=>{this.detachFromParent(n[e],!1)})),r=n[n.length-1]):r=e;const s=this.getRowIndex(r),o=this.countChildren(r),a=this.getRowIndexWithinParent(r),l=this.getRowParent(r),u=this.getRowParent(l),h=this.getRowIndex(u);let c=null;if(this.hot.runHooks("beforeDetachChild",l,r),null!=a){const e=Array.from(new Array(s+o+1).keys()).splice(-1*(o+1));if(this.hot.runHooks("beforeRemoveRow",s,o+1,e,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",s,o+1,e,this.plugin.pluginName),u){c=h+this.countChildren(u);const e=this.getChild(u,this.countChildren(u)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,o+1,this.plugin.pluginName),u.__children.push(r)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,o+1,this.plugin.pluginName),this.data.push(r)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,o+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,r,this.getRowIndex(r)),t&&this.hot.render()}filterData(e,t,r){const n=[];(0,a.arrayEach)(r,(e=>{n.push(this.getDataObject(e))})),(0,a.arrayEach)(n,(e=>{const t=this.getRowIndexWithinParent(e),r=this.getRowParent(e);null===r?this.data.splice(t,1):r.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,r){const n=this.getDataObject(e-1);let s=null,i=e;n&&n.__children&&0===n.__children.length?(s=n,i=0):e<this.countAllRows()&&(s=this.getRowParent(e),i=this.getRowIndexWithinParent(e)),s?r?s.__children.splice(i,t,...r):s.__children.splice(i,t):r?this.data.splice(i,t,...r):this.data.splice(i,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,r=null;do{r=this.getRowParent(r),null!==r&&(t=r)}while(null!==r);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,r,n){const s=t===this.hot.countRows(),i=this.getRowParent(e),o=this.getRowIndexWithinParent(e),a=i.__children.slice(o,o+1),l=e>t;let u=s?this.getRowParent(t-1):this.getRowParent(t);null==u&&(u=this.getRowParent(t-1)),null==u&&(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const h=s||r||n?u.__children.length:this.getRowIndexWithinParent(t),c=i===u;u.__children.splice(h,0,a[0]),i.__children.splice(o+(l&&c?1:0),1),this.syncRowWithRawSource(i),c||this.syncRowWithRawSource(u)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},6604:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(905);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.NestedRows=n.NestedRows},905:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=r(33997),l=n(r(7103)),u=n(r(23640)),h=n(r(15113)),c=n(r(43509)),d=r(31990),f=r(56020),p=r(41789),g=n(r(51915));function m(e,t){w(e,t),t.add(e)}function E(e,t,r){w(e,t),t.set(e,r)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}r(23118);const C=t.PLUGIN_KEY="nestedRows",v=t.PLUGIN_PRIORITY=300,S=C;var R=new WeakMap,T=new WeakMap,N=new WeakSet,_=new WeakSet,b=new WeakSet,M=new WeakSet,A=new WeakSet,O=new WeakSet,I=new WeakSet,x=new WeakSet,P=new WeakSet,L=new WeakSet,D=new WeakSet,k=new WeakSet,H=new WeakSet,F=new WeakSet,U=new WeakSet,V=new WeakSet;class B extends a.BasePlugin{constructor(){super(...arguments),m(this,V),m(this,U),m(this,F),m(this,H),m(this,k),m(this,D),m(this,L),m(this,P),m(this,x),m(this,I),m(this,O),m(this,A),m(this,M),m(this,b),m(this,_),m(this,N),(0,s.default)(this,"dataManager",null),(0,s.default)(this,"headersUI",null),(0,s.default)(this,"collapsedRowsMap",null),E(this,R,{writable:!0,value:!1}),E(this,T,{writable:!0,value:!1})}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return v}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new p.TrimmingMap),this.dataManager=new l.default(this,this.hot),this.collapsingUI=new u.default(this,this.hot),this.headersUI=new h.default(this,this.hot),this.contextMenuUI=new c.default(this,this.hot),this.rowMoveController=new g.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,F,te).call(e,...r)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,U,re).call(e,...r)})),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(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,b,G).call(e,...r)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,M,j).call(e,...r)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,A,z).call(e,...r)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,_,Y).call(e,...r)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,x,X).call(e,...r)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,I,K).call(e,...r)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,P,q).call(e,...r)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,L,Q).call(e,...r)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,D,Z).call(e,...r)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,k,J).call(e,...r)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,O,$).call(e,...r)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,H,ee).call(e,...r)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return y(e,N,W).call(e,...r)})),this.addHook("beforeLoadData",(e=>y(this,V,ne).call(this,e))),this.addHook("beforeUpdateData",(e=>y(this,V,ne).call(this,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;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:S})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}disableCoreAPIModifiers(){(0,o.default)(this,T,!0)}enableCoreAPIModifiers(){(0,o.default)(this,T,!1)}onModifyRowData(e){if(!(0,i.default)(this,T))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!(0,i.default)(this,T))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,r){return!(!(0,i.default)(this,T)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,r),!1)}destroy(){super.destroy()}}function W(e,t,r,n){return this.rowMoveController.onBeforeRowMove(e,t,r,n)}function Y(e,t,r){this.collapsingUI.toggleState(e,t,r)}function G(e,t,r){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(r[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(r[0],null,-1*t),this.dataManager.filterData(e,t,r),(0,o.default)(this,R,!0),this.dataManager.getData().slice()}function j(e){return this.contextMenuUI.appendOptions(e)}function z(e,t){this.headersUI.appendLevelIndicators(e,t)}function $(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function K(e,t,r,n){n!==this.pluginName&&this.hot._registerTimeout((()=>{(0,o.default)(this,R,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function X(e,t,r){const n=Array.from(r.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const r=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(r)&&r.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));r.length=0,r.push(...n)}function q(){this.collapsingUI.collapsedRowsStash.stash()}function Q(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function Z(){this.collapsingUI.collapsedRowsStash.stash()}function J(e,t,r){this.collapsingUI.collapsedRowsStash.shiftStash(r,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function ee(){this.dataManager.rewriteCache()}function te(){this.headersUI.updateRowHeaderWidth()}function re(e,t){(0,i.default)(this,R)&&(t.skipRender=!0)}function ne(e){if(!(0,f.isArrayOfObjects)(e))return(0,d.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[C]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=B},61619:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231));t.default=class{constructor(e,t){(0,s.default)(this,"hot",void 0),(0,s.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}}},23640:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=r(30369),i=r(98887),o=r(57691),a=r(49587),l=n(r(61619)),u=n(r(15113));class h extends l.default{constructor(e,t){var r;super(e,t),r=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];r.lastCollapsedRows=r.collapsedRows.slice(0),r.expandMultipleChildren(r.lastCollapsedRows,e)},shiftStash:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,i.arrayEach)(r.lastCollapsedRows,((s,i)=>{s>=e&&s<t&&(r.lastCollapsedRows[i]=s+n)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.collapseMultipleChildren(r.lastCollapsedRows,e),r.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,o.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],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,o=null,a=null;return isNaN(e)?(s=e,o=this.dataManager.getRowIndex(s)):(s=this.dataManager.getDataObject(e),o=e),this.dataManager.hasChildren(s)&&(0,i.arrayEach)(s.__children,(e=>{n.push(this.dataManager.getRowIndex(e))})),a=this.collapseRows(n,!0,!1),r&&this.trimRows(a),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(o)&&this.collapsedRows.push(o),a}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,i.arrayEach)(e,(e=>{n.push(...this.collapseChildren(e,!1,!1))})),r&&this.trimRows(n),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],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,i.arrayEach)(e,(e=>{n.push(e),t&&this.collapseChildRows(e,n)})),r&&this.trimRows(n),n}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,i.arrayEach)(r.__children,(e=>{const r=this.dataManager.getRowIndex(e);t.push(r),this.collapseChildRows(r,t)}))}r&&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],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=[];return(0,i.arrayEach)(e,(e=>{n.push(e),t&&this.expandChildRows(e,n)})),r&&this.untrimRows(n),n}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const r=this.dataManager.getDataObject(e);(0,i.arrayEach)(r.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const r=this.dataManager.getRowIndex(e);t.push(r),this.expandChildRows(r,t)}}))}r&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];let s=null,o=null,a=null;return isNaN(e)?(s=e,o=this.dataManager.getRowIndex(e)):(s=this.dataManager.getDataObject(e),o=e),this.collapsedRows.splice(this.collapsedRows.indexOf(o),1),this.dataManager.hasChildren(s)&&(0,i.arrayEach)(s.__children,(e=>{const t=this.dataManager.getRowIndex(e);n.push(t)})),a=this.expandRows(n,!0,!1),r&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const n=[];(0,i.arrayEach)(e,(e=>{n.push(...this.expandChildren(e,!1,!1))})),r&&this.untrimRows(n),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,i.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,i.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),r=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,i.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return r=!1,!1})),r}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 r=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,u.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(r)?this.expandChildren(r):this.collapseChildren(r),(0,s.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=h},43509:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=n(r(42538)),o=r(57691),a=r(98887),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=h(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(497)),u=n(r(61619));function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(h=function(e){return e?r:t})(e)}function c(e,t,r){!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,r)}var d=new WeakMap;class f extends u.default{constructor(){super(...arguments),(0,s.default)(this,"dataManager",this.plugin.dataManager),c(this,d,{writable:!0,value:{row_above:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"above")},row_below:(e,t)=>{const r=t[t.length-1];this.dataManager.addSibling(r.start.row,"below")}}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.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(l.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,o.rangeEach)(0,e.items.length-1,(r=>{if(0===r)return(0,a.arrayEach)(t,((t,n)=>{e.items.splice(r+n,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,o.rangeEach)(0,e.items.length-1,(t=>{const r=(0,i.default)(this,d)[e.items[t].key];null!=r&&(e.items[t].callback=r)})),e}}t.default=f},15113:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=r(98887),i=r(57691),o=r(49587),a=n(r(61619)),l=r(66862);class u extends a.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const r=this.hot.toPhysicalRow(e),n=this.dataManager.getRowLevel(r),a=this.dataManager.getDataObject(r),h=t.getElementsByTagName("DIV")[0],c=h.querySelector("span.rowHeader"),d=h.querySelectorAll('[class^="ht_nesting"]'),f=this.hot.getSettings().ariaTags;if((0,s.arrayEach)(d,(e=>{e&&h.removeChild(e)})),(0,o.addClass)(t,u.CSS_CLASSES.indicatorContainer),n){const{rootDocument:e}=this.hot,t=c.cloneNode(!0);h.innerHTML="",(0,i.rangeEach)(0,n-1,(()=>{const t=e.createElement("SPAN");(0,o.addClass)(t,u.CSS_CLASSES.emptyIndicator),h.appendChild(t)})),h.appendChild(t)}if(this.dataManager.hasChildren(a)){const e=this.hot.rootDocument.createElement("DIV");f&&(0,o.setAttribute)(e,[(0,l.A11Y_HIDDEN)()]),(0,o.addClass)(t,u.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(r)?((0,o.addClass)(e,`${u.CSS_CLASSES.button} ${u.CSS_CLASSES.expandButton}`),f&&(0,o.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!1)])):((0,o.addClass)(e,`${u.CSS_CLASSES.button} ${u.CSS_CLASSES.collapseButton}`),f&&(0,o.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!0)])),h.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=u},51915:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231)),i=r(97639),o=r(31990),a=r(45561);t.default=class{constructor(e){(0,s.default)(this,"plugin",void 0),(0,s.default)(this,"hot",void 0),(0,s.default)(this,"dataManager",void 0),(0,s.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,r,n){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:r,movePossible:n}))return!1;this.movedToCollapsed=!1;const s=r===this.hot.countRows(),i=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(r);let o=!0;const a=e.map((e=>{if(!o)return!1;const t=this.dataManager.translateTrimmedRow(e);return o=this.shouldAllowMoving(t,i),t})),l=-1===a.indexOf(i);if(!o||!l)return!1;const u=this.getBaseParent(a),h=this.getTargetParent(s,i),c=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,i,c),this.moveRows(a,i,h),this.dataManager.rewriteCache(),this.moveCellsMeta(a,i),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,r,n,n&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,r),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:r,dropIndex:n,movePossible:s}=e;let l=!1;return(0,i.isUndefined)(n)&&((0,o.warn)(a.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
|
985
|
-
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,r,n,s,!1),l=!0),l}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 r=this.dataManager.getRowParent(e?t-1:t);return null==r&&(r=this.dataManager.getRowParent(t-1)),r}shiftCollapsibleParentsLocations(e,t,r){r||(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,r){const n=t===this.dataManager.getRowIndex(r)+this.dataManager.countChildren(r)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,n)}))}))}moveCellsMeta(e,t){const r=[],n=Math.max(...e)<t;e.forEach((e=>{r.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(n?r.length:0),0,...r)}selectCells(e,t){const r=e.length;let n=0,s=0,i=null,o=null;if(this.movedToCollapsed){let i=null;i=e[r-1]<t?this.dataManager.translateTrimmedRow(t-r):this.dataManager.translateTrimmedRow(t);const o=this.dataManager.getRowParent(null===i?this.hot.countSourceRows()-1:i-1),a=this.dataManager.getRowIndex(o);n=this.dataManager.untranslateTrimmedRow(a),s=n}else e[r-1]<t?(s=t-1,n=s-r+1):(n=t,s=n+r-1);i=this.hot.selection,o=this.hot.countCols()-1,i.setRangeStart(this.hot._createCellCoords(n,0)),i.setRangeEnd(this.hot._createCellCoords(s,o),!0)}isRowOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}}},46271:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94241);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.PersistentState=n.PersistentState},94241:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(33997),o=n(r(91718)),a=n(r(54925));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",u=t.PLUGIN_PRIORITY=0;class h extends i.BasePlugin{constructor(){super(...arguments),(0,s.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new o.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},91718:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(68983),r(63517);var s=n(r(93231)),i=r(98887);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,s.default)(this,"rootWindow",void 0),(0,s.default)(this,"prefix",void 0),(0,s.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,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 r=void 0===e?t:e,n=this.rootWindow.localStorage.getItem(`${this.prefix}_${r}`);return null===n?void 0:JSON.parse(n)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,i.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()}}},5280:(e,t,r)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...l.getItems(),...u.getItems()]},t.hasPlugin=function(e){return!!c(e)},t.registerPlugin=function(e,t,r){[e,t,r]=function(e,t,r){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,r=t.PLUGIN_PRIORITY);return[e,t,r]}(e,t,r),void 0===c(e)&&function(e,t,r){const s=(0,n.toUpperCaseFirst)(e);if(h.hasItem(s))throw new Error(a(s));void 0===r?u.addItem(s):l.addItem(r,s);h.addItem(s,t)}(e,t,r)},r(91683);var n=r(37913),s=r(22111),i=r(8815),o=r(6344);const a=e=>`There is already registered "${e}" plugin.`,l=(0,s.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),u=(0,o.createUniqueSet)({errorItemExists:a}),h=(0,i.createUniqueMap)({errorIdExists:a});function c(e){const t=(0,n.toUpperCaseFirst)(e);return h.getItem(t)}},24:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74639);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Search=n.Search},74639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(76163),a=r(57691),l=r(97639);function u(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 h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c=t.PLUGIN_KEY="search",d=t.PLUGIN_PRIORITY=190,f=function(e,t,r,n,s){e.getCellMeta(t,r).isSearchResult=s},p=function(e,t,r){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(r.locale).indexOf(e.toLocaleLowerCase(r.locale)))};var g=new WeakSet;class m extends i.BasePlugin{constructor(){super(...arguments),u(this,g),(0,s.default)(this,"callback",f),(0,s.default)(this,"queryMethod",p),(0,s.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return d}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[c];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,g,E).call(e,...r)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,g,E).call(e,...r)};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(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const n=this.hot.countRows(),s=this.hot.countCols(),i=[],o=this.hot;return(0,a.rangeEach)(0,n-1,(n=>{(0,a.rangeEach)(0,s-1,(s=>{const a=this.hot.getDataAtCell(n,s),l=this.hot.getCellMeta(n,s),u=l.search.callback||t,h=(l.search.queryMethod||r)(e,a,l);if(h){const e={row:n,col:s,data:a};i.push(e)}u&&u(o,n,s,a,h)}))})),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,o.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function E(e,t,r,n,s,i){const o=i.className||[];let a=[];"string"==typeof o?a=o.split(" "):a.push(...o),this.isEnabled()&&i.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),i.className=a.join(" ")}t.Search=m},8458:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51111);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TouchScroll=n.TouchScroll},51111:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(49587),o=r(98887),a=r(33997),l=r(6022);function u(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 h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c=t.PLUGIN_KEY="touchScroll",d=t.PLUGIN_PRIORITY=200;var f=new WeakSet,p=new WeakSet,g=new WeakSet;class m extends a.BasePlugin{constructor(){super(...arguments),u(this,g),u(this,p),u(this,f),(0,s.default)(this,"scrollbars",[]),(0,s.default)(this,"clones",[]),(0,s.default)(this,"lockedCollection",!1),(0,s.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return d}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>h(this,f,E).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>h(this,p,w).call(this))),this.addHook("afterMomentumScroll",(()=>h(this,g,y).call(this)))}}function E(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:r,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:s}=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(r),n&&this.scrollbars.push(n),s&&s.clone&&this.scrollbars.push(s),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),n&&this.clones.push(n.clone.wtTable.holder.parentNode),s&&s.clone&&this.clones.push(s.clone.wtTable.holder.parentNode)}function w(){this.freezeOverlays=!0,(0,o.arrayEach)(this.clones,(e=>{(0,i.addClass)(e,"hide-tween")}))}function y(){this.freezeOverlays=!1,(0,o.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"hide-tween"),(0,i.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,o.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"show-tween")}))}),400),(0,o.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=m},80044:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94821);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TrimRows=n.TrimRows},94821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(41789),a=r(98887);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u=t.PLUGIN_KEY="trimRows",h=t.PLUGIN_PRIORITY=330;var c=new WeakSet;class d extends i.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new o.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.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(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,n,r,r&&n.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;const s=this.trimmedRowsMap.getValues().slice(),i=e.length>0;r&&i&&((0,a.arrayEach)(e,(e=>{s[e]=!1})),n=(0,a.arrayReduce)(s,((e,t,r)=>(t&&e.push(r),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,n,r&&i)&&(r&&i&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",t,n,r&&i,r&&n.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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))}destroy(){super.destroy()}}function f(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=d},91515:(e,t,r)=>{"use strict";t.__esModule=!0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(66677));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}t.UndoRedo=n.default,t.PLUGIN_KEY=n.PLUGIN_KEY},66677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(20433);var s=n(r(54925)),i=r(98887),o=r(57691),a=r(76163),l=r(12208),u=r(55728);const h="undoRedo",c=t.PLUGIN_KEY="undoRedo";function d(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(r,n){const s=r&&r.length;if(!s)return;if(!r.find((e=>{const[,,t,r]=e;return t!==r})))return;t.done((()=>{const t=r.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,i.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const n=s>1?this.getSelected():[[t[0][0],t[0][1]]];return new d.ChangeAction(t,n)}),n)})),e.addHook("afterCreateRow",((e,r,n)=>{t.done((()=>new d.CreateRowAction(e,r)),n)}));const r=(t,r,n,s)=>{const i=["visualRow","visualCol","row","col","prop"],a=i.length,l=[];return(0,o.rangeEach)(n,s,(n=>{(0,o.rangeEach)(t,r,(t=>{const r=e.getCellMeta(t,n);if(Object.keys(r).length!==a){const e=Object.fromEntries(Object.entries(r).filter((e=>{let[t]=e;return!1===i.includes(t)})));l.push([r.visualRow,r.visualCol,e])}}))})),l};e.addHook("beforeRemoveRow",((n,s,i,o)=>{t.done((()=>{const i=e.toPhysicalRow(n),o=i+s-1,l=(0,a.deepClone)(t.instance.getSourceData(i,0,i+s-1,t.instance.countSourceCols()-1));return new d.RemoveRowAction(i,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),r(i,o,0,e.countCols()-1))}),o)})),e.addHook("afterCreateCol",((e,r,n)=>{t.done((()=>new d.CreateColumnAction(e,r)),n)})),e.addHook("beforeRemoveCol",((n,s,i,a)=>{t.done((()=>{const i=t.instance.getSourceDataArray(),a=(t.instance.countCols()+n)%t.instance.countCols(),l=a+s-1,u=[],h=[],c=[];(0,o.rangeEach)(i.length-1,(t=>{const r=[],n=i[t];(0,o.rangeEach)(a,l,(t=>{r.push(n[e.toPhysicalColumn(t)])})),u.push(r)})),(0,o.rangeEach)(s-1,(t=>{c.push(e.toPhysicalColumn(a+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,o.rangeEach)(s-1,(t=>{h.push(e.getSettings().colHeaders[e.toPhysicalColumn(a+t)]||null)}));const f=e.columnIndexMapper.getIndexesSequence(),p=e.rowIndexMapper.getIndexesSequence();return new d.RemoveColumnAction(a,c,u,h,f,p,e.getSettings().fixedColumnsStart,r(0,e.countRows(),a,l))}),a)})),e.addHook("beforeCellAlignment",((e,r,n,s)=>{t.done((()=>new d.CellAlignmentAction(e,r,n,s)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new d.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,r)=>{!1!==e&&t.done((()=>new d.RowMoveAction(e,r)))})),e.addHook("beforeColumnMove",((e,r)=>{!1!==e&&t.done((()=>new d.ColumnMoveAction(e,r)))})),e.addHook("beforeMergeCells",((r,n)=>{n||t.done((()=>new d.MergeCellsAction(e,r)))})),e.addHook("afterUnmergeCells",((r,n)=>{n||t.done((()=>new d.UnmergeCellsAction(e,r)))})),e.addHook("afterInit",(()=>{t.init()}))}d.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const r=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",r,t))return;const n=e(),s=this.undoneActions.slice();this.doneActions.push(n),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",s),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice())},d.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 r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",r))return;this.ignoreNewActions=!0;const n=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,(()=>{n.ignoreNewActions=!1,n.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",r)}},d.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 r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",r))return;this.ignoreNewActions=!0;const n=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,(()=>{n.ignoreNewActions=!1,n.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",r)}},d.prototype.isUndoAvailable=function(){return this.doneActions.length>0},d.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},d.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},d.prototype.isEnabled=function(){return this.enabled},d.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",g)},d.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",g)},d.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},d.Action=function(){},d.Action.prototype.undo=function(){},d.Action.prototype.redo=function(){},d.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(d.ChangeAction,d.Action),d.ChangeAction.prototype.undo=function(e,t){const r=(0,a.deepClone)(this.changes),n=e.countEmptyRows(!0),s=e.countEmptyCols(!0);for(let e=0,t=r.length;e<t;e++)r[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.undo");for(let t=0,i=r.length;t<i;t++){const[i,o]=r[t];e.getSettings().minSpareRows&&i+1+e.getSettings().minSpareRows===e.countRows()&&n===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(i+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&o+1+e.getSettings().minSpareCols===e.countCols()&&s===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(o+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const i=e.getSelectedLast();if(void 0!==i){const[t,n]=r[0],[s,o]=i,a=t>=e.view.getFirstFullyVisibleRow(),l=n>=e.view.getFirstFullyVisibleColumn();if(!1===(a&&l)&&!0===(s!==t||o!==n)){const r={row:t,col:n};!1===a&&(r.verticalSnap="top"),!1===l&&(r.horizontalSnap="start"),e.scrollViewportTo(r)}}e.selectCells(this.selected,!1,!1)},d.ChangeAction.prototype.redo=function(e,t){const r=(0,a.deepClone)(this.changes);for(let e=0,t=r.length;e<t;e++)r[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},d.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(d.CreateRowAction,d.Action),d.CreateRowAction.prototype.undo=function(e,t){const r=e.countRows(),n=e.getSettings().minSpareRows;this.index>=r&&this.index-n<r&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},d.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},d.RemoveRowAction=function(e,t,r,n,s,i){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=r,this.fixedRowsTop=n,this.rowIndexesSequence=s,this.removedCellMetas=i},(0,a.inherit)(d.RemoveRowAction,d.Action),d.RemoveRowAction.prototype.undo=function(e,t){const r=e.getSettings(),n=[];r.fixedRowsBottom=this.fixedRowsBottom,r.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((r=>{const s=parseInt(r,10);n.push([this.index+t,isNaN(s)?r:s,e[r]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach((t=>{let[r,n,s]=t;e.setCellMetaObject(r,n,s)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(n,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},d.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},d.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(d.CreateColumnAction,d.Action),d.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},d.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},d.RemoveColumnAction=function(e,t,r,n,s,i,o,a){this.index=e,this.indexes=t,this.data=r,this.amount=this.data[0].length,this.headers=n,this.columnPositions=s.slice(0),this.rowPositions=i.slice(0),this.actionType="remove_col",this.fixedColumnsStart=o,this.removedCellMetas=a},(0,a.inherit)(d.RemoveColumnAction,d.Action),d.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),n=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,o=[];for(let e=0;e<s;e++)o.push((0,i.arrayMap)(this.data[e],n));const a=(0,i.arrayMap)(this.headers,n),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,i.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,i.arrayEach)(r,((r,n)=>{e[r]=o[t][n],l.push([t,r,e[r]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,i.arrayEach)(a,((t,n)=>{e.getSettings().colHeaders[r[n]]=t})),this.removedCellMetas.forEach((t=>{let[r,n,s]=t;e.setCellMetaObject(r,n,s)})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},d.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},d.CellAlignmentAction=function(e,t,r,n){this.stateBefore=e,this.range=t,this.type=r,this.alignment=n},d.CellAlignmentAction.prototype.undo=function(e,t){(0,i.arrayEach)(this.range,(t=>{t.forAll(((t,r)=>{t>=0&&r>=0&&e.setCellMeta(t,r,"className",this.stateBefore[t][r]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},d.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,r)=>e.getCellMeta(t,r)),((t,r,n,s)=>e.setCellMeta(t,r,n,s))),e.addHookOnce("afterViewRender",t),e.render()},d.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(d.FiltersAction,d.Action),d.FiltersAction.prototype.undo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),r.filter()},d.FiltersAction.prototype.redo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack),r.filter()};class f extends d.Action{constructor(e,t){super(),this.cellRange=t;const r=this.cellRange.getTopStartCorner(),n=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(r.row,r.col,n.row,n.col)}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();e.populateFromArray(n.row,n.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange)}}d.MergeCellsAction=f;class p extends d.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange,!0)}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0),e.render()}}function g(e,t){if("loadData"===t)return this.undoRedo.clear()}d.UnmergeCellsAction=p,d.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},(0,a.inherit)(d.RowMoveAction,d.Action),d.RowMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);(0,u.getMoves)(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:n}=e;t<n&&(n-=1),r.moveRow(n,t)})),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},d.RowMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),r.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},d.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},(0,a.inherit)(d.ColumnMoveAction,d.Action),d.ColumnMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);(0,u.getMoves)(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:n}=e;t<n&&(n-=1),r.moveColumn(n,t)})),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},d.ColumnMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),r.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},d.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()},d.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)},d.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const m=s.default.getSingleton();m.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),m.register("beforeUndo"),m.register("afterUndo"),m.register("beforeRedo"),m.register("afterRedo"),d.PLUGIN_KEY=c,d.SETTING_KEYS=!0;t.default=d},87396:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,n.registerAllEditors)(),(0,s.registerAllRenderers)(),(0,i.registerAllValidators)(),(0,o.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var n=r(5944);t.registerAllEditors=n.registerAllEditors;var s=r(19433);t.registerAllRenderers=s.registerAllRenderers;var i=r(65967);t.registerAllValidators=i.registerAllValidators;var o=r(419);t.registerAllCellTypes=o.registerAllCellTypes;var a=r(6191);t.registerAllPlugins=a.registerAllPlugins},36330:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.autocompleteRenderer=h;var s=r(36017),i=r(26031),o=n(r(57340)),a=r(49587);r(67004);var l=r(66862);const u=t.RENDERER_TYPE="autocomplete";function h(e,t,r,n,u,h,c){const{rootDocument:d}=e,f=c.allowHtml?s.htmlRenderer:i.textRenderer,p=d.createElement("DIV"),g=e.getSettings().ariaTags;if(p.className="htAutocompleteArrow",g&&p.setAttribute(...(0,l.A11Y_HIDDEN)()),p.appendChild(d.createTextNode(String.fromCharCode(9660))),f.apply(this,[e,t,r,n,u,h,c]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(p,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),!e.acArrowListener){const s=new o.default(e);e.acArrowListener=function(s){(0,a.hasClass)(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{s.destroy()}))}}h.RENDERER_TYPE=u},20395:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(36330);t.RENDERER_TYPE=n.RENDERER_TYPE,t.autocompleteRenderer=n.autocompleteRenderer},15052:(e,t,r)=>{"use strict";t.__esModule=!0,t.baseRenderer=o,r(63517);var n=r(49587),s=r(66862);const i=t.RENDERER_TYPE="base";function o(e,t,r,i,o,a,l){const u=l.ariaTags,h=[],c=[],d=[],f=[];l.className&&(0,n.addClass)(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&f.push((0,s.A11Y_READONLY)())):u&&d.push((0,s.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&f.push((0,s.A11Y_INVALID)())):(c.push(l.invalidCellClassName),u&&d.push((0,s.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),(0,n.removeClass)(t,c),(0,n.addClass)(t,h),(0,n.removeAttribute)(t,d),(0,n.setAttribute)(t,f)}o.RENDERER_TYPE=i},21755:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(15052);t.RENDERER_TYPE=n.RENDERER_TYPE,t.baseRenderer=n.baseRenderer},31494:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.checkboxRenderer=y,r(63517);var s=r(21755),i=n(r(57340)),o=r(49587),a=r(97639),l=r(51377),u=n(r(54925)),h=r(66862),c=r(497);r(51768);const d=new WeakMap,f=new WeakMap,p="htBadValue",g="data-row",m="data-col",E="checkboxRenderer",w=t.RENDERER_TYPE="checkbox";function y(e,t,r,n,u,w,y){const{rootDocument:v}=e,S=e.getSettings().ariaTags;s.baseRenderer.apply(this,[e,t,r,n,u,w,y]),function(e){let t=f.get(e);if(!t){const{rootElement:r}=e;t=new i.default(e),t.addEventListener(r,"click",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),i=t.getCellMeta(n,s);i.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(r,"mouseup",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(r,"change",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),i=t.getCellMeta(n,s);if(!i.readOnly){let r=null;r=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(n,s,r)}}(t,e))),f.set(e,t)}}(e);let R=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(v);const T=y.label;let N=!1;if(void 0===y.checkedTemplate&&(y.checkedTemplate=!0),void 0===y.uncheckedTemplate&&(y.uncheckedTemplate=!1),(0,o.empty)(t),w===y.checkedTemplate||(0,a.stringify)(w).toLocaleLowerCase(y.locale)===(0,a.stringify)(y.checkedTemplate).toLocaleLowerCase(y.locale)?R.checked=!0:w===y.uncheckedTemplate||(0,a.stringify)(w).toLocaleLowerCase(y.locale)===(0,a.stringify)(y.uncheckedTemplate).toLocaleLowerCase(y.locale)?R.checked=!1:(0,a.isEmpty)(w)?(0,o.addClass)(R,"noValue"):(R.style.display="none",(0,o.addClass)(R,p),N=!0),(0,o.setAttribute)(R,[[g,r],[m,n]]),S&&(0,o.setAttribute)(R,[(0,h.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,h.A11Y_CHECKED)(R.checked),(0,h.A11Y_CHECKBOX)()]),!N&&T){let s="";if(T.value)s="function"==typeof T.value?T.value.call(this,r,n,u,w):T.value;else if(T.property){const t=e.getDataAtRowProp(r,T.property);s=null!==t?t:""}const i=function(e,t,r){const n=e.createElement("label");return n.className="htCheckboxRendererLabel "+(r?"fullWidth":""),n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(v,s,!0!==T.separated);"before"===T.position?T.separated?(t.appendChild(i),t.appendChild(R)):(i.appendChild(R),R=i):T.position&&"after"!==T.position||(T.separated?(t.appendChild(R),t.appendChild(i)):(i.insertBefore(R,i.firstChild),R=i))}function _(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=e.getSelectedRange();if(r)for(let n=0;n<r.length;n++){const{row:s,col:i}=r[n].getTopStartCorner(),{row:o,col:a}=r[n].getBottomEndCorner(),l=[];for(let r=s;r<=o;r+=1)for(let n=i;n<=a;n+=1){const s=e.getCellMeta(r,n);if("checkbox"!==s.type)return;if(!0===s.readOnly)continue;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1);const i=e.getDataAtCell(r,n);!1===t?[s.checkedTemplate,s.checkedTemplate.toString()].includes(i)?l.push([r,n,s.uncheckedTemplate]):[s.uncheckedTemplate,s.uncheckedTemplate.toString(),null,void 0].includes(i)&&l.push([r,n,s.checkedTemplate]):l.push([r,n,s.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function b(){const t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){const n=t[r].getTopStartCorner(),s=t[r].getBottomEndCorner();for(let t=n.row;t<=s.row;t++)for(let r=n.col;r<=s.col;r++){const n=e.getCellMeta(t,r);if("checkbox"!==n.type)return!1;const s=e.getCell(t,r);if(null==s)return!0;if(s.querySelectorAll("input[type=checkbox]").length>0&&!n.readOnly)return!0}}return!1}}(!T||T&&!T.separated)&&t.appendChild(R),N&&t.appendChild(v.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),r={group:E};t.addShortcuts([{keys:[["space"]],callback:()=>(_(),!b())},{keys:[["enter"]],callback:()=>(_(),!b()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(_(!0),!b()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],r)}())}function C(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}u.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,r){const{label:n,type:s,row:i,column:o,prop:a}=t;if(s===w){if(n){const{value:t,property:s}=n;let l=r;if(t)l="function"==typeof t?t(i,o,a,r):t;else if(s){const e=this.getDataAtRowProp(i,s);l=null!==e?e:r}e=l}return e}})),y.RENDERER_TYPE=w},30201:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31494);t.RENDERER_TYPE=n.RENDERER_TYPE,t.checkboxRenderer=n.checkboxRenderer},7066:(e,t,r)=>{"use strict";t.__esModule=!0,t.dateRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="date";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},61795:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(7066);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dateRenderer=n.dateRenderer},96214:(e,t,r)=>{"use strict";t.__esModule=!0,t.dropdownRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="dropdown";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},81393:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(96214);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dropdownRenderer=n.dropdownRenderer},25708:(e,t,r)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="handsontable";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},75067:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25708);t.RENDERER_TYPE=n.RENDERER_TYPE,t.handsontableRenderer=n.handsontableRenderer},54914:(e,t,r)=>{"use strict";t.__esModule=!0,t.htmlRenderer=o;var n=r(21755),s=r(49587);const i=t.RENDERER_TYPE="html";function o(e,t,r,i,o,a,l){n.baseRenderer.apply(this,[e,t,r,i,o,a,l]),(0,s.fastInnerHTML)(t,null==a?"":a,!1)}o.RENDERER_TYPE=i},36017:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(54914);t.RENDERER_TYPE=n.RENDERER_TYPE,t.htmlRenderer=n.htmlRenderer},19433:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,p.registerRenderer)(n.autocompleteRenderer),(0,p.registerRenderer)(s.baseRenderer),(0,p.registerRenderer)(o.checkboxRenderer),(0,p.registerRenderer)(i.dropdownRenderer),(0,p.registerRenderer)(a.handsontableRenderer),(0,p.registerRenderer)(l.htmlRenderer),(0,p.registerRenderer)(u.numericRenderer),(0,p.registerRenderer)(h.passwordRenderer),(0,p.registerRenderer)(c.selectRenderer),(0,p.registerRenderer)(d.textRenderer),(0,p.registerRenderer)(f.timeRenderer)};var n=r(20395);t.autocompleteRenderer=n.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=n.RENDERER_TYPE;var s=r(21755);t.baseRenderer=s.baseRenderer,t.BASE_RENDERER=s.RENDERER_TYPE;var i=r(81393);t.dropdownRenderer=i.dropdownRenderer,t.DROPDOWN_RENDERER=i.RENDERER_TYPE;var o=r(30201);t.checkboxRenderer=o.checkboxRenderer,t.CHECKBOX_RENDERER=o.RENDERER_TYPE;var a=r(75067);t.handsontableRenderer=a.handsontableRenderer,t.HANDSONTABLE_RENDERER=a.RENDERER_TYPE;var l=r(36017);t.htmlRenderer=l.htmlRenderer,t.HTML_RENDERER=l.RENDERER_TYPE;var u=r(94350);t.numericRenderer=u.numericRenderer,t.NUMERIC_RENDERER=u.RENDERER_TYPE;var h=r(32991);t.passwordRenderer=h.passwordRenderer,t.PASSWORD_RENDERER=h.RENDERER_TYPE;var c=r(9126);t.selectRenderer=c.selectRenderer,t.SELECT_RENDERER=c.RENDERER_TYPE;var d=r(26031);t.textRenderer=d.textRenderer,t.TEXT_RENDERER=d.RENDERER_TYPE;var f=r(78279);t.timeRenderer=f.timeRenderer,t.TIME_RENDERER=f.RENDERER_TYPE;var p=r(36996);t.registerRenderer=p.registerRenderer,t.getRegisteredRendererNames=p.getRegisteredRendererNames,t.getRegisteredRenderers=p.getRegisteredRenderers,t.getRenderer=p.getRenderer,t.hasRenderer=p.hasRenderer},94350:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65677);t.RENDERER_TYPE=n.RENDERER_TYPE,t.numericRenderer=n.numericRenderer},65677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.numericRenderer=l,r(63517);var s=n(r(75586)),i=r(26031),o=r(57691);const a=t.RENDERER_TYPE="numeric";function l(e,t,r,n,a,l,u){let h=l;if((0,o.isNumeric)(h)){const e=u.numericFormat,r=e&&e.culture||"-",n=e&&e.pattern,i=u.className||"",o=i.length?i.split(" "):[];if(void 0!==r&&!s.default.languages()[r]){const e=r.replace("-",""),t=s.default.allLanguages?s.default.allLanguages[r]:s.default[e];t&&s.default.registerLanguage(t)}s.default.setLanguage(r),h=(0,s.default)(h).format(n||"0"),o.indexOf("htLeft")<0&&o.indexOf("htCenter")<0&&o.indexOf("htRight")<0&&o.indexOf("htJustify")<0&&o.push("htRight"),o.indexOf("htNumeric")<0&&o.push("htNumeric"),u.className=o.join(" "),t.dir="ltr"}(0,i.textRenderer)(e,t,r,n,a,h,u)}l.RENDERER_TYPE=a},32991:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88090);t.RENDERER_TYPE=n.RENDERER_TYPE,t.passwordRenderer=n.passwordRenderer},88090:(e,t,r)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var n=r(26031),s=r(49587),i=r(57691);const o=t.RENDERER_TYPE="password";function a(e,t,r,o,a,l,u){n.textRenderer.apply(this,[e,t,r,o,a,l,u]);const h=u.hashLength||t.innerHTML.length,c=u.hashSymbol||"*";let d="";(0,i.rangeEach)(h-1,(()=>{d+=c})),(0,s.fastInnerHTML)(t,d)}a.RENDERER_TYPE=o},36996:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return o(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);i(e,t)},r(91683);var s=n(r(31056));const{register:i,getItem:o,hasItem:a,getNames:l,getValues:u}=(0,s.default)("renderers");t.getRegisteredRenderers=u,t.getRegisteredRendererNames=l,t.hasRenderer=a},9126:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3145);t.RENDERER_TYPE=n.RENDERER_TYPE,t.selectRenderer=n.selectRenderer},3145:(e,t,r)=>{"use strict";t.__esModule=!0,t.selectRenderer=i;var n=r(26031);const s=t.RENDERER_TYPE="select";function i(e,t,r,s,i,o,a){n.textRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},26031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(80071);t.RENDERER_TYPE=n.RENDERER_TYPE,t.textRenderer=n.textRenderer},80071:(e,t,r)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var n=r(21755),s=r(49587),i=r(97639);const o=t.RENDERER_TYPE="text";function a(e,t,r,o,a,l,u){n.baseRenderer.apply(this,[e,t,r,o,a,l,u]);let h=l;if(!h&&u.placeholder&&(h=u.placeholder),h=(0,i.stringify)(h),u.trimWhitespace&&(h=h.trim()),u.rendererTemplate){(0,s.empty)(t);const n=e.rootDocument.createElement("TEMPLATE");n.setAttribute("bind","{{}}"),n.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(n),n.model=e.getSourceDataAtRow(r),t.appendChild(n)}else(0,s.fastInnerText)(t,h)}a.RENDERER_TYPE=o},78279:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73874);t.RENDERER_TYPE=n.RENDERER_TYPE,t.timeRenderer=n.timeRenderer},73874:(e,t,r)=>{"use strict";t.__esModule=!0,t.timeRenderer=i;var n=r(26031);const s=t.RENDERER_TYPE="time";function i(e,t,r,s,i,o,a){n.textRenderer.apply(this,[e,t,r,s,i,o,a]),t.dir="ltr"}i.RENDERER_TYPE=s},41294:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(41418),o=r(75821),a=r(59616),l=r(15574),u=r(24413),h=r(37765),c=r(79456),d=r(66786),f=r(98309),p=r(94699);t.ACTIVE_HEADER_TYPE=p.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=p.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=p.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=p.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=p.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=p.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=p.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=p.HIGHLIGHT_COLUMN_TYPE;var g=r(98887);let m;function E(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,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var y=new WeakSet;m=Symbol.iterator;function C(e,t){const r=this.layerLevel;if(e.has(r))return e.get(r);const n=t({layerLevel:r,...this.options});return e.set(r,n),n}t.default=class{constructor(e){E(this,y),(0,s.default)(this,"options",void 0),(0,s.default)(this,"layerLevel",0),(0,s.default)(this,"focus",void 0),(0,s.default)(this,"fill",void 0),(0,s.default)(this,"layeredAreas",new Map),(0,s.default)(this,"areas",new Map),(0,s.default)(this,"rowHeaders",new Map),(0,s.default)(this,"columnHeaders",new Map),(0,s.default)(this,"activeRowHeaders",new Map),(0,s.default)(this,"activeColumnHeaders",new Map),(0,s.default)(this,"activeCornerHeaders",new Map),(0,s.default)(this,"rowHighlights",new Map),(0,s.default)(this,"columnHighlights",new Map),(0,s.default)(this,"customSelections",[]),this.options=e,this.focus=(0,u.createHighlight)(e),this.fill=(0,c.createHighlight)(e)}isEnabledFor(e,t){let r=e;e===p.HIGHLIGHT_FOCUS_TYPE&&(r="current");let n=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(r)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return w(this,y,C).call(this,this.layeredAreas,o.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,y,C).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,y,C).call(this,this.rowHeaders,d.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,y,C).call(this,this.columnHeaders,d.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,y,C).call(this,this.activeRowHeaders,i.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,y,C).call(this,this.activeColumnHeaders,i.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,y,C).call(this,this.activeCornerHeaders,i.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,y,C).call(this,this.rowHighlights,f.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,y,C).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,h.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,g.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,g.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]()}}},41418:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var s=r(94699),i=n(r(6250))},59616:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"highlight",...t,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),i=n(r(6250))},75821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...r}=e;return new i.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),i=n(r(6250))},15574:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_COLUMN_TYPE})};var s=r(94699),i=n(r(6250))},37765:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:r,...n}=e;return new i.default({...t,...n,selectionType:s.HIGHLIGHT_CUSTOM_SELECTION_TYPE},r)};var s=r(94699),i=n(r(6250))},79456:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:s.HIGHLIGHT_FILL_TYPE})};var s=r(94699),i=n(r(6250))},24413:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...r}=e;return new i.default({className:"current",headerAttributes:[(0,o.A11Y_SELECTED)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_FOCUS_TYPE})};var s=r(94699),i=n(r(6250)),o=r(66862)},66786:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_HEADER_TYPE})};var s=r(94699),i=n(r(6250))},98309:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_ROW_TYPE})};var s=r(94699),i=n(r(6250))},6250:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(94699);class o extends i.Selection{constructor(e,t){super(e,null),(0,s.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:r}=e,n=this.getNearestNotHiddenCoords(t,1),s=this.getNearestNotHiddenCoords(r,-1);return null===n||null===s?null:((n.row>s.row||n.col>s.col)&&(n=t,s=r),this.settings.createCellRange(n,n,s))}getNearestNotHiddenCoords(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===n)return null;const s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,r);return null===s?null:this.settings.createCellCoords(n,s)}getNearestNotHiddenIndex(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}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(),r="N-S"===e.getVerticalDirection()?1:-1,n="W-E"===e.getHorizontalDirection()?1:-1,s=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let i=null;if(null!==s&&null!==s.col&&null!==s.row||(i=this.getNearestNotHiddenCoords(t,r,n)),null!==i&&e.overlaps(i)){const t=e.highlight.clone();if(t.row>=0&&(t.row=i.row),t.col>=0&&(t.col=i.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!==s&&null===i&&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 r=this.settings.visualToRenderableCoords(e),n=this.settings.visualToRenderableCoords(t);return null===r.row||null===r.col||null===n.row||null===n.col?null:this.settings.createCellRange(r,r,n)}}t.default=o},79055:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},i=n(r(30392));t.Selection=i.default;var o=r(56740);t.handleMouseEvent=o.handleMouseEvent;var a=r(7763);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=r(41294);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},56740:(e,t,r)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:r,selection:s,controller:i,cellCoordsFactory:a}=t;o.get(e.type)({coords:r,selection:s,controller:i,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,n.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,n.isRightClick)(e)})},t.mouseDown=s,t.mouseOver=i;var n=r(30369);function s(e){let{isShiftKey:t,isLeftClick:r,isRightClick:n,coords:s,selection:i,controller:o,cellCoordsFactory:a}=e;const l=i.isSelected()?i.getSelectedRange().current():null,u=i.isSelectedByCorner(),h=i.isSelectedByRowHeader();if(i.markSource("mouse"),t&&l)s.row>=0&&s.col>=0&&!o.cell?i.setRangeEnd(s):(u||h)&&s.row>=0&&s.col>=0&&!o.cell?i.setRangeEnd(a(s.row,s.col)):u&&s.row<0&&!o.column?i.setRangeEnd(a(l.to.row,s.col)):h&&s.col<0&&!o.row?i.setRangeEnd(a(s.row,l.to.col)):(!u&&!h&&s.col<0||u&&s.col<0)&&!o.row?i.selectRows(Math.max(l.from.row,0),s.row,s.col):(!u&&!h&&s.row<0||h&&s.row<0)&&!o.column&&i.selectColumns(Math.max(l.from.col,0),s.col,s.row);else{const e=!i.inInSelection(s),t=r||n&&e;s.row<0&&s.col>=0&&!o.column?t&&i.selectColumns(s.col,s.col,s.row):s.col<0&&s.row>=0&&!o.row?t&&i.selectRows(s.row,s.row,s.col):s.col>=0&&s.row>=0&&!o.cell?t&&i.setRangeStart(s):s.col<0&&s.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}function i(e){let{isLeftClick:t,coords:r,selection:n,controller:s,cellCoordsFactory:i}=e;if(!t)return;const o=n.isSelectedByRowHeader(),a=n.isSelectedByColumnHeader(),l=n.tableProps.countCols(),u=n.tableProps.countRows();n.markSource("mouse"),a&&!s.column?n.setRangeEnd(i(u-1,r.col)):o&&!s.row?n.setRangeEnd(i(r.row,l-1)):s.cell||n.setRangeEnd(r),n.markEndSource()}const o=new Map([["mousedown",s],["mouseover",i],["touchstart",s]])},61764:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231));let i;i=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"ranges",[]),(0,s.default)(this,"createCellRange",void 0),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}[i](){return this.ranges[Symbol.iterator]()}}},30392:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(41294)),l=n(r(61764)),u=r(76163),h=r(97639),c=r(57691),d=r(98887),f=n(r(63806)),p=n(r(64396)),g=r(7763),m=r(45561),E=r(66862);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function y(e,t,r){!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,r)}var C=new WeakMap,v=new WeakMap,S=new WeakMap;class R{constructor(e,t){var r=this;(0,s.default)(this,"settings",void 0),(0,s.default)(this,"tableProps",void 0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"selectedRange",new l.default(((e,t,r)=>this.tableProps.createCellRange(e,t,r)))),(0,s.default)(this,"highlight",void 0),(0,s.default)(this,"transformation",void 0),(0,s.default)(this,"selectedByRowHeader",new Set),(0,s.default)(this,"selectedByColumnHeader",new Set),y(this,C,{writable:!0,value:!1}),y(this,v,{writable:!0,value:"unknown"}),y(this,S,{writable:!0,value:-1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,E.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return r.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return r.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,r)=>this.tableProps.createCellRange(e,t,r)}),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),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){(0,o.default)(this,v,e)}markEndSource(){(0,o.default)(this,v,"unknown")}getSelectionSource(){return(0,i.default)(this,v)}setExpectedLayers(e){(0,o.default)(this,S,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,(0,o.default)(this,S,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const s="multiple"===this.settings.selectionMode,i=(0,h.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,o=e.clone();this.runLocalHooks("beforeSetRangeStart"+(r?"Only":""),o),(!s||s&&!i&&(0,h.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(o).current().setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),r||this.setRangeEnd(e)}setRangeStartOnly(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,r)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),r=this.tableProps.countRows(),n=this.tableProps.countCols(),s=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((r>0||n>0)&&(0===r&&t.col<0&&!s||0===n&&t.row<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const o=this.selectedRange.current();this.settings.navigableHeaders||o.highlight.normalize(),"single"===this.settings.selectionMode?(o.setFrom(o.highlight),o.setTo(o.highlight)):o.setTo(t),r>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!o.isSingleHeader())&&o.to.normalize(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,o.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(o);const u=this.getLayerLevel();u<this.highlight.layerLevel&&((0,d.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(u);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),f=this.highlight.createRowHeader(),p=this.highlight.createColumnHeader(),g=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),E=this.highlight.createActiveCornerHeader(),w=this.highlight.createRowHighlight(),y=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),f.clear(),p.clear(),g.clear(),m.clear(),E.clear(),w.clear(),y.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,o.highlight)&&(this.isMultiple()||u>=1)&&(h.add(o.from).add(o.to).commit(),c.add(o.from).add(o.to).commit(),1===u)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(u-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(u)}if(this.highlight.isEnabledFor(a.HEADER_TYPE,o.highlight)){if(!o.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(o.from.row,0),-1),t=this.tableProps.createCellCoords(o.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(o.from.col,0)),n=this.tableProps.createCellCoords(-1,o.to.col);"single"===this.settings.selectionMode?(f.add(e).commit(),p.add(r).commit(),w.add(e).commit(),y.add(r).commit()):(f.add(e).add(t).commit(),p.add(r).add(n).commit(),w.add(e).add(t).commit(),y.add(r).add(n).commit())}const e=!(0,i.default)(this,C)&&this.isEntireRowSelected()&&(n>0&&n===o.getWidth()||0===n&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,C)&&this.isEntireColumnSelected()&&(r>0&&r===o.getHeight()||0===r&&this.isSelectedByColumnHeader());e&&g.add(this.tableProps.createCellCoords(Math.max(o.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(o.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(o.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(o.to.col,0))).commit(),e&&t&&E.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}const v=-1===(0,i.default)(this,S)||this.selectedRange.size()===(0,i.default)(this,S);this.runLocalHooks("afterSetRangeEnd",e,v)}isMultiple(){const e=(0,u.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,r))}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(),r=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(r>0&&t<0||0===r)&&e.getWidth()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}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(),r=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(r>0&&t<0||0===r)&&e.getHeight()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}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()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}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],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const s=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),u=r?-l:0,h=t?-a:0;if(0===u&&0===h&&(0===s||0===i))return;let d=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:f,disableHeadersHighlight:p}=n;(0,o.default)(this,C,p),f&&Number.isInteger(null==f?void 0:f.row)&&Number.isInteger(null==f?void 0:f.col)&&(d=this.tableProps.createCellCoords((0,c.clamp)(f.row,u,s-1),(0,c.clamp)(f.col,h,i-1)));const g=this.tableProps.createCellCoords(u,h),m=this.tableProps.createCellCoords(s-1,i-1);this.clear(),this.setRangeStartOnly(g,void 0,d),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),u<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,o.default)(this,C,!1)}selectCells(e){var t=this;const r=(0,g.detectSelectionType)(e);if(r===g.SELECTION_TYPE_EMPTY)return!1;if(r===g.SELECTION_TYPE_UNRECOGNIZED)throw new Error(m.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
985
|
+
when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,r,n,s,!1),l=!0),l}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 r=this.dataManager.getRowParent(e?t-1:t);return null==r&&(r=this.dataManager.getRowParent(t-1)),r}shiftCollapsibleParentsLocations(e,t,r){r||(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,r){const n=t===this.dataManager.getRowIndex(r)+this.dataManager.countChildren(r)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,n)}))}))}moveCellsMeta(e,t){const r=[],n=Math.max(...e)<t;e.forEach((e=>{r.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(n?r.length:0),0,...r)}selectCells(e,t){const r=e.length;let n=0,s=0,i=null,o=null;if(this.movedToCollapsed){let i=null;i=e[r-1]<t?this.dataManager.translateTrimmedRow(t-r):this.dataManager.translateTrimmedRow(t);const o=this.dataManager.getRowParent(null===i?this.hot.countSourceRows()-1:i-1),a=this.dataManager.getRowIndex(o);n=this.dataManager.untranslateTrimmedRow(a),s=n}else e[r-1]<t?(s=t-1,n=s-r+1):(n=t,s=n+r-1);i=this.hot.selection,o=this.hot.countCols()-1,i.setRangeStart(this.hot._createCellCoords(n,0)),i.setRangeEnd(this.hot._createCellCoords(s,o),!0)}isRowOrderChanged(e,t){return e.some(((e,r)=>e-r!==t))}}},46271:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94241);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.PersistentState=n.PersistentState},94241:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(33997),o=n(r(91718)),a=n(r(54925));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",u=t.PLUGIN_PRIORITY=0;class h extends i.BasePlugin{constructor(){super(...arguments),(0,s.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new o.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},91718:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(68983),r(63517);var s=n(r(93231)),i=r(98887);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,s.default)(this,"rootWindow",void 0),(0,s.default)(this,"prefix",void 0),(0,s.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,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 r=void 0===e?t:e,n=this.rootWindow.localStorage.getItem(`${this.prefix}_${r}`);return null===n?void 0:JSON.parse(n)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,i.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()}}},5280:(e,t,r)=>{"use strict";t.__esModule=!0,t.getPlugin=c,t.getPluginsNames=function(){return[...l.getItems(),...u.getItems()]},t.hasPlugin=function(e){return!!c(e)},t.registerPlugin=function(e,t,r){[e,t,r]=function(e,t,r){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,r=t.PLUGIN_PRIORITY);return[e,t,r]}(e,t,r),void 0===c(e)&&function(e,t,r){const s=(0,n.toUpperCaseFirst)(e);if(h.hasItem(s))throw new Error(a(s));void 0===r?u.addItem(s):l.addItem(r,s);h.addItem(s,t)}(e,t,r)},r(91683);var n=r(37913),s=r(22111),i=r(8815),o=r(6344);const a=e=>`There is already registered "${e}" plugin.`,l=(0,s.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),u=(0,o.createUniqueSet)({errorItemExists:a}),h=(0,i.createUniqueMap)({errorIdExists:a});function c(e){const t=(0,n.toUpperCaseFirst)(e);return h.getItem(t)}},24:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(74639);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.Search=n.Search},74639:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(76163),a=r(57691),l=r(97639);function u(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 h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c=t.PLUGIN_KEY="search",d=t.PLUGIN_PRIORITY=190,f=function(e,t,r,n,s){e.getCellMeta(t,r).isSearchResult=s},p=function(e,t,r){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(r.locale).indexOf(e.toLocaleLowerCase(r.locale)))};var g=new WeakSet;class m extends i.BasePlugin{constructor(){super(...arguments),u(this,g),(0,s.default)(this,"callback",f),(0,s.default)(this,"queryMethod",p),(0,s.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return d}isEnabled(){return this.hot.getSettings()[c]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[c];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,g,E).call(e,...r)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return h(e,g,E).call(e,...r)};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(),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const n=this.hot.countRows(),s=this.hot.countCols(),i=[],o=this.hot;return(0,a.rangeEach)(0,n-1,(n=>{(0,a.rangeEach)(0,s-1,(s=>{const a=this.hot.getDataAtCell(n,s),l=this.hot.getCellMeta(n,s),u=l.search.callback||t,h=(l.search.queryMethod||r)(e,a,l);if(h){const e={row:n,col:s,data:a};i.push(e)}u&&u(o,n,s,a,h)}))})),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,o.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function E(e,t,r,n,s,i){const o=i.className||[];let a=[];"string"==typeof o?a=o.split(" "):a.push(...o),this.isEnabled()&&i.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),i.className=a.join(" ")}t.Search=m},8458:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(51111);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TouchScroll=n.TouchScroll},51111:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683),r(63517);var s=n(r(93231)),i=r(49587),o=r(98887),a=r(33997),l=r(6022);function u(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 h(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}const c=t.PLUGIN_KEY="touchScroll",d=t.PLUGIN_PRIORITY=200;var f=new WeakSet,p=new WeakSet,g=new WeakSet;class m extends a.BasePlugin{constructor(){super(...arguments),u(this,g),u(this,p),u(this,f),(0,s.default)(this,"scrollbars",[]),(0,s.default)(this,"clones",[]),(0,s.default)(this,"lockedCollection",!1),(0,s.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return d}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>h(this,f,E).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>h(this,p,w).call(this))),this.addHook("afterMomentumScroll",(()=>h(this,g,y).call(this)))}}function E(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:r,topInlineStartCornerOverlay:n,bottomInlineStartCornerOverlay:s}=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(r),n&&this.scrollbars.push(n),s&&s.clone&&this.scrollbars.push(s),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),r.needFullRender&&this.clones.push(r.clone.wtTable.holder.parentNode),n&&this.clones.push(n.clone.wtTable.holder.parentNode),s&&s.clone&&this.clones.push(s.clone.wtTable.holder.parentNode)}function w(){this.freezeOverlays=!0,(0,o.arrayEach)(this.clones,(e=>{(0,i.addClass)(e,"hide-tween")}))}function y(){this.freezeOverlays=!1,(0,o.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"hide-tween"),(0,i.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,o.arrayEach)(this.clones,(e=>{(0,i.removeClass)(e,"show-tween")}))}),400),(0,o.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=m},80044:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(94821);t.PLUGIN_KEY=n.PLUGIN_KEY,t.PLUGIN_PRIORITY=n.PLUGIN_PRIORITY,t.TrimRows=n.TrimRows},94821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(33997),o=r(41789),a=r(98887);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const u=t.PLUGIN_KEY="trimRows",h=t.PLUGIN_PRIORITY=330;var c=new WeakSet;class d extends i.BasePlugin{constructor(){super(...arguments),l(this,c),(0,s.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new o.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}(this,c,f).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.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(),r=this.isValidConfig(e);let n=t;r&&(n=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,n,r)&&(r&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,n,r,r&&n.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),r=this.isValidConfig(e);let n=t;const s=this.trimmedRowsMap.getValues().slice(),i=e.length>0;r&&i&&((0,a.arrayEach)(e,(e=>{s[e]=!1})),n=(0,a.arrayReduce)(s,((e,t,r)=>(t&&e.push(r),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,n,r&&i)&&(r&&i&&this.trimmedRowsMap.setValues(s),this.hot.runHooks("afterUntrimRow",t,n,r&&i,r&&n.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];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))}destroy(){super.destroy()}}function f(){const e=this.hot.getSettings()[u];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=d},91515:(e,t,r)=>{"use strict";t.__esModule=!0;var n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=s(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(n,o,a):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(66677));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(s=function(e){return e?r:t})(e)}t.UndoRedo=n.default,t.PLUGIN_KEY=n.PLUGIN_KEY},66677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(20433);var s=n(r(54925)),i=r(98887),o=r(57691),a=r(76163),l=r(12208),u=r(55728);const h="undoRedo",c=t.PLUGIN_KEY="undoRedo";function d(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(r,n){const s=r&&r.length;if(!s)return;if(!r.find((e=>{const[,,t,r]=e;return t!==r})))return;t.done((()=>{const t=r.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,i.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const n=s>1?this.getSelected():[[t[0][0],t[0][1]]];return new d.ChangeAction(t,n)}),n)})),e.addHook("afterCreateRow",((e,r,n)=>{t.done((()=>new d.CreateRowAction(e,r)),n)}));const r=(t,r,n,s)=>{const i=["visualRow","visualCol","row","col","prop"],a=i.length,l=[];return(0,o.rangeEach)(n,s,(n=>{(0,o.rangeEach)(t,r,(t=>{const r=e.getCellMeta(t,n);if(Object.keys(r).length!==a){const e=Object.fromEntries(Object.entries(r).filter((e=>{let[t]=e;return!1===i.includes(t)})));l.push([r.visualRow,r.visualCol,e])}}))})),l};e.addHook("beforeRemoveRow",((n,s,i,o)=>{t.done((()=>{const i=e.toPhysicalRow(n),o=i+s-1,l=(0,a.deepClone)(t.instance.getSourceData(i,0,i+s-1,t.instance.countSourceCols()-1));return new d.RemoveRowAction(i,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),r(i,o,0,e.countCols()-1))}),o)})),e.addHook("afterCreateCol",((e,r,n)=>{t.done((()=>new d.CreateColumnAction(e,r)),n)})),e.addHook("beforeRemoveCol",((n,s,i,a)=>{t.done((()=>{const i=t.instance.getSourceDataArray(),a=(t.instance.countCols()+n)%t.instance.countCols(),l=a+s-1,u=[],h=[],c=[];(0,o.rangeEach)(i.length-1,(t=>{const r=[],n=i[t];(0,o.rangeEach)(a,l,(t=>{r.push(n[e.toPhysicalColumn(t)])})),u.push(r)})),(0,o.rangeEach)(s-1,(t=>{c.push(e.toPhysicalColumn(a+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,o.rangeEach)(s-1,(t=>{h.push(e.getSettings().colHeaders[e.toPhysicalColumn(a+t)]||null)}));const f=e.columnIndexMapper.getIndexesSequence(),p=e.rowIndexMapper.getIndexesSequence();return new d.RemoveColumnAction(a,c,u,h,f,p,e.getSettings().fixedColumnsStart,r(0,e.countRows(),a,l))}),a)})),e.addHook("beforeCellAlignment",((e,r,n,s)=>{t.done((()=>new d.CellAlignmentAction(e,r,n,s)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new d.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,r)=>{!1!==e&&t.done((()=>new d.RowMoveAction(e,r)))})),e.addHook("beforeColumnMove",((e,r)=>{!1!==e&&t.done((()=>new d.ColumnMoveAction(e,r)))})),e.addHook("beforeMergeCells",((r,n)=>{n||t.done((()=>new d.MergeCellsAction(e,r)))})),e.addHook("afterUnmergeCells",((r,n)=>{n||t.done((()=>new d.UnmergeCellsAction(e,r)))})),e.addHook("afterInit",(()=>{t.init()}))}d.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const r=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",r,t))return;const n=e(),s=this.undoneActions.slice();this.doneActions.push(n),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",s),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice())},d.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 r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",r))return;this.ignoreNewActions=!0;const n=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,(()=>{n.ignoreNewActions=!1,n.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",r)}},d.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 r=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",r))return;this.ignoreNewActions=!0;const n=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,(()=>{n.ignoreNewActions=!1,n.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",r)}},d.prototype.isUndoAvailable=function(){return this.doneActions.length>0},d.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},d.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},d.prototype.isEnabled=function(){return this.enabled},d.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",g)},d.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",g)},d.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},d.Action=function(){},d.Action.prototype.undo=function(){},d.Action.prototype.redo=function(){},d.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(d.ChangeAction,d.Action),d.ChangeAction.prototype.undo=function(e,t){const r=(0,a.deepClone)(this.changes),n=e.countEmptyRows(!0),s=e.countEmptyCols(!0);for(let e=0,t=r.length;e<t;e++)r[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.undo");for(let t=0,i=r.length;t<i;t++){const[i,o]=r[t];e.getSettings().minSpareRows&&i+1+e.getSettings().minSpareRows===e.countRows()&&n===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(i+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&o+1+e.getSettings().minSpareCols===e.countCols()&&s===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(o+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const i=e.getSelectedLast();if(void 0!==i){const[t,n]=r[0],[s,o]=i,a=t>=e.view.getFirstFullyVisibleRow(),l=n>=e.view.getFirstFullyVisibleColumn();if(!1===(a&&l)&&!0===(s!==t||o!==n)){const r={row:t,col:n};!1===a&&(r.verticalSnap="top"),!1===l&&(r.horizontalSnap="start"),e.scrollViewportTo(r)}}e.selectCells(this.selected,!1,!1)},d.ChangeAction.prototype.redo=function(e,t){const r=(0,a.deepClone)(this.changes);for(let e=0,t=r.length;e<t;e++)r[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(r,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},d.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(d.CreateRowAction,d.Action),d.CreateRowAction.prototype.undo=function(e,t){const r=e.countRows(),n=e.getSettings().minSpareRows;this.index>=r&&this.index-n<r&&(this.index-=n),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},d.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},d.RemoveRowAction=function(e,t,r,n,s,i){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=r,this.fixedRowsTop=n,this.rowIndexesSequence=s,this.removedCellMetas=i},(0,a.inherit)(d.RemoveRowAction,d.Action),d.RemoveRowAction.prototype.undo=function(e,t){const r=e.getSettings(),n=[];r.fixedRowsBottom=this.fixedRowsBottom,r.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((r=>{const s=parseInt(r,10);n.push([this.index+t,isNaN(s)?r:s,e[r]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach((t=>{let[r,n,s]=t;e.setCellMetaObject(r,n,s)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(n,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},d.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},d.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(d.CreateColumnAction,d.Action),d.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},d.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},d.RemoveColumnAction=function(e,t,r,n,s,i,o,a){this.index=e,this.indexes=t,this.data=r,this.amount=this.data[0].length,this.headers=n,this.columnPositions=s.slice(0),this.rowPositions=i.slice(0),this.actionType="remove_col",this.fixedColumnsStart=o,this.removedCellMetas=a},(0,a.inherit)(d.RemoveColumnAction,d.Action),d.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),n=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,o=[];for(let e=0;e<s;e++)o.push((0,i.arrayMap)(this.data[e],n));const a=(0,i.arrayMap)(this.headers,n),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,i.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,i.arrayEach)(r,((r,n)=>{e[r]=o[t][n],l.push([t,r,e[r]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,i.arrayEach)(a,((t,n)=>{e.getSettings().colHeaders[r[n]]=t})),this.removedCellMetas.forEach((t=>{let[r,n,s]=t;e.setCellMetaObject(r,n,s)})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},d.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},d.CellAlignmentAction=function(e,t,r,n){this.stateBefore=e,this.range=t,this.type=r,this.alignment=n},d.CellAlignmentAction.prototype.undo=function(e,t){(0,i.arrayEach)(this.range,(t=>{t.forAll(((t,r)=>{t>=0&&r>=0&&e.setCellMeta(t,r,"className",this.stateBefore[t][r]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},d.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,r)=>e.getCellMeta(t,r)),((t,r,n,s)=>e.setCellMeta(t,r,n,s))),e.addHookOnce("afterViewRender",t),e.render()},d.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(d.FiltersAction,d.Action),d.FiltersAction.prototype.undo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),r.filter()},d.FiltersAction.prototype.redo=function(e,t){const r=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),r.conditionCollection.importAllConditions(this.conditionsStack),r.filter()};class f extends d.Action{constructor(e,t){super(),this.cellRange=t;const r=this.cellRange.getTopStartCorner(),n=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(r.row,r.col,n.row,n.col)}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0);const n=this.cellRange.getTopStartCorner();e.populateFromArray(n.row,n.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange)}}d.MergeCellsAction=f;class p extends d.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.mergeRange(this.cellRange,!0)}redo(e,t){const r=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),r.unmergeRange(this.cellRange,!0),e.render()}}function g(e,t){if("loadData"===t)return this.undoRedo.clear()}d.UnmergeCellsAction=p,d.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},(0,a.inherit)(d.RowMoveAction,d.Action),d.RowMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);(0,u.getMoves)(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:n}=e;t<n&&(n-=1),r.moveRow(n,t)})),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},d.RowMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),r.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},d.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},(0,a.inherit)(d.ColumnMoveAction,d.Action),d.ColumnMoveAction.prototype.undo=function(e,t){const r=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);(0,u.getMoves)(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).reverse().forEach((e=>{let{from:t,to:n}=e;t<n&&(n-=1),r.moveColumn(n,t)})),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},d.ColumnMoveAction.prototype.redo=function(e,t){const r=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),r.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},d.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()},d.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)},d.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const m=s.default.getSingleton();m.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),m.register("beforeUndo"),m.register("afterUndo"),m.register("beforeRedo"),m.register("afterRedo"),d.PLUGIN_KEY=c,d.SETTING_KEYS=!0;t.default=d},87396:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,n.registerAllEditors)(),(0,s.registerAllRenderers)(),(0,i.registerAllValidators)(),(0,o.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var n=r(5944);t.registerAllEditors=n.registerAllEditors;var s=r(19433);t.registerAllRenderers=s.registerAllRenderers;var i=r(65967);t.registerAllValidators=i.registerAllValidators;var o=r(419);t.registerAllCellTypes=o.registerAllCellTypes;var a=r(6191);t.registerAllPlugins=a.registerAllPlugins},36330:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.autocompleteRenderer=h;var s=r(36017),i=r(26031),o=n(r(57340)),a=r(49587);r(67004);var l=r(66862);const u=t.RENDERER_TYPE="autocomplete";function h(e,t,r,n,u,h,c){const{rootDocument:d}=e,f=c.allowHtml?s.htmlRenderer:i.textRenderer,p=d.createElement("DIV"),g=e.getSettings().ariaTags;if(p.className="htAutocompleteArrow",g&&p.setAttribute(...(0,l.A11Y_HIDDEN)()),p.appendChild(d.createTextNode(String.fromCharCode(9660))),f.apply(this,[e,t,r,n,u,h,c]),t.firstChild||t.appendChild(d.createTextNode(String.fromCharCode(160))),t.insertBefore(p,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),!e.acArrowListener){const s=new o.default(e);e.acArrowListener=function(s){(0,a.hasClass)(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(r,n),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{s.destroy()}))}}h.RENDERER_TYPE=u},20395:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(36330);t.RENDERER_TYPE=n.RENDERER_TYPE,t.autocompleteRenderer=n.autocompleteRenderer},15052:(e,t,r)=>{"use strict";t.__esModule=!0,t.baseRenderer=o,r(63517);var n=r(49587),s=r(66862);const i=t.RENDERER_TYPE="base";function o(e,t,r,i,o,a,l){const u=l.ariaTags,h=[],c=[],d=[],f=[];l.className&&(0,n.addClass)(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&f.push((0,s.A11Y_READONLY)())):u&&d.push((0,s.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&f.push((0,s.A11Y_INVALID)())):(c.push(l.invalidCellClassName),u&&d.push((0,s.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),(0,n.removeClass)(t,c),(0,n.addClass)(t,h),(0,n.removeAttribute)(t,d),(0,n.setAttribute)(t,f)}o.RENDERER_TYPE=i},21755:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(15052);t.RENDERER_TYPE=n.RENDERER_TYPE,t.baseRenderer=n.baseRenderer},31494:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.checkboxRenderer=y,r(63517);var s=r(21755),i=n(r(57340)),o=r(49587),a=r(97639),l=r(51377),u=n(r(54925)),h=r(66862),c=r(497);r(51768);const d=new WeakMap,f=new WeakMap,p="htBadValue",g="data-row",m="data-col",E="checkboxRenderer",w=t.RENDERER_TYPE="checkbox";function y(e,t,r,n,u,w,y){const{rootDocument:v}=e,S=e.getSettings().ariaTags;s.baseRenderer.apply(this,[e,t,r,n,u,w,y]),function(e){let t=f.get(e);if(!t){const{rootElement:r}=e;t=new i.default(e),t.addEventListener(r,"click",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),i=t.getCellMeta(n,s);i.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(r,"mouseup",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(r,"change",(t=>function(e,t){const{target:r}=e;if(!C(r))return;if(!r.hasAttribute(g)||!r.hasAttribute(m))return;const n=parseInt(r.getAttribute(g),10),s=parseInt(r.getAttribute(m),10),i=t.getCellMeta(n,s);if(!i.readOnly){let r=null;r=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(n,s,r)}}(t,e))),f.set(e,t)}}(e);let R=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(v);const T=y.label;let N=!1;if(void 0===y.checkedTemplate&&(y.checkedTemplate=!0),void 0===y.uncheckedTemplate&&(y.uncheckedTemplate=!1),(0,o.empty)(t),w===y.checkedTemplate||(0,a.stringify)(w).toLocaleLowerCase(y.locale)===(0,a.stringify)(y.checkedTemplate).toLocaleLowerCase(y.locale)?R.checked=!0:w===y.uncheckedTemplate||(0,a.stringify)(w).toLocaleLowerCase(y.locale)===(0,a.stringify)(y.uncheckedTemplate).toLocaleLowerCase(y.locale)?R.checked=!1:(0,a.isEmpty)(w)?(0,o.addClass)(R,"noValue"):(R.style.display="none",(0,o.addClass)(R,p),N=!0),(0,o.setAttribute)(R,[[g,r],[m,n]]),S&&(0,o.setAttribute)(R,[(0,h.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(c.CHECKBOX_CHECKED):e.getTranslatedPhrase(c.CHECKBOX_UNCHECKED)),(0,h.A11Y_CHECKED)(R.checked),(0,h.A11Y_CHECKBOX)()]),!N&&T){let s="";if(T.value)s="function"==typeof T.value?T.value.call(this,r,n,u,w):T.value;else if(T.property){const t=e.getDataAtRowProp(r,T.property);s=null!==t?t:""}const i=function(e,t,r){const n=e.createElement("label");return n.className="htCheckboxRendererLabel "+(r?"fullWidth":""),n.appendChild(e.createTextNode(t)),n.cloneNode(!0)}(v,s,!0!==T.separated);"before"===T.position?T.separated?(t.appendChild(i),t.appendChild(R)):(i.appendChild(R),R=i):T.position&&"after"!==T.position||(T.separated?(t.appendChild(R),t.appendChild(i)):(i.insertBefore(R,i.firstChild),R=i))}function _(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const r=e.getSelectedRange();if(r)for(let n=0;n<r.length;n++){const{row:s,col:i}=r[n].getTopStartCorner(),{row:o,col:a}=r[n].getBottomEndCorner(),l=[];for(let r=s;r<=o;r+=1)for(let n=i;n<=a;n+=1){const s=e.getCellMeta(r,n);if("checkbox"!==s.type)return;if(!0===s.readOnly)continue;void 0===s.checkedTemplate&&(s.checkedTemplate=!0),void 0===s.uncheckedTemplate&&(s.uncheckedTemplate=!1);const i=e.getDataAtCell(r,n);!1===t?[s.checkedTemplate,s.checkedTemplate.toString()].includes(i)?l.push([r,n,s.uncheckedTemplate]):[s.uncheckedTemplate,s.uncheckedTemplate.toString(),null,void 0].includes(i)&&l.push([r,n,s.checkedTemplate]):l.push([r,n,s.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function b(){const t=e.getSelectedRange();if(t){for(let r=0;r<t.length;r++){const n=t[r].getTopStartCorner(),s=t[r].getBottomEndCorner();for(let t=n.row;t<=s.row;t++)for(let r=n.col;r<=s.col;r++){const n=e.getCellMeta(t,r);if("checkbox"!==n.type)return!1;const s=e.getCell(t,r);if(null==s)return!0;if(s.querySelectorAll("input[type=checkbox]").length>0&&!n.readOnly)return!0}}return!1}}(!T||T&&!T.separated)&&t.appendChild(R),N&&t.appendChild(v.createTextNode("#bad-value#")),d.has(e)||(d.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),r={group:E};t.addShortcuts([{keys:[["space"]],callback:()=>(_(),!b())},{keys:[["enter"]],callback:()=>(_(),!b()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(_(!0),!b()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],r)}())}function C(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}u.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,r){const{label:n,type:s,row:i,column:o,prop:a}=t;if(s===w){if(n){const{value:t,property:s}=n;let l=r;if(t)l="function"==typeof t?t(i,o,a,r):t;else if(s){const e=this.getDataAtRowProp(i,s);l=null!==e?e:r}e=l}return e}})),y.RENDERER_TYPE=w},30201:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(31494);t.RENDERER_TYPE=n.RENDERER_TYPE,t.checkboxRenderer=n.checkboxRenderer},7066:(e,t,r)=>{"use strict";t.__esModule=!0,t.dateRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="date";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},61795:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(7066);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dateRenderer=n.dateRenderer},96214:(e,t,r)=>{"use strict";t.__esModule=!0,t.dropdownRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="dropdown";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},81393:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(96214);t.RENDERER_TYPE=n.RENDERER_TYPE,t.dropdownRenderer=n.dropdownRenderer},25708:(e,t,r)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=i;var n=r(20395);const s=t.RENDERER_TYPE="handsontable";function i(e,t,r,s,i,o,a){n.autocompleteRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},75067:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(25708);t.RENDERER_TYPE=n.RENDERER_TYPE,t.handsontableRenderer=n.handsontableRenderer},54914:(e,t,r)=>{"use strict";t.__esModule=!0,t.htmlRenderer=o;var n=r(21755),s=r(49587);const i=t.RENDERER_TYPE="html";function o(e,t,r,i,o,a,l){n.baseRenderer.apply(this,[e,t,r,i,o,a,l]),(0,s.fastInnerHTML)(t,null==a?"":a,!1)}o.RENDERER_TYPE=i},36017:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(54914);t.RENDERER_TYPE=n.RENDERER_TYPE,t.htmlRenderer=n.htmlRenderer},19433:(e,t,r)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,p.registerRenderer)(n.autocompleteRenderer),(0,p.registerRenderer)(s.baseRenderer),(0,p.registerRenderer)(o.checkboxRenderer),(0,p.registerRenderer)(i.dropdownRenderer),(0,p.registerRenderer)(a.handsontableRenderer),(0,p.registerRenderer)(l.htmlRenderer),(0,p.registerRenderer)(u.numericRenderer),(0,p.registerRenderer)(h.passwordRenderer),(0,p.registerRenderer)(c.selectRenderer),(0,p.registerRenderer)(d.textRenderer),(0,p.registerRenderer)(f.timeRenderer)};var n=r(20395);t.autocompleteRenderer=n.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=n.RENDERER_TYPE;var s=r(21755);t.baseRenderer=s.baseRenderer,t.BASE_RENDERER=s.RENDERER_TYPE;var i=r(81393);t.dropdownRenderer=i.dropdownRenderer,t.DROPDOWN_RENDERER=i.RENDERER_TYPE;var o=r(30201);t.checkboxRenderer=o.checkboxRenderer,t.CHECKBOX_RENDERER=o.RENDERER_TYPE;var a=r(75067);t.handsontableRenderer=a.handsontableRenderer,t.HANDSONTABLE_RENDERER=a.RENDERER_TYPE;var l=r(36017);t.htmlRenderer=l.htmlRenderer,t.HTML_RENDERER=l.RENDERER_TYPE;var u=r(94350);t.numericRenderer=u.numericRenderer,t.NUMERIC_RENDERER=u.RENDERER_TYPE;var h=r(32991);t.passwordRenderer=h.passwordRenderer,t.PASSWORD_RENDERER=h.RENDERER_TYPE;var c=r(9126);t.selectRenderer=c.selectRenderer,t.SELECT_RENDERER=c.RENDERER_TYPE;var d=r(26031);t.textRenderer=d.textRenderer,t.TEXT_RENDERER=d.RENDERER_TYPE;var f=r(78279);t.timeRenderer=f.timeRenderer,t.TIME_RENDERER=f.RENDERER_TYPE;var p=r(36996);t.registerRenderer=p.registerRenderer,t.getRegisteredRendererNames=p.getRegisteredRendererNames,t.getRegisteredRenderers=p.getRegisteredRenderers,t.getRenderer=p.getRenderer,t.hasRenderer=p.hasRenderer},94350:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(65677);t.RENDERER_TYPE=n.RENDERER_TYPE,t.numericRenderer=n.numericRenderer},65677:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.numericRenderer=l,r(63517);var s=n(r(75586)),i=r(26031),o=r(57691);const a=t.RENDERER_TYPE="numeric";function l(e,t,r,n,a,l,u){let h=l;if((0,o.isNumeric)(h)){const e=u.numericFormat,r=e&&e.culture||"-",n=e&&e.pattern,i=u.className||"",o=i.length?i.split(" "):[];if(void 0!==r&&!s.default.languages()[r]){const e=r.replace("-",""),t=s.default.allLanguages?s.default.allLanguages[r]:s.default[e];t&&s.default.registerLanguage(t)}s.default.setLanguage(r),h=(0,s.default)(h).format(n||"0"),o.indexOf("htLeft")<0&&o.indexOf("htCenter")<0&&o.indexOf("htRight")<0&&o.indexOf("htJustify")<0&&o.push("htRight"),o.indexOf("htNumeric")<0&&o.push("htNumeric"),u.className=o.join(" "),t.dir="ltr"}u.displayValue=h,(0,i.textRenderer)(e,t,r,n,a,h,u)}l.RENDERER_TYPE=a},32991:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(88090);t.RENDERER_TYPE=n.RENDERER_TYPE,t.passwordRenderer=n.passwordRenderer},88090:(e,t,r)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var n=r(26031),s=r(49587),i=r(57691);const o=t.RENDERER_TYPE="password";function a(e,t,r,o,a,l,u){n.textRenderer.apply(this,[e,t,r,o,a,l,u]);const h=u.hashLength||t.innerHTML.length,c=u.hashSymbol||"*";let d="";(0,i.rangeEach)(h-1,(()=>{d+=c})),(0,s.fastInnerHTML)(t,d)}a.RENDERER_TYPE=o},36996:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return o(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);i(e,t)},r(91683);var s=n(r(31056));const{register:i,getItem:o,hasItem:a,getNames:l,getValues:u}=(0,s.default)("renderers");t.getRegisteredRenderers=u,t.getRegisteredRendererNames=l,t.hasRenderer=a},9126:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(3145);t.RENDERER_TYPE=n.RENDERER_TYPE,t.selectRenderer=n.selectRenderer},3145:(e,t,r)=>{"use strict";t.__esModule=!0,t.selectRenderer=i;var n=r(26031);const s=t.RENDERER_TYPE="select";function i(e,t,r,s,i,o,a){n.textRenderer.apply(this,[e,t,r,s,i,o,a])}i.RENDERER_TYPE=s},26031:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(80071);t.RENDERER_TYPE=n.RENDERER_TYPE,t.textRenderer=n.textRenderer},80071:(e,t,r)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var n=r(21755),s=r(49587),i=r(97639);const o=t.RENDERER_TYPE="text";function a(e,t,r,o,a,l,u){n.baseRenderer.apply(this,[e,t,r,o,a,l,u]);let h=l;if(!h&&u.placeholder&&(h=u.placeholder),h=(0,i.stringify)(h),u.trimWhitespace&&(h=h.trim()),u.rendererTemplate){(0,s.empty)(t);const n=e.rootDocument.createElement("TEMPLATE");n.setAttribute("bind","{{}}"),n.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(n),n.model=e.getSourceDataAtRow(r),t.appendChild(n)}else(0,s.fastInnerText)(t,h)}a.RENDERER_TYPE=o},78279:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(73874);t.RENDERER_TYPE=n.RENDERER_TYPE,t.timeRenderer=n.timeRenderer},73874:(e,t,r)=>{"use strict";t.__esModule=!0,t.timeRenderer=i;var n=r(26031);const s=t.RENDERER_TYPE="time";function i(e,t,r,s,i,o,a){n.textRenderer.apply(this,[e,t,r,s,i,o,a]),t.dir="ltr"}i.RENDERER_TYPE=s},41294:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517),r(91683);var s=n(r(93231)),i=r(41418),o=r(75821),a=r(59616),l=r(15574),u=r(24413),h=r(37765),c=r(79456),d=r(66786),f=r(98309),p=r(94699);t.ACTIVE_HEADER_TYPE=p.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=p.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=p.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=p.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=p.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=p.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=p.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=p.HIGHLIGHT_COLUMN_TYPE;var g=r(98887);let m;function E(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,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var y=new WeakSet;m=Symbol.iterator;function C(e,t){const r=this.layerLevel;if(e.has(r))return e.get(r);const n=t({layerLevel:r,...this.options});return e.set(r,n),n}t.default=class{constructor(e){E(this,y),(0,s.default)(this,"options",void 0),(0,s.default)(this,"layerLevel",0),(0,s.default)(this,"focus",void 0),(0,s.default)(this,"fill",void 0),(0,s.default)(this,"layeredAreas",new Map),(0,s.default)(this,"areas",new Map),(0,s.default)(this,"rowHeaders",new Map),(0,s.default)(this,"columnHeaders",new Map),(0,s.default)(this,"activeRowHeaders",new Map),(0,s.default)(this,"activeColumnHeaders",new Map),(0,s.default)(this,"activeCornerHeaders",new Map),(0,s.default)(this,"rowHighlights",new Map),(0,s.default)(this,"columnHighlights",new Map),(0,s.default)(this,"customSelections",[]),this.options=e,this.focus=(0,u.createHighlight)(e),this.fill=(0,c.createHighlight)(e)}isEnabledFor(e,t){let r=e;e===p.HIGHLIGHT_FOCUS_TYPE&&(r="current");let n=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof n&&(n=[n]),!1===n||Array.isArray(n)&&!n.includes(r)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return w(this,y,C).call(this,this.layeredAreas,o.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return w(this,y,C).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return w(this,y,C).call(this,this.rowHeaders,d.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return w(this,y,C).call(this,this.columnHeaders,d.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return w(this,y,C).call(this,this.activeRowHeaders,i.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return w(this,y,C).call(this,this.activeColumnHeaders,i.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return w(this,y,C).call(this,this.activeCornerHeaders,i.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return w(this,y,C).call(this,this.rowHighlights,f.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return w(this,y,C).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,h.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,g.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,g.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,g.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]()}}},41418:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var s=r(94699),i=n(r(6250))},59616:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"highlight",...t,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),i=n(r(6250))},75821:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...r}=e;return new i.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_AREA_TYPE})};var s=r(94699),i=n(r(6250))},15574:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_COLUMN_TYPE})};var s=r(94699),i=n(r(6250))},37765:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:r,...n}=e;return new i.default({...t,...n,selectionType:s.HIGHLIGHT_CUSTOM_SELECTION_TYPE},r)};var s=r(94699),i=n(r(6250))},79456:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new i.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:s.HIGHLIGHT_FILL_TYPE})};var s=r(94699),i=n(r(6250))},24413:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...r}=e;return new i.default({className:"current",headerAttributes:[(0,o.A11Y_SELECTED)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...r,selectionType:s.HIGHLIGHT_FOCUS_TYPE})};var s=r(94699),i=n(r(6250)),o=r(66862)},66786:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_HEADER_TYPE})};var s=r(94699),i=n(r(6250))},98309:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...r}=e;return new i.default({className:t,...r,selectionType:s.HIGHLIGHT_ROW_TYPE})};var s=r(94699),i=n(r(6250))},6250:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s=n(r(93231)),i=r(94699);class o extends i.Selection{constructor(e,t){super(e,null),(0,s.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:r}=e,n=this.getNearestNotHiddenCoords(t,1),s=this.getNearestNotHiddenCoords(r,-1);return null===n||null===s?null:((n.row>s.row||n.col>s.col)&&(n=t,s=r),this.settings.createCellRange(n,n,s))}getNearestNotHiddenCoords(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const n=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===n)return null;const s=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,r);return null===s?null:this.settings.createCellCoords(n,s)}getNearestNotHiddenIndex(e,t,r){return t<0?t:e.getNearestNotHiddenIndex(t,r)}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(),r="N-S"===e.getVerticalDirection()?1:-1,n="W-E"===e.getHorizontalDirection()?1:-1,s=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let i=null;if(null!==s&&null!==s.col&&null!==s.row||(i=this.getNearestNotHiddenCoords(t,r,n)),null!==i&&e.overlaps(i)){const t=e.highlight.clone();if(t.row>=0&&(t.row=i.row),t.col>=0&&(t.col=i.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!==s&&null===i&&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 r=this.settings.visualToRenderableCoords(e),n=this.settings.visualToRenderableCoords(t);return null===r.row||null===r.col||null===n.row||null===n.col?null:this.settings.createCellRange(r,r,n)}}t.default=o},79055:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0;var s={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},i=n(r(30392));t.Selection=i.default;var o=r(56740);t.handleMouseEvent=o.handleMouseEvent;var a=r(7763);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=r(41294);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},56740:(e,t,r)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:r,selection:s,controller:i,cellCoordsFactory:a}=t;o.get(e.type)({coords:r,selection:s,controller:i,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,n.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,n.isRightClick)(e)})},t.mouseDown=s,t.mouseOver=i;var n=r(30369);function s(e){let{isShiftKey:t,isLeftClick:r,isRightClick:n,coords:s,selection:i,controller:o,cellCoordsFactory:a}=e;const l=i.isSelected()?i.getSelectedRange().current():null,u=i.isSelectedByCorner(),h=i.isSelectedByRowHeader();if(i.markSource("mouse"),t&&l)s.row>=0&&s.col>=0&&!o.cell?i.setRangeEnd(s):(u||h)&&s.row>=0&&s.col>=0&&!o.cell?i.setRangeEnd(a(s.row,s.col)):u&&s.row<0&&!o.column?i.setRangeEnd(a(l.to.row,s.col)):h&&s.col<0&&!o.row?i.setRangeEnd(a(s.row,l.to.col)):(!u&&!h&&s.col<0||u&&s.col<0)&&!o.row?i.selectRows(Math.max(l.from.row,0),s.row,s.col):(!u&&!h&&s.row<0||h&&s.row<0)&&!o.column&&i.selectColumns(Math.max(l.from.col,0),s.col,s.row);else{const e=!i.inInSelection(s),t=r||n&&e;s.row<0&&s.col>=0&&!o.column?t&&i.selectColumns(s.col,s.col,s.row):s.col<0&&s.row>=0&&!o.row?t&&i.selectRows(s.row,s.row,s.col):s.col>=0&&s.row>=0&&!o.cell?t&&i.setRangeStart(s):s.col<0&&s.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}function i(e){let{isLeftClick:t,coords:r,selection:n,controller:s,cellCoordsFactory:i}=e;if(!t)return;const o=n.isSelectedByRowHeader(),a=n.isSelectedByColumnHeader(),l=n.tableProps.countCols(),u=n.tableProps.countRows();n.markSource("mouse"),a&&!s.column?n.setRangeEnd(i(u-1,r.col)):o&&!s.row?n.setRangeEnd(i(r.row,l-1)):s.cell||n.setRangeEnd(r),n.markEndSource()}const o=new Map([["mousedown",s],["mouseover",i],["touchstart",s]])},61764:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(63517);var s=n(r(93231));let i;i=Symbol.iterator;t.default=class{constructor(e){(0,s.default)(this,"ranges",[]),(0,s.default)(this,"createCellRange",void 0),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}[i](){return this.ranges[Symbol.iterator]()}}},30392:(e,t,r)=>{"use strict";var n=r(73203);t.__esModule=!0,r(91683);var s=n(r(93231)),i=n(r(42538)),o=n(r(48427)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=w(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var o=s?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(41294)),l=n(r(61764)),u=r(76163),h=r(97639),c=r(57691),d=r(98887),f=n(r(63806)),p=n(r(64396)),g=r(7763),m=r(45561),E=r(66862);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(w=function(e){return e?r:t})(e)}function y(e,t,r){!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,r)}var C=new WeakMap,v=new WeakMap,S=new WeakMap;class R{constructor(e,t){var r=this;(0,s.default)(this,"settings",void 0),(0,s.default)(this,"tableProps",void 0),(0,s.default)(this,"inProgress",!1),(0,s.default)(this,"selectedRange",new l.default(((e,t,r)=>this.tableProps.createCellRange(e,t,r)))),(0,s.default)(this,"highlight",void 0),(0,s.default)(this,"transformation",void 0),(0,s.default)(this,"selectedByRowHeader",new Set),(0,s.default)(this,"selectedByColumnHeader",new Set),y(this,C,{writable:!0,value:!1}),y(this,v,{writable:!0,value:"unknown"}),y(this,S,{writable:!0,value:-1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,E.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return r.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return r.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,r)=>this.tableProps.createCellRange(e,t,r)}),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),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){(0,o.default)(this,v,e)}markEndSource(){(0,o.default)(this,v,"unknown")}getSelectionSource(){return(0,i.default)(this,v)}setExpectedLayers(e){(0,o.default)(this,S,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,(0,o.default)(this,S,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const s="multiple"===this.settings.selectionMode,i=(0,h.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,o=e.clone();this.runLocalHooks("beforeSetRangeStart"+(r?"Only":""),o),(!s||s&&!i&&(0,h.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(o).current().setHighlight(n.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),r||this.setRangeEnd(e)}setRangeStartOnly(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,r)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),r=this.tableProps.countRows(),n=this.tableProps.countCols(),s=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((r>0||n>0)&&(0===r&&t.col<0&&!s||0===n&&t.row<0&&!s))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const o=this.selectedRange.current();this.settings.navigableHeaders||o.highlight.normalize(),"single"===this.settings.selectionMode?(o.setFrom(o.highlight),o.setTo(o.highlight)):o.setTo(t),r>0&&n>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!o.isSingleHeader())&&o.to.normalize(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,o.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(o);const u=this.getLayerLevel();u<this.highlight.layerLevel&&((0,d.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,d.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(u);const h=this.highlight.createArea(),c=this.highlight.createLayeredArea(),f=this.highlight.createRowHeader(),p=this.highlight.createColumnHeader(),g=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),E=this.highlight.createActiveCornerHeader(),w=this.highlight.createRowHighlight(),y=this.highlight.createColumnHighlight();if(h.clear(),c.clear(),f.clear(),p.clear(),g.clear(),m.clear(),E.clear(),w.clear(),y.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,o.highlight)&&(this.isMultiple()||u>=1)&&(h.add(o.from).add(o.to).commit(),c.add(o.from).add(o.to).commit(),1===u)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(u-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(u)}if(this.highlight.isEnabledFor(a.HEADER_TYPE,o.highlight)){if(!o.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(o.from.row,0),-1),t=this.tableProps.createCellCoords(o.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(o.from.col,0)),n=this.tableProps.createCellCoords(-1,o.to.col);"single"===this.settings.selectionMode?(f.add(e).commit(),p.add(r).commit(),w.add(e).commit(),y.add(r).commit()):(f.add(e).add(t).commit(),p.add(r).add(n).commit(),w.add(e).add(t).commit(),y.add(r).add(n).commit())}const e=!(0,i.default)(this,C)&&this.isEntireRowSelected()&&(n>0&&n===o.getWidth()||0===n&&this.isSelectedByRowHeader()),t=!(0,i.default)(this,C)&&this.isEntireColumnSelected()&&(r>0&&r===o.getHeight()||0===r&&this.isSelectedByColumnHeader());e&&g.add(this.tableProps.createCellCoords(Math.max(o.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(o.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(o.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(o.to.col,0))).commit(),e&&t&&E.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}const v=-1===(0,i.default)(this,S)||this.selectedRange.size()===(0,i.default)(this,S);this.runLocalHooks("afterSetRangeEnd",e,v)}isMultiple(){const e=(0,u.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,r))}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(),r=this.tableProps.countRowHeaders(),n=this.tableProps.countCols();return(r>0&&t<0||0===r)&&e.getWidth()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}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(),r=this.tableProps.countColHeaders(),n=this.tableProps.countRows();return(r>0&&t<0||0===r)&&e.getHeight()===n};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const r=this.selectedRange.peekByIndex(e);return!!r&&t(r)}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()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}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],r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const s=this.tableProps.countRows(),i=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),u=r?-l:0,h=t?-a:0;if(0===u&&0===h&&(0===s||0===i))return;let d=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:f,disableHeadersHighlight:p}=n;(0,o.default)(this,C,p),f&&Number.isInteger(null==f?void 0:f.row)&&Number.isInteger(null==f?void 0:f.col)&&(d=this.tableProps.createCellCoords((0,c.clamp)(f.row,u,s-1),(0,c.clamp)(f.col,h,i-1)));const g=this.tableProps.createCellCoords(u,h),m=this.tableProps.createCellCoords(s-1,i-1);this.clear(),this.setRangeStartOnly(g,void 0,d),h<0&&this.selectedByRowHeader.add(this.getLayerLevel()),u<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,o.default)(this,C,!1)}selectCells(e){var t=this;const r=(0,g.detectSelectionType)(e);if(r===g.SELECTION_TYPE_EMPTY)return!1;if(r===g.SELECTION_TYPE_UNRECOGNIZED)throw new Error(m.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
|
986
986
|
the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
|
987
987
|
columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const n=(0,g.normalizeSelectionFactory)(r,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),s=this.settings.navigableHeaders,i={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:s?this.tableProps.countRowHeaders():0,countColHeaders:s?this.tableProps.countColHeaders():0},o=!e.some((e=>{const t=n(e),r=t.isValid(i);return!(r&&!t.containsHeaders()||r&&t.containsHeaders()&&t.isSingleHeader())}));return o&&(this.clear(),this.setExpectedLayers(e.length),(0,d.arrayEach)(e,(e=>{const{from:t,to:r}=n(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(r.clone())})),this.finish()),o}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n="string"==typeof e?this.tableProps.propToCol(e):e,s="string"==typeof t?this.tableProps.propToCol(t):t,i=this.tableProps.countRows(),o=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,u=this.tableProps.createCellCoords(l,n),h=this.tableProps.createCellCoords(i-1,s),d=this.tableProps.createCellRange(u,u,h).isValid({countRows:i,countCols:o,countRowHeaders:0,countColHeaders:a});if(d){const e=0===a?0:(0,c.clamp)(r,l,-1),t=i-1,o=this.tableProps.createCellCoords(e,n),u=this.tableProps.createCellCoords(t,s),h=this.tableProps.createCellCoords((0,c.clamp)(r,l,i-1),n);this.runLocalHooks("beforeSelectColumns",o,u,h),o.row=e,u.row=t,this.setRangeStartOnly(o,void 0,h),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectColumns",o,u,h),this.finish()}return d}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const n=this.tableProps.countRows(),s=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),o=0===i?0:-i,a=this.tableProps.createCellCoords(e,o),l=this.tableProps.createCellCoords(t,s-1),u=this.tableProps.createCellRange(a,a,l).isValid({countRows:n,countCols:s,countRowHeaders:i,countColHeaders:0});if(u){const n=0===i?0:(0,c.clamp)(r,o,-1),a=s-1,l=this.tableProps.createCellCoords(e,n),u=this.tableProps.createCellCoords(t,a),h=this.tableProps.createCellCoords(e,(0,c.clamp)(r,o,s-1));this.runLocalHooks("beforeSelectRows",l,u,h),l.col=n,u.col=a,this.setRangeStartOnly(l,void 0,h),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(u),this.runLocalHooks("afterSelectRows",l,u,h),this.finish()}return u}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(),r=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),s=this.highlight.createColumnHeader(),i=this.highlight.createActiveRowHeader(),o=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();t.commit(),r.commit(),n.commit(),s.commit(),i.commit(),o.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(t)}}(0,u.mixin)(R,f.default);t.default=R},64396:(e,t,r)=>{"use strict";r(91683);var n=r(73203);t.__esModule=!0;var s=n(r(42538)),i=n(r(48427)),o=r(76163),a=n(r(63806));function l(e,t){h(e,t),t.add(e)}function u(e,t,r){h(e,t),t.set(e,r)}function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,r){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return r}var d=new WeakMap,f=new WeakMap,p=new WeakMap,g=new WeakSet,m=new WeakSet,E=new WeakSet,w=new WeakSet,y=new WeakSet;class C{constructor(e,t){l(this,y),l(this,w),l(this,E),l(this,m),l(this,g),u(this,d,{writable:!0,value:void 0}),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:{x:0,y:0}}),(0,i.default)(this,d,e),(0,i.default)(this,f,t)}transformStart(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const n=(0,s.default)(this,f).createCellCoords(e,t);let i=(0,s.default)(this,d).current().highlight;const a=(0,s.default)(this,f).visualToRenderableCoords(i);let l=0,u=0;if(this.runLocalHooks("beforeTransformStart",n),null!==a.row&&null!==a.col){const{width:e,height:t}=c(this,E,R).call(this),{row:a,col:h}=c(this,w,T).call(this,i),d=(0,s.default)(this,f).fixedRowsBottom(),p=(0,s.default)(this,f).minSpareRows(),g=(0,s.default)(this,f).minSpareCols(),C=(0,s.default)(this,f).autoWrapRow(),v=(0,s.default)(this,f).autoWrapCol(),_=(0,s.default)(this,f).createCellCoords(a+n.row,h+n.col);if(_.row>=t){const n=(0,o.createObjectPropListener)(r&&p>0&&0===d),i=_.col+1,a=(0,s.default)(this,f).createCellCoords(_.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",n,c(this,y,N).call(this,a),i>=e),n.value?this.runLocalHooks("insertRowRequire",(0,s.default)(this,f).countRenderableRows()):v&&_.assign(a)}else if(_.row<0){const r=(0,o.createObjectPropListener)(v),n=_.col-1,i=(0,s.default)(this,f).createCellCoords(t+_.row,n<0?e+n:n);this.runLocalHooks("beforeColumnWrap",r,c(this,y,N).call(this,i),n<0),v&&_.assign(i)}if(_.col>=e){const n=(0,o.createObjectPropListener)(r&&g>0),i=_.row+1,a=(0,s.default)(this,f).createCellCoords(i>=t?i-t:i,_.col-e);this.runLocalHooks("beforeRowWrap",n,c(this,y,N).call(this,a),i>=t),n.value?this.runLocalHooks("insertColRequire",(0,s.default)(this,f).countRenderableColumns()):C&&_.assign(a)}else if(_.col<0){const r=(0,o.createObjectPropListener)(C),n=_.row-1,i=(0,s.default)(this,f).createCellCoords(n<0?t+n:n,e+_.col);this.runLocalHooks("beforeRowWrap",r,c(this,y,N).call(this,i),n<0),C&&_.assign(i)}const{rowDir:b,colDir:M}=c(this,m,S).call(this,_);l=b,u=M,i=c(this,y,N).call(this,_)}return this.runLocalHooks("afterTransformStart",i,l,u),i}transformEnd(e,t){c(this,g,v).call(this,{x:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countRowHeaders():0,y:(0,s.default)(this,f).navigableHeaders()?(0,s.default)(this,f).countColHeaders():0});const r=(0,s.default)(this,f).createCellCoords(e,t),n=(0,s.default)(this,d).current(),i=(0,s.default)(this,f).visualToRenderableCoords(n.highlight),o=n.to.clone();let a=0,l=0;if(this.runLocalHooks("beforeTransformEnd",r),null!==i.row&&null!==i.col){const{row:e,col:t}=c(this,w,T).call(this,n.to),i=(0,s.default)(this,f).createCellCoords(e+r.row,t+r.col),{rowDir:u,colDir:h}=c(this,m,S).call(this,i);a=u,l=h;const d=c(this,y,N).call(this,i);0===r.row&&0!==r.col?o.col=d.col:0!==r.row&&0===r.col?o.row=d.row:(o.row=d.row,o.col=d.col)}return this.runLocalHooks("afterTransformEnd",o,a,l),o}}function v(e){let{x:t,y:r}=e;(0,i.default)(this,p,{x:t,y:r})}function S(e){const{width:t,height:r}=c(this,E,R).call(this);let n=0,s=0;return e.row<0?(n=-1,e.row=0):e.row>0&&e.row>=r&&(n=1,e.row=r-1),e.col<0?(s=-1,e.col=0):e.col>0&&e.col>=t&&(s=1,e.col=t-1),{rowDir:n,colDir:s}}function R(){return{width:(0,s.default)(this,p).x+(0,s.default)(this,f).countRenderableColumns(),height:(0,s.default)(this,p).y+(0,s.default)(this,f).countRenderableRows()}}function T(e){const{row:t,col:r}=(0,s.default)(this,f).visualToRenderableCoords(e);return(0,s.default)(this,f).createCellCoords((0,s.default)(this,p).y+t,(0,s.default)(this,p).x+r)}function N(e){const t=e.clone();return t.col=e.col-(0,s.default)(this,p).x,t.row=e.row-(0,s.default)(this,p).y,(0,s.default)(this,f).renderableToVisualCoords(t)}(0,o.mixin)(C,a.default);t.default=C},7763:(e,t,r)=>{"use strict";t.__esModule=!0,t.detectSelectionType=p,t.normalizeSelectionFactory=g,t.transformSelectionToColumnDistance=function(e){const t=p(e.getSelected());if(t===o||t===a)return[];const r=g(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),n=new Set;(0,s.arrayEach)(e.getSelected(),(e=>{const{from:t,to:i}=r(e),o=Math.max(t.col,0),a=i.col-o+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>o+t)),(e=>{n.has(e)||n.add(e)}))}));const i=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(i,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=p(e.getSelected());if(t===o||t===a)return[];const r=g(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),n=new Set;(0,s.arrayEach)(e.getSelected(),(e=>{const{from:t,to:i}=r(e),o=Math.max(t.row,0),a=i.row-o+1;(0,s.arrayEach)(Array.from(new Array(a),((e,t)=>o+t)),(e=>{n.has(e)||n.add(e)}))}));const i=Array.from(n).sort(((e,t)=>e-t));return(0,s.arrayReduce)(i,((e,t,r,n)=>(0!==r&&t===n[r-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},r(91683),r(63517);var n=r(94699),s=r(98887),i=r(97639);const o=t.SELECTION_TYPE_UNRECOGNIZED=0,a=t.SELECTION_TYPE_EMPTY=1,l=t.SELECTION_TYPE_ARRAY=2,u=t.SELECTION_TYPE_OBJECT=3,h=t.SELECTION_TYPES=[u,l],c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),f=Symbol("child");function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==f)throw new Error("The second argument is used internally only and cannot be overwritten.");const r=Array.isArray(e),s=t===d;let i=o;if(r){const t=e[0];if(0===e.length)i=a;else if(s&&t instanceof n.CellRange)i=u;else if(s&&Array.isArray(t))i=p(t,f);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!c[t].includes(typeof e)))&&(i=l)}}return i}function g(e){let{createCellCoords:t,createCellRange:r,keepDirection:n=!1,propToCol:s}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===u;let l=a?o.from.row:o[0],h=a?o.from.col:o[1],c=a?o.to.row:o[2],d=a?o.to.col:o[3];if("function"==typeof s&&("string"==typeof h&&(h=s(h)),"string"==typeof d&&(d=s(d))),(0,i.isUndefined)(c)&&(c=l),(0,i.isUndefined)(d)&&(d=h),!n){const e=l,t=h,r=c,n=d;l=Math.min(e,r),h=Math.min(t,n),c=Math.max(e,r),d=Math.max(t,n)}const f=t(l,h),p=t(c,d);return r(f,f,p)}}},23714:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSave",callback(e,t,r){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(r.includes("shift"))}}},26817:(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()}}},44392:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorFastOpen",callback(e,t){const{highlight:r}=e.getSelectedRangeLast();r.isHeader()||e._getEditorManager().openEditor(null,t,!0)}}},45286:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command]};var n=r(23714),s=r(26817),i=r(44392),o=r(16400)},16400:(e,t,r)=>{"use strict";t.__esModule=!0;var n=r(30369);t.command={name:"editorOpen",callback(e,t,r){const s=e._getEditorManager(),{highlight:i}=e.getSelectedRangeLast();i.isHeader()||(e.getSettings().enterBeginsEditing?s.cellProperties.readOnly?s.moveSelectionAfterEnter():s.openEditor(null,t,!0):s.moveSelectionAfterEnter(r.includes("shift")),(0,n.stopImmediatePropagation)(t))}}},89433:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}}},41762:(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)}}},34928:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,-1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),i=Math.min(r.row-s,e.countRows()-1);e.selection.setRangeEnd(r),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},39259:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command]};var n=r(41762),s=r(34928),i=r(73951),o=r(6197),a=r(91685),l=r(89248),u=r(94976),h=r(4680),c=r(84615),d=r(28971),f=r(908),p=r(26082),g=r(23137),m=r(30846)},73951:(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())}}},6197:(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())}}},91685:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(r.col,n.col,t.row)}}},89248:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast(),o=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||o){const n=r.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(s.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,i.col))}}}},94976:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},4680:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n}=e.getSelectedRangeLast();n.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,r.getNearestNotHiddenIndex(0,1)))}}},84615:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast(),o=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||o){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(s.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,n))}}}},28971:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast(),o=n.isHeader()&&e.selection.isSelectedByColumnHeader();if(n.isCell()||o){const n=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(s.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,n))}}}},908:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:r}=e,{highlight:n,from:s,to:i}=e.getSelectedRangeLast(),o=n.isHeader()&&e.selection.isSelectedByRowHeader();if(n.isCell()||o){const n=r.getNearestNotHiddenIndex(0,1);t.setRangeStart(s.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(n,i.col))}}}},26082:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:r,to:n}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(r.row,n.row,t.col)}}},23137:(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)}}},30846:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),r=Math.max(t.row-e.countVisibleRows(),0),n=e.rowIndexMapper.getNearestNotHiddenIndex(r,1);if(null!==n){const r=e._createCellCoords(n,t.col),s=t.row-e.view.getFirstFullyVisibleRow(),i=Math.max(r.row-s,0);e.selection.setRangeEnd(r),e.scrollViewportTo({row:i,verticalSnap:"top",horizontalSnap:"start"})}}}},12506:(e,t,r)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return c.forEach((r=>{let{name:n,callback:s}=r;t[n]=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return s(e,...r)}})),t};var n=r(45286),s=r(39259),i=r(90565),o=r(89433),a=r(51211),l=r(1588),u=r(52901),h=r(39452);const c=[...(0,n.getAllCommands)(),...(0,s.getAllCommands)(),...(0,i.getAllCommands)(),o.command,a.command,l.command,u.command,h.command]},42927:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}}},98638:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=e.countVisibleRows()+r;n===e.countRows()-1?s=1:n+s>e.countRows()&&(s=e.countRows()-n-1),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},90565:(e,t,r)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[n.command,s.command,i.command,o.command,a.command,l.command,u.command,h.command,c.command,d.command,f.command,p.command,g.command,m.command,E.command,w.command]};var n=r(42927),s=r(98638),i=r(69198),o=r(29772),a=r(59848),l=r(72893),u=r(77729),h=r(39817),c=r(53648),d=r(81489),f=r(92880),p=r(84064),g=r(8959),m=r(67295),E=r(63212),w=r(24915)},69198:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineEnd",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(-n.row,-n.col)}}},29772:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineStart",callback(e,t){const r=e.getSettings(),n="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;e.selection.transformStart(n.row,n.col)}}},59848:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}}},72893:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}}},77729:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===r&&(r=-1),e.selection.setRangeStart(e._createCellCoords(r,t))}}},39817:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsBottom,10),i=r.getNearestNotHiddenIndex(e.countRows()-s-1,-1),o=n.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(i,o))}}},53648:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:r}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,r.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},81489:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:r}=e,n=parseInt(e.getSettings().fixedColumnsStart,10),s=e.getSelectedRangeLast().highlight.row,i=r.getNearestNotHiddenIndex(n,1);t.setRangeStart(e._createCellCoords(s,i))}}},92880:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:r}=e,n=e.getSelectedRangeLast().highlight.row;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===s&&(s=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(n,s))}}},84064:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:r}=e,{row:n}=e.getSelectedRangeLast().highlight;let s=r.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===s&&(s=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(n,s))}}},8959:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===r&&(r=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(r,t))}}},67295:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:r,columnIndexMapper:n}=e,s=parseInt(e.getSettings().fixedRowsTop,10),i=parseInt(e.getSettings().fixedColumnsStart,10),o=r.getNearestNotHiddenIndex(s,1),a=n.getNearestNotHiddenIndex(i,1);t.setRangeStart(e._createCellCoords(o,a))}}},63212:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}}},24915:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),r=t?e.countColHeaders():0,{row:n}=e.getSelectedRangeLast().highlight;let s=-(e.countVisibleRows()+r);n===-r?s=-1:n+s<r&&(s=-(n+r)),e.selection.transformStart(s,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},39452:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:r,col:n}=t[t.length-1].highlight.normalize(),s=e.getDataAtCell(r,n),i=new Map;for(let o=0;o<t.length;o++)t[o].forAll(((t,o)=>{if(t>=0&&o>=0&&(t!==r||o!==n)){const{readOnly:r}=e.getCellMeta(t,o);r||i.set(`${t}x${o}`,[t,o,s])}}));e.setDataAtCell(Array.from(i.values()))}}},51211:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),r=e.view.getFirstFullyVisibleRow()-1,n=e.view.getFirstFullyVisibleColumn()-1,s=e.view.getLastFullyVisibleRow()+1,i=e.view.getLastFullyVisibleColumn()+1,o=e._createCellCoords(r,n),a=e._createCellCoords(s,i);if(!e._createCellRange(o,o,a).includes(t)&&(t.row>=0||t.col>=0)){const r={};if(t.col>=0){const n=Math.floor(e.countVisibleCols()/2);r.col=Math.max(t.col-n,0)}if(t.row>=0){const n=Math.floor(e.countVisibleRows()/2);r.row=Math.max(t.row-n,0)}e.scrollViewportTo({...r,verticalSnap:"top",horizontalSnap:"start"})}}}},1588:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}}},52901:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}}},95479:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault",t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},14160:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),r=(0,s.createKeyboardShortcutCommandsPool)(e),i={group:n.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>r.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>r.editorCloseWithoutSaving()}],i)};var n=r(95479),s=r(12506)},67630:(e,t,r)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),r=(0,i.createKeyboardShortcutCommandsPool)(e),o={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,n.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:s.GRID_GROUP};t.addShortcuts([{keys:[["F2"]],callback:e=>r.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>r.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>r.emptySelectedCells()}],{group:s.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,n.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>r.selectAllCells()},{keys:[["Control/Meta","Shift","Space"]],callback:()=>r.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>r.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>r.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>r.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>r.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>r.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>r.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>r.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>r.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>r.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>r.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>r.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>r.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>r.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>r.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>r.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>r.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>r.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:()=>r.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],preventDefault:!1,callback:()=>r.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>r.scrollToFocusedCell()}],o)};var n=r(97639),s=r(95479),i=r(12506)},51377:(e,t,r)=>{"use strict";t.__esModule=!0;var n={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[s.shortcutsEditorContext,i.shortcutsGridContext].forEach((t=>t(e)))};var s=r(14160),i=r(67630),o=r(95479);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(n,e)||e in t&&t[e]===o[e]||(t[e]=o[e]))}))},76435:(e,t,r)=>{"use strict";t.__esModule=!0,t.isContextObject=h,r(91683),r(63517);var n=r(8815),s=r(15870),i=r(97639),o=r(46029),a=r(76163),l=r(45561);const u=Symbol("shortcut-context");function h(e){return(0,a.isObject)(e)&&e.__kindOf===u}t.createContext=e=>{const t=(0,n.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),r=function(){let{keys:e,callback:r,group:n,runOnlyIf:a=(()=>!0),captureCtrl:u=!1,preventDefault:c=!0,stopPropagation:d=!1,relativeToGroup:f,position:p,forwardToContext:g}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.isUndefined)(n))throw new Error("You need to define the shortcut's group.");if(!1===(0,o.isFunction)(r))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(l.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
|
988
988
|
using the KeyboardEvent.key properties:\x20
|